2008-10-03 Mark Probst <mark.probst@gmail.com>
[mono.git] / mono / mini / ChangeLog
1 2008-10-03  Mark Probst  <mark.probst@gmail.com>
2
3         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
4
5 2008-10-03  Mark Probst  <mark.probst@gmail.com>
6
7         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
8         thunks.
9
10 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
11         
12         * simd-intrinsics.c: Forgot to add this one.
13
14         * mini-codegen.c: Fix macro in case SIMD is not supported.
15
16 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
17         
18         This patch land initial JIT support for simd intrinsics.
19
20         * mini-x86.h: Added new define to make --enable_minimal work on x86.
21
22         * Makefile.am: Added simd-intrinsics.c
23
24         * simd-intrinsics.c: New file with simd instrinsic related
25         code.
26
27         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
28
29         * cpu-x86.md: Add simd related instructions.
30
31         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
32
33         * driver.c: Added two new --regression variants.
34
35         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
36
37         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
38
39         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
40         extract some complicated logic to helper functions.
41
42         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
43
44         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
45
46         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
47         the specialized simplification pass.
48
49         * method-to-ir.c (mono_spill_global_vars): Use new macro.
50
51         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
52
53         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
54         table.
55
56         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
57         if MONO_ARCH_NEED_SIMD_BANK is defined.
58
59         * mini-ops.h: Added the new simd ops.
60
61         * mini-x86.c: Added mono_arch_xregname.
62
63         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
64
65         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
66
67         * mini-x86.h: Define simd related MONO_ARCH macros.
68
69         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
70
71         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
72
73         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
74         MONO_CLASS_IS_SIMD to deal with simd related IR.
75
76         * mini.h (MonoInst): Added spill_var to the backend union.
77
78         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
79
80         * mini.h: Added forward declarations of the new simd fuctions.
81
82         * optflags-def.h: Added new optimization names SIMD.
83
84         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
85
86         * regalloc.h: Added support for working with 3 register banks.
87
88         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
89
90         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
91
92 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
93
94         * mini-exceptions.c: remove 64 bit related ifdef clutter.
95
96 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
97
98         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
99         instead of one on 64 bit systems.
100
101         * method-to-ir.c: Remove unused includes.
102
103 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
104
105         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
106         cfg->used_int_regs, since the two are different on arm.
107
108 2008-10-02  Mark Probst  <mark.probst@gmail.com>
109
110         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
111         mono_method_get_vtable_index() to get the vtable index.
112
113 2008-10-02  Mark Probst  <mark.probst@gmail.com>
114
115         * method-to-ir.c (mono_method_to_ir2): Don't create native
116         wrappers for array methods, because they're never called (and if
117         they were called they wouldn't work).
118
119 2008-10-02  Mark Probst  <mark.probst@gmail.com>
120
121         * method-to-ir.c (mono_method_to_ir2): Array methods are
122         special-cased and must not be invoked indirectly via the (M)RGCTX
123         when generic sharing is turned on.  Fixes #431413.
124
125 2008-10-01  Mark Probst  <mark.probst@gmail.com>
126
127         * method-to-ir.c: When generic sharing is active, call
128         non-interface virtual generic methods via the standard trampoline.
129
130         * mini-trampolines.c: Handle virtual generic shared methods.
131
132         * mini.h, mini-x86.c, mini-x86.h: New argument for
133         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
134         method thunks and which is the trampoline to call if the lookup
135         fails.  Enable the virtual generic method thunk for x86.
136
137         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
138         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
139         argument but assert that it's NULL, because these archs don't yet
140         implement the virtual generic method thunk.  Changes in the IMT
141         thunk data structures.
142
143 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
144
145         * aot-compiler.c (emit_globals): Avoid invalid characters in
146         the static linking symbol.
147
148         * objects.cs: Add a test for the range check optimization. Fix warnings.
149
150         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
151         optimization from the current JIT.
152
153         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
154         later in decompose_array_access_opts () to allow more optimizations.
155
156         * method-to-ir.c (mono_handle_soft_float): Rename this to 
157         mono_decompose_soft_float () for consistency.
158
159         * mini-ops.h: Fix arguments of OP_STRLEN.
160
161         * method-to-ir.c (save_cast_details): Extract the cast details saving code
162         into a separate function.
163         (reset_cast_details): Ditto.
164         (handle_unbox): Save cast details. Fixes #431254.
165
166         * method-to-ir.c: Remove some obsolete FIXMEs.
167
168 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
169
170         * ir-emit.h (alloc_dreg): Write a warning before crashing.
171
172 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
173
174         * mini-codegen.c: More work on macros to make them
175         ready for multiple regbanks.
176
177 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
178
179         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
180
181         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
182
183 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
184
185         * mini-codegen.c (mono_spillvar_offset): Proper support for
186         multiple regbanks.
187
188 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
189
190         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
191         the stack overflow changes.
192
193 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
194
195         * mini-codegen.c: Make all bank macros depend on reg_bank.
196
197         * mini-codegen.c (mono_local_regalloc): Make free mask
198         initialization regbank aware.
199
200 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
201
202         * mini-codegen.c (mono_local_regalloc): Extract callee
203         mask selection to a function and make it regbank aware.
204
205 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
206
207         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
208         code to deal with many regbanks.
209
210 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
211
212         * mini-codegen.c: More fp->regbank changes.
213
214 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
215
216         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
217         of a hardcoded constant.
218
219 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
220
221         * method-to-ir.c (type_from_stack_type): Fix typo.
222
223 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
224
225         * mini-ia64.c (emit_move_return_value): Convert float return values to
226         double.
227
228         * objects.cs: Add a new test.
229         
230         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
231         VARARG methods to fix an assert later.
232
233         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
234         end so it at least compiles.
235
236 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
237
238         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
239
240 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
241
242         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
243         optimization to a new function (emit_optimized_ldloca_ir) and enable
244         it for both ldloca and ldloca_s.
245
246 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
247
248         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
249         gshared CASTCLASS code.
250
251         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
252         amd64, where the libc stack unwinder encounters stack frames referring to
253         native code in unmapped memory.
254
255         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
256         sharing.
257
258         * generics.cs: Add new test.
259
260 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
261
262         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
263         add a check that one of the ARM_FPU_ constants is defined.
264
265         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
266         
267         * mini-exceptions.c: Fix build on non-altstack platforms.
268
269         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
270         sharing of vtypes.
271
272         * ir-emit.h: Add a comment to NEW_PCONST.
273
274         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
275
276         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
277
278         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
279         after the changes to MonoJitDomainInfo.
280
281 2008-09-27  Mark Probst  <mark.probst@gmail.com>
282
283         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
284
285 2008-09-27  Mark Probst  <mark.probst@gmail.com>
286
287         * mini-ppc.c: Compiler warning fixes.
288
289 2008-09-27  Mark Probst  <mark.probst@gmail.com>
290
291         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
292         for pinvokes.
293
294 2008-09-27  Mark Probst  <mark.probst@gmail.com>
295
296         * exceptions-ppc.c, mini-ppc.h: Compile
297         mono_arch_handle_altstack_exception() on Darwin, too.
298
299 2008-09-27  Mark Probst  <mark.probst@gmail.com>
300
301         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
302         work on archs which don't have generic sharing implemented, only
303         without the vtable_arg.
304
305 2008-09-26  Mark Probst  <mark.probst@gmail.com>
306
307         * mini.c: Added comment explaining why delegate ctor icall
308         wrappers are compiled.
309
310 2008-09-26  Mark Probst  <mark.probst@gmail.com>
311
312         * mini.c: Don't produce trampolines to delegate ctor icall
313         wrappers but compile them upfront.
314
315 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
316
317         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
318         runtime-set function when going back to managed code. Currently this
319         is used to set back the protection on the soft ovf pages and/or to
320         throw the stack overflow exception that happened in unmanaged code.
321
322 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
323
324         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
325         runtime-set function when going back to managed code. Currently this
326         is used to set back the protection on the soft ovf pages and/or to
327         throw the stack overflow exception that happened in unmanaged code.
328
329 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
330
331         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
332         the support code for restoring stack protection after stack overflows
333         that happen in unmanaged code. Don't set the exec permission on the
334         soft overflow area.
335
336 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
337
338         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
339         delegate->method_ptr is set. Fixes #428054.
340
341 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
342
343         * tests.cs: Rename to ratests.cs.
344
345         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
346         emit_get_rgctx_... functions.
347
348 2008-09-25  Mark Probst  <mark.probst@gmail.com>
349
350         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
351
352 2008-09-25  Mark Probst  <mark.probst@gmail.com>
353
354         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
355         before asserting that method is sharable.
356
357 2008-09-25  Mark Probst  <mark.probst@gmail.com>
358
359         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
360         whether method needs a static RGCTX wrapper used instead of
361         complex conditions.
362
363         * generic-sharing.c, mini.h: A few functions moved to
364         metadata/generic-sharing.c.
365
366 2008-09-25  Mark Probst  <mark.probst@gmail.com>
367
368         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
369         Generic code sharing for value types, which essentially means
370         treating value type methods like static methods.  The RGCTX is
371         passed in the same way.
372
373 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
374
375         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
376         opcode when creating multi-dimensional arrays of open types.
377
378         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
379         open generic types.
380
381         * generics.cs: Add a test.
382
383         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
384
385 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
386
387         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
388
389         * mini.c (mini_method_compile): Set it when running under the debugger. 
390
391         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
392         vreg optimization if the flag is set.
393
394         * driver.c (mono_main): Add --attach= option to pass options to
395         the attach agent.
396
397         * mini.c (sigquit_signal_handler): Start the attach agent.
398
399         * ssapre.c: Disable this to save space since it is not yet ported to
400         linear IR.
401
402         * regalloc2.c: Disable this to save space.
403
404         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
405
406 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
407
408         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
409         the -v option useful again.
410
411 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
412
413         * mini-amd64.c (mono_arch_output_basic_block): Add support for
414         --break-at-bb.
415
416         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
417         arrays of arrays. Fixes #428406.
418
419         * method-to-ir.c (mini_emit_castclass): Ditto.
420
421         * objects.cs: Add new test.
422         
423 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
424
425         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
426         was wrong at it choked against target_type_is_incompatible for byref types.
427
428 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
429
430         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
431         places.
432
433 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
434
435         * mini-exceptions.c: update a few more exceptions-related counters.
436
437 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
438
439         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
440         new functions to allocate from persistent mempools.
441
442 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
443
444         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
445         multiple register banks in the future.
446
447         * mini-codegen.c (mono_local_regalloc): Fix a warning.
448
449 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
450
451         * mini.c (type_to_eval_stack_type): Remove duplicated function.
452
453         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
454
455         * mini.h: Export type_to_eval_stack_type.
456
457         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
458         is only ins->klass of byref types.
459
460 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
461
462         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
463         (mini_emit_memcpy2): Ditto.
464
465         * mini-amd64.c: Fix a warning.
466
467 2008-09-21  Mark Probst  <mark.probst@gmail.com>
468
469         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
470         linking.
471
472 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
473
474         * method-to-ir.c: Extract stloc micro-optimization to a
475         function and apply it to all cases.
476
477 2008-09-19  Mark Probst  <mark.probst@gmail.com>
478
479         * method-to-ir.c: Don't fail generic code sharing in cases we
480         already support.
481
482 2008-09-18  Mark Probst  <mark.probst@gmail.com>
483
484         * mini-ppc.c: Handle structs in tailcalls on Darwin.
485
486 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
487
488         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
489         implementation.
490
491 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
492
493         * trace.c: make tracing more useful and correct, with per-thread
494         id and indent info.
495
496 2008-09-15  Mark Probst  <mark.probst@gmail.com>
497
498         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
499         doing a method call and the argument is an R4.
500
501 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
502
503         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
504         generic methods.
505
506 2008-09-13  Mark Probst  <mark.probst@gmail.com>
507
508         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
509
510 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
511
512         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
513         (MONO_JUMP_TABLE_FROM_INS): Ditto.
514
515 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
516
517         * driver.c: Add a --agent argument (not supported yet) to load managed
518         agent assemblies before loading the main assembly, similarly to how the
519         Java VM handles agents.
520
521 2008-09-11  Mark Probst  <mark.probst@gmail.com>
522
523         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
524         function to do stack layout of local variables.
525
526 2008-09-11  Mark Probst  <mark.probst@gmail.com>
527
528         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
529         calculation.
530
531 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
532
533         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
534         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
535         JIT if DISABLE_JIT is defined.
536
537         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
538         defined.
539
540 2008-09-10  Mark Probst  <mark.probst@gmail.com>
541
542         * iltests.il.in: Disable the fconv test on PPC (the result is
543         undefined according to ECMA).
544
545 2008-09-10  Mark Probst  <mark.probst@gmail.com>
546
547         * iltests.il.in: Enable tail call tests for PPC.
548
549         * mini.h: Add variable for storing incoming valuetype argument
550         addresses for tail calls.
551
552         * mini-ppc.c: Implement valuetype arguments and return values for
553         tailcalls on Linux.
554
555 2008-09-09  Mark Probst  <mark.probst@gmail.com>
556
557         * mini-ppc.c: Partially implement tail calls (struct arguments and
558         return values not supported).
559
560         * method-to-ir.c: Enable tail calls on PPC.
561
562 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
563
564         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
565         runtime-invoke wrappers to work around the problem of them getting
566         assigned to a random class.
567
568         * aot-runtime.c (mono_aot_get_method): Ditto.
569         
570 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
571
572         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
573         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
574
575 2008-09-07  Mark Probst  <mark.probst@gmail.com>
576
577         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
578         until they're implemented properly.
579
580         * exceptions-ppc.c: Use arch-independent exception-handling code
581         instead of custom one.
582
583         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
584         for Linear IR.
585
586         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
587
588         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
589         applies when __powerpc__ is defined.
590
591 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
592
593         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
594         methods to their code to avoid computing the full name of wrappers and
595         doing a lookup in a string hash table.
596
597 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
598
599         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
600         we identify bblocks before method_to_ir () is ran.
601
602         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
603         Also avoid optimizing branches pointing to themselves.
604
605         * mini.c (mini_method_compile): Ditto. Fixes #422947.
606
607 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
608
609         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
610
611 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
612
613         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
614         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
615         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
616         'buf'.
617
618         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
619         jumped to the same entry in plt_jump_table.
620
621 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
622
623         * method-to-ir.c (initialize_array_data): Handle field with RVA from
624         dynamic images.
625
626 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
627
628         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
629         other assignment can be if converted. Saves 1.5% on corlib size and fixes
630         #421807.
631
632 2008-08-29  Geoff Norton  <gnorton@novell.com>
633
634         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
635         segment, and doesn't properly handle .space as .text.  Fixes
636         AOT Mach/ARM
637
638 2008-08-29  Geoff Norton  <gnorton@novell.com>
639
640         * mini.c: Disable the mach exception handler when running on 
641         ARM
642
643 2008-08-29  Geoff Norton  <gnorton@novell.com>
644
645         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
646         globals on Darwin/ARM
647
648 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
649
650         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
651         since too many things depend on it. Instead, call 
652         mono_runtime_set_no_exec ().
653         
654         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
655         the new JIT.
656
657         * aot-compiler.c: Add an 'asm-only' AOT option.
658
659         * mini.c: Avoid initializing the runtime when doing AOT compilation.
660                 
661         * aot-compiler.c (compile_method): Disable gshared support for now as it
662         doesn't yet work.
663
664 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
665
666         * mini-amd64.h : Fix a compiler warning.
667
668         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
669           Changed to use a callback function to retrieve the unwind info.
670           This avoids problems observed when code blocks were removed by
671           unloading an app domain.
672
673         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
674           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
675           to work properly.
676
677         Contributed under MIT/X11 license.
678
679 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
680
681         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
682           case to keep the stack aligned to 8.
683
684         Contributed under MIT/X11 license.
685
686 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
687
688         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
689         avoid repeated linear searches.
690
691 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
692
693         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
694         methods it can't handle.
695         
696         * aot-compiler.c (add_method): Avoid adding a method twice.
697         (add_wrappers): Add runtime invoke wrappers for all methods.
698
699         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
700         function to create an aot-compatible version of this trampoline.
701
702         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
703
704 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
705
706         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
707
708         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
709         with a generic sharing failure.
710
711         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
712
713         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
714         CEE_RETHROW. Fixes #419634.
715
716         * mini.c (mono_method_to_ir): Ditto.
717
718         * exceptions.cs: Add a new test.
719         
720         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
721         to mono_type_stack_size_internal () since some callers might not pass in
722         an rgctx.
723
724         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
725         instrument_prolog. Fixes #419878.
726
727         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
728         doubles in soft float mode volatile.
729
730 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
731
732         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
733
734         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
735         to handle soft float correctly.
736
737         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
738         the fast path.
739
740         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
741
742         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
743         to sp, since the generics catch code requires it.
744
745         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
746         copying.
747
748         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
749         mono_arch_emit_imt_argument ().
750
751         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
752
753         * mini-arm.c tramp-arm.c: Generic sharing updates.
754
755 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
756
757         * mini-arm.c: Fix the arm build.
758
759         * generic-sharing.c (mini_type_get_underlying_type): New helper function
760         handling enums, generic instances and generic sharing.
761         (mini_type_stack_size_full): Ditto.
762
763         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
764         
765         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
766
767         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
768
769         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
770         trampolines.
771
772         * mini-arm.c: Various small generic sharing changes.
773
774         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
775         this for x86.
776         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
777         custom code.
778
779         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
780         helper function to return a generic class init trampoline.
781
782         * method-to-ir.c mini.c: Use it.
783         
784         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
785         arch-specfic function to return a generic class init trampoline.
786
787         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
788         the GENERIC_CLASS_INIT custom code.
789
790         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
791         a fatal error, not a sharing failure.
792
793         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
794         needed.
795
796         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
797         trampoline argument from MONO_ARCH_VTABLE_REG.
798
799         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
800         order of the arguments to the C trampoline: pass 'slot' as the trampoline
801         argument, and pass the vtable in VTABLE_REG.
802
803         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
804         order of the arguments to the C trampoline: pass 'slot' as the trampoline
805         argument, and pass the vtable in VTABLE_REG.
806         (mono_arch_create_trampoline_code_full): Remove some special casing for
807         the rgctx fetch trampoline.
808
809         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
810         Fixes #419273.
811
812         * iltests.il: Add a test for it.
813
814 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
815
816         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
817
818         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
819         no longer needed.
820
821         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
822         use mono_jit_info_table_find () to avoid recursion.
823         (mono_delegate_trampoline): Add a sync wrapper here.
824
825         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
826         here.
827
828         * mini.c (mono_method_to_ir): Ditto.
829         
830         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
831         add_sync_wrapper argument. Don't add a sync wrapper here.
832         (mono_create_jump_trampoline): Don't add a sync wrapper here.
833
834         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
835         
836 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
837
838         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
839           of nonvolatile registers back from MonoContext to CONTEXT.
840
841         Contributed under MIT/X11 license.
842
843 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
844
845         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
846           arguments on Winx64 there are only 4 argument registers.  For this
847           logic to work the last argument must be pulled from the stack.  
848
849         Contributed under MIT/X11 license.
850
851 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
852
853         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
854
855         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
856         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
857         encode/decode_method_ref ().
858
859         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
860
861         * aot-runtime.c (decode_patch): Ditto.  
862
863         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
864         MONO_PATCH_INFO_METHOD.
865
866         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
867         MonoGenericJitInfo.
868
869         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
870         MonoGenericJitInfo.
871
872         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
873
874         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
875         one from the caller.
876
877         * aot-runtime.c (decode_generic_inst): New function to decode and
878         return a interned generic inst.
879         (decode_klass_ref): Use it.
880         (decode_method_ref): Ditto.
881
882         * aot-compiler.c (emit_exception_debug_info): Save 
883         jinfo->has_generic_jit_info too.
884
885 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
886
887         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
888
889         * iltests.il.in: Add a test for fconv_to_i.
890
891         * liveness.c: Disable the liveness2 pass for now to save space.
892
893         * regalloc2.c: Include mempool-internals.h to fix warnings.
894
895         * aot-compiler.c (encode_method_ref): Encode the context of generic
896         instance methods.
897
898         * aot-runtime.c (decode_method_ref): Inflate generic methods using
899         the context saved in the aot file.
900
901         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
902
903         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
904
905         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
906         volatile so they won't be optimized away.
907
908 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
909
910         * ssa.c:
911         * ssa2.c:
912         * mini.c:
913         * regalloc2.c:
914         * dominators.c: Remove duplicated functions that now are in
915         mempool-internals.h.
916
917 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
918
919         * aot-compiler.c: Fix warnings.
920
921         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
922
923         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
924
925         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
926         as the patch type.
927
928         * mini.c (mono_resolve_patch_target): Ditto.
929         
930         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
931         (encode_klass_ref): Add support for encoding VARs/MVARs.
932
933         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
934
935         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
936         the handling of the got entries into a separate 'decode_got_entry' function.
937         Add support for RGCTX_FETCH.
938
939         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
940         clobbered by the trampoline code.
941
942         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
943         not clobbered by the indirect calling code.
944
945 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
946
947         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
948         to fix the build.
949
950 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
951
952         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
953         signature using the compilation mempool otherwise we would leak it.
954
955 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
956
957         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
958         mono_emit_abs_call ().
959
960         * patch-info.h: Add GENERIC_CLASS_INIT.
961
962         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
963
964         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
965         as their target as a near call.
966
967         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
968         ABS handling code.
969         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
970
971         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
972         call to a runtime function described by a patch.
973
974         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
975         mono_emit_abs_call, this has the advantage that the ABS handling code in
976         mono_codegen () can handle them both, and can handle other stuff in the
977         future without additional code.
978
979         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
980         entry.
981         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
982         abs addresses.
983
984         * mini.h: Add missing bblock related prototypes.
985
986         * mini.h (MonoCompile): Remove unused reverse_inst_list and
987         reverse_inst_list_len fields.
988
989         * mini.c: Refactor this file a bit by moving branch optimizations to 
990         branch-opts.c.
991
992         * method-to-ir.c: Merge generic sharing changes missed earlier.
993
994         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
995
996         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
997         shared patches. Process METHODCONST as a shared patch.
998
999         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
1000         as it crashes on the 2.0 mscorlib.
1001
1002         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
1003         to cause crashes.
1004         
1005         * aot-compiler.c: Use is_plt_patch () in a few additional places.
1006         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
1007         by IMT.
1008
1009         * aot-compiler.c: Reorganize the got handling code to be a bit more
1010         understandable.
1011
1012 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
1013
1014         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
1015         mono_patch_info_equals/hash, and use it to massively simplify
1016         get_plt_index ().
1017
1018         * mini.c (mono_patch_info_hash): Simplify this and add support for
1019         more patch types.
1020
1021         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
1022
1023         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
1024         handling code, since an offset is not enough to identify a trampoline.
1025
1026         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
1027
1028 2008-08-17  Mark Probst  <mark.probst@gmail.com>
1029
1030         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
1031
1032         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
1033
1034         * mini-ops.h: Argument and result types for OVF_CARRY ops.
1035
1036         * decompose.c: PPC decompositions for various ops.
1037
1038         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
1039
1040 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
1041
1042         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
1043         call the generic trampoline code using a call, instead of a jump, to
1044         remove some special casing from the generic trampoline code.
1045
1046         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
1047         (mono_codegen): Ditto.
1048
1049         * aot-compiler.c aot-runtime.c: Ditto.
1050
1051         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
1052
1053         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
1054         helper function to find the offset corresponding to a lazy fetch trampoline.
1055
1056         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
1057         when doing generic sharing.
1058
1059         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
1060         places.
1061         
1062         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
1063         mini-trampolines.c to be with the other trampoline creation functions.
1064
1065         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
1066         as it is equal to method->signature in most cases, add a 
1067         mono_emit_method_call_full variant which takes a signature and an imt
1068         argument as well.
1069
1070 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
1071
1072         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
1073         to this function, since it could be computed easily from the method 
1074         argument.
1075         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
1076         more.
1077
1078         * method-to-ir.c mini.c: Remove references to 
1079         compile_generic_method_wo_context.
1080
1081         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
1082         generic method calls.
1083         
1084         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
1085         dimensional non-szarrays.
1086
1087         * mini.c (mini_init): Register mono_array_new_1.
1088
1089         * jit-icalls.c (mono_array_new_1): New jit icall.
1090
1091         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
1092         pointing to the method.
1093
1094         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
1095         method addresses belonging to METHOD_JUMP patches in the 
1096         jump_target_got_slot_hash.
1097         (mono_aot_load_method): Ditto.
1098
1099         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
1100         METHOD_JUMP patches.
1101
1102         * mini.c (mini_create_jit_domain_info): New helper function which 
1103         initializes/frees domain->runtime_info.
1104         (mini_free_jit_domain_info): Ditto.
1105         (mini_init): Install the domain hook functions with the runtime.
1106
1107         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
1108         information maintained by the JIT.
1109
1110         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
1111         insertion into jump_table_hash into mono_codegen (), also implement proper
1112         locking.
1113
1114         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
1115         tail calls, it is already done by the aot code.
1116         
1117         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
1118         mechanism on amd64.
1119
1120         * iltests.il.in: Make the jmp test a bit more complex.
1121
1122         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
1123         generic instances which doesn't have a token.
1124
1125         * aot-runtime.c (decode_method_ref): Ditto.
1126         
1127         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
1128         can handle this case now.
1129         (handle_box): Ditto.
1130
1131 2008-08-15  Geoff Norton  <gnorton@novell.com>
1132
1133         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
1134         debugging check.
1135
1136 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
1137
1138         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
1139         calling generic methods.
1140
1141         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
1142
1143         * aot-runtime.c (decode_patch_info): Ditto.
1144
1145         * mini.c (mono_resolve_patch_target): Ditto.
1146         
1147         * patch-info.h: Add METHOD_RGCTX.
1148
1149         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
1150
1151 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
1152
1153         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
1154         arguments in registers.
1155
1156         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
1157         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
1158
1159         * mini.c (mini_method_compile): Abort aot compilation for generic
1160         methods if generic sharing is disabled.
1161         
1162         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
1163         an mrgctx.
1164
1165         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
1166         requiring an mrgctx.
1167
1168         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
1169         store instructions when converting a vcall to a normal call.
1170
1171         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
1172         mono_arch_find_jit_info.
1173
1174 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
1175
1176         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
1177         avoid calling mono_method_full_name () for every method even if the
1178         env var is not set.
1179         (check_inline_caller_method_name_limit): Ditto.
1180
1181 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
1182
1183         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
1184         assemblies in one run.
1185
1186         * aot-compiler.c (mono_compile_assembly): Only print out a count of
1187         skipped methods if it is not 0.
1188
1189         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
1190
1191 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
1192
1193         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
1194           MONO_ARCH_HAVE_UNWIND_TABLE.
1195
1196         Contributed under MIT/X11 license.
1197
1198 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
1199
1200         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
1201           from default optimizaton list on Winx64.
1202
1203         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
1204
1205         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
1206           the LMF from the MonoJitTlsData structure.
1207
1208         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
1209
1210         Contributed under MIT/X11 license.
1211
1212 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
1213
1214         * mini.c (sigsegv_signal_handler): Fix the build.
1215
1216         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
1217         assembly->aot_module.
1218
1219         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
1220         hash table. This simplifies and speeds up a lot of code, and fixes support
1221         for .netmodules.
1222
1223         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
1224         with the runtime.
1225
1226         * mini-exceptions.c: Ditto.
1227         
1228         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
1229         'native_offset' argument, since these are computed in the 
1230         mono_find_jit_info () function.
1231
1232         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
1233         is used by exceptions-ppc.c.
1234
1235         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
1236         mono_arch_find_jit_info ().
1237         
1238         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
1239         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
1240         generic code in mini-exceptions.c.
1241
1242 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
1243
1244         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
1245
1246         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
1247         
1248         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
1249         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
1250         called while holding the loader lock. Fixes #415608.
1251         (mono_aot_get_method_from_token_inner): Ditto.
1252
1253 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
1254
1255         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
1256         to reduce differences between this and the generic implementation in
1257         mini-exceptions.c.
1258         (ves_icall_get_frame_info): Ditto.
1259
1260         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
1261
1262         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
1263         longer neccesarry.
1264
1265         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
1266         mono_arch_get_call_filter () and make it non-static, for consistency with the
1267         other architectures.
1268
1269 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
1270
1271         * mini.c:
1272         * local-propagation.c:
1273         * mini-x86.c: Correct the name of arch defines.
1274
1275 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
1276
1277         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
1278         NO_EMULATE_LONG_SHIFT_OPS define.
1279
1280 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
1281
1282         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
1283         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
1284
1285         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
1286         MACH fixes. Merged from the 2.0 branch.
1287
1288         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
1289
1290         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
1291         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
1292
1293         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
1294
1295         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
1296         mono_marshal_get_native_wrapper () signature changes.
1297
1298 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
1299
1300         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
1301         conversion bug under arm.
1302
1303 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
1304
1305         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
1306
1307         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
1308         with overflow checking.
1309
1310 2008-08-05  Marek Habersack  <mhabersack@novell.com>
1311
1312         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
1313         to the genmdesc.pl file
1314
1315 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
1316
1317         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
1318         arg_array in the soft-float versions of the LOAD/STORE macros.
1319
1320         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
1321         implementation.
1322
1323         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
1324
1325 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
1326
1327         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
1328         a float HFA. Fixes #413621.
1329
1330 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
1331
1332         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
1333         frame_size to args_size. Fixes build.
1334
1335 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
1336
1337         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
1338         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
1339
1340         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
1341         the stack are not unaligned. Fixes #413247.
1342         
1343 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
1344
1345         * mini.c: update jitted methods performance counters.
1346
1347 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
1348
1349         * mini-exceptions.c: increase the exceptions thrown performance
1350         counter in mono_handle_exception ().
1351
1352 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
1353
1354         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
1355         can work with netmodules.
1356
1357 2008-07-28  Geoff Norton  <gnorton@novell.com>
1358
1359         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
1360         regression tests.
1361
1362 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
1363
1364         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
1365         correct place.
1366
1367 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
1368
1369         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
1370           The float param registers and other param registers must be the 
1371           same index on Windows x64.
1372
1373         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
1374           ArgValuetypeAddrInIReg argument case.  Setting the argument
1375           op to OP_VTARG_ADDR (OP_REGOFFSET)).
1376
1377         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
1378           variable computed above as the copy length for arguments of storage
1379           type ArgValuetypeAddrInIReg.
1380
1381         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
1382           ArgValuetypeAddrInIReg argument case.  This case will rely on
1383           mono_arch_emit_outarg_vt to emit the correct code later in the process.
1384
1385         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
1386           a 32 byte stack allocation for all calls.  We will omit the adjustment for
1387           jump and tail call instructoins as they do not follow the typical call behavior.
1388
1389         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
1390           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
1391           local variable and pass the local variable by reference to the called method.
1392
1393         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
1394           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
1395           of a struct is passed in a register it must be saved with the other
1396           volatile argument on the stack.
1397
1398         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
1399           frame pointer the stack adjustment value must be saved to the unwind 
1400           info structure.
1401
1402         Contributed under MIT/X11 license.
1403
1404 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
1405
1406         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
1407         which got lost in the merge.
1408
1409 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
1410
1411         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
1412         build.
1413
1414         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
1415         
1416         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
1417         icalls, since they won't be patched.
1418
1419         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
1420         different code sequence when running under valgrind to prevent some valgrind
1421         errors.
1422
1423         * iltests.il.in: Add new regression test.
1424
1425         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
1426         end with a throw.
1427
1428         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
1429         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
1430
1431         * iltests.il.in: Add new test.
1432
1433         * aot-compiler.c: Fix some warnings.
1434
1435         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
1436         Fixes #412494.
1437
1438 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
1439
1440         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
1441         (mini_usage_jitdeveloper): Add a missing --wapi option.
1442
1443 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
1444
1445         * mini-codegen.c: Simplify the is_fp macros.
1446         (free_up_ireg): Remove, use free_up_reg instead.
1447         (free_up_reg): Fix the fp case.
1448
1449 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
1450
1451         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
1452         lowered earlier.
1453
1454         * exceptions-x86.c: Merge some changes which seemed to have got lost
1455         in the linear-ir merge.
1456
1457         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
1458
1459         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
1460         long vreg volatile even if the variable was already created.
1461
1462         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
1463         volatile variables.
1464
1465 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
1466
1467         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
1468
1469         * mini.c (mono_jit_compile_method_inner): Add support for 
1470         MONO_EXCEPTION_BAD_IMAGE.
1471
1472         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
1473         mini_method_get_context () returns NULL. Fixes #356531.
1474
1475         * mini.c (mono_method_to_ir): Ditto.
1476         
1477         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
1478         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
1479
1480 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
1481
1482         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
1483         in the LDFTN implementation.
1484
1485 2008-07-25  Mark Probst  <mark.probst@gmail.com>
1486
1487         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
1488         code, patch calls to icalls, too, even if they're not in the
1489         shared generic code hash.  Fixes #411962.
1490
1491 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
1492
1493         * cpu-x86.md: Increase the length of the fcall opcodes.
1494
1495         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
1496         calls returning floats.
1497
1498         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
1499         on NEWARR.
1500         
1501         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
1502         missed earlier.
1503
1504         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
1505         into the domain->method_code_hash.
1506
1507         * aot-compiler.c: Fix win32 build.
1508
1509         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
1510         
1511         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
1512         gshared NEWARR implementation.
1513
1514         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
1515
1516         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
1517         can be used outside of method_to_ir.
1518
1519         * mini.h (MonoCompile): Add arg_types field.
1520
1521         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
1522         
1523         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
1524         the values of the local arg_array and param_types array.
1525
1526 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
1527
1528         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
1529         got accesses might only get generated later when NEWOBJ is decomposed.
1530         
1531         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
1532         looking up the native code of the target method when a delegate is called
1533         for the first time.
1534
1535         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
1536         optimization.
1537
1538         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
1539
1540         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
1541         AOT work on platforms without a working dlsym implementation.
1542
1543         * mini.h: Bump AOT image format version.
1544         
1545 2008-07-24  Mark Probst  <mark.probst@gmail.com>
1546
1547         * mini-exceptions.c: Free a MonoType with
1548         mono_metadata_free_type() instead of g_free().
1549
1550         * aot-runtime.c: Free a MonoType.
1551
1552 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
1553
1554         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
1555         optimization.
1556
1557         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
1558         fp stack on x86.
1559
1560 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
1561         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
1562         profiler hook.
1563
1564 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
1565
1566         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
1567         NEWOBJ calls on valuetypes.
1568
1569         * iltests.il.in: Add new test.
1570
1571         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
1572
1573 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
1574
1575         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
1576         is no longer needed.
1577
1578         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
1579         non register sized integer arguments.
1580         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
1581         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
1582         emit_memcpy2 ().
1583
1584         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
1585         CEE_MONO_RETOBJ.
1586         
1587         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
1588         two a binop with different sized arguments is emitted.
1589
1590         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
1591         instruction in the ins==NULL case.
1592
1593 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
1594
1595         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
1596
1597         * mini-x86.c: Fix osx build.
1598
1599         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
1600         opcodes as well.
1601
1602         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
1603         instruction for non int sized variables.
1604
1605         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
1606         implementation.
1607
1608 2008-07-23  Robert Jordan  <robertj@gmx.net>
1609
1610         * method-to-ir.c: Fix MSVC build.
1611
1612 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
1613
1614         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
1615         a non int sized type, widen it to an int since newer versions of gcc seem to
1616         generate code which needs this.
1617
1618         * ssa2.c abcremoval2.c: Fix warnings.
1619
1620         * *: Merge the Linear IR branch.
1621
1622         The original branch is at trunk/branches/vargaz/mini-linear-il, and
1623         the ChangeLog file there describes all the changes done over the years. 
1624         Further documentation can be found at www.mono-project.com/Linear_IL.
1625
1626 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
1627
1628         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
1629           The float param registers and other param registers must be the 
1630           same index on Windows x64.
1631
1632         Contributed under MIT/X11 license.
1633
1634 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
1635
1636         * mini.c: Make the previous fix GC safe.
1637
1638 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
1639
1640         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
1641
1642 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
1643
1644         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
1645           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
1646           ArgValuetypeAddrInIReg instead.
1647
1648         Contributed under MIT/X11 license.
1649
1650 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
1651
1652         * mini-codegen.c (get_register_spilling): Fix a warning.
1653
1654 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
1655
1656         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
1657         for types which the initialization fails. Raises the provided exception
1658         at the right stop after cleanup.
1659
1660 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
1661
1662         * aot-compiler.c: Free most of the memory allocated during compilation.
1663
1664         * mini.c (mini_parse_debug_options): Fix a leak.
1665         
1666         * mini.c (mini_method_compile): Don't add the method to the jit info tables
1667         during aot compilation.
1668
1669 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
1670
1671         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
1672         it has too much register pressure.
1673
1674 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
1675
1676         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
1677
1678 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
1679
1680         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
1681         on x86.
1682
1683         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
1684         on amd64 similar to the way it is done on arm.
1685
1686         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
1687
1688         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
1689         consistency, normalize error messages, avoid loading aot-only modules in
1690         normal mode.
1691
1692         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
1693         for consistency.
1694
1695         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
1696
1697 2008-07-11  Martin Baulig  <martin@ximian.com>
1698
1699         * debug-debugger.h
1700         (MonoDebuggerInfo): Add `interruption_request'.
1701
1702 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
1703
1704         * aot-compiler.c (emit_plt): Remove some dead code.
1705
1706         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
1707
1708         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
1709         return the plt info offset belonging to a given plt entry.
1710
1711         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
1712         mono_aot_get_plt_info_offset.
1713         
1714         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
1715         similar to the amd64 code by makeing jumps through a separate jump table 
1716         instead of embedding the jump addresses into the code.
1717
1718 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
1719
1720         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
1721         method.
1722
1723 2008-07-10  Martin Baulig  <martin@ximian.com>
1724
1725         * mini.c (mini_method_compile): Disable generics sharing when
1726         running in the debugger.
1727
1728 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
1729
1730         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
1731
1732         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
1733         the local register allocator from running out of registers on x86 when 
1734         using aot.
1735
1736 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
1737
1738         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
1739         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
1740         C4146.
1741
1742         Contributed under MIT/X11 license.
1743
1744 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
1745
1746         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
1747         speed up the assembler.
1748
1749 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
1750
1751         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
1752         support.
1753
1754         * mini.c: Move the soft float handling macros a bit earlier, add 
1755         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
1756         place.
1757
1758         * mini.h: Add prototype for mono_arch_fixup_jinfo.
1759
1760         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
1761         read-only to help catch code allocation requests.
1762         
1763         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
1764         and turn it off when using --aot-only or when compiling with --aot=full.
1765
1766         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
1767         jump table for switches from the normal domain mempool, not the code
1768         manager.
1769
1770         * mini-trampolines.c (get_unbox_trampoline): New function to return an
1771         unbox trampoline which handles aot-only mode too.
1772
1773         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
1774         an AOTed unbox trampoline.
1775
1776         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
1777
1778 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
1779
1780         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
1781         ""
1782
1783         Contributed under MIT/X11 license.
1784
1785 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
1786
1787         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
1788           the unwind information for the method at the end of the allocated block.
1789           
1790         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
1791           MonoCompileArch to hold the unwind info for SEH on Winx64
1792         
1793         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
1794           frame pointer info for the method being compiled.
1795           
1796         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
1797           the call to mono_exception_from_token.
1798           
1799         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
1800           storing the method prolog information in a format that the Winx64 SEH can understand.  This
1801           information is stored a the end of the method block because it is all 32-bit offset based.
1802
1803         Contributed under MIT/X11 license.
1804
1805 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
1806
1807         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
1808
1809         * wapihandles.c: Fix warnings.
1810
1811         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
1812         mode.
1813
1814         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
1815         mono_jit_compile_method in aot-only mode since that calls the type 
1816         initializer.
1817         
1818         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
1819         get_delegate_invoke_impl in aot-only mode.
1820
1821         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
1822
1823 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
1824
1825         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
1826
1827         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
1828         is on by default.
1829
1830         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
1831
1832         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
1833         init trampoline from the AOT file as well.
1834
1835         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
1836         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
1837         code.
1838
1839         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
1840         mono_init.
1841
1842         * exceptions-amd64.c: Add _full variants for the remaining exception code
1843         creation functions as well, allow emission of relocatable code, remove
1844         caching since that is now done by the caller.
1845
1846         * mini-exceptions.c: Add _full variants for the remaining exception code
1847         creation functions as well, add aot-only support.
1848
1849         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
1850         if we can determine a proper token for them.
1851         (add_wrappers): Add a few more wrappers.
1852         (emit_method_code): Remove some dead code.
1853         (emit_trampolines): Emit exception code too.
1854
1855         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
1856
1857         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
1858         mono_array_new_va which avoids varargs.
1859
1860         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
1861
1862         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
1863         mono_arch_create_specific_trampoline () in all places.
1864
1865         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
1866         a bit so it can be used for other things as well.
1867         
1868         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
1869         on demand as well.
1870
1871         * exceptions-amd64.c: Rename the caching from the exception code creation
1872         functions, it is done by the caller instead.
1873         
1874         * exceptions-amd64.c: Change the signature of the exception code creation 
1875         functions to allow the creation of relocatable code later.
1876
1877         * mini-exceptions.c: Add a set of functions to query the various 
1878         runtime-generated exception functions.
1879
1880         * mini.c mini-exceptions.c: Use the newly added functions instead of the
1881         mono_arch_.. () functions.
1882         
1883 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
1884
1885         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
1886
1887         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
1888
1889         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
1890         (mini_get_vtable_trampoline): Ditto.
1891
1892         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
1893         code in the AOT case by returning the code size and a list of relocations to
1894         the caller.
1895
1896         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
1897
1898 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
1899
1900         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
1901           clean the stack.
1902
1903         Contributed under MIT/X11 license.
1904
1905 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
1906
1907         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
1908         so the buffer size can be computed correctly. Fixes #404735.
1909
1910         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
1911         normally as cfg->debug_info is already freed.
1912
1913 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
1914
1915         * mini-amd64.c: For calls returning vtypes in registers, don't store
1916         the return address on the stack, instead allocate a separate local for
1917         it. Fixes #404729.
1918
1919 2008-07-05  Mark Probst  <mark.probst@gmail.com>
1920
1921         * mini-trampolines.c, mini.h: Add an argument to
1922         mono_create_jit_trampoline_in_domain() for turning off the adding
1923         of the sync wrapper.
1924
1925         * mini.c: Use the JIT trampoline without sync instead of
1926         ldftn_nosync in static RGCTX invoke wrappers so that the call can
1927         be patched.
1928
1929 2008-07-04  Mark Probst  <mark.probst@gmail.com>
1930
1931         * driver.c: Turn on GSHARED optimization by default.
1932
1933 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
1934
1935         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
1936         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
1937
1938         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
1939         create a variant of the generic trampoline code callable from AOTed trampolines.
1940
1941         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
1942         trampoline code callable from AOTed trampolines.
1943
1944         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
1945
1946 2008-07-04  Mark Probst  <mark.probst@gmail.com>
1947
1948         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
1949         pass-through manner.
1950
1951         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
1952         and don't fail sharing for them anymore.
1953
1954         * mini-exceptions.c: Handle exceptions in shared generic methods.
1955
1956         * generic-sharing.c: When checking the context of a generic
1957         method, also check its class's context.  Don't treat wrappers as
1958         sharable.
1959
1960         * mini-trampolines.c: Some code factored out to
1961         metadata/generic-sharing.c.  Handle the MRGCTX case.
1962
1963         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
1964         we must deal with the method being of another instantiation of the
1965         class.  Add static rgctx invoke wrappers to generic methods.
1966
1967 2008-07-04  Mark Probst  <mark.probst@gmail.com>
1968
1969         * mini.c: Provide all jit infos of generic shared methods with a
1970         generic jit info.
1971
1972         * mini-exceptions.c: Handle the new situation that a generic info
1973         might be available, but not info about the this/vtable/mrgctx
1974         variable.
1975
1976 2008-07-03  Mark Probst  <mark.probst@gmail.com>
1977
1978         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
1979         generic methods.
1980
1981 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
1982
1983         * dominators.c (check_dominance_frontier): Fix a warning.
1984
1985         * mini.h: Add some missing prototypes.
1986
1987         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
1988
1989         * driver.c (mono_jit_init_version): Correct the comments since the first
1990         argument should be the name of the root domain, not a filename.
1991
1992         * aot-runtime.c (make_writable): Error out if this is called while running
1993         with --aot-only.
1994         (load_aot_module): Ditto.
1995
1996         * aot-compiler.c: Really fix the computation of method indexes.
1997
1998         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
1999         optimizations as this is no longer called frequently.
2000
2001         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
2002         method and the invoke impl code and pass it to the delegate trampoline instead of
2003         just the delegate class.
2004
2005 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
2006
2007         * aot-compiler.c: Fixup the computation of method indexes.
2008         (add_wrappers): Create the base methods of the runtime invoke wrappers using
2009         the method builder infrastructure.
2010
2011         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
2012         has no header.
2013
2014         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
2015         mode, load the method right away instead of creating a trampoline.
2016
2017         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
2018
2019         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
2020         some checks a bit.
2021
2022 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
2023
2024         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
2025         (mono_aot_load_method): Use method_index instead of method->token.
2026
2027         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
2028         can handle icalls etc. properly.
2029
2030         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2031
2032         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
2033
2034         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
2035         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
2036         JIT_ICALL_ADDR patch type.
2037
2038         * patch-info.h: Add JIT_ICALL_ADDR patch type.
2039
2040         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
2041         request flag.
2042         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
2043
2044         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
2045
2046 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
2047
2048         * mini.c: Use domain->jit_code_hash_lock for controlling access to
2049         domain->jit_code_hash.
2050
2051 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
2052
2053         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
2054
2055 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
2056
2057         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
2058         get_this_arg_from_call, let it compute it when needed.
2059
2060         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
2061         gsctx from code only when needed.
2062
2063         * mini-trampolines.c (get_generic_context): Rename this to 
2064         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
2065         it can be called by the arch backends.
2066
2067         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
2068
2069 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
2070
2071         * driver.c (mono_main): Add experimental --aot-only command line option.
2072
2073         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
2074         set.
2075
2076 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
2077
2078         * driver.c (DllMain): Remove mono_module_handle.
2079
2080         Contributed under MIT/X11 license.
2081
2082 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
2083
2084         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
2085         for emitting methods which are not in the source assembly. Detect and report
2086         failure of assembling+linking.
2087         
2088         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
2089
2090         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
2091
2092 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
2093
2094         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
2095
2096 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
2097
2098         * mini.h: Remove some obsolete prototypes.
2099
2100         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
2101
2102 2008-06-24  Mark Probst  <mark.probst@gmail.com>
2103
2104         * mini.c (get_object_generic_inst): Variable-sized arrays are not
2105         supported by Visual Studio, so use alloca().
2106
2107 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
2108
2109         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
2110         Fixes #402585.
2111
2112 2008-06-23  Mark Probst  <mark.probst@gmail.com>
2113
2114         * mini.c: Fail sharing of a generic method if it contains an open
2115         catch clause (because we don't pass MRGCTXs yet).
2116
2117 2008-06-23  Mark Probst  <mark.probst@gmail.com>
2118
2119         * mini.c: When compiling a method with generic sharing, insert the
2120         method instantiated with an all-Object generic context into the
2121         jit info table, instead of the context of the first instantiation
2122         of the method we happen to compile.
2123
2124 2008-06-18  Martin Baulig  <martin@ximian.com>
2125
2126         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
2127         `major_version' and `minor_version'.
2128
2129 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2130
2131         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
2132         mono_method_is_generic_sharable_impl() takes an additional
2133         argument specifying whether to treat type variables as reference
2134         types.
2135
2136 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2137
2138         * mini.h: Removed obsolete prototypes.
2139
2140 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2141
2142         * mini.c: Don't fail generic sharing for initobj and sizeof - we
2143         already handle them.
2144
2145 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2146
2147         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
2148         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
2149         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
2150         tramp-x86.c: Added a MonoGenericContext* argument to
2151         mono_arch_get_unbox_trampoline() so that it can call other
2152         functions which require it.
2153
2154 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2155
2156         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
2157         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
2158         mono_arch_get_this_arg_from_call() takes a
2159         MonoGenericSharingContext* as well.
2160
2161 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2162
2163         * mini.c: Factor out code for emitting unbox into emit_unbox() and
2164         implement generic sharing of unbox.
2165
2166 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2167
2168         * mini.c: Don't compute the vtable to determine whether a field is
2169         special static, because it might not work for open types.
2170
2171 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2172
2173         * mini.c: Removed the unused token_type and token_source arguments
2174         from get_runtime_generic_context_ptr().
2175
2176 2008-06-17  Marek Habersack  <mhabersack@novell.com>
2177
2178         * mini.c (ADD_BINOP): fix the build
2179
2180 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
2181
2182         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
2183         a widening op.
2184
2185 2008-06-16  Mark Probst  <mark.probst@gmail.com>
2186
2187         * mini.h: Removed class relations enum that's not used anymore.
2188
2189 2008-06-16  Mark Probst  <mark.probst@gmail.com>
2190
2191         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
2192
2193         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
2194         the lazy fetch trampoline access code.
2195
2196 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
2197
2198         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
2199
2200 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
2201
2202         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
2203
2204         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
2205
2206         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
2207
2208 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
2209
2210         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
2211         intrinsics.
2212
2213         * mini-ops.h: Add MIN/MAX_UN opcodes.
2214
2215         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
2216         intrinsics.
2217
2218         * basic-math.cs: Add more min/max tests.
2219
2220         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
2221
2222 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2223
2224         * mini.c: Small fix in the prologue of emit_castclass.
2225
2226 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
2227
2228         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
2229
2230         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
2231         do not work even for unsigned types. Fixes #400014.
2232
2233         * basic-math.cs: Add regression tests for unsigned Min/Max.
2234
2235 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2236
2237         * mini.c: Added additional context_used argument to several
2238         functions, which will be needed for sharing generic methods.  Use
2239         GET_RGCTX macro wherever appropriate.  Declare only one
2240         context_used in mono_method_to_ir().
2241
2242 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2243
2244         * mini.c, generic-sharing.c: Removed generic class relations.
2245
2246         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
2247         functions due to MRGCTX changes.
2248
2249 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2250
2251         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
2252         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
2253         with calculated IMT.
2254
2255         * mini.c: Generic sharing of calls via generic interfaces.
2256
2257         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
2258         generic method with non-constant MonoGenericContext*.  Instead,
2259         the context is taken out of the method itself.
2260
2261 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2262
2263         * mini.c: Generic sharing of ldvirtftn.
2264
2265 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2266
2267         * mini.c: Generic sharing of ldftn.
2268
2269 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2270
2271         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
2272
2273 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2274
2275         * mini.c: Generic sharing of the special case of ldtoken followed
2276         by a call to GetTypeFromHandle.
2277
2278 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2279
2280         * mini.c: Generic sharing of box for nullable types.
2281
2282 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
2283
2284         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
2285         are passed on the stack. Fixes #324807.
2286
2287 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
2288
2289         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
2290         for the ArgValuetypeAddrInIReg case.
2291
2292         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
2293         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
2294
2295         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
2296         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
2297         local variable and pass the local variable by reference to the called method.
2298           
2299         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
2300         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
2301
2302         Contributed under MIT/X11 license.
2303
2304 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
2305
2306         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
2307
2308         * debug-mini.c (mono_debug_print_vars): Release memory after printing
2309         everything.
2310
2311 2008-06-10  Martin Baulig  <martin@ximian.com>
2312
2313         * debug-mini.c
2314         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
2315
2316 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
2317
2318         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
2319         possible error when no arguments are passed.
2320
2321         Contributed under MIT/X11 license.
2322
2323 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
2324
2325         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
2326         where the file name is NULL.
2327
2328 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
2329
2330         * mini.c: Fix s390 build.
2331
2332 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
2333
2334         * trace.c (mono_trace_parse_options): Fix warnings.
2335
2336         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
2337
2338 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
2339
2340         * mini.c (remove_block_if_useless): Avoid printing the method name.
2341         
2342         * mini.c: Remove needless setting of ins->cil_code which is now done by 
2343         MONO_INST_NEW.
2344
2345         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
2346         LMF. Not yet used.
2347
2348         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
2349         translated code after it has been patched.
2350
2351 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
2352
2353         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
2354         avoid problems during code patching on SMP systems.
2355         (emit_call): Avoid adding a patch info which is already added by 
2356         emit_call_body.
2357         (mono_arch_emit_exceptions): Ditto.
2358
2359 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
2360
2361         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
2362         MONO_TYPE_ISSTRUCT already checks for it.
2363
2364 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
2365
2366         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
2367           structs with floats on Winx64 the float registers are not used.  
2368           The integer registers are always used..
2369         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
2370           only one register will be used and only if the size of the struct 
2371           is 1,2,4, or 8 bytes.
2372
2373         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
2374           to work for Winx64.
2375
2376         Contributed under MIT/X11 license.
2377
2378 2008-06-05  Martin Baulig  <martin@ximian.com>
2379
2380         * debug-debugger.c (debugger_lookup_class): Also call
2381         mono_class_setup_methods() here; we're only called from RTI.
2382
2383 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
2384
2385         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
2386         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
2387         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
2388         Post-process object files and add dtrace-generated object, if necessary.
2389
2390         Contributed under MIT/X11 license.
2391
2392 2008-06-04  Mark Probst  <mark.probst@gmail.com>
2393
2394         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
2395         element class.
2396
2397         * mini.c: Generic sharing for unbox.any and castclass.
2398
2399 2008-06-04  Mark Probst  <mark.probst@gmail.com>
2400
2401         * mini.c: Ignore tailcall prefix in shared generic code and when
2402         doing calls which require a vtable/rgctx argument.
2403
2404 2008-06-04  Mark Probst  <mark.probst@gmail.com>
2405
2406         * mini.c: Don't free the JIT info.
2407
2408         * driver.c: Changes in the JIT info table testing code.
2409
2410 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
2411
2412         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
2413         interruption. Fix some warnings.
2414
2415         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
2416         interruption_checkpoint.
2417
2418 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
2419
2420         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
2421         from embedding applications.
2422
2423 2008-06-02  William Holmes  <billholmes54@gmail.com>
2424
2425         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
2426           reserving 32 bytes on the stack when making calls. 
2427
2428         Contributed under MIT/X11 license.
2429
2430 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
2431
2432         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
2433         the linear IL branch.
2434
2435         * driver.c: Print out more information for --version on arm.
2436
2437 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
2438
2439         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
2440         bb_exit instead, since out of line bblocks might not actually be emitted
2441         out-of-line.
2442         
2443         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
2444         maximum epilog size for out of line bblocks if tracing is enabled.
2445
2446         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
2447
2448 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
2449
2450         * arrays.cs: Regression tests for allocating arrays with negative sizes.
2451
2452 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
2453
2454         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
2455         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
2456         opcodes.
2457
2458 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
2459
2460         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
2461         the 'value' to store is a constant.
2462
2463         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
2464
2465         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
2466         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
2467
2468 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
2469
2470         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
2471         for accessing method->generic_container.
2472
2473 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
2474
2475         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
2476         
2477         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
2478
2479         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
2480
2481         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
2482         fails.
2483
2484 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
2485
2486         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
2487
2488         * mini.c: Handle the case when mono_class_vtable () fails.
2489
2490 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
2491         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
2492         the stat profiler.
2493
2494 2008-05-22  Mark Probst  <mark.probst@gmail.com>
2495
2496         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
2497         together with domain sharing.
2498
2499 2008-05-22  Mark Probst  <mark.probst@gmail.com>
2500
2501         * mini.c: Treat callvirts to final methods like non-virtual calls
2502         when doing generic sharing, i.e. look them up in the runtime
2503         generic context.
2504
2505 2008-05-22  Mark Probst  <mark.probst@gmail.com>
2506
2507         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
2508         with computed types (for generic sharing).
2509
2510         * mini.c: Generic sharing for mkrefany and refanyval.
2511
2512 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
2513
2514         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
2515         possible.
2516
2517         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
2518         the generic sharing code.
2519         
2520         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
2521         when needed.
2522
2523 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
2524
2525         * mini.h: Remove the declaration of mono_aot_init_vtable ().
2526
2527 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
2528
2529         * driver.c: updated copyright date
2530
2531 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
2532
2533         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
2534         needed.
2535
2536 2008-05-19  Martin Baulig  <martin@ximian.com>
2537
2538         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
2539         pointing to the new `_mono_debug_using_mono_debugger' variable.
2540
2541         * driver.c
2542         (mono_main): Check mono_debug_using_mono_debugger() rather than
2543         the `MONO_INSIDE_MDB' environment variable to check whether we're
2544         inside the debugger.
2545
2546 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
2547
2548         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
2549         argument.
2550
2551 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
2552
2553         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
2554
2555         * mini.c: Added mini_assembly_can_skip_verification. This
2556         function checks if the assembly requested to skip verification. 
2557         Fixes part of #387274.
2558
2559 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
2560
2561         * mini.c (mini_get_method): Disable the check for open generic classes when
2562         using generic sharing.
2563
2564         * generics.cs: Add a test #387034.
2565
2566         * mini.c (mini_get_method): Check whenever the method class is an open generic
2567         type, and return NULL in that case, causing a verification error. Fixes
2568         #384123.
2569
2570 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
2571
2572         * driver.c (mono_main): Revert r102623. The right
2573         thing to do is to enable the verifier under verifiable
2574         unless a --security flag was passed.
2575
2576         We need this non-trivial behavior for --verify-all otherwise
2577         mcs-compileall won't be able to use it. As it needs everything to
2578         be verified under validil.
2579
2580 2008-05-06  Martin Baulig  <martin@ximian.com>
2581
2582         Fix #383749.
2583
2584         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
2585         (mono_debugger_thread_cleanup): Likewise.
2586         (mono_debugger_extended_notification): Likewise.
2587
2588 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
2589
2590         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
2591         against both inflated and non-inflated methods. We need to check against the
2592         generic definition for cases where the instantiated method is not visible.
2593         We need to check against the inflated types for cases where the instantiation
2594         changes any super type. This fixes #382986.
2595
2596         Note that this doesn't need to be applied to other parts of mono_method_to_ir
2597         that check for visibiliy as generic params only appears as the type subject
2598         of tokens on call opcodes. Field manipulation and ldftn must always
2599         target an exact type.
2600
2601 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
2602
2603         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
2604         if no related --security flag is passed.
2605
2606 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
2607
2608         * mini-arch.h: Prepare support for ppc64.
2609
2610         Contributed under MIT/X11 license.
2611
2612 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
2613
2614         * aot-runtime.c: Prepare support for ppc64.
2615
2616         Contributed under MIT/X11 license.
2617
2618 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
2619
2620         * mini-ops.h: Prepare support for ppc64.
2621
2622         Contributed under MIT/X11 license.
2623
2624 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
2625
2626         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
2627
2628         Contributed under MIT/X11 license.
2629
2630 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
2631
2632         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
2633         assemblies, since aot_name is not a full path, causing us to load MS.NET 
2634         assemblies on windows.
2635
2636 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
2637
2638         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
2639         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
2640         * main.c: Use UTF-8 encoded command line instead of Windows default code
2641         page on Windows to support Unicode.
2642         * driver.c (DllMain): New function for mixed-mode assembly support.
2643         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
2644         export __stdcall functions without decoration.
2645
2646         Contributed under MIT/X11 license.
2647
2648 2008-04-28  Mark Probst  <mark.probst@gmail.com>
2649
2650         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
2651         saving it very early.
2652
2653 2008-04-28  Mark Probst  <mark.probst@gmail.com>
2654
2655         * mini.h, mini.c: Lots of code for accessing the old RGCTX
2656         deleted.  The only way to access the new RGCTX is via the
2657         trampline.
2658
2659         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
2660         vtable instead of the RGCTX to static methods.
2661
2662         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
2663         accessing the new RGCTX.
2664
2665         * generic-sharing.c: There is no separation between self, type
2666         arguments and other types in the RGCTX anymore.
2667
2668 2008-04-25  Jonathan Chambers <joncham@gmail.com>
2669
2670         * mini-amd64.c (add_general): Remove previous stack adjustment.
2671         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
2672         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
2673         for 32 bytes of stack space reserved for all calls.
2674         
2675         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
2676         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
2677         adjustment.
2678         
2679         Code contributed under MIT/X11 license.
2680
2681 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
2682
2683         * mini.c (mini_method_verify): Only verify non-inflated methods, check
2684         against the root definition, peeling out method and type instantiations.
2685         Cache verify success results, code that fails verification is still
2686         checked multiple times.
2687
2688 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
2689
2690         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
2691
2692 2008-04-23  Jonathan Chambers <joncham@gmail.com>
2693
2694         * mini-amd64.c (add_general): Always increment stack on Win64.
2695         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
2696         on Win64.
2697         
2698         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
2699         stack based argument handling on Win64.
2700         
2701         Code contributed under MIT/X11 license.
2702
2703 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
2704
2705         * Makefile.am (version.h): Add support for git-svn.
2706
2707 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
2708
2709         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
2710         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
2711         avoiding allocations and libc functions which might deadlock.
2712         
2713         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
2714         'no-gdb-backtrace' option is set.
2715
2716         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
2717
2718         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
2719
2720 2008-04-21  Martin Baulig  <martin@ximian.com>
2721
2722         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
2723         and `get_lmf_addr'; `notification_address' is no longer a pointer.
2724
2725 2008-04-21  Martin Baulig  <martin@ximian.com>
2726
2727         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
2728         `thread_vtable', `event_handler_ptr' and `event_handler'.
2729
2730 2008-04-21  Martin Baulig  <martin@ximian.com>
2731
2732         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
2733         allows delayed initialization of the `executable_code_buffer' when
2734         attaching.
2735
2736 2008-04-21  Martin Baulig  <martin@ximian.com>
2737
2738         * mini.h (mono_debugger_create_notification_function): Removed.
2739         * tramp-*.c (mono_debugger_create_notification_function): Removed.
2740
2741         * mdb-debug-info64.s
2742         (MONO_DEBUGGER__notification_function): Added this in the .text section.
2743
2744         * mdb-debug-info32.s
2745         (MONO_DEBUGGER__notification_function): Added this in the .text section.
2746
2747         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
2748         currently only works on x86 and x86_64, so don't create it on ppc.
2749
2750 2008-04-21  Martin Baulig  <martin@ximian.com>
2751
2752         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
2753
2754         * mini.c
2755         (mini_method_compile): In the fp elimination check, check
2756         `debug_options.mdb_optimizations' in addition to
2757         mono_debug_using_mono_debugger().       
2758
2759         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
2760         disable some JIT optimizations which are only disabled when
2761         running inside the debugger.
2762         Added `--help-debug' option to describe the debugging options.
2763         (parse_debug_options): New static function to parse the `--debug'
2764         options, so we can easily add more stuff in future.
2765
2766 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
2767
2768         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
2769         the method has no body.
2770
2771 2008-04-19  Jonathan Chambers <joncham@gmail.com>
2772
2773         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
2774         assembly is not allowed in MSVC 64-bit compiler. 
2775         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
2776         as we get floating point exceptions everywhere.
2777         
2778         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
2779         correctly align arguments for call to throw_exception.
2780         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
2781         
2782         Code contributed under MIT/X11 license.
2783
2784 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
2785
2786         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
2787
2788 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
2789
2790         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
2791
2792         * mini-amd64.c (NEW_INS): Set cil_code.
2793
2794         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
2795         from mini-amd64.c so all debugger related logic is in one place.
2796
2797         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
2798         later won't have a random ip assigned to them.
2799
2800 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
2801
2802         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
2803         the arch specific function initializes code_size.
2804         (mono_create_delegate_trampoline): Ditto.
2805
2806         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
2807         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
2808         platforms.
2809
2810         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
2811         running under the debugger.
2812
2813         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
2814         debugger.
2815
2816         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
2817         debugger. Also move the disabling of optimizations here from driver.c.
2818         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
2819         debugger.
2820
2821         * mini.h (MonoCompile): Add a few new flags.
2822
2823 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
2824
2825         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
2826         so the cil_code field of created MonoInst's is properly set.
2827         (mini_select_instructions): Ditto.
2828
2829         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
2830         (MONO_INST_NEW_CALL): Ditto.
2831
2832         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
2833         in many places so the ins->cil_code field is properly initialized.
2834
2835         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
2836         place.
2837
2838 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
2839
2840         * mini.c (mini_method_compile): Print a different message when compiling a 
2841         shared method.
2842         
2843         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
2844         > 1.
2845
2846 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
2847
2848         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
2849         SSE2 instructions.
2850
2851         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
2852         
2853 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
2854
2855         * mini.c (handle_stack_args): Make this return void since its return value was
2856         never used. Also set cfg->unverifiable for invalid IL instead of calling
2857         G_BREAKPOINT ().
2858
2859 2008-04-10  Mark Probst  <mark.probst@gmail.com>
2860
2861         * mini.c: Make sure "this" is live in catch clauses with type
2862         variables in shared generic code.
2863
2864 2008-04-08  Mark Probst  <mark.probst@gmail.com>
2865
2866         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
2867         generic_class_is_reference_type() to ensure the proper behaviour
2868         when sharing generic code and the type in question is a type
2869         argument.
2870
2871 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
2872
2873         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
2874         race conditions when printing thread dumps. Fixes #377738.
2875
2876 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
2877         
2878         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
2879         shows up when both MonoInst arguments can cause aliasig.
2880         There is likely no way in the current JIT to trigger this problem, but
2881         it showed up in the development of generics sharing, when in a new
2882         opcode both args of an OP_GROUP can be aliases (addresses of a local).
2883         When the generics sharing code will be committed, its tests will be
2884         valid also for this bug.
2885
2886 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
2887
2888         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
2889         PATCH_INFO_METHOD.
2890
2891         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
2892         NULL.
2893
2894 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
2895
2896         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
2897         use a more detailed exception message for InvalidCastException.
2898
2899         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
2900
2901         * driver.c (mono_main): Add --debug=casts option to turn on better 
2902         InvalidCastException message details.
2903
2904         * mini.c (mini_get_debug_options): New helper function to return the address of
2905         the debug_options variable.
2906
2907         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
2908         the jit_tls TLS variable.
2909
2910         * mini.c (mono_jit_tls): New TLS variable.
2911
2912         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
2913         option is used.
2914
2915 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
2916
2917         * mini.h: Removed verifer related stuff. This code was moved to verify.c
2918
2919         * mini.c: Removed verifer related stuff, code moved to verify.c.
2920
2921         * driver.c: Using code from verify.c instead of mini.c.
2922
2923 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
2924
2925         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
2926         longer valid.
2927
2928 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
2929
2930         * mini.c (check_for_method_verify): Enabling verification of
2931         corlib if mono_verify_all is set. Bugs in the verifier preventing that
2932         have been fixed.
2933
2934 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
2935
2936         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
2937         caller saved registers as well.
2938         
2939         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
2940         saved registers as well.
2941
2942 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
2943
2944         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
2945
2946         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
2947         code.
2948
2949 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
2950
2951         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
2952         to get_call_info.
2953         (get_call_info): Take a gsctx argument instead of 'cfg'.
2954
2955 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
2956
2957         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
2958         mono_verify_all is set.
2959
2960         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
2961
2962         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
2963
2964 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
2965
2966         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
2967         an exception.
2968
2969         * driver.c mini.c mini.h: Add a --verify-all development option to test the
2970         verifier and the code generated by the compiler.
2971
2972 2008-03-25  Mark Probst  <mark.probst@gmail.com>
2973
2974         * mini.c: Generic sharing of the non-nullable case of the box
2975         instruction.
2976
2977 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
2978
2979         * inssel.brg: Fix the build.
2980
2981         * iltests.il.in: Add a test for lconv.ovf.u8.un.
2982
2983 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
2984
2985         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
2986         Array:Address. Fixes #372410.
2987
2988         * iltests.il.in: New tests for readonly prefix.
2989
2990 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
2991
2992         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
2993         mini-trampolines.c.
2994
2995         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
2996         mini-exceptions.c.
2997
2998         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
2999         
3000         * mini.c (mono_decompose_op_imm): New helper function.
3001
3002         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
3003         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
3004         return value.
3005
3006         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
3007         mono_arch_output_basic_block. Fix warnings.
3008
3009         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
3010         for now.
3011
3012 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
3013
3014         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
3015         since the extra frame is now detected automatically inside the loop.
3016
3017         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
3018         opts which are now in mono_peephole_ins ().
3019         
3020         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
3021
3022         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
3023         frames and skip duplicate managed-to-native frames. Fixes #367665.
3024
3025         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
3026         opts which are now in mono_peephole_ins ().
3027         (mono_arch_peephole_pass_2): Ditto.
3028
3029         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
3030
3031         * mini-codegen.c (mono_peephole_ins): New helper function containing the
3032         arch independent peephole optimizations.
3033
3034         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
3035         opts which are now in mono_peephole_ins ().
3036
3037         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
3038         
3039         * mini-s390.c (mono_arch_output_basic_block): Fix build.
3040
3041         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
3042         pattern.
3043
3044         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
3045         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
3046         opcode. 
3047
3048 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
3049
3050         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
3051         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
3052         return value.
3053
3054         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
3055         mono_arch_output_basic_block. Fix warnings.
3056
3057 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
3058
3059         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
3060         conv.ovf.u.un.
3061
3062 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
3063
3064         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
3065         conv.ovf.u.un.
3066
3067         * iltests.il: Add new tests.
3068
3069 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
3070
3071         * mini.c: Removed Windows version macros.
3072
3073 2008-03-20  Mark Probst  <mark.probst@gmail.com>
3074
3075         * generic-sharing.c: Put reflection types in the extensible part
3076         of the runtime generic context.
3077
3078         * mini.c: Generic sharing of the GetTypeHandle special case of the
3079         ldtoken instruction.
3080
3081 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
3082
3083         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
3084
3085         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
3086         
3087         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
3088         consistency with the other version on the linear IR branch.
3089
3090         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
3091
3092         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
3093
3094         * iltests.il.in: Add new tests.
3095
3096 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
3097
3098         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
3099
3100         * iltests.il.in: Add new tests.
3101
3102 2008-03-19  Mark Probst  <mark.probst@gmail.com>
3103
3104         * mini.c: Two variables with the same name were declared in
3105         nesting contexts and one wasn't initialized.  Fixed.
3106
3107 2008-03-19  Mark Probst  <mark.probst@gmail.com>
3108
3109         * mini.c: Generic sharing of the initobj instruction.
3110
3111 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
3112
3113         * mini.c: make the test to optimize ldtoken from typeof() more
3114         precise.
3115
3116 2008-03-18  Mark Probst  <mark.probst@gmail.com>
3117
3118         * mini.c: Generic sharing of the initobj instruction for reference
3119         types.
3120
3121 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
3122
3123         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
3124         the mono_breakpoint_clean_code() code to perform bound checks.
3125
3126 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
3127
3128         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
3129         mono_arch_patch_callsite() to include the start of the managed method
3130         to be able to perform bound checks.
3131
3132 2008-03-17  Mark Probst  <mark.probst@gmail.com>
3133
3134         * mini.c: Generic sharing for the isinst instruction.
3135
3136 2008-03-17  Mark Probst  <mark.probst@gmail.com>
3137
3138         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
3139         inssel-long32-mips.brg: Added opcodes for doing indirect calls
3140         with the runtime generic context argument.
3141
3142         * mini.c: Share calls to several types of unsharable methods by
3143         putting the address of the method code in the runtime generic
3144         context and doing an indirect call.
3145
3146         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
3147         to switches.
3148
3149 2008-03-16  Mark Probst  <mark.probst@gmail.com>
3150
3151         * generic-sharing.c: Change due to a change in the runtime genric
3152         context API.
3153
3154 2008-03-15  Martin Baulig  <martin@ximian.com>
3155
3156         * tramp-x86.c
3157         (mono_arch_nullify_class_init_trampoline): Add call to
3158         mono_breakpoint_clean_code() to make things work when running
3159         inside the debugger.
3160
3161         * tramp-amd64.c
3162         (mono_arch_nullify_class_init_trampoline): Add call to
3163         mono_breakpoint_clean_code() to make things work when running
3164         inside the debugger.
3165
3166 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
3167
3168         * inssel-long.brg (reg): Fix 64 bit build.
3169
3170 2008-03-14  Mark Probst  <mark.probst@gmail.com>
3171
3172         * mini.c, mini.h: Share static generic code by passing it an
3173         implicit argument pointing to the runtime generic context.
3174
3175         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
3176         inssel-long32-mips.brg: New opcodes for calling shared static,
3177         which need to be passed the runtime generic context.
3178
3179         * mini-amd64.c, mini-x86.c: Save the runtime generic context
3180         argument on the stack in the prologue if needed.  New function for
3181         finding the runtime generic context argument from the registers
3182         saved by the trampoline.
3183
3184         * mini-amd64.h, mini-x86.h: Specify which register to use for the
3185         runtime generic context argument.
3186
3187         * tramp-amd64.c: Also restore the register used for the runtime
3188         generic context argument.
3189
3190         * mini-trampoline.c: Resolve shared static calls by consulting the
3191         runtime generic context via the new argument.
3192
3193         * generic-sharing.c: Add an argument to sharability-checking
3194         functions that specifies whether type variables should be treated
3195         as sharable type arguments.
3196
3197         * inssel-x86.brg: Removed a superfluous, buggy rule.
3198
3199         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
3200         to switches.
3201
3202 2008-03-14  Martin Baulig  <martin@ximian.com>
3203
3204         * debug-debugger.c (main_thread_handler): Call
3205         mono_runtime_run_main() without sending any notifications.
3206
3207         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
3208
3209 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
3210
3211         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
3212
3213 2008-03-14  Mark Probst  <mark.probst@gmail.com>
3214
3215         * tramp-x86.c: Fixed register restore offsets in the trampoline
3216         code for ECX and EDX.
3217
3218 2008-03-12  Geoff Norton  <gnorton@novell.com>
3219
3220         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
3221         different ucontext_t implementations.
3222         * exceptions-arm.c: Use the above defines to get exceptions working on 
3223         iPhone (based on a patch by Luke Howard lukeh@padl.com)
3224         * mini-arm.c: Implement iPhone icache support (based on a patch by
3225         Luke Howard lukeh@padl.com)
3226
3227 2008-03-12  Mark Probst  <mark.probst@gmail.com>
3228
3229         * mini.c: Enable generic sharing of calls to non-static
3230         non-interface non-generic non-value-type methods.
3231
3232         * mini-trampolines.c: Resolve calls from shared generic code.
3233
3234 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
3235
3236         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
3237
3238         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
3239
3240 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
3241
3242         * mini.c: some fixes for the AOT compiler.
3243
3244 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
3245
3246         * cpu-amd64.md: Add clob:1 to some float opcodes.
3247
3248 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
3249
3250         * mini.h: Added MiniVerifierMode enumeration.
3251
3252         * mini.c: Added mini_verifier_set_mode to control
3253         the usage of the new verifier.
3254
3255         * mini.c (mono_method): Integrated the new verifier.
3256
3257         * driver.c: Extended --security option with validil and
3258         verifiable options to activate the new verifier.
3259
3260 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
3261
3262         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
3263         optimization to ctors taking 0 or 2 arguments too.
3264
3265         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
3266         a bit.
3267
3268         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
3269
3270         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
3271
3272 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
3273
3274         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
3275         non-aot case as well.
3276
3277         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
3278
3279         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
3280         changes.
3281
3282         * aot-compiler.c (encode_patch): Ditto.
3283
3284         * mini.h (G_MININT32): Fix the definition of this.
3285
3286 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
3287
3288         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
3289
3290         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
3291
3292 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
3293
3294         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
3295         methods returning vtypes in registers.
3296         (mono_arch_allocate_vars): Ditto.
3297
3298         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
3299
3300         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
3301
3302         * generics.cs: Add a test from the linear IR branch.
3303
3304         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
3305
3306         * mini.c (inline_method): Cache failed inline attempts.
3307
3308 2008-03-04  Mark Probst  <mark.probst@gmail.com>
3309
3310         * mini.c: For shared methods of generic classes put the location
3311         of "this" into the MonoGenericJitInfo.
3312
3313         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
3314         register out of a MonoContext by register number.  Add the generic
3315         sharing context as an argument to mono_arch_find_this_argument().
3316
3317         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
3318         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
3319         for new arch function.
3320
3321         * mini-exception.c: Handle open exception clauses in shared
3322         generic code.
3323
3324         * mini-trampolines.c: Supply additional argument to
3325         mono_arch_find_this_argument().
3326
3327 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
3328
3329         * Makefile.am (regtests): Run the bench.exe tests last.
3330
3331 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
3332
3333         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
3334         a bit.
3335
3336 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
3337
3338         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
3339         with MS.
3340
3341         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
3342         
3343         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
3344
3345         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
3346         whose class has no cctor.
3347
3348         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
3349
3350 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
3351
3352         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
3353         unverified.
3354
3355 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
3356
3357         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
3358         to be in sync with the code on the linear IR branch.
3359
3360         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
3361
3362         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
3363
3364 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
3365
3366         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
3367
3368         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
3369
3370         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
3371
3372         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
3373
3374         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
3375         
3376         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
3377         body.
3378
3379 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
3380
3381         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
3382         OP_LOADR4_MEMBASE emission.
3383
3384         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
3385         (mono_spillvar_offset_float): Ditto.
3386
3387         * mini-mips.c (mono_arch_emit_prolog): Ditto.
3388
3389         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
3390         emission.
3391
3392         * basic-long.cs: Add regression tests for them.
3393
3394         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
3395         use.
3396         (mono_arch_allocate_vars): Fix representation of single-precision float
3397         argument.
3398         (mono_arch_output_basic_block): Ditto.
3399
3400         * inssel-mips.brg: Ditto, remove duplicate items.
3401
3402         * mini-mips.c (emit_load_volatile_arguments): New function to handle
3403         arguments of tail calls as on other platforms.
3404         (mono_arch_output_basic_block): Handle tail calls.
3405
3406         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
3407         register.
3408
3409         * objects.cs (test_5_pass_static_struct): Add test for it.
3410
3411         Contributed under MIT/X11 license.
3412
3413 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
3414
3415         * Makefile.am: Use gmcs for compiling the regression tests.
3416
3417         * *.2.cs *.2.il: Rename to *.cs and *.il.
3418
3419 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
3420
3421         * regalloc.h: Make the vassign array smaller.
3422
3423         * mini.c (mini_method_compile): Remove an unused field in cfg.
3424
3425         * mini-codegen.c: Add a bunch of micro optimizations.
3426
3427 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
3428
3429         * regalloc.h: Remove some unused fields.
3430
3431 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
3432
3433         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
3434
3435         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
3436
3437 2008-02-22  Mark Probst  <mark.probst@gmail.com>
3438
3439         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
3440
3441         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
3442         trampoline: Fetch an entry from the runtime generic context.  If
3443         it's NULL, jump to the actual trampoline to fill the runtime
3444         generic context.  Otherwise, return it.
3445
3446         * mini.c: Call the lazy fetch trampoline to get entries out of the
3447         runtime generic context.
3448
3449         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
3450         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
3451         tramp-sparc.c: Stubs for the lazy fetch trampoline.
3452
3453 2008-02-21  Mark Probst  <mark.probst@gmail.com>
3454
3455         * mini.c: Fetch data out of the extensible part of the runtime
3456         generic context instead of calling a helper function.
3457
3458         * generic-sharing.c: Some functions moved into
3459         metadata/generic-sharing.c.  Helper function for fetching other
3460         types now checks and asserts against extensible rgctx (just for
3461         debugging purposes - the helper function isn't called anymore
3462         unless for debugging).
3463
3464 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
3465
3466         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
3467         for tail calls up to the point that the tests in iltests.exe run. Also add a
3468         dummy CKFINITE implementation.
3469         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
3470         needed for trampoline LMF frames.
3471
3472         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
3473         trampoline LMF frames.
3474
3475 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
3476
3477         * mini.c (inline_method): clean any pending loader error when inlining fail.
3478         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
3479
3480 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
3481
3482         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
3483
3484         * aot-runtime.c (decode_patch_info): Ditto.
3485
3486         * mini.c (mono_resolve_patch_target): Ditto.
3487         
3488         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
3489         icall wrappers.
3490
3491         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
3492         
3493         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
3494         if it references an icall address.
3495
3496 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
3497
3498         * cpu-s390x.md: Remove some more unused opcodes.
3499         
3500         * cpu-s390x.md: Remove some unused opcodes.
3501
3502         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
3503         mono_op_imm_to_op ().
3504
3505         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
3506         instead of a switch statement.
3507         
3508         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
3509         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
3510
3511         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
3512         
3513         * mini-codegen.c: Remove unused mono_regstate2_... functions.
3514
3515         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
3516         -1.
3517
3518 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
3519
3520         * driver.c (mono_main): Improve error reporting when an assembly cannot be
3521         opened. Fixes #362607.
3522
3523         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
3524
3525         * iltests.il.in: Add a test for static methods in interfaces.
3526
3527 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
3528
3529         * genmdesc.c (build_table): Fix a crash on older glib versions.
3530
3531         * cpu-sparc.md: Remove some unused opcodes.
3532         
3533         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
3534         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
3535
3536         * cpu-amd64.md: Remove some unused opcodes.
3537
3538         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
3539         like the other opcodes.
3540
3541 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
3542
3543         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
3544
3545         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
3546
3547         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
3548         variables 'cfg' instead of 'm' for consistency.
3549
3550         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
3551
3552         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
3553         argument holding the vtype return address, to avoid the ambigious use of
3554         cfg->ret for this purpose.
3555
3556         * mini.c (NEW_RETLOADA): Use vret_addr if set.
3557
3558         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
3559         
3560         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
3561         new mono_print_ins () function which only takes one argument.
3562
3563 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
3564
3565         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
3566         macro arguments.
3567
3568 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
3569
3570         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
3571
3572         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
3573
3574         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
3575         opcodes and other small changes.
3576
3577         * mini-ops.h: Add some new opcodes from the linear IR branch.
3578
3579         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
3580
3581         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
3582         opcodes, use the REG_MEMBASE opcodes instead.
3583         
3584         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
3585         opcodes, use the REG_MEMBASE opcodes instead.
3586         
3587         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
3588         linear IR branch.
3589
3590         * mini.c (mono_op_imm_to_op): New helper function.
3591
3592         * mini-ops.h: Add some opcodes from linear IR branch.
3593
3594 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
3595
3596         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
3597         <tsv@solvo.ru>.
3598
3599 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
3600
3601         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
3602         OP_ICONV_TO_R4/R8.
3603
3604         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
3605
3606 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
3607
3608         * aot-compiler.c (emit_method_code): Add an assert.
3609
3610         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
3611         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
3612         methods.
3613
3614 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
3615
3616         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
3617         some load/store opcodes so they are consistent. 
3618         (mono_arch_emit_prolog): Simplify some code.
3619
3620         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
3621
3622         * objects.cs: Add tests for large argument offsets on ARM.
3623
3624         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
3625         stack offsets. Fixes #359651.
3626
3627         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
3628
3629         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
3630
3631         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
3632
3633         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
3634
3635         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
3636
3637         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
3638         rid of CEE_CONV_R_UN.
3639
3640         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
3641
3642 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
3643
3644         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
3645
3646         * mini.c (mono_normalize_opcodes): Add some more opcodes.
3647
3648         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
3649
3650         * cpu-amd64.md: Remove some unused opcodes.
3651
3652         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
3653
3654         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
3655
3656         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
3657         arch specific functions for its parts. Call the peephole pass after local
3658         regalloc so the prolog can compute a more accurate max_offset.
3659         
3660         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
3661         the corresponding OP_I/OP_L opcodes.
3662
3663         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
3664
3665         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
3666
3667 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
3668
3669         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
3670         as they are handled in mini.c.
3671
3672         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
3673         
3674         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
3675         case since it is handled in mini.c.
3676
3677         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
3678
3679         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
3680
3681         * *.c: Use the new opcodes in the IR and back end code.
3682
3683         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
3684
3685         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
3686
3687 2008-02-06  Mark Probst  <mark.probst@gmail.com>
3688
3689         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
3690         an assert because it has a race condition.
3691
3692 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
3693
3694         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
3695
3696         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
3697
3698         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
3699
3700         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
3701         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
3702
3703 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
3704
3705         * cpu-amd64.md (move): Correct the maximum size of move.
3706
3707 2008-02-05  Mark Probst  <mark.probst@gmail.com>
3708
3709         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
3710         the generic class init trampoline to return quickly if the class
3711         is already inited.
3712
3713 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
3714
3715         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
3716         issues where an 32 bit callsite cannot be patched by a 64 bit address.
3717
3718 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
3719
3720         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
3721         branch.
3722
3723 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
3724
3725         * objects.cs: Add some soft-float tests.
3726
3727         * mini.c: Fix a couple more soft-float issues.
3728
3729         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
3730
3731         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
3732         avoid a REX prefix.
3733
3734 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
3735
3736         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
3737         exception happens while compiling a virtual method.
3738
3739 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
3740
3741         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
3742         
3743         * mini-sparc.c: Fix build.
3744
3745         * mini-sparc.c (get_call_info): Add support for generic sharing.
3746
3747         * mini-exceptions.c: Add a FIXME.
3748
3749 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
3750
3751         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
3752         altstack handling code.
3753
3754         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
3755         
3756         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
3757
3758         * mini-s390.c: Add support for generic sharing.
3759
3760         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
3761         Fix CAS on s390.
3762         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
3763
3764         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
3765
3766         * mini-s390x.c: Add support for generic sharing.
3767         
3768         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
3769         Fix CAS on ia64.
3770         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
3771
3772         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
3773         can be used since it takes a 16 bit signed immediate.
3774
3775         * inssel-s390x.brg: Fix OP_SETRET.
3776
3777         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
3778
3779         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
3780
3781         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
3782
3783         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
3784
3785         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
3786         in one place.
3787
3788         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
3789         stuff.
3790
3791         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
3792         of the unused mono_arch_patch_delegate_trampoline stuff.
3793
3794 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
3795
3796         * basic-long.cs: Move the fp related tests to basic-float.cs.
3797
3798         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
3799
3800         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
3801
3802         * basic-calls.cs: Add a test for proper float argument passing.
3803
3804         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
3805         if the context corresponds to an exception received through a signal.
3806
3807         * exceptions.cs: Add a test for nullref handling at the start of a try
3808         clause.
3809
3810         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
3811
3812         * jit-icalls.c (mono_break): New JIT icall.
3813
3814         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
3815
3816         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
3817
3818 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
3819
3820         * cpu-*.md: Get rid of unused opcodes.
3821
3822         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
3823
3824         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
3825         by all platforms.
3826
3827         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
3828         define.
3829
3830         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
3831         the arch independent trampoline code in mini-trampolines.c.
3832
3833         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
3834
3835         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
3836
3837         * mini-s390.h: Remove an unused define.
3838         
3839         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
3840         the arch independent trampoline code in mini-trampolines.c.
3841
3842         * mini-arm.c (mono_arch_emit_prolog): Fix build.
3843
3844 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
3845
3846         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
3847
3848         * mini-s390.c (mono_arch_emit_prolog): Fix build.
3849
3850         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
3851
3852         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
3853
3854         * cpu-amd64.md: Use smaller sizes for int opcodes.
3855
3856         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
3857
3858         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
3859         objects.cs.
3860
3861         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
3862         debugging.
3863
3864         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
3865         instead of though a pointer to save an indirection when accessing elements of
3866         the array.
3867
3868         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
3869         some typos.
3870         (NOT_IMPLEMENTED): New helper macro.
3871         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
3872         of a bb.
3873
3874         * *.c: Use the new helper macro.
3875
3876 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
3877
3878         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
3879
3880 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
3881
3882         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
3883         stack slots.
3884
3885 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
3886
3887         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
3888         profiling is enabled.
3889         
3890         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
3891         the end.
3892         (mono_arch_emit_prolog): Add more first bblock optimizations.
3893
3894         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
3895         in order if possible.
3896         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
3897         bblock, since the arguments are still in their original registers.
3898
3899         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
3900
3901 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
3902
3903         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
3904         as well.
3905
3906         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
3907         offset 0.
3908
3909         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
3910
3911         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
3912         process async exceptions received while in unmanaged code.
3913
3914         * mini.c (mini_init): Install a callback with the runtime which will be called
3915         when a thread receives an async exception while in unmanaged code.
3916
3917         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
3918
3919         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
3920
3921 2008-01-16  Wade Berrier  <wberrier@novell.com>
3922
3923         * cpu-g4.md:
3924         * cpu-arm.md:
3925         * cpu-s390x.md:
3926         fix build
3927
3928 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
3929
3930         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
3931         compilation with sun cc.
3932
3933         * cpu-*.md: Fix the build.
3934
3935         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
3936
3937         * mini-amd64.h: Add some comments to the MonoLMF structure.
3938
3939         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
3940         
3941         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
3942         in the LMF structure if possible. This saves two instructions in the
3943         managed->native wrappers.
3944
3945         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
3946
3947 2008-01-16  Mark Probst  <mark.probst@gmail.com>
3948
3949         * generic-sharing.c: New type argument lookup code which uses the
3950         runtime generic context template.
3951
3952 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
3953
3954         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
3955
3956         * mini-arm.c (add_general): Fix arm eabi parameter passing.
3957         (mono_arch_output_basic_block): Fix localloc implementation.
3958
3959         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
3960
3961         * mini-ia64.c (peephole_pass): Fix ia64 build.
3962
3963         * mini-amd64.c (peephole_pass): Fix a warning.
3964         
3965         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
3966         at a constant offset from sp/fp.
3967
3968         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
3969         instead of obtaining it from *lmf in the managed method case.
3970
3971 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
3972
3973         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
3974
3975 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
3976
3977         * mini.h (MonoInstList): New type.
3978         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
3979         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
3980         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
3981         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
3982         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
3983         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
3984         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
3985         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
3986         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
3987         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
3988         MONO_INST_LIST_FOR_EACH_ENTRY,
3989         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
3990         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
3991         mono_inst_list_first, mono_inst_list_last,
3992         mono_inst_list_next, mono_inst_list_prev): New instruction
3993         list handling interfaces.
3994         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
3995         list head 'ins_list'.
3996         (MonoInst): Replace next pointer with list head 'node'.
3997         (MonoCallInst): Make 'out_args' a MonoInstList.
3998         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
3999         (MonoCompile): Delete reverse_inst_list and
4000         reverse_inst_list_len.
4001         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
4002         mono_arch_lowering_pass, mono_arch_local_regalloc,
4003         mono_arch_output_basic_block, mono_arch_emit_prolog):
4004         Convert to new instruction lists.
4005         (insert_after_ins): Delete.
4006         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
4007         instruction lists.
4008         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
4009         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
4010         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
4011         mono_emulate_opcode, mono_emit_load_got_addr,
4012         inline_method, mono_method_to_ir, mono_print_bb_code,
4013         print_dfn, decompose_pass, nullify_basic_block,
4014         replace_out_block_in_code, remove_block_if_useless,
4015         merge_basic_blocks, move_basic_block_to_end,
4016         try_unsigned_compare, optimize_branches, mono_print_code,
4017         mini_select_instructions, remove_critical_edges): Likewise.
4018         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
4019         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
4020         mono_arch_output_basic_block, mono_arch_emit_prolog):
4021         Likewise.
4022         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
4023         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4024         mono_arch_output_basic_block): Likewise.
4025         (inst_list_prepend, insert_after_ins): Delete.
4026         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
4027         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
4028         instruction lists.
4029         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
4030         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
4031         mono_arch_emit_prolog): Likewise.
4032         * cfold.c (mono_constant_fold): Likewise.
4033         * liveness.c (visit_bb, mono_analyze_liveness,
4034         optimize_initlocals): Likewise.
4035         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
4036         * graph.c (mono_draw_code_cfg): Likewise.
4037         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
4038         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
4039         mono_ssa_cprop): Likewise.
4040         * abcremoval (get_relations_from_previous_bb, process_block):
4041         Likewise.
4042         * local-propagation (mono_cprop_invalidate_values,
4043         mono_local_cprop_bb): Likewise.
4044         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
4045         peephole_pass, mono_arch_output_basic_block,
4046         mono_arch_emit_prolog): Likewise.
4047         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
4048         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4049         mono_arch_emit_prolog): Likewise.
4050         (insert_after_ins): Delete.
4051         * aliasing.c (print_code_with_aliasing_information,
4052         mono_build_aliasing_information, mono_aliasing_deadce):
4053         Convert to new instruction lists.
4054         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
4055         peephole_pass, NEW_INS, mono_arch_lowering_pass,
4056         mono_arch_local_regalloc, mono_arch_output_basic_block):
4057         Likewise.
4058         (insert_after_ins): Delete.
4059         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
4060         peephole_pass, mono_arch_output_basic_block): Convert to
4061         new instruction lists.
4062         * mini-codegen (InstList, inst_list_prepend,
4063         insert_after_ins): Delete.
4064         (insert_before_ins, get_register_force_spilling,
4065         get_register_spilling, free_up_ireg, free_up_reg,
4066         create_copy_ins, create_spilled_store, alloc_int_reg,
4067         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
4068         to new instruction lists.
4069         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
4070         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4071         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
4072         (insert_after_ins): Delete.
4073         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
4074         mono_arch_local_regalloc, mono_arch_output_basic_block,
4075         mono_arch_call_opcode): Convert to new instruction lists.
4076         (insert_after_ins): Delete.
4077         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
4078         peephole_pass, mono_arch_output_basic_block,
4079         mono_arch_emit_prolog): Convert to new instruction lists.
4080
4081 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
4082
4083         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
4084
4085         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
4086         Fixes #353182.
4087
4088         * Makefile.am (version.h): Make this work with non-bash shells.
4089
4090 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
4091
4092         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
4093
4094 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
4095
4096         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
4097         the InitializeArray optimization.
4098
4099 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
4100
4101         * mini.c driver.c: Don't include os/gc_wrapper.h.
4102
4103 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
4104
4105         * mini.c (print_jit_stats): Print GC statistics if available.
4106
4107 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
4108
4109         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
4110
4111 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
4112
4113         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
4114
4115 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
4116
4117         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
4118         
4119         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
4120
4121         * driver.c (mono_main): Ditto.
4122
4123 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
4124
4125         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
4126
4127         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
4128         in the vtable can't be encoded.
4129         (compile_method): Ditto.
4130
4131 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
4132
4133         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
4134         defined.
4135
4136         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
4137         lmf->rbp.
4138
4139         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
4140         the top LMF entry belongs to the current method.
4141
4142         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
4143
4144 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
4145
4146         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
4147         
4148         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
4149
4150         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
4151
4152         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
4153
4154         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
4155
4156         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
4157         implementation.
4158
4159         * basic-float.cs: Add an ulong->double cast test.
4160
4161 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
4162
4163         * mini.c (mono_method_to_ir): Fix a warning.
4164
4165 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
4166
4167         * mini-ops.h: Add OP_SWITCH.
4168
4169         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
4170         CEE_SWITCH in back-end code, use OP_SWITCH instead.
4171
4172 2007-12-11  Geoff Norton  <gnorton@novell.com>
4173
4174         * mini-s390x.c: Minor change to the MAX() define to allow
4175         it to compile with other gcc versions.
4176
4177 2007-12-11  Geoff Norton  <gnorton@novell.com>
4178
4179         * cpu-s390x.md:
4180         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
4181
4182 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
4183
4184         exceptions-arm.c (mono_arch_get_restore_context): Restore
4185         the frame pointer.
4186
4187         exceptions-arm.c (throw_exception): Save the frame pointer.
4188         This is a partial fix for #323747. Only the client side is
4189         fixed.
4190
4191 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
4192
4193         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
4194         was using an unrelated variable to log the class which
4195         needed the cctor to be called. This was crashing on arm.
4196
4197 2007-12-09  Robert Jordan  <robertj@gmx.net>
4198
4199         * mini-x86.c (mono_arch_emit_epilog):
4200         Consider all kinds of 64-bit types. Fixes #323114.
4201
4202 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
4203
4204         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
4205
4206 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
4207
4208         * mini-amd64.c (peephole_pass): Add a missing instruction check.
4209
4210 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
4211
4212         * mini.c: run type ctor before allocating an object, not only
4213         when running it's constructor method (fixes at least part of bug #342507).
4214
4215 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
4216         
4217         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
4218         
4219         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
4220         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
4221         function.
4222
4223         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
4224         mono_generic_class_init_trampoline () the same as it is done with the other
4225         trampolines.
4226
4227         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
4228         aot-runtime.c aot-compiler.c: Implement AOT support.    
4229
4230 2007-12-07  Mark Probst  <mark.probst@gmail.com>
4231
4232         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
4233         build for archs which don't have the vtable trampoline defined
4234         yet.
4235
4236 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
4237
4238         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
4239
4240         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
4241
4242         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
4243
4244         * tramp-<ARCH>.c: Use the new helper function.
4245
4246 2007-12-07  Mark Probst  <mark.probst@gmail.com>
4247
4248         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
4249         trampoline call, which takes a vtable argument.
4250
4251         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
4252         OP_TRAMPCALL_VTABLEs like other calls.
4253
4254         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
4255         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
4256         call.  Implemented a support function which fetches the vtable
4257         from a register set.
4258
4259         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
4260         Implemented a generic class init trampoline, using the
4261         OP_TRAMPCALL_VTABLE opcode.
4262
4263         * mini.c: Implemented static field access when sharing generic
4264         code.  This implies initing the class using the new
4265         OP_TRAMPCALL_VTABLE call.
4266
4267 2007-12-07  Mark Probst  <mark.probst@gmail.com>
4268
4269         * mini.c: Don't compile methods with sharing enabled if their
4270         classes are disabled for sharing.
4271
4272 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
4273
4274         * inssel.brg: Add a missing sign extension to the GETCHR and array access
4275         opcodes. Fixes #346563.
4276
4277         * objects.cs: Add a new test.
4278
4279         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
4280
4281         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
4282         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
4283
4284 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
4285
4286         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
4287
4288 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
4289
4290         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
4291         code stream.
4292
4293 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
4294
4295         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
4296
4297         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
4298         optimization in the AOT case.
4299         
4300 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
4301
4302         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
4303         
4304         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
4305
4306         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
4307
4308         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
4309
4310         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
4311         is created by the inlined delegate ctor.
4312
4313         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
4314
4315         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
4316
4317 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
4318
4319         * cpu-x86.md: Fix the length of ckfinite.
4320
4321 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
4322
4323         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
4324         
4325         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
4326         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
4327
4328         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
4329
4330         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
4331         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
4332
4333 2007-11-28  Martin Baulig  <martin@ximian.com>
4334
4335         * mini-x86.c
4336         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
4337         after creating the trampoline.
4338
4339 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
4340
4341         * aot-runtime.c (load_aot_module): Check runtime version if needed.
4342
4343         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
4344         the same version.
4345
4346         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
4347         instead of the calling method to help AOT.
4348
4349         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
4350
4351 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
4352
4353         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
4354         is defined.
4355
4356 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
4357
4358         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
4359         
4360         * aot-compiler.c (compile_method): Correct check for generic method definitions.
4361         (encode_method_ref): No need to handle generic method definitions specially.
4362
4363         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
4364
4365         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
4366         decode_klass_info.
4367
4368         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
4369         encode_klass_info.
4370         (compile_method): Enable generic sharing.
4371
4372 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
4373
4374         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
4375         (mini_method_compile): Add preliminary support for AOTing shared generic code.
4376
4377         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
4378         generic code.
4379
4380         * mini-trampolines.c: Fix a warning.
4381
4382         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
4383         NEW_PCONST.
4384         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
4385         (generic_class_is_reference_type): Remove unused function.
4386
4387         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
4388         in the generic vtable trampoline case.
4389
4390         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
4391         
4392         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
4393         return an AOT method based on a vtable slot.
4394
4395         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
4396
4397         * mini.c (mini_get_vtable_trampoline): Export this.
4398
4399 2007-11-22  Martin Baulig  <martin@ximian.com>
4400
4401         * debug-debugger.h
4402         (MonoDebuggerInfo): Move `debugger_version' up.
4403
4404 2007-11-22  Martin Baulig  <martin@ximian.com>
4405
4406         * mini-amd64.c
4407         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
4408
4409         * mini-trampolines.c
4410         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
4411         after compiling the method.
4412
4413 2007-11-20  Martin Baulig  <martin@ximian.com>
4414
4415         * debug-mini.c
4416         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
4417         (mono_debugger_remove_breakpoint): Likewise.
4418         (mono_debugger_check_breakpoints): Likewise.
4419
4420         * debug-debugger.c: Implement the new breakpoint interface here.
4421
4422 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
4423
4424         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
4425         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
4426
4427         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
4428
4429 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
4430
4431         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
4432
4433         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
4434         mini.c.
4435
4436         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
4437         mini.c.
4438
4439         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
4440         returning a vtype in a register.
4441
4442         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
4443         here from the arch specific code.
4444
4445         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
4446         mini.c.
4447
4448         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
4449         (mono_arch_emit_prolog): Increment maximum prolog size.
4450
4451         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
4452         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
4453
4454         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
4455         MonoGenericSharingContext.
4456
4457         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
4458         MonoGenericSharingContext. Allocate memory from the cfg mempool.
4459
4460 2007-11-15  Mark Probst  <mark.probst@gmail.com>
4461
4462         * mini.c, mini.h, generic-sharing.c: Functions for producing code
4463         which extract fields out of the runtime generic context.  Full
4464         sharing of the NEWARR opcode.
4465
4466 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
4467
4468         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
4469         --enable-minimal=ssa.
4470
4471 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
4472
4473         * mini-trampolines.c (mono_delegate_trampoline): Update after 
4474         mono_marshal_get_delegate_invoke () signature change.
4475
4476 2007-11-13  Mark Probst  <mark.probst@gmail.com>
4477
4478         * mini.c: Removed the shared context in favor of the generic
4479         sharing context.  Allocate the MonoJitInfo structure with room for
4480         the generic sharing context if it's needed.
4481
4482         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
4483         domain-internals.h now.
4484
4485         * mini-x86.c: Pass the generic sharing context to get_call_info ().
4486
4487         * generic-sharing.c: Several changes for working without a shared
4488         context and instead operating on open types instead.
4489
4490 2007-11-12  David S. Miller  <davem@davemloft.net>
4491
4492        * inssel-sparc.brg: Fix double instruction emit.
4493
4494 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
4495
4496         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
4497         Get/Set/Address methods.
4498         
4499         * mini.c debug-debugger.c mini-trampolines.c: Update after 
4500         mono_marshal_get_delegate_invoke signature change.
4501
4502 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
4503
4504         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
4505         This can happens with dynamic methods. Fixes the other bug in #322722.
4506
4507 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
4508
4509         * tramp-arm.c (mono_arch_patch_callsite): Support patching
4510         BX call sequence.
4511
4512         * mini-arm.c (arm_patch): Implement patching of BX call
4513         sequence. Fixes one of the bugs in #322722.
4514
4515 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
4516
4517        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
4518        under Linux.  We only need to flush every 32-byte cache line.    
4519
4520 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
4521
4522         * mini.c:
4523         move_basic_block_to_end: Add branches when needed, eventually creating
4524         a new BB.
4525         optimize_branches: added a parameter that tells if it's ok to create
4526         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
4527         and avoid calling move_basic_block_to_end when it's not ok.
4528         Fixes bug 318677.
4529
4530 2007-11-07  Mark Probst  <mark.probst@gmail.com>
4531
4532         * mini.c: Abort inlining call to InitializeArray if something
4533         looks wrong.  Let the icall handle it, which now has proper safety
4534         checks.
4535
4536 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
4537
4538         * mini.c (mono_spill_call): add support for soft-float.
4539
4540         * mini.c (mono_method_to_ir): add support for soft-float
4541         to inlined functions that return float.
4542
4543         * mini.c (mono_method_to_ir): add support for soft-float
4544         to cee_stsfld opcode on float fields.
4545
4546 2007-11-05  Geoff Norton  <gnorton@novell.com>
4547
4548         * mini-x86.h: Fix the structure access for X86 Leopard.
4549
4550
4551 2007-11-05  Martin Baulig  <martin@ximian.com>
4552
4553         * mini-trampolines.c
4554         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
4555         after compiling the method to notify the debugger.
4556
4557 2007-11-05  Martin Baulig  <martin@ximian.com>
4558
4559         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
4560
4561 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
4562
4563         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
4564         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
4565
4566 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
4567
4568         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
4569         native-to-managed wrappers.
4570         
4571 2007-11-01  Geoff Norton  <gnorton@novell.com>
4572
4573         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
4574         members.
4575
4576 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
4577
4578         * mini.c, mini-x86.c: when getting back from unmanaged code
4579         to managed via a marshaled delegate we also need to set the
4580         right domain.
4581
4582 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
4583
4584         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
4585         for amd64.
4586
4587 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
4588
4589         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
4590         let the debugger or other external agents to tell the JIT when
4591         a sw breakpoint has been inserted in the code that the JIT needs
4592         to be able to inspect.
4593
4594 2007-10-31  Martin Baulig  <martin@ximian.com>
4595
4596         * debug-debugger.h
4597         (MonoDebuggerInfo): Remove `runtime_class_init'.
4598
4599 2007-10-30  Martin Baulig  <martin@ximian.com>
4600
4601         * debug-mini.h
4602         (mono_debugger_thread_created): Added `MonoThread *' argument.
4603         (mono_debugger_extended_notification): New public method.
4604         (mono_debugger_trampoline_compiled): New public method.
4605
4606         * debug-mini.c
4607         (MonoDebuggerThreadInfo): Added `thread' and
4608         `extended_notifications' fields.
4609
4610         * debug-debugger.c
4611         (debugger_executable_code_buffer): New static variable.
4612
4613         * debug-debugger.h
4614         (MonoDebuggerInfo): Added `executable_code_buffer',
4615         `executable_code_buffer_size', `breakpoint_info_area',
4616         `breakpoint_table' and `breakpoint_table_size'.
4617
4618 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
4619
4620         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
4621         that IP  either is an unused value or the vtable pointer. IMT 
4622         calls use vtable + offset now. Reduced by almost half the size
4623         of IMT entries.
4624
4625 2007-10-26  Jonathan Chambers <joncham@gmail.com>
4626
4627         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
4628         defines to access param registers. Replace long usage with
4629         gsize as sizeof(long) != sizeof(void*) on Win64.
4630
4631         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
4632         on Win64. Fix intrinsic, use _AddressOfReturnAddress
4633         instead of non-existant _GetAddressOfReturnAddress.
4634
4635         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
4636         param registers. Save/restore %rdi and %rsi in MonoLMF.
4637
4638         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
4639         param registers. Modify (throw_exception) signature to take 
4640         %rdi and %rsi on Win64. 
4641
4642         Code is contributed under MIT/X11 license.
4643
4644 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
4645
4646         * helpers.c: unlink debugging output files.
4647
4648 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
4649
4650         * mini.c: Move mono_create_ftnptr () to object.c.
4651
4652 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
4653
4654         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
4655         optional. This function can now be used to disassemble code generated
4656         outside the JIT such as trampolines and IMT thunks.
4657
4658         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
4659
4660         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
4661         vtable pointer from a ldr instruction.
4662
4663         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
4664         new IMT call sequence.
4665
4666         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
4667         call sequence for interface invocations.
4668
4669         * mini-arm.c (mono_arch_emit_imt_argument): added, required
4670         for imt support. This function is empty since IMT on ARM requires no
4671         special handling on the IR side.
4672
4673         * mini-arm.c (mono_arch_find_imt_method): added, required for
4674         imt support.
4675
4676         * mini-arm.c (mono_arch_find_this_argument): added, required
4677         for imt support.
4678
4679         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
4680         a ldr instruction to load a value stored in the code stream.
4681
4682         * mini-arm.c (mono_arch_build_imt_thunk):added, required
4683         for imt support.
4684
4685
4686 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
4687
4688         * mini.c (mini_init): Install the jump trampoline callback.
4689
4690 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4691
4692         * mini-trampolines.c: handle synchronized methods with the common
4693         vtable trampoline (bug #335601).
4694
4695 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
4696
4697         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
4698
4699         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
4700         64 bit platforms.
4701
4702         * mini-ia64.h mini-ia64.c: Add support for IMT.
4703
4704         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
4705         prolog. Fixes #331958.
4706
4707 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
4708
4709         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
4710
4711 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4712
4713         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
4714         trampoline.
4715
4716 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4717
4718         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
4719         trampoline.
4720
4721 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
4722
4723         * mini-x86.c, mini-x86.h: x86 support for the common vtable
4724         trampoline.
4725
4726 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
4727
4728         * mini-trampolines.c: changed the magic rampoline to understand
4729         the common vtable trampoline method: the method to invoke is
4730         determined by the vtable displacement of the call.
4731
4732 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
4733
4734         * mini.c, mini.h: register the common vtable trampoline if the
4735         architecture supports it.
4736
4737 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4738
4739         * cpu-amd64.md: use the correct max length for tls_get.
4740
4741 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
4742
4743         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
4744         CEE_STELEM_ANY. Fixes #333696.
4745
4746 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
4747
4748         * exceptions-x86.c: provide more graceful handling of the case where
4749         we followed a bogus function pointer from managed code (bug #332866).
4750
4751 2007-10-11  Mark Probst  <mark.probst@gmail.com>
4752
4753         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
4754         replaces the generic_shared flag and will carry more information
4755         in the future.
4756
4757         * generic-sharing.c: Added mini_type_stack_size() which allows
4758         allows open types if given a generic sharing context.
4759         mini_get_basic_type_from_generic() takes a
4760         MonoGenericSharingContext* instead of a MonoCompile* now.
4761
4762         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
4763         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
4764         mini-sparc.c, mini-x86.c: Trivial changes required by the two
4765         changes above.  Just passing arguments through to the right
4766         places.
4767
4768 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
4769
4770         * mini-arm.c: unify the call emission to emit_code_seq().
4771
4772 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
4773
4774         * tramp-arm.c: reduced the trampoline size.
4775
4776 2007-10-10  Mark Probst  <mark.probst@gmail.com>
4777
4778         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
4779         variable handling out of arch-specific code.
4780
4781 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
4782
4783         * mini-arm.c: implemented fast delegate dispatch.
4784
4785 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
4786
4787         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
4788         that fp elimination is turned off if the space required by locals is too
4789         big. Fixes #331958.
4790
4791 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
4792
4793         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
4794         ARM to the new style trampoline.
4795
4796 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
4797
4798         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
4799
4800         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
4801
4802 2007-10-09  Martin Baulig  <martin@ximian.com>
4803
4804         * debug-debugger.h
4805         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
4806         `field_info_offset_offset'.     
4807
4808 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
4809
4810         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
4811         removed more internal usage of the r11 register and made it available
4812         to the register allocator.
4813
4814 2007-10-08  Mark Probst  <mark.probst@gmail.com>
4815
4816         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
4817         when sharing generics and treat type variables as references.
4818
4819 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
4820
4821         * mini-ppc.c: started removing the internal uses of register r11
4822         to eventually allow the register allocator to manage it as an
4823         additional available register.
4824
4825 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
4826
4827         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
4828
4829 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
4830
4831         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
4832         specific trampolines as they are not performance critical as a jump
4833         target (maybe align as before only for AOT code?). This saves about
4834         200 KB of native code on x86 for monodevelop startup.
4835
4836 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
4837
4838         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
4839         monodevelop startup.
4840
4841 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
4842
4843         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
4844
4845         * mini-sparc.h mini-sparc.c: Implement IMT support.
4846
4847         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
4848         its smaller and doesn't clobber sparc_g1.
4849
4850         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
4851
4852 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
4853
4854         * mini-ppc.c: optimized the size of the IMT thunks a bit.
4855
4856 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
4857
4858         * mini-ppc.c: implemented fast delegate invocation.
4859
4860 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
4861
4862         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
4863
4864 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
4865
4866         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
4867         code to the new style trampoline in preparation for IMT support.
4868
4869 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
4870
4871         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
4872         systems already. This also reduces the specific trampiline sizes and
4873         prepares for the use of r12 as the IMT identifier register.
4874
4875 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4876
4877         * mini-mips.h: endianess fix (simplified from a patch by
4878         Thomas Kunze <thommy@tabao.de>, bug #323737).
4879
4880 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
4881
4882         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
4883         to access ucontext fields and enable netbsd support
4884         (partially from Magnus Henoch <mange@freemail.hu>).
4885
4886 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4887
4888         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
4889         use the preprocessor from the CPP env var if it is set.
4890
4891 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
4892
4893         * mini-trampolines.c: fixed an assertion and moved it earlier in the
4894         code, before interface_offset gets used.
4895
4896 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
4897
4898         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
4899         mono_class_setup_vtable () before accessing klass->vtable.
4900
4901 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
4902
4903         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
4904         hackish.
4905
4906 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4907
4908         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
4909         IMT slots (this saves hundreds of KB of memory in programs like
4910         IronPython and Monodevelop).
4911
4912 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
4913
4914         * mini.c: print the delegate counter.
4915
4916 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
4917
4918         * mini-x86.c: make it easier to enable the debugging code for IMT
4919         slots.
4920
4921 2007-09-28  Martin Baulig  <martin@ximian.com>
4922
4923         * debug-debugger.h
4924         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
4925         `mono_method_klass_offset' and `mono_method_token_offset'.
4926
4927 2007-09-20  Mark Probst  <mark.probst@gmail.com>
4928
4929         * mini.c: First generics sharing implementation.  Can only share
4930         in very simple cases.  If sharing doesn't work it falls back to
4931         dedicated compilation.
4932
4933         * mini.h: Flag in MonoCompile to specify whether generic
4934         compilation is shared.  Flags enum for marking which generic inst
4935         of a context is used.  Prototypes for helper functions.
4936
4937         * generic-sharing.c: Helper functions for generic method sharing.
4938
4939         * optflags-def.h: Optimization flag (gshared) for enabling generic
4940         method sharing added.
4941
4942         * Makefile.am: generic-sharing.c added.
4943
4944 2007-09-19 Daniel Nauck <dna@mono-project.de>
4945
4946         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
4947
4948 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
4949         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
4950         fixes bug 325507.
4951
4952 2007-09-19  Martin Baulig  <martin@ximian.com>
4953
4954         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
4955         mono_debug_cleanup() is now part of mono_cleanup().
4956
4957 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
4958
4959         * driver.c (mono_main): Fix a warning.
4960
4961 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
4962
4963         * aot-compiler.c: Optimize various parts when processing large assemblies.
4964         Fixes ##325568.
4965
4966         * mini.c (mono_patch_info_hash): Improve hash function.
4967
4968 2007-09-14  Jonathan Chambers <joncham@gmail.com>
4969
4970         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
4971         
4972         Code is contributed under MIT/X11 license.
4973
4974 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
4975
4976         * mini.c (mini_init): Fix a leak.
4977
4978         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
4979
4980 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
4981
4982         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
4983
4984 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
4985
4986         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
4987
4988 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
4989
4990         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
4991         variance tests.
4992
4993         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
4994
4995         * mini.c (handle_alloc): Enable managed allocators in AOT code.
4996
4997         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
4998
4999         * aot-runtime.c (decode_patch_info): Ditto.
5000
5001 2007-09-12  Jonathan Chambers <joncham@gmail.com>
5002
5003         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
5004         static case. Cache delegates in architecture specific code, 
5005         based on number of parameters.
5006         
5007         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
5008         in architecture specific code, based on number of parameters.
5009         
5010         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
5011         caching happen in architecture specific code now.
5012         
5013         Code is contributed under MIT/X11 license.
5014
5015 2007-09-12  Jonathan Chambers <joncham@gmail.com>
5016
5017         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
5018         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
5019         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
5020
5021         Code is contributed under MIT/X11 license.
5022
5023 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
5024         * mini.c: (mono_thread_abort) Fixed bug #82416.
5025
5026 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
5027
5028         * mini.: hook the new managed GC allocation feature into the JIT.
5029
5030 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
5031
5032         * mini.c: implementation for the new runtime tls opcode.
5033
5034 2007-09-11  Martin Baulig  <martin@ximian.com>
5035
5036         * debug-debugger.h
5037         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
5038         `mono_method_inflated_offset'.
5039
5040 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
5041
5042         * driver.c mini.h mini.c: Add a new devel command line option for injecting
5043         async exceptions into a method.
5044
5045         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
5046         purpose of testing whenever the unwinder works at every instruction.
5047
5048 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
5049
5050         * mini.c: check accessibility of method used in ldftn (fixes
5051         bug #82635).
5052
5053 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
5054
5055         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
5056
5057         * inssel.brg: Fix a warning.
5058
5059 2007-09-03  Martin Baulig  <martin@ximian.com>
5060
5061         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
5062         now takes the `main_method' as argument.
5063
5064 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
5065
5066         * cpu-sparc.md (endfilter): Add missing src1:i argument.
5067
5068 2007-08-30  Jonathan Chambers <joncham@gmail.com>
5069
5070         * driver.c: include the cil-coff.h header on Windows.
5071         
5072         Code is contributed under MIT/X11 license.
5073
5074 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
5075
5076         * mini.c, driver.c: don't include the cil-coff.h header.
5077
5078 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
5079
5080         * mini.c: flag places that needs fixes fo soft-float support.
5081
5082 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
5083
5084         * mini.h, inssel-float.brg: fix soft-float constant loads on big
5085         endian systems (partially from Dean Jenkins, bug #81924).
5086
5087 2007-08-28  Mark Probst  <mark.probst@gmail.com>
5088
5089         * mini.c (check_linkdemand): Remove embedded reference object in
5090         call to LinkDemandSecurityException.
5091         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
5092         with an IntPtr instead of a reference object.
5093
5094 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
5095
5096         * mini.c (handle_initobj): Handle alignment properly.
5097
5098         * inssel.brg (mini_emit_memset): Ditto. 
5099
5100         * inssel.brg (mini_emit_memcpy): Ditto. 
5101
5102         * inssel-sparc.brg: Ditto.              
5103
5104         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
5105
5106 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
5107
5108         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
5109         exceptions raised in unmanaged code. Fixes part of #82594.
5110
5111 2007-08-24  Mark Probst  <mark.probst@gmail.com>
5112
5113         * mini.c (mono_method_to_ir), declsec.c
5114         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
5115
5116 2007-08-22  Martin Baulig  <martin@ximian.com>
5117
5118         * debug-mini.h
5119         (MonoDebuggerThreadInfo): New typedef.
5120         (mono_debugger_thread_table): New global variable.
5121         (mono_debugger_thread_created): New public function.
5122         (mono_debugger_thread_cleanup): New public function.
5123
5124         * debug-debugger.h
5125         (MonoDebuggerInfo):
5126         - removed `get_current_thread' and `lookup_assembly'.
5127         - removed `data_table'.
5128         - added `thread_table'.
5129
5130         * mini.c
5131         (mono_thread_start_cb): Call mono_debugger_thread_created().
5132         (mono_thread_attach_cb): Likewise.
5133         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
5134         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
5135         initial domain.
5136
5137         * driver.c (mono_main): Move mono_debug_init() up, before calling
5138         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
5139
5140 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5141
5142         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
5143         together when passing several arguments of type double (gives a small
5144         speedup and saves a few bytes of generated code).
5145
5146 2007-08-20  Jb Evain  <jbevain@novell.com>
5147
5148         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
5149
5150 2007-08-20  Jb Evain  <jbevain@novell.com>
5151
5152         * mini.c (mono_method_to_ir): throw MethodAccessException
5153         and FieldAccessException instead of InvalidProgramException.
5154
5155 2007-08-20  Mark Probst  <mark.probst@gmail.com>
5156
5157         * mini.c: CoreCLR security checks.
5158
5159         * mini.h: Removed MonoSecurityMode (moved to
5160         metadata/security-manager.h) and mono_security_mode global var
5161         (replaced by set/get functions in security-manager.h).
5162
5163         * driver.c: Added "core-clr-test" security mode for testing.  Used
5164         set-function for setting security mode.
5165
5166 2007-08-17  Mark Probst  <mark.probst@gmail.com>
5167
5168         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
5169         the new jit_info_table.
5170
5171         * driver.c: Test code for the new jit_info_table (enabled by the
5172         define MONO_JIT_INFO_TABLE_TEST).
5173
5174 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
5175
5176         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
5177         detection of call <REG> instruction sequence. Fixes build on freebsd.
5178
5179 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
5180
5181         * mini-exceptions.c: Fix a warning.
5182
5183 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
5184
5185         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
5186         stack overflow handling code on amd64 too.
5187
5188         * mini-exceptions.c (mono_setup_altstack): Make this use 
5189         mono_thread_get_stack_bounds ().
5190
5191         * mini-x86.h: Disable sigaltstack on solaris x86.
5192
5193 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
5194
5195         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
5196
5197 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
5198
5199         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
5200
5201 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
5202
5203         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
5204
5205         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
5206
5207 2007-08-03  Neale Ferguson <neale@sinenomine.net>
5208
5209         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
5210         due to alignment.
5211
5212 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
5213
5214         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
5215         to be emitted (bug #82281).
5216
5217 2007-08-01  Martin Baulig  <martin@ximian.com>
5218
5219         Merged the `debugger-dublin' branch.
5220
5221         * debug-debugger.h (MonoDebuggerInfo):
5222         Removed the `old_*' compatibility entries.
5223         Added `debugger_version' and `data_table'.
5224         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
5225         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
5226
5227         * debug-mini.c
5228         (MiniDebugMethodBreakpointInfo): Add `address_list'.
5229         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
5230         instead of a `gconstpointer'.
5231         (mono_debugger_insert_method_breakpoint): Return a
5232         `MonoDebugMethodAddressList *'.
5233
5234 2007-06-28  Martin Baulig  <martin@ximian.com>
5235
5236         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
5237
5238 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
5239
5240         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
5241         __builtin_frame_address () since it is broken on older gcc versions.
5242
5243 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
5244
5245         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
5246         on the stack overflow handling and made the managed stack overflows
5247         catchable in most cases using soft guard pages.
5248         * exceptions-x86.c: added code to restore the protection in the soft
5249         guard pages at the end of exception handling.
5250
5251 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
5252
5253         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
5254
5255 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5256
5257         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
5258         exception handling.
5259
5260 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5261
5262         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
5263         signal handling support until it has been ported to the new mechanism.
5264         * mini.c: fixed stack overflow detection and use the new
5265         architecture code  to handle signals on the altstack.
5266
5267 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
5268
5269         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
5270         stack overflows on the alt stack.
5271
5272 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
5273
5274         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
5275         stack overflows on the alt stack.
5276
5277 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
5278
5279         * exceptions-ppc.c: cleanup preparing for altstack support.
5280
5281 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
5282
5283         * exceptions-arm.c: cleanup preparing for altstack support.
5284
5285 2007-07-27  Mark Probst  <mark.probst@gmail.com>
5286
5287         * mini.c (print_jit_stats): Output hazard pointer stats.
5288
5289 2007-07-26  Mark Probst  <mark.probst@gmail.com>
5290
5291         * driver.c, mini.c: Replaced security mode flags with a single
5292         enum variable.
5293
5294 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
5295
5296         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
5297
5298 2007-07-25  Mark Probst  <mark.probst@gmail.com>
5299
5300         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
5301         (which doesn't do anything yet) for activating Core CLR
5302         (Silverlight) security.
5303
5304 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
5305
5306         * mini-codegen.c: work around a possible gcc bug on arm.
5307
5308 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
5309
5310         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
5311         message for platforms that don't support AOT compilation.
5312
5313 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
5314
5315         * mini.h, mini.c, driver.c: temporary smcs hack.
5316
5317 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
5318
5319         * mini-arm.h, mini-arm.c: arm EABI fixes.
5320
5321 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
5322
5323         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
5324         case.
5325
5326         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
5327         trampolines taking a method argument.
5328
5329         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
5330
5331         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
5332         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
5333
5334         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
5335         JIT compilation throws an exception. Fixes #82050.
5336
5337 2007-07-19  Mark Probst  <mark.probst@gmail.com>
5338
5339         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
5340         with the MONO_EXCEPTION_ defines.
5341
5342 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
5343
5344         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
5345         #82117.
5346         
5347         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
5348         the cause of an assertion.
5349
5350 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
5351
5352         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
5353         removed.
5354
5355 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
5356
5357         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
5358         assert. Should fix #82103.
5359
5360 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
5361
5362         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
5363         here too. Fixes #82095.
5364
5365         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
5366         addresses.
5367
5368         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
5369
5370         * mini-amd64.h: Enable IMT for amd64.
5371         
5372         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
5373
5374 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
5375
5376         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
5377
5378 2007-07-12  Mark Probst  <mark.probst@gmail.com>
5379
5380         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
5381         as soon as check_linkdemand sets an exception_type.
5382
5383 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
5384
5385         * mini-x86.c: fixed offsets for IMT call sequence.
5386         * mini-x86.h: enable IMT again.
5387
5388 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
5389
5390         * trace.c (mono_trace_enter_method): Decode MonoType too.
5391
5392         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
5393
5394         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
5395
5396         * mini-amd64.c: Add preliminary IMT implementation.
5397         
5398 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
5399
5400         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
5401         understand the new IMT-base interface invocation (thanks to
5402         Daniel Nauck for the report and the remote debugging session).
5403
5404 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
5405
5406         * mini-x86.c: size and speed optimizations for the IMT bsearch.
5407
5408 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
5409
5410         * Makefile.am (aotcheck): Make this actually use the AOTed code.
5411
5412 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
5413
5414         * mini-trampolines.c: implement AOT IMT support.
5415         * mini-x86.h: enable IMT support for wider testing.
5416
5417 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
5418
5419         * inssel.brg (emit_imt_argument): Add aot support here.
5420
5421         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
5422
5423 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
5424
5425         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
5426         of the IMT implementation, partially from massi, with my
5427         implementation of the bsearch sequence. Disabled by default until
5428         the AOT code is implemented.
5429
5430 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
5431
5432         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
5433
5434         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
5435
5436 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
5437
5438         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
5439         arch-independent IMT JIT code from Massimiliano
5440         Mantione (massi@ximian.com) with small cleanups from me.
5441
5442 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
5443
5444         * Makefile.am: fix svn invocation to get the svn revision to be
5445         independent of the local language (build fix).
5446
5447 2007-07-09  Mark Probst  <mark.probst@gmail.com>
5448
5449         * mini.c (inline_method): Reset cfg->exception_type if the
5450         inlining is aborted.  Fixes: 82049.
5451
5452 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
5453
5454         * mini.c: remove assert from exception handling code when exception_ptr
5455         is not set.
5456
5457 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
5458
5459         * mini.c (mono_codegen): Add an assert.
5460
5461         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
5462         enter and leave code.
5463         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
5464
5465 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5466
5467         * mini-ppc.c: fixed memory corruption for localloc(0)
5468         (bug #81852).
5469
5470 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
5471         
5472         * mini.c: Fix warnings.
5473
5474 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
5475
5476         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
5477         to emit better double->int conversions.
5478
5479 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
5480
5481         * mini.c: the provided Min/Max optimizations are valid for unisgned
5482         ints.
5483
5484 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
5485
5486         * 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
5487
5488 2007-06-28  Miguel de Icaza  <miguel@novell.com>
5489
5490         * mini.c (mono_running_on_valgrind): Add support for reporting the
5491         method and  its boundaries to valgrind.
5492
5493 2007-06-28  Martin Baulig  <martin@ximian.com>
5494
5495         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
5496
5497 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
5498
5499         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
5500
5501         * generic.2.cs: Add new test case.
5502
5503 2007-06-25  Martin Baulig  <martin@ximian.com>
5504
5505         Merged the `debugger-dublin' branch.
5506
5507         * debug-mini.c
5508         (mono_debugger_insert_method_breakpoint): New public method.
5509         (mono_debugger_remove_method_breakpoint): Likewise.
5510         (mono_debugger_check_breakpoints): New static method.
5511         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
5512
5513         * debug-debugger.h (MonoDebuggerInfo):
5514         Renamed (to keep backward compatibility in the vtable):
5515         `insert_breakpoint' -> `old_insert_breakpoint'.
5516         `remove_breakpoint' -> `old_remove_breakpoint'.
5517         `create_string' -> `old_create_string'.
5518         `lookup_class' -> `old_lookup_class'.
5519         `lookup_type' -> removed; changed into a dummy field.
5520         `lookup_assembly' -> `old_lookup_assembly'.
5521         Added (same functionality, but different signature):
5522         `create_string', `lookup_class', `lookup_assembly'
5523         Added new:
5524         `get_method_addr_or_bpt', `remove_method_breakpoint',
5525         `runtime_class_init'.
5526
5527         * debug-debugger.c: Merged the `debugger-dublin' branch.
5528
5529 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
5530
5531         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
5532         well.
5533         (peephole_pass): Likewise.
5534
5535 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
5536
5537         * driver.c: hopefully make setaffinity work also for ancient
5538         versions of linux.
5539
5540 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
5541
5542         * driver.c : win32 build fix.
5543
5544 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
5545
5546         * driver.c: check for the MONO_NO_SMP env var and bind to a single
5547         processor if it is set.
5548
5549 2007-06-21  Martin Baulig  <martin@ximian.com>
5550
5551         * debug-mini.h: New file.
5552
5553         * debug-mini.c
5554         (mono_debugger_insert_breakpoint_full): Moved here from
5555         ../metadata/mono-debug-debugger.c.
5556         (mono_debugger_remove_breakpoint): Likewise.
5557         (mono_debugger_breakpoint_callback): Likewise.
5558
5559 2007-06-15  Raja R Harinath  <rharinath@novell.com>
5560
5561         * jit-icalls.c (mono_helper_compile_generic_method): Update to
5562         changes in MonoGenericClass.
5563
5564 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
5565
5566         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
5567
5568 2007-06-14  Raja R Harinath  <rharinath@novell.com>
5569
5570         * jit-icalls.c (mono_helper_compile_generic_method): Update to
5571         removal of MonoGenericMethod.
5572
5573 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5574
5575         * mini-exceptions.c: hooks for the exception events profiling API.
5576
5577 2007-06-14  Randolph Chung  <tausq@debian.org>
5578
5579         * Makefile.ma: Add hppa target.
5580         * mini-arch.h: Include mini-hppa.h
5581         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
5582         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
5583         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5584
5585 2007-06-14  Randolph Chung  <tausq@debian.org>
5586
5587         * inssel.brg: Add rules for "chained" compare-branch operations so that
5588         a single compare op can affect multiple branches.  Adjust cost for
5589         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
5590         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
5591         cost for some rules so that they can more easily be overridden by
5592         per-arch rules (with fixes from lupus).
5593         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5594
5595 2007-06-13  Randolph Chung  <tausq@debian.org>
5596
5597         * mini-ops.h: Reorder branch ops so that they match the order of the
5598         corresponding CEE_* ops.  The code expects them this way.
5599         Add new ops for HPPA target.
5600         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5601
5602 2007-06-13  Randolph Chung  <tausq@debian.org>
5603
5604         * mini-exceptions.c: Handle cases where the stack grows towards
5605         larger addresses.
5606         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5607
5608 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
5609
5610         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
5611         counter.
5612         * driver.c: explain where a non-matching corlib is found.
5613
5614 2007-06-13  Mark Probst  <mark.probst@gmail.com>
5615
5616         * mini.c (print_jit_stats): Output dynamic code allocation stats.
5617
5618 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
5619
5620         * mini-exceptions.c: Generate a method profile leave event during
5621         an exception to ensure that the profiler gets notified.
5622
5623 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
5624
5625         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
5626         branch.
5627
5628         * cpu-amd64.md: Add long_and/or/xor opcodes.
5629
5630 2007-06-06  Wade Berrier  <wberrier@novell.com>
5631
5632         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
5633         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
5634         length of instruction shr_imm (expected 8, got 10)
5635
5636 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
5637
5638         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
5639
5640 2007-06-06  Mark Probst  <mark.probst@gmail.com>
5641
5642         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
5643         MonoInternalHashTable again (fixed bug in the internal hash table
5644         code).
5645
5646 2007-06-06  Mark Probst  <mark.probst@gmail.com>
5647
5648         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
5649         Have to figure out what makes it crash the SWF regression.
5650
5651 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
5652
5653         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
5654
5655 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5656
5657         * mini.c: optimize out the type check when storing null in a
5658         reference array.
5659
5660 2007-06-04  Mark Probst  <mark.probst@gmail.com>
5661
5662         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
5663         MonoInternalHashTable.
5664
5665 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
5666
5667         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
5668         signed integer methods.
5669
5670 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
5671
5672         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
5673         permanently since the current approach doesn't work.
5674
5675 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
5676
5677         * inssel.brg (stmt): Only call delegate->invoke_impl if 
5678         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
5679
5680 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
5681
5682         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
5683         the sreg2==rdx case.
5684         
5685         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
5686         account if it contains a rex prefix.
5687         (peephole_pass): Handle OP_FMOVE as well.
5688
5689 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
5690
5691         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
5692         as it causes regressions.
5693
5694 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
5695
5696         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
5697         static case as well.
5698
5699         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
5700
5701         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
5702         (mono_arch_get_this_arg_from_call): Ditto.
5703
5704         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
5705
5706         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
5707         invoke_impl field.
5708
5709         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
5710         (mono_arch_get_this_arg_from_call): Ditto.
5711
5712         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
5713         
5714         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
5715         try to create optimized invoke code and use that for further invocations. 
5716         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
5717
5718         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
5719
5720 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
5721
5722         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
5723         sealed classes or methods.
5724         *devirtualization.cs: tests for the new optimization
5725
5726 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
5727
5728         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
5729         by the update_volatile () function.
5730
5731 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
5732
5733         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
5734         require it.
5735
5736         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
5737
5738 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
5739
5740         * mini.c: Add configure checks for header files.
5741         * mini-x86.c: Add configure checks for header files.
5742         * trace.c: Add configure checks for header files.
5743         * aot-runtime.c: Add configure checks for header files.
5744         * aot-compiler.c: Add configure checks for header files.
5745         * driver.c: Add configure checks for header files.
5746         * mini-codegen.c: Add configure checks for header files.
5747         
5748         Code is contributed under MIT/X11 license.
5749
5750 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
5751
5752         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
5753         icompare_imm -128 + op_iclt. Fixes #81703.
5754
5755 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
5756
5757         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
5758
5759 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
5760
5761         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
5762         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
5763         so that all isinst checks now use "interface_bitmap".
5764
5765 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
5766
5767         * cpu-amd64.md (jmp): Fix a warning.
5768
5769         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
5770
5771         * basic.cs: Add new regression test.
5772
5773         * basic.cs: Remove test which is now in basic-long.cs.
5774
5775         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
5776
5777         * basic-long.cs: Add new test.
5778         
5779 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
5780
5781         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
5782
5783 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
5784
5785         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
5786
5787         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
5788         places.
5789         
5790         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
5791         throwing code a bit.
5792
5793         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
5794         the exception throwing code a bit.
5795
5796         * mini-x86.c (get_call_info): Allocate result from a mempool.
5797
5798 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
5799
5800         * aot-compiler.c (find_typespec_for_class): Fix the assert.
5801
5802         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
5803
5804         * mini.h (MonoCompile): Add 'token_info_hash' field.
5805
5806         * mini.c: Save token->method associations during compilation so the AOT 
5807         compiler can use it.
5808         
5809         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
5810         which reference generic classes and methods.
5811
5812 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
5813
5814         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
5815
5816         * aot-compiler.c (compile_method): Fix a typo in a comment.
5817
5818         * aot-runtime.c (decode_cached_class_info): Skip generic types.
5819
5820         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
5821         everything generic.
5822
5823         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
5824
5825 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
5826
5827         * mini.h (MonoCompile): Add 'args' field.
5828
5829         * mini.c (mono_compile_create_vars): Store variables representing the arguments
5830         into cfg->args.
5831
5832         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
5833
5834 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
5835
5836         * mini.c (mono_compile_get_interface_var): Remove this unused function.
5837
5838         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
5839
5840         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
5841         opcodes for some opcodes.
5842
5843         * mini.h *.brg *.c: Use the new opcodes.
5844
5845 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
5846
5847         * mini.h: Bumped aot revision.
5848
5849         * inssel.brg: modified code generation of type checks for interfaces
5850         to use the new "MonoClass.interface_bitmap" instead of the old
5851         "MonoClass.interface_offsets".
5852
5853 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
5854
5855         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
5856
5857 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
5858
5859         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
5860         64 bit platforms.
5861
5862 2007-04-27  Neale Ferguson <neale@sinenomine.net>
5863
5864         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
5865
5866 2007-04-27  Wade Berrier  <wberrier@novell.com>
5867
5868         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
5869         mini.h) to fix build.
5870
5871 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
5872
5873         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
5874         
5875         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
5876         causes the corlib unit tests to fail.
5877
5878 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
5879
5880         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
5881
5882         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
5883
5884         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
5885         opcodes to the comparison relations.
5886
5887         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
5888         opcodes to their types.
5889         
5890         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
5891
5892         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
5893         it in cfg->arch.cinfo.
5894
5895         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
5896
5897         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
5898         cfg->cil_offset_to_bb.
5899
5900 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
5901
5902         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
5903         created becase of initlocals.
5904
5905 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
5906
5907         * mini-alpha.c cpu-alpha.md: More alpha port work from 
5908         Sergey Tikhonov <tsv@solvo.ru>.
5909
5910 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
5911
5912         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
5913
5914 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
5915
5916         * cpu-s390.md (break): Correct the length of break instruction.
5917
5918 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5919
5920         * mini.c: fix a couple of soft-float issues and comments.
5921
5922 2007-04-15  Miguel de Icaza  <miguel@novell.com>
5923
5924         * trace.c (is_filenamechar): - is also a filename char.
5925
5926 2007-04-15  Neale Ferguson <neale@sinenomine.net>
5927
5928         * mini-s390.c: Correct checking for enum type in return value processing.
5929
5930 2007-04-14  Raja R Harinath  <rharinath@novell.com>
5931
5932         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
5933         (version.h): Makefile is in the build directory.
5934
5935 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
5936
5937         * mini-amd64.h: fix for assertion failure on Solaris/amd64
5938
5939 2007-04-11  Martin Baulig  <martin@ximian.com>
5940
5941         * mini.c (can_access_member): Fix handling of generic classes;
5942         fixes #81259.
5943
5944 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
5945
5946         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
5947
5948 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
5949
5950         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
5951
5952 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
5953
5954         * mini-codegen.c: make sure the right spill amount is
5955         used for fp or integer registers (fixes the float_sub_spill() on ppc).
5956
5957 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
5958
5959         * mini-ppc.c: fixes for the fp_branch_nan test.
5960
5961 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
5962
5963         * basic.cs: Comment out new test which still fails on ia64.
5964
5965 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
5966
5967         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
5968
5969 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
5970
5971         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
5972
5973 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
5974
5975         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
5976         on 64 bit machines. Fixes part of #80738.
5977
5978         * basic.cs: Add regression test.
5979
5980 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
5981
5982         * inssel.brg basic.cs: Revert previous change to fix build.
5983
5984         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
5985         platforms.
5986         
5987         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
5988
5989         * basic.cs: Add new regression test.
5990
5991 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
5992
5993         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
5994         many arguments.
5995
5996 2007-03-16  Neale Ferguson <neale@sinenomine.net>
5997
5998         * cpu-s390x.md: Correct length of break instruction.
5999
6000 2007-03-16  Neale Ferguson <neale@sinenomine.net>
6001
6002         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
6003         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
6004
6005 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
6006
6007         * *.c: Begin WIN64 port.
6008         * mini.c:  Use correct register in profiler.
6009         * mini-amd64.c: No inline assembly on Win64.
6010         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
6011         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
6012         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
6013         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
6014         mono_arch_ip_from_context for Win64.
6015         
6016         Contributed under MIT/X11 license.
6017
6018 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
6019
6020         * exceptions-amd64.c (seh_handler): Ditto.
6021
6022         * exceptions-x86.c (seh_handler): Fix a memory leak.
6023
6024 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
6025
6026         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
6027         mini-s390x.c: fixed peephole optimizations to deal
6028         correctly with 1 and 2 byte reload avoidance.
6029
6030 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
6031
6032         * cpu-s390.md, cpu-s390x.md: update localloc length.
6033
6034 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
6035
6036         * cpu-g4.md: added missing descriptions.
6037
6038 2007-03-14  Miguel de Icaza  <miguel@novell.com>
6039
6040         *  Makefile.am: Add support so the tail tests are not executed on
6041         PowerPC as that is a known limitation of the PowerPC port.
6042
6043 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
6044
6045         * runmdesc.bat:  Move to msvc directory.
6046         
6047 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
6048
6049         * runmdesc.bat:  Run executable that was produced by the current
6050         target and sent via an argument.
6051         
6052 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
6053
6054         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
6055         #81102.
6056
6057         * generics.2.cs: Add regression test.
6058
6059 2007-03-09  Wade berrier  <wberrier@novell.com>
6060
6061         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
6062
6063 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
6064
6065         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
6066         AOT code depends on this.
6067
6068 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
6069
6070         * mini.c: more precise tracking of types in the eval stack
6071         (part of fix for bug #81044).
6072
6073 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
6074
6075         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
6076
6077         * aot-compiler.c (encode_patch): Remove an obsolete comment.
6078
6079 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
6080
6081         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
6082
6083         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
6084
6085 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
6086
6087         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
6088         a pointer on 64 bit systems. Fixes #80190.
6089
6090         * iltests.il: Add new regression test.
6091
6092 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6093
6094         * mini.c: inline a constant for Environment.IsRunningOnWindows.
6095
6096 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
6097
6098         * trace.c: Remove an erroneous alignemnt check when tracing.
6099           Fixes --trace on OSX86.
6100
6101 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
6102
6103         * mini-$(arch).h: initialize SP in context for all the archs.
6104
6105 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
6106
6107         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
6108         regressions in the thread tests.
6109
6110 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
6111
6112         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
6113         - fixed implementation of LOCALLOC opcode
6114         - implemented non-un compare for floats
6115         - code cleanup
6116         - implementation of FDIV and CKFINITE opcodes
6117         - fixes for latest mono updates
6118         - additional arch opcodes
6119
6120 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
6121
6122         * Makefile.am: simplify and merge rules for cross-compilation.
6123
6124 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
6125
6126         * local-propagation.c: Actually *apply* the fix for bug 80591...
6127
6128 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
6129
6130         * mini-exceptions.c: backuot part of the last change
6131         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
6132
6133 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
6134         * inssel.brg: Fix bug 59286.
6135
6136
6137 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
6138
6139         * mini-exceptions.c: patch from Zoltan to correctly check for
6140         stack boundaries (using the stack register, not the frame register),
6141         fixes bugs #80724, #79717.
6142
6143 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
6144
6145         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
6146         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
6147
6148         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
6149         presence of frame pointer elimination.
6150
6151 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
6152         
6153         * mini-x86.h: NetBSD UCONTEX_REG defines.
6154
6155 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
6156
6157         * inssel-amd64.brg: Fix amd64 build.
6158
6159 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
6160
6161         * mini.h: remove extern to workaround what looks likes gcc bug 26905
6162         on amd64.
6163
6164 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
6165
6166         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
6167         ends.
6168
6169         * mini-<ARCH>.c: Use mono_is_regsize_var ().
6170
6171 2007-01-30 Mark Mason <mason@broadcom.com>
6172
6173            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
6174            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
6175            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
6176            beginning support for CEE_JMP [not quite working yet]
6177            * tramp-mips.c: LMF handling now works
6178         
6179 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
6180
6181         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
6182
6183         * mini.h (NULLIFY_INS): New macro.
6184
6185 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
6186
6187         * mini.c: statistical profiler fix for windows, patch
6188         from Tor Lillqvist (tml@novell.com).
6189
6190 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
6191         * local-propagation.c: Fix bug 80591.
6192
6193 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
6194
6195         * Makefile.am: put back the --export-dynamic option as with
6196         the previous gmodule flags (thanks to Robert Jordan).
6197
6198 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
6199
6200         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
6201
6202         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
6203         simplify and speed up the local register allocator. Also rename some fields
6204         like iassign->vassign.
6205         
6206         * regalloc.c: Remove some functions which are no longer used since their
6207         inlined version is in mini-codegen.c.
6208         
6209         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
6210
6211         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
6212
6213 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
6214
6215         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
6216         narrowing. Fixes #80622.
6217
6218         * iltests.il: Add new regresssion test. 
6219
6220 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
6221
6222         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
6223         debug-debugger.c, debug-debugger.h: warning fixes.
6224         * driver.c: updated copyright year and made it fit in one line.
6225
6226 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
6227
6228         * aot-runtime.c: updated to use mono-dl instead of gmodule.
6229
6230 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
6231
6232         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
6233
6234         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
6235
6236         * iltests.il: Add new test for bug #80507.
6237
6238 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6239
6240         * mini-arm.h: use soft-float also on vfp for now.
6241
6242 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
6243
6244         * mini.c: fix some more soft-float issues.
6245
6246 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
6247
6248         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
6249
6250 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
6251         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
6252         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
6253         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
6254
6255 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
6256
6257         * mini-arm.c: typo fix.
6258
6259 2007-01-23  Neale Ferguson <neale@sinenomine.net>
6260
6261         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
6262
6263 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
6264
6265         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
6266         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
6267
6268         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
6269
6270         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
6271
6272         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
6273         
6274         * inssel.brg: Fix a warning.
6275
6276         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
6277
6278         * abcremoval.c ssa.c ssapre.c: Update after this change.
6279         
6280         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
6281
6282         * dominators.c (df_set): Use mono_bitset_union_fast.    
6283
6284 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
6285
6286         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
6287         mini-codegen.c: reduce relocations and memory usage for the cpu
6288         description.
6289
6290 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
6291
6292         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
6293
6294         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
6295         to reduce their size.
6296
6297 2007-01-19 Mark Mason <mason@broadcom.com>
6298
6299         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
6300         * mini-mips.c: more configuration macros, support long conditional branches, additional
6301         asserts, fix epilog instrumentation.
6302         * mini-mips.h: use standard stack walk
6303         * cpu-mips.md: increase size of div, rem and conditional branches
6304         
6305 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
6306
6307         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
6308         to cpu spec data.
6309
6310 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
6311
6312         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
6313         (compile_method): Ditto.
6314
6315         * aot-runtime.c (decode_klass_info): Ditto.
6316
6317         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
6318         needed by the code generated by inssel.brg. Also fix a warning.
6319
6320 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
6321
6322         * mini.c: deal with enums that become genericinsts by
6323         being nested in a generic class (bug #79956).
6324
6325 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
6326
6327         * mini.c: match the generic definition to check for
6328         private access with generic types (bug #78431).
6329
6330 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
6331
6332         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
6333         to make life easier for people cross-compiling that insist on not
6334         using scratchbox.
6335
6336 2007-01-17 Mark Mason <mason@broadcom.com>
6337
6338         * inssel-long.brg: patch to deal with mips missing flags
6339         * inssel-long32-mips.brg: implement overflow checks
6340         * insset-mips.brg: implement overflow checks
6341         * mini-mips.h: implement conditional exception handling
6342         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
6343           Remove unused code, minor cleanups.
6344         * exceptions-mips.c: minor cleanups
6345         * mini-ops.h: add mips conditional exception ops
6346         * cpu-mips.md: add mips conditional exception ops
6347
6348         
6349 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
6350
6351         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
6352         to deal with mips missing of flags.
6353
6354 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
6355
6356         * exceptions-ppc.c: execute fault handlers.
6357
6358 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
6359
6360         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
6361
6362 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
6363
6364         * mini.c: handle also floating point values in initialize_array.
6365
6366 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
6367
6368         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
6369         array initialization and make it conditional on the intrins option.
6370
6371 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
6372
6373         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
6374         relocations and put the patch info names close to the enum definition.
6375
6376 2007-01-15 Mark Mason <mason@broadcom.com>
6377
6378         * basic.cs, exceptions.cs: break up large tests to increase debugability.
6379
6380 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
6381
6382         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
6383
6384 2007-01-12  Raja R Harinath  <rharinath@novell.com>
6385
6386         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
6387
6388 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
6389
6390         * Makefile.am: distribute the mips sources.
6391
6392 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
6393
6394         * mini-codegen.h: handle bug #80489 here, by excluding ecx
6395         directly.
6396
6397 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
6398
6399         * cpu-x86.md: back out for now as this triggers other regressions.
6400
6401 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
6402
6403         * cpu-x86.md: force src1 and dest regpair for long shift instructions
6404         to eax:edx, so ecx can't get allocated to them (bug #80489).
6405
6406 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
6407
6408         * mini.c, mini-exceptions.c: enabled running fault handlers
6409         (bug #80469).
6410
6411 2007-01-03  Miguel de Icaza  <miguel@novell.com>
6412
6413         * driver.c: If nothing fail, do not use the string "failed",
6414         because it makes it very annoying to view test result logs on the
6415         web. 
6416
6417 2006-12-30  Miguel de Icaza  <miguel@novell.com>
6418
6419         * debug-debugger.c (mono_debugger_main): Rename "main" to
6420         "main_method" to prevent a warning.
6421
6422         Remove a warning for unused field.
6423
6424 2006-12-28  Martin Baulig  <martin@ximian.com>
6425
6426         * debug-debugger.c
6427         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
6428
6429 2006-12-22  Martin Baulig  <martin@ximian.com>
6430
6431         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
6432         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
6433         seperate `.mdb_debug_info' section, so we can access it from the
6434         debugger even if the binary is stripped.
6435
6436         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
6437         from the `.mdb_debug_info' here to prevent the linker from
6438         removing that section.
6439
6440         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
6441         mdb-debug-info64.s.
6442
6443 2006-12-19  Robert Jordan  <robertj@gmx.net>
6444
6445         * mini-x86: enable the code to return small structures in
6446         registers for FreeBSD as well. Fixes bug #80278.
6447         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
6448
6449 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6450
6451         * mini-x86.c: align the stack when calling the profiler
6452         function instrumenting the prolog (on OSX).
6453
6454 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
6455
6456         * mini.c: emit a break opcode where Debugger.Break () is called.
6457
6458 2006-12-13  Miguel de Icaza  <miguel@novell.com>
6459
6460         * mini.c (mono_method_to_ir): Provide useful information on this
6461         assert, to prevent others from debugging like I did.
6462
6463 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
6464
6465         * mini.c: enable code which was incorrectly commented
6466         (bug #80235).
6467
6468 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
6469
6470         * mini-x86.c: enable on OSX, too, the code to return small
6471         structures in registers.
6472
6473 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
6474
6475         * mini-x86.c: remove the use of the dynamic code manager here, too.
6476
6477 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
6478
6479         * mini.h, debug-debugger.c, tramp-*.c: fixed 
6480         mono_debugger_create_notification_function() to use
6481         mono_global_codeman_reserve () instead of a dynamic code manager.
6482
6483 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
6484
6485         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
6486         ves_array_element_address() jit icall and use a generated
6487         managed method instead (which is about 4 times faster for a rank 3
6488         array access).
6489
6490 2006-11-29  Mark Mason  <mason@broadcom.com>
6491
6492         * basic-calls.cs: additional tests for passing
6493         structures as function arguments.
6494
6495 2006-11-29  Mark Mason  <mason@broadcom.com>
6496
6497         * mini-mips.h: disable custom exception handling
6498         * mini-mips.c: throw/rethrow should use jalr to call
6499         exception stubs.  Fixed bug with passing structures
6500         by value. More support for tracing floating point
6501         functions.
6502
6503 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6504
6505         * mini.c: fixed typo in the soft-float ldind.r4 handling
6506         (bug #80086).
6507
6508 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
6509
6510         * mini.c, mini.h, driver.c: added --runtime command line
6511         option to select a different runtime than the autodetected one.
6512         * jit.h: added API for embedders to initialize with a specific
6513         runtime version.
6514
6515 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
6516
6517         * mini.c: handle also boxing of r4 values (bug #80024).
6518
6519 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
6520
6521         * mini-ppc.c: force indirect calls until we reserve
6522         enough address space for all the generated code.
6523
6524 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
6525
6526         * exceptions-arm.c: workaround bugs in the libc definition
6527         of struct ucontext.
6528
6529 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
6530
6531         * inssel.brg: fixes from me and Mark Mason.
6532
6533 2006-11-23  Dick Porter  <dick@ximian.com>
6534
6535         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
6536         semaphore display now we've fixed the initial value
6537
6538 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6539
6540         * inssel.brg: partially revert the last change to fix the build.
6541
6542 2006-11-21  Mark Mason  <mason@broadcom.com>
6543
6544         * inssel.brg: Add and use compare-and-branch macros to support
6545         architectures that do not have condition code registers (ie. MIPS).
6546         * *-mips.{c,brg,md}: Fix copyright statements
6547
6548 2006-11-20  Mark Mason  <mason@broadcom.com>
6549
6550         * Makefile.am: remove mini-codegen.c from list of MIPS sources
6551         * mini.c: Allow GET_CONTEXT to be specified by the arch port
6552         * mini.h: Added declaration for mono_print_ins()
6553         * mini-codegen.c: added ins_spec initializer for MIPS
6554         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
6555         vreg to be virtual and hreg to be non-virtual.
6556         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
6557         is not yet working/implemented correctly.
6558         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
6559         non-static, fixup calls to print_ins() from other parts in the file.
6560
6561 2006-11-20  Mark Mason  <mason@broadcom.com>
6562
6563         * basic-calls.cs: added tests for passing structures as arguments
6564         to calls.
6565
6566 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
6567
6568         * inssel-long32.brg: optimize signed division by power of two.
6569
6570 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
6571
6572         * mini-arm.c: added support for interworking with thumb code
6573         (mono must be still be built using the ARM instruction encoding).
6574
6575 2006-11-19  Miguel de Icaza  <miguel@novell.com>
6576
6577         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
6578         verifier has different rules for it.   Fixes a few verifier issues
6579         in the test suite.
6580
6581         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
6582         at the end, so people know what happened.
6583
6584 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
6585
6586         * brach-opts.c: in optimize_exception_target() make sure we
6587         are in a catch clause (fixes bug #79871).
6588
6589 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6590
6591         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
6592         more soft-float support fixes.
6593
6594 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
6595
6596         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
6597         that are passed half on the stack and half in registers.
6598
6599 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
6600
6601         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
6602         more mips integration work from Mark E Mason 
6603         <mark.e.mason@broadcom.com>.
6604
6605 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
6606
6607         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
6608         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
6609         tramp-mips.c: added sources for the mips port, not
6610         integrated in the build yet. Contributed by
6611         Mark E Mason <mark.e.mason@broadcom.com>.
6612
6613 2006-11-14  Neale Ferguson <neale@sinenomine.net>
6614
6615         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
6616
6617 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6618
6619         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
6620         put the soft-float rules in its own file since it seems to
6621         break s390 compilation.
6622
6623 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
6624
6625         * mini-arm.c: fixed wrnings.
6626
6627 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
6628
6629         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
6630         inssel-arm.brg: ARM support for soft-float.
6631
6632 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
6633
6634         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
6635         loads and stores of 32 bit fp values.
6636
6637 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
6638
6639         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
6640
6641         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
6642         works. Fixes #79852 and #79463.
6643
6644 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6645
6646         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
6647         more soft-float support WIP and fixes.
6648
6649 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
6650
6651         * mini-arm.c: some VFP updates.
6652
6653 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
6654
6655         * mini-exceptions.c: 0 is a valid local var offset in some
6656         architectures, don't assert (bug #78508).
6657
6658 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
6659
6660         * exceptions-arm.c: fixed off by one error in stack walk code.
6661
6662 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
6663
6664         * mini.h, mini.c: more precise tracking of type load exceptions.
6665
6666 2006-11-03  Robert Jordan  <robertj@gmx.net>
6667
6668         * Makefile.am: [WIN32] Add monow.exe target.
6669         * driver.c: [WIN32] Don't detach the console when debugging.
6670         Fixes bug #79797.
6671         
6672 2006-10-30  Miguel de Icaza  <miguel@novell.com>
6673
6674         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
6675
6676 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
6677
6678         * aot-compiler.c (emit_method_info): Add a case missed earlier.
6679
6680         * driver.c (mini_regression): Fix --regression with AOT.
6681
6682         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
6683
6684 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
6685
6686         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
6687
6688         * mini-sparc.h: Don't use sigaction on sparc/linux.
6689
6690         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
6691
6692         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
6693
6694         * mini-exceptions.c: Add proper include files for getpid ().
6695
6696 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
6697
6698         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
6699         address instead of a MonoJitInfo* to avoid decoding the exception info for the
6700         method.
6701
6702         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
6703         name cache to reduce its size.
6704
6705         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
6706
6707 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
6708
6709         * mini-x86.c: Save/restore the current LMF structure more efficiently using
6710         the mono_lmf TLS variable.
6711
6712         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
6713         trampoline lmf frames.  
6714
6715         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
6716
6717 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
6718
6719         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
6720         the mono_lmf TLS variable.
6721
6722         * mini-exceptions.c: Access the LMF structure through accessors.
6723
6724         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
6725         variable instead of in jit_tls->lmf.
6726
6727         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
6728         
6729         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
6730         trampoline lmf frames.
6731
6732         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
6733
6734 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
6735
6736        * mini.c trace.c mini-x86.c: Revert these too.
6737         
6738        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
6739        signature change.
6740
6741 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
6742
6743         * genmdesc.c: removed now dead code.
6744
6745 2006-10-09  Robert Jordan <robertj@gmx.net>
6746
6747         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
6748
6749 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
6750
6751         * mini.h: do not leave gaps in the opcode values.
6752
6753 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
6754
6755         * jit-icalls.h: flag functions as internal here, too.
6756
6757 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
6758
6759         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
6760         functions with the internal attribute.
6761
6762 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
6763
6764         * aot-compiler.c: fclose the file descriptor in the profile read loop.
6765
6766 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
6767
6768         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
6769         for soft-float.
6770
6771 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
6772
6773         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
6774         tail calls as on other platforms.
6775
6776         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
6777
6778         * iltests.il: Add a few tailcall tests.
6779
6780 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
6781
6782         * driver.c: fix loop for old compilers (bug #79521).
6783
6784 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
6785
6786         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
6787
6788         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
6789
6790         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
6791         metadata without any code.
6792
6793         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
6794         more precise debugging information using gdb.
6795
6796 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
6797
6798         * inssel-ia64.brg: Make the helper methods static.
6799
6800 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
6801
6802         * inssel-x86.brg: make the helper methods static.
6803
6804 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
6805
6806         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
6807
6808 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
6809
6810         * mini.c: updates for monoburg changes.
6811         * inssel.brg: make a few helper functions static as they should.
6812
6813 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
6814
6815         * Makefile.am: Move mini-codegen.c to common_sources.
6816
6817 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
6818
6819         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
6820         instructions.
6821         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
6822         mini-ppc.h: port to use the common local register allocator.
6823
6824 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
6825
6826         * mini.h: Remove the comment too then.
6827
6828 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
6829
6830         * mini.h: put back backend.data which is to be used shortly and
6831         doesn't increase the size of MonoInst. If any 64 bit arch aligned
6832         pointers on 4 byte boundaries it'd have much bigger issues running
6833         and you can ifdef it out anyway.
6834
6835 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
6836
6837         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
6838         MonoInst size by 4 bytes on 64 bit machines.
6839
6840 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
6841
6842         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
6843         replacement with more meaningful field names. Arch maintainers, please
6844         check the assigned names are good enough for your arch.
6845
6846 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
6847
6848         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
6849         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
6850
6851 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
6852
6853         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
6854         relocations and memory requirements, put the optimization flags
6855         definitions in their own file.
6856
6857 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
6858
6859         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
6860
6861         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
6862
6863 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
6864
6865         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
6866
6867 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
6868
6869         * inssel.brg: use the correct function to get the size of an item
6870         in an array, given an element class.
6871         * aot-compiler.c: do not access class->class_size directly.
6872
6873 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
6874
6875         * mini.h, debug-mini.c: added a debugging function to print
6876         info about local variables and arguments in a jitted method.
6877
6878 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
6879
6880         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
6881
6882         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
6883
6884 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
6885
6886         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
6887         inner and outer loops when passing vtypes.
6888
6889 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
6890
6891         * mini-ppc.c: take into account the cpu errata for cache flushing
6892         which caused some random errors (bug #79381).
6893
6894 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
6895
6896         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
6897         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
6898
6899 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
6900
6901         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
6902         loaded.
6903
6904         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
6905         freebsd ports tree.
6906
6907         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
6908         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
6909
6910         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
6911         displacement.
6912
6913 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
6914
6915         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
6916
6917 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
6918
6919         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
6920         macro does not have to be changed during debugging.
6921
6922         * 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>.
6923
6924         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
6925
6926         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
6927         
6928         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
6929         MONO_ARCH_NO_EMULATE_MUL is defined.
6930
6931         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
6932
6933         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
6934
6935         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
6936
6937         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
6938         
6939 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
6940
6941         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
6942         stuff to mini-exceptions.c where it is used.
6943
6944         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
6945         setup code, the real one is in mini-exceptions.c.
6946
6947         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
6948         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
6949         some changes from the freebsd ports tree.
6950
6951         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
6952         constants.
6953         
6954         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
6955
6956 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
6957
6958         * mini.c: on Linux, check for /proc to be mounted
6959         (bug# 79351, novell bug#201204).
6960
6961 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
6962
6963         * mini.c: handle cases where pthread_attr_getstack() behaves
6964         incorrectly (bug #78096).
6965
6966 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
6967
6968         * mini-arm.c: support larger stack frames (bug #79272).
6969
6970 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
6971
6972         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
6973
6974         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
6975         tokens.
6976
6977         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
6978         mono_class_from_name () to find a class from its name.
6979
6980         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
6981
6982 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
6983
6984         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
6985
6986 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
6987
6988         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
6989
6990 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
6991
6992         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
6993         callinfo->trampoline.
6994
6995         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
6996         fixes #79271.
6997         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
6998         future.
6999
7000 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
7001
7002         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
7003
7004 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
7005
7006         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
7007         stats.method_trampolines, it is already done by the generic trampoline code.
7008
7009         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
7010         
7011 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
7012
7013         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
7014
7015         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
7016
7017         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
7018
7019         * mini.c (print_jit_stats): Print mscorlib mempool size too.
7020         
7021         * mini.c (print_jit_stats): Print new stats.
7022
7023         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
7024
7025 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
7026
7027         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
7028         Address on two dimensional arrays. Fixes #78729.
7029
7030         * mini.h (MonoCompile): Add a 'skip_visibility' field.
7031
7032         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
7033         a method.
7034
7035         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
7036
7037         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
7038         #79130.
7039         
7040         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
7041         a race condition.
7042         (mini_get_ldelema_ins): Ditto.
7043
7044 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
7045
7046         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
7047         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
7048         Fixes #79213.
7049
7050 2006-08-29 Neale Ferguson <neale@sinenomine.net>
7051
7052         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
7053         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
7054
7055         * exceptions-s390x.c: Cosmetic change.
7056
7057         * tramp-s390.c: Fix warning.
7058
7059         * cpu-s390.md: Correct length of mul_imm.
7060
7061 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
7062
7063         * aot-compiler.c: added binary writer with ELF backend
7064         implementation (only on Linux/x86 for now).
7065
7066 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
7067
7068         * Makefile.am: Don't run net 2.0 AOT tests.
7069
7070         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
7071         (mono_compile_assembly): Skip net 2.0 assemblies as well.
7072
7073         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
7074
7075 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
7076
7077         * aot-compiler.c: simplified and refactored the asm-writing code
7078         to allow different backends.
7079
7080 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
7081
7082         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
7083
7084         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
7085         little. Share patches of type TYPE_FROM_HANDLE as well.
7086
7087         * mini.c (mono_patch_info_equal): New helper function.
7088         (mono_patch_info_hash): Ditto.
7089
7090         * aot-compiler.c (emit_method_code): Fix s390 build.
7091
7092         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
7093         is not handled because it is stored as a flag and not as a type ctor. Fixes
7094         #79016.
7095
7096 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
7097
7098         * aot-compiler.c: Fix computation of GOT slot statistics.
7099         
7100         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
7101         Also remove support for not PIC AOT.
7102
7103         * mini.h: Bump AOT file format version.
7104
7105         * objects.cs: Add a test for #78990.
7106
7107         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
7108         (peter.dettman@iinet.net.au). Fixes #79087.
7109
7110         * basic-long.cs: Add a test for the above.
7111
7112 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
7113
7114         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
7115         
7116         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
7117         code somewhat.
7118
7119 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
7120
7121         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
7122         exceptions.
7123
7124 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
7125
7126         * mini.c: Don't verify COM proxy invoke calls
7127         
7128
7129 2006-08-10  Dick Porter  <dick@ximian.com>
7130
7131         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
7132         which process is holding semaphores locked.
7133
7134 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
7135
7136         * mini-ia64.c mini-amd64.c: Fix #79027.
7137
7138         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
7139
7140         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
7141
7142         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
7143         implicit arguments in a vararg call. Fixes #79027.
7144
7145 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
7146
7147         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
7148         (mono_get_array_new_va_signature): Ditto.
7149
7150 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
7151
7152         * aot-runtime.c: Call init_plt lazily.
7153
7154         * inssel-long.brg: Fix unsigned long->int conversion.
7155
7156         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
7157
7158         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
7159         that most data is now in the .rss/.data section.
7160
7161 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
7162
7163         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
7164
7165         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
7166
7167         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
7168
7169         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
7170
7171         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
7172         virtual call. Fixes #79010.
7173
7174         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
7175         and use the result as the this argument in the real call.
7176
7177         * generics.2.cs: Add a new test for #79010.
7178         
7179 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
7180
7181         * mini-x86.c: Fix a warning.
7182
7183         * aot-compiler.c: Add a bunch of statistics.
7184
7185         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
7186
7187 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
7188
7189         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
7190
7191 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
7192
7193         * 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>.
7194
7195 2006-07-13  Miguel de Icaza  <miguel@novell.com>
7196
7197         * mini.c (mono_method_to_ir): Obtain the original method in the
7198         CIL stream and use this to perform validation.
7199
7200         Fixed: #78816
7201
7202 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
7203
7204         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
7205         (mono_arch_call_opcode): Ditto.
7206
7207         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
7208         #78826.
7209
7210         * mini.c (mono_patch_info_dup_mp): New helper function.
7211         
7212         * aot-compiler.c (compile_method): Fix some of the memory allocated during
7213         compilation. Fixes #78827.
7214
7215 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
7216
7217         * declsec.c: Use original security informations for
7218           MONO_WRAPPER_MANAGED_TO_MANAGED.
7219
7220 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
7221
7222         * mini.c: Allow Com Interop methods/classes and
7223         don't verify COM wrapper calls
7224         
7225
7226 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
7227
7228         * inssel-long32.brg: Fix long->i4 checked conversion.
7229
7230         * exceptions.cs: Add a test for the above.
7231
7232 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
7233
7234         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
7235
7236         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
7237         leaks.
7238
7239         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
7240         #78775.
7241
7242 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
7243
7244         * mini.c: Fix solaris/x86 exception handling.
7245
7246         * Makefile.am: Get rid of $(ICU_LIBS).
7247
7248 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
7249
7250         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
7251         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
7252         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
7253
7254         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
7255
7256         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
7257         this function causes a SIGSEGV.
7258
7259 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
7260
7261         * mini.c: Remove unused solaris/x86 includes.
7262
7263 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
7264
7265         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
7266
7267 2006-06-20  Jb Evain  <jbevain@gmail.com>
7268
7269         * cpu-g4.md: fix max length of start_handler instruction.
7270
7271 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
7272         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
7273
7274 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
7275         * ssa.c: Fixed bug 78653 for SSA based deadce.
7276         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
7277         MonoInst.flags, used in SSA based deadce.
7278         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
7279         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
7280
7281 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
7282
7283         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
7284         it can end up using non executable memory on ppc64 systems
7285         running ppc32 userspace (fix from Johannes Berg).
7286
7287 2006-06-14  Dick Porter  <dick@ximian.com>
7288
7289         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
7290         4.1.1
7291
7292 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
7293         * mini.c: Made so that inline is locally disabled if it would
7294         trigger a .cctor, because too many apps depend on this behavior
7295         (which seems to be also the one of the MS CLR).
7296
7297 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
7298
7299         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
7300         No idea why this worked before.
7301
7302         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
7303         which branch to outer exception clauses since they could skip the
7304         inner finally clauses. Fixes #78633.
7305
7306         * exceptions.cs: Add a test for the above.
7307
7308         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
7309         Fixes #78629.
7310
7311         * iltests.il: Add a test for the above.
7312
7313 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
7314
7315         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
7316         after the end of a try bblock, to prevent asserts in mini_method_compile ().
7317
7318         * iltests.il: Add a test for the above.
7319
7320 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
7321
7322         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
7323         
7324         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
7325         methods as instrinsics.
7326
7327 2006-06-09  Wade Berrier <wberrier@novell.com>
7328
7329         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
7330         (simple-cee-ops.h ssapre-mini-ops.h)
7331
7332 2006-06-09  Neale Ferguson <neale@sinenomine.net>
7333
7334         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
7335         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
7336         instruction).
7337         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
7338         * cpu-s390x.md: Fix max. length values for a couple of instructions.
7339
7340 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
7341
7342         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
7343
7344 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
7345
7346         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
7347         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
7348         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
7349         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
7350         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
7351         of opcodes, so that bug 78549 should not happen again.
7352         * ssapre.c: Updated to use the renamed files.
7353
7354 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
7355
7356         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
7357         in OP_ATOMIC_EXCHANGE_I4.
7358
7359 2006-06-07  Wade Berrier <wberrier@novell.com>
7360
7361         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
7362         in mono_debugger_create_notification_function)
7363
7364 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
7365
7366         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
7367         
7368         * mini.c (type_from_stack_type): Disable some changes which do not
7369         seem to work.
7370
7371         * driver.c: Reenable opts.
7372
7373         * mini.h (MonoStackSlot): New structure to keep track of the verification state
7374         of the evaluation stack.
7375         
7376         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
7377         evaluation stack trace at entry to the bblock.
7378
7379         * mini.c (merge_stacks): New function to perform verification of stack merges.
7380         Turned off by default.
7381
7382         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
7383         STACK_MP.
7384         
7385 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
7386
7387         * local-propagation.c: Fixed bug 78549.
7388
7389 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
7390
7391         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
7392
7393 2006-06-02  Miguel de Icaza  <miguel@novell.com>
7394
7395         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
7396         tramp-arm.c, tramp-ia64.c
7397         (mono_debugger_create_notification_function): Update signature to
7398         new signature and use new protocol for creating the notification
7399         function.  
7400
7401         Should fix the build.
7402
7403 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
7404
7405         * exceptions-ppc.c (mono_jit_walk_stack)
7406         (ves_icall_get_frame_info): Fix the build
7407
7408 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
7409
7410         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
7411
7412 2006-05-31  Raja R Harinath  <rharinath@novell.com>
7413
7414         * il2tests.2.il: New file for generics CIL tests.  Add test for
7415         #78019.
7416         * Makefile.am: Update.
7417
7418         Fix #78019
7419         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
7420         to nullable types.
7421
7422 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
7423
7424         * aliasing.c: Fixed bug 78311.
7425
7426 2006-05-29  Martin Baulig  <martin@ximian.com>
7427
7428         * mini-exceptions.c (mono_find_jit_info): When computing the
7429         native offset, check whether we're actually inside the method's
7430         code; call mono_debug_print_stack_frame() to format the frame.
7431         (ves_icall_System_Exception_get_trace): Call
7432         mono_debug_print_stack_frame() to format the stack frame.
7433         (ves_icall_get_trace): Update to the new debugging API.
7434         (mono_jit_walk_stack_from_ctx): Likewise.
7435         (ves_icall_get_frame_info): Likewise.
7436
7437         * mini.c (get_method_from_ip): Use the new debugging API.
7438         (mono_print_method_from_ip): Likewise.
7439
7440         * exceptions-ppc.c
7441         (mono_jit_walk_stack): Use the new debugging API.
7442         (ves_icall_get_frame_info): Likewise.   
7443
7444 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
7445
7446         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
7447
7448 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
7449
7450         * mini.c: Added "limitator" to inline for debugging.
7451
7452 2006-05-24  Martin Baulig  <martin@ximian.com>
7453
7454         * debug-debugger.c (mono_debugger_init): Create a private,
7455         malloc()-based code manager for the notification function and
7456         intentionally leak it on exit.  This fixes the crash-on-exit race
7457         condition.
7458
7459         * tramp-amd64.c
7460         (mono_debugger_create_notification_function): Added
7461         `MonoCodeManager *' argument.
7462
7463         * tramp-x86.c
7464         (mono_debugger_create_notification_function): Added
7465         `MonoCodeManager *' argument.
7466
7467 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
7468
7469         * aliasing.c: Fixed 64 bit issue.
7470         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
7471         default since all known bugs are fixed (one more time!).
7472
7473 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
7474
7475         * mini.c: write barrier support.
7476
7477 2006-05-23  Martin Baulig  <martin@ximian.com>
7478
7479         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
7480         check at the top of the file.
7481
7482 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
7483
7484         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
7485         reverting changes without reason and without changelog entries.
7486
7487 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
7488
7489         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
7490         to a few opcodes. Fixes #78439.
7491
7492         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
7493         consistency with other archs.
7494
7495         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
7496
7497 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
7498
7499         * debug-debugger.c: fix the build.
7500
7501 2006-05-17  Martin Baulig  <martin@ximian.com>
7502
7503         * debug-debugger.c
7504         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
7505         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
7506         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
7507         (debugger_attach): Call GC_mono_debugger_add_all_threads().
7508
7509 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
7510
7511         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
7512
7513 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
7514
7515         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
7516         MONO_TYPE_GENERICINST.
7517         
7518         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
7519         MONO_TYPE_GENERICINST.
7520
7521 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
7522
7523         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
7524         #78325.
7525
7526 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
7527
7528         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
7529         mempool.
7530         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
7531
7532 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
7533
7534         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
7535         mono_trace_cleanup ().
7536
7537         * iltests.il: Fix problem with the newly added test.
7538
7539         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
7540         due to register constraints, free up the previous hreg. Fixes #78314.
7541
7542         * iltests.il: Add new test for #78314.  
7543
7544         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
7545         Interlocked.Add. Fixes #78312.
7546
7547         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
7548         
7549 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
7550
7551         * inssel.brg (mini_emit_virtual_call): Fix a warning.
7552
7553 2006-05-05  Martin Baulig  <martin@ximian.com>
7554
7555         * debug-mini.c (mono_debug_open_block): New method.
7556
7557         * mini-amd64.c
7558         (mono_arch_output_basic_block): Call mono_debug_open_block() at
7559         the beginning of each basic block.
7560
7561         * mini-x86.c
7562         (mono_arch_output_basic_block): Call mono_debug_open_block() at
7563         the beginning of each basic block.
7564
7565 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
7566
7567         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
7568         default until I understand why they break the build on amd64.
7569
7570 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
7571
7572         * mini.c (mini_cleanup): Call mono_cleanup ().
7573
7574         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
7575         errors.
7576
7577 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
7578
7579         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
7580         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
7581         default since all known bugs are fixed, and I cannot reproduce bug
7582         77944... I'm asking Matt Hargett to test again after this commit.
7583
7584 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
7585
7586         * mini-codegen.c: Fixed typo that thrashed inline.
7587
7588 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
7589
7590         * dominators.c (compute_dominators): Avoid using a worklist since
7591         it is not correct in some cases. Instead, iterate over all bblocks as
7592         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
7593
7594 2006-04-28  Miguel de Icaza  <miguel@novell.com>
7595
7596         * mini.c (mono_jit_compile_method_inner): Use
7597         mono_prepare_exception_from_error that resets the value
7598         internally.
7599
7600 2006-04-27  Miguel de Icaza  <miguel@novell.com>
7601
7602         * mini.c: Move the mini_loader_error_to_exception to metadata. 
7603         
7604 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
7605
7606         * aliasing.c: Fixed bug 78210.
7607
7608 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
7609
7610         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
7611         default until all their problems (or the ones they trigger) are fixed.
7612
7613 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
7614
7615         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
7616         
7617         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
7618         as loaded only after resolving patches since that could invoke the same method.
7619
7620         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
7621
7622         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
7623         functions.
7624
7625         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
7626         AOT loader.
7627
7628         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
7629         stack.
7630
7631         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
7632         made from AOT code through the PLT table.
7633
7634         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
7635         holding the plt offset when a call is made to the aot plt trampoline.
7636         
7637 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
7638
7639         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
7640         amd64 AOT support.
7641
7642         * Makefile.am (common_sources): Fix build breakage.
7643
7644         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
7645         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
7646         intra-assembly calls if possible.
7647         
7648         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
7649
7650         * mini-trampolines.c: Handle PLT entries.
7651
7652         * mini.c: Avoid creating a GOT var for calls.
7653
7654         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
7655         from mscorlib code.
7656
7657         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
7658         from mscorlib code.
7659
7660         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
7661         AOT code.       
7662
7663         * mini.h: Bump AOT file format version.
7664         
7665         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
7666         covers more cases.
7667
7668 2006-04-25  Martin Baulig  <martin@ximian.com>
7669
7670         * driver.c: Disable copyprop, consprop and inline when running
7671         inside the debugger.
7672
7673 2006-04-25  Martin Baulig  <martin@ximian.com>
7674
7675         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
7676         with `get_current_thread' and added `detach'.
7677         (MonoDebuggerMetadataInfo): Added `thread_size',
7678         `thread_tid_offset', `thread_stack_ptr_offset' and
7679         `thread_end_stack_offset'.
7680
7681 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
7682
7683         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
7684         aot-runtime.c.
7685
7686         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
7687         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
7688
7689         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
7690
7691         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
7692
7693         * aot.c: Add support for ADJUSTED_IID.  
7694
7695 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
7696
7697         * aot.c (emit_method_order): Don't align method_order_end.
7698
7699         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
7700         the interface ID changes.
7701
7702 2006-04-21  Dick Porter  <dick@ximian.com>
7703
7704         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
7705         cleaning up a thread.  Fixes the new part of bug 77470.
7706
7707 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
7708
7709         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
7710         to managed wrapper.
7711                      
7712 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
7713
7714         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
7715         
7716         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
7717         SIGSEGV. Fixes #78072.
7718
7719         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
7720         unregister our SIGABRT handler.
7721
7722 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
7723
7724         * mini.c: Disabled inline where it can alter the call stack in a
7725         way visible from managed code.
7726         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
7727         default.
7728
7729 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
7730
7731         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
7732         on other platforms. Fixes #78089.
7733
7734 2006-04-13  Martin Baulig  <martin@ximian.com>
7735
7736         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
7737         determine whether we're inside the debugger.
7738
7739         * debug-debugger.h
7740         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
7741
7742 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
7743
7744         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
7745         handler clauses. Fixes #78024.
7746
7747         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
7748         in the CALL_MEMBASE opcodes. Fixes #78088.
7749         (mono_arch_get_vcall_slot_addr): Ditto.
7750
7751 2006-04-10  Martin Baulig  <martin@ximian.com>
7752
7753         * debug-debugger.c: The thread handling code has now been moved
7754         into ../metadata/threads.c.
7755
7756 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
7757
7758         * driver.c (mono_main): Fix --with-gc=none build.
7759
7760         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
7761         (mono_spillvar_offset_float): Ditto.
7762         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
7763         hreg, not when its !global, since on ia64, there is a third category: stacked
7764         registers.      
7765
7766 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
7767
7768         * mini.c: set MonoInst->klass for load field address and a few other
7769         places.
7770
7771 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
7772
7773         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
7774
7775 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
7776
7777         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
7778         the branch opt changes.
7779
7780 2006-04-06  Dick Porter  <dick@ximian.com>
7781
7782         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
7783         
7784         * wapihandles.c (mini_wapi_seminfo): 
7785         * driver.c (mono_main): Add semaphore info option
7786
7787 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
7788
7789         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
7790         branch optimization changes. Fixes #78009.
7791
7792 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
7793
7794         * mini.c: ignore accessibility of methods in managed->native wrappers.
7795
7796 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
7797
7798         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
7799         
7800         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
7801
7802 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
7803
7804         * mini.c: Modify the branch optimizations to preserve the invariant that
7805         the entries inside the in_bb and out_bb arrays are unique.
7806         (mono_unlink_bblock): Avoid creation of new arrays.
7807
7808 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
7809
7810         * mini.c (mono_unlink_bblock): Fix regression caused by previous
7811         change (#77992).
7812
7813 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
7814
7815         * mini.c (optimize_branches): Remove the "optimizations" in
7816         the cbranch1/cbranch2 -> branch cases which were causing several
7817         problems in the past. Fixes #77986.
7818
7819 2006-03-31  Chris Toshok  <toshok@ximian.com>
7820
7821         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
7822         default optimizations :(
7823
7824 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
7825
7826         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
7827         branch.
7828
7829 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
7830
7831         * local-propagation.c: Added comments to structs and removed
7832         "Mono" prefixes from local tree mover types.
7833
7834 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
7835
7836         * Makefile.am (arch_sources): Define this for each architecture so 
7837         libmono_la_SOURCES is defined in one place.
7838
7839 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
7840
7841         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
7842         from handles/.
7843
7844 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
7845
7846         * driver.c: print the GC name supplied by configure.
7847
7848 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
7849
7850         * local-propagation.c: Added tree mover, and moved here all the
7851         local propagation code from mini.c
7852         * mini.c: Added support for treeprop, and moved all the local
7853         propagation code to local-propagation.c
7854         * mini.h: Added support for treeprop
7855         * driver.c: Added support for treeprop, enabled consprop, copyprop,
7856         treeprop, inline and deadce by default
7857         * Makefile.am: Added local-propagation.c
7858
7859 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
7860
7861         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
7862
7863 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
7864
7865         * debug-debugger.c: make it compile without the Boehm GC.
7866
7867 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
7868
7869         * mini.c: fixed issue with mismatch when an icall is registered
7870         with multiple names but same address.
7871
7872 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
7873
7874         * declsec.c, mini-exceptions.c: use write barrier to set reference
7875         fields of managed objects.
7876
7877 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
7878
7879         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
7880         (can_access_internals): Fix a warning.
7881
7882         * mini.c (print_method_from_ip): Rename this to 
7883         mono_print_method_from_ip so it gets exported.
7884
7885         * trace.c: Deal with strings inside StringBuilder's containing garbage
7886         and fix memory leaks. Fixes #77848.
7887
7888 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
7889
7890         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
7891         fixes #77787.
7892
7893 2006-03-16 Neale Ferguson <neale@sinenomine.net>
7894         
7895         * mini-s390.c: Remove OP_X86_TEST_NULL.
7896
7897 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
7898
7899         * mini.c: use the correct GetHashCode() for the moving collector.
7900
7901 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
7902
7903         * liveness.c: Regalloc spill cost tuning.
7904
7905 2006-03-15 Neale Ferguson <neale@sinenomine.net>
7906         
7907         * mini-s390x.h: Correct S390_LONG macro.
7908
7909         * mini-s390x.c: Cleanup unused code.
7910
7911 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
7912
7913         * jit-icalls.h: New file.
7914
7915         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
7916         icalls and include that instead of including jit-icalls.c.
7917
7918         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
7919         OP_X86 opcodes.
7920
7921 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
7922
7923         * mini.c: when checking for member accessibility, also check for
7924         friend assemblies and for explicit interface implementations.
7925
7926 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
7927
7928         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
7929
7930         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
7931
7932         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
7933         common cases are done first.    
7934
7935         * mini-ops.h: Only define platform specific opcodes on the given platform.
7936
7937         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
7938         branch.
7939         
7940 2006-03-14  Martin Baulig  <martin@ximian.com>
7941
7942         Revert Paolo's change from r57348:
7943
7944         * mini.h: don't use gboolean for bitfields.
7945         * mini.c: verifier changes for fields and methods accessibility.
7946
7947 2006-03-13  Neale Ferguson <neale@sinenomine.net>
7948
7949         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
7950
7951         * mini-s390x.c: Fix conv_r_un.
7952
7953         * cpu-s390, cpu-s390x.md: Fix lengths.
7954
7955 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
7956
7957         * mini.c: nested types have access to all the nesting
7958         levels, not just the enclosing types.
7959
7960 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
7961
7962         * mini.c: added a few more verification checks.
7963
7964 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
7965
7966         * liveness.c: Merge optimizations from the linear-il branch.
7967
7968 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
7969
7970         * mini-ia64.c (emit_call): Add a comment.
7971
7972         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
7973
7974         * tramp-ia64.c: Fix some warnings.
7975
7976 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
7977
7978         * mini.h: don't use gboolean for bitfields.
7979         * mini.c: verifier changes for fields and methods accessibility.
7980
7981 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
7982
7983         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
7984         lazy icall wrapper changes.
7985
7986         * dominators.c: Replace all the dominator algorithms with faster
7987         ones from the linear-il branch.
7988
7989         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
7990         the mempool.
7991
7992         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
7993         common cases are done first.
7994
7995         * mini-amd64.c: Fix some warnings.
7996
7997         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
7998         from the mempool.
7999
8000         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
8001         added code.
8002
8003         * mini.h: Add a missing prototype.
8004
8005 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
8006
8007         * mini.c: Compile icall wrappers lazily.
8008
8009         * mini-codegen.c: Use printf instead of g_print since its much faster.
8010
8011         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
8012         function.
8013
8014         * mini.c (optimize_branches): Cache the negative result from 
8015         remove_block_if_useless ().
8016
8017         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
8018         Also fix some bblock linking issues.
8019
8020         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
8021         assembly files.
8022
8023         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
8024
8025         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
8026         accessed fields first, for better cache behavior.
8027         
8028 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
8029
8030         * mini.c: speedup IList<T> array accesses.
8031
8032 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
8033
8034         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
8035         inline_costs counter. Fixes #77190.
8036
8037 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
8038
8039         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
8040         trace messages. Fixes #77706.
8041
8042 2006-03-04  Martin Baulig  <martin@ximian.com>
8043
8044         * tramp-amd64.c, tramp-x86.c
8045         (mono_debugger_create_notification_function): Use
8046         mono_global_codeman_reserve() to allocate a buffer at runtime and
8047         return it.
8048
8049         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
8050
8051         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
8052         notification function at runtime and then call `initialize' in the
8053         `MONO_DEBUGGER__debugger_info' vtable.
8054
8055 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
8056
8057         * iltests.il: Fix a visibility problem.
8058
8059 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
8060
8061         * driver.c, mini.c: add hooks for the counters API.
8062
8063 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
8064
8065         * driver.c: show disabled options.
8066
8067 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
8068
8069         * linear-scan.c: always use cost-driven selection.
8070
8071 2006-02-28  Raja R Harinath  <rharinath@novell.com>
8072
8073         * jit-icalls.c (helper_compile_generic_method): Revert change from
8074         2006-02-24.
8075
8076 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
8077
8078         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
8079
8080 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
8081
8082         * inssel.brg: style fixes, mostly to force the updated monoburg
8083         to run for people using svn.
8084
8085 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
8086
8087         * mini.c: match monoburg changes.
8088
8089 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
8090
8091         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
8092         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
8093         declaration in the header file.
8094
8095 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
8096
8097         * helpers.c: reduce relocations and mem usage.
8098
8099 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
8100
8101         * mini.h, mini-codegen.c: disable logging features if
8102         requested by configure.
8103
8104 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
8105
8106         * mini.c: tiny verifier changes.
8107
8108 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
8109
8110         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
8111         cpu-pentium.md: stack alignment changes for osx/x86,
8112         partially from Geoff Norton <gnorton@customerdna.com>.
8113
8114 2006-02-24  Raja R Harinath  <harinath@gmail.com>
8115
8116         * jit-icalls.c (helper_compile_generic_method): Update to changes
8117         in metadata/class.c.
8118
8119 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
8120         
8121         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
8122         
8123         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
8124         interface calls with large offsets.
8125
8126 2006-02-23  Raja R Harinath  <rharinath@novell.com>
8127
8128         * jit-icalls.c (helper_compile_generic_method): Document the
8129         special-case we depend on so that we can inflate the method twice
8130         with the same context with no bad side-effects.
8131
8132 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
8133
8134         * mini-x86.c, mini-amd64.c: fix for case when xen support
8135         is disabled.
8136
8137 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
8138
8139         * mini-x86.c, mini-amd64.c: generate code to access tls items
8140         in a faster way for Xen systems.
8141
8142 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
8143
8144         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
8145         updates and compilation fixes for the OSX/x86 port, mostly from
8146         Geoff Norton <gnorton@customerdna.com>.
8147
8148 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
8149
8150         * inssel.brg: faster interface call implementation
8151         to sync with the interface_offsets MonoVTable changes.
8152
8153 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
8154
8155         * mini.c: more verification checks.
8156
8157 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
8158
8159         * mini.c: added a few more verification checks.
8160
8161 2006-02-17      Neale Ferguson <neale@sinenomine.net>
8162
8163         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
8164         facility on the processor and use it if available.
8165
8166 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
8167
8168         * driver.c, aot.c, mini.c: throw exception if the IL code is
8169         invalid or unverifiable.
8170
8171 2006-02-17  Raja R Harinath  <rharinath@novell.com>
8172
8173         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
8174         m.StructField.
8175
8176 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
8177
8178         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
8179
8180 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8181
8182         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
8183         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
8184         handling of instantiated generic valuetypes.
8185
8186 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
8187
8188         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
8189         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
8190         instead.
8191
8192         * generics.2.cs: Revert the nullable reftypes tests.
8193
8194 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
8195
8196         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
8197         using __builtin_frame_address (1) as it doesn't work in the presence
8198         of optimizations. Hopefully fixes #77273.
8199
8200         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
8201         -> generics.cs change as it doesn't work with some automake versions.
8202
8203 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
8204
8205         * mini.c: handle systems that sue a different way to
8206         retrieve the stack address of the current thread.
8207
8208 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
8209
8210         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
8211         it specially in the makefile.
8212
8213         * generics.2.cs: Add tests for nullable reference types.
8214
8215 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8216
8217         * mini.c: always handle the case when mono_jit_init()
8218         is called in a thread different from the main thread,
8219         confusing libgc (bug #77309).
8220
8221 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
8222
8223         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
8224
8225 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
8226
8227         * mini.c: change optimize_branches () to use a single loop
8228         and introduce a new optimization to simplify some range checks.
8229
8230 2006-02-03  Martin Baulig  <martin@ximian.com>
8231
8232         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
8233         and merged with debugger_thread_manager_add_thread().
8234         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
8235         inform the debugger about the main thread.
8236
8237 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
8238
8239         * basic.cs: Add test for div.un/rem.un constant folding.
8240
8241 2006-02-03  Neale Ferguson <neale@sinenomine.net>
8242
8243         * cpu-s390x.md: correct int_xor_imm length
8244
8245 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
8246
8247         * generics.2.cs: New test for #77442.
8248
8249         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
8250         #77442.
8251
8252 2006-02-02  Martin Baulig  <martin@ximian.com>
8253
8254         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
8255         <mono/metadata/mono-debug-debugger.h>   
8256
8257         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
8258
8259 2006-02-02  Martin Baulig  <martin@ximian.com>
8260
8261         * debug-debugger.h: New header file for debug-debugger.c.
8262
8263         * debug-debugger.c: Big API cleanup; don't run the managed Main()
8264         function is a separate thread anymore; add support for attaching.
8265
8266 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
8267
8268         * tramp-x86.c: Fix a warning.
8269
8270 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
8271
8272         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
8273         on very large methods.
8274
8275         * aot.c (load_patch_info): Fix a warning.
8276
8277 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
8278
8279         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
8280         mini-ops.h: alu membase optimizations.
8281
8282 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
8283
8284         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
8285         to speedup StringBuilder.
8286
8287 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
8288
8289         * dominators.c (mono_compute_natural_loops): Fix detection of
8290         loop body start blocks.
8291
8292         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
8293
8294 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
8295
8296         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
8297         #75145.
8298
8299 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
8300
8301         * aliasing.c: Fixed aliasing issue on 64 bit archs.
8302
8303 2006-01-25  Martin Baulig  <martin@ximian.com>
8304
8305         * debug-debugger.c: Moved the `MonoDebuggerManager' and
8306         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
8307         started to cleanup this file a little bit.
8308
8309 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
8310
8311         * mini.c: optimize a codepath frequently happening in generics code.
8312
8313 2006-01-23  Martin Baulig  <martin@ximian.com>
8314
8315         * Makefile.am: Only compile debug-debugger.c on supported platforms.
8316
8317         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
8318         functions directly.
8319
8320         * driver.c: debug-debugger.c is only available if
8321         `MONO_DEBUGGER_SUPPORTED' is defined.   
8322
8323 2006-01-23  Martin Baulig  <martin@ximian.com>
8324
8325         * debug-debugger.c: Only enable this on platforms where the Mono
8326         Debugger is working (x86 and x86_64).
8327
8328 2006-01-21  Martin Baulig  <martin@ximian.com>
8329
8330         The Mono Debugger is now using the normal `mono' instead of the
8331         `mono-debugger-mini-wrapper' when executing managed code.
8332
8333         * debug-debugger.c: New file; previously known as
8334         debugger/wrapper/wrapper.c.
8335
8336         * debug-mini.c (mono_init_debugger): Removed.
8337
8338         * driver.c (mono_main): Added new `--inside-mdb' command line
8339         argument which is used when running inside the debugger.
8340
8341 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
8342
8343         * liveness.c (mono_analyze_liveness): Remove some unused data
8344         structures.
8345
8346 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
8347
8348         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
8349
8350 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
8351
8352         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
8353         depends on implementation details of monobitset.
8354
8355         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
8356         Fixes #77271.
8357
8358 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
8359
8360         * liveness.c: Update after monobitset changes.
8361
8362 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
8363
8364         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
8365
8366 2006-01-11 Neale Ferguson <neale@sinenomine.net>
8367
8368         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
8369
8370         * mini-s390x.c: Remove warning messages.
8371
8372 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
8373
8374         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
8375
8376 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
8377
8378         * generics.2.cs: Add ldelem/stelem_any test.
8379
8380 2006-01-10 Neale Ferguson <neale@sinenomine.net>
8381
8382         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
8383
8384 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
8385
8386         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
8387         
8388 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
8389
8390         * generics.2.cs: Reenable vtype tests.
8391
8392         * inssel-x86.brg: Remove an icorrect valuetype rule.
8393
8394 2006-01-06 Neale Ferguson <neale@sinenomine.net>
8395
8396         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
8397         initial support for OP_ABS.
8398
8399 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8400
8401         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
8402
8403 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8404
8405         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
8406         conversion and implement LADD/LSUB.
8407
8408         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
8409         architectures.
8410
8411 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8412
8413         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
8414
8415         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
8416         architectures.
8417
8418 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8419
8420         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
8421         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
8422         (stack walk problem).
8423
8424 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
8425
8426         * aot.c (mono_aot_load_method): Fix a warning.
8427
8428 2006-01-03  Neale Ferguson <neale@sinenomine.net>
8429
8430         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
8431
8432 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
8433
8434         * iltests.il: Add test for #77148.
8435
8436         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
8437         #77148.
8438
8439 2006-01-03  Neale Ferguson <neale@sinenomine.net>
8440
8441         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
8442
8443 2006-01-03  Neale Ferguson <neale@sinenomine.net>
8444
8445         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
8446         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
8447
8448         * basic-long.cs: Add lconv-to-r4/r8 tests.
8449
8450 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
8451
8452         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
8453
8454         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
8455         here as on other archs.
8456
8457 2005-12-29 Neale Ferguson <neale@sinenomine.net>
8458
8459         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
8460
8461 2005-12-29 Neale Ferguson <neale@sinenomine.net>
8462
8463         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
8464         
8465         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
8466
8467         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
8468         instrument_prolog; Add memory_barrier instruction.
8469
8470 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
8471
8472         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
8473
8474 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
8475
8476         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
8477
8478         * aliasing.c inssel.brg: Fix warnings.
8479
8480         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
8481         could skip initialization of some parts of memory.
8482
8483         * mini.c mini-ia64.c: Fix warnings.
8484
8485         * inssel-sparc.brg: Add an implementation of lneg which actually works.
8486
8487 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
8488
8489         * aliasing.c (mono_build_aliasing_information): Add a workaround for
8490         a crash seen on sparc.
8491
8492         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
8493         
8494         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
8495
8496 2005-12-21 Neale Ferguson <neale@sinenomine.net>
8497
8498         * mini-ops.h: Add s390_backchain instruction
8499
8500         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
8501
8502         * cpu-s390.md: Add s390_backchain instruction
8503
8504         * mini-s390.c: Significant ABI changes
8505
8506         * mini-s390.h: Cater for zero length structures
8507
8508 2005-12-20 Neale Ferguson <neale@sinenomine.net>
8509
8510         * mini-s390.c: ABI fixes
8511
8512         * inssel-s390.brg: Remove debug statements
8513
8514         * cpu-s390.md: Fix length of ATOMIC_xx operations
8515
8516 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
8517
8518         * basic-float.cs: Add float<->long conversion tests.
8519
8520 2005-12-16 Neale Ferguson <neale@sinenomine.net>
8521
8522         * mini-s390.c: Fix LOCALLOC processing.
8523
8524         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
8525
8526 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
8527
8528         * iltests.il: Add tests for some opcodes not covered by the other
8529         tests.
8530
8531 2005-12-15 Neale Ferguson <neale@sinenomine.net>
8532
8533         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
8534         register loading for Tail processing; Correct trace output.
8535
8536         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
8537
8538         * cpu-s390.md: Correct size of jmp instruction. 
8539
8540 2005-12-13 Neale Ferguson <neale@sinenomine.net>
8541
8542         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
8543
8544 2005-12-13 Neale Ferguson <neale@sinenomine.net>
8545
8546         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
8547           Bring s390 up to current level.
8548
8549 2005-12-12  Zltan Varga  <vargaz@gmail.com>
8550
8551         * generics.2.cs: Disable the newly added tests as they do not work yet.
8552         
8553         * generics.2.cs: Add valuetype tests.
8554
8555 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
8556
8557         * basic-long.cs: Add i4->u8 test.
8558
8559         * objects.cs: Add tests for JIT intrinsic.
8560
8561         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
8562         optimizations lost by a mistake.
8563
8564 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
8565
8566         * basic-long.cs: Remove a test moved to objects.cs.
8567
8568         * arrays.cs: Add more array tests.
8569
8570 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
8571
8572         * arrays.cs: Add new tests for multi-dimensional arrays.
8573
8574 2005-12-06  Raja R Harinath  <rharinath@novell.com>
8575
8576         * Makefile.am (test_sources2): Add generics.2.cs.
8577         (EXTRA_DIST): Add test_sources2.
8578
8579 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
8580
8581         Support for boxing and unboxing nullable types as well as the
8582         isinst operation on nullables, per the CLI ammendment.
8583
8584         * inssel.brg (CEE_ISINST): Special case for nullable
8585
8586         * mini.c (handle_unbox_nullable): new method
8587         (handle_box): Special case for nullable types
8588         (mono_method_to_ir): Call handle_unbox_nullable in correct
8589         places.
8590
8591         * generics.2.cs: New test suite
8592
8593         * Makefile.am: Support for regression tests with generics.
8594
8595 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
8596
8597         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
8598         allocated to registers. Fixes #76800.
8599
8600 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
8601
8602         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
8603
8604 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
8605
8606         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
8607         of platforms.
8608
8609 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
8610
8611         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
8612         objects.cs.
8613
8614         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
8615         
8616         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
8617 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
8618
8619         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
8620         single precision before storing to a single precision location.
8621
8622 2005-11-28  Raja R Harinath  <rharinath@novell.com>
8623
8624         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
8625
8626 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
8627
8628         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
8629         correct files.
8630
8631         * basic.cs: Remove test_0_byte_compares test which was moved to
8632         objects.cs a long time ago.
8633
8634 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
8635
8636         * aliasing.c: Fixed aliasing issue on 64 bit archs.
8637
8638 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
8639
8640         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
8641         handlers are called.
8642
8643         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
8644         throwing code.
8645
8646          * mini-ia64.c: Add support for the throw->branch exception 
8647         optimization.   
8648
8649         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
8650
8651 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
8652
8653         * mini.c: Enabled "fastpath" deadce :-)
8654         
8655 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
8656
8657         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
8658         alias analysis pass to support it.
8659         * mini.h: Likewise.
8660         * ssa.c: Likewise.
8661         * liveness.c: Likewise (liveness computation can use aliasing
8662         information to be more accurate).
8663         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
8664         moreover made so that "--compile-all" uses the given optimization
8665         flags and not the default ones.
8666         * aliasing.c: Alias analysis (new file).
8667         * aliasing.h: Likewise.
8668         * Makefile.am: added "aliasing.c" and "aliasing.h".
8669         
8670 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
8671
8672         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
8673         OP_L opcodes.
8674
8675 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
8676
8677         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
8678         fp >= end_of_stack exit condition, as it is not needed, and it might
8679         become true for fp eliminated frames.
8680
8681 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
8682
8683         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
8684         coded offsets.
8685
8686 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
8687
8688         * mini-arm.c: fixed alignment of doubles/longs to match
8689         the C ABI (bug #76635).
8690
8691 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
8692
8693         * aot.c: fix compilation with --enable-minimal=aot.
8694
8695 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
8696
8697         * mini-arm.c: fixed compatibility with the new
8698         floating point emulator package for compares.
8699
8700 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
8701
8702         * mini.c : reverted sig->pinvoke changes (r51396-51397).
8703
8704 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
8705
8706         * mini-exceptions.c (print_stack_frame): Output to stderr.
8707         (mono_handle_native_sigsegv): Ditto.
8708
8709 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
8710
8711         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
8712         OP_LCONV_TO_OVF_I implementation.
8713
8714         * mini-amd64.c: Add support for the throw->branch exception 
8715         optimization.
8716
8717         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
8718         when the catch clause catches a more general exception, i.e. Object.
8719
8720 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
8721
8722         * cpu-ia64.md: Remove unused opcodes.
8723
8724         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
8725         specific defines for architectures defining USE_SIGACTION.
8726
8727         * mini-ia64.c: Fix some warnings.
8728
8729         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
8730         version seemed to skip a frame.
8731
8732 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
8733
8734         * mini.c: Clean up the usage of sig->pinvoke flag. Now
8735         only calls which are made to native code use this flag.
8736
8737 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
8738
8739         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
8740         varargs methods as well.
8741         
8742         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
8743         which have save_lmf set. Reorganize methods prologs a bit.
8744
8745         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
8746         debugger to the proper place.
8747
8748 2005-10-29  Martin Baulig  <martin@ximian.com>
8749
8750         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
8751         when running inside the debugger until the debugger has support
8752         for it.
8753
8754 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
8755
8756         * mini.h: Fix a warning.
8757
8758 2005-10-24  Miguel de Icaza  <miguel@novell.com>
8759
8760         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
8761         we expose publicly, this returns the string.
8762
8763 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
8764
8765         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
8766         with fp elimination.
8767
8768 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
8769
8770         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
8771         native stacktrace using the glibc 'backtrace' function if available.
8772
8773 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
8774
8775         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
8776
8777         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
8778         handle SIGSEGVs received while in native code.
8779
8780         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
8781         code, call mono_handle_native_sigsegv which will abort the runtime
8782         after printing some diagnostics, instead of converting it into a
8783         confusing NullReferenceException.
8784
8785 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
8786
8787         * cpu-pentium.md: Remove unused opcodes.
8788
8789 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
8790
8791         * mini-amd64.h (MonoLMF): Add rsp field.
8792
8793         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
8794         the lmf too.
8795
8796 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
8797
8798         * mini-codegen.c (get_register_spilling): Fix some warnings.
8799
8800 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
8801
8802         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
8803         elimination during exception handling. Enable fp elimination by
8804         default.
8805
8806         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
8807         elimination.
8808
8809 2005-10-16  Martin Baulig  <martin@ximian.com>
8810
8811         * mini-exceptions.c
8812         (mono_debugger_run_finally): New public method for the debugger.
8813
8814 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
8815
8816         * debug-mini.c (mono_debug_init_method): Fix warning.
8817
8818         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
8819         the 'exname' parameter const to fix some warnings.
8820
8821 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
8822
8823         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
8824         introduced by the previous patch.
8825
8826 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
8827
8828         * basic-float.cs: Add test for precision of float arithmetic.
8829
8830         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
8831         when loading/storing single values from/to memory.
8832
8833         * mini.c (mono_jit_compile_method_with_opt): Create the function
8834         pointers in the correct domain.
8835
8836 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
8837
8838         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
8839         introduced by previous patch.
8840         
8841         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
8842         when out_filter_idx is NULL.
8843
8844         * mini-exceptions.c: Don't run filter clauses twice during exception
8845         handling. Fixes #75755.
8846
8847 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
8848
8849         * aot.c: Add support for ldflda wrappers.
8850
8851         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
8852         #75902.
8853
8854 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
8855
8856         * mini.c, mini.h: do not consider exception handlers blocks when
8857         setting up interface variables.
8858
8859 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
8860
8861         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
8862
8863 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
8864
8865         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
8866         causes a regression.
8867
8868         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
8869
8870 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
8871
8872         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
8873         of the OP_P definitions.
8874
8875         * TODO: Add a proposal for dealing with the CEE/OP mess.
8876
8877         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
8878         optimizations from the x86 port.
8879
8880         * cpu-amd64.md: Ditto.
8881
8882         * basic.cs basic-long.cs: Add tests.
8883
8884 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
8885
8886         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
8887         Patrik Torstensson's implementation of my exception-handling
8888         optimization idea, when the exception object is not used
8889         (bug #62150).
8890
8891 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
8892
8893         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
8894         of the mul_imm optimizations from the old jit.
8895
8896 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
8897
8898         * mini.c, liveness.c: patch by Patrik Torstensson and
8899         Zoltan Varga to improve performance in methods with
8900         exception clauses.
8901
8902 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
8903
8904         * driver.c: Remove 'Globalization' entry from --version.
8905
8906 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
8907
8908         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
8909         there is a profiler interested in JIT events.
8910
8911         * aot.c: Load profile files produced by the AOT profiling module, and
8912         reorder methods based on the profiling info. Add a 'method_order' table
8913         to the AOT file to make mono_aot_find_jit_info work with the reordered
8914         methods.
8915
8916         * mini.h: Bump AOT file version info.
8917
8918 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
8919
8920         * mini-arm.h: work around what looks like a gcc bug when optimizations
8921         are enabled.
8922
8923 2005-09-28  Raja R Harinath  <rharinath@novell.com>
8924
8925         * Makefile.am (AM_CFLAGS): Don't use += to append inside
8926         conditionals.  Use ...
8927         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
8928
8929 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
8930
8931         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
8932         to determine the amount of memory to copy when passing valuetypes.
8933
8934         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
8935         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
8936
8937 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
8938
8939         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
8940         information about aot.
8941
8942 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
8943
8944         * *.c: Replace the use of {Enter,Leave}CriticalSection with
8945         macros. This will allow a deadlock debugger to easily be plugged
8946         in.
8947
8948 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
8949
8950         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
8951
8952 2005-09-27  Raja R Harinath  <rharinath@novell.com>
8953
8954         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
8955         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
8956         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
8957         ($(arch_built)) [CROSS_COMPILING]: Error out.
8958
8959 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
8960
8961         * aot.c: Add support for the no_special_static flag for classes.
8962
8963 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
8964
8965         * Reapply reverted patches.
8966
8967         * *: Revert r50174 as well.
8968
8969         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
8970
8971 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
8972
8973         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
8974
8975 2005-09-23  Miguel de Icaza  <miguel@novell.com>
8976
8977         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
8978         part of the SIG_HANDLER_SIGNATURE.  
8979
8980 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
8981
8982         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
8983         statistics.
8984
8985         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
8986         introduced by previous patch.
8987
8988 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
8989
8990         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
8991         saved registers too.
8992
8993         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
8994         upon the information returned by get_call_info ().
8995         
8996         * mini-x86.c (add_float): Fix stack size calculation.
8997         (mono_arch_call_opcode): Rewrite this so it works based up the
8998         information returned by get_call_info ().
8999         (mono_arch_get_this_vret_args): Ditto.
9000
9001 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
9002
9003         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
9004         in cinfo to determine the registers which need to be used.
9005
9006 2005-09-20  Miguel de Icaza  <miguel@novell.com>
9007
9008         * driver.c (mono_main): Add --server and --desktop flags. 
9009
9010 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
9011
9012         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
9013         registers as global registers.
9014
9015         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
9016         longer needed with the new register allocator.
9017
9018         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
9019
9020         * cpu-ia64.md: Remove unused opcodes.
9021         
9022         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
9023         
9024 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
9025
9026         * cpu-amd64.md: Remove unused opcodes.
9027
9028         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
9029         needed with the new register allocator.
9030
9031         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
9032         reg-reg moves.
9033
9034 2005-09-16  Raja R Harinath  <rharinath@novell.com>
9035
9036         * Makefile.am (check-local): Don't invoke semdel-wrapper.
9037
9038 2005-09-16  Martin Baulig  <martin@ximian.com>
9039
9040         * exceptions-amd64.c
9041         (throw_exception): Don't call mono_debugger_throw_exception() if
9042         we're a rethrow - see the FIXME in the code.
9043
9044 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
9045
9046         * mini.c (mono_init_exceptions): This only works on some architectures.
9047         
9048 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
9049
9050         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
9051         on ia64.
9052
9053         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
9054
9055         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
9056         now in mini-exceptions.c.
9057
9058 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
9059
9060         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
9061         now in mini-exceptions.c.
9062
9063 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
9064
9065         * exceptions-x86.c: Applied patch from Patrik Torstensson 
9066         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
9067
9068         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
9069         code into mini-exceptions.c. Add some assertions to it.
9070
9071 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
9072
9073         * aot.c (emit_section_change): Applied patch from "The Software Team" 
9074         (<software@solmersa.com>). Fix as errors on windows.
9075
9076 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
9077
9078         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
9079         method info into the LMF.
9080
9081 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
9082         
9083         * mini-ia64.c: Add proper unwind info for method epilogs.
9084
9085         * exceptions-ia64.c: Add some code to help debugging.
9086         
9087         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
9088
9089         * mini-exceptions.c: Fix warning.
9090
9091 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
9092
9093         * mini.c: Really fix build.
9094
9095         * mini-x86.c mini-amd64.c: Fix build.
9096
9097 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
9098
9099         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
9100
9101         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
9102         some Interlocked methods as intrinsics.
9103
9104         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
9105         for Thread methods as well.
9106
9107         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
9108
9109         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
9110
9111         * mini-ia64.c mini-x86.c mini-amd64.c 
9112         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
9113         OP_MEMORY_BARRIER.
9114         
9115         * mini.c (mono_init_exceptions): Fix build breakage.
9116
9117 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
9118
9119         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
9120         of instructions. Use the new ia64_unw_op macros for emitting unwind
9121         info.
9122
9123         * mini.c (mono_init_exceptions): Initialize exception handling
9124         related trampolines at startup.
9125
9126 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
9127
9128         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
9129
9130 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
9131
9132         * mini.c: Handle type loading errors gracefully during compilation and
9133         throw the appropriate exception.
9134
9135 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
9136
9137         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
9138         for the mono binary.
9139
9140 2005-09-09  Martin Baulig  <martin@ximian.com>
9141
9142         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
9143         the release.
9144
9145 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
9146
9147         * mini-arm.h: use emulation for conv.r.un for the release.
9148
9149 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
9150
9151         * mini-arm.c, objects.cs: more fixes and tests for them.
9152
9153 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
9154
9155         * mini-arm.c: align structures to at least 4 bytes to be able
9156         to keep our current optimized memcpy.
9157
9158 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
9159
9160         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
9161
9162 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9163
9164         * mini.c: ignore SIGPIPE.
9165
9166 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
9167
9168         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
9169
9170         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
9171
9172 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
9173
9174         * mini.h: Add prototype for mono_allocate_stack_slots_full.
9175
9176 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
9177
9178         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
9179         exception handling support.
9180         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
9181         patch by Brian Koropoff <briank@marakicorp.com>).
9182
9183 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
9184
9185         * mini.c: revert another 'optimization' which breaks when
9186         items on the eval stack need to be saved at a basic block end
9187         (bug #75940).
9188
9189 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
9190
9191         * jit-icalls.c: for arrays, ensure we always provide
9192         lower bounds.
9193
9194 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
9195
9196         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
9197         
9198         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
9199
9200 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
9201
9202         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
9203         arguments in their original register.
9204
9205 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
9206
9207         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
9208         memset/memcpy.
9209
9210         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
9211         when ssapre is enabled.
9212
9213         * inssel-long.brg: Fix bug in previous patch.
9214
9215         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
9216         multiplication by a constant.
9217
9218 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
9219
9220         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
9221         icc.
9222
9223         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
9224         saving registers.
9225
9226 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
9227
9228         * inssel-arm.brg: apply changes tested by Brian Koropoff
9229         <briank@marakicorp.com>.
9230
9231 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
9232
9233         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
9234         
9235 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
9236
9237         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
9238         to the same register if dreg is just a base register.
9239         (print_ins): Improve printing of membase opcodes.
9240
9241         * inssel-x86.brg: Add optimized ldind(reg) rules.
9242
9243         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
9244
9245 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
9246
9247         * mini.c: when running under valgrind, set the stack bottom for
9248         the GC at the actual approximate stack for the app (fixes running
9249         mono with valgrind).
9250
9251 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
9252
9253         * mini.c: do no break at the first valuetype to init found
9254         (fixes bug #75791).
9255
9256 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
9257
9258         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
9259
9260 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
9261
9262         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
9263
9264 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
9265
9266         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
9267
9268 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
9269
9270         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
9271
9272         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
9273         code.
9274
9275         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
9276         code.
9277
9278         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
9279         methods.
9280
9281 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
9282
9283         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
9284
9285 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
9286
9287         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
9288         in the tail recursion optimization.
9289
9290         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
9291         debug info into the assembly file.
9292
9293         * iltests.il: Add test for filter regions.
9294
9295         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
9296         initial stack of filter regions. Fixes #75755.
9297
9298 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
9299
9300         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
9301         stack requirements.
9302
9303 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
9304
9305         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
9306         the check for an already compiled method on non-ia64 platforms.
9307         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
9308         proper domain.
9309
9310         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
9311
9312         * inssel-x86.brg: Add some optimized call rules.
9313
9314 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
9315
9316         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
9317         method here.
9318
9319         * mini.h mini-trampolines.c: Pass the trampoline argument to 
9320         mono_arch_patch_delegate_trampoline.
9321
9322         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
9323
9324         * mini-trampolines.c: Fix build.
9325
9326         * mini-amd64.h: Add delegate trampolines.
9327
9328         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
9329
9330         * inssel-amd64.brg: Add optimized call rules.
9331         
9332         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
9333
9334         * inssel-ia64.brg: Add optimized ldind(reg) rules.
9335
9336 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
9337
9338         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
9339         change.
9340
9341         * mini-ia64.c: Remove LMF fixmes.
9342
9343         * mini-ia64.h: Remove most fields from LMF.
9344
9345         * inssel-ia64.brg (stmt): Fix unaligned access errors.
9346
9347         * mini-trampolines.c: Add support for IA64 function descriptors.
9348
9349         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
9350         for IA64 function descriptors.
9351
9352 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
9353
9354         * tramp-arm.c: patch the vtable for virtual calls. Added
9355         support code to register/unregister the LMF.
9356         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
9357         more LMF work.
9358
9359 2005-08-19  Dick Porter  <dick@ximian.com>
9360
9361         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
9362         bit value if needed.
9363
9364 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
9365
9366         * mini.c (mini_get_method): Move handling of wrapper data here.
9367
9368         * mini.c (mono_method_to_ir): Add support for dynamic methods.
9369
9370         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
9371         virtual.
9372
9373         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
9374         bblock->code does not remain empty.
9375
9376 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
9377
9378         * arrays.cs: Add regression test for #75832.
9379
9380         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
9381         rules. Fixes #75832.
9382
9383         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
9384         instruction scheduling.
9385
9386 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
9387
9388         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
9389
9390 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
9391
9392         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
9393
9394         * mini-codegen.c: Fix VC build.
9395
9396         * cpu-pentium.md: Increase length of atomic_exhange_i4.
9397
9398 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9399
9400         * mini.h: fix signature for mono_register_opcode_emulation.
9401
9402 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
9403
9404         * mini.c: Get rid of most of the helper_sig_... constants using
9405         mono_create_icall_signature ().
9406
9407 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
9408
9409         * jit-icalls.c (helper_ldstr): New helper function.
9410
9411         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
9412
9413         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
9414         throw, load the string using a helper call instead of creating a string object.
9415
9416         * aot.c: Update after LDSTR changes.
9417
9418         * mini.h: Bump AOT file version.
9419         
9420         * aot.c: Save class size info into the AOT file. Print more statistics during
9421         compilation.
9422
9423         * mini.h: Bump AOT file version.
9424
9425         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
9426         ordering of disasm cases. Fixes #74957.
9427
9428 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
9429
9430         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
9431         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
9432         the generic code needed for the ARM port.
9433
9434 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
9435
9436         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
9437         inssel-arm.brg: more ARM features and fixes.
9438
9439 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
9440
9441         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
9442         ARM port work in progress.
9443
9444 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
9445
9446         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
9447
9448         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
9449
9450         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
9451
9452         * inssel.brg (mini_emit_memset): Add support for unaligned access.
9453
9454         * *-ia64.*: Ongoing IA64 work.
9455         
9456         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
9457
9458 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
9459
9460         * TODO: Remove out-of-data todo stuff.
9461
9462         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
9463         dead code.
9464
9465         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
9466
9467         * mini.h: Bump corlib version.
9468
9469 2005-07-27  Martin Baulig  <martin@ximian.com>
9470
9471         * mini-codegen.c
9472         (create_copy_ins): Added `const unsigned char *ip' argument; set
9473         `copy->cil_code' from it.
9474
9475 2005-07-27  Martin Baulig  <martin@ximian.com>
9476
9477         * mini-exceptions.c (mono_handle_exception): Don't call
9478         mono_debugger_handle_exception() for filters.
9479
9480 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
9481
9482         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
9483         as well.
9484
9485 2005-07-26  Martin Baulig  <martin@ximian.com>
9486
9487         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
9488
9489         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
9490         helper_compile_generic_method() if the method is actually virtual
9491         and non-final.
9492
9493 2005-07-26  Martin Baulig  <martin@ximian.com>
9494
9495         * mini.c
9496         (trampoline_code): Renamed to `mono_trampoline_code' and made it
9497         public; this is now accessed directly by the debugger.
9498         (mono_generic_trampoline_code): Removed.
9499
9500         * debug-mini.c
9501         (mono_debug_init_method): Also add interncalls and wrappers.
9502
9503 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
9504
9505         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
9506
9507 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
9508
9509         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
9510
9511 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
9512
9513         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
9514
9515 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
9516
9517         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
9518         getting TLS offsets on AMD64 too.
9519
9520 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
9521
9522         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
9523
9524 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
9525
9526         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
9527         inssel-arm.brg, mini-arm.h: ARM port work in progress.
9528
9529 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
9530
9531         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
9532
9533         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
9534         to mini.c.
9535
9536         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
9537         mono_sparc_is_virtual_call ().
9538         
9539         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
9540
9541         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
9542         trampoline parameters.
9543
9544         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
9545         
9546         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
9547         to mono_arch_get_vcall_slot_addr.
9548
9549         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
9550         trampoline code.
9551
9552         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
9553
9554 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
9555
9556         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
9557
9558 2005-07-19  Martin Baulig  <martin@ximian.com>
9559
9560         * exceptions-amd64.c (throw_exception): Call
9561         mono_debugger_throw_exception() here like we're doing it on i386.
9562
9563 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
9564
9565         * mini-ia64.c: Add optimized TLS access support.
9566
9567 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
9568
9569         * mini-exceptions.c: Ongoing IA64 work.
9570
9571         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
9572
9573         * mini.c: Use the default optimization set when embedding. Fixes
9574         #75194.
9575
9576 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
9577
9578         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
9579         of trampolines to a separate file.
9580
9581         * mini-trampolines.c: New file.
9582
9583         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
9584         separate file.
9585         
9586         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
9587         amd64/ia64 code.
9588
9589         * mini-codegen.c: Fix cygwin build.
9590
9591 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
9592
9593         * mini.c: Add some minor changes needed by the IA64 port.
9594
9595         * *-ia64.*: Ongoing IA64 work.
9596
9597 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
9598
9599         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
9600         trampolines into arch-independent and arch-dependent parts.
9601
9602         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
9603
9604 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
9605
9606         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
9607
9608         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
9609         the xp-regalloc-branch for amd64.
9610
9611         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
9612         xp-regalloc-branch for x86.
9613
9614 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
9615
9616         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
9617
9618 2005-07-06  Martin Baulig  <martin@ximian.com>
9619
9620         * mini.c
9621         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
9622         (mono_jit_runtime_invoke): Likewise.
9623
9624 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
9625
9626         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
9627         on x86 too.
9628         
9629         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
9630         without loading their metadata. Reorganize the file format so exception handling+
9631         debug info is kept separate from normal method info. Create MonoJitInfo 
9632         structures for methods lazily.
9633
9634         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
9635         loading metadata.
9636         (x86_class_init_trampoline): Patch AOT class init trampolines too.
9637
9638         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
9639
9640         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
9641         in AOT code.
9642
9643         * mini.h: Bump AOT file version.
9644
9645 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
9646
9647         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
9648
9649 2005-07-01  Raja R Harinath  <rharinath@novell.com>
9650
9651         * Makefile.am (check-local): Call semdel-wrapper.
9652
9653 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
9654
9655         * mini-x86.c: Revert the last change as it seems to break the build..
9656
9657 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
9658
9659         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
9660         
9661         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
9662
9663 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
9664
9665         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
9666         outside of the macro, so strange stuff doesn't happen with gcc4
9667         (NEW_AOTCONST_TOKEN): Likewise.
9668
9669 2005-06-28  Martin Baulig  <martin@ximian.com>
9670
9671         * mini.c (mini_class_is_system_array): New static method; use this
9672         instead of `klass->parent == mono_defaults.array_class' everywhere
9673         since this also works for the new generic array class.
9674
9675 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
9676
9677         * inssel.brg: Remove warnings.
9678
9679 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
9680
9681         * mini-ia64.c: Ongoing IA64 work.
9682
9683         * basic-float.cs: Add float->i1 conversion test.
9684
9685         * iltests.il: Add conv.u4 test.
9686
9687 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
9688
9689         * inssel-long.brg: Fix bug caused by last change.
9690
9691 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
9692
9693         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
9694         BSDs.  Allows the x86 JIT to work on OSX86
9695
9696 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
9697
9698         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
9699         u4->i8 conversion.
9700
9701         * mini-ia64.c: Ongoing IA64 work.
9702
9703 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
9704
9705         * mini-ia64.c: Ongoing IA64 work.
9706
9707         * driver.c: Clean up jit_code_hash as well when using --regression.
9708
9709         * inssel-long.brg: Fix long->i4/u4 conversion rules.
9710
9711         * basic-long.cs: Add tests for long->u4 conversion.
9712
9713 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
9714
9715         * mini.c: Take mono_get_domainvar out of macros. This makes sure
9716         that we do not depend on undefined C behavior: the order stuff
9717         gets evaluated within an expression. Fixes mono when compiled on
9718         GCC 4.
9719
9720 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
9721
9722         * *-ia64.*: Ongoing IA64 work.
9723
9724         * aot.c: Lower memory usage while loading AOT methods.
9725
9726         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
9727
9728         * mini.h: Bump AOT file format version.
9729
9730 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
9731
9732         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
9733
9734 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
9735
9736         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
9737         not on callee assembly). Fixed some comments.
9738
9739 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
9740
9741         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
9742         it gets proper disassembly.
9743         (emit_method_info): Remove some dead code.
9744
9745         * mini.c (mini_method_compile): Allways allocate the GOT var in
9746         mono_method_to_ir for emulating opcodes.
9747
9748 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
9749
9750         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
9751         before freeing the code memory. Fixes #74990.
9752
9753         * objects.cs: Add regression test for #74992.
9754
9755         * liveness.c: Extend live ranges of arguments to the beginning of the
9756         method. Fixes #74992.
9757
9758         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
9759         so it points into the faulting instruction.
9760
9761 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
9762
9763         * jit-icalls.c (mono_imul_ovf): Add exception handling.
9764
9765         * *-ia64.*: Ongoing IA64 work.
9766
9767         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
9768
9769 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
9770
9771         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
9772
9773         * *-ia64.*: Ongoing IA64 work.
9774
9775 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
9776
9777         * basic-long.cs: Add tests for add/sub.ovf.
9778
9779         * basic.cs: Add tests for sub.ovf.
9780
9781         * *-ia64.*: Ongoing IA64 work.
9782
9783 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
9784
9785         * *-ia64.*: Ongoing IA64 work.
9786
9787         * basic.cs: Add conv.ovf.i4.un test.
9788
9789 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
9790
9791         * mini.c: (remove_block_if_useless) Fixed bug 75061.
9792         
9793 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9794
9795         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
9796
9797 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
9798
9799         * *-ia64.*: Ongoing IA64 work.
9800
9801 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9802
9803         * trace.[ch]:
9804         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
9805
9806 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
9807
9808         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
9809
9810 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
9811
9812         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
9813
9814         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
9815         of a call is callable by a near call.
9816
9817 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
9818
9819         * mini-ia64.c: Ongoing IA64 work.
9820
9821 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
9822
9823         * genmdesc.c: Make the generated array non-static.
9824
9825         * inssel-long.brg: Fix LSHR_IMM rule.
9826
9827         * *-ia64.*: Ongoing IA64 work.
9828
9829         * *-ia64.*: Ongoing IA64 work.
9830
9831 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
9832
9833         * *-ia64.*: Ongoing IA64 work.
9834
9835         * *-ia64.*: Ongoing IA64 work.
9836         
9837         * mini-ia64.c: Ongoing IA64 work.
9838
9839         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
9840
9841 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
9842
9843         * objects.cs basic-calls.cs: Move some tests to objects.cs.
9844         
9845         * objects.cs basic-long.cs: Move some tests to objects.cs.
9846
9847 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
9848
9849         * *-ia64.*: Ongoing IA64 work.
9850
9851         * iltests.il: Add a new test.
9852
9853         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
9854         newobj. Fixes #75042.
9855
9856 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
9857
9858         * *-ia64.*: Ongoing IA64 work.
9859         
9860         * *-ia64.*: Ongoing IA64 work.
9861         
9862         * *-ia64.*: Ongoing IA64 work.
9863
9864         * basic.cs objects.cs: Move tests accessing static variables as well.
9865
9866         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
9867
9868 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
9869
9870         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
9871
9872         * driver.c: Always print failed tests.
9873
9874         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
9875         frame pointer.
9876
9877         * *ia64*: Ongoing IA64 work.
9878
9879 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
9880
9881         * basic.cs: Add tests for add.ovf. Fix warnings.
9882
9883 2005-05-18  Miguel de Icaza  <miguel@novell.com>
9884
9885         * driver.c (mono_main): Avoid crash if no argument is passed to
9886         --break;  Do not use g_error, but f_printf.   And fix all other
9887         ocurrences of the same crash.
9888
9889 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
9890
9891         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
9892         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
9893         Fixes #74742.
9894
9895 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
9896
9897         * *-ia64.*: Add beginnings of IA64 backend.
9898
9899         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
9900
9901 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
9902
9903         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
9904         Fixes #74925.
9905
9906         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
9907
9908         * mini-amd64.c: Fix a warning.
9909
9910 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
9911
9912         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
9913         in float_neg. Fixes #74897.
9914
9915         * mini-amd64.c (emit_call): Fix another near call bug.
9916
9917 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
9918
9919         * declsec.c: Keep the appdomain information in the structure. Added a 
9920         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
9921         value gets overwritten).
9922         * declsec.h: Set the default MonoArray for the the stack to 6. Added
9923         an MonoAppDomain member to MonoSecurityFrame.
9924         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
9925         used in the stack walk. Now use a MonoArray which grow (double) when
9926         it gets full.
9927
9928 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
9929
9930         * mini.c: Re-enabled runtime cleanup, since running threads should
9931         now properly stop when exiting.
9932
9933 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
9934
9935         * mini-codegen.c: New file contaning the arch-independent local
9936         register allocator. Not used by any architectures yet.
9937
9938         * mini.h linear-scan.c: Merge some changes from the 
9939         mini-xp-local-regalloc branch.
9940
9941 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
9942
9943         * mini-amd64.c (emit_call): Fix calls to native functions when the
9944         runtime is compiled as a shared library. Fixes #74756.
9945
9946         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
9947         on a literal field. Fixes #74751.
9948
9949 2005-04-25  Raja R Harinath  <rharinath@novell.com>
9950
9951         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
9952
9953 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
9954
9955         * objects.cs: Add missing null casting test.
9956
9957 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
9958
9959         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
9960         in wrapper methods. Also rename 'address' variable to 'offset'.
9961
9962 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
9963
9964         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
9965         warnings.
9966         
9967         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
9968
9969         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
9970         work on windows.
9971
9972 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
9973
9974         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
9975
9976 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
9977
9978         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
9979         just the last bytes.
9980
9981 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
9982
9983         * aot.c (mono_compile_assembly): Fix warning.
9984
9985         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
9986         by the _MSC_VER stuff.
9987
9988 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
9989
9990         * inssel-long.brg: Fix #74588.
9991
9992         * cpu-amd64.md: Fix #74591.
9993
9994         * iltests.il: Add new regression tests.
9995
9996 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
9997
9998         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
9999         valuetype.
10000
10001 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
10002
10003         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
10004
10005         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
10006         from Bill Middleton <flashdict@gmail.com>.
10007
10008 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
10009
10010         * arrays.cs: Add new regression test. Fix warnings.
10011
10012 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
10013
10014         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
10015         and leakage in CKFINITE.
10016
10017         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
10018         this to a null op since it is called on amd64 too.
10019
10020         * exceptions-amd64.c (get_throw_trampoline): Align stack.
10021
10022         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
10023         body since this is not used on amd64.
10024         
10025         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
10026
10027         * mini-amd64.c: Remove obsolete fixmes.
10028
10029         * mini.c (print_method_from_ip): Fix debugging support.
10030
10031 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10032
10033         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
10034         so that expressions that don't give much gain are not reduced.
10035         * ssapre.h: Likewise.
10036
10037 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
10038
10039         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
10040
10041         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
10042
10043         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
10044
10045 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
10046
10047         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
10048
10049         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
10050
10051 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
10052
10053         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
10054         stack touching.
10055
10056         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
10057
10058         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
10059
10060         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
10061
10062         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
10063         MONO_ARCH_USE_SIGACTION. Fixes #74252.
10064
10065         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
10066
10067         * mini-x86.c: Fix up stack overflow handling.   
10068
10069         * exceptions.cs: Add new regression test.
10070
10071 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
10072
10073         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
10074         mono_jit_thread_attach.
10075
10076         * mini.c (mono_method_to_ir): Verify called method is not abstract.
10077
10078 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
10079
10080         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
10081         avoid calling constructors using callvirt.
10082
10083         * inssel.brg: Fix #74073.
10084
10085 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
10086
10087         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
10088         compilation with non-GCC compilers.
10089         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
10090         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
10091
10092 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
10093
10094         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
10095         klass->interface_offsets (will likely fix bug#74073).
10096
10097 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
10098
10099         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
10100
10101 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
10102
10103         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
10104         to amd64_div_reg_size ().
10105         
10106         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
10107
10108 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
10109
10110         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
10111
10112 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
10113
10114         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
10115
10116 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
10117
10118         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
10119         
10120         * mini.c (mono_precompile_assembly): Load and precompile referenced
10121         assemblies as well. Fixes #74015.
10122
10123 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
10124
10125         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
10126
10127 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
10128
10129         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
10130         a lot of checks and (anyway) permissions cannot work until corlib is 
10131         loaded.
10132
10133 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
10134
10135         * mini-ppc.c: fixed ABI issue on sysv/ppc.
10136
10137 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
10138
10139         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
10140         calls (fixes bug#72824).
10141
10142 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
10143
10144         * mini.c: fix tail recursion elimination (see test in bug#73936).
10145
10146 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
10147
10148         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
10149         some fp functions in sse2 mode.
10150
10151 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
10152
10153         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
10154
10155 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
10156
10157         * mini.h mini.c: Add mono_get_jit_tls_key ().
10158
10159         * mini-x86.c: Enable fast TLS support on windows.
10160
10161 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
10162
10163         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
10164         * mini.c: Check for p/invoke method when generating code. If a
10165         p/invoke method, or it's class, isn't decorated with [Suppress
10166         UnmanagedCodeSecurity] then generate code to call System.Security.
10167         UnmanagedDemand (only if the security manager is active).
10168
10169 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
10170
10171         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
10172         last change as it seems to cause strange crashes.
10173         
10174 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10175
10176         * *.c: handle unsafe function pointers where needed.
10177
10178 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
10179
10180         * mini.c (mono_jit_free_method): Remove the fixme too.
10181
10182 2005-03-15  Miguel de Icaza  <miguel@novell.com>
10183
10184         * mini.c: As discussed, make the code actually free the delegate
10185         thunk now, to enable the debugging of delegate problems, use
10186         MONO_DEBUG=1 when running Mono. 
10187
10188         This takes also care of parts of the leaks as seen by Joe.
10189
10190 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
10191
10192         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
10193         thread_tls_offset calculation.
10194
10195 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
10196
10197         * declsec.c: Reworked linkdemand checks for icall. The previous code
10198         was using the declaration code (untrusted) and didn't work as expected
10199         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
10200         specific case.
10201
10202 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
10203
10204         * iltests.il: Add new localloc test.
10205
10206         * mini-amd64.c: Handle large stack allocations the same way as on
10207         windows if stack overflow handling is working.
10208         
10209         * mini-amd64.c: Allocate the signal stack using mmap.
10210
10211         * mini.c (sigsegv_signal_handler): Fix reading of context.
10212
10213         * mini-exceptions.c: Fix up stack overflow handling.
10214
10215         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
10216
10217         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
10218
10219         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
10220
10221         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
10222
10223         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
10224         tramp_init functions as they are no longer needed.
10225
10226 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
10227
10228         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
10229         
10230         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
10231
10232         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
10233         
10234         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
10235         support that now.
10236
10237         * mini-ops.h: Add OP_LMUL_IMM.
10238
10239         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
10240         long mul/div opcodes as intrinsic.
10241
10242         * mini-amd64.c (emit_call): Handle the case when the callee might be
10243         an AOT method.
10244
10245 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
10246
10247         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
10248         extra safe.
10249         
10250         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
10251
10252         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
10253
10254 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
10255
10256         * mini.c (mono_codegen): Don't leak here, to help people running
10257         monogrind.
10258
10259 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
10260
10261         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
10262         conversions in sse2 mode.
10263
10264         * basic-float.cs: Add regression test.
10265         
10266         * mini-amd64.c: Reenable sse2.
10267
10268 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
10269
10270         * mini-amd64.c: Disable sse2 until some regressions are fixed.
10271
10272 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
10273
10274         * driver.c: Copyright text should include 2005.
10275         
10276 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
10277
10278         * cpu-amd64.md (load_membase): Fix more max lengths.
10279
10280 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
10281
10282         * cpu-amd64.md (load_membase): Fix max length.
10283
10284         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
10285
10286         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
10287
10288         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
10289         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
10290
10291         * basic-float.cs: Add rounding regression test.
10292
10293         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
10294
10295 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
10296
10297         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
10298         structures in registers for pinvoke wrappers.
10299
10300 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
10301
10302         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
10303
10304 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
10305
10306         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
10307         wrapper to mono_jit_thread_attach.
10308
10309         * mini.c (mini_jit_thread_attach): New jit icall.
10310
10311         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
10312         native->managed wrappers.
10313
10314         * exceptions.cs: Add new regression test.
10315
10316         * mini.c (optimize_branches): Check regions in the cbranch to throw
10317         block case as well. Fixes #73242.
10318
10319 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
10320
10321         * mini.c: thread safety fixes.
10322
10323 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
10324
10325         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
10326         patching stuff, since delegates use jump trampolines so there is
10327         no caller.
10328
10329         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
10330         jump trampolines.
10331         
10332         * tramp-amd64.c: Fix build.
10333
10334         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
10335         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
10336
10337         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
10338         Rename this to mono_arch....
10339         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
10340
10341         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
10342
10343         * mini-amd64.c (emit_call): If both the caller and the callee is
10344         guaranteed to have 32 bit addresses, emit a normal call.
10345
10346         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
10347
10348         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
10349         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
10350         method_ptr inside delegates.
10351
10352 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
10353
10354         * mini.c (mono_jit_free_method): Free the method info even if the native code is
10355         invalidated. Fixes #73001.
10356
10357         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
10358
10359         * mini-x86.c: Only use stdcall for pinvokes on windows.
10360
10361 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
10362
10363         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
10364         * mini-x86.c: remove unreliable __thread var offset detection,
10365         use the correct accessors and enable by default.
10366
10367 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
10368
10369         * mini.c (mono_jit_free_method): Fix memory leak.
10370
10371 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
10372
10373         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
10374
10375 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
10376
10377         * cpu-amd64.md: Fix lengths of atomic opcodes.
10378
10379 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
10380
10381         * driver.c: try to not imply using ICU is any good.
10382
10383 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
10384
10385         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
10386         functions as inline ops.
10387
10388         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
10389         some Interlocked functions as inline ops.
10390
10391         * mini.c (move_basic_block_to_end): Fix bug in last patch.
10392
10393         * mini.h (MonoBasicBlock): Reorganize fields a bit.
10394
10395         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
10396
10397         * mini.c: Add support for OP_NOT_TAKEN.
10398
10399         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
10400         structures in registers for pinvoke wrappers.
10401
10402         * mini-amd64.c: Fix warnings.
10403
10404 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
10405
10406         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
10407
10408         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
10409
10410         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
10411         address instead of loading the address from it.
10412
10413         * mini-x86.c: Add support for returning small structs in registers
10414         on Win32. Fixes part of #70864.
10415         
10416 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
10417
10418         * trace.c (get_token): Improve error checking.
10419
10420 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
10421
10422         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
10423
10424 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
10425  
10426         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
10427         it can be reused for MonoClass.
10428         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
10429         _LINKDEMAND.
10430
10431 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
10432
10433         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
10434         instead of a MonoReflectionMethod. The method information wasn't used
10435         when displaying SecurityException details (but will be now).
10436
10437 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
10438
10439         * Makefile.am : windows build fix.
10440
10441 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
10442
10443         * iltests.il: Add new regression test.
10444
10445         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
10446         #72522.
10447
10448 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
10449  
10450         * mini.c: Moved linkdemand check into helper function check_linkdemand
10451         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
10452         LDFTN, LDVIRTFTN).
10453
10454 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
10455
10456         * declsec.c: Added statistics counter for different kinds of 
10457         LinkDemands.
10458         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
10459         (and commented) declaration.
10460         * mini.c: Added statistics counter for security Demand code 
10461         generation. Added display of security statistics.
10462
10463 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
10464
10465         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
10466         Fix compilation errors under gcc-2.95.
10467
10468 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
10469
10470         * mini.c, driver.c: Use the new jit trampoline hashtable
10471
10472 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10473
10474         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
10475
10476 2005-02-11  Martin Baulig  <martin@ximian.com>
10477
10478         * debug-mini.c (mono_debug_close_method): Free the line number array.
10479
10480 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
10481
10482         * aot.c: Break up large methods into smaller ones. Share GOT slots for
10483         icalls.
10484
10485         * mini.h: Bump AOT file format version. 
10486
10487 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
10488
10489         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
10490         APTC and P/Invoke.
10491         * declsec.h: Added macros to get/set lazyly initialized security 
10492         informations about assemblies. Added new enum for different type of
10493         possible LinkDemand violation. Added function to check LinkDemands.
10494         * mini.h: Added a field to MonoCompile to hold any security violation
10495         detected when JITting a method (so it can be thrown later).
10496         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
10497         and CEE_CALLVIRT. Added code to throw exception at the end of
10498         mini_method_compile (note: the exception is unhandled right now).
10499
10500 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
10501
10502         * mini.c, jit-icalls.c: use the managed implementation of
10503         memset for initobj and memset, to avoid managed <-> unmanaged
10504         transitions.
10505
10506 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
10507
10508         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
10509         optimization if it would need a GOT var.
10510
10511         * basic.cs: Add tests for constant propagation and switch statements.
10512
10513         * ssa.c: Fix out-of-range constant propagation and switch statements.
10514
10515 2005-02-09    <vargaz@freemail.hu>
10516
10517         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
10518
10519 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
10520
10521         * cpu-amd64.md (load_membase): Fix max length of load_membase.
10522
10523 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10524
10525         * mini.c: update to new signature of mono_class_get_allocation_ftn().
10526
10527 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
10528
10529         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
10530         arithmetic operations.
10531
10532 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
10533
10534         * mini-ppc.c: add a workaround for broken user code that
10535         DllImports vararg functions with non-vararg signatures.
10536
10537 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
10538
10539         * mini.c (mono_jit_compile_method_inner): Add detection and a 
10540         meaningfull error message for assemblies written in Managed C++.
10541
10542         * tramp-amd64.c mini-amd64.h: Add support for 
10543         create_trampoline_from_token ().
10544
10545         * aot.c mini-x86.c abcremoval.c: Applied patch from
10546         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
10547
10548 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
10549
10550         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
10551         which takes a MonoImage/token as parameter instead of a MonoMethod.
10552
10553         * aot.c: Use the new trampoline for initializing vtables.
10554
10555         * aot.c: Add support for ldfld/stfld_remote wrappers.
10556
10557         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
10558         rules for compare <MEM>, IMM.
10559
10560         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
10561
10562         * aot.c: Handle inherited finalizers correctly.
10563
10564 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
10565
10566         * inssel.brg (stmt): Add a missing _setup_... ().
10567
10568         * aot.c: Save some parts of the class state to the AOT file and use it
10569         to recompute that state when a class is initialized.
10570
10571         * mini.c: Install AOT hooks into the runtime.
10572
10573         * mini.h: Bump AOT file format version.
10574         
10575         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
10576         Fixes #72148.
10577
10578         * iltests.il: Add new test.
10579
10580 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
10581
10582         * mini.c: fix typo.
10583
10584 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
10585
10586         * mini.c: setup the statistical profiler in the thread attach
10587         callback to cope with the new single thread code.
10588
10589 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
10590
10591         * mini-ppc.c: ensure we have enough room for the profiler
10592         calls (fixed bug#72084).
10593
10594 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
10595
10596         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
10597         it.
10598
10599 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10600
10601         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
10602
10603 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10604
10605         * ssapre.c: Fixed an issue with down safety (this allows IronPython
10606         to succesfully execute parrotbench).
10607         * ssapre.h: Likewise.
10608
10609 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10610
10611         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
10612         variable for stores to method arguments (fixes a SSAPRE issue).
10613
10614 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
10615
10616         * mini.c: handle value types in dup, fixes gen-112.cs.
10617
10618 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
10619
10620         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
10621         sequence for calls in dynamic methods to avoid thunks.
10622
10623 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
10624
10625         * mini.c: correctly remove dynamic methods from the hashtable.
10626
10627 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
10628
10629         * driver.c: Disabled SSAPRE until fix the bug that appears
10630         in IronPython's parrotbench.
10631
10632 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
10633
10634         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
10635
10636         * mini.c (mono_method_to_ir): Revert the previous change.
10637         
10638         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
10639         when AOT compiling.
10640
10641         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
10642         mono_jit_info_table_find () etc. when running under valgrind.
10643
10644         * inssel.brg: Fix warnings.
10645
10646         * mini-exceptions.c: Fix warnings.
10647
10648 2005-01-31  Martin Baulig  <martin@ximian.com>
10649
10650         * driver.c (compile_all_methods_thread_main): Don't try to compile
10651         generic methods or anything which has type parameters.
10652
10653 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
10654
10655         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
10656
10657         * TestDriver.cs: Add --verbose flags.
10658
10659         * graph.c ssa.c: Fix 64 bit warnings.
10660         
10661         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
10662         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
10663         Fix 64 bit warnings.
10664
10665         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
10666         variable not spotted by gcc.
10667         
10668         * mini-amd64.c inssel-amd64.brg: Applied patch from  
10669         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
10670         X86_COMPARE_MEMBASE opcodes.
10671
10672         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
10673
10674 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
10675
10676         * *: MonoMethod->signature might be NULL now. You *MUST* use
10677         mono_method_signature.
10678
10679 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
10680
10681         * driver.c (compile_all_methods_thread_main): Compile the methods
10682         without invoking cctors.
10683
10684 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
10685
10686         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
10687         * basic-calls.cs: test for the above.
10688
10689 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
10690
10691         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
10692         MonoJitInfo changes.
10693
10694 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
10695
10696         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
10697         eagerly if it contains dynamic methods.
10698         
10699         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
10700
10701         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
10702         trace, it is now computed by an icall from trace_ips.
10703         
10704         * mini-exceptions.c: Fix a warning.
10705
10706 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
10707
10708         * mini-exceptions.c: don't bother getting stack trace info if
10709         it's not going to be used.
10710
10711 2005-01-27  Raja R Harinath  <rharinath@novell.com>
10712
10713         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
10714         ssapre-mini-ops.h.
10715
10716 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
10717
10718         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
10719
10720         * aot.c: Avoid calling mono_method_get_header () if not needed.
10721
10722         * mini.h: Bump AOT file format version.
10723         
10724         * mini.c (mono_emit_native_call): Allocate a GOT var here.
10725
10726         * mini.c (mono_print_tree): Print more info for calls.
10727
10728 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
10729
10730         * declsec.h: Remove warning by adding missing include for marshal.h
10731
10732 2005-01-26  Martin Baulig  <martin@ximian.com>
10733
10734         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
10735         `ip' twice.
10736
10737 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
10738
10739         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
10740         flags.
10741
10742         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
10743
10744         * aot.c (mono_compile_assembly): Fix a warning.
10745
10746 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
10747
10748         * declsec.c: Look for security attributes on the original MonoMethod 
10749         (and not the wrapped one). This fix permissions on icalls.
10750
10751 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
10752
10753         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
10754
10755         * mini.c (mono_allocate_stack_slots): Add a fixme.
10756
10757         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
10758
10759 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
10760
10761         * inssel.brg: optimize casts of sealed types (more
10762         optimizations waiting for fixes in remoting).
10763
10764 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
10765
10766         * inssel.brg (stmt): Add another dummy rule.
10767
10768         * driver.c: Fix warnings.
10769
10770         * driver.c (mono_main): If running under valgrind, instruct glib to use
10771         the system allocation functions so valgrind can track the memory
10772         allocated by the g_... functions.
10773
10774         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
10775
10776         * mini-ops.h: Add OP_DUMMY_STORE opcode.
10777
10778         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
10779
10780         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
10781         variables in try regions.
10782
10783         * mini.c (mini_method_compile): Don't disable optimizations on large
10784         methods when AOT compiling.
10785
10786         * mini.c (mono_allocate_stack_slots): New arch independent method to 
10787         allocate stack slots. Not yet used.
10788
10789 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
10790
10791         * debug-mini.c (mono_debug_close_method): Plug some leaks.
10792
10793 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
10794
10795         * mini-ppc.c: make the branch info relative as the code
10796         buffer can be reallocated.
10797
10798 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
10799
10800         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
10801         * driver.c: Removed the AOT/security restriction. Now initialize the
10802         security manager (in metadata) if --security is used.
10803         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
10804         rather than the pointer to declarative security, when AOT is used.
10805
10806 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
10807
10808         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
10809         basic blocks, reduced intrinsic exception throwing code size.
10810
10811 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
10812
10813         * driver.c (mini_usage): Reorder the usage screen.
10814
10815 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
10816
10817         * mini.c (mono_resolve_patch_target): Fix warning.
10818
10819 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
10820
10821         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
10822         previous patch.
10823
10824         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
10825
10826         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
10827         breaks the amd64 build.
10828
10829         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
10830         register allocation. Fixes #71454.
10831
10832         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
10833
10834         * arrays.cs: Add new regression test.   
10835
10836 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
10837
10838         * ssapre.c: Turned usage of snprintf to GString.
10839         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
10840         (I left it on by mistake in my previous commit).
10841
10842 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
10843
10844         * mini.c, cfold.c, basic-calls.cs: preserve side effects
10845         on cond branch optimization (fixes bug# 71515).
10846
10847 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
10848
10849         * abcremoval.c: Fixed bug 71062.
10850         * abcremoval.h: Likewise.
10851
10852 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
10853
10854         * mini.c: Added a new functionality to optimize_branches, the removal
10855         of useless basic blocks, and fixed some problem in the removal of
10856         critical edges; some utility functions added for both purposes.
10857         * ssapre.c: Added complex expression support, and fixed bug 70637.
10858         * ssapre.h: Likewise.
10859         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
10860         enabled in SSAPRE.
10861         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
10862         * driver.c: Re-enabled SSAPRE.
10863
10864 2005-01-19  Martin Baulig  <martin@ximian.com>
10865
10866         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
10867         the result of mono_get_method_constrained().
10868
10869 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
10870
10871         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
10872         manager.
10873
10874 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
10875
10876         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
10877         be detected.  Fixes #59296.
10878
10879 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
10880
10881         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
10882         which can happen. Fixes #71361.
10883
10884 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
10885
10886         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
10887         manager.
10888
10889 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
10890
10891         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
10892         appdomain-unload.exe to fail.
10893         
10894         * mini.c: Fix some memory leaks.
10895
10896 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
10897
10898         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
10899         Fixed bug and sped up some codepaths.
10900
10901 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
10902
10903         * mini.c: Fix some memory leaks.
10904
10905         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
10906         conversion.
10907
10908         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
10909
10910         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
10911         #71320.
10912
10913         * iltests.il: Add regression test for #71320.
10914
10915 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
10916
10917         * mini.c (mono_codegen): Fix installation of profiler hooks.
10918
10919         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
10920
10921 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
10922
10923         * mini.h, mini.c, cfold.c: optimize access to enum
10924         readonly fields, too. Eval conditional branches if possible
10925         to perform unreachable code removal in more cases.
10926
10927 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
10928
10929         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
10930
10931         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
10932         code manager.
10933
10934         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
10935         WinXP DEP. Fixes #71244.
10936
10937 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
10938
10939         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
10940
10941 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
10942
10943         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
10944
10945 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
10946
10947         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
10948         changes.
10949
10950         * mini.h: Bump AOT version.
10951
10952         * mini.h (MonoCompile): Change exvar to a hash table.
10953
10954         * mini.c: Allocate a separate exvar for each handler block.
10955
10956         * mini.c: Get rid of the computation of filter_lengths, its not needed.
10957
10958         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
10959         ex var with the pending exception and only throw if the two are equal.
10960         Fixes #68552.
10961         
10962         * exceptions.cs: Add tests for rethrow and nested catch clauses.
10963
10964         * mini-x86.c: Fix warnings.
10965
10966         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
10967         used by all the ports now.
10968
10969         * aot.c: Add write-symbols and save-temps options.
10970
10971 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
10972
10973         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
10974
10975 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
10976
10977         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
10978         operations.
10979
10980         * tramp-s390.c: Check vtable slot belongs to the domain.
10981
10982         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
10983         as per other platforms.
10984
10985         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
10986
10987 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
10988
10989         * driver.c: we don't run the Main() code in a subthread anymore.
10990
10991 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
10992
10993         * mini.c: added experimental rtc support in the statistical
10994         profiler: if the user has the permission, more accurate statistics
10995         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
10996         The MONO_RTC value must be restricted to what the linux rtc allows:
10997         power of two from 64 to 8192 Hz.
10998
10999 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
11000
11001         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
11002
11003 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
11004
11005         * mini-ppc.c: better icache flush for smp.
11006
11007 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
11008
11009         * mini-amd64.c (emit_move_return_value): Fix memory leak.
11010
11011         * mini-x86.c (get_call_info): Add the get_call_info () code from the
11012         amd64 port, not yet used.
11013
11014 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
11015
11016         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
11017         a struct type.
11018
11019 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
11020
11021         * driver.c: Added --security option to activate the security manager.
11022         Right now this will allow code generation for declarative demands and
11023         is disabled when AOT is specified.
11024         * mini.c: Add code generation for declarative security demands.
11025         * mini.h: Add mono_use_security_manager as an extern gboolean.
11026
11027 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
11028
11029         * aot.c (mono_compile_assembly): Speed up compilation a bit by
11030         emitting more dense assembly code.
11031
11032         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
11033         exception throwing stuff.
11034
11035 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
11036
11037         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
11038         dead code.
11039
11040         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
11041         left in by mistake.
11042
11043         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
11044         fixed.
11045
11046         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
11047
11048         * tramp-*.c: Only patch vtable slots if the object is in the current
11049         domain. Fixes appdomain-unload.exe.
11050
11051         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
11052         
11053         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
11054         x86 branch.
11055
11056 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
11057
11058         * mini.c (reverse_branch_op): New helper function.
11059
11060         * mini.c (optimize_branches): Run the new optimization only on 
11061         platforms which support it. Also reverse all kinds of branches.
11062
11063         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
11064
11065         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
11066         a throw statement.
11067
11068         * mini.c (optimize_branches): Reverse not-equals branches if the false
11069         bblock is a throw. This happens a lot of time with argument checking in
11070         corlib.
11071
11072         * mini.c (mono_codegen): Add support for placing basic blocks after
11073         the function epilogue.
11074
11075         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
11076         function epilogue.
11077         
11078 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
11079
11080         * mini.c (setup_stat_profiler): Only set this up if the platform
11081         supports ITIMER_PROF.
11082
11083 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
11084
11085         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
11086         previous patch.
11087
11088         * inssel.brg: Fix a warning.
11089
11090 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
11091
11092         * mini.c: added support for statistical profiler 
11093         (run with: --profile=default:stat).
11094
11095 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
11096
11097         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
11098
11099         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
11100
11101         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
11102         related to global registers from the amd64 port.
11103
11104 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
11105
11106         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
11107
11108         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
11109         with global registers.
11110         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
11111
11112         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
11113
11114 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
11115
11116         * debug-mini.c (encode_value): Fix off-by-one.
11117
11118         * aot.c (encode_value): Likewise.
11119
11120         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
11121
11122 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
11123
11124         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
11125         AOT.
11126
11127         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
11128         
11129         * aot.c (emit_method_info): Increase size of temp buffer.
11130
11131         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
11132         the AOT case.
11133
11134 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
11135
11136         * aot.c (emit_method_info): Fix build.
11137         
11138         * aot.c: Further rework of the AOT file format to reduce the size of
11139         the method info data.
11140
11141         * mini.h: Bump AOT file format version.
11142
11143 2004-12-27  Martin Baulig  <martin@ximian.com>
11144
11145         * mini.c (mini_get_method): New static method; call
11146         mono_get_method_full() and mono_get_inflated_method().
11147         (mono_method_to_ir): Use mini_get_method() instead of
11148         mono_get_method_full(). 
11149
11150 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
11151
11152         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
11153
11154 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
11155
11156         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
11157
11158         * inssel-amd64.brg: Add some optimization rules.
11159
11160 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
11161
11162         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
11163         standard not GC'd stuff is fine.
11164
11165 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
11166
11167         * aot.c: Rework the AOT file format to get rid of most of the global
11168         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
11169
11170         * mini.h: Bump AOT file format version.
11171         
11172 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
11173
11174         * mini.h: Bump AOT file format version.
11175
11176         * aot.c (mono_aot_is_got_entry): New function to determine if an 
11177         address is inside a GOT.
11178
11179         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
11180
11181         * cpu-pentium.md: Increase the maximum size of some instructions which
11182         might involve a got access.
11183         
11184         * mini.c (get_method_from_ip): Another debug helper function.
11185
11186         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
11187         when got var accesses are created during the decompose phase.
11188
11189         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
11190
11191         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
11192         argument mini_compile_method and to MonoCompile, and use this to
11193         determine whenever a given method is compiled for AOT. This allows the
11194         other methods compiled during AOT compilation to be free of AOT stuff,
11195         so the backends does not need to add special support for them by
11196         creating a fake GOT etc.
11197
11198         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
11199         longer needed.
11200
11201 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
11202
11203         * mini.c (mono_method_to_ir): It turns out that some of the
11204         x-appdomain wrappers are lax with types, so just ignore this for
11205         all wrappers.
11206
11207         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
11208         at the vtable->klass. If it is non-shared code we can just use the
11209         vtable.
11210
11211 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
11212
11213         * mini-ppc.c: access MonoDomain from tls, too.
11214
11215 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
11216
11217         * declsec.c: Removed unused variable (and related warning ;-)
11218
11219 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
11220
11221         * iltests.il: New test for LDELEMA on an array of ref types.
11222
11223         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
11224         all ldelema's on reftypes.
11225         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
11226         it was the wrong place to put it.
11227
11228         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
11229         register to pop to make this cleaner, at the request of Paolo.
11230
11231 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
11232
11233         * mini-ops.h (OP_GETHASHCODE): New op.
11234
11235         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
11236
11237         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
11238         operation.
11239
11240         For a microbenchmark, this reduces the cost of Hashtable.get_Item
11241         by 25%.
11242         
11243         * mini-x86.c (mono_arch_output_basic_block): Rather than
11244
11245         add ebp, 4
11246
11247         Emit
11248
11249         pop edx
11250
11251         The first is 3 bytes while the second is 1. This saves 36 kb on
11252         mscorlib, quite a big saving. When bootstraping mcs, I was able to
11253         see a small boost because of icache locality.
11254
11255         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
11256
11257 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
11258
11259         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
11260         started code sharing with the generic code.
11261
11262 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
11263
11264         * mini-ppc.c, cpu-g4.md: added code for direct access to
11265         tls data slots.
11266
11267 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
11268
11269         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
11270          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
11271         to OP_TLS_GET.
11272
11273 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
11274
11275         * declsec.c|h: Added functions to cache the declarative stack modifiers
11276         in MonoJitInfo and to create a security frame from a MonoJitInfo 
11277         structure.
11278         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
11279         created. Register internal calls for System.Security.SecurityFrame::
11280         _GetSecurityFrame and _GetSecurityStack.
11281         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
11282         the definitions for the new stack walk/callback mechanism.
11283         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
11284         first security frame for LinkDemands and InheritanceDemands) and
11285         GetSecurityStack for Demands. Both use the new mono_walk_stack code
11286         from lupus.
11287         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
11288         walk initialization (lupus).
11289
11290 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
11291
11292         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
11293         idiom.
11294         (handle_loaded_temps): Do not create a temporary variable for
11295         things that we know are temps. They will never be modified.
11296         (mono_spill_call): Set MONO_INST_IS_TEMP
11297         (mono_emulate_opcode): ditto
11298         (emit_tree): ditto
11299         (mono_method_to_ir.CEE_DUP): ditto
11300
11301 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
11302
11303         * mini.c (type_to_eval_stack_type): Make this handle the void type
11304         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
11305         (emit_tree): use ip_in_bb to special case some common idioms
11306         Update all callers to pass in the IP.
11307         (mono_method_to_ir): Make CEE_CALL* do the above as well.
11308
11309         This gives us a nice 2% speedup in mcs bootstrap.
11310
11311         * mini-x86.c (peephole_pass): Peephole pass to make
11312         mov  [foo], eax
11313         push [foo]
11314
11315         into
11316
11317         mov [foo], eax
11318         push eax
11319
11320         * mini.c (ip_in_bb): new method.
11321         (mono_method_to_ir): use this method rather than doing the hash
11322         lookup ourselves.
11323
11324         * linear-scan.c (mono_linear_scan): When expiring actives, you
11325         don't need to keep around variables that expire on this
11326         instruction. This makes it so that:
11327              a = b + 1
11328         will turn into:
11329              store (ebx add (ebx, 1))
11330         which will become
11331              add ebx, 1
11332
11333 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
11334
11335         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
11336         combination to avoid doing two copies. Fix up problems with previous
11337         patch.
11338
11339         * mini.c: Fix 64 bit warnings.
11340
11341         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
11342
11343 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
11344
11345         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
11346         changes from the x86 code.
11347
11348         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
11349
11350 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
11351
11352         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
11353         throwing code to reduce its size, unify the AOT and non-aot code and 
11354         get rid of relocations in the AOT case.
11355
11356         * mini-x86.h mini.c exceptions-x86.c 
11357         (mono_arch_get_throw_corlib_exception): New arch specific function to 
11358         raise corlib exceptions which doesn't require relocations in the 
11359         caller.
11360
11361         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
11362
11363 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
11364
11365         * mini.c (mono_emit_method_call): Only allocate the got var when it is
11366         needed.
11367
11368         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
11369         in the AOT case.
11370
11371 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
11372
11373         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
11374         with add function when used from Inc/dec atomic 
11375         functions. Re-enabled optimization on x86.
11376         * mini-ops.h: renamed atomic_add functions to
11377         allow _add to match the Interlocked::Add and
11378         _add_next to match Interlocked::Inc/Dec.
11379
11380 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
11381
11382         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
11383         linking of BBs to the end BB, and enabled SSAPRE also with
11384         consprop and copyprop (which was prevented by that bug).
11385
11386 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
11387
11388         * mini-x86.c: disabling the Interlocked optimizing code. 
11389
11390 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
11391
11392         * aot.c (load_aot_module): Move reading of got_addr after the AOT
11393         file version check.
11394         
11395 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
11396
11397         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
11398         interlocked optimization due lack of support on x86, rewrote 
11399         exchange to take into account that base may be in eax.
11400         
11401         xsp works again; activated Interlocked optimizing code.
11402         
11403 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
11404
11405         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
11406
11407 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
11408
11409         * mini-ops.h: Add new opcodes.
11410
11411         * mini.h: Add new patch types. Add got_var to MonoCompile.
11412
11413         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
11414         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
11415         make it work with all kinds of patchable code.
11416
11417         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
11418         address of the GOT, and referencing entries in the GOT.
11419
11420         * mini.c: Add code to load the GOT address if needed by an opcode.
11421
11422         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
11423         independent AOT code on the x86 using an elf-style Global Offset Table.
11424
11425 2004-12-14  Raja R Harinath  <rharinath@novell.com>
11426
11427         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
11428
11429 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11430
11431         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
11432         when running xsp.
11433
11434 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
11435
11436         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
11437         of Interlocked:Increment/Decrement/Add as inline ops.
11438         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
11439
11440 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
11441
11442         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
11443         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
11444
11445 2004-12-12  Duncan Mak  <duncan@ximian.com>
11446
11447         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
11448         again. `patch_info->table_size' is no longer valid after Zoltan's
11449         commit #37636.
11450
11451 2004-12-12  Martin Baulig  <martin@ximian.com>
11452
11453         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
11454         if we are the "real" method, ie. not an inlined method inside it.
11455
11456 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
11457
11458         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
11459         before we look in the special fields table. This fixes
11460         ../tests/thread-static-init.cs.
11461
11462 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11463
11464         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
11465         for Array get_Rank and get_Length. Fixes bug #70465.
11466
11467 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
11468
11469         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
11470         separate structure to reduce the size of MonoJumpInfo.
11471
11472 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
11473
11474         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
11475
11476 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
11477
11478         * mini.c (mini_get_inst_for_method): Changed to allow ports
11479         to return a MonoInst instead of opcode 
11480         (renamed mini_get_opcode_for_method to better reflect the new functionality)
11481         
11482         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
11483         Allow ports to return a created MonoInst instead of op-code, will enable
11484         new optimizations.
11485         (renamed mini_get_opcode_for_method to better reflected the functionality)
11486
11487 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
11488
11489         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
11490
11491 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
11492
11493         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
11494         Fixes #69985.
11495
11496 2004-12-08  Martin Baulig  <martin@ximian.com>
11497
11498         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
11499         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
11500
11501 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
11502
11503         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
11504         correctly.
11505
11506         * exceptions.cs: Disable some tests which depend on properties of x86 fp
11507         arithmetic.
11508
11509 2004-12-08  Raja R Harinath  <rharinath@novell.com>
11510
11511         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
11512
11513 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
11514
11515         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
11516         bug introduced by the previous patch.
11517
11518 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
11519
11520         * mini-ppc.c, objectc.cs: handle large structs passed by value
11521         (fixes bug #69972).
11522
11523 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
11524
11525         * mini-ppc.c: OP_ARGLIST implementation from
11526         Geoff Norton  <gnorton@customerdna.com>.
11527
11528 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
11529
11530         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
11531         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
11532
11533 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
11534
11535         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
11536
11537 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11538
11539         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
11540         support.
11541
11542 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
11543
11544         * mini-sparc.c: Zero out localled-ed memory.
11545
11546         * iltests.il: Add tests for zeroing out localloc-ed memory.
11547
11548 2004-12-04  Martin Baulig  <martin@ximian.com>
11549
11550         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
11551         mono_method_get_signature_full().       
11552
11553 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
11554
11555         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
11556         and some utility functions (always for SSAPRE), integrated SSAPRE.
11557         * mini.h: Likewise.
11558         * driver.c: Added ssapre option.
11559         * ssa.c: Small fix on OP_ARG handling.
11560         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
11561         * Makefile.am: Likewise.
11562
11563 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
11564
11565         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
11566         now in the xp code.
11567
11568         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
11569         icall.
11570
11571 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11572
11573         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
11574         
11575         * cpu-s390.md : Increase instruction length of oparglist.
11576
11577         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
11578
11579 2004-11-30  Martin Baulig  <martin@ximian.com>
11580
11581         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
11582         virtual generic methods.  We call a special helper_compile_generic_method()
11583         icall to retrieve the method from the vtable, inflate and compile
11584         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
11585
11586         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
11587
11588 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
11589
11590         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
11591
11592 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
11593
11594         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
11595         Fixes #69929.
11596
11597 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
11598
11599         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
11600         platforms with PIC aot.
11601
11602 2004-11-28  Martin Baulig  <martin@ximian.com>
11603
11604         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
11605         Fixes gen-112.cs.
11606
11607 2004-11-28  Martin Baulig  <martin@ximian.com>
11608
11609         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
11610         the result of mono_type_get_underlying_type() to check whether
11611         we're byref.
11612
11613 2004-11-26  Martin Baulig  <martin@ximian.com>
11614
11615         * mini.c
11616         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
11617         in the g_assert().
11618
11619 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
11620
11621         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
11622         the same way as the other arguments so they won't get clobbered.
11623
11624         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
11625         calls through R11 since it is clobbered by the trampoline code.
11626
11627 2004-11-26  Raja R Harinath  <rharinath@novell.com>
11628
11629         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
11630         pick up in-tree mscorlib.dll.
11631
11632 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
11633
11634         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
11635
11636         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
11637         runtime data/code are now stored in a table similar to the GOT in ELF. 
11638         This allows the code itself to be position independent.
11639
11640         * aot.c: Fix loading of referenced assemblies after the lazy assembly
11641         loading changes.
11642
11643         * aot.c: Attach ELF type (object/function) directives to all global
11644         symbols.
11645
11646         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
11647
11648         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
11649
11650         * mini-amd64.h: Turn on PIC AOT code.
11651
11652         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
11653         returning the offset within an OP_AOTCONST instruction where the GOT
11654         offset needs to be added.
11655
11656         * mini.h: Bump AOT file format version.
11657
11658 2004-11-25  Martin Baulig  <martin@ximian.com>
11659
11660         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
11661         uninflated generic methods.
11662
11663 2004-11-25  Martin Baulig  <martin@ximian.com>
11664
11665         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
11666
11667 2004-11-24  Martin Baulig  <martin@ximian.com>
11668
11669         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
11670         original klass (this only applies for generic instances).
11671
11672 2004-11-24  Martin Baulig  <martin@ximian.com>
11673
11674         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
11675         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
11676         that array).
11677
11678 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
11679
11680         * mini.c (mono_method_to_ir): Disable inlining for methods containing
11681         localloc. Fixes #69678.
11682
11683         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
11684         
11685 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
11686
11687         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
11688         used SSE registers on pinvoke calls. Fixes #69774.
11689
11690 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
11691
11692         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
11693         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
11694
11695 2004-11-23  Raja R Harinath  <rharinath@novell.com>
11696
11697         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
11698         Refer directly to the mcs/ tree.
11699
11700 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11701
11702         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
11703         Check if a trampoline for a synchronized method is required. 
11704
11705 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
11706
11707         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
11708         with localloc if needed. Throe arithmetric exception in
11709         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
11710         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
11711
11712 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
11713
11714         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
11715         types before switching on type.  Fixes #69622.
11716
11717 2004-11-19  Raja R Harinath  <rharinath@novell.com>
11718
11719         * Makefile.am (check-local): New.  Integrate into 'make check'.
11720         (MCS,RUNTIME): Define using in-tree mono and mcs.
11721         (ILASM): New.
11722         (%.exe): Use $(ILASM).
11723
11724 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
11725
11726         * mini-ppc.c: adjust initial prolog size (bug #69691).
11727
11728 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
11729
11730         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
11731         #69664.
11732
11733 2004-11-17  Raja R Harinath  <rharinath@novell.com>
11734
11735         * Makefile.am (clean-local): Rename from 'clean'.
11736
11737 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11738
11739         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
11740         to mono_arch_is_int_overflow. 
11741         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
11742         SIGFPE events.
11743
11744 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
11745
11746         * declsec.c|h: New files to support declarative security attributes.
11747         Added function to check if a method has (applicable) security.
11748         * mini.c|h: Add check for declarative security attributes in
11749         mono_method_check_inlining.
11750         * Makefile.am: Added declsec.c and declsec.h to the build.
11751
11752 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
11753
11754         * mini.c, mini.h: update to keep dynamic code info per-domain.
11755
11756 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
11757
11758         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
11759         (mini_init): Get rid of it from here too.
11760
11761 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
11762
11763         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
11764         implemented OP_RETHROW (patch by Geoff Norton
11765         <gnorton@customerdna.com>).
11766
11767 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
11768
11769         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
11770         between appdomains.  Fixes appdomain-unload on PPC.
11771
11772 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
11773
11774         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
11775         mini-exceptions.c: handle the new wrapper types.
11776         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
11777         token value as a MonoClass* when compiling a wrapper.
11778         mono_jit_create_remoting_trampoline now takes an additional
11779         MonoRemotingTarget parameter.
11780         
11781 2004-11-10  Martin Baulig  <martin@localhost>
11782
11783         * mini.c (mono_method_to_ir): Use `generic_container->context'
11784         rather than creating a new one.
11785
11786 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11787
11788         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
11789
11790         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
11791
11792 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
11793
11794         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
11795         the experimental aot cache stuff.
11796
11797 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
11798
11799         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
11800         mini-exceptions.c: update to exception clause structure changes.
11801
11802 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
11803
11804         * exceptions-x86.c (throw_exception): Fix warnings.
11805
11806         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
11807         for OP_RETHROW.
11808
11809 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
11810
11811         * exceptions-sparc.c (get_throw_exception): Really fix this.
11812
11813 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
11814
11815         * tramp-*.c: we no longer support icalls without wrappers, so
11816         a bit of code can be removed here
11817
11818 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
11819
11820         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
11821         patch.
11822
11823         * cpu-sparc.md: Add op_rethrow.
11824
11825         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
11826
11827         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
11828
11829         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
11830         * mini-ops.h: Add OP_RETHROW.
11831
11832         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
11833
11834         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
11835
11836 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
11837         
11838         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
11839         Makes the output much easier to read
11840
11841 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
11842
11843         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
11844         prevents another huge leak when compiling with ssa. Secondly, the
11845         performance of doing this rather than freeing the lists is much
11846         better. GList does a lock every time you allocate a list link,
11847         so that it can use a memory pool. So, it is better to just use
11848         a memory pool of our own.
11849         
11850         * ssa.c, linear-scan.c: replace g_list_remove_link with
11851         g_list_delete.  The remove one does not free the GList, so we were
11852         leaking memory. On -O=all --compile-all with corlib, this cut down
11853         3 MB of allocations.
11854
11855 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
11856
11857         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
11858
11859         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
11860
11861         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
11862         into a new function mono_create_jit_trampoline ().
11863
11864 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
11865
11866         * trace.c (get_spec): Allow tracing of classes without a namespace.
11867
11868 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
11869
11870         * mini.c: Fix pointer overwrite in mini_method_compile.
11871
11872 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
11873
11874         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
11875         The darwin ABI needs some special handling for 1 and 2 byte structs
11876         Lets use lbz/lhz instead of lwz everywhere.
11877         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
11878         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
11879         Use stb/sth for the former, and put the latter always on stack instead of in
11880         argument registers.
11881
11882 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
11883
11884         * trace.c (is_filenamechar): Add '_'.
11885
11886 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
11887
11888         * mini-s390.c: Fix prolog length to allow for large trace requirements.
11889
11890         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
11891
11892 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
11893
11894         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
11895         depends on libmonogc. Fixes #68805.
11896
11897 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
11898
11899         * mini.c (mono_jit_free_method): Provide extra information for
11900         this error.  Currently this leaks, but will be turned into a
11901         developer option in the future.
11902
11903 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
11904
11905         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
11906
11907 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
11908
11909         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
11910         boundary. Fixes reading of PATCH_INFO_R4 and R8.
11911         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
11912
11913 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
11914
11915         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
11916         trampolines for AOT code.
11917
11918 2004-10-22    <vargaz@freemail.hu>
11919
11920         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
11921         constructed types. Fixes #68136.
11922
11923 2004-10-21  Martin Baulig  <martin@ximian.com>
11924
11925         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
11926         if it returns true, unwind the stack to the call instruction.
11927
11928 2004-10-21    <vargaz@freemail.hu>
11929
11930         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
11931
11932         * mini.h: Bump AOT version number.
11933
11934         * objects.cs: Add another test for unbox trampolines.
11935
11936         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
11937         valuetype methods.
11938
11939 2004-10-20    <vargaz@freemail.hu>
11940
11941         * driver.c: Add SHARED to the set of optimizations tested.
11942
11943         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
11944
11945         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
11946         used by CEE_NEWARR.
11947
11948         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
11949
11950 2004-10-20  Martin Baulig  <martin@ximian.com>
11951
11952         * mini-exceptions.c (mono_handle_exception): Call
11953         mono_debugger_handle_exception() to tell the debugger about
11954         catch/finally clauses.
11955
11956 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
11957
11958         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
11959
11960         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
11961         #68447.
11962
11963 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
11964
11965         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
11966         methods as their native size, fixed bug #57543, #57545.
11967         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
11968         This saves a temporary register and mullw call down into 1 (minor perf
11969         increase for cases like sum = sum * 5;  This use to translate into:
11970             li r11,5
11971             mullw r28,r28,r11
11972         It now translates to
11973             mulli r28,r28,5
11974
11975 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
11976
11977         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
11978         #68388.
11979
11980 2004-10-11  Martin Baulig  <martin@ximian.com>
11981
11982         * mini.c (mono_method_to_ir): If we're a generic method, get the
11983         MonoGenericContainer from our MonoMethodNormal and create a
11984         MonoGenericContext from it.
11985
11986 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
11987
11988         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
11989
11990         * basic-long.cs: Add test for checked i8->i2 cast.
11991
11992 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11993
11994         * inssel-ppc.brg: added a couple of speedup rules.
11995
11996 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
11997
11998         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
11999         to speed up rebuilds.
12000
12001 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12002
12003         * mini-s390.c: Minor fix to OP_OR_IMM.
12004
12005 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
12006
12007         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
12008         better. Fixes appdomain-unload.exe on sparc.
12009
12010 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
12011
12012         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
12013         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
12014         see bug 67324.
12015
12016 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
12017
12018         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
12019
12020 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
12021
12022         * mini.c: Always generate a field read/write wrapper for members
12023         of the class MarshalByRefObject since the actual instance could
12024         be a CBO.
12025
12026 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
12027
12028         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
12029
12030 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
12031
12032         * driver.c mini.h trace.c: Move the setting of the main assembly into
12033         a separate function called mono_trace_set_assembly () and call it after
12034         actually loading the main assembly. Fixes #66872.
12035
12036 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
12037
12038         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
12039         using the code manager.
12040
12041 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
12042
12043         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
12044
12045 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
12046
12047         * cpu-amd64.md: Fix bug in previous patch.
12048         
12049         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
12050         #66650.
12051
12052 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
12053
12054         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12055         mini-exceptions.c: updates for changed stack walk interface.
12056
12057 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12058
12059         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
12060
12061 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
12062
12063         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
12064
12065 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
12066
12067         * driver.c (mini_regression_list): Do not call mono_assembly_close 
12068         since assemblies can't be unloaded.
12069         
12070 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
12071
12072         * cpu-amd64.md: Fix more instruction lengths.
12073
12074         * cpu-amd64.md: Fix lengths of some instructions.
12075
12076 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
12077
12078         * inssel.brg: Make the array ldelema check aot friendly.
12079
12080 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
12081
12082         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
12083
12084         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
12085
12086 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
12087
12088         * mini-x86.c: Fix build.
12089
12090         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
12091         mono_type_get_underlying_type () helper function to simplify code.
12092         
12093 2004-09-09  Martin Baulig  <martin@ximian.com>
12094
12095         * mini-amd64.c: Don't access `type->data.klass' directly, call
12096         mono_class_from_mono_type() instead since the type may be a
12097         generic instance.
12098
12099 2004-09-09  Martin Baulig  <martin@ximian.com>
12100
12101         * mini-amd64.c (get_call_info): Fix support for generic instances.
12102         (add_valuetype): Use mono_class_from_mono_type() to get the class
12103         since we can be a generic instance.
12104
12105 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
12106
12107         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
12108
12109 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
12110
12111         * liveness.c: reset spill costs on each scan: bug 62107
12112
12113 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
12114
12115         * exceptions-sparc.c (mono_arch_find_jit_info): remove
12116         unnecessary line that doesn't compile
12117
12118 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
12119
12120         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
12121         trampolines, make them call an error function so people can fix their
12122         code.
12123
12124 2004-09-06  Martin Baulig  <martin@ximian.com>
12125
12126         * mini.c (mono_method_to_ir): When initializing locals, handle a
12127         generic instances like a valuetype if it's a valuetype and like a
12128         class if it's a class.
12129
12130 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
12131
12132         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
12133         stack. Fixes #64674.
12134
12135         * exceptions.cs: Add test for unwinding of call arguments.
12136
12137 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
12138
12139         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
12140         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
12141         set the carry/borrow flag). The sparc and s390 implementations
12142         can now use optimized versions (and simplify the code). ppc bugfixes.
12143
12144 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
12145
12146         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
12147
12148 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
12149
12150         * inssel-amd64.brg: Remove leftover 32 bit rule.
12151
12152         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
12153
12154 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
12155
12156         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
12157         mono_arch_find_jit_info functions into a new function. Fix a memory
12158         leak.
12159
12160         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
12161         refactored code.
12162         
12163 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
12164
12165         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
12166         as well.
12167         
12168         * exceptions.cs: Add array size tests.
12169
12170         * mini.c: Allocate a separate icall wrapper for each arity of 
12171         mono_array_new_va. Fixes #59509.
12172
12173         * exceptions.cs: Add testcase for 64578.
12174
12175         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
12176
12177         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
12178         
12179 2004-09-02  Martin Baulig  <martin@ximian.com>
12180
12181         * mini.c (mono_method_to_ir): When initializing the locals, call
12182         handle_initobj() on the generic instance itself, not its
12183         underlying type.
12184
12185 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
12186
12187         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
12188         MonoJitInfo for dynamic methods.
12189
12190         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
12191
12192         * mini.c: Add support for freeing JIT data for dynamic methods.
12193         
12194 2004-09-01  Martin Baulig  <martin@ximian.com>
12195
12196         * mini-x86.c (is_regsize_var): Added support for generic
12197         instances.
12198         (mono_arch_emit_prolog): Make this compile again, use
12199         `x86_push_imm_template (code)'.
12200
12201 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
12202
12203         * mini-x86.c: make all push_imm instructions that get
12204         patched always emit the long form
12205
12206 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
12207
12208         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
12209         in a per-domain hash.
12210
12211         * mini-amd64.c (merge_argument_class_from_type): Handle generic
12212         types.
12213
12214 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
12215
12216         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
12217         work.
12218         
12219         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
12220         work.
12221
12222         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
12223         Beginnings of SSE2 support.
12224
12225         * exceptions.cs: Add more tests for checked int<->uint casts.
12226
12227 2004-08-28  Martin Baulig  <martin@ximian.com>
12228
12229         * mini-x86.c (mono_arch_instrument_epilog): Added support for
12230         generic instances.
12231
12232         * mini.c
12233         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
12234         Handle generic instances recursively.
12235
12236 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
12237
12238         * iltests.il: test for conv.u8 on a constant
12239
12240 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
12241
12242         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
12243         LCONV_x4 (shrun_32 (membase)).
12244
12245 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
12246
12247         * inssel-x86.brg: c&p rules for push/setret of long
12248
12249 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
12250
12251         * inssel-x86.brg: c&p rules for compare (base, regvar) and
12252         compare (regvar, base)
12253
12254         * inssel-x86.brg: more burg love
12255
12256         * inssel.brg: more cleanup
12257
12258         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
12259
12260 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
12261
12262         * basic-long.cs, basic-calls.cs: new tests for optimization.
12263
12264 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
12265
12266         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
12267         patch.
12268
12269 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
12270
12271         * mini-amd64.c (read_tls_offset_from_method): Add another case.
12272         
12273 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
12274
12275         * inssel.brg (mini_emit_memcpy): use 
12276         NO_UNALIGNED_ACCESS to disable memcpy optimization
12277
12278 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
12279
12280         * mini-amd64.c: Handle generic types in various places.
12281
12282         * mini.c (mono_method_to_ir): Handle generic types in init locals.
12283
12284 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
12285
12286         * mini.c (handle_box): Fix warning.
12287
12288         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
12289
12290         * mini-amd64.h: Enable the emit_state optimization.
12291
12292         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
12293
12294         * mini-amd64.c: Add some new 64 bit peephole opts.
12295
12296         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
12297
12298         * cpu-amd64.md: sreg1 of div instructions must be %rax.
12299
12300         * mini-amd64.c: Register allocator fixes.
12301
12302         * mini.c: Add an optimization to emit_state to avoid allocation of new
12303         registers on some platforms.
12304
12305 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
12306
12307         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
12308
12309         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
12310         allocation. Fixes #63085.
12311
12312         * basic-long.cs: Add new regression test.
12313
12314         * mini-amd64.c: Register allocator improvements.
12315
12316 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
12317
12318         * mini-amd64.c (read_tls_offset_from_method): Add another code
12319         sequence.
12320
12321         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
12322         instruction sequence for nullifying class init trampolines.
12323
12324         * objects.cs: Add new regalloc test.
12325
12326         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
12327
12328 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
12329
12330         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
12331         
12332         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
12333         arguments.
12334
12335         * driver.c: Fix profiling after TLS changes.
12336         
12337         * driver.c (mono_main): Set mono_stats.enabled if needed.
12338
12339         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
12340         CEE_BOX.
12341
12342 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
12343
12344         * mini-x86.c: use a 1 op rather than a 2 op tls access
12345         instruction -> faster.
12346
12347 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
12348
12349         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
12350         x86 backend.
12351
12352 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
12353
12354         * exceptions-sparc.c (throw_exception): fix typo
12355
12356 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
12357
12358         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
12359         set tree->dreg correctly with tls. Allow any
12360         register to be used.
12361
12362         * mini-x86.c (read_tls_offset_from_method): add new code
12363         generation pattern seen with GCC.
12364
12365
12366 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
12367
12368         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
12369         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12370         exceptions-sparc.c: fix some performance issues in exception
12371         handling and setting of the stack trace for exceptions that were
12372         already thrown.
12373
12374 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
12375
12376         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
12377         x86 backend.
12378         
12379         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
12380         registers.
12381
12382 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
12383
12384         This patch inlines tls access, when possible.
12385         
12386         * mini.h: new arch functions for TLS intrinsics.
12387         All platforms updated with a stub.
12388
12389         * mini.c: use the new intrinsics
12390
12391         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
12392         arch specific intrinsic for tls variables
12393
12394 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
12395
12396         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
12397         under windows.
12398
12399 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
12400
12401         * mini.c: thread local allocation
12402
12403 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
12404
12405         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
12406
12407         * Makefile.am: Link against the static version of libmonogc.
12408         
12409         * Makefile.am: Link the static versions of the convenience libraries
12410         into the mono executable.
12411
12412         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
12413
12414 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
12415
12416         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
12417         on integer overflow.
12418
12419         * mini-amd64.c: Reorganize function call code.
12420
12421         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
12422
12423 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
12424
12425         * inssel-x86.brg: use xor eax,eax.
12426         
12427         * basic.cs: new tests
12428
12429 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
12430
12431         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
12432         in exception throwing code.
12433         
12434 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
12435
12436         * inssel-x86.brg: use xor esi,esi.
12437
12438 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
12439
12440         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
12441         can trace methods compiled during mini_init () too.
12442
12443         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
12444         CEE_CONV_U4.
12445
12446 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
12447
12448         * Makefile.am: static link on x86 (r=zoltan)
12449
12450 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
12451
12452         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
12453         code since it causes some programs to fail.
12454
12455 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
12456
12457         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
12458
12459 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
12460
12461         * mini.c: ovfops_op_map - add STACK_OBJ case for
12462         CONV_I 
12463         * basic.cs: add test_0_pin_string as test
12464         case for above.
12465
12466 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
12467
12468         * Makefile.am: build C# if srcdir != builddir
12469
12470 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
12471
12472         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
12473         fall-through blocks.
12474
12475 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
12476
12477         * driver.c: enable loop by default again and include abcrem in -O=all.
12478
12479 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
12480
12481         * iltests.il: Add some localloc tests.
12482
12483         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
12484
12485         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
12486         Fixes #62574.
12487
12488         * inssel-amd64.brg: Add some optimizations.
12489
12490         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
12491         for gcc-3.4.
12492
12493         * Makefile.am: Statically link mono against libmono on AMD64.
12494         
12495         * mini-amd64.c inssel-amd64.brg: Optimizations.
12496
12497 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
12498
12499         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
12500
12501         * tramp-amd64.c: Patch calling code in trampolines.
12502
12503 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
12504
12505         * mini-amd64.c: pinvoke struct passing fixes.
12506
12507 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
12508
12509         * mini-sparc.c: redo change, make mono_arch_cpu_init call
12510         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
12511
12512 2004-08-05  Duncan Mak  <duncan@ximian.com>
12513
12514         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
12515         CEE_LDELEM_ANY.
12516
12517 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
12518
12519         * mini-amd64.c (emit_move_return_value): Move return value for normal
12520         calls too.
12521
12522 2004-08-05  Martin Baulig  <martin@ximian.com>
12523
12524         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
12525         `type->type'; just modify `type' itself when dealing with enums
12526         and generic instances.
12527         (check_call_signature): Make `simple_type' a `MonoType *'.
12528
12529 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
12530
12531         * mini.c: Use OP_PADD to add offsets to addresses.
12532
12533         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
12534
12535 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
12536
12537         * mini-sparc.c (mono_arch_emit_epilog): fix check
12538         for folding last op into restore instruction
12539
12540 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
12541
12542         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
12543         helper methods using the code manager.
12544         
12545         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
12546
12547         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
12548
12549 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12550         
12551         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
12552           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
12553
12554         * mini-s390.c: fix tail processing
12555
12556 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
12557
12558         * mini-ppc.c: mul.ovf.un exception name fix.
12559
12560 2004-08-03  Martin Baulig  <martin@ximian.com>
12561
12562         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
12563         instances; before jumping to `handle_enum', also modify `ptype'.
12564
12565 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
12566
12567         * cpu-sparc.md: fcall maximal length too small.
12568
12569 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
12570
12571         * mini-amd64.c mini.h: Add initial support for passing/returning 
12572         structures to/from pinvoked methods.
12573
12574 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
12575
12576         * mini-ppc.c: reg allocator fix.
12577
12578 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
12579
12580         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
12581
12582         * inssel.brg: Optimize memset on 64 bit machines.
12583
12584         * mini-amd64.c: Fix some vararg cases.
12585
12586 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12587
12588         * mini-s390.c: Corrected macro in emit_float_to_int
12589
12590         * s390-abi.cs: Tests to exercise the s390 ABI
12591
12592 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
12593
12594         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
12595         caller saved regs.
12596
12597         * basic.cs: Add a test for add.ovf.un.
12598
12599 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
12600
12601         * mini-sparc.c: add case for OP_IDIV_UN
12602
12603 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
12604
12605         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
12606         
12607         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
12608
12609 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
12610
12611         * basic.cs: regression tests.
12612
12613         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
12614         regressions.
12615
12616 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
12617
12618         * basic.cs: Add a new test.
12619
12620         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
12621         and AOT. Various fixes and optimizations.
12622
12623         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
12624
12625 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
12626
12627         * mini-ppc.c: make sure temp regs are not used for global reg
12628         allocation.
12629
12630 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
12631
12632         * cpu-sparc.md: conv_i8 fix for 64bits
12633
12634         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
12635
12636 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
12637         
12638         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
12639         add opcode for cmp BYTE PTR [eax], imm.
12640
12641         * inssel.brg: Make memcpy and memset takes bases.
12642
12643 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
12644
12645         * *-amd64.*: More AMD64 work.
12646         
12647 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
12648
12649         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
12650         add a compare-not-equal opcode.
12651         
12652 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
12653
12654         * mini.c: Use mono_init_from_assembly instead of mono_init.
12655         
12656 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
12657
12658         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
12659
12660         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
12661
12662         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
12663
12664         * inssel.brg: 64 bit fixes.
12665
12666         * mini.h (MonoCallInst): Add some AMD64 specific data.
12667
12668         * mini.h: Add some OP_P opcodes.
12669
12670 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
12671
12672         * basic.cs: tests for 61797 and 61740
12673
12674 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
12675
12676         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
12677         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
12678
12679 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
12680
12681         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
12682
12683         * *-amd64*.*: Ongoing AMD64 work.
12684
12685 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
12686
12687         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
12688
12689         * *-amd64*: Ongoing AMD64 work.
12690
12691         * mini-arch.h: Add AMD64 support.
12692
12693         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
12694
12695         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
12696
12697         * mini-ops.h: Add new opcodes.
12698
12699         * Makefile.am: Add AMD64 support.
12700
12701         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
12702         rules into the inssel-long*.brg files.
12703
12704         * *-amd64.*: Add beginnings of AMD64 backend.
12705
12706 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
12707
12708         * mini.c (print_dfn): commenting out the code that prints
12709         the cil. With -O=deadce, this makes -v -v crash.
12710         
12711         * cpu-pentium.md: make checkthis have a length of 2
12712
12713 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
12714
12715         * mini-sparc.h: fix implementations of __builtin
12716         functions for Sun compiler for V9.
12717
12718 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
12719
12720         * mini.c: use the new stelem.ref wrapper
12721         * exceptions.cs, arrays.cs: new stelem.ref tests
12722
12723 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
12724
12725         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
12726         new XSP should work with these changes).
12727
12728 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
12729         
12730         * inssel-{long32,x86,}.brg: trivial optimizations.
12731         
12732 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
12733
12734         * mini.c: load value when emitting box operation in
12735         constrained calls.
12736
12737 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
12738
12739         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
12740         is one byte shorter than cmp DWORD PTR [eax], 0.
12741
12742 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
12743
12744         * inssel-ppc.brg: arguments on the stack are always
12745         relative to the stack pointer (spotted by Neale Ferguson).
12746
12747 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12748
12749         * exceptions-x86.c: delay appending the method name to the trace until
12750         after mono_jit_info_table_find is called, as this gets the real
12751         MonoMethod.
12752
12753 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
12754
12755         * aot.c: register roots
12756
12757 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
12758
12759         * aot.c : I could just use PLATFORM_WIN32 flag.
12760
12761 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
12762
12763         * aot.c : Reverting the previous fix. This time it broke linux build.
12764
12765 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
12766
12767         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
12768
12769 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
12770
12771         * mini.c (handle_stack_args): Remove some more debugging code.
12772         
12773         * mini.c (handle_stack_args): Remove debug output left in by mistake.
12774
12775         * driver.c mini.h aot.c: Allow additional options to be specified with
12776         --aot and pass them to mono_compile_assembly.
12777
12778         * aot.c: Add experimental code to AOT compile all loaded assemblies
12779         on demand and save the code into a cache in the filesystem.
12780
12781         * aot.c: Add support for more wrapper methods.
12782         
12783         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
12784         58863.
12785
12786         * cpu-*.md: Remove removed opcodes.
12787
12788         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
12789         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
12790         related icalls to marshal.c.
12791
12792 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
12793
12794         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
12795
12796         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
12797
12798         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
12799
12800 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
12801         * liveness.c: If liveness is recomputated we need to reset the information
12802         for each variable. This way, if the liveness range has been narrowed
12803         by optimizations that happened after the last computation, we can return
12804         a smaller range.
12805         
12806         For example, if you have
12807         
12808         {
12809                 int i = 0;
12810                 
12811                 // Tons of code that does not affect i
12812                 
12813                 i = foo ();
12814                 ...
12815         }
12816         
12817         i = 0 is dead code and will be removed by SSA. However, when
12818         linear scan gets to the code, i will still appear to be live
12819         throughout the entire block. This prevents good register allocation.
12820
12821 2004-07-06  Martin Baulig  <martin@ximian.com>
12822
12823         * debug-mini.c (mono_debug_init_method): Allow
12824         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
12825         (mono_debug_add_icall_wrapper): New method.
12826
12827         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
12828
12829 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
12830
12831         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
12832         optimization.
12833
12834 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
12835
12836         * aot.c (mono_aot_load_method): Fix loading of debug info.
12837
12838 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
12839
12840         * aot.c: Add logging support.
12841
12842 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
12843
12844         * mini.h: Add prototype for mono_print_method_from_ip.
12845
12846         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
12847
12848         * inssel.brg: 64 bit fixes.
12849
12850         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
12851         inssel-long32.brg.
12852
12853         * Makefile.am: Add SPARC64 support.
12854
12855 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
12856
12857         * aot.c: Fix alignment problems on 32 bit platforms.
12858
12859 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
12860
12861         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
12862         SPARC64.
12863
12864         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
12865         problems.
12866
12867         * mini.h: Bump AOT file version. Some 64 bit fixes.
12868
12869 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
12870
12871         * inssel-sparc.brg: Add new rule to avoid register moves.
12872
12873         * inssel.brg: Add ldind_to_load_membase helper function.
12874
12875 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
12876
12877         * mini.c: OffsetToStringData intrinsic.
12878         
12879 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
12880
12881         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
12882
12883         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
12884         regression tests.
12885
12886         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
12887 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
12888
12889         * mini.c: reinstated mono_compile_get_interface_var()
12890         on x86, too, since the change breaks the Gtk# build there as well.
12891
12892 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12893
12894         * driver.c: remove loop from the default optimizations: it seems to
12895         interact badly with some of the other options (see bug #60613).
12896
12897 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
12898
12899         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
12900         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
12901
12902 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
12903
12904         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
12905         vararg-using methods.
12906
12907 2004-06-21  Martin Baulig  <martin@ximian.com>
12908
12909         * mini/mini-exceptions.c
12910         (mono_handle_exception): Added `gpointer original_ip' argument.
12911         After calling mono_unhandled_exception(), call
12912         mono_debugger_unhandled_exception() and if that returns true,
12913         restore the context and return.
12914
12915 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
12916
12917         * mini-ppc.c: prefer the use of relative branches so
12918         they won't need to be patched in aot code (patch from Patrick Beard).
12919
12920 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
12921
12922         * aot.c: patch from Patrick Beard to make the output assembly
12923         more correct for the MacOSX assembler. Small tweak to
12924         generate sane images on Linux/PPC, too.
12925
12926 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12927
12928         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
12929         case until bug #59509 is fixed (shows up in #60332).
12930
12931 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12932
12933         * mini.c: make sure the needed wrappers are compiled, too, with
12934         precomp.
12935
12936 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
12937
12938         * driver.c: remove NPTL reference in --version output.
12939
12940 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12941
12942         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
12943         generate valid assembly for the Mach-O assembler.
12944
12945 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
12946
12947         * driver.c: don't include abcrem in the all optimization specifier
12948         since it slows down jit compilation too much for now.
12949
12950 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
12951
12952         * mini.c: use BIGMUL only if both operands have the same signage.
12953         * iltests.il: Test for bug 60056. (errors related to signage in
12954         BIGMUL).
12955
12956         r=lupus.
12957
12958 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
12959
12960         * mini.c, aot.c: memory leak fixes.
12961
12962 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
12963
12964         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
12965
12966 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
12967
12968         * Makefile.am: remove the -static hack completely, it links in
12969         statically glib as well.
12970
12971 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
12972
12973         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
12974         * exceptions.cs: make it compile with new mcs/csc.
12975
12976 2004-06-03 Massimiliano Mantione <massi@ximian.com>
12977         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
12978         and added relevant test case.
12979
12980 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
12981
12982         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
12983         regressions in gtk-sharp.
12984
12985 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
12986
12987         * exceptions.cs: New regression tests.
12988
12989         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
12990
12991 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
12992
12993         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
12994
12995 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
12996
12997         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
12998
12999         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
13000
13001 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
13002
13003         * mini.c (mono_jit_runtime_invoke): Init class in this
13004         method instead of trusting mono_jit_compile_method to
13005         do the work (because wrappers can be in object class)
13006
13007 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
13008
13009         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
13010
13011         * basic-long.cs: New regression test.
13012
13013 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
13014
13015         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
13016         and div/rem checks.
13017
13018 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
13019
13020         * Makefile.am: fix miguel's change to build mono statically against
13021         libmono (track build dependencies).
13022
13023 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
13024
13025         * cfold.c: Some glib versions do not have G_MININT32.
13026
13027 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
13028
13029         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
13030         with precision of tan, atan, sin and cos, and implemented related
13031         regressions tests (fixes bug 54467, but one new problem appeared and
13032         is not fixed yet).
13033
13034 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
13035
13036         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
13037
13038         * exceptions.cs: Add test for constant folding && division by zero.
13039
13040         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
13041         since driver.c is in libmono too, so the optimization was useless.
13042
13043         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
13044         variable to driver.c so the compiler can emit more efficient code to
13045         access them.
13046
13047 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13048
13049         * Makefile.am: don't distribute generated inssel.[ch] files.
13050
13051 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
13052
13053         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
13054         into the default appdomain. Fixes #58707.
13055
13056         * jit-icalls.c: Remove the broken approximation for truncl, doing
13057         no conversion is better.
13058
13059         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
13060         Fixes #58863.
13061
13062 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
13063
13064         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
13065         of the mcrxr instruction which is not available on some processors
13066         even if it's documented to be. Implement add and sub overflow correctly
13067         (still not complete for long unsigned). Speed up icalls a bit.
13068
13069 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
13070
13071         * mini.c (mono_jit_compile_method_with_opt): Make sure that
13072         we run .cctor in the current domain instead of target_domain.
13073         
13074         Fixes bug #58558, .cctor not being called in -O=shared.
13075
13076 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13077
13078         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
13079
13080 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
13081
13082         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
13083         which can be done with an imm8, do it that way.
13084         (mono_arch_output_basic_block): ditto for a jmp
13085         (mono_arch_emit_prolog): Computate maximum offset of a label.
13086
13087 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
13088
13089         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
13090         now tries to allocate prefered physical reg's for virtual
13091         regs. This reduces the number of emited spills/loads with
13092         20-30% on our core assemblies.
13093
13094 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13095
13096         * jit-icalls.c: truncl() is not needed and trunc() is
13097         the correct thing to do anyway (bug #58287).
13098
13099 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
13100
13101         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
13102         if available.
13103
13104 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
13105
13106         * driver.c: enable loop optimizations by default.
13107
13108 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
13109
13110         * mini-x86.c: fix calc of max loop size when aligning loops start.
13111
13112 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
13113
13114         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
13115         the stack.
13116
13117 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
13118
13119         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
13120         should set carry.
13121
13122         * basic-long.cs: Add tests for add/subtract of immediates with carry.
13123
13124         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
13125         
13126         * mini.c (inline_method): Allways inline some wrappers even if the cost
13127         is too large. Fixes #58785.
13128
13129         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
13130         
13131 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
13132
13133         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
13134         (crichton@gimp.org). Beginning of support for sparc/linux.
13135
13136         * mini-sparc.c: Optimize retrieval of LMF address.
13137
13138 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
13139
13140         * exceptions-ppc.c:  handle alloca in methods with clauses.
13141
13142 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
13143
13144         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
13145
13146 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
13147
13148         * mini.c: Delegate most of the abort signal work to 
13149           mono_thread_request_interruption, which also handles Stop and Suspend
13150           states.
13151
13152 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
13153
13154         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
13155         supports the save/restore lmf opcodes.
13156
13157 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
13158
13159         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
13160         by gcc-3.4 as well.
13161
13162         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
13163
13164 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
13165
13166         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
13167         methods which contain array accesses.
13168
13169         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
13170         boundaries. Fixes #58537.
13171
13172         * iltests.il: Add regression test for #58537.
13173
13174 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
13175
13176         * mini-x86.c (mono_arch_local_regalloc): Last part of
13177         fix for bug #58633 (releasing register to early).
13178
13179 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
13180
13181         * basic-long.cs: Add new regression test.
13182
13183 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
13184
13185         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
13186         register too early on the chain.
13187
13188 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
13189
13190         * mini.c (create_helper_signature): Use a helper function to reduce
13191         the code which needs to be written. Also set the calling convention of
13192         icalls on windows. Fixes #57840.
13193
13194 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
13195
13196         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
13197         exceptions-ppc.c: added helper function to get the instruction address
13198         from a signal handler context.
13199
13200 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13201
13202         * helpers.c: use g_get_tmp_dir. Invokes happyness 
13203         from gonzalo.
13204
13205 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13206
13207         * helpers.c: Add new env variable to pass args to objdump.
13208         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
13209
13210 2004-05-17  Radek Doulik  <rodo@ximian.com>
13211
13212         * Makefile.am (common_sources): added abcremoval.h so it get
13213         disted and daily mono packages on go-mono.com will build again
13214
13215 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
13216
13217         * abcremoval.c: Fixed coding style, added copyright header.
13218
13219         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
13220
13221         * mini.h: Added prototype for abc removal main function.
13222
13223         * build_relations_propagation_table.pl: Added copyright header.
13224
13225 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
13226
13227         * basic-long.cs: reg test for complex ceq_long bug.
13228
13229 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
13230
13231         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
13232         reg in long and clob case (bug #58343). Fixed/added comments.
13233
13234 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
13235
13236         * mini.c (mono_jit_runtime_invoke): Follow new convention
13237         of calling the invoke method with an function pointer.
13238
13239 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
13240
13241         * ChangeLog: Fix author of memory leak patch.
13242
13243 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
13244
13245         * Makefile.am: fix make dist as well...
13246
13247
13248 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
13249
13250         * cfold.c: Made so that conversions from pointer to int4 are no-ops
13251         on archs where pointers are 4 bytes long.
13252
13253         * Makefile.am: Added abcremoval.c source file.
13254
13255         * abcremoval.c: Added abcremoval.c.
13256
13257         * abcremoval.h: Added abcremoval.h.
13258
13259         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
13260
13261         * inssel.brg: Enabled bounds check removal.
13262
13263         * mini.c: Added support for abcrem optimization.
13264
13265         * mini.h: Added abcrem optimization label.
13266
13267         * driver.c: Added support for abcrem optimization.
13268
13269         * propagated_relations_table.def: Added propagated_relations_table.def.
13270
13271 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
13272
13273         * mini.c, cfold.c: fix style.
13274
13275 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13276
13277         * mini.c: handle issue with the low-level implementation of
13278         some long opcodes (bug #54209).
13279
13280 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
13281
13282         * basic.cs: test for my new cmov stuff.
13283
13284 2004-05-13      Patrik Torstensson
13285
13286         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
13287         opt and added peephole documentation.
13288
13289 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
13290
13291         * tramp-ppc.c: rewrote the generic trampoline code.
13292
13293 2004-05-11      Patrik Torstensson
13294
13295         * mini-x86.c: optimize long shl/shr asm code (one less branch)
13296
13297 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
13298
13299         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
13300
13301         * mini.h mini.c dominators.c: Applied patch from Derek Woo
13302         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
13303
13304         * mini.c: Add new icalls for AsAny marshalling.
13305
13306 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
13307
13308         * tramp-ppc.c, mini-ppc.c: more cleanups.
13309
13310 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13311
13312         * mini.c: no warnings.
13313
13314 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13315
13316         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
13317
13318 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
13319
13320         * mini.c: In the thread abort signal handler, if the thread is in the
13321         process of being stoped, don't throw the Abort exception, just stop the
13322         thread.
13323
13324 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
13325
13326         * tramp-ppc.c: removed old code.
13327
13328 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13329
13330         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
13331         do some simple speed optimizations on ppc.
13332
13333 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
13334
13335         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
13336         and large offsets in load/store.
13337
13338 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
13339
13340         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
13341         it causes regressions.
13342
13343 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
13344
13345         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
13346         support.
13347
13348 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13349
13350         * jit-icalls.c: remove warnings.
13351         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
13352         speedups for unsafe code.
13353
13354 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
13355
13356         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
13357
13358 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
13359
13360         * basic-calls.cs: Add new regression test.
13361
13362         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
13363         more portable.
13364
13365         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
13366
13367         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
13368         is no longer used.
13369
13370 2004-05-06      Patrik Torstensson
13371
13372         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
13373         long reg allocation in any reg (not only eax:edx) and implemented 
13374         long shl/shr ops in asm instead of helpers.
13375
13376 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
13377
13378         * mini-sparc.h: Fix warnings.
13379
13380         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
13381         stack.
13382
13383         * mini-exceptions.c (mono_handle_exception): Call the filter in a
13384         separate statement for clarity.
13385
13386         * mini-sparc.c: Update status.
13387
13388 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
13389
13390         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
13391         here.
13392
13393 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13394
13395         * inssel-ppc.brg: another small pre-release workaround:
13396         we don't do overflow detection for long_sub_un.
13397
13398 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13399
13400         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
13401         (also works around a weird ppc bug: 57957).
13402
13403 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
13404
13405         * tramp-ppc.c: trampoline fixes.
13406
13407 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
13408
13409         * mini-ppc.c: fixed typos.
13410
13411 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
13412
13413         * mini-ppc.c, exceptions-ppc.c: more code saves registers
13414         at the top of the stack. Fixed typos. Use a frame registers
13415         for all the methods with exception clauses.
13416
13417 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
13418
13419         * exceptions-ppc.c: restore fp registers.
13420
13421 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
13422
13423         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
13424         order from the stack top (moved the stack room to save the
13425         return value for trace after the param area). Fixed corruption
13426         in restoring registers on unwind.
13427
13428 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
13429
13430         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
13431
13432 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13433
13434         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
13435         and prolog/epilog for methods that use it. Allow
13436         enough param area room for varargs methods. Fix miguel's
13437         breakage in exception handling.
13438
13439 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13440
13441         * Makefile.am: run genmdesc only on current arch.
13442
13443 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13444
13445         * exceptions-x86.c:
13446         * mini-x86.h: fix the build on windows.
13447
13448 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
13449
13450         * 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.
13451
13452         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
13453
13454         * mini-exceptions.c: New file.
13455         
13456         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
13457         Move some parts of the x86 exception handling code to an 
13458         arch-independent file so it can be shared with other ports.
13459
13460 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
13461
13462         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
13463
13464 2004-04-26  David Waite  <mass@akuma.org>
13465
13466         * driver.c: remove comma from end of enumeration declaration
13467
13468 2004-04-26  Jackson Harper  <jackson@ximian.com>
13469
13470         * driver.c: parse config file before loading first assembly. This
13471         allows the user gac to be enabled/disabled. 
13472         
13473 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
13474
13475         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
13476         simpler mechanism: we do not care what is encoded initially
13477         (branch absolute or relative), we care about the code and its
13478         target.  I kept the old code for reference for now.
13479
13480         The new code tries first to determine if the jump is anywhere in
13481         the -/+32 absolute meg range, if it succeeds, it encodes using the
13482         absolute branch;  If not, it tried to find something in the
13483         relative range, if not, it uses the handle_thunk code. 
13484
13485 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
13486
13487         * exceptions-ppc.c: use the correct ip register on macosx.
13488
13489 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
13490
13491         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
13492
13493 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
13494
13495         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
13496         Raise exception on integer divide by zero by hand since the hw
13497         doesn't support it. Handle NaNs in FP compares.
13498
13499 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
13500
13501         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
13502         code reducing duplication between the platforms and enabled
13503         signal exception handling (on linux for now).
13504
13505 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
13506
13507         * exceptions-ppc.c: more macosx support.
13508
13509 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13510
13511         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
13512
13513 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
13514
13515         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
13516
13517 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
13518
13519         * iltests.il: more tests.
13520
13521 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
13522
13523         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
13524         vars as well.
13525
13526 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
13527
13528         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
13529
13530 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
13531
13532         * liveness.c: Mark variables as volatile in all basic blocks reachable
13533         from exception clauses.
13534
13535 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
13536
13537         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
13538         inlining.
13539
13540 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
13541
13542         * iltests.il, basic.cs: more tests for regalloc.
13543
13544 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13545
13546         * iltests.il: Some tests for register allocation modifications
13547         I have locally.
13548
13549 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
13550
13551         * exceptions.cs: Add regression test for bug #56782.
13552
13553         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
13554         original stack trace if an exception is rethrown. Fixes #56782. Oh,
13555         the beauty of fixing the same thing in 5 different files...
13556
13557 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
13558
13559         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
13560         methods.
13561
13562 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
13563
13564         * mini.c: Add support for STRWLPARRAY marshalling convention.
13565
13566 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
13567
13568         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
13569         to init the context to setup the regs pointer).
13570
13571 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
13572
13573         * exceptions-ppc.c: more exceptions work.
13574
13575 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13576
13577         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
13578         not allowed.
13579
13580 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
13581
13582         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
13583         can use the memory directly.
13584
13585         * cpu-pentium.md: Update documentation from a post from Zoltan. 
13586
13587         add x86_add_membase, x86_sub_membase, x86_mul_membase
13588
13589 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
13590
13591         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
13592         GENERAL_REGS they were also hardcoded for all PPC ports.
13593
13594         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
13595
13596         Remove hard-coded limit for floating point registers, use
13597         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
13598
13599         Notice that in MacOS X calling conventions you can fit a lot more
13600         floating point values in registers, so I should update the PInvoke
13601         test to excercise the passing of floating point values on the
13602         stack (currently broken).
13603         
13604 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
13605
13606         * tramp-ppc.c (create_trampoline_code): Added
13607         JUMP_TRAMPOLINE_SIZE. 
13608         (ppc_magic_trampoline): Follow the pattern from
13609         x86_magic_trampoline: if code is set to zero, return. 
13610         (create_trampoline_code): Always pass MonoMethod to the jump
13611         trampoline, before it was passing a null.
13612         (mono_arch_create_jump_trampoline): Implement the jump stub, could
13613         share the code with mono_arch_create_jit_trampoline. 
13614
13615         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
13616         implemented.
13617         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
13618         implemented.  
13619
13620         * cpu-g4.md: Added length for jmp instruction, the worst case
13621         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
13622         for save_lmf).
13623
13624 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
13625
13626         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
13627
13628 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
13629
13630         * mini.c: Only set bblock->real_offset when adding a new bblock, and
13631         before each IL instruction.
13632
13633         * mini.c (CEE_BOX): Fix warnings.
13634
13635 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13636
13637         * mini.c: removed a few unused vars and extra whitespace.
13638
13639 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
13640
13641         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
13642         checks.
13643         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
13644         index.
13645         (OP_GETCHR): use the above
13646         (CEE_LDELEMA): use the above.
13647
13648         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
13649         version of the generic impl.
13650         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
13651         (CEE_LDELEMA): use the above.
13652
13653 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
13654
13655         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
13656         Fixes #56317.
13657
13658         * iltests.il: Added new regression test for #56317.
13659
13660 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
13661
13662         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
13663         under NetBSD. Fixes #56450.
13664
13665         * liveness.c (update_gen_kill_set): Fix previous patch.
13666
13667 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13668
13669         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
13670
13671 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
13672
13673         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
13674         ldsfld and ldsflda.
13675
13676         * inssel-sparc.brg: Add more optimizations.
13677
13678         * mini-sparc.c: Replace multiply/divide with shifts if possible.
13679
13680 2004-04-01  Martin Baulig  <martin@ximian.com>
13681
13682         * mini.c (handle_box): New static function; moved the
13683         implementation of CEE_BOX here.
13684         (mono_method_to_ir): Added `constrained_call' variable.
13685         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
13686         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
13687         mono_method_get_constrained() to get the method.
13688
13689 2004-04-01  Martin Baulig  <martin@ximian.com>
13690
13691         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
13692         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
13693         (mono_method_to_ir): We don't need these macros anymore since
13694         mono_class_get_full() already takes care of it. 
13695
13696 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13697
13698         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
13699         use @function (as doesn't accept #function here) and check the return
13700         value of system and stop if fails.
13701
13702 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13703
13704         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
13705
13706 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
13707
13708         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
13709
13710         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
13711
13712         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
13713         #56223.
13714
13715         * basic-long.cs: Add test for negation of Int64.MinValue.
13716
13717 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
13718
13719         * mini-sparc.c: Update status.
13720
13721         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
13722
13723         * exceptions-sparc.c: Fix return value in filters.
13724
13725         * inssel-sparc.brg: Fix register allocation in some rules.
13726
13727 2004-03-28  Martin Baulig  <martin@ximian.com>
13728
13729         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
13730         if neccessary.  
13731
13732 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
13733
13734         * mini-x86.c (mono_arch_patch_code): Fix warnings.
13735         
13736         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
13737         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
13738         remove unused conv_u4 opcode.
13739
13740         * mini-x86.c: Remove valgrind workaround since it slows down things
13741         even when mono is not run under valgrind.
13742
13743 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
13744
13745         * mini-sparc.c: Update status.
13746
13747         * inssel-sparc.brg: Add some optimizations.
13748
13749         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
13750         future delay slot filling. Add support for varargs, tail calls and JMP.
13751
13752         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
13753         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
13754
13755         * inssel.brg: Fix register allocation in OP_ARGLIST.
13756
13757         * inssel.brg: Fix warnings.
13758
13759 2004-03-25  Martin Baulig  <martin@ximian.com>
13760
13761         * mini.c (inflate_generic_field): Removed.
13762         (mini_get_method): Removed, use mono_get_method_full(),
13763         (mini_get_class): Removed, use mono_class_get_full().
13764         (mono_method_to_ir): Pass our generic context to
13765         mono_field_from_token().        
13766
13767 2004-03-25  Martin Baulig  <martin@ximian.com>
13768
13769         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
13770         of a `MonoMethod *'.
13771         (mini_get_method): Take a `MonoGenericContext *' instead
13772         of a `MonoMethod *'.
13773         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
13774         a new local variable called `generic_context' which holds the
13775         current `MonoGenericContext *'; use it to lookup things.
13776
13777 2004-03-24  Martin Baulig  <martin@ximian.com>
13778
13779         * mini.c (mini_get_class): New static method; if we're inside a
13780         generic instance, inflate the class if neccessary.
13781         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
13782
13783 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
13784
13785         * iltests.il: New regression test for #55976.
13786
13787         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
13788         #55976.
13789
13790 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
13791
13792         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
13793         output.
13794
13795 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
13796
13797         * liveness.c: Consider SSA stores as well as loads when making vars
13798         volatile.
13799
13800         * exceptions.cs: New regression tests for register allocation.
13801         
13802 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
13803
13804         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
13805         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
13806           domain lock only to protect puntual access to data structures.
13807           Added access lock for sighash, jit_icall_hash_name, 
13808           jit_icall_hash_addr and domain->code_mp.
13809
13810 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
13811
13812         * driver.c: Print SIGSEGV handling method.
13813
13814         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
13815
13816         * mini.c (setup_jit_tls_data): Handle case when this is called
13817         multiple times for a thread.
13818
13819         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
13820         is different from fbxx_un. Fixes #54303. Also use constants instead of
13821         magic numbers in a lot of places.
13822
13823 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
13824
13825         * exceptions.cs: Fix cctor test when --regression is used.
13826
13827 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
13828
13829         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
13830         for Linux/ppc.
13831
13832 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
13833
13834         * inssel-ppc.brg: fixed register assignments for some rules.
13835
13836 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
13837
13838         * exceptions.cs: Add test for exceptions in static constructors.
13839
13840         * mini.c (mono_jit_compile_method_with_out): Move the calling of
13841         static constructors outside the domain lock. Fixes #55720.
13842
13843 2004-03-17  Martin Baulig  <martin@ximian.com>
13844
13845         * mini.c (get_generic_field_inst): Removed, this'll never happen.
13846         (inflate_generic_field): Take the `MonoMethod *' instead of the
13847         `MonoClass *' and added support for generic method.
13848         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
13849         have a `field->parent->gen_params', only inflate the field if it's
13850         an open constructed type.
13851
13852 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
13853
13854         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
13855         exception object instead of the preconstructed ones.
13856
13857 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13858
13859         * mini.c: reverted changed to sigsegv_signal_handler commited
13860         accidentally in the previous patch.
13861
13862 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13863
13864         * mini.c:
13865         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
13866         running --aot with an old assembly.
13867
13868 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
13869
13870         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
13871         point values.
13872
13873         * mini-sparc.c: Add support for v9 branches with prediction.
13874
13875 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
13876
13877         * mini.c (mini_init): #warning is GNUC only
13878
13879         * mini-sparc.h: implement __builtin_frame_address
13880         and __builtin_return_address for Sun C compiler
13881
13882 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
13883
13884         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
13885
13886 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
13887
13888         * basic-calls.cs: Add test for unaligned byref long argument passing.
13889
13890         * mini-ops.h: Add sparcv9 compare and branch instructions.
13891
13892         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
13893         v9 instructions if we have a v9 cpu.
13894
13895         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
13896         registers for global allocation.
13897
13898         * exceptions-sparc.c: Fixes.
13899         
13900 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
13901
13902         * liveness.c (mono_analyze_liveness): Optimized version.
13903
13904         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
13905
13906         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
13907         sparc work.
13908
13909         * basic-float.cs basic-calls.cs: New regression tests.
13910
13911 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
13912
13913         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
13914         sigaltstack implementation.
13915
13916         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
13917         
13918         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
13919         stuff if SIGSEGV_ON_ALTSTACK is not defined.
13920
13921 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
13922
13923         * mini.c: Fix warnings.
13924         
13925         * mini.c (mono_resolve_patch_target): New function which contains the
13926         arch independent part of the patching process.
13927
13928         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
13929         patching code to a separate function.
13930
13931 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
13932
13933         * mini.c (add_signal_handler): ifdef out on Windows
13934
13935 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
13936
13937         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
13938         cpu-sparc.md: Add exception handling support + other fixes.
13939
13940         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
13941         typed GC detection in --version.
13942
13943         * basic.cs exceptions.cs: New regression tests.
13944
13945         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
13946         the arch specific code can store data during a compilation.
13947
13948         * mini-ops.h: Add OP_SETFRET.
13949
13950         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
13951         function, register a separate icall for each arity, so the icalls can
13952         get a wrapper.
13953         
13954         * mini.c (mono_print_tree): Print negative offsets in a more readable
13955         form.
13956         
13957         * mini.c: Make signal handling work on sparc.
13958         
13959         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
13960
13961         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
13962
13963         * jit-icalls.c: Emulate truncl by aintl on solaris.
13964
13965         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
13966
13967 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
13968
13969         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
13970
13971 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
13972
13973         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
13974         a MarshalByRef type, inline a method that performs the check, taking into
13975         account that the object can be a proxy. Also implemented tow new opcodes:
13976         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
13977         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
13978         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
13979
13980 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
13981
13982         * mini-ppc.c: if a relative branch displacement is too big
13983         but it points to and area reachable with an absolute branch, 
13984         avoid the thunks.
13985
13986 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
13987
13988         * mini.c: optimize small copies in cpblk.
13989
13990 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
13991
13992         * basic-calls.cs basic-float.cs: New regression tests.
13993
13994         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
13995         negative offsets from %fp. Implement localloc. Fix local register 
13996         allocation. Fix the case when the this argument needs to be saved to
13997         the stack. Implement some missing opcodes.
13998
13999 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
14000
14001         * mini.c (mini_method_compile): Reenable global regalloc in methods
14002         with exception handlers.
14003
14004         * linear-scan.c (mono_varlist_sort): Fix warning.
14005
14006         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
14007
14008         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
14009         regalloc costs.
14010
14011         * liveness.c: Make all variables uses in exception clauses volatile, to
14012         prevent them from being allocated to registers. Fixes #42136.
14013
14014 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
14015
14016         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
14017         causes regressions.
14018
14019         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
14020         argument to mono_arch_regalloc_cost.
14021
14022         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
14023         precisely.
14024
14025 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
14026
14027         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
14028         Make the cost of allocating a variable to a register arch dependent.
14029
14030         * basic-calls.cs: Fix compilation of tests.
14031         
14032         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
14033         helper function to cut back on the number of #ifdefs needed.
14034
14035         * mini-ppc.c: Fix compilation.
14036
14037         * basic-calls.cs: New regression tests.
14038
14039         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
14040
14041         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
14042         of l0 since that is callee saved.
14043
14044         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
14045         to virtual calls.
14046
14047         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
14048         of delay instruction.
14049
14050         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
14051
14052         * mini.h (MonoCallInst): Add 'virtual' flag.
14053
14054         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
14055
14056 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
14057
14058         * *.cs: New regression tests.
14059
14060         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
14061         work.
14062
14063         * mini.c (mono_runtime_install_handlers): Fix build.
14064
14065         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
14066         'signal_stack_size' members.
14067
14068         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
14069         alternate signal stack.
14070
14071         * exceptions-x86.c: Add stack overflow handling.
14072
14073         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
14074         functions to arch independent code.
14075
14076         * mini.c (mono_print_tree): Print more detailed info for load_membase
14077         opcodes.
14078         
14079 2004-02-23  Martin Baulig  <martin@ximian.com>
14080
14081         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
14082
14083 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
14084
14085         * mini-x86.c: fixed reg allocation for div/rem.
14086
14087 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
14088
14089         * driver.c (mono_main): Report some configuratio options on --version.
14090
14091 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
14092
14093         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
14094         low in the address space. Correctly flush memory in thunks where we
14095         output native code.
14096
14097 2004-02-20  Martin Baulig  <martin@ximian.com>
14098
14099         * mini.c (mini_get_method): New static method; inflate all generic
14100         methods and methods in open generic instances.
14101         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
14102         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
14103
14104 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
14105
14106         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
14107
14108         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
14109
14110 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
14111
14112         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
14113
14114         * mini-sparc.c (flushi mono_arch_output_basic_block): make
14115         it compile using Sun's compiler.
14116
14117 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
14118
14119         * 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.
14120
14121         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
14122
14123 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
14124
14125         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
14126         code.
14127         * mini-ppc.c: handle calls outside of the allowed range with thunks
14128         allocated using the code manager.
14129         * tramp-ppc.c: use the code manager to hold generated native code.
14130         Fixed the magic trampoline to just patch vtable entries.
14131
14132 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
14133
14134         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
14135         independent file.
14136
14137 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
14138
14139         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
14140         PPC.
14141
14142         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
14143         if we have a working __thread implementation.
14144
14145         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
14146         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
14147
14148 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
14149
14150         * mini-x86.c: Fix compilation under gcc 2.
14151         
14152 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
14153
14154         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
14155         contains a call to the wrapped function.
14156
14157         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
14158         OP_<CALL>_IMM opcodes, and use them under X86.
14159         
14160         * mini.c (mono_jit_find_compiled_method): Fix warning.
14161
14162         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
14163
14164         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
14165
14166         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
14167         functionality to mini.c.
14168
14169         * mini.c (mono_create_jump_trampoline): New function to create a jump
14170         trampoline. Return a compiled method instead of a trampoline if it
14171         exists. Add a cache for jump trampolines.
14172
14173         * mini.c (mono_jit_find_compiled_method): New function to return a
14174         compiled method if it exists.
14175
14176         * mini-x86.c: Call mono_create_jump_trampoline instead of 
14177         mono_arch_create_jit_trampoline.
14178
14179         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
14180         a jump trampoline. Fixes #52092.
14181         
14182 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
14183
14184         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
14185         which is not up-to-date. Add check_corlib_version () instead.
14186
14187         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
14188         have to call it.
14189         
14190         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
14191         since newer valgrind versions do not need it.
14192
14193         * mini.c (mono_jit_compile_method_with_opt): New helper function to
14194         compile a method with a given set of optimizations.
14195
14196         * mini.c: Compile icall wrappers on-demand instead of at startup.
14197
14198         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
14199         wrapper for an icall.
14200
14201 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
14202
14203         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
14204         #54063.
14205
14206         * iltests.il: Add test for non-empty stack before switch instruction.
14207
14208 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
14209
14210         * mini.c: Add support for new stringbuilder marshalling conventions.
14211
14212         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
14213
14214 2004-02-01  Martin Baulig  <martin@ximian.com>
14215
14216         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
14217         in `ginst->mtype_argv'.
14218
14219 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
14220
14221         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
14222         facilitate grepping.
14223
14224 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
14225
14226         * mini.c: fixed buglet in initobj generic implementation for references.
14227
14228 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
14229
14230         * Makefile.am: make the version script conditional.
14231         * jit-icalls.c: handle missing truncl().
14232
14233 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
14234
14235         * exceptions.cs: Add more tests for double->int conversion.
14236
14237         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
14238         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
14239
14240 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
14241
14242         * driver.c: make --verbose --version emit an error
14243         if the loaded corlib doesn't match the runtime version.
14244
14245 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
14246
14247         * mini-ppc.h: export ppc_patch().
14248         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
14249         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
14250         on par or better than on MacOSX.
14251
14252 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
14253
14254         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
14255         mono_lookup_pinvoke_call.
14256
14257         * mini-x86.c: Under windows, the default pinvoke calling convention is
14258         stdcall. Fixes #52834.
14259
14260         * mini.c (optimize_branches): Add an upper bound to the number of
14261         iterations to prevent infinite loops on strange loops. Fixes #53003.
14262
14263 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
14264
14265         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
14266         and ISINST. Fixes #52093.
14267
14268         * objects.cs (test_0_vector_array_cast): New tests.
14269         
14270 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
14271
14272         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
14273         checking in Array.Set ().
14274
14275         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
14276         #52590.
14277
14278         * object.cs (test_0_multi_array_cast): New regression test.
14279
14280 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
14281
14282         * exceptions-ppc.c: fix build on Linux/PPC.
14283
14284 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
14285
14286         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
14287         running under valgrind.
14288         (x86_magic_trampoline): Fix build bustage.
14289
14290         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
14291         negative values as well. This is needed for the encoding of the line number
14292         info, since sometimes the line numbers are not in increasing order.
14293
14294 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
14295
14296         * cpu-pentium.md (localloc): Increase the size of the localloc 
14297         instruction since it is a loop under Win32.
14298
14299         * debug-mini.c (record_line_number): Get rid of unneccesary memory
14300         allocation.
14301
14302 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
14303
14304         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
14305         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
14306         Max Horn (max@quendi.de). Fix file names in comments.
14307
14308 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
14309
14310         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
14311         avoid stack overflow.
14312         (replace_usage): Avoid uninitialized variable warnings.
14313
14314         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
14315         and taking the address of valuetype variables.
14316
14317 2004-01-03  Patrik Torstensson
14318
14319         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
14320         for other purposes than FP later on.
14321
14322 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
14323
14324         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
14325         of tail calls.
14326
14327 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
14328
14329         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
14330
14331 2003-12-30  Patrik Torstensson <p@rxc.se>
14332
14333         * mini-x86.h: Decreased number of availiable fp regs.
14334         Solves corner cases with FP spilling.
14335
14336 2003-12-23  Patrik Torstensson <p@rxc.se>
14337
14338         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
14339         for floating point stack tracking / spilling on x86. 
14340         Fixes bug #49012.
14341         
14342         * basic-float.cs: added float mul overflow test.
14343
14344 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
14345
14346         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
14347
14348 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14349
14350         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
14351         supports for cond branches that overflow the immediate
14352         overflow offset. mcs can compile simple programs.
14353
14354 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14355
14356         * exceptions-ppc.c: exception handling support wip:
14357         finally handlers get run on exception.
14358
14359 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
14360
14361         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
14362         profiling.
14363
14364 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
14365
14366         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
14367         initial support for stack walking and unwinding.
14368
14369 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
14370
14371         * driver.c (mono_main): Make corlib-out-of-sync message more 
14372         descriptive. Also remove verify_corlib call.
14373
14374 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
14375
14376         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
14377         not overlap with other call's arguments, too.
14378
14379 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
14380
14381         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
14382         move to arch-specific code the choice of arch-specific
14383         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
14384         * mini.c: ensure emulation calls will not interleave
14385         with other calls.
14386
14387 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
14388
14389         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
14390         the magic trampoline stack frame is dropped before executing
14391         the new method.
14392
14393 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14394
14395         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
14396         and integer to fp conversions. Added support for overflowing
14397         arguments on the stack. Reserve a couple more registers as temps.
14398         Added support for aot compilation (as output still needs to be
14399         tweaked, though).
14400
14401 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14402
14403         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
14404         Don't overwrite return register in some corner cases.
14405
14406 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
14407
14408         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
14409         static constructors when AOT compiling.
14410
14411         * driver.c (mono_main): Call mono_check_corlib_version.
14412
14413 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
14414
14415         * cpu-g4.md, basic.cs: fixed div target register.
14416
14417 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
14418
14419         * mini-ppc.c, basic.cs: shl_imm fix with test.
14420
14421 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
14422
14423         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
14424         structures by value. Misc fixes.
14425         * objects.cs: more tests.
14426
14427 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
14428
14429         * mini-ppc.c: lconv.ovf.i implemented.
14430
14431 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14432
14433         * mini.c:
14434         (mini_init): don't error out if someone already called g_thread_init.
14435
14436 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
14437
14438         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
14439         to be any type per the spec. Fix abnormal memory usage when
14440         the same object is repeatedly thrown.
14441
14442 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
14443
14444         * mini.c: check for overruns in IL code.
14445
14446 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
14447
14448         * TODO: Add/remove some todo entries.
14449
14450 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
14451
14452         * driver.c (mono_main): Call mono_verify_corlib.
14453
14454 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
14455
14456         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
14457         This has been moved to mini.c
14458         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
14459         type being casted is marshalbyref it could be a proxy, so instead of
14460         emitting the type check code, emit a call to a runtime method that will
14461         perform the check by calling CanCastTo if needed.
14462
14463 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
14464
14465         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
14466         methods with large stack frames under Win32.
14467
14468 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
14469
14470         * Makefile.am: Distribute regression tests.
14471
14472         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
14473         at the end instead of inserting each variable into the sorted list.
14474
14475         * linear-scan.c (mono_varlist_sort): New helper function.
14476         
14477 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
14478
14479         * mini.c: ensure arguments and locals are within bounds.
14480
14481 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14482
14483         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
14484         related fixes.
14485
14486 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
14487
14488         * mini.c (mono_cprop_copy_values): Fix crash.
14489
14490         * aot.c: Set verbosity back to 0.
14491         
14492 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14493
14494         * regalloc.c: complete memory leak fix by Laurent Morichetti
14495         (l_m@pacbell.net).
14496
14497 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
14498
14499         * driver.c (main_thread_handler): Revert the previous patch.
14500
14501         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
14502         under valgrind.
14503
14504         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
14505         memory from the memory pool.
14506
14507         * driver.c (main_thread_handler): Turn on all optimizations when
14508         --aot is used.
14509
14510         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
14511         an array for better performance.
14512
14513         * regalloc.c (mono_regstate_assign): Fix memory leak.
14514
14515         * debug-mini.c (mono_debug_serialize_debug_info): New function to
14516         serialize the debug info.
14517
14518         * debug-mini.c (mono_debug_add_aot_method): New function to load the
14519         debug info from the serialized representation.
14520
14521         * aot.c: Save debug info into the generated file and load it when 
14522         loading a method.
14523
14524         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
14525
14526 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
14527
14528         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
14529         More FP-related fixes.
14530
14531 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
14532
14533         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
14534         and register allocation buglet. Hello world now runs.
14535
14536 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
14537
14538         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
14539         * tramp-ppc.c: fixed class init trampoline.
14540         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
14541
14542 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
14543
14544         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
14545         mini.c: more ppc changes/fixes.
14546
14547 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
14548
14549         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
14550         Also optimize the case when the arguments are the same in the caller 
14551         and in the callee.
14552
14553         * iltests.il: Add tests for tail calls with valuetype arguments.
14554
14555 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
14556
14557         * mini-ppc.c: fixes for struct return type.
14558
14559 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
14560
14561         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
14562         mono_spillvar_offset() to arch-specific code.
14563
14564 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
14565
14566         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
14567
14568 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
14569
14570         * exceptions-x86.c: Fix stack space leaks.
14571         
14572         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
14573         registers from the lmf if the method has save_lmf set.
14574
14575 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
14576
14577         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
14578         of icall wrappers into InvokeInDomain, since these are now per-domain.
14579
14580 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
14581
14582         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
14583         make some opcode emulation and intrinsic ops enabled/disabled 
14584         according to the architecture. More fixes.
14585
14586 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
14587
14588         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
14589
14590 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
14591
14592         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
14593         arch-specific handling for 'this' and struct return type to
14594         arch-specific code.
14595
14596 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14597
14598         * aot.c: prevent divide by zero error when reporting (it happened with
14599         Accessibility.dll).
14600
14601 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
14602
14603         * mini.h (inst_switch): Remove unused macro.
14604
14605 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14606
14607         * aot.c:
14608         (load_aot_module): free 'info->methods' and 'info' properly. No more
14609         "free(): invalid pointer blah" messages when you have an old aot
14610         compiled assembly.
14611
14612 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
14613
14614         * jit-icalls.c, mini.c: Added support for context static fields.
14615
14616 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
14617
14618         * mini.c (mono_method_blittable): Methods which set LastError are not 
14619         blittable either. Fixes #51108.
14620         
14621 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
14622
14623         * mini.c: flush icache.
14624         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
14625
14626 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
14627
14628         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
14629
14630 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
14631
14632         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
14633         safe on IA32.
14634
14635         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
14636         vararg calls.
14637
14638         * inssel.brg (CEE_MKREFANY): Fix AOT case.
14639
14640 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
14641
14642         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
14643         instruction when the result is discarded.
14644
14645         * iltests.il (test_0_div_regalloc): New regression test.
14646
14647         * arrays.cs: Fix compilation error.
14648
14649 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
14650
14651         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
14652         float rules to inssel-x86.brg: sane architectures with FP registers
14653         don't need to implement these rules.
14654
14655 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
14656
14657         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
14658
14659 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14660
14661         * mini.h, inssel-long32.brg: fixed endianess issues in int64
14662         implementation of 32 bit systems.
14663
14664 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
14665
14666         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
14667         (Jeroen Zwartepoorte).
14668
14669 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
14670
14671         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
14672         the caller and the callee matches.
14673         
14674         * mini.c (mono_method_to_ir): Add comment.
14675
14676         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
14677         signbit is missing on some platforms.
14678
14679 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
14680
14681         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
14682
14683         * mini.c (setup_jit_tls_data): Call the new function.
14684         
14685         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
14686
14687         * mini-x86.c: Add experimental support for fast access to the lmf
14688         structure under NPTL/Linux 2.6.x.
14689
14690 2003-11-06  Martin Baulig  <martin@ximian.com>
14691
14692         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
14693         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
14694         the debugger.
14695
14696 2003-11-02  Martin Baulig  <martin@ximian.com>
14697
14698         * mini.c (inflate_generic_field): New static method.
14699         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
14700         generic instance and the field is declared in a generic type, call
14701         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
14702
14703 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
14704
14705         * mini.h mini.c (mono_method_same_domain): New function to return
14706         whenever the caller and the callee are in the same domain.
14707
14708         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
14709
14710 2003-10-30  Martin Baulig  <martin@ximian.com>
14711
14712         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
14713         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
14714         method parameters.
14715         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
14716         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
14717
14718 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
14719
14720         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
14721         propagation.
14722
14723         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
14724         object here, so it is in the correct appdomain etc.
14725
14726 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
14727
14728         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
14729         already done.
14730         (mono_method_to_ir): Avoid freeing the type created returned from
14731         mono_type_create_from_typespec, since it is put into an internal cache
14732         by the function. Fixes pointer.exe.
14733
14734         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
14735         trampolines for icalls and pinvokes as well. Fixes #33569.
14736
14737 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
14738
14739         * mini.c: Update after appdomain changes.
14740
14741         * mini.c (mono_jit_compile_method_inner): Allways compile native
14742         method wrappers in the root domain, since there can only be one
14743         instance of them, whose address is stored in method->info.
14744
14745 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
14746
14747         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
14748         environment variable. Instead detect automatically whenever running
14749         under valgrind using the magic macro RUNNING_ON_VALGRIND from
14750         valgrind.h.
14751
14752 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
14753
14754         * trace.c, trace.h: New files that implement the new trace option
14755         parsing. 
14756
14757         * driver.c: Document new --trace options.
14758
14759         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
14760         mini-x86.c: Apply:
14761
14762         -       if (mono_jit_trace_calls)
14763         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
14764
14765         * mini.h: prototypes.
14766         
14767 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
14768
14769         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
14770
14771         * mini.c inssel.brg: Implement typedefbyref opcodes.
14772
14773         * mini.c (mono_jit_compile_method): Remove unused local variable.
14774
14775         * mini.c (mono_jit_compile_method_inner): Ditto.
14776         
14777 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
14778
14779         * tramp-x86.c (x86_class_init_trampoline): Fix build.
14780         
14781         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
14782
14783 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
14784
14785         * mini.c (mono_no_aot): Remove unused global variable.
14786
14787         * mini.c: Thread safety fixes.
14788
14789 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
14790
14791         * mini.c (mono_create_class_init_trampoline): Add a lock around
14792         class_init_hash_addr.
14793
14794         * arrays.cs (test_0_newarr_emulation): Add new regression test for
14795         #30073.
14796
14797         * mini.c: Decompose the NEWARR instruction before decomposing its
14798         arguments. Fixes #30073.
14799
14800 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
14801
14802         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
14803         convention.
14804
14805 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
14806
14807         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
14808
14809         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
14810
14811         * driver.c: Add support for compiling icall wrappers to --compile.
14812
14813 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
14814
14815         * inssel.brg: The empty value in class->interface_offsets is -1, not
14816         0. Fixes #49287.
14817
14818 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
14819
14820         * objects.cs: New test for 'is' operator on an array of interfaces.
14821
14822 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
14823
14824         * tramp-ppc.c: update trampoline code to support jumps
14825         and class initialization.
14826
14827 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
14828
14829         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
14830
14831         * inssel.brg (OP_UNBOXCAST): Fix #46027.
14832
14833         * inssel.brg (OP_UNBOX): Remove unused rule.
14834
14835         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
14836         region instead of one for each method. Fixes #47813.
14837
14838 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
14839
14840         * exceptions.cs (test_0_nested_finally): New regression test for
14841         nested exception handlers.
14842
14843         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
14844
14845         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
14846
14847         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
14848         inlining.
14849
14850         * mini.c (mono_method_check_inlining): Make the inlining limit 
14851         configurable by an environment variable.
14852         
14853         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
14854
14855         * mini.h: Bump AOT file version.
14856
14857         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
14858         token, store the image along with the token, since the token might not 
14859         refer to the same image as the method containing the relocation, 
14860         because of inlining.
14861
14862 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
14863
14864         * mini.c (mono_precompile_assemblies): New function to compile
14865         all methods in all loaded assemblies.
14866
14867         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
14868
14869         * regalloc.h regalloc.c (MonoRegState): Change the type of 
14870         iassign and fassign to int*, since they can contain large negative
14871         values if the register is spilled. Also added some comments. Fixes
14872         #45817.
14873
14874         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
14875         under Win32. Fixes #42964.
14876
14877 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
14878
14879         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
14880
14881         * aot.c: Added support for AOT compiling methods which contain calls
14882         to wrappers. Currently, only remoting-invoke-with-check wrappers are
14883         handled.
14884         
14885         * driver.c (compile_all_methods): Run the compilation in a thread
14886         managed by mono. Fixes #44023.
14887
14888         * mini.c (mono_codegen): Print full method name in verbose output.
14889
14890         * mini-x86.c (mono_arch_patch_code): Fix warning.
14891         
14892         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
14893         jumps, since the method we are jumping to might be domain-specific.
14894
14895         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
14896
14897 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
14898
14899         * inssel.brg: string chars are unsigned.
14900
14901 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
14902
14903         * TODO: New todo item.
14904
14905         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
14906         which calls mono_runtime_class_init and patches the call site to
14907         avoid further calls.
14908         (mono_arch_create_class_init_trampoline): New arch specific function 
14909         to create a class init trampoline.
14910         (create_trampoline_code): Generalized so it can create
14911         class init trampolines as well.
14912
14913         * mini.c (helper_sig_class_init_trampoline): New helper variable.
14914         (mono_create_class_init_trampoline): New function to create and cache
14915         class init trampolines.
14916         (mono_find_class_init_trampoline_by_addr): New function to lookup the
14917         vtable given the address of a class init trampoline. Used by the
14918         patching process.
14919         (mono_codegen): Generate a call to a trampoline instead of
14920         mono_runtime_class_init in LDSFLD[A].
14921         (mono_codegen): Add relocations for the new trampoline.
14922         
14923         * mini.h mini-x86.c aot.c: Added a new relocation type: 
14924         MONO_PATCH_INFO_CLASS_INIT.
14925
14926         * mini.h: Bump AOT version number.
14927
14928         * aot.c: Create a copy of the loaded code instead of using the original
14929         so methods which call each other will be close in memory, improving
14930         cache behaviour.
14931         
14932         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
14933         patch since it breaks the regression tests.
14934         
14935         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
14936         for the register saving instruction sequence since the 
14937         frame_state_for function in glibc 2.3.2 don't seem to detect it.
14938
14939 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
14940
14941         * TODO: Fix todo item && remove another.
14942
14943 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
14944
14945         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
14946         previous checkin.
14947
14948         * aot.c: Moved the check for MONO_LASTAOT into the initialization
14949         function of the module.
14950
14951         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
14952         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
14953         --no-aot command line option.
14954
14955 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
14956
14957         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
14958         by Bernie Solomon (bernard@ugsolutions.com).
14959
14960         * inssel.brg: Refactor the interface offset table related code into
14961         its separate functions and add support for the AOT case.
14962
14963 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
14964
14965         * aot.c (mono_aot_get_method_inner): Fix memory leak.
14966         
14967         * aot.c: Added mono_aot_verbose variable and made all debugging
14968         output depend on the value of this variable.
14969
14970         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
14971         method_label and info_label.
14972
14973         * mini.h mini-x86.c aot.c: Added a new relocation type 
14974         MONO_PATCH_INFO_IID for klass->interface_id.
14975
14976         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
14977         the MonoJitInfo structure.
14978
14979         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
14980         a non-root appdomain in shared mode.
14981
14982 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
14983
14984         * aot.c: make aot loader less verbose. Remove free of unused variable.
14985
14986 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
14987
14988         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
14989
14990         * .cvsignore: Added *.dll.
14991
14992         * mini.c (mono_print_tree_nl): New function callable while debugging.
14993
14994         * mini.c (mono_print_code): Export this.
14995
14996         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
14997         patched code.
14998
14999 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
15000
15001         * mini.h (MonoCompile): Added 'jit_info' field.
15002
15003         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
15004         the cfg structure, since it is needed by the AOT compiler.
15005
15006         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
15007
15008         * aot.c: A major rewrite. Changes include:
15009         - save exception tables for methods which have them.
15010         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
15011         to g_module_symbol.
15012         - reworked the file format so it is now much smaller and needs
15013         fewer relocation entries.
15014         
15015 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
15016
15017         * aot.c (load_aot_module): Fix build bustage on platforms without
15018         Boehm GC.
15019
15020 2003-09-04  Martin Baulig  <martin@ximian.com>
15021
15022         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
15023
15024 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
15025
15026         * TODO: Some new optimization ideas.
15027
15028         * aot.c: Move AOT module loading logic here from mono_assembly_open.
15029
15030         * aot.c: Save the optimization flags used to compile the code into
15031         the AOT module.
15032
15033         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
15034         support emitting domain specific code.
15035         
15036         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
15037         no longer domain neutral. It can be made domain neutral by compiling 
15038         with --optimize=shared.
15039
15040         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
15041         between appdomains.
15042
15043         * driver.c mini.h mini.c: New --no-aot debugging option which disables
15044         loading of AOT code.
15045
15046         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
15047         
15048         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
15049         if there is no domain neutrality information.
15050
15051 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
15052
15053         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
15054         format version into the generated library.
15055
15056         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
15057         callee method into the caller since one of them could be shared.
15058
15059         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
15060         system exceptions from AOT code now works.
15061
15062         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
15063         method if it is domain neutral and the callee is not.
15064
15065         * graph.c (cfg_emit_one_loop_level): Fix warning.
15066
15067 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
15068
15069         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
15070         last checkin.
15071
15072 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
15073
15074         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
15075         is needed  by code which is executed before mono_runtime_init ().
15076         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
15077         
15078         * mini.c (mono_thread_abort): Fix warning.
15079         (mono_jit_compile_method): Call static constructor in the AOT case too.
15080
15081         * aot.c (mono_compile_assembly): Fix warning.
15082
15083 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15084
15085         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
15086
15087 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
15088
15089         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
15090
15091         * cpu-pentium.md: Fix the length of call opcodes so they include the
15092         ESP restoring instruction. Fixes #47968.
15093
15094 2003-08-28  Martin Baulig  <martin@ximian.com>
15095
15096         * mini-x86.c (mono_arch_call_opcode): Added support for
15097         MONO_TYPE_GENERICINST.
15098
15099         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
15100
15101 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
15102
15103         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
15104         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
15105
15106         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
15107         metadata_section.
15108
15109 2003-08-26  Martin Baulig  <martin@ximian.com>
15110
15111         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
15112         when reporting an error, set this to the actual error location.
15113         (mono_method_to_ir): Report the correct error location if
15114         get_basic_blocks() returned an error.
15115
15116 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
15117
15118         * mini.c (mono_type_blittable): OBJECT is not blittable.
15119         (mono_method_blittable): Methods which have marshalling descriptors
15120         are not blittable either. Fixes #47842.
15121
15122 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
15123
15124         * driver.c mini.c: Use an environment variable instead of a global 
15125         variable. Also fix the build.
15126
15127         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
15128         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
15129         reporting this. 
15130
15131         * driver.c mini.c: Added --with-valgrind option to turn off some
15132         code which prevents mono from running under valgrind.
15133
15134         * mini.c (mono_emit_call_args): Fixed warning.
15135
15136         * mini.c (mono_emulate_opcode): Fixed warning.
15137
15138 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15139
15140         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
15141         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
15142         regalloc.c, regalloc.h: specify available registers in arch-specific
15143         code and support floats in the regallocator (patch by Laurent Morichetti 
15144         <l_m@pacbell.net>)
15145
15146 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
15147
15148         * mini.c: mono_thread_current() can be called only after
15149         mono_runtime_init(): rearrange code to not call it early on.
15150
15151 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15152
15153         * mini.c: allocate jump tables in the code mempools.
15154
15155 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15156
15157         * mini.c, mini.h: make sure per-thread data allocated by the jit is
15158         freed.
15159
15160 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
15161
15162         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
15163         12 to 16.  This fixes bug #47453.
15164
15165
15166 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
15167
15168         * mini-ppc.c: fixed indexed load and unsigned compares.
15169
15170 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
15171
15172         * mini.c: reenabled installation of handler for
15173           thread abort signal.
15174
15175 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15176
15177         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
15178         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
15179         until it's fixed and actually useful.
15180
15181 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15182
15183         * inssel-long32.brg: couple more opcodes implemented.
15184
15185 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
15186         
15187         * mini-sparc.c: Even more opcodes implemeted.
15188
15189 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
15190
15191         * mini-sparc.c: More opcodes implemented.
15192
15193 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
15194
15195         * mini-sparc.c: More opcodes implemented.
15196
15197 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
15198
15199         * inssel-sparc.brg: Add some needed rules.  Direct
15200         copy from PPC.
15201         * Makefile.am: Use inssel-sparc.brg
15202         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
15203         an assert happy for now.
15204
15205 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
15206
15207         * mini-sparc.c: Fixed compile errors.
15208         * exceptions-sparc.c: Same.  We now produce a mono binary 
15209         on sparc-linux.  Yea.
15210
15211 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
15212
15213         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
15214         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
15215         They compile, but do not work.
15216
15217 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15218
15219         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
15220         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
15221         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
15222         (ct@gentoo.org).
15223
15224 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15225
15226         * mini.c: more opcodes implemented and better support for generics.
15227
15228 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
15229
15230         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
15231         * mini.c, mini.h: first cut at generics support: some new instructions 
15232         added and changed the behaviour of some of the existing ones.
15233
15234 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
15235
15236         * mini.c: Removed definition of metadata_shared mutex here.
15237
15238 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
15239
15240         * mini-x86.c: make vararg calls work for instance methods.
15241
15242 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
15243
15244         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
15245         returns the arguments in a separte list, now.
15246
15247 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15248
15249         * aot.c, mini.c: updates for array type representation changes.
15250
15251 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
15252
15253         * mini.c: register function to perform jit shutdown.
15254
15255 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15256
15257         * mini.c: use a faster allocator if possible.
15258
15259 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
15260
15261         * aot.c: some cleanups and portability changes.
15262
15263 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15264
15265         * mini.c: use faster allocation for CEE_BOX if possible.
15266
15267 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
15268
15269         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
15270         Moved inlined mempcy code to its own function so that is can be
15271         reused. Added an inline memset function as well (optimized initobj).
15272         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
15273
15274 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15275
15276         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
15277
15278 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
15279
15280         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
15281         arch code can setup the cpu for CLR execution, if needed.
15282         We use it on x86 to set the precision of FP operations.
15283
15284 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
15285
15286         * mini.c: disable some optimizations if we can guess they'll cost too
15287         much for a given method.
15288
15289 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
15290
15291         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
15292         
15293 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
15294         * mini.h mini.c mini-x86.c: Added instruction level coverage 
15295         info collection support.
15296
15297 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15298
15299         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
15300         is now implemented in the profiling API. Get rid of a couple of
15301         unnecessary global variables.
15302
15303 2003-06-15  Nick Drochak <ndrochak@gol.com>
15304
15305         * basic-long.cs: tests for negative values for bigmul, and unsigned.
15306         * cpu-g4.md: add op_bigmul and op_bigmul_un
15307         * cpu_pentium.md: add op_bigmul_un
15308         * inssel-long32.brg: add rule for unsigned bigmul
15309         * mini-ops.h: define OP_BIGMUL_UN
15310         * mini-x86.c: THE BUG: handle (un)signed properly
15311         * mini.c: choose unsigned opcode if needed.
15312         This set of patches fixes bug #44291
15313
15314 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
15315
15316         * mini.c (optimize_branches): improved to handle all kinds of
15317         conditional branches.
15318
15319 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
15320
15321         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
15322         don't raise exceptions.
15323
15324 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15325
15326         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
15327         to arch-specific files.
15328
15329 2003-06-09  Martin Baulig  <martin@ximian.com>
15330
15331         * Makefile.am (libs): Added $(LIBGC_LIBS).
15332
15333 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
15334
15335         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
15336         and OP_ATAN (fixes bug#44293).
15337
15338 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
15339
15340         * Makefile.am, mini-x86.c: rename cpu description array to
15341         pentium_desc, since some compilers define the 'pentium' preprocessor
15342         symbol.
15343
15344 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
15345
15346         * mini.c (mini_select_instructions): add explicit branch if the
15347         following block is not the false target of a conditional branch -
15348         we need this with any optimization that reorder or remove bblocks
15349
15350         * mini.c (optimize_branches): bug fixes
15351
15352 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
15353
15354         * mini.c (mono_method_to_ir): inline static readonly fields
15355
15356         * ssa.c (fold_tree): start cfold support for long (very simple
15357         cases only)
15358
15359         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
15360
15361 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15362
15363         * inssel.brg: fixed memcpy (bug #44219).
15364
15365 2003-06-05  Dick Porter  <dick@ximian.com>
15366
15367         * driver.c: Set the glib log levels to not abort if g_message
15368         recurses.
15369
15370         g_set_prgname() has to happen before mini_init() so that the
15371         process handle gets the info.
15372         
15373 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15374
15375         * driver.c: add intrins to the default optimizations to get wider
15376         exposure.
15377
15378 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
15379
15380         * mini.h: some large basic blocks will overflow a 16-bit
15381         integers for symbolic registers.
15382
15383 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
15384
15385         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
15386         (mono_arch_output_basic_block): fix bug 43499 
15387
15388 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
15389
15390         * mini.c: kill duplicated definition of mono_debug_format.
15391
15392 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
15393
15394         * mini-x86.c, arrays.cs: fixed register allocation bug.
15395
15396 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
15397
15398         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
15399
15400         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
15401
15402 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15403
15404         * mini.c:
15405         (print_method_from_ip): also print source location information if
15406         available.
15407
15408 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
15409
15410         * mini.c (mono_find_block_region): bug fix in region code
15411         (mini_method_compile): enable removing unreachable code again, but
15412         only in methods without exception clauses.
15413
15414 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
15415
15416         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
15417         Implemented arglist opcode and handling of TypedReference type.
15418         Fixed x86 call convention when a structure is returned.
15419         Minimal support for calling static vararg methods.
15420
15421 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
15422
15423         * mini.c (mini_method_compile):  always remove unreachable code,
15424         because the code in them may be inconsistent  (access to dead
15425         variables for example).
15426
15427 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
15428
15429         * driver.c, debug-mini.c: warning fixes.
15430
15431 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
15432
15433         * Makefile.am, jit.h, mini.h: install header for embedding mono.
15434
15435 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
15436
15437         * mini.c: thread-static fields are registered in mono_class_vtable(),
15438         so ensure the function is called before checking for them.
15439
15440 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
15441
15442         * mini.c (optimize_branches): fix for bug 43586
15443
15444         * jit-icalls.c (mono_llmult_ovf): added an additional check for
15445         overflow (fixes Bug #43639)
15446
15447 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15448
15449         * mini.c, objects.cs: allow the use of stobj for primitive types.
15450
15451 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15452
15453         * mini.c: be less strict about argument checking until we support
15454         running the verifier.
15455
15456 2003-05-27  Nick Drochak <ndrochak@gol.com>
15457
15458         * basic-long.cs: tests for (ulong)int * (ulong)int also
15459         * mini.c: use the same trick for (ulong)int * (ulong)int
15460
15461 2003-05-27  Nick Drochak <ndrochak@gol.com>
15462
15463         * basic-long.cs: add regression test for (long)int * (long)int
15464         * cpu-pentium.md: add op_bigmul specification
15465         * inssel-long32.brg: add OP_BIGMUL rule
15466         * mini-ops.h: add OP_BIGMUL
15467         * mini-x86.c: register allocator: handle case where src1 needs to be
15468         in EAX.
15469         * mini.c: substitute special BIGMUL opcode in the tree for 
15470         (long)int * (long)int
15471
15472 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
15473
15474         * jit-icalls.c: call the type ctor on field access if needed.
15475
15476 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
15477
15478         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
15479         to a method (including results of ldelema, bug#43207).
15480
15481 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
15482
15483         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
15484         colors to show exception handler blocks.
15485
15486         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
15487         (fix for pinvoke7.cs).
15488
15489 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15490
15491         * mini.h, mini.c: ensure correct initialization order for types that
15492         require it. Prepare for lazy compilation of jit icall wrappers.
15493         Provide a name for opcode emulation to reduce unneeded mallocing.
15494
15495 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
15496
15497         * mini-x86.c: better register restoring code and profiling
15498         support for tail calls.
15499
15500 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15501
15502         * mini.h, driver.c: prepare for leaf methods optimization.
15503
15504 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
15505
15506         * mini.c: get targets of branches before converting a method.
15507
15508 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
15509
15510         * mini.c (optimize_branches): added some experimental code (disbaled) 
15511
15512 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
15513
15514         * mini.c (optimize_branches): fix branch to branch optimization 
15515
15516         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
15517
15518         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
15519
15520         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
15521
15522         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
15523         if needed.
15524
15525 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
15526
15527         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
15528         enable use of interface variables again.
15529
15530         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
15531         I1 to registers because there is no simply way to sign extend 8bit
15532         quantities in caller saved registers on x86.
15533
15534         * inssel-float.brg: set costs of some rules to 2 so
15535         that monobure always select the arch. specific ones if supplied,
15536         regardless of the order we pass the files to monoburg.
15537
15538 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
15539
15540         * mini.c, mini-x86.c: since the magic trampoline for jumps
15541         can't patch the code directly, we do it as soon as the
15542         method gets compiled.
15543
15544 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
15545
15546         * mini-x86.c, mini.h: introduce a new patching method
15547         to support CEE_JMP and tail calls.
15548         * mini.c: obey tail.call. Don't precompile methods target
15549         of CEE_JMP.
15550         * tramp-x86.c: new trampoline code to handle methods
15551         reached through a jump.
15552
15553 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
15554
15555         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
15556         bit values to registers
15557
15558 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
15559
15560         * mini.c (mono_compile_get_interface_var): share interface
15561         variables if possible.
15562
15563 2003-05-16  Martin Baulig  <martin@ximian.com>
15564
15565         * debug-mini.c (mono_init_debugger): New function to initialize
15566         the debugger.  This is not in the debugger since it needs to
15567         access some of mini's internals.
15568
15569 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
15570
15571         * mini.c (mono_method_to_ir): inlining fixes/cleanups
15572
15573 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
15574
15575         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
15576         for value type handling.
15577
15578 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
15579
15580         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
15581         (mono_method_check_inlining): enable inlining of all kinds of wrappers
15582
15583 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
15584
15585         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
15586           the constructor through a proxy.
15587
15588 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15589
15590         * jit-icalls.c, inssel.brg: fixes to array element address
15591         calculations.
15592
15593 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
15594
15595         * mini-x86.c (is_regsize_var): allocate pointer to registers
15596
15597 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15598
15599         * driver.c: fixed typo, added intrins to the set of optimizations
15600         tested with regressions.
15601
15602 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
15603
15604         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
15605         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
15606         test case.
15607
15608 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
15609
15610         * inssel.brg: remove some common pop instructions without side effects
15611
15612 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15613
15614         * inssel-x86.brg: fixed thinko in int to double conversions.
15615
15616 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
15617
15618         * mini.c, jit-icalls.c: added runtime thread-static variable support.
15619
15620 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
15621
15622         * inssel-long32.brg: two more missing instructions.
15623
15624 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
15625
15626         * mini.c (mono_emit_call_args): set the cil_code for all arguments
15627         if not already set.
15628
15629 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
15630
15631         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
15632         correctly.
15633
15634         * basic-float.cs: Added tests for negative zero.
15635
15636 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15637
15638         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
15639         a couple of missing operations for long casts, with test cases.
15640
15641 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15642
15643         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
15644
15645 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
15646
15647         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
15648         code size estimation.
15649
15650 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
15651
15652         * mini.c (mono_jit_create_remoting_trampoline): make it work with
15653         abstract methods (fix bug 42542)
15654
15655         * aot.c: add ability to handle array types
15656         
15657 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
15658
15659         * mini.c: Call the _specific versions of the object allocation
15660         functions if possible.
15661
15662 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
15663
15664         * driver.c: call setlocale ().
15665
15666 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
15667
15668         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
15669         windows build.
15670
15671 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
15672
15673         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
15674
15675         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
15676         wrappers (fix bug 42122)
15677
15678 2003-05-04  Martin Baulig  <martin@ximian.com>
15679
15680         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
15681
15682         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
15683         s/mini_set_defaults/mono_set_defaults/g.
15684
15685 2003-05-04  Martin Baulig  <martin@ximian.com>
15686
15687         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
15688
15689 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15690
15691         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
15692         (reported by Don Roberts).
15693
15694 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
15695
15696         * mini.c: temporarily work around two bugs for this release.
15697
15698 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15699
15700         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
15701         that contains -export-dynamic and it makes using the ld script
15702         useless.
15703         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
15704
15705 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
15706
15707         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
15708         specific cpu.
15709
15710 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
15711
15712         * mini.c: make sure leave calls all the needed finally blocks,
15713         even when the target jumps out of multiple exception clauses.
15714
15715 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15716
15717         * ldscript, Makefile.am: add linker script to reduce the number of
15718         exported symbols (should also fix the issues with libwine defining
15719         some of the same symbols in io-layer).
15720
15721 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
15722
15723         * driver.c (mini_main): Avoid assertion when no file name is given on 
15724         the command line.
15725
15726 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
15727
15728         * driver.c: added --version/-V command line option.
15729         Added the inline optimization in the regression tests.
15730
15731 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15732
15733         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
15734         to the type in the method signature (fixes bug#42134).
15735
15736 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
15737
15738         * mini.c: when inlining, check this is not null only when needed (bug #42135).
15739
15740 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
15741
15742         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
15743
15744 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15745
15746         * driver.c: fixed bug #42100.
15747
15748 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
15749
15750         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
15751
15752 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
15753
15754         * mini.c: moved most of the code required to do inlining to its own
15755         function so it can be reused. Inline also ctors if appropriate.
15756
15757 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
15758
15759         * Makefile.am: Link with -export-dynamic so shared libs loaded by
15760         the runtime can call mono API functions.
15761
15762 2003-04-27  Martin Baulig  <martin@ximian.com>
15763
15764         * debug-mini.c (mono_debug_init_method): Added
15765         `guint32 breakpoint_id' argument; if the method has a breakpoint,
15766         send a notification to the debugger.
15767
15768         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
15769         running in the Mono Debugger, just pass the breakpoint number to
15770         mono_debug_init_method().
15771
15772         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
15773
15774 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
15775
15776         * mini.c: allow some more unsafe compares.
15777
15778 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15779
15780         * mini-x86.c, Makefile.am: make distcheck works (partially from
15781         a patch by Richard Lee <r.h.lee@attbi.com>).
15782         * regset.c, regset.h: removed, they are unused.
15783
15784 2003-04-25  Dick Porter  <dick@ximian.com>
15785
15786         * driver.c: Usage reports the name as 'mono' not 'mini'
15787         * exceptions-x86.c: Build and run on freebsd
15788
15789 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
15790
15791         * Makefile.am: install the program with the 'mono' name and
15792         the library as libmono instead of mini and libmini.
15793
15794 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
15795
15796         * driver.c: provide the APIs for the embedding interface of the old jit.
15797
15798 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
15799
15800         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
15801
15802 2003-04-23  Martin Baulig  <martin@ximian.com>
15803
15804         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
15805
15806         * driver.c: Added `--debug' command line argument to enable
15807         debugging support.
15808
15809 2003-04-23  Martin Baulig  <martin@ximian.com>
15810
15811         * debug.[ch]: Removed.  The code is now in
15812         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
15813
15814         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
15815         last six months.
15816
15817 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
15818
15819         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
15820
15821 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15822
15823         * mini.c:
15824         (mini_cleanup): moved mono_runtime_cleanup call after the call to
15825         mono_domain_finalize.
15826         (mini_method_compile): use mono_method_profile* if the the option is
15827         enabled.
15828
15829 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
15830
15831         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
15832         methods with their wrapper.
15833
15834         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
15835         methods with their wrapper.
15836
15837         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
15838         their wrapper.
15839
15840         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
15841         wrapper.
15842
15843         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
15844         methods.
15845
15846 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
15847
15848         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
15849
15850 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
15851
15852         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
15853         of the mempool. This is slightly faster and uses less memory
15854
15855 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15856
15857         * mini.c: avoid O(n) allocation for variables.
15858
15859 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15860
15861         * mini.c: handle items on the stack after inlining methods.
15862
15863 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
15864
15865         * mini.c: make the method->opcode optimization dependent
15866         on MONO_OPT_INSTRINS and do it lazily.
15867
15868 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
15869
15870         * driver.c: print overall results at the end of regression run.
15871
15872 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
15873
15874         * inssel.brg: don't overwrite symbolic registers.
15875
15876 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
15877
15878         * inssel-x86.brg: fix conversion from long to float.
15879
15880 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
15881
15882         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
15883
15884 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
15885
15886         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
15887
15888         * driver.c: Added --print-vtable option as in the old JIT.
15889
15890 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
15891
15892         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
15893
15894 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
15895
15896         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
15897
15898 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
15899
15900         * mini.c regalloc.c regalloc.h: Fix memory leak.
15901
15902 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
15903
15904         * aot.c (mono_aot_get_method): register all used strings
15905
15906 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15907
15908         * mini.c: always intern strings references with ldstr at compile time.
15909
15910 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15911
15912         * Makefile.am: add BUILT_SOURCES.
15913
15914 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
15915
15916         * driver.c: give a better error message when the assembly to execute
15917         doesn't have an entry point.
15918
15919 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
15920
15921         * Makefile.am: added hack for automake
15922
15923         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
15924         correct sematics.
15925
15926         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
15927
15928 22003-04-07  Martin Baulig  <martin@ximian.com>
15929
15930         * Makefile.am: Added Makefile.am.
15931
15932         * debugger-main.c: Removed, this is now in the debugger where it
15933         belongs.
15934
15935         * mini.pc.in: Call this package `mini' for the moment.
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946
15947
15948
15949