ccb6827f9a24f3a3fff97e1db4bd921020a50c88
[mono.git] / mono / mini / ChangeLog
1 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
2
3         * aot-compiler.c (emit_globals): Avoid invalid characters in
4         the static linking symbol.
5
6         * objects.cs: Add a test for the range check optimization. Fix warnings.
7
8         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
9         optimization from the current JIT.
10
11         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
12         later in decompose_array_access_opts () to allow more optimizations.
13
14         * method-to-ir.c (mono_handle_soft_float): Rename this to 
15         mono_decompose_soft_float () for consistency.
16
17         * mini-ops.h: Fix arguments of OP_STRLEN.
18
19         * method-to-ir.c (save_cast_details): Extract the cast details saving code
20         into a separate function.
21         (reset_cast_details): Ditto.
22         (handle_unbox): Save cast details. Fixes #431254.
23
24         * method-to-ir.c: Remove some obsolete FIXMEs.
25
26 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
27
28         * ir-emit.h (alloc_dreg): Write a warning before crashing.
29
30 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
31
32         * mini-codegen.c: More work on macros to make them
33         ready for multiple regbanks.
34
35 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
36
37         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
38
39         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
40
41 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
42
43         * mini-codegen.c (mono_spillvar_offset): Proper support for
44         multiple regbanks.
45
46 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
47
48         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
49         the stack overflow changes.
50
51 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
52
53         * mini-codegen.c: Make all bank macros depend on reg_bank.
54
55         * mini-codegen.c (mono_local_regalloc): Make free mask
56         initialization regbank aware.
57
58 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
59
60         * mini-codegen.c (mono_local_regalloc): Extract callee
61         mask selection to a function and make it regbank aware.
62
63 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
64
65         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
66         code to deal with many regbanks.
67
68 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
69
70         * mini-codegen.c: More fp->regbank changes.
71
72 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
73
74         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
75         of a hardcoded constant.
76
77 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
78
79         * method-to-ir.c (type_from_stack_type): Fix typo.
80
81 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
82
83         * mini-ia64.c (emit_move_return_value): Convert float return values to
84         double.
85
86         * objects.cs: Add a new test.
87         
88         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
89         VARARG methods to fix an assert later.
90
91         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
92         end so it at least compiles.
93
94 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
95
96         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
97
98 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
99
100         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
101         optimization to a new function (emit_optimized_ldloca_ir) and enable
102         it for both ldloca and ldloca_s.
103
104 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
105
106         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
107         gshared CASTCLASS code.
108
109         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
110         amd64, where the libc stack unwinder encounters stack frames referring to
111         native code in unmapped memory.
112
113         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
114         sharing.
115
116         * generics.cs: Add new test.
117
118 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
119
120         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
121         add a check that one of the ARM_FPU_ constants is defined.
122
123         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
124         
125         * mini-exceptions.c: Fix build on non-altstack platforms.
126
127         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
128         sharing of vtypes.
129
130         * ir-emit.h: Add a comment to NEW_PCONST.
131
132         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
133
134         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
135
136         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
137         after the changes to MonoJitDomainInfo.
138
139 2008-09-27  Mark Probst  <mark.probst@gmail.com>
140
141         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
142
143 2008-09-27  Mark Probst  <mark.probst@gmail.com>
144
145         * mini-ppc.c: Compiler warning fixes.
146
147 2008-09-27  Mark Probst  <mark.probst@gmail.com>
148
149         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
150         for pinvokes.
151
152 2008-09-27  Mark Probst  <mark.probst@gmail.com>
153
154         * exceptions-ppc.c, mini-ppc.h: Compile
155         mono_arch_handle_altstack_exception() on Darwin, too.
156
157 2008-09-27  Mark Probst  <mark.probst@gmail.com>
158
159         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
160         work on archs which don't have generic sharing implemented, only
161         without the vtable_arg.
162
163 2008-09-26  Mark Probst  <mark.probst@gmail.com>
164
165         * mini.c: Added comment explaining why delegate ctor icall
166         wrappers are compiled.
167
168 2008-09-26  Mark Probst  <mark.probst@gmail.com>
169
170         * mini.c: Don't produce trampolines to delegate ctor icall
171         wrappers but compile them upfront.
172
173 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
174
175         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
176         runtime-set function when going back to managed code. Currently this
177         is used to set back the protection on the soft ovf pages and/or to
178         throw the stack overflow exception that happened in unmanaged code.
179
180 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
181
182         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
183         runtime-set function when going back to managed code. Currently this
184         is used to set back the protection on the soft ovf pages and/or to
185         throw the stack overflow exception that happened in unmanaged code.
186
187 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
188
189         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
190         the support code for restoring stack protection after stack overflows
191         that happen in unmanaged code. Don't set the exec permission on the
192         soft overflow area.
193
194 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
195
196         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
197         delegate->method_ptr is set. Fixes #428054.
198
199 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
200
201         * tests.cs: Rename to ratests.cs.
202
203         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
204         emit_get_rgctx_... functions.
205
206 2008-09-25  Mark Probst  <mark.probst@gmail.com>
207
208         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
209
210 2008-09-25  Mark Probst  <mark.probst@gmail.com>
211
212         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
213         before asserting that method is sharable.
214
215 2008-09-25  Mark Probst  <mark.probst@gmail.com>
216
217         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
218         whether method needs a static RGCTX wrapper used instead of
219         complex conditions.
220
221         * generic-sharing.c, mini.h: A few functions moved to
222         metadata/generic-sharing.c.
223
224 2008-09-25  Mark Probst  <mark.probst@gmail.com>
225
226         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
227         Generic code sharing for value types, which essentially means
228         treating value type methods like static methods.  The RGCTX is
229         passed in the same way.
230
231 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
232
233         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
234         opcode when creating multi-dimensional arrays of open types.
235
236         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
237         open generic types.
238
239         * generics.cs: Add a test.
240
241         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
242
243 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
244
245         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
246
247         * mini.c (mini_method_compile): Set it when running under the debugger. 
248
249         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
250         vreg optimization if the flag is set.
251
252         * driver.c (mono_main): Add --attach= option to pass options to
253         the attach agent.
254
255         * mini.c (sigquit_signal_handler): Start the attach agent.
256
257         * ssapre.c: Disable this to save space since it is not yet ported to
258         linear IR.
259
260         * regalloc2.c: Disable this to save space.
261
262         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
263
264 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
265
266         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
267         the -v option useful again.
268
269 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
270
271         * mini-amd64.c (mono_arch_output_basic_block): Add support for
272         --break-at-bb.
273
274         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
275         arrays of arrays. Fixes #428406.
276
277         * method-to-ir.c (mini_emit_castclass): Ditto.
278
279         * objects.cs: Add new test.
280         
281 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
282
283         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
284         was wrong at it choked against target_type_is_incompatible for byref types.
285
286 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
287
288         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
289         places.
290
291 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
292
293         * mini-exceptions.c: update a few more exceptions-related counters.
294
295 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
296
297         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
298         new functions to allocate from persistent mempools.
299
300 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
301
302         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
303         multiple register banks in the future.
304
305         * mini-codegen.c (mono_local_regalloc): Fix a warning.
306
307 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
308
309         * mini.c (type_to_eval_stack_type): Remove duplicated function.
310
311         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
312
313         * mini.h: Export type_to_eval_stack_type.
314
315         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
316         is only ins->klass of byref types.
317
318 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
319
320         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
321         (mini_emit_memcpy2): Ditto.
322
323         * mini-amd64.c: Fix a warning.
324
325 2008-09-21  Mark Probst  <mark.probst@gmail.com>
326
327         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
328         linking.
329
330 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
331
332         * method-to-ir.c: Extract stloc micro-optimization to a
333         function and apply it to all cases.
334
335 2008-09-19  Mark Probst  <mark.probst@gmail.com>
336
337         * method-to-ir.c: Don't fail generic code sharing in cases we
338         already support.
339
340 2008-09-18  Mark Probst  <mark.probst@gmail.com>
341
342         * mini-ppc.c: Handle structs in tailcalls on Darwin.
343
344 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
345
346         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
347         implementation.
348
349 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
350
351         * trace.c: make tracing more useful and correct, with per-thread
352         id and indent info.
353
354 2008-09-15  Mark Probst  <mark.probst@gmail.com>
355
356         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
357         doing a method call and the argument is an R4.
358
359 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
360
361         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
362         generic methods.
363
364 2008-09-13  Mark Probst  <mark.probst@gmail.com>
365
366         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
367
368 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
369
370         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
371         (MONO_JUMP_TABLE_FROM_INS): Ditto.
372
373 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
374
375         * driver.c: Add a --agent argument (not supported yet) to load managed
376         agent assemblies before loading the main assembly, similarly to how the
377         Java VM handles agents.
378
379 2008-09-11  Mark Probst  <mark.probst@gmail.com>
380
381         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
382         function to do stack layout of local variables.
383
384 2008-09-11  Mark Probst  <mark.probst@gmail.com>
385
386         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
387         calculation.
388
389 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
390
391         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
392         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
393         JIT if DISABLE_JIT is defined.
394
395         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
396         defined.
397
398 2008-09-10  Mark Probst  <mark.probst@gmail.com>
399
400         * iltests.il.in: Disable the fconv test on PPC (the result is
401         undefined according to ECMA).
402
403 2008-09-10  Mark Probst  <mark.probst@gmail.com>
404
405         * iltests.il.in: Enable tail call tests for PPC.
406
407         * mini.h: Add variable for storing incoming valuetype argument
408         addresses for tail calls.
409
410         * mini-ppc.c: Implement valuetype arguments and return values for
411         tailcalls on Linux.
412
413 2008-09-09  Mark Probst  <mark.probst@gmail.com>
414
415         * mini-ppc.c: Partially implement tail calls (struct arguments and
416         return values not supported).
417
418         * method-to-ir.c: Enable tail calls on PPC.
419
420 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
421
422         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
423         runtime-invoke wrappers to work around the problem of them getting
424         assigned to a random class.
425
426         * aot-runtime.c (mono_aot_get_method): Ditto.
427         
428 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
429
430         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
431         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
432
433 2008-09-07  Mark Probst  <mark.probst@gmail.com>
434
435         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
436         until they're implemented properly.
437
438         * exceptions-ppc.c: Use arch-independent exception-handling code
439         instead of custom one.
440
441         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
442         for Linear IR.
443
444         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
445
446         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
447         applies when __powerpc__ is defined.
448
449 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
450
451         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
452         methods to their code to avoid computing the full name of wrappers and
453         doing a lookup in a string hash table.
454
455 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
456
457         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
458         we identify bblocks before method_to_ir () is ran.
459
460         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
461         Also avoid optimizing branches pointing to themselves.
462
463         * mini.c (mini_method_compile): Ditto. Fixes #422947.
464
465 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
466
467         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
468
469 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
470
471         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
472         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
473         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
474         'buf'.
475
476         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
477         jumped to the same entry in plt_jump_table.
478
479 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
480
481         * method-to-ir.c (initialize_array_data): Handle field with RVA from
482         dynamic images.
483
484 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
485
486         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
487         other assignment can be if converted. Saves 1.5% on corlib size and fixes
488         #421807.
489
490 2008-08-29  Geoff Norton  <gnorton@novell.com>
491
492         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
493         segment, and doesn't properly handle .space as .text.  Fixes
494         AOT Mach/ARM
495
496 2008-08-29  Geoff Norton  <gnorton@novell.com>
497
498         * mini.c: Disable the mach exception handler when running on 
499         ARM
500
501 2008-08-29  Geoff Norton  <gnorton@novell.com>
502
503         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
504         globals on Darwin/ARM
505
506 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
507
508         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
509         since too many things depend on it. Instead, call 
510         mono_runtime_set_no_exec ().
511         
512         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
513         the new JIT.
514
515         * aot-compiler.c: Add an 'asm-only' AOT option.
516
517         * mini.c: Avoid initializing the runtime when doing AOT compilation.
518                 
519         * aot-compiler.c (compile_method): Disable gshared support for now as it
520         doesn't yet work.
521
522 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
523
524         * mini-amd64.h : Fix a compiler warning.
525
526         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
527           Changed to use a callback function to retrieve the unwind info.
528           This avoids problems observed when code blocks were removed by
529           unloading an app domain.
530
531         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
532           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
533           to work properly.
534
535         Contributed under MIT/X11 license.
536
537 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
538
539         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
540           case to keep the stack aligned to 8.
541
542         Contributed under MIT/X11 license.
543
544 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
545
546         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
547         avoid repeated linear searches.
548
549 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
550
551         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
552         methods it can't handle.
553         
554         * aot-compiler.c (add_method): Avoid adding a method twice.
555         (add_wrappers): Add runtime invoke wrappers for all methods.
556
557         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
558         function to create an aot-compatible version of this trampoline.
559
560         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
561
562 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
563
564         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
565
566         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
567         with a generic sharing failure.
568
569         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
570
571         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
572         CEE_RETHROW. Fixes #419634.
573
574         * mini.c (mono_method_to_ir): Ditto.
575
576         * exceptions.cs: Add a new test.
577         
578         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
579         to mono_type_stack_size_internal () since some callers might not pass in
580         an rgctx.
581
582         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
583         instrument_prolog. Fixes #419878.
584
585         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
586         doubles in soft float mode volatile.
587
588 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
589
590         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
591
592         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
593         to handle soft float correctly.
594
595         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
596         the fast path.
597
598         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
599
600         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
601         to sp, since the generics catch code requires it.
602
603         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
604         copying.
605
606         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
607         mono_arch_emit_imt_argument ().
608
609         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
610
611         * mini-arm.c tramp-arm.c: Generic sharing updates.
612
613 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
614
615         * mini-arm.c: Fix the arm build.
616
617         * generic-sharing.c (mini_type_get_underlying_type): New helper function
618         handling enums, generic instances and generic sharing.
619         (mini_type_stack_size_full): Ditto.
620
621         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
622         
623         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
624
625         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
626
627         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
628         trampolines.
629
630         * mini-arm.c: Various small generic sharing changes.
631
632         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
633         this for x86.
634         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
635         custom code.
636
637         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
638         helper function to return a generic class init trampoline.
639
640         * method-to-ir.c mini.c: Use it.
641         
642         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
643         arch-specfic function to return a generic class init trampoline.
644
645         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
646         the GENERIC_CLASS_INIT custom code.
647
648         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
649         a fatal error, not a sharing failure.
650
651         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
652         needed.
653
654         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
655         trampoline argument from MONO_ARCH_VTABLE_REG.
656
657         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
658         order of the arguments to the C trampoline: pass 'slot' as the trampoline
659         argument, and pass the vtable in VTABLE_REG.
660
661         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
662         order of the arguments to the C trampoline: pass 'slot' as the trampoline
663         argument, and pass the vtable in VTABLE_REG.
664         (mono_arch_create_trampoline_code_full): Remove some special casing for
665         the rgctx fetch trampoline.
666
667         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
668         Fixes #419273.
669
670         * iltests.il: Add a test for it.
671
672 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
673
674         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
675
676         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
677         no longer needed.
678
679         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
680         use mono_jit_info_table_find () to avoid recursion.
681         (mono_delegate_trampoline): Add a sync wrapper here.
682
683         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
684         here.
685
686         * mini.c (mono_method_to_ir): Ditto.
687         
688         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
689         add_sync_wrapper argument. Don't add a sync wrapper here.
690         (mono_create_jump_trampoline): Don't add a sync wrapper here.
691
692         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
693         
694 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
695
696         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
697           of nonvolatile registers back from MonoContext to CONTEXT.
698
699         Contributed under MIT/X11 license.
700
701 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
702
703         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
704           arguments on Winx64 there are only 4 argument registers.  For this
705           logic to work the last argument must be pulled from the stack.  
706
707         Contributed under MIT/X11 license.
708
709 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
710
711         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
712
713         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
714         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
715         encode/decode_method_ref ().
716
717         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
718
719         * aot-runtime.c (decode_patch): Ditto.  
720
721         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
722         MONO_PATCH_INFO_METHOD.
723
724         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
725         MonoGenericJitInfo.
726
727         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
728         MonoGenericJitInfo.
729
730         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
731
732         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
733         one from the caller.
734
735         * aot-runtime.c (decode_generic_inst): New function to decode and
736         return a interned generic inst.
737         (decode_klass_ref): Use it.
738         (decode_method_ref): Ditto.
739
740         * aot-compiler.c (emit_exception_debug_info): Save 
741         jinfo->has_generic_jit_info too.
742
743 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
744
745         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
746
747         * iltests.il.in: Add a test for fconv_to_i.
748
749         * liveness.c: Disable the liveness2 pass for now to save space.
750
751         * regalloc2.c: Include mempool-internals.h to fix warnings.
752
753         * aot-compiler.c (encode_method_ref): Encode the context of generic
754         instance methods.
755
756         * aot-runtime.c (decode_method_ref): Inflate generic methods using
757         the context saved in the aot file.
758
759         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
760
761         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
762
763         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
764         volatile so they won't be optimized away.
765
766 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
767
768         * ssa.c:
769         * ssa2.c:
770         * mini.c:
771         * regalloc2.c:
772         * dominators.c: Remove duplicated functions that now are in
773         mempool-internals.h.
774
775 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
776
777         * aot-compiler.c: Fix warnings.
778
779         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
780
781         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
782
783         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
784         as the patch type.
785
786         * mini.c (mono_resolve_patch_target): Ditto.
787         
788         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
789         (encode_klass_ref): Add support for encoding VARs/MVARs.
790
791         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
792
793         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
794         the handling of the got entries into a separate 'decode_got_entry' function.
795         Add support for RGCTX_FETCH.
796
797         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
798         clobbered by the trampoline code.
799
800         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
801         not clobbered by the indirect calling code.
802
803 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
804
805         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
806         to fix the build.
807
808 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
809
810         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
811         signature using the compilation mempool otherwise we would leak it.
812
813 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
814
815         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
816         mono_emit_abs_call ().
817
818         * patch-info.h: Add GENERIC_CLASS_INIT.
819
820         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
821
822         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
823         as their target as a near call.
824
825         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
826         ABS handling code.
827         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
828
829         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
830         call to a runtime function described by a patch.
831
832         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
833         mono_emit_abs_call, this has the advantage that the ABS handling code in
834         mono_codegen () can handle them both, and can handle other stuff in the
835         future without additional code.
836
837         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
838         entry.
839         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
840         abs addresses.
841
842         * mini.h: Add missing bblock related prototypes.
843
844         * mini.h (MonoCompile): Remove unused reverse_inst_list and
845         reverse_inst_list_len fields.
846
847         * mini.c: Refactor this file a bit by moving branch optimizations to 
848         branch-opts.c.
849
850         * method-to-ir.c: Merge generic sharing changes missed earlier.
851
852         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
853
854         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
855         shared patches. Process METHODCONST as a shared patch.
856
857         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
858         as it crashes on the 2.0 mscorlib.
859
860         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
861         to cause crashes.
862         
863         * aot-compiler.c: Use is_plt_patch () in a few additional places.
864         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
865         by IMT.
866
867         * aot-compiler.c: Reorganize the got handling code to be a bit more
868         understandable.
869
870 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
871
872         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
873         mono_patch_info_equals/hash, and use it to massively simplify
874         get_plt_index ().
875
876         * mini.c (mono_patch_info_hash): Simplify this and add support for
877         more patch types.
878
879         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
880
881         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
882         handling code, since an offset is not enough to identify a trampoline.
883
884         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
885
886 2008-08-17  Mark Probst  <mark.probst@gmail.com>
887
888         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
889
890         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
891
892         * mini-ops.h: Argument and result types for OVF_CARRY ops.
893
894         * decompose.c: PPC decompositions for various ops.
895
896         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
897
898 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
899
900         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
901         call the generic trampoline code using a call, instead of a jump, to
902         remove some special casing from the generic trampoline code.
903
904         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
905         (mono_codegen): Ditto.
906
907         * aot-compiler.c aot-runtime.c: Ditto.
908
909         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
910
911         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
912         helper function to find the offset corresponding to a lazy fetch trampoline.
913
914         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
915         when doing generic sharing.
916
917         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
918         places.
919         
920         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
921         mini-trampolines.c to be with the other trampoline creation functions.
922
923         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
924         as it is equal to method->signature in most cases, add a 
925         mono_emit_method_call_full variant which takes a signature and an imt
926         argument as well.
927
928 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
929
930         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
931         to this function, since it could be computed easily from the method 
932         argument.
933         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
934         more.
935
936         * method-to-ir.c mini.c: Remove references to 
937         compile_generic_method_wo_context.
938
939         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
940         generic method calls.
941         
942         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
943         dimensional non-szarrays.
944
945         * mini.c (mini_init): Register mono_array_new_1.
946
947         * jit-icalls.c (mono_array_new_1): New jit icall.
948
949         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
950         pointing to the method.
951
952         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
953         method addresses belonging to METHOD_JUMP patches in the 
954         jump_target_got_slot_hash.
955         (mono_aot_load_method): Ditto.
956
957         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
958         METHOD_JUMP patches.
959
960         * mini.c (mini_create_jit_domain_info): New helper function which 
961         initializes/frees domain->runtime_info.
962         (mini_free_jit_domain_info): Ditto.
963         (mini_init): Install the domain hook functions with the runtime.
964
965         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
966         information maintained by the JIT.
967
968         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
969         insertion into jump_table_hash into mono_codegen (), also implement proper
970         locking.
971
972         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
973         tail calls, it is already done by the aot code.
974         
975         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
976         mechanism on amd64.
977
978         * iltests.il.in: Make the jmp test a bit more complex.
979
980         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
981         generic instances which doesn't have a token.
982
983         * aot-runtime.c (decode_method_ref): Ditto.
984         
985         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
986         can handle this case now.
987         (handle_box): Ditto.
988
989 2008-08-15  Geoff Norton  <gnorton@novell.com>
990
991         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
992         debugging check.
993
994 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
995
996         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
997         calling generic methods.
998
999         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
1000
1001         * aot-runtime.c (decode_patch_info): Ditto.
1002
1003         * mini.c (mono_resolve_patch_target): Ditto.
1004         
1005         * patch-info.h: Add METHOD_RGCTX.
1006
1007         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
1008
1009 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
1010
1011         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
1012         arguments in registers.
1013
1014         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
1015         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
1016
1017         * mini.c (mini_method_compile): Abort aot compilation for generic
1018         methods if generic sharing is disabled.
1019         
1020         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
1021         an mrgctx.
1022
1023         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
1024         requiring an mrgctx.
1025
1026         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
1027         store instructions when converting a vcall to a normal call.
1028
1029         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
1030         mono_arch_find_jit_info.
1031
1032 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
1033
1034         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
1035         avoid calling mono_method_full_name () for every method even if the
1036         env var is not set.
1037         (check_inline_caller_method_name_limit): Ditto.
1038
1039 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
1040
1041         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
1042         assemblies in one run.
1043
1044         * aot-compiler.c (mono_compile_assembly): Only print out a count of
1045         skipped methods if it is not 0.
1046
1047         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
1048
1049 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
1050
1051         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
1052           MONO_ARCH_HAVE_UNWIND_TABLE.
1053
1054         Contributed under MIT/X11 license.
1055
1056 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
1057
1058         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
1059           from default optimizaton list on Winx64.
1060
1061         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
1062
1063         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
1064           the LMF from the MonoJitTlsData structure.
1065
1066         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
1067
1068         Contributed under MIT/X11 license.
1069
1070 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
1071
1072         * mini.c (sigsegv_signal_handler): Fix the build.
1073
1074         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
1075         assembly->aot_module.
1076
1077         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
1078         hash table. This simplifies and speeds up a lot of code, and fixes support
1079         for .netmodules.
1080
1081         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
1082         with the runtime.
1083
1084         * mini-exceptions.c: Ditto.
1085         
1086         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
1087         'native_offset' argument, since these are computed in the 
1088         mono_find_jit_info () function.
1089
1090         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
1091         is used by exceptions-ppc.c.
1092
1093         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
1094         mono_arch_find_jit_info ().
1095         
1096         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
1097         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
1098         generic code in mini-exceptions.c.
1099
1100 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
1101
1102         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
1103
1104         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
1105         
1106         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
1107         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
1108         called while holding the loader lock. Fixes #415608.
1109         (mono_aot_get_method_from_token_inner): Ditto.
1110
1111 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
1112
1113         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
1114         to reduce differences between this and the generic implementation in
1115         mini-exceptions.c.
1116         (ves_icall_get_frame_info): Ditto.
1117
1118         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
1119
1120         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
1121         longer neccesarry.
1122
1123         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
1124         mono_arch_get_call_filter () and make it non-static, for consistency with the
1125         other architectures.
1126
1127 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
1128
1129         * mini.c:
1130         * local-propagation.c:
1131         * mini-x86.c: Correct the name of arch defines.
1132
1133 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
1134
1135         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
1136         NO_EMULATE_LONG_SHIFT_OPS define.
1137
1138 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
1139
1140         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
1141         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
1142
1143         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
1144         MACH fixes. Merged from the 2.0 branch.
1145
1146         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
1147
1148         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
1149         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
1150
1151         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
1152
1153         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
1154         mono_marshal_get_native_wrapper () signature changes.
1155
1156 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
1157
1158         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
1159         conversion bug under arm.
1160
1161 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
1162
1163         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
1164
1165         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
1166         with overflow checking.
1167
1168 2008-08-05  Marek Habersack  <mhabersack@novell.com>
1169
1170         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
1171         to the genmdesc.pl file
1172
1173 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
1174
1175         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
1176         arg_array in the soft-float versions of the LOAD/STORE macros.
1177
1178         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
1179         implementation.
1180
1181         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
1182
1183 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
1184
1185         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
1186         a float HFA. Fixes #413621.
1187
1188 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
1189
1190         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
1191         frame_size to args_size. Fixes build.
1192
1193 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
1194
1195         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
1196         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
1197
1198         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
1199         the stack are not unaligned. Fixes #413247.
1200         
1201 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
1202
1203         * mini.c: update jitted methods performance counters.
1204
1205 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
1206
1207         * mini-exceptions.c: increase the exceptions thrown performance
1208         counter in mono_handle_exception ().
1209
1210 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
1211
1212         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
1213         can work with netmodules.
1214
1215 2008-07-28  Geoff Norton  <gnorton@novell.com>
1216
1217         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
1218         regression tests.
1219
1220 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
1221
1222         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
1223         correct place.
1224
1225 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
1226
1227         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
1228           The float param registers and other param registers must be the 
1229           same index on Windows x64.
1230
1231         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
1232           ArgValuetypeAddrInIReg argument case.  Setting the argument
1233           op to OP_VTARG_ADDR (OP_REGOFFSET)).
1234
1235         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
1236           variable computed above as the copy length for arguments of storage
1237           type ArgValuetypeAddrInIReg.
1238
1239         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
1240           ArgValuetypeAddrInIReg argument case.  This case will rely on
1241           mono_arch_emit_outarg_vt to emit the correct code later in the process.
1242
1243         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
1244           a 32 byte stack allocation for all calls.  We will omit the adjustment for
1245           jump and tail call instructoins as they do not follow the typical call behavior.
1246
1247         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
1248           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
1249           local variable and pass the local variable by reference to the called method.
1250
1251         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
1252           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
1253           of a struct is passed in a register it must be saved with the other
1254           volatile argument on the stack.
1255
1256         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
1257           frame pointer the stack adjustment value must be saved to the unwind 
1258           info structure.
1259
1260         Contributed under MIT/X11 license.
1261
1262 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
1263
1264         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
1265         which got lost in the merge.
1266
1267 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
1268
1269         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
1270         build.
1271
1272         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
1273         
1274         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
1275         icalls, since they won't be patched.
1276
1277         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
1278         different code sequence when running under valgrind to prevent some valgrind
1279         errors.
1280
1281         * iltests.il.in: Add new regression test.
1282
1283         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
1284         end with a throw.
1285
1286         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
1287         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
1288
1289         * iltests.il.in: Add new test.
1290
1291         * aot-compiler.c: Fix some warnings.
1292
1293         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
1294         Fixes #412494.
1295
1296 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
1297
1298         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
1299         (mini_usage_jitdeveloper): Add a missing --wapi option.
1300
1301 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
1302
1303         * mini-codegen.c: Simplify the is_fp macros.
1304         (free_up_ireg): Remove, use free_up_reg instead.
1305         (free_up_reg): Fix the fp case.
1306
1307 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
1308
1309         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
1310         lowered earlier.
1311
1312         * exceptions-x86.c: Merge some changes which seemed to have got lost
1313         in the linear-ir merge.
1314
1315         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
1316
1317         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
1318         long vreg volatile even if the variable was already created.
1319
1320         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
1321         volatile variables.
1322
1323 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
1324
1325         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
1326
1327         * mini.c (mono_jit_compile_method_inner): Add support for 
1328         MONO_EXCEPTION_BAD_IMAGE.
1329
1330         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
1331         mini_method_get_context () returns NULL. Fixes #356531.
1332
1333         * mini.c (mono_method_to_ir): Ditto.
1334         
1335         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
1336         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
1337
1338 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
1339
1340         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
1341         in the LDFTN implementation.
1342
1343 2008-07-25  Mark Probst  <mark.probst@gmail.com>
1344
1345         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
1346         code, patch calls to icalls, too, even if they're not in the
1347         shared generic code hash.  Fixes #411962.
1348
1349 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
1350
1351         * cpu-x86.md: Increase the length of the fcall opcodes.
1352
1353         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
1354         calls returning floats.
1355
1356         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
1357         on NEWARR.
1358         
1359         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
1360         missed earlier.
1361
1362         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
1363         into the domain->method_code_hash.
1364
1365         * aot-compiler.c: Fix win32 build.
1366
1367         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
1368         
1369         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
1370         gshared NEWARR implementation.
1371
1372         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
1373
1374         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
1375         can be used outside of method_to_ir.
1376
1377         * mini.h (MonoCompile): Add arg_types field.
1378
1379         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
1380         
1381         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
1382         the values of the local arg_array and param_types array.
1383
1384 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
1385
1386         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
1387         got accesses might only get generated later when NEWOBJ is decomposed.
1388         
1389         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
1390         looking up the native code of the target method when a delegate is called
1391         for the first time.
1392
1393         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
1394         optimization.
1395
1396         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
1397
1398         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
1399         AOT work on platforms without a working dlsym implementation.
1400
1401         * mini.h: Bump AOT image format version.
1402         
1403 2008-07-24  Mark Probst  <mark.probst@gmail.com>
1404
1405         * mini-exceptions.c: Free a MonoType with
1406         mono_metadata_free_type() instead of g_free().
1407
1408         * aot-runtime.c: Free a MonoType.
1409
1410 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
1411
1412         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
1413         optimization.
1414
1415         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
1416         fp stack on x86.
1417
1418 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
1419         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
1420         profiler hook.
1421
1422 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
1423
1424         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
1425         NEWOBJ calls on valuetypes.
1426
1427         * iltests.il.in: Add new test.
1428
1429         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
1430
1431 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
1432
1433         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
1434         is no longer needed.
1435
1436         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
1437         non register sized integer arguments.
1438         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
1439         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
1440         emit_memcpy2 ().
1441
1442         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
1443         CEE_MONO_RETOBJ.
1444         
1445         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
1446         two a binop with different sized arguments is emitted.
1447
1448         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
1449         instruction in the ins==NULL case.
1450
1451 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
1452
1453         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
1454
1455         * mini-x86.c: Fix osx build.
1456
1457         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
1458         opcodes as well.
1459
1460         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
1461         instruction for non int sized variables.
1462
1463         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
1464         implementation.
1465
1466 2008-07-23  Robert Jordan  <robertj@gmx.net>
1467
1468         * method-to-ir.c: Fix MSVC build.
1469
1470 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
1471
1472         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
1473         a non int sized type, widen it to an int since newer versions of gcc seem to
1474         generate code which needs this.
1475
1476         * ssa2.c abcremoval2.c: Fix warnings.
1477
1478         * *: Merge the Linear IR branch.
1479
1480         The original branch is at trunk/branches/vargaz/mini-linear-il, and
1481         the ChangeLog file there describes all the changes done over the years. 
1482         Further documentation can be found at www.mono-project.com/Linear_IL.
1483
1484 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
1485
1486         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
1487           The float param registers and other param registers must be the 
1488           same index on Windows x64.
1489
1490         Contributed under MIT/X11 license.
1491
1492 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
1493
1494         * mini.c: Make the previous fix GC safe.
1495
1496 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
1497
1498         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
1499
1500 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
1501
1502         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
1503           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
1504           ArgValuetypeAddrInIReg instead.
1505
1506         Contributed under MIT/X11 license.
1507
1508 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
1509
1510         * mini-codegen.c (get_register_spilling): Fix a warning.
1511
1512 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
1513
1514         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
1515         for types which the initialization fails. Raises the provided exception
1516         at the right stop after cleanup.
1517
1518 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
1519
1520         * aot-compiler.c: Free most of the memory allocated during compilation.
1521
1522         * mini.c (mini_parse_debug_options): Fix a leak.
1523         
1524         * mini.c (mini_method_compile): Don't add the method to the jit info tables
1525         during aot compilation.
1526
1527 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
1528
1529         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
1530         it has too much register pressure.
1531
1532 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
1533
1534         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
1535
1536 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
1537
1538         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
1539         on x86.
1540
1541         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
1542         on amd64 similar to the way it is done on arm.
1543
1544         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
1545
1546         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
1547         consistency, normalize error messages, avoid loading aot-only modules in
1548         normal mode.
1549
1550         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
1551         for consistency.
1552
1553         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
1554
1555 2008-07-11  Martin Baulig  <martin@ximian.com>
1556
1557         * debug-debugger.h
1558         (MonoDebuggerInfo): Add `interruption_request'.
1559
1560 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
1561
1562         * aot-compiler.c (emit_plt): Remove some dead code.
1563
1564         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
1565
1566         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
1567         return the plt info offset belonging to a given plt entry.
1568
1569         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
1570         mono_aot_get_plt_info_offset.
1571         
1572         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
1573         similar to the amd64 code by makeing jumps through a separate jump table 
1574         instead of embedding the jump addresses into the code.
1575
1576 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
1577
1578         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
1579         method.
1580
1581 2008-07-10  Martin Baulig  <martin@ximian.com>
1582
1583         * mini.c (mini_method_compile): Disable generics sharing when
1584         running in the debugger.
1585
1586 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
1587
1588         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
1589
1590         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
1591         the local register allocator from running out of registers on x86 when 
1592         using aot.
1593
1594 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
1595
1596         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
1597         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
1598         C4146.
1599
1600         Contributed under MIT/X11 license.
1601
1602 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
1603
1604         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
1605         speed up the assembler.
1606
1607 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
1608
1609         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
1610         support.
1611
1612         * mini.c: Move the soft float handling macros a bit earlier, add 
1613         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
1614         place.
1615
1616         * mini.h: Add prototype for mono_arch_fixup_jinfo.
1617
1618         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
1619         read-only to help catch code allocation requests.
1620         
1621         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
1622         and turn it off when using --aot-only or when compiling with --aot=full.
1623
1624         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
1625         jump table for switches from the normal domain mempool, not the code
1626         manager.
1627
1628         * mini-trampolines.c (get_unbox_trampoline): New function to return an
1629         unbox trampoline which handles aot-only mode too.
1630
1631         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
1632         an AOTed unbox trampoline.
1633
1634         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
1635
1636 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
1637
1638         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
1639         ""
1640
1641         Contributed under MIT/X11 license.
1642
1643 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
1644
1645         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
1646           the unwind information for the method at the end of the allocated block.
1647           
1648         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
1649           MonoCompileArch to hold the unwind info for SEH on Winx64
1650         
1651         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
1652           frame pointer info for the method being compiled.
1653           
1654         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
1655           the call to mono_exception_from_token.
1656           
1657         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
1658           storing the method prolog information in a format that the Winx64 SEH can understand.  This
1659           information is stored a the end of the method block because it is all 32-bit offset based.
1660
1661         Contributed under MIT/X11 license.
1662
1663 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
1664
1665         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
1666
1667         * wapihandles.c: Fix warnings.
1668
1669         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
1670         mode.
1671
1672         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
1673         mono_jit_compile_method in aot-only mode since that calls the type 
1674         initializer.
1675         
1676         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
1677         get_delegate_invoke_impl in aot-only mode.
1678
1679         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
1680
1681 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
1682
1683         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
1684
1685         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
1686         is on by default.
1687
1688         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
1689
1690         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
1691         init trampoline from the AOT file as well.
1692
1693         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
1694         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
1695         code.
1696
1697         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
1698         mono_init.
1699
1700         * exceptions-amd64.c: Add _full variants for the remaining exception code
1701         creation functions as well, allow emission of relocatable code, remove
1702         caching since that is now done by the caller.
1703
1704         * mini-exceptions.c: Add _full variants for the remaining exception code
1705         creation functions as well, add aot-only support.
1706
1707         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
1708         if we can determine a proper token for them.
1709         (add_wrappers): Add a few more wrappers.
1710         (emit_method_code): Remove some dead code.
1711         (emit_trampolines): Emit exception code too.
1712
1713         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
1714
1715         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
1716         mono_array_new_va which avoids varargs.
1717
1718         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
1719
1720         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
1721         mono_arch_create_specific_trampoline () in all places.
1722
1723         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
1724         a bit so it can be used for other things as well.
1725         
1726         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
1727         on demand as well.
1728
1729         * exceptions-amd64.c: Rename the caching from the exception code creation
1730         functions, it is done by the caller instead.
1731         
1732         * exceptions-amd64.c: Change the signature of the exception code creation 
1733         functions to allow the creation of relocatable code later.
1734
1735         * mini-exceptions.c: Add a set of functions to query the various 
1736         runtime-generated exception functions.
1737
1738         * mini.c mini-exceptions.c: Use the newly added functions instead of the
1739         mono_arch_.. () functions.
1740         
1741 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
1742
1743         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
1744
1745         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
1746
1747         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
1748         (mini_get_vtable_trampoline): Ditto.
1749
1750         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
1751         code in the AOT case by returning the code size and a list of relocations to
1752         the caller.
1753
1754         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
1755
1756 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
1757
1758         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
1759           clean the stack.
1760
1761         Contributed under MIT/X11 license.
1762
1763 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
1764
1765         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
1766         so the buffer size can be computed correctly. Fixes #404735.
1767
1768         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
1769         normally as cfg->debug_info is already freed.
1770
1771 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
1772
1773         * mini-amd64.c: For calls returning vtypes in registers, don't store
1774         the return address on the stack, instead allocate a separate local for
1775         it. Fixes #404729.
1776
1777 2008-07-05  Mark Probst  <mark.probst@gmail.com>
1778
1779         * mini-trampolines.c, mini.h: Add an argument to
1780         mono_create_jit_trampoline_in_domain() for turning off the adding
1781         of the sync wrapper.
1782
1783         * mini.c: Use the JIT trampoline without sync instead of
1784         ldftn_nosync in static RGCTX invoke wrappers so that the call can
1785         be patched.
1786
1787 2008-07-04  Mark Probst  <mark.probst@gmail.com>
1788
1789         * driver.c: Turn on GSHARED optimization by default.
1790
1791 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
1792
1793         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
1794         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
1795
1796         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
1797         create a variant of the generic trampoline code callable from AOTed trampolines.
1798
1799         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
1800         trampoline code callable from AOTed trampolines.
1801
1802         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
1803
1804 2008-07-04  Mark Probst  <mark.probst@gmail.com>
1805
1806         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
1807         pass-through manner.
1808
1809         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
1810         and don't fail sharing for them anymore.
1811
1812         * mini-exceptions.c: Handle exceptions in shared generic methods.
1813
1814         * generic-sharing.c: When checking the context of a generic
1815         method, also check its class's context.  Don't treat wrappers as
1816         sharable.
1817
1818         * mini-trampolines.c: Some code factored out to
1819         metadata/generic-sharing.c.  Handle the MRGCTX case.
1820
1821         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
1822         we must deal with the method being of another instantiation of the
1823         class.  Add static rgctx invoke wrappers to generic methods.
1824
1825 2008-07-04  Mark Probst  <mark.probst@gmail.com>
1826
1827         * mini.c: Provide all jit infos of generic shared methods with a
1828         generic jit info.
1829
1830         * mini-exceptions.c: Handle the new situation that a generic info
1831         might be available, but not info about the this/vtable/mrgctx
1832         variable.
1833
1834 2008-07-03  Mark Probst  <mark.probst@gmail.com>
1835
1836         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
1837         generic methods.
1838
1839 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
1840
1841         * dominators.c (check_dominance_frontier): Fix a warning.
1842
1843         * mini.h: Add some missing prototypes.
1844
1845         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
1846
1847         * driver.c (mono_jit_init_version): Correct the comments since the first
1848         argument should be the name of the root domain, not a filename.
1849
1850         * aot-runtime.c (make_writable): Error out if this is called while running
1851         with --aot-only.
1852         (load_aot_module): Ditto.
1853
1854         * aot-compiler.c: Really fix the computation of method indexes.
1855
1856         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
1857         optimizations as this is no longer called frequently.
1858
1859         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
1860         method and the invoke impl code and pass it to the delegate trampoline instead of
1861         just the delegate class.
1862
1863 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
1864
1865         * aot-compiler.c: Fixup the computation of method indexes.
1866         (add_wrappers): Create the base methods of the runtime invoke wrappers using
1867         the method builder infrastructure.
1868
1869         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
1870         has no header.
1871
1872         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
1873         mode, load the method right away instead of creating a trampoline.
1874
1875         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
1876
1877         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
1878         some checks a bit.
1879
1880 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
1881
1882         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
1883         (mono_aot_load_method): Use method_index instead of method->token.
1884
1885         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
1886         can handle icalls etc. properly.
1887
1888         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
1889
1890         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
1891
1892         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
1893         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
1894         JIT_ICALL_ADDR patch type.
1895
1896         * patch-info.h: Add JIT_ICALL_ADDR patch type.
1897
1898         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
1899         request flag.
1900         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
1901
1902         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
1903
1904 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
1905
1906         * mini.c: Use domain->jit_code_hash_lock for controlling access to
1907         domain->jit_code_hash.
1908
1909 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
1910
1911         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
1912
1913 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
1914
1915         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
1916         get_this_arg_from_call, let it compute it when needed.
1917
1918         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
1919         gsctx from code only when needed.
1920
1921         * mini-trampolines.c (get_generic_context): Rename this to 
1922         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
1923         it can be called by the arch backends.
1924
1925         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
1926
1927 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
1928
1929         * driver.c (mono_main): Add experimental --aot-only command line option.
1930
1931         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
1932         set.
1933
1934 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
1935
1936         * driver.c (DllMain): Remove mono_module_handle.
1937
1938         Contributed under MIT/X11 license.
1939
1940 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
1941
1942         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
1943         for emitting methods which are not in the source assembly. Detect and report
1944         failure of assembling+linking.
1945         
1946         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
1947
1948         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
1949
1950 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
1951
1952         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
1953
1954 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
1955
1956         * mini.h: Remove some obsolete prototypes.
1957
1958         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
1959
1960 2008-06-24  Mark Probst  <mark.probst@gmail.com>
1961
1962         * mini.c (get_object_generic_inst): Variable-sized arrays are not
1963         supported by Visual Studio, so use alloca().
1964
1965 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
1966
1967         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
1968         Fixes #402585.
1969
1970 2008-06-23  Mark Probst  <mark.probst@gmail.com>
1971
1972         * mini.c: Fail sharing of a generic method if it contains an open
1973         catch clause (because we don't pass MRGCTXs yet).
1974
1975 2008-06-23  Mark Probst  <mark.probst@gmail.com>
1976
1977         * mini.c: When compiling a method with generic sharing, insert the
1978         method instantiated with an all-Object generic context into the
1979         jit info table, instead of the context of the first instantiation
1980         of the method we happen to compile.
1981
1982 2008-06-18  Martin Baulig  <martin@ximian.com>
1983
1984         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
1985         `major_version' and `minor_version'.
1986
1987 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1988
1989         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
1990         mono_method_is_generic_sharable_impl() takes an additional
1991         argument specifying whether to treat type variables as reference
1992         types.
1993
1994 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1995
1996         * mini.h: Removed obsolete prototypes.
1997
1998 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1999
2000         * mini.c: Don't fail generic sharing for initobj and sizeof - we
2001         already handle them.
2002
2003 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2004
2005         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
2006         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
2007         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
2008         tramp-x86.c: Added a MonoGenericContext* argument to
2009         mono_arch_get_unbox_trampoline() so that it can call other
2010         functions which require it.
2011
2012 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2013
2014         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
2015         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
2016         mono_arch_get_this_arg_from_call() takes a
2017         MonoGenericSharingContext* as well.
2018
2019 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2020
2021         * mini.c: Factor out code for emitting unbox into emit_unbox() and
2022         implement generic sharing of unbox.
2023
2024 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2025
2026         * mini.c: Don't compute the vtable to determine whether a field is
2027         special static, because it might not work for open types.
2028
2029 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2030
2031         * mini.c: Removed the unused token_type and token_source arguments
2032         from get_runtime_generic_context_ptr().
2033
2034 2008-06-17  Marek Habersack  <mhabersack@novell.com>
2035
2036         * mini.c (ADD_BINOP): fix the build
2037
2038 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
2039
2040         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
2041         a widening op.
2042
2043 2008-06-16  Mark Probst  <mark.probst@gmail.com>
2044
2045         * mini.h: Removed class relations enum that's not used anymore.
2046
2047 2008-06-16  Mark Probst  <mark.probst@gmail.com>
2048
2049         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
2050
2051         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
2052         the lazy fetch trampoline access code.
2053
2054 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
2055
2056         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
2057
2058 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
2059
2060         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
2061
2062         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
2063
2064         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
2065
2066 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
2067
2068         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
2069         intrinsics.
2070
2071         * mini-ops.h: Add MIN/MAX_UN opcodes.
2072
2073         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
2074         intrinsics.
2075
2076         * basic-math.cs: Add more min/max tests.
2077
2078         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
2079
2080 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2081
2082         * mini.c: Small fix in the prologue of emit_castclass.
2083
2084 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
2085
2086         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
2087
2088         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
2089         do not work even for unsigned types. Fixes #400014.
2090
2091         * basic-math.cs: Add regression tests for unsigned Min/Max.
2092
2093 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2094
2095         * mini.c: Added additional context_used argument to several
2096         functions, which will be needed for sharing generic methods.  Use
2097         GET_RGCTX macro wherever appropriate.  Declare only one
2098         context_used in mono_method_to_ir().
2099
2100 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2101
2102         * mini.c, generic-sharing.c: Removed generic class relations.
2103
2104         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
2105         functions due to MRGCTX changes.
2106
2107 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2108
2109         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
2110         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
2111         with calculated IMT.
2112
2113         * mini.c: Generic sharing of calls via generic interfaces.
2114
2115         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
2116         generic method with non-constant MonoGenericContext*.  Instead,
2117         the context is taken out of the method itself.
2118
2119 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2120
2121         * mini.c: Generic sharing of ldvirtftn.
2122
2123 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2124
2125         * mini.c: Generic sharing of ldftn.
2126
2127 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2128
2129         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
2130
2131 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2132
2133         * mini.c: Generic sharing of the special case of ldtoken followed
2134         by a call to GetTypeFromHandle.
2135
2136 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2137
2138         * mini.c: Generic sharing of box for nullable types.
2139
2140 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
2141
2142         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
2143         are passed on the stack. Fixes #324807.
2144
2145 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
2146
2147         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
2148         for the ArgValuetypeAddrInIReg case.
2149
2150         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
2151         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
2152
2153         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
2154         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
2155         local variable and pass the local variable by reference to the called method.
2156           
2157         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
2158         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
2159
2160         Contributed under MIT/X11 license.
2161
2162 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
2163
2164         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
2165
2166         * debug-mini.c (mono_debug_print_vars): Release memory after printing
2167         everything.
2168
2169 2008-06-10  Martin Baulig  <martin@ximian.com>
2170
2171         * debug-mini.c
2172         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
2173
2174 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
2175
2176         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
2177         possible error when no arguments are passed.
2178
2179         Contributed under MIT/X11 license.
2180
2181 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
2182
2183         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
2184         where the file name is NULL.
2185
2186 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
2187
2188         * mini.c: Fix s390 build.
2189
2190 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
2191
2192         * trace.c (mono_trace_parse_options): Fix warnings.
2193
2194         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
2195
2196 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
2197
2198         * mini.c (remove_block_if_useless): Avoid printing the method name.
2199         
2200         * mini.c: Remove needless setting of ins->cil_code which is now done by 
2201         MONO_INST_NEW.
2202
2203         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
2204         LMF. Not yet used.
2205
2206         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
2207         translated code after it has been patched.
2208
2209 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
2210
2211         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
2212         avoid problems during code patching on SMP systems.
2213         (emit_call): Avoid adding a patch info which is already added by 
2214         emit_call_body.
2215         (mono_arch_emit_exceptions): Ditto.
2216
2217 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
2218
2219         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
2220         MONO_TYPE_ISSTRUCT already checks for it.
2221
2222 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
2223
2224         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
2225           structs with floats on Winx64 the float registers are not used.  
2226           The integer registers are always used..
2227         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
2228           only one register will be used and only if the size of the struct 
2229           is 1,2,4, or 8 bytes.
2230
2231         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
2232           to work for Winx64.
2233
2234         Contributed under MIT/X11 license.
2235
2236 2008-06-05  Martin Baulig  <martin@ximian.com>
2237
2238         * debug-debugger.c (debugger_lookup_class): Also call
2239         mono_class_setup_methods() here; we're only called from RTI.
2240
2241 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
2242
2243         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
2244         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
2245         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
2246         Post-process object files and add dtrace-generated object, if necessary.
2247
2248         Contributed under MIT/X11 license.
2249
2250 2008-06-04  Mark Probst  <mark.probst@gmail.com>
2251
2252         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
2253         element class.
2254
2255         * mini.c: Generic sharing for unbox.any and castclass.
2256
2257 2008-06-04  Mark Probst  <mark.probst@gmail.com>
2258
2259         * mini.c: Ignore tailcall prefix in shared generic code and when
2260         doing calls which require a vtable/rgctx argument.
2261
2262 2008-06-04  Mark Probst  <mark.probst@gmail.com>
2263
2264         * mini.c: Don't free the JIT info.
2265
2266         * driver.c: Changes in the JIT info table testing code.
2267
2268 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
2269
2270         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
2271         interruption. Fix some warnings.
2272
2273         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
2274         interruption_checkpoint.
2275
2276 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
2277
2278         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
2279         from embedding applications.
2280
2281 2008-06-02  William Holmes  <billholmes54@gmail.com>
2282
2283         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
2284           reserving 32 bytes on the stack when making calls. 
2285
2286         Contributed under MIT/X11 license.
2287
2288 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
2289
2290         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
2291         the linear IL branch.
2292
2293         * driver.c: Print out more information for --version on arm.
2294
2295 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
2296
2297         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
2298         bb_exit instead, since out of line bblocks might not actually be emitted
2299         out-of-line.
2300         
2301         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
2302         maximum epilog size for out of line bblocks if tracing is enabled.
2303
2304         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
2305
2306 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
2307
2308         * arrays.cs: Regression tests for allocating arrays with negative sizes.
2309
2310 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
2311
2312         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
2313         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
2314         opcodes.
2315
2316 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
2317
2318         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
2319         the 'value' to store is a constant.
2320
2321         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
2322
2323         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
2324         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
2325
2326 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
2327
2328         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
2329         for accessing method->generic_container.
2330
2331 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
2332
2333         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
2334         
2335         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
2336
2337         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
2338
2339         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
2340         fails.
2341
2342 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
2343
2344         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
2345
2346         * mini.c: Handle the case when mono_class_vtable () fails.
2347
2348 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
2349         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
2350         the stat profiler.
2351
2352 2008-05-22  Mark Probst  <mark.probst@gmail.com>
2353
2354         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
2355         together with domain sharing.
2356
2357 2008-05-22  Mark Probst  <mark.probst@gmail.com>
2358
2359         * mini.c: Treat callvirts to final methods like non-virtual calls
2360         when doing generic sharing, i.e. look them up in the runtime
2361         generic context.
2362
2363 2008-05-22  Mark Probst  <mark.probst@gmail.com>
2364
2365         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
2366         with computed types (for generic sharing).
2367
2368         * mini.c: Generic sharing for mkrefany and refanyval.
2369
2370 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
2371
2372         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
2373         possible.
2374
2375         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
2376         the generic sharing code.
2377         
2378         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
2379         when needed.
2380
2381 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
2382
2383         * mini.h: Remove the declaration of mono_aot_init_vtable ().
2384
2385 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
2386
2387         * driver.c: updated copyright date
2388
2389 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
2390
2391         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
2392         needed.
2393
2394 2008-05-19  Martin Baulig  <martin@ximian.com>
2395
2396         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
2397         pointing to the new `_mono_debug_using_mono_debugger' variable.
2398
2399         * driver.c
2400         (mono_main): Check mono_debug_using_mono_debugger() rather than
2401         the `MONO_INSIDE_MDB' environment variable to check whether we're
2402         inside the debugger.
2403
2404 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
2405
2406         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
2407         argument.
2408
2409 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
2410
2411         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
2412
2413         * mini.c: Added mini_assembly_can_skip_verification. This
2414         function checks if the assembly requested to skip verification. 
2415         Fixes part of #387274.
2416
2417 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
2418
2419         * mini.c (mini_get_method): Disable the check for open generic classes when
2420         using generic sharing.
2421
2422         * generics.cs: Add a test #387034.
2423
2424         * mini.c (mini_get_method): Check whenever the method class is an open generic
2425         type, and return NULL in that case, causing a verification error. Fixes
2426         #384123.
2427
2428 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
2429
2430         * driver.c (mono_main): Revert r102623. The right
2431         thing to do is to enable the verifier under verifiable
2432         unless a --security flag was passed.
2433
2434         We need this non-trivial behavior for --verify-all otherwise
2435         mcs-compileall won't be able to use it. As it needs everything to
2436         be verified under validil.
2437
2438 2008-05-06  Martin Baulig  <martin@ximian.com>
2439
2440         Fix #383749.
2441
2442         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
2443         (mono_debugger_thread_cleanup): Likewise.
2444         (mono_debugger_extended_notification): Likewise.
2445
2446 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
2447
2448         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
2449         against both inflated and non-inflated methods. We need to check against the
2450         generic definition for cases where the instantiated method is not visible.
2451         We need to check against the inflated types for cases where the instantiation
2452         changes any super type. This fixes #382986.
2453
2454         Note that this doesn't need to be applied to other parts of mono_method_to_ir
2455         that check for visibiliy as generic params only appears as the type subject
2456         of tokens on call opcodes. Field manipulation and ldftn must always
2457         target an exact type.
2458
2459 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
2460
2461         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
2462         if no related --security flag is passed.
2463
2464 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
2465
2466         * mini-arch.h: Prepare support for ppc64.
2467
2468         Contributed under MIT/X11 license.
2469
2470 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
2471
2472         * aot-runtime.c: Prepare support for ppc64.
2473
2474         Contributed under MIT/X11 license.
2475
2476 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
2477
2478         * mini-ops.h: Prepare support for ppc64.
2479
2480         Contributed under MIT/X11 license.
2481
2482 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
2483
2484         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
2485
2486         Contributed under MIT/X11 license.
2487
2488 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
2489
2490         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
2491         assemblies, since aot_name is not a full path, causing us to load MS.NET 
2492         assemblies on windows.
2493
2494 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
2495
2496         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
2497         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
2498         * main.c: Use UTF-8 encoded command line instead of Windows default code
2499         page on Windows to support Unicode.
2500         * driver.c (DllMain): New function for mixed-mode assembly support.
2501         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
2502         export __stdcall functions without decoration.
2503
2504         Contributed under MIT/X11 license.
2505
2506 2008-04-28  Mark Probst  <mark.probst@gmail.com>
2507
2508         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
2509         saving it very early.
2510
2511 2008-04-28  Mark Probst  <mark.probst@gmail.com>
2512
2513         * mini.h, mini.c: Lots of code for accessing the old RGCTX
2514         deleted.  The only way to access the new RGCTX is via the
2515         trampline.
2516
2517         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
2518         vtable instead of the RGCTX to static methods.
2519
2520         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
2521         accessing the new RGCTX.
2522
2523         * generic-sharing.c: There is no separation between self, type
2524         arguments and other types in the RGCTX anymore.
2525
2526 2008-04-25  Jonathan Chambers <joncham@gmail.com>
2527
2528         * mini-amd64.c (add_general): Remove previous stack adjustment.
2529         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
2530         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
2531         for 32 bytes of stack space reserved for all calls.
2532         
2533         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
2534         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
2535         adjustment.
2536         
2537         Code contributed under MIT/X11 license.
2538
2539 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
2540
2541         * mini.c (mini_method_verify): Only verify non-inflated methods, check
2542         against the root definition, peeling out method and type instantiations.
2543         Cache verify success results, code that fails verification is still
2544         checked multiple times.
2545
2546 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
2547
2548         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
2549
2550 2008-04-23  Jonathan Chambers <joncham@gmail.com>
2551
2552         * mini-amd64.c (add_general): Always increment stack on Win64.
2553         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
2554         on Win64.
2555         
2556         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
2557         stack based argument handling on Win64.
2558         
2559         Code contributed under MIT/X11 license.
2560
2561 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
2562
2563         * Makefile.am (version.h): Add support for git-svn.
2564
2565 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
2566
2567         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
2568         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
2569         avoiding allocations and libc functions which might deadlock.
2570         
2571         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
2572         'no-gdb-backtrace' option is set.
2573
2574         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
2575
2576         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
2577
2578 2008-04-21  Martin Baulig  <martin@ximian.com>
2579
2580         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
2581         and `get_lmf_addr'; `notification_address' is no longer a pointer.
2582
2583 2008-04-21  Martin Baulig  <martin@ximian.com>
2584
2585         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
2586         `thread_vtable', `event_handler_ptr' and `event_handler'.
2587
2588 2008-04-21  Martin Baulig  <martin@ximian.com>
2589
2590         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
2591         allows delayed initialization of the `executable_code_buffer' when
2592         attaching.
2593
2594 2008-04-21  Martin Baulig  <martin@ximian.com>
2595
2596         * mini.h (mono_debugger_create_notification_function): Removed.
2597         * tramp-*.c (mono_debugger_create_notification_function): Removed.
2598
2599         * mdb-debug-info64.s
2600         (MONO_DEBUGGER__notification_function): Added this in the .text section.
2601
2602         * mdb-debug-info32.s
2603         (MONO_DEBUGGER__notification_function): Added this in the .text section.
2604
2605         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
2606         currently only works on x86 and x86_64, so don't create it on ppc.
2607
2608 2008-04-21  Martin Baulig  <martin@ximian.com>
2609
2610         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
2611
2612         * mini.c
2613         (mini_method_compile): In the fp elimination check, check
2614         `debug_options.mdb_optimizations' in addition to
2615         mono_debug_using_mono_debugger().       
2616
2617         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
2618         disable some JIT optimizations which are only disabled when
2619         running inside the debugger.
2620         Added `--help-debug' option to describe the debugging options.
2621         (parse_debug_options): New static function to parse the `--debug'
2622         options, so we can easily add more stuff in future.
2623
2624 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
2625
2626         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
2627         the method has no body.
2628
2629 2008-04-19  Jonathan Chambers <joncham@gmail.com>
2630
2631         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
2632         assembly is not allowed in MSVC 64-bit compiler. 
2633         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
2634         as we get floating point exceptions everywhere.
2635         
2636         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
2637         correctly align arguments for call to throw_exception.
2638         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
2639         
2640         Code contributed under MIT/X11 license.
2641
2642 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
2643
2644         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
2645
2646 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
2647
2648         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
2649
2650         * mini-amd64.c (NEW_INS): Set cil_code.
2651
2652         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
2653         from mini-amd64.c so all debugger related logic is in one place.
2654
2655         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
2656         later won't have a random ip assigned to them.
2657
2658 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
2659
2660         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
2661         the arch specific function initializes code_size.
2662         (mono_create_delegate_trampoline): Ditto.
2663
2664         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
2665         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
2666         platforms.
2667
2668         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
2669         running under the debugger.
2670
2671         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
2672         debugger.
2673
2674         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
2675         debugger. Also move the disabling of optimizations here from driver.c.
2676         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
2677         debugger.
2678
2679         * mini.h (MonoCompile): Add a few new flags.
2680
2681 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
2682
2683         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
2684         so the cil_code field of created MonoInst's is properly set.
2685         (mini_select_instructions): Ditto.
2686
2687         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
2688         (MONO_INST_NEW_CALL): Ditto.
2689
2690         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
2691         in many places so the ins->cil_code field is properly initialized.
2692
2693         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
2694         place.
2695
2696 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
2697
2698         * mini.c (mini_method_compile): Print a different message when compiling a 
2699         shared method.
2700         
2701         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
2702         > 1.
2703
2704 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
2705
2706         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
2707         SSE2 instructions.
2708
2709         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
2710         
2711 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
2712
2713         * mini.c (handle_stack_args): Make this return void since its return value was
2714         never used. Also set cfg->unverifiable for invalid IL instead of calling
2715         G_BREAKPOINT ().
2716
2717 2008-04-10  Mark Probst  <mark.probst@gmail.com>
2718
2719         * mini.c: Make sure "this" is live in catch clauses with type
2720         variables in shared generic code.
2721
2722 2008-04-08  Mark Probst  <mark.probst@gmail.com>
2723
2724         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
2725         generic_class_is_reference_type() to ensure the proper behaviour
2726         when sharing generic code and the type in question is a type
2727         argument.
2728
2729 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
2730
2731         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
2732         race conditions when printing thread dumps. Fixes #377738.
2733
2734 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
2735         
2736         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
2737         shows up when both MonoInst arguments can cause aliasig.
2738         There is likely no way in the current JIT to trigger this problem, but
2739         it showed up in the development of generics sharing, when in a new
2740         opcode both args of an OP_GROUP can be aliases (addresses of a local).
2741         When the generics sharing code will be committed, its tests will be
2742         valid also for this bug.
2743
2744 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
2745
2746         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
2747         PATCH_INFO_METHOD.
2748
2749         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
2750         NULL.
2751
2752 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
2753
2754         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
2755         use a more detailed exception message for InvalidCastException.
2756
2757         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
2758
2759         * driver.c (mono_main): Add --debug=casts option to turn on better 
2760         InvalidCastException message details.
2761
2762         * mini.c (mini_get_debug_options): New helper function to return the address of
2763         the debug_options variable.
2764
2765         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
2766         the jit_tls TLS variable.
2767
2768         * mini.c (mono_jit_tls): New TLS variable.
2769
2770         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
2771         option is used.
2772
2773 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
2774
2775         * mini.h: Removed verifer related stuff. This code was moved to verify.c
2776
2777         * mini.c: Removed verifer related stuff, code moved to verify.c.
2778
2779         * driver.c: Using code from verify.c instead of mini.c.
2780
2781 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
2782
2783         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
2784         longer valid.
2785
2786 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
2787
2788         * mini.c (check_for_method_verify): Enabling verification of
2789         corlib if mono_verify_all is set. Bugs in the verifier preventing that
2790         have been fixed.
2791
2792 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
2793
2794         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
2795         caller saved registers as well.
2796         
2797         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
2798         saved registers as well.
2799
2800 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
2801
2802         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
2803
2804         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
2805         code.
2806
2807 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
2808
2809         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
2810         to get_call_info.
2811         (get_call_info): Take a gsctx argument instead of 'cfg'.
2812
2813 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
2814
2815         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
2816         mono_verify_all is set.
2817
2818         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
2819
2820         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
2821
2822 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
2823
2824         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
2825         an exception.
2826
2827         * driver.c mini.c mini.h: Add a --verify-all development option to test the
2828         verifier and the code generated by the compiler.
2829
2830 2008-03-25  Mark Probst  <mark.probst@gmail.com>
2831
2832         * mini.c: Generic sharing of the non-nullable case of the box
2833         instruction.
2834
2835 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
2836
2837         * inssel.brg: Fix the build.
2838
2839         * iltests.il.in: Add a test for lconv.ovf.u8.un.
2840
2841 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
2842
2843         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
2844         Array:Address. Fixes #372410.
2845
2846         * iltests.il.in: New tests for readonly prefix.
2847
2848 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
2849
2850         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
2851         mini-trampolines.c.
2852
2853         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
2854         mini-exceptions.c.
2855
2856         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
2857         
2858         * mini.c (mono_decompose_op_imm): New helper function.
2859
2860         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
2861         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
2862         return value.
2863
2864         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
2865         mono_arch_output_basic_block. Fix warnings.
2866
2867         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
2868         for now.
2869
2870 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
2871
2872         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
2873         since the extra frame is now detected automatically inside the loop.
2874
2875         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
2876         opts which are now in mono_peephole_ins ().
2877         
2878         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
2879
2880         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
2881         frames and skip duplicate managed-to-native frames. Fixes #367665.
2882
2883         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
2884         opts which are now in mono_peephole_ins ().
2885         (mono_arch_peephole_pass_2): Ditto.
2886
2887         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
2888
2889         * mini-codegen.c (mono_peephole_ins): New helper function containing the
2890         arch independent peephole optimizations.
2891
2892         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
2893         opts which are now in mono_peephole_ins ().
2894
2895         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
2896         
2897         * mini-s390.c (mono_arch_output_basic_block): Fix build.
2898
2899         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
2900         pattern.
2901
2902         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
2903         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
2904         opcode. 
2905
2906 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
2907
2908         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
2909         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
2910         return value.
2911
2912         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
2913         mono_arch_output_basic_block. Fix warnings.
2914
2915 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
2916
2917         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
2918         conv.ovf.u.un.
2919
2920 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
2921
2922         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
2923         conv.ovf.u.un.
2924
2925         * iltests.il: Add new tests.
2926
2927 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
2928
2929         * mini.c: Removed Windows version macros.
2930
2931 2008-03-20  Mark Probst  <mark.probst@gmail.com>
2932
2933         * generic-sharing.c: Put reflection types in the extensible part
2934         of the runtime generic context.
2935
2936         * mini.c: Generic sharing of the GetTypeHandle special case of the
2937         ldtoken instruction.
2938
2939 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
2940
2941         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
2942
2943         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
2944         
2945         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
2946         consistency with the other version on the linear IR branch.
2947
2948         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
2949
2950         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
2951
2952         * iltests.il.in: Add new tests.
2953
2954 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
2955
2956         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
2957
2958         * iltests.il.in: Add new tests.
2959
2960 2008-03-19  Mark Probst  <mark.probst@gmail.com>
2961
2962         * mini.c: Two variables with the same name were declared in
2963         nesting contexts and one wasn't initialized.  Fixed.
2964
2965 2008-03-19  Mark Probst  <mark.probst@gmail.com>
2966
2967         * mini.c: Generic sharing of the initobj instruction.
2968
2969 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
2970
2971         * mini.c: make the test to optimize ldtoken from typeof() more
2972         precise.
2973
2974 2008-03-18  Mark Probst  <mark.probst@gmail.com>
2975
2976         * mini.c: Generic sharing of the initobj instruction for reference
2977         types.
2978
2979 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
2980
2981         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
2982         the mono_breakpoint_clean_code() code to perform bound checks.
2983
2984 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
2985
2986         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
2987         mono_arch_patch_callsite() to include the start of the managed method
2988         to be able to perform bound checks.
2989
2990 2008-03-17  Mark Probst  <mark.probst@gmail.com>
2991
2992         * mini.c: Generic sharing for the isinst instruction.
2993
2994 2008-03-17  Mark Probst  <mark.probst@gmail.com>
2995
2996         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
2997         inssel-long32-mips.brg: Added opcodes for doing indirect calls
2998         with the runtime generic context argument.
2999
3000         * mini.c: Share calls to several types of unsharable methods by
3001         putting the address of the method code in the runtime generic
3002         context and doing an indirect call.
3003
3004         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
3005         to switches.
3006
3007 2008-03-16  Mark Probst  <mark.probst@gmail.com>
3008
3009         * generic-sharing.c: Change due to a change in the runtime genric
3010         context API.
3011
3012 2008-03-15  Martin Baulig  <martin@ximian.com>
3013
3014         * tramp-x86.c
3015         (mono_arch_nullify_class_init_trampoline): Add call to
3016         mono_breakpoint_clean_code() to make things work when running
3017         inside the debugger.
3018
3019         * tramp-amd64.c
3020         (mono_arch_nullify_class_init_trampoline): Add call to
3021         mono_breakpoint_clean_code() to make things work when running
3022         inside the debugger.
3023
3024 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
3025
3026         * inssel-long.brg (reg): Fix 64 bit build.
3027
3028 2008-03-14  Mark Probst  <mark.probst@gmail.com>
3029
3030         * mini.c, mini.h: Share static generic code by passing it an
3031         implicit argument pointing to the runtime generic context.
3032
3033         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
3034         inssel-long32-mips.brg: New opcodes for calling shared static,
3035         which need to be passed the runtime generic context.
3036
3037         * mini-amd64.c, mini-x86.c: Save the runtime generic context
3038         argument on the stack in the prologue if needed.  New function for
3039         finding the runtime generic context argument from the registers
3040         saved by the trampoline.
3041
3042         * mini-amd64.h, mini-x86.h: Specify which register to use for the
3043         runtime generic context argument.
3044
3045         * tramp-amd64.c: Also restore the register used for the runtime
3046         generic context argument.
3047
3048         * mini-trampoline.c: Resolve shared static calls by consulting the
3049         runtime generic context via the new argument.
3050
3051         * generic-sharing.c: Add an argument to sharability-checking
3052         functions that specifies whether type variables should be treated
3053         as sharable type arguments.
3054
3055         * inssel-x86.brg: Removed a superfluous, buggy rule.
3056
3057         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
3058         to switches.
3059
3060 2008-03-14  Martin Baulig  <martin@ximian.com>
3061
3062         * debug-debugger.c (main_thread_handler): Call
3063         mono_runtime_run_main() without sending any notifications.
3064
3065         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
3066
3067 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
3068
3069         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
3070
3071 2008-03-14  Mark Probst  <mark.probst@gmail.com>
3072
3073         * tramp-x86.c: Fixed register restore offsets in the trampoline
3074         code for ECX and EDX.
3075
3076 2008-03-12  Geoff Norton  <gnorton@novell.com>
3077
3078         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
3079         different ucontext_t implementations.
3080         * exceptions-arm.c: Use the above defines to get exceptions working on 
3081         iPhone (based on a patch by Luke Howard lukeh@padl.com)
3082         * mini-arm.c: Implement iPhone icache support (based on a patch by
3083         Luke Howard lukeh@padl.com)
3084
3085 2008-03-12  Mark Probst  <mark.probst@gmail.com>
3086
3087         * mini.c: Enable generic sharing of calls to non-static
3088         non-interface non-generic non-value-type methods.
3089
3090         * mini-trampolines.c: Resolve calls from shared generic code.
3091
3092 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
3093
3094         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
3095
3096         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
3097
3098 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
3099
3100         * mini.c: some fixes for the AOT compiler.
3101
3102 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
3103
3104         * cpu-amd64.md: Add clob:1 to some float opcodes.
3105
3106 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
3107
3108         * mini.h: Added MiniVerifierMode enumeration.
3109
3110         * mini.c: Added mini_verifier_set_mode to control
3111         the usage of the new verifier.
3112
3113         * mini.c (mono_method): Integrated the new verifier.
3114
3115         * driver.c: Extended --security option with validil and
3116         verifiable options to activate the new verifier.
3117
3118 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
3119
3120         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
3121         optimization to ctors taking 0 or 2 arguments too.
3122
3123         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
3124         a bit.
3125
3126         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
3127
3128         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
3129
3130 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
3131
3132         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
3133         non-aot case as well.
3134
3135         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
3136
3137         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
3138         changes.
3139
3140         * aot-compiler.c (encode_patch): Ditto.
3141
3142         * mini.h (G_MININT32): Fix the definition of this.
3143
3144 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
3145
3146         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
3147
3148         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
3149
3150 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
3151
3152         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
3153         methods returning vtypes in registers.
3154         (mono_arch_allocate_vars): Ditto.
3155
3156         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
3157
3158         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
3159
3160         * generics.cs: Add a test from the linear IR branch.
3161
3162         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
3163
3164         * mini.c (inline_method): Cache failed inline attempts.
3165
3166 2008-03-04  Mark Probst  <mark.probst@gmail.com>
3167
3168         * mini.c: For shared methods of generic classes put the location
3169         of "this" into the MonoGenericJitInfo.
3170
3171         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
3172         register out of a MonoContext by register number.  Add the generic
3173         sharing context as an argument to mono_arch_find_this_argument().
3174
3175         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
3176         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
3177         for new arch function.
3178
3179         * mini-exception.c: Handle open exception clauses in shared
3180         generic code.
3181
3182         * mini-trampolines.c: Supply additional argument to
3183         mono_arch_find_this_argument().
3184
3185 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
3186
3187         * Makefile.am (regtests): Run the bench.exe tests last.
3188
3189 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
3190
3191         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
3192         a bit.
3193
3194 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
3195
3196         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
3197         with MS.
3198
3199         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
3200         
3201         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
3202
3203         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
3204         whose class has no cctor.
3205
3206         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
3207
3208 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
3209
3210         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
3211         unverified.
3212
3213 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
3214
3215         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
3216         to be in sync with the code on the linear IR branch.
3217
3218         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
3219
3220         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
3221
3222 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
3223
3224         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
3225
3226         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
3227
3228         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
3229
3230         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
3231
3232         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
3233         
3234         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
3235         body.
3236
3237 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
3238
3239         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
3240         OP_LOADR4_MEMBASE emission.
3241
3242         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
3243         (mono_spillvar_offset_float): Ditto.
3244
3245         * mini-mips.c (mono_arch_emit_prolog): Ditto.
3246
3247         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
3248         emission.
3249
3250         * basic-long.cs: Add regression tests for them.
3251
3252         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
3253         use.
3254         (mono_arch_allocate_vars): Fix representation of single-precision float
3255         argument.
3256         (mono_arch_output_basic_block): Ditto.
3257
3258         * inssel-mips.brg: Ditto, remove duplicate items.
3259
3260         * mini-mips.c (emit_load_volatile_arguments): New function to handle
3261         arguments of tail calls as on other platforms.
3262         (mono_arch_output_basic_block): Handle tail calls.
3263
3264         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
3265         register.
3266
3267         * objects.cs (test_5_pass_static_struct): Add test for it.
3268
3269         Contributed under MIT/X11 license.
3270
3271 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
3272
3273         * Makefile.am: Use gmcs for compiling the regression tests.
3274
3275         * *.2.cs *.2.il: Rename to *.cs and *.il.
3276
3277 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
3278
3279         * regalloc.h: Make the vassign array smaller.
3280
3281         * mini.c (mini_method_compile): Remove an unused field in cfg.
3282
3283         * mini-codegen.c: Add a bunch of micro optimizations.
3284
3285 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
3286
3287         * regalloc.h: Remove some unused fields.
3288
3289 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
3290
3291         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
3292
3293         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
3294
3295 2008-02-22  Mark Probst  <mark.probst@gmail.com>
3296
3297         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
3298
3299         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
3300         trampoline: Fetch an entry from the runtime generic context.  If
3301         it's NULL, jump to the actual trampoline to fill the runtime
3302         generic context.  Otherwise, return it.
3303
3304         * mini.c: Call the lazy fetch trampoline to get entries out of the
3305         runtime generic context.
3306
3307         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
3308         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
3309         tramp-sparc.c: Stubs for the lazy fetch trampoline.
3310
3311 2008-02-21  Mark Probst  <mark.probst@gmail.com>
3312
3313         * mini.c: Fetch data out of the extensible part of the runtime
3314         generic context instead of calling a helper function.
3315
3316         * generic-sharing.c: Some functions moved into
3317         metadata/generic-sharing.c.  Helper function for fetching other
3318         types now checks and asserts against extensible rgctx (just for
3319         debugging purposes - the helper function isn't called anymore
3320         unless for debugging).
3321
3322 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
3323
3324         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
3325         for tail calls up to the point that the tests in iltests.exe run. Also add a
3326         dummy CKFINITE implementation.
3327         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
3328         needed for trampoline LMF frames.
3329
3330         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
3331         trampoline LMF frames.
3332
3333 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
3334
3335         * mini.c (inline_method): clean any pending loader error when inlining fail.
3336         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
3337
3338 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
3339
3340         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
3341
3342         * aot-runtime.c (decode_patch_info): Ditto.
3343
3344         * mini.c (mono_resolve_patch_target): Ditto.
3345         
3346         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
3347         icall wrappers.
3348
3349         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
3350         
3351         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
3352         if it references an icall address.
3353
3354 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
3355
3356         * cpu-s390x.md: Remove some more unused opcodes.
3357         
3358         * cpu-s390x.md: Remove some unused opcodes.
3359
3360         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
3361         mono_op_imm_to_op ().
3362
3363         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
3364         instead of a switch statement.
3365         
3366         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
3367         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
3368
3369         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
3370         
3371         * mini-codegen.c: Remove unused mono_regstate2_... functions.
3372
3373         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
3374         -1.
3375
3376 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
3377
3378         * driver.c (mono_main): Improve error reporting when an assembly cannot be
3379         opened. Fixes #362607.
3380
3381         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
3382
3383         * iltests.il.in: Add a test for static methods in interfaces.
3384
3385 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
3386
3387         * genmdesc.c (build_table): Fix a crash on older glib versions.
3388
3389         * cpu-sparc.md: Remove some unused opcodes.
3390         
3391         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
3392         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
3393
3394         * cpu-amd64.md: Remove some unused opcodes.
3395
3396         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
3397         like the other opcodes.
3398
3399 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
3400
3401         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
3402
3403         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
3404
3405         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
3406         variables 'cfg' instead of 'm' for consistency.
3407
3408         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
3409
3410         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
3411         argument holding the vtype return address, to avoid the ambigious use of
3412         cfg->ret for this purpose.
3413
3414         * mini.c (NEW_RETLOADA): Use vret_addr if set.
3415
3416         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
3417         
3418         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
3419         new mono_print_ins () function which only takes one argument.
3420
3421 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
3422
3423         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
3424         macro arguments.
3425
3426 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
3427
3428         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
3429
3430         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
3431
3432         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
3433         opcodes and other small changes.
3434
3435         * mini-ops.h: Add some new opcodes from the linear IR branch.
3436
3437         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
3438
3439         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
3440         opcodes, use the REG_MEMBASE opcodes instead.
3441         
3442         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
3443         opcodes, use the REG_MEMBASE opcodes instead.
3444         
3445         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
3446         linear IR branch.
3447
3448         * mini.c (mono_op_imm_to_op): New helper function.
3449
3450         * mini-ops.h: Add some opcodes from linear IR branch.
3451
3452 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
3453
3454         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
3455         <tsv@solvo.ru>.
3456
3457 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
3458
3459         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
3460         OP_ICONV_TO_R4/R8.
3461
3462         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
3463
3464 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
3465
3466         * aot-compiler.c (emit_method_code): Add an assert.
3467
3468         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
3469         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
3470         methods.
3471
3472 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
3473
3474         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
3475         some load/store opcodes so they are consistent. 
3476         (mono_arch_emit_prolog): Simplify some code.
3477
3478         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
3479
3480         * objects.cs: Add tests for large argument offsets on ARM.
3481
3482         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
3483         stack offsets. Fixes #359651.
3484
3485         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
3486
3487         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
3488
3489         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
3490
3491         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
3492
3493         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
3494
3495         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
3496         rid of CEE_CONV_R_UN.
3497
3498         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
3499
3500 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
3501
3502         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
3503
3504         * mini.c (mono_normalize_opcodes): Add some more opcodes.
3505
3506         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
3507
3508         * cpu-amd64.md: Remove some unused opcodes.
3509
3510         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
3511
3512         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
3513
3514         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
3515         arch specific functions for its parts. Call the peephole pass after local
3516         regalloc so the prolog can compute a more accurate max_offset.
3517         
3518         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
3519         the corresponding OP_I/OP_L opcodes.
3520
3521         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
3522
3523         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
3524
3525 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
3526
3527         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
3528         as they are handled in mini.c.
3529
3530         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
3531         
3532         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
3533         case since it is handled in mini.c.
3534
3535         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
3536
3537         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
3538
3539         * *.c: Use the new opcodes in the IR and back end code.
3540
3541         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
3542
3543         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
3544
3545 2008-02-06  Mark Probst  <mark.probst@gmail.com>
3546
3547         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
3548         an assert because it has a race condition.
3549
3550 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
3551
3552         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
3553
3554         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
3555
3556         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
3557
3558         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
3559         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
3560
3561 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
3562
3563         * cpu-amd64.md (move): Correct the maximum size of move.
3564
3565 2008-02-05  Mark Probst  <mark.probst@gmail.com>
3566
3567         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
3568         the generic class init trampoline to return quickly if the class
3569         is already inited.
3570
3571 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
3572
3573         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
3574         issues where an 32 bit callsite cannot be patched by a 64 bit address.
3575
3576 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
3577
3578         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
3579         branch.
3580
3581 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
3582
3583         * objects.cs: Add some soft-float tests.
3584
3585         * mini.c: Fix a couple more soft-float issues.
3586
3587         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
3588
3589         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
3590         avoid a REX prefix.
3591
3592 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
3593
3594         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
3595         exception happens while compiling a virtual method.
3596
3597 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
3598
3599         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
3600         
3601         * mini-sparc.c: Fix build.
3602
3603         * mini-sparc.c (get_call_info): Add support for generic sharing.
3604
3605         * mini-exceptions.c: Add a FIXME.
3606
3607 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
3608
3609         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
3610         altstack handling code.
3611
3612         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
3613         
3614         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
3615
3616         * mini-s390.c: Add support for generic sharing.
3617
3618         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
3619         Fix CAS on s390.
3620         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
3621
3622         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
3623
3624         * mini-s390x.c: Add support for generic sharing.
3625         
3626         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
3627         Fix CAS on ia64.
3628         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
3629
3630         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
3631         can be used since it takes a 16 bit signed immediate.
3632
3633         * inssel-s390x.brg: Fix OP_SETRET.
3634
3635         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
3636
3637         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
3638
3639         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
3640
3641         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
3642
3643         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
3644         in one place.
3645
3646         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
3647         stuff.
3648
3649         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
3650         of the unused mono_arch_patch_delegate_trampoline stuff.
3651
3652 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
3653
3654         * basic-long.cs: Move the fp related tests to basic-float.cs.
3655
3656         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
3657
3658         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
3659
3660         * basic-calls.cs: Add a test for proper float argument passing.
3661
3662         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
3663         if the context corresponds to an exception received through a signal.
3664
3665         * exceptions.cs: Add a test for nullref handling at the start of a try
3666         clause.
3667
3668         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
3669
3670         * jit-icalls.c (mono_break): New JIT icall.
3671
3672         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
3673
3674         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
3675
3676 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
3677
3678         * cpu-*.md: Get rid of unused opcodes.
3679
3680         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
3681
3682         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
3683         by all platforms.
3684
3685         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
3686         define.
3687
3688         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
3689         the arch independent trampoline code in mini-trampolines.c.
3690
3691         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
3692
3693         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
3694
3695         * mini-s390.h: Remove an unused define.
3696         
3697         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
3698         the arch independent trampoline code in mini-trampolines.c.
3699
3700         * mini-arm.c (mono_arch_emit_prolog): Fix build.
3701
3702 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
3703
3704         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
3705
3706         * mini-s390.c (mono_arch_emit_prolog): Fix build.
3707
3708         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
3709
3710         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
3711
3712         * cpu-amd64.md: Use smaller sizes for int opcodes.
3713
3714         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
3715
3716         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
3717         objects.cs.
3718
3719         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
3720         debugging.
3721
3722         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
3723         instead of though a pointer to save an indirection when accessing elements of
3724         the array.
3725
3726         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
3727         some typos.
3728         (NOT_IMPLEMENTED): New helper macro.
3729         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
3730         of a bb.
3731
3732         * *.c: Use the new helper macro.
3733
3734 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
3735
3736         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
3737
3738 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
3739
3740         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
3741         stack slots.
3742
3743 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
3744
3745         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
3746         profiling is enabled.
3747         
3748         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
3749         the end.
3750         (mono_arch_emit_prolog): Add more first bblock optimizations.
3751
3752         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
3753         in order if possible.
3754         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
3755         bblock, since the arguments are still in their original registers.
3756
3757         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
3758
3759 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
3760
3761         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
3762         as well.
3763
3764         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
3765         offset 0.
3766
3767         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
3768
3769         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
3770         process async exceptions received while in unmanaged code.
3771
3772         * mini.c (mini_init): Install a callback with the runtime which will be called
3773         when a thread receives an async exception while in unmanaged code.
3774
3775         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
3776
3777         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
3778
3779 2008-01-16  Wade Berrier  <wberrier@novell.com>
3780
3781         * cpu-g4.md:
3782         * cpu-arm.md:
3783         * cpu-s390x.md:
3784         fix build
3785
3786 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
3787
3788         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
3789         compilation with sun cc.
3790
3791         * cpu-*.md: Fix the build.
3792
3793         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
3794
3795         * mini-amd64.h: Add some comments to the MonoLMF structure.
3796
3797         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
3798         
3799         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
3800         in the LMF structure if possible. This saves two instructions in the
3801         managed->native wrappers.
3802
3803         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
3804
3805 2008-01-16  Mark Probst  <mark.probst@gmail.com>
3806
3807         * generic-sharing.c: New type argument lookup code which uses the
3808         runtime generic context template.
3809
3810 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
3811
3812         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
3813
3814         * mini-arm.c (add_general): Fix arm eabi parameter passing.
3815         (mono_arch_output_basic_block): Fix localloc implementation.
3816
3817         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
3818
3819         * mini-ia64.c (peephole_pass): Fix ia64 build.
3820
3821         * mini-amd64.c (peephole_pass): Fix a warning.
3822         
3823         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
3824         at a constant offset from sp/fp.
3825
3826         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
3827         instead of obtaining it from *lmf in the managed method case.
3828
3829 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
3830
3831         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
3832
3833 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
3834
3835         * mini.h (MonoInstList): New type.
3836         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
3837         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
3838         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
3839         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
3840         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
3841         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
3842         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
3843         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
3844         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
3845         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
3846         MONO_INST_LIST_FOR_EACH_ENTRY,
3847         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
3848         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
3849         mono_inst_list_first, mono_inst_list_last,
3850         mono_inst_list_next, mono_inst_list_prev): New instruction
3851         list handling interfaces.
3852         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
3853         list head 'ins_list'.
3854         (MonoInst): Replace next pointer with list head 'node'.
3855         (MonoCallInst): Make 'out_args' a MonoInstList.
3856         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
3857         (MonoCompile): Delete reverse_inst_list and
3858         reverse_inst_list_len.
3859         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
3860         mono_arch_lowering_pass, mono_arch_local_regalloc,
3861         mono_arch_output_basic_block, mono_arch_emit_prolog):
3862         Convert to new instruction lists.
3863         (insert_after_ins): Delete.
3864         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
3865         instruction lists.
3866         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
3867         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
3868         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
3869         mono_emulate_opcode, mono_emit_load_got_addr,
3870         inline_method, mono_method_to_ir, mono_print_bb_code,
3871         print_dfn, decompose_pass, nullify_basic_block,
3872         replace_out_block_in_code, remove_block_if_useless,
3873         merge_basic_blocks, move_basic_block_to_end,
3874         try_unsigned_compare, optimize_branches, mono_print_code,
3875         mini_select_instructions, remove_critical_edges): Likewise.
3876         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
3877         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
3878         mono_arch_output_basic_block, mono_arch_emit_prolog):
3879         Likewise.
3880         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
3881         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
3882         mono_arch_output_basic_block): Likewise.
3883         (inst_list_prepend, insert_after_ins): Delete.
3884         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
3885         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
3886         instruction lists.
3887         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
3888         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
3889         mono_arch_emit_prolog): Likewise.
3890         * cfold.c (mono_constant_fold): Likewise.
3891         * liveness.c (visit_bb, mono_analyze_liveness,
3892         optimize_initlocals): Likewise.
3893         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
3894         * graph.c (mono_draw_code_cfg): Likewise.
3895         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
3896         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
3897         mono_ssa_cprop): Likewise.
3898         * abcremoval (get_relations_from_previous_bb, process_block):
3899         Likewise.
3900         * local-propagation (mono_cprop_invalidate_values,
3901         mono_local_cprop_bb): Likewise.
3902         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
3903         peephole_pass, mono_arch_output_basic_block,
3904         mono_arch_emit_prolog): Likewise.
3905         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
3906         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
3907         mono_arch_emit_prolog): Likewise.
3908         (insert_after_ins): Delete.
3909         * aliasing.c (print_code_with_aliasing_information,
3910         mono_build_aliasing_information, mono_aliasing_deadce):
3911         Convert to new instruction lists.
3912         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
3913         peephole_pass, NEW_INS, mono_arch_lowering_pass,
3914         mono_arch_local_regalloc, mono_arch_output_basic_block):
3915         Likewise.
3916         (insert_after_ins): Delete.
3917         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
3918         peephole_pass, mono_arch_output_basic_block): Convert to
3919         new instruction lists.
3920         * mini-codegen (InstList, inst_list_prepend,
3921         insert_after_ins): Delete.
3922         (insert_before_ins, get_register_force_spilling,
3923         get_register_spilling, free_up_ireg, free_up_reg,
3924         create_copy_ins, create_spilled_store, alloc_int_reg,
3925         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
3926         to new instruction lists.
3927         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
3928         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
3929         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
3930         (insert_after_ins): Delete.
3931         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
3932         mono_arch_local_regalloc, mono_arch_output_basic_block,
3933         mono_arch_call_opcode): Convert to new instruction lists.
3934         (insert_after_ins): Delete.
3935         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
3936         peephole_pass, mono_arch_output_basic_block,
3937         mono_arch_emit_prolog): Convert to new instruction lists.
3938
3939 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
3940
3941         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
3942
3943         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
3944         Fixes #353182.
3945
3946         * Makefile.am (version.h): Make this work with non-bash shells.
3947
3948 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
3949
3950         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
3951
3952 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
3953
3954         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
3955         the InitializeArray optimization.
3956
3957 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
3958
3959         * mini.c driver.c: Don't include os/gc_wrapper.h.
3960
3961 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
3962
3963         * mini.c (print_jit_stats): Print GC statistics if available.
3964
3965 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
3966
3967         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
3968
3969 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
3970
3971         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
3972
3973 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
3974
3975         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
3976         
3977         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
3978
3979         * driver.c (mono_main): Ditto.
3980
3981 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
3982
3983         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
3984
3985         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
3986         in the vtable can't be encoded.
3987         (compile_method): Ditto.
3988
3989 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
3990
3991         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
3992         defined.
3993
3994         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
3995         lmf->rbp.
3996
3997         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
3998         the top LMF entry belongs to the current method.
3999
4000         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
4001
4002 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
4003
4004         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
4005         
4006         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
4007
4008         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
4009
4010         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
4011
4012         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
4013
4014         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
4015         implementation.
4016
4017         * basic-float.cs: Add an ulong->double cast test.
4018
4019 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
4020
4021         * mini.c (mono_method_to_ir): Fix a warning.
4022
4023 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
4024
4025         * mini-ops.h: Add OP_SWITCH.
4026
4027         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
4028         CEE_SWITCH in back-end code, use OP_SWITCH instead.
4029
4030 2007-12-11  Geoff Norton  <gnorton@novell.com>
4031
4032         * mini-s390x.c: Minor change to the MAX() define to allow
4033         it to compile with other gcc versions.
4034
4035 2007-12-11  Geoff Norton  <gnorton@novell.com>
4036
4037         * cpu-s390x.md:
4038         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
4039
4040 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
4041
4042         exceptions-arm.c (mono_arch_get_restore_context): Restore
4043         the frame pointer.
4044
4045         exceptions-arm.c (throw_exception): Save the frame pointer.
4046         This is a partial fix for #323747. Only the client side is
4047         fixed.
4048
4049 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
4050
4051         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
4052         was using an unrelated variable to log the class which
4053         needed the cctor to be called. This was crashing on arm.
4054
4055 2007-12-09  Robert Jordan  <robertj@gmx.net>
4056
4057         * mini-x86.c (mono_arch_emit_epilog):
4058         Consider all kinds of 64-bit types. Fixes #323114.
4059
4060 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
4061
4062         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
4063
4064 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
4065
4066         * mini-amd64.c (peephole_pass): Add a missing instruction check.
4067
4068 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
4069
4070         * mini.c: run type ctor before allocating an object, not only
4071         when running it's constructor method (fixes at least part of bug #342507).
4072
4073 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
4074         
4075         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
4076         
4077         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
4078         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
4079         function.
4080
4081         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
4082         mono_generic_class_init_trampoline () the same as it is done with the other
4083         trampolines.
4084
4085         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
4086         aot-runtime.c aot-compiler.c: Implement AOT support.    
4087
4088 2007-12-07  Mark Probst  <mark.probst@gmail.com>
4089
4090         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
4091         build for archs which don't have the vtable trampoline defined
4092         yet.
4093
4094 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
4095
4096         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
4097
4098         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
4099
4100         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
4101
4102         * tramp-<ARCH>.c: Use the new helper function.
4103
4104 2007-12-07  Mark Probst  <mark.probst@gmail.com>
4105
4106         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
4107         trampoline call, which takes a vtable argument.
4108
4109         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
4110         OP_TRAMPCALL_VTABLEs like other calls.
4111
4112         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
4113         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
4114         call.  Implemented a support function which fetches the vtable
4115         from a register set.
4116
4117         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
4118         Implemented a generic class init trampoline, using the
4119         OP_TRAMPCALL_VTABLE opcode.
4120
4121         * mini.c: Implemented static field access when sharing generic
4122         code.  This implies initing the class using the new
4123         OP_TRAMPCALL_VTABLE call.
4124
4125 2007-12-07  Mark Probst  <mark.probst@gmail.com>
4126
4127         * mini.c: Don't compile methods with sharing enabled if their
4128         classes are disabled for sharing.
4129
4130 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
4131
4132         * inssel.brg: Add a missing sign extension to the GETCHR and array access
4133         opcodes. Fixes #346563.
4134
4135         * objects.cs: Add a new test.
4136
4137         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
4138
4139         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
4140         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
4141
4142 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
4143
4144         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
4145
4146 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
4147
4148         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
4149         code stream.
4150
4151 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
4152
4153         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
4154
4155         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
4156         optimization in the AOT case.
4157         
4158 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
4159
4160         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
4161         
4162         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
4163
4164         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
4165
4166         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
4167
4168         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
4169         is created by the inlined delegate ctor.
4170
4171         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
4172
4173         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
4174
4175 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
4176
4177         * cpu-x86.md: Fix the length of ckfinite.
4178
4179 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
4180
4181         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
4182         
4183         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
4184         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
4185
4186         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
4187
4188         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
4189         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
4190
4191 2007-11-28  Martin Baulig  <martin@ximian.com>
4192
4193         * mini-x86.c
4194         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
4195         after creating the trampoline.
4196
4197 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
4198
4199         * aot-runtime.c (load_aot_module): Check runtime version if needed.
4200
4201         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
4202         the same version.
4203
4204         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
4205         instead of the calling method to help AOT.
4206
4207         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
4208
4209 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
4210
4211         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
4212         is defined.
4213
4214 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
4215
4216         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
4217         
4218         * aot-compiler.c (compile_method): Correct check for generic method definitions.
4219         (encode_method_ref): No need to handle generic method definitions specially.
4220
4221         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
4222
4223         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
4224         decode_klass_info.
4225
4226         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
4227         encode_klass_info.
4228         (compile_method): Enable generic sharing.
4229
4230 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
4231
4232         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
4233         (mini_method_compile): Add preliminary support for AOTing shared generic code.
4234
4235         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
4236         generic code.
4237
4238         * mini-trampolines.c: Fix a warning.
4239
4240         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
4241         NEW_PCONST.
4242         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
4243         (generic_class_is_reference_type): Remove unused function.
4244
4245         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
4246         in the generic vtable trampoline case.
4247
4248         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
4249         
4250         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
4251         return an AOT method based on a vtable slot.
4252
4253         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
4254
4255         * mini.c (mini_get_vtable_trampoline): Export this.
4256
4257 2007-11-22  Martin Baulig  <martin@ximian.com>
4258
4259         * debug-debugger.h
4260         (MonoDebuggerInfo): Move `debugger_version' up.
4261
4262 2007-11-22  Martin Baulig  <martin@ximian.com>
4263
4264         * mini-amd64.c
4265         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
4266
4267         * mini-trampolines.c
4268         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
4269         after compiling the method.
4270
4271 2007-11-20  Martin Baulig  <martin@ximian.com>
4272
4273         * debug-mini.c
4274         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
4275         (mono_debugger_remove_breakpoint): Likewise.
4276         (mono_debugger_check_breakpoints): Likewise.
4277
4278         * debug-debugger.c: Implement the new breakpoint interface here.
4279
4280 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
4281
4282         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
4283         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
4284
4285         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
4286
4287 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
4288
4289         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
4290
4291         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
4292         mini.c.
4293
4294         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
4295         mini.c.
4296
4297         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
4298         returning a vtype in a register.
4299
4300         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
4301         here from the arch specific code.
4302
4303         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
4304         mini.c.
4305
4306         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
4307         (mono_arch_emit_prolog): Increment maximum prolog size.
4308
4309         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
4310         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
4311
4312         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
4313         MonoGenericSharingContext.
4314
4315         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
4316         MonoGenericSharingContext. Allocate memory from the cfg mempool.
4317
4318 2007-11-15  Mark Probst  <mark.probst@gmail.com>
4319
4320         * mini.c, mini.h, generic-sharing.c: Functions for producing code
4321         which extract fields out of the runtime generic context.  Full
4322         sharing of the NEWARR opcode.
4323
4324 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
4325
4326         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
4327         --enable-minimal=ssa.
4328
4329 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
4330
4331         * mini-trampolines.c (mono_delegate_trampoline): Update after 
4332         mono_marshal_get_delegate_invoke () signature change.
4333
4334 2007-11-13  Mark Probst  <mark.probst@gmail.com>
4335
4336         * mini.c: Removed the shared context in favor of the generic
4337         sharing context.  Allocate the MonoJitInfo structure with room for
4338         the generic sharing context if it's needed.
4339
4340         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
4341         domain-internals.h now.
4342
4343         * mini-x86.c: Pass the generic sharing context to get_call_info ().
4344
4345         * generic-sharing.c: Several changes for working without a shared
4346         context and instead operating on open types instead.
4347
4348 2007-11-12  David S. Miller  <davem@davemloft.net>
4349
4350        * inssel-sparc.brg: Fix double instruction emit.
4351
4352 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
4353
4354         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
4355         Get/Set/Address methods.
4356         
4357         * mini.c debug-debugger.c mini-trampolines.c: Update after 
4358         mono_marshal_get_delegate_invoke signature change.
4359
4360 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
4361
4362         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
4363         This can happens with dynamic methods. Fixes the other bug in #322722.
4364
4365 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
4366
4367         * tramp-arm.c (mono_arch_patch_callsite): Support patching
4368         BX call sequence.
4369
4370         * mini-arm.c (arm_patch): Implement patching of BX call
4371         sequence. Fixes one of the bugs in #322722.
4372
4373 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
4374
4375        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
4376        under Linux.  We only need to flush every 32-byte cache line.    
4377
4378 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
4379
4380         * mini.c:
4381         move_basic_block_to_end: Add branches when needed, eventually creating
4382         a new BB.
4383         optimize_branches: added a parameter that tells if it's ok to create
4384         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
4385         and avoid calling move_basic_block_to_end when it's not ok.
4386         Fixes bug 318677.
4387
4388 2007-11-07  Mark Probst  <mark.probst@gmail.com>
4389
4390         * mini.c: Abort inlining call to InitializeArray if something
4391         looks wrong.  Let the icall handle it, which now has proper safety
4392         checks.
4393
4394 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
4395
4396         * mini.c (mono_spill_call): add support for soft-float.
4397
4398         * mini.c (mono_method_to_ir): add support for soft-float
4399         to inlined functions that return float.
4400
4401         * mini.c (mono_method_to_ir): add support for soft-float
4402         to cee_stsfld opcode on float fields.
4403
4404 2007-11-05  Geoff Norton  <gnorton@novell.com>
4405
4406         * mini-x86.h: Fix the structure access for X86 Leopard.
4407
4408
4409 2007-11-05  Martin Baulig  <martin@ximian.com>
4410
4411         * mini-trampolines.c
4412         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
4413         after compiling the method to notify the debugger.
4414
4415 2007-11-05  Martin Baulig  <martin@ximian.com>
4416
4417         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
4418
4419 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
4420
4421         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
4422         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
4423
4424 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
4425
4426         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
4427         native-to-managed wrappers.
4428         
4429 2007-11-01  Geoff Norton  <gnorton@novell.com>
4430
4431         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
4432         members.
4433
4434 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
4435
4436         * mini.c, mini-x86.c: when getting back from unmanaged code
4437         to managed via a marshaled delegate we also need to set the
4438         right domain.
4439
4440 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
4441
4442         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
4443         for amd64.
4444
4445 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
4446
4447         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
4448         let the debugger or other external agents to tell the JIT when
4449         a sw breakpoint has been inserted in the code that the JIT needs
4450         to be able to inspect.
4451
4452 2007-10-31  Martin Baulig  <martin@ximian.com>
4453
4454         * debug-debugger.h
4455         (MonoDebuggerInfo): Remove `runtime_class_init'.
4456
4457 2007-10-30  Martin Baulig  <martin@ximian.com>
4458
4459         * debug-mini.h
4460         (mono_debugger_thread_created): Added `MonoThread *' argument.
4461         (mono_debugger_extended_notification): New public method.
4462         (mono_debugger_trampoline_compiled): New public method.
4463
4464         * debug-mini.c
4465         (MonoDebuggerThreadInfo): Added `thread' and
4466         `extended_notifications' fields.
4467
4468         * debug-debugger.c
4469         (debugger_executable_code_buffer): New static variable.
4470
4471         * debug-debugger.h
4472         (MonoDebuggerInfo): Added `executable_code_buffer',
4473         `executable_code_buffer_size', `breakpoint_info_area',
4474         `breakpoint_table' and `breakpoint_table_size'.
4475
4476 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
4477
4478         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
4479         that IP  either is an unused value or the vtable pointer. IMT 
4480         calls use vtable + offset now. Reduced by almost half the size
4481         of IMT entries.
4482
4483 2007-10-26  Jonathan Chambers <joncham@gmail.com>
4484
4485         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
4486         defines to access param registers. Replace long usage with
4487         gsize as sizeof(long) != sizeof(void*) on Win64.
4488
4489         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
4490         on Win64. Fix intrinsic, use _AddressOfReturnAddress
4491         instead of non-existant _GetAddressOfReturnAddress.
4492
4493         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
4494         param registers. Save/restore %rdi and %rsi in MonoLMF.
4495
4496         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
4497         param registers. Modify (throw_exception) signature to take 
4498         %rdi and %rsi on Win64. 
4499
4500         Code is contributed under MIT/X11 license.
4501
4502 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
4503
4504         * helpers.c: unlink debugging output files.
4505
4506 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
4507
4508         * mini.c: Move mono_create_ftnptr () to object.c.
4509
4510 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
4511
4512         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
4513         optional. This function can now be used to disassemble code generated
4514         outside the JIT such as trampolines and IMT thunks.
4515
4516         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
4517
4518         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
4519         vtable pointer from a ldr instruction.
4520
4521         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
4522         new IMT call sequence.
4523
4524         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
4525         call sequence for interface invocations.
4526
4527         * mini-arm.c (mono_arch_emit_imt_argument): added, required
4528         for imt support. This function is empty since IMT on ARM requires no
4529         special handling on the IR side.
4530
4531         * mini-arm.c (mono_arch_find_imt_method): added, required for
4532         imt support.
4533
4534         * mini-arm.c (mono_arch_find_this_argument): added, required
4535         for imt support.
4536
4537         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
4538         a ldr instruction to load a value stored in the code stream.
4539
4540         * mini-arm.c (mono_arch_build_imt_thunk):added, required
4541         for imt support.
4542
4543
4544 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
4545
4546         * mini.c (mini_init): Install the jump trampoline callback.
4547
4548 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4549
4550         * mini-trampolines.c: handle synchronized methods with the common
4551         vtable trampoline (bug #335601).
4552
4553 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
4554
4555         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
4556
4557         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
4558         64 bit platforms.
4559
4560         * mini-ia64.h mini-ia64.c: Add support for IMT.
4561
4562         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
4563         prolog. Fixes #331958.
4564
4565 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
4566
4567         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
4568
4569 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4570
4571         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
4572         trampoline.
4573
4574 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4575
4576         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
4577         trampoline.
4578
4579 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
4580
4581         * mini-x86.c, mini-x86.h: x86 support for the common vtable
4582         trampoline.
4583
4584 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
4585
4586         * mini-trampolines.c: changed the magic rampoline to understand
4587         the common vtable trampoline method: the method to invoke is
4588         determined by the vtable displacement of the call.
4589
4590 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
4591
4592         * mini.c, mini.h: register the common vtable trampoline if the
4593         architecture supports it.
4594
4595 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4596
4597         * cpu-amd64.md: use the correct max length for tls_get.
4598
4599 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
4600
4601         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
4602         CEE_STELEM_ANY. Fixes #333696.
4603
4604 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
4605
4606         * exceptions-x86.c: provide more graceful handling of the case where
4607         we followed a bogus function pointer from managed code (bug #332866).
4608
4609 2007-10-11  Mark Probst  <mark.probst@gmail.com>
4610
4611         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
4612         replaces the generic_shared flag and will carry more information
4613         in the future.
4614
4615         * generic-sharing.c: Added mini_type_stack_size() which allows
4616         allows open types if given a generic sharing context.
4617         mini_get_basic_type_from_generic() takes a
4618         MonoGenericSharingContext* instead of a MonoCompile* now.
4619
4620         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
4621         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
4622         mini-sparc.c, mini-x86.c: Trivial changes required by the two
4623         changes above.  Just passing arguments through to the right
4624         places.
4625
4626 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
4627
4628         * mini-arm.c: unify the call emission to emit_code_seq().
4629
4630 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
4631
4632         * tramp-arm.c: reduced the trampoline size.
4633
4634 2007-10-10  Mark Probst  <mark.probst@gmail.com>
4635
4636         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
4637         variable handling out of arch-specific code.
4638
4639 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
4640
4641         * mini-arm.c: implemented fast delegate dispatch.
4642
4643 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
4644
4645         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
4646         that fp elimination is turned off if the space required by locals is too
4647         big. Fixes #331958.
4648
4649 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
4650
4651         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
4652         ARM to the new style trampoline.
4653
4654 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
4655
4656         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
4657
4658         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
4659
4660 2007-10-09  Martin Baulig  <martin@ximian.com>
4661
4662         * debug-debugger.h
4663         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
4664         `field_info_offset_offset'.     
4665
4666 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
4667
4668         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
4669         removed more internal usage of the r11 register and made it available
4670         to the register allocator.
4671
4672 2007-10-08  Mark Probst  <mark.probst@gmail.com>
4673
4674         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
4675         when sharing generics and treat type variables as references.
4676
4677 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
4678
4679         * mini-ppc.c: started removing the internal uses of register r11
4680         to eventually allow the register allocator to manage it as an
4681         additional available register.
4682
4683 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
4684
4685         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
4686
4687 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
4688
4689         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
4690         specific trampolines as they are not performance critical as a jump
4691         target (maybe align as before only for AOT code?). This saves about
4692         200 KB of native code on x86 for monodevelop startup.
4693
4694 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
4695
4696         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
4697         monodevelop startup.
4698
4699 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
4700
4701         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
4702
4703         * mini-sparc.h mini-sparc.c: Implement IMT support.
4704
4705         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
4706         its smaller and doesn't clobber sparc_g1.
4707
4708         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
4709
4710 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
4711
4712         * mini-ppc.c: optimized the size of the IMT thunks a bit.
4713
4714 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
4715
4716         * mini-ppc.c: implemented fast delegate invocation.
4717
4718 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
4719
4720         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
4721
4722 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
4723
4724         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
4725         code to the new style trampoline in preparation for IMT support.
4726
4727 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
4728
4729         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
4730         systems already. This also reduces the specific trampiline sizes and
4731         prepares for the use of r12 as the IMT identifier register.
4732
4733 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4734
4735         * mini-mips.h: endianess fix (simplified from a patch by
4736         Thomas Kunze <thommy@tabao.de>, bug #323737).
4737
4738 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
4739
4740         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
4741         to access ucontext fields and enable netbsd support
4742         (partially from Magnus Henoch <mange@freemail.hu>).
4743
4744 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4745
4746         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
4747         use the preprocessor from the CPP env var if it is set.
4748
4749 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
4750
4751         * mini-trampolines.c: fixed an assertion and moved it earlier in the
4752         code, before interface_offset gets used.
4753
4754 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
4755
4756         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
4757         mono_class_setup_vtable () before accessing klass->vtable.
4758
4759 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
4760
4761         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
4762         hackish.
4763
4764 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4765
4766         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
4767         IMT slots (this saves hundreds of KB of memory in programs like
4768         IronPython and Monodevelop).
4769
4770 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
4771
4772         * mini.c: print the delegate counter.
4773
4774 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
4775
4776         * mini-x86.c: make it easier to enable the debugging code for IMT
4777         slots.
4778
4779 2007-09-28  Martin Baulig  <martin@ximian.com>
4780
4781         * debug-debugger.h
4782         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
4783         `mono_method_klass_offset' and `mono_method_token_offset'.
4784
4785 2007-09-20  Mark Probst  <mark.probst@gmail.com>
4786
4787         * mini.c: First generics sharing implementation.  Can only share
4788         in very simple cases.  If sharing doesn't work it falls back to
4789         dedicated compilation.
4790
4791         * mini.h: Flag in MonoCompile to specify whether generic
4792         compilation is shared.  Flags enum for marking which generic inst
4793         of a context is used.  Prototypes for helper functions.
4794
4795         * generic-sharing.c: Helper functions for generic method sharing.
4796
4797         * optflags-def.h: Optimization flag (gshared) for enabling generic
4798         method sharing added.
4799
4800         * Makefile.am: generic-sharing.c added.
4801
4802 2007-09-19 Daniel Nauck <dna@mono-project.de>
4803
4804         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
4805
4806 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
4807         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
4808         fixes bug 325507.
4809
4810 2007-09-19  Martin Baulig  <martin@ximian.com>
4811
4812         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
4813         mono_debug_cleanup() is now part of mono_cleanup().
4814
4815 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
4816
4817         * driver.c (mono_main): Fix a warning.
4818
4819 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
4820
4821         * aot-compiler.c: Optimize various parts when processing large assemblies.
4822         Fixes ##325568.
4823
4824         * mini.c (mono_patch_info_hash): Improve hash function.
4825
4826 2007-09-14  Jonathan Chambers <joncham@gmail.com>
4827
4828         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
4829         
4830         Code is contributed under MIT/X11 license.
4831
4832 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
4833
4834         * mini.c (mini_init): Fix a leak.
4835
4836         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
4837
4838 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
4839
4840         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
4841
4842 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
4843
4844         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
4845
4846 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
4847
4848         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
4849         variance tests.
4850
4851         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
4852
4853         * mini.c (handle_alloc): Enable managed allocators in AOT code.
4854
4855         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
4856
4857         * aot-runtime.c (decode_patch_info): Ditto.
4858
4859 2007-09-12  Jonathan Chambers <joncham@gmail.com>
4860
4861         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
4862         static case. Cache delegates in architecture specific code, 
4863         based on number of parameters.
4864         
4865         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
4866         in architecture specific code, based on number of parameters.
4867         
4868         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
4869         caching happen in architecture specific code now.
4870         
4871         Code is contributed under MIT/X11 license.
4872
4873 2007-09-12  Jonathan Chambers <joncham@gmail.com>
4874
4875         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
4876         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
4877         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
4878
4879         Code is contributed under MIT/X11 license.
4880
4881 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
4882         * mini.c: (mono_thread_abort) Fixed bug #82416.
4883
4884 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
4885
4886         * mini.: hook the new managed GC allocation feature into the JIT.
4887
4888 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
4889
4890         * mini.c: implementation for the new runtime tls opcode.
4891
4892 2007-09-11  Martin Baulig  <martin@ximian.com>
4893
4894         * debug-debugger.h
4895         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
4896         `mono_method_inflated_offset'.
4897
4898 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
4899
4900         * driver.c mini.h mini.c: Add a new devel command line option for injecting
4901         async exceptions into a method.
4902
4903         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
4904         purpose of testing whenever the unwinder works at every instruction.
4905
4906 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
4907
4908         * mini.c: check accessibility of method used in ldftn (fixes
4909         bug #82635).
4910
4911 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
4912
4913         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
4914
4915         * inssel.brg: Fix a warning.
4916
4917 2007-09-03  Martin Baulig  <martin@ximian.com>
4918
4919         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
4920         now takes the `main_method' as argument.
4921
4922 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
4923
4924         * cpu-sparc.md (endfilter): Add missing src1:i argument.
4925
4926 2007-08-30  Jonathan Chambers <joncham@gmail.com>
4927
4928         * driver.c: include the cil-coff.h header on Windows.
4929         
4930         Code is contributed under MIT/X11 license.
4931
4932 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
4933
4934         * mini.c, driver.c: don't include the cil-coff.h header.
4935
4936 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
4937
4938         * mini.c: flag places that needs fixes fo soft-float support.
4939
4940 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
4941
4942         * mini.h, inssel-float.brg: fix soft-float constant loads on big
4943         endian systems (partially from Dean Jenkins, bug #81924).
4944
4945 2007-08-28  Mark Probst  <mark.probst@gmail.com>
4946
4947         * mini.c (check_linkdemand): Remove embedded reference object in
4948         call to LinkDemandSecurityException.
4949         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
4950         with an IntPtr instead of a reference object.
4951
4952 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
4953
4954         * mini.c (handle_initobj): Handle alignment properly.
4955
4956         * inssel.brg (mini_emit_memset): Ditto. 
4957
4958         * inssel.brg (mini_emit_memcpy): Ditto. 
4959
4960         * inssel-sparc.brg: Ditto.              
4961
4962         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
4963
4964 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
4965
4966         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
4967         exceptions raised in unmanaged code. Fixes part of #82594.
4968
4969 2007-08-24  Mark Probst  <mark.probst@gmail.com>
4970
4971         * mini.c (mono_method_to_ir), declsec.c
4972         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
4973
4974 2007-08-22  Martin Baulig  <martin@ximian.com>
4975
4976         * debug-mini.h
4977         (MonoDebuggerThreadInfo): New typedef.
4978         (mono_debugger_thread_table): New global variable.
4979         (mono_debugger_thread_created): New public function.
4980         (mono_debugger_thread_cleanup): New public function.
4981
4982         * debug-debugger.h
4983         (MonoDebuggerInfo):
4984         - removed `get_current_thread' and `lookup_assembly'.
4985         - removed `data_table'.
4986         - added `thread_table'.
4987
4988         * mini.c
4989         (mono_thread_start_cb): Call mono_debugger_thread_created().
4990         (mono_thread_attach_cb): Likewise.
4991         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
4992         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
4993         initial domain.
4994
4995         * driver.c (mono_main): Move mono_debug_init() up, before calling
4996         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
4997
4998 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
4999
5000         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
5001         together when passing several arguments of type double (gives a small
5002         speedup and saves a few bytes of generated code).
5003
5004 2007-08-20  Jb Evain  <jbevain@novell.com>
5005
5006         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
5007
5008 2007-08-20  Jb Evain  <jbevain@novell.com>
5009
5010         * mini.c (mono_method_to_ir): throw MethodAccessException
5011         and FieldAccessException instead of InvalidProgramException.
5012
5013 2007-08-20  Mark Probst  <mark.probst@gmail.com>
5014
5015         * mini.c: CoreCLR security checks.
5016
5017         * mini.h: Removed MonoSecurityMode (moved to
5018         metadata/security-manager.h) and mono_security_mode global var
5019         (replaced by set/get functions in security-manager.h).
5020
5021         * driver.c: Added "core-clr-test" security mode for testing.  Used
5022         set-function for setting security mode.
5023
5024 2007-08-17  Mark Probst  <mark.probst@gmail.com>
5025
5026         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
5027         the new jit_info_table.
5028
5029         * driver.c: Test code for the new jit_info_table (enabled by the
5030         define MONO_JIT_INFO_TABLE_TEST).
5031
5032 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
5033
5034         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
5035         detection of call <REG> instruction sequence. Fixes build on freebsd.
5036
5037 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
5038
5039         * mini-exceptions.c: Fix a warning.
5040
5041 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
5042
5043         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
5044         stack overflow handling code on amd64 too.
5045
5046         * mini-exceptions.c (mono_setup_altstack): Make this use 
5047         mono_thread_get_stack_bounds ().
5048
5049         * mini-x86.h: Disable sigaltstack on solaris x86.
5050
5051 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
5052
5053         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
5054
5055 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
5056
5057         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
5058
5059 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
5060
5061         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
5062
5063         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
5064
5065 2007-08-03  Neale Ferguson <neale@sinenomine.net>
5066
5067         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
5068         due to alignment.
5069
5070 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
5071
5072         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
5073         to be emitted (bug #82281).
5074
5075 2007-08-01  Martin Baulig  <martin@ximian.com>
5076
5077         Merged the `debugger-dublin' branch.
5078
5079         * debug-debugger.h (MonoDebuggerInfo):
5080         Removed the `old_*' compatibility entries.
5081         Added `debugger_version' and `data_table'.
5082         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
5083         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
5084
5085         * debug-mini.c
5086         (MiniDebugMethodBreakpointInfo): Add `address_list'.
5087         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
5088         instead of a `gconstpointer'.
5089         (mono_debugger_insert_method_breakpoint): Return a
5090         `MonoDebugMethodAddressList *'.
5091
5092 2007-06-28  Martin Baulig  <martin@ximian.com>
5093
5094         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
5095
5096 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
5097
5098         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
5099         __builtin_frame_address () since it is broken on older gcc versions.
5100
5101 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
5102
5103         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
5104         on the stack overflow handling and made the managed stack overflows
5105         catchable in most cases using soft guard pages.
5106         * exceptions-x86.c: added code to restore the protection in the soft
5107         guard pages at the end of exception handling.
5108
5109 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
5110
5111         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
5112
5113 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5114
5115         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
5116         exception handling.
5117
5118 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5119
5120         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
5121         signal handling support until it has been ported to the new mechanism.
5122         * mini.c: fixed stack overflow detection and use the new
5123         architecture code  to handle signals on the altstack.
5124
5125 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
5126
5127         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
5128         stack overflows on the alt stack.
5129
5130 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
5131
5132         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
5133         stack overflows on the alt stack.
5134
5135 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
5136
5137         * exceptions-ppc.c: cleanup preparing for altstack support.
5138
5139 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
5140
5141         * exceptions-arm.c: cleanup preparing for altstack support.
5142
5143 2007-07-27  Mark Probst  <mark.probst@gmail.com>
5144
5145         * mini.c (print_jit_stats): Output hazard pointer stats.
5146
5147 2007-07-26  Mark Probst  <mark.probst@gmail.com>
5148
5149         * driver.c, mini.c: Replaced security mode flags with a single
5150         enum variable.
5151
5152 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
5153
5154         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
5155
5156 2007-07-25  Mark Probst  <mark.probst@gmail.com>
5157
5158         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
5159         (which doesn't do anything yet) for activating Core CLR
5160         (Silverlight) security.
5161
5162 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
5163
5164         * mini-codegen.c: work around a possible gcc bug on arm.
5165
5166 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
5167
5168         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
5169         message for platforms that don't support AOT compilation.
5170
5171 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
5172
5173         * mini.h, mini.c, driver.c: temporary smcs hack.
5174
5175 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
5176
5177         * mini-arm.h, mini-arm.c: arm EABI fixes.
5178
5179 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
5180
5181         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
5182         case.
5183
5184         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
5185         trampolines taking a method argument.
5186
5187         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
5188
5189         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
5190         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
5191
5192         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
5193         JIT compilation throws an exception. Fixes #82050.
5194
5195 2007-07-19  Mark Probst  <mark.probst@gmail.com>
5196
5197         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
5198         with the MONO_EXCEPTION_ defines.
5199
5200 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
5201
5202         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
5203         #82117.
5204         
5205         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
5206         the cause of an assertion.
5207
5208 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
5209
5210         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
5211         removed.
5212
5213 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
5214
5215         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
5216         assert. Should fix #82103.
5217
5218 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
5219
5220         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
5221         here too. Fixes #82095.
5222
5223         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
5224         addresses.
5225
5226         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
5227
5228         * mini-amd64.h: Enable IMT for amd64.
5229         
5230         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
5231
5232 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
5233
5234         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
5235
5236 2007-07-12  Mark Probst  <mark.probst@gmail.com>
5237
5238         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
5239         as soon as check_linkdemand sets an exception_type.
5240
5241 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
5242
5243         * mini-x86.c: fixed offsets for IMT call sequence.
5244         * mini-x86.h: enable IMT again.
5245
5246 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
5247
5248         * trace.c (mono_trace_enter_method): Decode MonoType too.
5249
5250         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
5251
5252         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
5253
5254         * mini-amd64.c: Add preliminary IMT implementation.
5255         
5256 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
5257
5258         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
5259         understand the new IMT-base interface invocation (thanks to
5260         Daniel Nauck for the report and the remote debugging session).
5261
5262 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
5263
5264         * mini-x86.c: size and speed optimizations for the IMT bsearch.
5265
5266 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
5267
5268         * Makefile.am (aotcheck): Make this actually use the AOTed code.
5269
5270 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
5271
5272         * mini-trampolines.c: implement AOT IMT support.
5273         * mini-x86.h: enable IMT support for wider testing.
5274
5275 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
5276
5277         * inssel.brg (emit_imt_argument): Add aot support here.
5278
5279         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
5280
5281 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
5282
5283         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
5284         of the IMT implementation, partially from massi, with my
5285         implementation of the bsearch sequence. Disabled by default until
5286         the AOT code is implemented.
5287
5288 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
5289
5290         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
5291
5292         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
5293
5294 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
5295
5296         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
5297         arch-independent IMT JIT code from Massimiliano
5298         Mantione (massi@ximian.com) with small cleanups from me.
5299
5300 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
5301
5302         * Makefile.am: fix svn invocation to get the svn revision to be
5303         independent of the local language (build fix).
5304
5305 2007-07-09  Mark Probst  <mark.probst@gmail.com>
5306
5307         * mini.c (inline_method): Reset cfg->exception_type if the
5308         inlining is aborted.  Fixes: 82049.
5309
5310 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
5311
5312         * mini.c: remove assert from exception handling code when exception_ptr
5313         is not set.
5314
5315 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
5316
5317         * mini.c (mono_codegen): Add an assert.
5318
5319         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
5320         enter and leave code.
5321         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
5322
5323 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5324
5325         * mini-ppc.c: fixed memory corruption for localloc(0)
5326         (bug #81852).
5327
5328 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
5329         
5330         * mini.c: Fix warnings.
5331
5332 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
5333
5334         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
5335         to emit better double->int conversions.
5336
5337 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
5338
5339         * mini.c: the provided Min/Max optimizations are valid for unisgned
5340         ints.
5341
5342 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
5343
5344         * 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
5345
5346 2007-06-28  Miguel de Icaza  <miguel@novell.com>
5347
5348         * mini.c (mono_running_on_valgrind): Add support for reporting the
5349         method and  its boundaries to valgrind.
5350
5351 2007-06-28  Martin Baulig  <martin@ximian.com>
5352
5353         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
5354
5355 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
5356
5357         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
5358
5359         * generic.2.cs: Add new test case.
5360
5361 2007-06-25  Martin Baulig  <martin@ximian.com>
5362
5363         Merged the `debugger-dublin' branch.
5364
5365         * debug-mini.c
5366         (mono_debugger_insert_method_breakpoint): New public method.
5367         (mono_debugger_remove_method_breakpoint): Likewise.
5368         (mono_debugger_check_breakpoints): New static method.
5369         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
5370
5371         * debug-debugger.h (MonoDebuggerInfo):
5372         Renamed (to keep backward compatibility in the vtable):
5373         `insert_breakpoint' -> `old_insert_breakpoint'.
5374         `remove_breakpoint' -> `old_remove_breakpoint'.
5375         `create_string' -> `old_create_string'.
5376         `lookup_class' -> `old_lookup_class'.
5377         `lookup_type' -> removed; changed into a dummy field.
5378         `lookup_assembly' -> `old_lookup_assembly'.
5379         Added (same functionality, but different signature):
5380         `create_string', `lookup_class', `lookup_assembly'
5381         Added new:
5382         `get_method_addr_or_bpt', `remove_method_breakpoint',
5383         `runtime_class_init'.
5384
5385         * debug-debugger.c: Merged the `debugger-dublin' branch.
5386
5387 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
5388
5389         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
5390         well.
5391         (peephole_pass): Likewise.
5392
5393 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
5394
5395         * driver.c: hopefully make setaffinity work also for ancient
5396         versions of linux.
5397
5398 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
5399
5400         * driver.c : win32 build fix.
5401
5402 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
5403
5404         * driver.c: check for the MONO_NO_SMP env var and bind to a single
5405         processor if it is set.
5406
5407 2007-06-21  Martin Baulig  <martin@ximian.com>
5408
5409         * debug-mini.h: New file.
5410
5411         * debug-mini.c
5412         (mono_debugger_insert_breakpoint_full): Moved here from
5413         ../metadata/mono-debug-debugger.c.
5414         (mono_debugger_remove_breakpoint): Likewise.
5415         (mono_debugger_breakpoint_callback): Likewise.
5416
5417 2007-06-15  Raja R Harinath  <rharinath@novell.com>
5418
5419         * jit-icalls.c (mono_helper_compile_generic_method): Update to
5420         changes in MonoGenericClass.
5421
5422 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
5423
5424         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
5425
5426 2007-06-14  Raja R Harinath  <rharinath@novell.com>
5427
5428         * jit-icalls.c (mono_helper_compile_generic_method): Update to
5429         removal of MonoGenericMethod.
5430
5431 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5432
5433         * mini-exceptions.c: hooks for the exception events profiling API.
5434
5435 2007-06-14  Randolph Chung  <tausq@debian.org>
5436
5437         * Makefile.ma: Add hppa target.
5438         * mini-arch.h: Include mini-hppa.h
5439         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
5440         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
5441         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5442
5443 2007-06-14  Randolph Chung  <tausq@debian.org>
5444
5445         * inssel.brg: Add rules for "chained" compare-branch operations so that
5446         a single compare op can affect multiple branches.  Adjust cost for
5447         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
5448         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
5449         cost for some rules so that they can more easily be overridden by
5450         per-arch rules (with fixes from lupus).
5451         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5452
5453 2007-06-13  Randolph Chung  <tausq@debian.org>
5454
5455         * mini-ops.h: Reorder branch ops so that they match the order of the
5456         corresponding CEE_* ops.  The code expects them this way.
5457         Add new ops for HPPA target.
5458         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5459
5460 2007-06-13  Randolph Chung  <tausq@debian.org>
5461
5462         * mini-exceptions.c: Handle cases where the stack grows towards
5463         larger addresses.
5464         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5465
5466 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
5467
5468         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
5469         counter.
5470         * driver.c: explain where a non-matching corlib is found.
5471
5472 2007-06-13  Mark Probst  <mark.probst@gmail.com>
5473
5474         * mini.c (print_jit_stats): Output dynamic code allocation stats.
5475
5476 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
5477
5478         * mini-exceptions.c: Generate a method profile leave event during
5479         an exception to ensure that the profiler gets notified.
5480
5481 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
5482
5483         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
5484         branch.
5485
5486         * cpu-amd64.md: Add long_and/or/xor opcodes.
5487
5488 2007-06-06  Wade Berrier  <wberrier@novell.com>
5489
5490         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
5491         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
5492         length of instruction shr_imm (expected 8, got 10)
5493
5494 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
5495
5496         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
5497
5498 2007-06-06  Mark Probst  <mark.probst@gmail.com>
5499
5500         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
5501         MonoInternalHashTable again (fixed bug in the internal hash table
5502         code).
5503
5504 2007-06-06  Mark Probst  <mark.probst@gmail.com>
5505
5506         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
5507         Have to figure out what makes it crash the SWF regression.
5508
5509 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
5510
5511         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
5512
5513 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5514
5515         * mini.c: optimize out the type check when storing null in a
5516         reference array.
5517
5518 2007-06-04  Mark Probst  <mark.probst@gmail.com>
5519
5520         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
5521         MonoInternalHashTable.
5522
5523 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
5524
5525         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
5526         signed integer methods.
5527
5528 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
5529
5530         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
5531         permanently since the current approach doesn't work.
5532
5533 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
5534
5535         * inssel.brg (stmt): Only call delegate->invoke_impl if 
5536         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
5537
5538 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
5539
5540         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
5541         the sreg2==rdx case.
5542         
5543         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
5544         account if it contains a rex prefix.
5545         (peephole_pass): Handle OP_FMOVE as well.
5546
5547 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
5548
5549         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
5550         as it causes regressions.
5551
5552 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
5553
5554         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
5555         static case as well.
5556
5557         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
5558
5559         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
5560         (mono_arch_get_this_arg_from_call): Ditto.
5561
5562         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
5563
5564         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
5565         invoke_impl field.
5566
5567         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
5568         (mono_arch_get_this_arg_from_call): Ditto.
5569
5570         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
5571         
5572         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
5573         try to create optimized invoke code and use that for further invocations. 
5574         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
5575
5576         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
5577
5578 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
5579
5580         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
5581         sealed classes or methods.
5582         *devirtualization.cs: tests for the new optimization
5583
5584 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
5585
5586         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
5587         by the update_volatile () function.
5588
5589 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
5590
5591         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
5592         require it.
5593
5594         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
5595
5596 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
5597
5598         * mini.c: Add configure checks for header files.
5599         * mini-x86.c: Add configure checks for header files.
5600         * trace.c: Add configure checks for header files.
5601         * aot-runtime.c: Add configure checks for header files.
5602         * aot-compiler.c: Add configure checks for header files.
5603         * driver.c: Add configure checks for header files.
5604         * mini-codegen.c: Add configure checks for header files.
5605         
5606         Code is contributed under MIT/X11 license.
5607
5608 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
5609
5610         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
5611         icompare_imm -128 + op_iclt. Fixes #81703.
5612
5613 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
5614
5615         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
5616
5617 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
5618
5619         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
5620         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
5621         so that all isinst checks now use "interface_bitmap".
5622
5623 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
5624
5625         * cpu-amd64.md (jmp): Fix a warning.
5626
5627         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
5628
5629         * basic.cs: Add new regression test.
5630
5631         * basic.cs: Remove test which is now in basic-long.cs.
5632
5633         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
5634
5635         * basic-long.cs: Add new test.
5636         
5637 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
5638
5639         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
5640
5641 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
5642
5643         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
5644
5645         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
5646         places.
5647         
5648         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
5649         throwing code a bit.
5650
5651         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
5652         the exception throwing code a bit.
5653
5654         * mini-x86.c (get_call_info): Allocate result from a mempool.
5655
5656 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
5657
5658         * aot-compiler.c (find_typespec_for_class): Fix the assert.
5659
5660         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
5661
5662         * mini.h (MonoCompile): Add 'token_info_hash' field.
5663
5664         * mini.c: Save token->method associations during compilation so the AOT 
5665         compiler can use it.
5666         
5667         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
5668         which reference generic classes and methods.
5669
5670 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
5671
5672         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
5673
5674         * aot-compiler.c (compile_method): Fix a typo in a comment.
5675
5676         * aot-runtime.c (decode_cached_class_info): Skip generic types.
5677
5678         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
5679         everything generic.
5680
5681         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
5682
5683 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
5684
5685         * mini.h (MonoCompile): Add 'args' field.
5686
5687         * mini.c (mono_compile_create_vars): Store variables representing the arguments
5688         into cfg->args.
5689
5690         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
5691
5692 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
5693
5694         * mini.c (mono_compile_get_interface_var): Remove this unused function.
5695
5696         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
5697
5698         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
5699         opcodes for some opcodes.
5700
5701         * mini.h *.brg *.c: Use the new opcodes.
5702
5703 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
5704
5705         * mini.h: Bumped aot revision.
5706
5707         * inssel.brg: modified code generation of type checks for interfaces
5708         to use the new "MonoClass.interface_bitmap" instead of the old
5709         "MonoClass.interface_offsets".
5710
5711 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
5712
5713         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
5714
5715 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
5716
5717         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
5718         64 bit platforms.
5719
5720 2007-04-27  Neale Ferguson <neale@sinenomine.net>
5721
5722         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
5723
5724 2007-04-27  Wade Berrier  <wberrier@novell.com>
5725
5726         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
5727         mini.h) to fix build.
5728
5729 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
5730
5731         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
5732         
5733         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
5734         causes the corlib unit tests to fail.
5735
5736 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
5737
5738         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
5739
5740         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
5741
5742         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
5743         opcodes to the comparison relations.
5744
5745         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
5746         opcodes to their types.
5747         
5748         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
5749
5750         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
5751         it in cfg->arch.cinfo.
5752
5753         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
5754
5755         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
5756         cfg->cil_offset_to_bb.
5757
5758 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
5759
5760         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
5761         created becase of initlocals.
5762
5763 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
5764
5765         * mini-alpha.c cpu-alpha.md: More alpha port work from 
5766         Sergey Tikhonov <tsv@solvo.ru>.
5767
5768 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
5769
5770         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
5771
5772 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
5773
5774         * cpu-s390.md (break): Correct the length of break instruction.
5775
5776 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5777
5778         * mini.c: fix a couple of soft-float issues and comments.
5779
5780 2007-04-15  Miguel de Icaza  <miguel@novell.com>
5781
5782         * trace.c (is_filenamechar): - is also a filename char.
5783
5784 2007-04-15  Neale Ferguson <neale@sinenomine.net>
5785
5786         * mini-s390.c: Correct checking for enum type in return value processing.
5787
5788 2007-04-14  Raja R Harinath  <rharinath@novell.com>
5789
5790         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
5791         (version.h): Makefile is in the build directory.
5792
5793 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
5794
5795         * mini-amd64.h: fix for assertion failure on Solaris/amd64
5796
5797 2007-04-11  Martin Baulig  <martin@ximian.com>
5798
5799         * mini.c (can_access_member): Fix handling of generic classes;
5800         fixes #81259.
5801
5802 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
5803
5804         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
5805
5806 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
5807
5808         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
5809
5810 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
5811
5812         * mini-codegen.c: make sure the right spill amount is
5813         used for fp or integer registers (fixes the float_sub_spill() on ppc).
5814
5815 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
5816
5817         * mini-ppc.c: fixes for the fp_branch_nan test.
5818
5819 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
5820
5821         * basic.cs: Comment out new test which still fails on ia64.
5822
5823 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
5824
5825         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
5826
5827 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
5828
5829         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
5830
5831 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
5832
5833         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
5834         on 64 bit machines. Fixes part of #80738.
5835
5836         * basic.cs: Add regression test.
5837
5838 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
5839
5840         * inssel.brg basic.cs: Revert previous change to fix build.
5841
5842         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
5843         platforms.
5844         
5845         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
5846
5847         * basic.cs: Add new regression test.
5848
5849 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
5850
5851         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
5852         many arguments.
5853
5854 2007-03-16  Neale Ferguson <neale@sinenomine.net>
5855
5856         * cpu-s390x.md: Correct length of break instruction.
5857
5858 2007-03-16  Neale Ferguson <neale@sinenomine.net>
5859
5860         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
5861         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
5862
5863 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
5864
5865         * *.c: Begin WIN64 port.
5866         * mini.c:  Use correct register in profiler.
5867         * mini-amd64.c: No inline assembly on Win64.
5868         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
5869         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
5870         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
5871         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
5872         mono_arch_ip_from_context for Win64.
5873         
5874         Contributed under MIT/X11 license.
5875
5876 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
5877
5878         * exceptions-amd64.c (seh_handler): Ditto.
5879
5880         * exceptions-x86.c (seh_handler): Fix a memory leak.
5881
5882 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
5883
5884         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
5885         mini-s390x.c: fixed peephole optimizations to deal
5886         correctly with 1 and 2 byte reload avoidance.
5887
5888 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
5889
5890         * cpu-s390.md, cpu-s390x.md: update localloc length.
5891
5892 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
5893
5894         * cpu-g4.md: added missing descriptions.
5895
5896 2007-03-14  Miguel de Icaza  <miguel@novell.com>
5897
5898         *  Makefile.am: Add support so the tail tests are not executed on
5899         PowerPC as that is a known limitation of the PowerPC port.
5900
5901 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
5902
5903         * runmdesc.bat:  Move to msvc directory.
5904         
5905 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
5906
5907         * runmdesc.bat:  Run executable that was produced by the current
5908         target and sent via an argument.
5909         
5910 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
5911
5912         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
5913         #81102.
5914
5915         * generics.2.cs: Add regression test.
5916
5917 2007-03-09  Wade berrier  <wberrier@novell.com>
5918
5919         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
5920
5921 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
5922
5923         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
5924         AOT code depends on this.
5925
5926 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
5927
5928         * mini.c: more precise tracking of types in the eval stack
5929         (part of fix for bug #81044).
5930
5931 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
5932
5933         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
5934
5935         * aot-compiler.c (encode_patch): Remove an obsolete comment.
5936
5937 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
5938
5939         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
5940
5941         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
5942
5943 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
5944
5945         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
5946         a pointer on 64 bit systems. Fixes #80190.
5947
5948         * iltests.il: Add new regression test.
5949
5950 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
5951
5952         * mini.c: inline a constant for Environment.IsRunningOnWindows.
5953
5954 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
5955
5956         * trace.c: Remove an erroneous alignemnt check when tracing.
5957           Fixes --trace on OSX86.
5958
5959 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
5960
5961         * mini-$(arch).h: initialize SP in context for all the archs.
5962
5963 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
5964
5965         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
5966         regressions in the thread tests.
5967
5968 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
5969
5970         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
5971         - fixed implementation of LOCALLOC opcode
5972         - implemented non-un compare for floats
5973         - code cleanup
5974         - implementation of FDIV and CKFINITE opcodes
5975         - fixes for latest mono updates
5976         - additional arch opcodes
5977
5978 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
5979
5980         * Makefile.am: simplify and merge rules for cross-compilation.
5981
5982 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
5983
5984         * local-propagation.c: Actually *apply* the fix for bug 80591...
5985
5986 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
5987
5988         * mini-exceptions.c: backuot part of the last change
5989         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
5990
5991 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
5992         * inssel.brg: Fix bug 59286.
5993
5994
5995 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
5996
5997         * mini-exceptions.c: patch from Zoltan to correctly check for
5998         stack boundaries (using the stack register, not the frame register),
5999         fixes bugs #80724, #79717.
6000
6001 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
6002
6003         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
6004         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
6005
6006         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
6007         presence of frame pointer elimination.
6008
6009 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
6010         
6011         * mini-x86.h: NetBSD UCONTEX_REG defines.
6012
6013 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
6014
6015         * inssel-amd64.brg: Fix amd64 build.
6016
6017 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
6018
6019         * mini.h: remove extern to workaround what looks likes gcc bug 26905
6020         on amd64.
6021
6022 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
6023
6024         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
6025         ends.
6026
6027         * mini-<ARCH>.c: Use mono_is_regsize_var ().
6028
6029 2007-01-30 Mark Mason <mason@broadcom.com>
6030
6031            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
6032            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
6033            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
6034            beginning support for CEE_JMP [not quite working yet]
6035            * tramp-mips.c: LMF handling now works
6036         
6037 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
6038
6039         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
6040
6041         * mini.h (NULLIFY_INS): New macro.
6042
6043 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
6044
6045         * mini.c: statistical profiler fix for windows, patch
6046         from Tor Lillqvist (tml@novell.com).
6047
6048 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
6049         * local-propagation.c: Fix bug 80591.
6050
6051 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
6052
6053         * Makefile.am: put back the --export-dynamic option as with
6054         the previous gmodule flags (thanks to Robert Jordan).
6055
6056 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
6057
6058         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
6059
6060         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
6061         simplify and speed up the local register allocator. Also rename some fields
6062         like iassign->vassign.
6063         
6064         * regalloc.c: Remove some functions which are no longer used since their
6065         inlined version is in mini-codegen.c.
6066         
6067         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
6068
6069         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
6070
6071 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
6072
6073         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
6074         narrowing. Fixes #80622.
6075
6076         * iltests.il: Add new regresssion test. 
6077
6078 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
6079
6080         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
6081         debug-debugger.c, debug-debugger.h: warning fixes.
6082         * driver.c: updated copyright year and made it fit in one line.
6083
6084 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
6085
6086         * aot-runtime.c: updated to use mono-dl instead of gmodule.
6087
6088 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
6089
6090         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
6091
6092         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
6093
6094         * iltests.il: Add new test for bug #80507.
6095
6096 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6097
6098         * mini-arm.h: use soft-float also on vfp for now.
6099
6100 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
6101
6102         * mini.c: fix some more soft-float issues.
6103
6104 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
6105
6106         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
6107
6108 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
6109         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
6110         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
6111         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
6112
6113 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
6114
6115         * mini-arm.c: typo fix.
6116
6117 2007-01-23  Neale Ferguson <neale@sinenomine.net>
6118
6119         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
6120
6121 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
6122
6123         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
6124         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
6125
6126         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
6127
6128         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
6129
6130         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
6131         
6132         * inssel.brg: Fix a warning.
6133
6134         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
6135
6136         * abcremoval.c ssa.c ssapre.c: Update after this change.
6137         
6138         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
6139
6140         * dominators.c (df_set): Use mono_bitset_union_fast.    
6141
6142 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
6143
6144         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
6145         mini-codegen.c: reduce relocations and memory usage for the cpu
6146         description.
6147
6148 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
6149
6150         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
6151
6152         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
6153         to reduce their size.
6154
6155 2007-01-19 Mark Mason <mason@broadcom.com>
6156
6157         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
6158         * mini-mips.c: more configuration macros, support long conditional branches, additional
6159         asserts, fix epilog instrumentation.
6160         * mini-mips.h: use standard stack walk
6161         * cpu-mips.md: increase size of div, rem and conditional branches
6162         
6163 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
6164
6165         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
6166         to cpu spec data.
6167
6168 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
6169
6170         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
6171         (compile_method): Ditto.
6172
6173         * aot-runtime.c (decode_klass_info): Ditto.
6174
6175         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
6176         needed by the code generated by inssel.brg. Also fix a warning.
6177
6178 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
6179
6180         * mini.c: deal with enums that become genericinsts by
6181         being nested in a generic class (bug #79956).
6182
6183 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
6184
6185         * mini.c: match the generic definition to check for
6186         private access with generic types (bug #78431).
6187
6188 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
6189
6190         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
6191         to make life easier for people cross-compiling that insist on not
6192         using scratchbox.
6193
6194 2007-01-17 Mark Mason <mason@broadcom.com>
6195
6196         * inssel-long.brg: patch to deal with mips missing flags
6197         * inssel-long32-mips.brg: implement overflow checks
6198         * insset-mips.brg: implement overflow checks
6199         * mini-mips.h: implement conditional exception handling
6200         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
6201           Remove unused code, minor cleanups.
6202         * exceptions-mips.c: minor cleanups
6203         * mini-ops.h: add mips conditional exception ops
6204         * cpu-mips.md: add mips conditional exception ops
6205
6206         
6207 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
6208
6209         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
6210         to deal with mips missing of flags.
6211
6212 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
6213
6214         * exceptions-ppc.c: execute fault handlers.
6215
6216 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
6217
6218         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
6219
6220 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
6221
6222         * mini.c: handle also floating point values in initialize_array.
6223
6224 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
6225
6226         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
6227         array initialization and make it conditional on the intrins option.
6228
6229 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
6230
6231         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
6232         relocations and put the patch info names close to the enum definition.
6233
6234 2007-01-15 Mark Mason <mason@broadcom.com>
6235
6236         * basic.cs, exceptions.cs: break up large tests to increase debugability.
6237
6238 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
6239
6240         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
6241
6242 2007-01-12  Raja R Harinath  <rharinath@novell.com>
6243
6244         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
6245
6246 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
6247
6248         * Makefile.am: distribute the mips sources.
6249
6250 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
6251
6252         * mini-codegen.h: handle bug #80489 here, by excluding ecx
6253         directly.
6254
6255 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
6256
6257         * cpu-x86.md: back out for now as this triggers other regressions.
6258
6259 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
6260
6261         * cpu-x86.md: force src1 and dest regpair for long shift instructions
6262         to eax:edx, so ecx can't get allocated to them (bug #80489).
6263
6264 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
6265
6266         * mini.c, mini-exceptions.c: enabled running fault handlers
6267         (bug #80469).
6268
6269 2007-01-03  Miguel de Icaza  <miguel@novell.com>
6270
6271         * driver.c: If nothing fail, do not use the string "failed",
6272         because it makes it very annoying to view test result logs on the
6273         web. 
6274
6275 2006-12-30  Miguel de Icaza  <miguel@novell.com>
6276
6277         * debug-debugger.c (mono_debugger_main): Rename "main" to
6278         "main_method" to prevent a warning.
6279
6280         Remove a warning for unused field.
6281
6282 2006-12-28  Martin Baulig  <martin@ximian.com>
6283
6284         * debug-debugger.c
6285         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
6286
6287 2006-12-22  Martin Baulig  <martin@ximian.com>
6288
6289         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
6290         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
6291         seperate `.mdb_debug_info' section, so we can access it from the
6292         debugger even if the binary is stripped.
6293
6294         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
6295         from the `.mdb_debug_info' here to prevent the linker from
6296         removing that section.
6297
6298         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
6299         mdb-debug-info64.s.
6300
6301 2006-12-19  Robert Jordan  <robertj@gmx.net>
6302
6303         * mini-x86: enable the code to return small structures in
6304         registers for FreeBSD as well. Fixes bug #80278.
6305         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
6306
6307 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6308
6309         * mini-x86.c: align the stack when calling the profiler
6310         function instrumenting the prolog (on OSX).
6311
6312 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
6313
6314         * mini.c: emit a break opcode where Debugger.Break () is called.
6315
6316 2006-12-13  Miguel de Icaza  <miguel@novell.com>
6317
6318         * mini.c (mono_method_to_ir): Provide useful information on this
6319         assert, to prevent others from debugging like I did.
6320
6321 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
6322
6323         * mini.c: enable code which was incorrectly commented
6324         (bug #80235).
6325
6326 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
6327
6328         * mini-x86.c: enable on OSX, too, the code to return small
6329         structures in registers.
6330
6331 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
6332
6333         * mini-x86.c: remove the use of the dynamic code manager here, too.
6334
6335 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
6336
6337         * mini.h, debug-debugger.c, tramp-*.c: fixed 
6338         mono_debugger_create_notification_function() to use
6339         mono_global_codeman_reserve () instead of a dynamic code manager.
6340
6341 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
6342
6343         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
6344         ves_array_element_address() jit icall and use a generated
6345         managed method instead (which is about 4 times faster for a rank 3
6346         array access).
6347
6348 2006-11-29  Mark Mason  <mason@broadcom.com>
6349
6350         * basic-calls.cs: additional tests for passing
6351         structures as function arguments.
6352
6353 2006-11-29  Mark Mason  <mason@broadcom.com>
6354
6355         * mini-mips.h: disable custom exception handling
6356         * mini-mips.c: throw/rethrow should use jalr to call
6357         exception stubs.  Fixed bug with passing structures
6358         by value. More support for tracing floating point
6359         functions.
6360
6361 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6362
6363         * mini.c: fixed typo in the soft-float ldind.r4 handling
6364         (bug #80086).
6365
6366 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
6367
6368         * mini.c, mini.h, driver.c: added --runtime command line
6369         option to select a different runtime than the autodetected one.
6370         * jit.h: added API for embedders to initialize with a specific
6371         runtime version.
6372
6373 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
6374
6375         * mini.c: handle also boxing of r4 values (bug #80024).
6376
6377 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
6378
6379         * mini-ppc.c: force indirect calls until we reserve
6380         enough address space for all the generated code.
6381
6382 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
6383
6384         * exceptions-arm.c: workaround bugs in the libc definition
6385         of struct ucontext.
6386
6387 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
6388
6389         * inssel.brg: fixes from me and Mark Mason.
6390
6391 2006-11-23  Dick Porter  <dick@ximian.com>
6392
6393         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
6394         semaphore display now we've fixed the initial value
6395
6396 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6397
6398         * inssel.brg: partially revert the last change to fix the build.
6399
6400 2006-11-21  Mark Mason  <mason@broadcom.com>
6401
6402         * inssel.brg: Add and use compare-and-branch macros to support
6403         architectures that do not have condition code registers (ie. MIPS).
6404         * *-mips.{c,brg,md}: Fix copyright statements
6405
6406 2006-11-20  Mark Mason  <mason@broadcom.com>
6407
6408         * Makefile.am: remove mini-codegen.c from list of MIPS sources
6409         * mini.c: Allow GET_CONTEXT to be specified by the arch port
6410         * mini.h: Added declaration for mono_print_ins()
6411         * mini-codegen.c: added ins_spec initializer for MIPS
6412         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
6413         vreg to be virtual and hreg to be non-virtual.
6414         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
6415         is not yet working/implemented correctly.
6416         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
6417         non-static, fixup calls to print_ins() from other parts in the file.
6418
6419 2006-11-20  Mark Mason  <mason@broadcom.com>
6420
6421         * basic-calls.cs: added tests for passing structures as arguments
6422         to calls.
6423
6424 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
6425
6426         * inssel-long32.brg: optimize signed division by power of two.
6427
6428 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
6429
6430         * mini-arm.c: added support for interworking with thumb code
6431         (mono must be still be built using the ARM instruction encoding).
6432
6433 2006-11-19  Miguel de Icaza  <miguel@novell.com>
6434
6435         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
6436         verifier has different rules for it.   Fixes a few verifier issues
6437         in the test suite.
6438
6439         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
6440         at the end, so people know what happened.
6441
6442 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
6443
6444         * brach-opts.c: in optimize_exception_target() make sure we
6445         are in a catch clause (fixes bug #79871).
6446
6447 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6448
6449         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
6450         more soft-float support fixes.
6451
6452 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
6453
6454         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
6455         that are passed half on the stack and half in registers.
6456
6457 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
6458
6459         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
6460         more mips integration work from Mark E Mason 
6461         <mark.e.mason@broadcom.com>.
6462
6463 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
6464
6465         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
6466         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
6467         tramp-mips.c: added sources for the mips port, not
6468         integrated in the build yet. Contributed by
6469         Mark E Mason <mark.e.mason@broadcom.com>.
6470
6471 2006-11-14  Neale Ferguson <neale@sinenomine.net>
6472
6473         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
6474
6475 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6476
6477         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
6478         put the soft-float rules in its own file since it seems to
6479         break s390 compilation.
6480
6481 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
6482
6483         * mini-arm.c: fixed wrnings.
6484
6485 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
6486
6487         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
6488         inssel-arm.brg: ARM support for soft-float.
6489
6490 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
6491
6492         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
6493         loads and stores of 32 bit fp values.
6494
6495 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
6496
6497         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
6498
6499         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
6500         works. Fixes #79852 and #79463.
6501
6502 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6503
6504         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
6505         more soft-float support WIP and fixes.
6506
6507 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
6508
6509         * mini-arm.c: some VFP updates.
6510
6511 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
6512
6513         * mini-exceptions.c: 0 is a valid local var offset in some
6514         architectures, don't assert (bug #78508).
6515
6516 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
6517
6518         * exceptions-arm.c: fixed off by one error in stack walk code.
6519
6520 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
6521
6522         * mini.h, mini.c: more precise tracking of type load exceptions.
6523
6524 2006-11-03  Robert Jordan  <robertj@gmx.net>
6525
6526         * Makefile.am: [WIN32] Add monow.exe target.
6527         * driver.c: [WIN32] Don't detach the console when debugging.
6528         Fixes bug #79797.
6529         
6530 2006-10-30  Miguel de Icaza  <miguel@novell.com>
6531
6532         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
6533
6534 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
6535
6536         * aot-compiler.c (emit_method_info): Add a case missed earlier.
6537
6538         * driver.c (mini_regression): Fix --regression with AOT.
6539
6540         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
6541
6542 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
6543
6544         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
6545
6546         * mini-sparc.h: Don't use sigaction on sparc/linux.
6547
6548         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
6549
6550         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
6551
6552         * mini-exceptions.c: Add proper include files for getpid ().
6553
6554 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
6555
6556         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
6557         address instead of a MonoJitInfo* to avoid decoding the exception info for the
6558         method.
6559
6560         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
6561         name cache to reduce its size.
6562
6563         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
6564
6565 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
6566
6567         * mini-x86.c: Save/restore the current LMF structure more efficiently using
6568         the mono_lmf TLS variable.
6569
6570         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
6571         trampoline lmf frames.  
6572
6573         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
6574
6575 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
6576
6577         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
6578         the mono_lmf TLS variable.
6579
6580         * mini-exceptions.c: Access the LMF structure through accessors.
6581
6582         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
6583         variable instead of in jit_tls->lmf.
6584
6585         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
6586         
6587         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
6588         trampoline lmf frames.
6589
6590         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
6591
6592 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
6593
6594        * mini.c trace.c mini-x86.c: Revert these too.
6595         
6596        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
6597        signature change.
6598
6599 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
6600
6601         * genmdesc.c: removed now dead code.
6602
6603 2006-10-09  Robert Jordan <robertj@gmx.net>
6604
6605         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
6606
6607 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
6608
6609         * mini.h: do not leave gaps in the opcode values.
6610
6611 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
6612
6613         * jit-icalls.h: flag functions as internal here, too.
6614
6615 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
6616
6617         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
6618         functions with the internal attribute.
6619
6620 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
6621
6622         * aot-compiler.c: fclose the file descriptor in the profile read loop.
6623
6624 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
6625
6626         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
6627         for soft-float.
6628
6629 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
6630
6631         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
6632         tail calls as on other platforms.
6633
6634         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
6635
6636         * iltests.il: Add a few tailcall tests.
6637
6638 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
6639
6640         * driver.c: fix loop for old compilers (bug #79521).
6641
6642 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
6643
6644         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
6645
6646         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
6647
6648         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
6649         metadata without any code.
6650
6651         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
6652         more precise debugging information using gdb.
6653
6654 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
6655
6656         * inssel-ia64.brg: Make the helper methods static.
6657
6658 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
6659
6660         * inssel-x86.brg: make the helper methods static.
6661
6662 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
6663
6664         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
6665
6666 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
6667
6668         * mini.c: updates for monoburg changes.
6669         * inssel.brg: make a few helper functions static as they should.
6670
6671 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
6672
6673         * Makefile.am: Move mini-codegen.c to common_sources.
6674
6675 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
6676
6677         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
6678         instructions.
6679         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
6680         mini-ppc.h: port to use the common local register allocator.
6681
6682 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
6683
6684         * mini.h: Remove the comment too then.
6685
6686 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
6687
6688         * mini.h: put back backend.data which is to be used shortly and
6689         doesn't increase the size of MonoInst. If any 64 bit arch aligned
6690         pointers on 4 byte boundaries it'd have much bigger issues running
6691         and you can ifdef it out anyway.
6692
6693 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
6694
6695         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
6696         MonoInst size by 4 bytes on 64 bit machines.
6697
6698 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
6699
6700         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
6701         replacement with more meaningful field names. Arch maintainers, please
6702         check the assigned names are good enough for your arch.
6703
6704 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
6705
6706         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
6707         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
6708
6709 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
6710
6711         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
6712         relocations and memory requirements, put the optimization flags
6713         definitions in their own file.
6714
6715 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
6716
6717         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
6718
6719         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
6720
6721 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
6722
6723         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
6724
6725 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
6726
6727         * inssel.brg: use the correct function to get the size of an item
6728         in an array, given an element class.
6729         * aot-compiler.c: do not access class->class_size directly.
6730
6731 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
6732
6733         * mini.h, debug-mini.c: added a debugging function to print
6734         info about local variables and arguments in a jitted method.
6735
6736 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
6737
6738         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
6739
6740         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
6741
6742 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
6743
6744         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
6745         inner and outer loops when passing vtypes.
6746
6747 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
6748
6749         * mini-ppc.c: take into account the cpu errata for cache flushing
6750         which caused some random errors (bug #79381).
6751
6752 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
6753
6754         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
6755         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
6756
6757 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
6758
6759         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
6760         loaded.
6761
6762         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
6763         freebsd ports tree.
6764
6765         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
6766         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
6767
6768         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
6769         displacement.
6770
6771 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
6772
6773         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
6774
6775 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
6776
6777         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
6778         macro does not have to be changed during debugging.
6779
6780         * 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>.
6781
6782         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
6783
6784         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
6785         
6786         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
6787         MONO_ARCH_NO_EMULATE_MUL is defined.
6788
6789         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
6790
6791         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
6792
6793         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
6794
6795         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
6796         
6797 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
6798
6799         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
6800         stuff to mini-exceptions.c where it is used.
6801
6802         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
6803         setup code, the real one is in mini-exceptions.c.
6804
6805         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
6806         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
6807         some changes from the freebsd ports tree.
6808
6809         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
6810         constants.
6811         
6812         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
6813
6814 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
6815
6816         * mini.c: on Linux, check for /proc to be mounted
6817         (bug# 79351, novell bug#201204).
6818
6819 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
6820
6821         * mini.c: handle cases where pthread_attr_getstack() behaves
6822         incorrectly (bug #78096).
6823
6824 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
6825
6826         * mini-arm.c: support larger stack frames (bug #79272).
6827
6828 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
6829
6830         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
6831
6832         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
6833         tokens.
6834
6835         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
6836         mono_class_from_name () to find a class from its name.
6837
6838         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
6839
6840 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
6841
6842         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
6843
6844 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
6845
6846         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
6847
6848 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
6849
6850         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
6851         callinfo->trampoline.
6852
6853         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
6854         fixes #79271.
6855         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
6856         future.
6857
6858 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
6859
6860         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
6861
6862 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
6863
6864         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
6865         stats.method_trampolines, it is already done by the generic trampoline code.
6866
6867         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
6868         
6869 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
6870
6871         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
6872
6873         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
6874
6875         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
6876
6877         * mini.c (print_jit_stats): Print mscorlib mempool size too.
6878         
6879         * mini.c (print_jit_stats): Print new stats.
6880
6881         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
6882
6883 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
6884
6885         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
6886         Address on two dimensional arrays. Fixes #78729.
6887
6888         * mini.h (MonoCompile): Add a 'skip_visibility' field.
6889
6890         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
6891         a method.
6892
6893         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
6894
6895         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
6896         #79130.
6897         
6898         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
6899         a race condition.
6900         (mini_get_ldelema_ins): Ditto.
6901
6902 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
6903
6904         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
6905         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
6906         Fixes #79213.
6907
6908 2006-08-29 Neale Ferguson <neale@sinenomine.net>
6909
6910         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
6911         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
6912
6913         * exceptions-s390x.c: Cosmetic change.
6914
6915         * tramp-s390.c: Fix warning.
6916
6917         * cpu-s390.md: Correct length of mul_imm.
6918
6919 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
6920
6921         * aot-compiler.c: added binary writer with ELF backend
6922         implementation (only on Linux/x86 for now).
6923
6924 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
6925
6926         * Makefile.am: Don't run net 2.0 AOT tests.
6927
6928         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
6929         (mono_compile_assembly): Skip net 2.0 assemblies as well.
6930
6931         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
6932
6933 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
6934
6935         * aot-compiler.c: simplified and refactored the asm-writing code
6936         to allow different backends.
6937
6938 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
6939
6940         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
6941
6942         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
6943         little. Share patches of type TYPE_FROM_HANDLE as well.
6944
6945         * mini.c (mono_patch_info_equal): New helper function.
6946         (mono_patch_info_hash): Ditto.
6947
6948         * aot-compiler.c (emit_method_code): Fix s390 build.
6949
6950         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
6951         is not handled because it is stored as a flag and not as a type ctor. Fixes
6952         #79016.
6953
6954 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
6955
6956         * aot-compiler.c: Fix computation of GOT slot statistics.
6957         
6958         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
6959         Also remove support for not PIC AOT.
6960
6961         * mini.h: Bump AOT file format version.
6962
6963         * objects.cs: Add a test for #78990.
6964
6965         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
6966         (peter.dettman@iinet.net.au). Fixes #79087.
6967
6968         * basic-long.cs: Add a test for the above.
6969
6970 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
6971
6972         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
6973         
6974         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
6975         code somewhat.
6976
6977 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
6978
6979         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
6980         exceptions.
6981
6982 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
6983
6984         * mini.c: Don't verify COM proxy invoke calls
6985         
6986
6987 2006-08-10  Dick Porter  <dick@ximian.com>
6988
6989         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
6990         which process is holding semaphores locked.
6991
6992 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
6993
6994         * mini-ia64.c mini-amd64.c: Fix #79027.
6995
6996         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
6997
6998         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
6999
7000         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
7001         implicit arguments in a vararg call. Fixes #79027.
7002
7003 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
7004
7005         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
7006         (mono_get_array_new_va_signature): Ditto.
7007
7008 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
7009
7010         * aot-runtime.c: Call init_plt lazily.
7011
7012         * inssel-long.brg: Fix unsigned long->int conversion.
7013
7014         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
7015
7016         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
7017         that most data is now in the .rss/.data section.
7018
7019 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
7020
7021         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
7022
7023         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
7024
7025         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
7026
7027         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
7028
7029         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
7030         virtual call. Fixes #79010.
7031
7032         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
7033         and use the result as the this argument in the real call.
7034
7035         * generics.2.cs: Add a new test for #79010.
7036         
7037 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
7038
7039         * mini-x86.c: Fix a warning.
7040
7041         * aot-compiler.c: Add a bunch of statistics.
7042
7043         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
7044
7045 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
7046
7047         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
7048
7049 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
7050
7051         * 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>.
7052
7053 2006-07-13  Miguel de Icaza  <miguel@novell.com>
7054
7055         * mini.c (mono_method_to_ir): Obtain the original method in the
7056         CIL stream and use this to perform validation.
7057
7058         Fixed: #78816
7059
7060 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
7061
7062         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
7063         (mono_arch_call_opcode): Ditto.
7064
7065         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
7066         #78826.
7067
7068         * mini.c (mono_patch_info_dup_mp): New helper function.
7069         
7070         * aot-compiler.c (compile_method): Fix some of the memory allocated during
7071         compilation. Fixes #78827.
7072
7073 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
7074
7075         * declsec.c: Use original security informations for
7076           MONO_WRAPPER_MANAGED_TO_MANAGED.
7077
7078 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
7079
7080         * mini.c: Allow Com Interop methods/classes and
7081         don't verify COM wrapper calls
7082         
7083
7084 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
7085
7086         * inssel-long32.brg: Fix long->i4 checked conversion.
7087
7088         * exceptions.cs: Add a test for the above.
7089
7090 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
7091
7092         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
7093
7094         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
7095         leaks.
7096
7097         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
7098         #78775.
7099
7100 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
7101
7102         * mini.c: Fix solaris/x86 exception handling.
7103
7104         * Makefile.am: Get rid of $(ICU_LIBS).
7105
7106 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
7107
7108         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
7109         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
7110         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
7111
7112         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
7113
7114         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
7115         this function causes a SIGSEGV.
7116
7117 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
7118
7119         * mini.c: Remove unused solaris/x86 includes.
7120
7121 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
7122
7123         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
7124
7125 2006-06-20  Jb Evain  <jbevain@gmail.com>
7126
7127         * cpu-g4.md: fix max length of start_handler instruction.
7128
7129 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
7130         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
7131
7132 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
7133         * ssa.c: Fixed bug 78653 for SSA based deadce.
7134         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
7135         MonoInst.flags, used in SSA based deadce.
7136         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
7137         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
7138
7139 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
7140
7141         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
7142         it can end up using non executable memory on ppc64 systems
7143         running ppc32 userspace (fix from Johannes Berg).
7144
7145 2006-06-14  Dick Porter  <dick@ximian.com>
7146
7147         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
7148         4.1.1
7149
7150 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
7151         * mini.c: Made so that inline is locally disabled if it would
7152         trigger a .cctor, because too many apps depend on this behavior
7153         (which seems to be also the one of the MS CLR).
7154
7155 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
7156
7157         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
7158         No idea why this worked before.
7159
7160         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
7161         which branch to outer exception clauses since they could skip the
7162         inner finally clauses. Fixes #78633.
7163
7164         * exceptions.cs: Add a test for the above.
7165
7166         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
7167         Fixes #78629.
7168
7169         * iltests.il: Add a test for the above.
7170
7171 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
7172
7173         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
7174         after the end of a try bblock, to prevent asserts in mini_method_compile ().
7175
7176         * iltests.il: Add a test for the above.
7177
7178 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
7179
7180         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
7181         
7182         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
7183         methods as instrinsics.
7184
7185 2006-06-09  Wade Berrier <wberrier@novell.com>
7186
7187         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
7188         (simple-cee-ops.h ssapre-mini-ops.h)
7189
7190 2006-06-09  Neale Ferguson <neale@sinenomine.net>
7191
7192         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
7193         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
7194         instruction).
7195         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
7196         * cpu-s390x.md: Fix max. length values for a couple of instructions.
7197
7198 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
7199
7200         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
7201
7202 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
7203
7204         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
7205         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
7206         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
7207         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
7208         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
7209         of opcodes, so that bug 78549 should not happen again.
7210         * ssapre.c: Updated to use the renamed files.
7211
7212 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
7213
7214         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
7215         in OP_ATOMIC_EXCHANGE_I4.
7216
7217 2006-06-07  Wade Berrier <wberrier@novell.com>
7218
7219         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
7220         in mono_debugger_create_notification_function)
7221
7222 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
7223
7224         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
7225         
7226         * mini.c (type_from_stack_type): Disable some changes which do not
7227         seem to work.
7228
7229         * driver.c: Reenable opts.
7230
7231         * mini.h (MonoStackSlot): New structure to keep track of the verification state
7232         of the evaluation stack.
7233         
7234         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
7235         evaluation stack trace at entry to the bblock.
7236
7237         * mini.c (merge_stacks): New function to perform verification of stack merges.
7238         Turned off by default.
7239
7240         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
7241         STACK_MP.
7242         
7243 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
7244
7245         * local-propagation.c: Fixed bug 78549.
7246
7247 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
7248
7249         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
7250
7251 2006-06-02  Miguel de Icaza  <miguel@novell.com>
7252
7253         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
7254         tramp-arm.c, tramp-ia64.c
7255         (mono_debugger_create_notification_function): Update signature to
7256         new signature and use new protocol for creating the notification
7257         function.  
7258
7259         Should fix the build.
7260
7261 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
7262
7263         * exceptions-ppc.c (mono_jit_walk_stack)
7264         (ves_icall_get_frame_info): Fix the build
7265
7266 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
7267
7268         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
7269
7270 2006-05-31  Raja R Harinath  <rharinath@novell.com>
7271
7272         * il2tests.2.il: New file for generics CIL tests.  Add test for
7273         #78019.
7274         * Makefile.am: Update.
7275
7276         Fix #78019
7277         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
7278         to nullable types.
7279
7280 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
7281
7282         * aliasing.c: Fixed bug 78311.
7283
7284 2006-05-29  Martin Baulig  <martin@ximian.com>
7285
7286         * mini-exceptions.c (mono_find_jit_info): When computing the
7287         native offset, check whether we're actually inside the method's
7288         code; call mono_debug_print_stack_frame() to format the frame.
7289         (ves_icall_System_Exception_get_trace): Call
7290         mono_debug_print_stack_frame() to format the stack frame.
7291         (ves_icall_get_trace): Update to the new debugging API.
7292         (mono_jit_walk_stack_from_ctx): Likewise.
7293         (ves_icall_get_frame_info): Likewise.
7294
7295         * mini.c (get_method_from_ip): Use the new debugging API.
7296         (mono_print_method_from_ip): Likewise.
7297
7298         * exceptions-ppc.c
7299         (mono_jit_walk_stack): Use the new debugging API.
7300         (ves_icall_get_frame_info): Likewise.   
7301
7302 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
7303
7304         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
7305
7306 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
7307
7308         * mini.c: Added "limitator" to inline for debugging.
7309
7310 2006-05-24  Martin Baulig  <martin@ximian.com>
7311
7312         * debug-debugger.c (mono_debugger_init): Create a private,
7313         malloc()-based code manager for the notification function and
7314         intentionally leak it on exit.  This fixes the crash-on-exit race
7315         condition.
7316
7317         * tramp-amd64.c
7318         (mono_debugger_create_notification_function): Added
7319         `MonoCodeManager *' argument.
7320
7321         * tramp-x86.c
7322         (mono_debugger_create_notification_function): Added
7323         `MonoCodeManager *' argument.
7324
7325 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
7326
7327         * aliasing.c: Fixed 64 bit issue.
7328         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
7329         default since all known bugs are fixed (one more time!).
7330
7331 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
7332
7333         * mini.c: write barrier support.
7334
7335 2006-05-23  Martin Baulig  <martin@ximian.com>
7336
7337         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
7338         check at the top of the file.
7339
7340 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
7341
7342         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
7343         reverting changes without reason and without changelog entries.
7344
7345 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
7346
7347         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
7348         to a few opcodes. Fixes #78439.
7349
7350         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
7351         consistency with other archs.
7352
7353         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
7354
7355 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
7356
7357         * debug-debugger.c: fix the build.
7358
7359 2006-05-17  Martin Baulig  <martin@ximian.com>
7360
7361         * debug-debugger.c
7362         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
7363         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
7364         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
7365         (debugger_attach): Call GC_mono_debugger_add_all_threads().
7366
7367 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
7368
7369         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
7370
7371 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
7372
7373         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
7374         MONO_TYPE_GENERICINST.
7375         
7376         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
7377         MONO_TYPE_GENERICINST.
7378
7379 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
7380
7381         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
7382         #78325.
7383
7384 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
7385
7386         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
7387         mempool.
7388         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
7389
7390 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
7391
7392         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
7393         mono_trace_cleanup ().
7394
7395         * iltests.il: Fix problem with the newly added test.
7396
7397         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
7398         due to register constraints, free up the previous hreg. Fixes #78314.
7399
7400         * iltests.il: Add new test for #78314.  
7401
7402         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
7403         Interlocked.Add. Fixes #78312.
7404
7405         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
7406         
7407 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
7408
7409         * inssel.brg (mini_emit_virtual_call): Fix a warning.
7410
7411 2006-05-05  Martin Baulig  <martin@ximian.com>
7412
7413         * debug-mini.c (mono_debug_open_block): New method.
7414
7415         * mini-amd64.c
7416         (mono_arch_output_basic_block): Call mono_debug_open_block() at
7417         the beginning of each basic block.
7418
7419         * mini-x86.c
7420         (mono_arch_output_basic_block): Call mono_debug_open_block() at
7421         the beginning of each basic block.
7422
7423 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
7424
7425         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
7426         default until I understand why they break the build on amd64.
7427
7428 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
7429
7430         * mini.c (mini_cleanup): Call mono_cleanup ().
7431
7432         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
7433         errors.
7434
7435 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
7436
7437         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
7438         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
7439         default since all known bugs are fixed, and I cannot reproduce bug
7440         77944... I'm asking Matt Hargett to test again after this commit.
7441
7442 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
7443
7444         * mini-codegen.c: Fixed typo that thrashed inline.
7445
7446 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
7447
7448         * dominators.c (compute_dominators): Avoid using a worklist since
7449         it is not correct in some cases. Instead, iterate over all bblocks as
7450         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
7451
7452 2006-04-28  Miguel de Icaza  <miguel@novell.com>
7453
7454         * mini.c (mono_jit_compile_method_inner): Use
7455         mono_prepare_exception_from_error that resets the value
7456         internally.
7457
7458 2006-04-27  Miguel de Icaza  <miguel@novell.com>
7459
7460         * mini.c: Move the mini_loader_error_to_exception to metadata. 
7461         
7462 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
7463
7464         * aliasing.c: Fixed bug 78210.
7465
7466 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
7467
7468         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
7469         default until all their problems (or the ones they trigger) are fixed.
7470
7471 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
7472
7473         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
7474         
7475         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
7476         as loaded only after resolving patches since that could invoke the same method.
7477
7478         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
7479
7480         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
7481         functions.
7482
7483         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
7484         AOT loader.
7485
7486         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
7487         stack.
7488
7489         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
7490         made from AOT code through the PLT table.
7491
7492         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
7493         holding the plt offset when a call is made to the aot plt trampoline.
7494         
7495 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
7496
7497         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
7498         amd64 AOT support.
7499
7500         * Makefile.am (common_sources): Fix build breakage.
7501
7502         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
7503         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
7504         intra-assembly calls if possible.
7505         
7506         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
7507
7508         * mini-trampolines.c: Handle PLT entries.
7509
7510         * mini.c: Avoid creating a GOT var for calls.
7511
7512         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
7513         from mscorlib code.
7514
7515         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
7516         from mscorlib code.
7517
7518         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
7519         AOT code.       
7520
7521         * mini.h: Bump AOT file format version.
7522         
7523         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
7524         covers more cases.
7525
7526 2006-04-25  Martin Baulig  <martin@ximian.com>
7527
7528         * driver.c: Disable copyprop, consprop and inline when running
7529         inside the debugger.
7530
7531 2006-04-25  Martin Baulig  <martin@ximian.com>
7532
7533         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
7534         with `get_current_thread' and added `detach'.
7535         (MonoDebuggerMetadataInfo): Added `thread_size',
7536         `thread_tid_offset', `thread_stack_ptr_offset' and
7537         `thread_end_stack_offset'.
7538
7539 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
7540
7541         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
7542         aot-runtime.c.
7543
7544         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
7545         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
7546
7547         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
7548
7549         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
7550
7551         * aot.c: Add support for ADJUSTED_IID.  
7552
7553 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
7554
7555         * aot.c (emit_method_order): Don't align method_order_end.
7556
7557         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
7558         the interface ID changes.
7559
7560 2006-04-21  Dick Porter  <dick@ximian.com>
7561
7562         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
7563         cleaning up a thread.  Fixes the new part of bug 77470.
7564
7565 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
7566
7567         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
7568         to managed wrapper.
7569                      
7570 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
7571
7572         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
7573         
7574         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
7575         SIGSEGV. Fixes #78072.
7576
7577         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
7578         unregister our SIGABRT handler.
7579
7580 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
7581
7582         * mini.c: Disabled inline where it can alter the call stack in a
7583         way visible from managed code.
7584         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
7585         default.
7586
7587 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
7588
7589         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
7590         on other platforms. Fixes #78089.
7591
7592 2006-04-13  Martin Baulig  <martin@ximian.com>
7593
7594         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
7595         determine whether we're inside the debugger.
7596
7597         * debug-debugger.h
7598         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
7599
7600 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
7601
7602         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
7603         handler clauses. Fixes #78024.
7604
7605         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
7606         in the CALL_MEMBASE opcodes. Fixes #78088.
7607         (mono_arch_get_vcall_slot_addr): Ditto.
7608
7609 2006-04-10  Martin Baulig  <martin@ximian.com>
7610
7611         * debug-debugger.c: The thread handling code has now been moved
7612         into ../metadata/threads.c.
7613
7614 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
7615
7616         * driver.c (mono_main): Fix --with-gc=none build.
7617
7618         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
7619         (mono_spillvar_offset_float): Ditto.
7620         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
7621         hreg, not when its !global, since on ia64, there is a third category: stacked
7622         registers.      
7623
7624 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
7625
7626         * mini.c: set MonoInst->klass for load field address and a few other
7627         places.
7628
7629 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
7630
7631         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
7632
7633 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
7634
7635         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
7636         the branch opt changes.
7637
7638 2006-04-06  Dick Porter  <dick@ximian.com>
7639
7640         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
7641         
7642         * wapihandles.c (mini_wapi_seminfo): 
7643         * driver.c (mono_main): Add semaphore info option
7644
7645 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
7646
7647         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
7648         branch optimization changes. Fixes #78009.
7649
7650 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
7651
7652         * mini.c: ignore accessibility of methods in managed->native wrappers.
7653
7654 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
7655
7656         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
7657         
7658         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
7659
7660 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
7661
7662         * mini.c: Modify the branch optimizations to preserve the invariant that
7663         the entries inside the in_bb and out_bb arrays are unique.
7664         (mono_unlink_bblock): Avoid creation of new arrays.
7665
7666 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
7667
7668         * mini.c (mono_unlink_bblock): Fix regression caused by previous
7669         change (#77992).
7670
7671 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
7672
7673         * mini.c (optimize_branches): Remove the "optimizations" in
7674         the cbranch1/cbranch2 -> branch cases which were causing several
7675         problems in the past. Fixes #77986.
7676
7677 2006-03-31  Chris Toshok  <toshok@ximian.com>
7678
7679         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
7680         default optimizations :(
7681
7682 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
7683
7684         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
7685         branch.
7686
7687 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
7688
7689         * local-propagation.c: Added comments to structs and removed
7690         "Mono" prefixes from local tree mover types.
7691
7692 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
7693
7694         * Makefile.am (arch_sources): Define this for each architecture so 
7695         libmono_la_SOURCES is defined in one place.
7696
7697 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
7698
7699         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
7700         from handles/.
7701
7702 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
7703
7704         * driver.c: print the GC name supplied by configure.
7705
7706 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
7707
7708         * local-propagation.c: Added tree mover, and moved here all the
7709         local propagation code from mini.c
7710         * mini.c: Added support for treeprop, and moved all the local
7711         propagation code to local-propagation.c
7712         * mini.h: Added support for treeprop
7713         * driver.c: Added support for treeprop, enabled consprop, copyprop,
7714         treeprop, inline and deadce by default
7715         * Makefile.am: Added local-propagation.c
7716
7717 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
7718
7719         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
7720
7721 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
7722
7723         * debug-debugger.c: make it compile without the Boehm GC.
7724
7725 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
7726
7727         * mini.c: fixed issue with mismatch when an icall is registered
7728         with multiple names but same address.
7729
7730 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
7731
7732         * declsec.c, mini-exceptions.c: use write barrier to set reference
7733         fields of managed objects.
7734
7735 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
7736
7737         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
7738         (can_access_internals): Fix a warning.
7739
7740         * mini.c (print_method_from_ip): Rename this to 
7741         mono_print_method_from_ip so it gets exported.
7742
7743         * trace.c: Deal with strings inside StringBuilder's containing garbage
7744         and fix memory leaks. Fixes #77848.
7745
7746 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
7747
7748         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
7749         fixes #77787.
7750
7751 2006-03-16 Neale Ferguson <neale@sinenomine.net>
7752         
7753         * mini-s390.c: Remove OP_X86_TEST_NULL.
7754
7755 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
7756
7757         * mini.c: use the correct GetHashCode() for the moving collector.
7758
7759 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
7760
7761         * liveness.c: Regalloc spill cost tuning.
7762
7763 2006-03-15 Neale Ferguson <neale@sinenomine.net>
7764         
7765         * mini-s390x.h: Correct S390_LONG macro.
7766
7767         * mini-s390x.c: Cleanup unused code.
7768
7769 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
7770
7771         * jit-icalls.h: New file.
7772
7773         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
7774         icalls and include that instead of including jit-icalls.c.
7775
7776         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
7777         OP_X86 opcodes.
7778
7779 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
7780
7781         * mini.c: when checking for member accessibility, also check for
7782         friend assemblies and for explicit interface implementations.
7783
7784 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
7785
7786         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
7787
7788         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
7789
7790         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
7791         common cases are done first.    
7792
7793         * mini-ops.h: Only define platform specific opcodes on the given platform.
7794
7795         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
7796         branch.
7797         
7798 2006-03-14  Martin Baulig  <martin@ximian.com>
7799
7800         Revert Paolo's change from r57348:
7801
7802         * mini.h: don't use gboolean for bitfields.
7803         * mini.c: verifier changes for fields and methods accessibility.
7804
7805 2006-03-13  Neale Ferguson <neale@sinenomine.net>
7806
7807         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
7808
7809         * mini-s390x.c: Fix conv_r_un.
7810
7811         * cpu-s390, cpu-s390x.md: Fix lengths.
7812
7813 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
7814
7815         * mini.c: nested types have access to all the nesting
7816         levels, not just the enclosing types.
7817
7818 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
7819
7820         * mini.c: added a few more verification checks.
7821
7822 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
7823
7824         * liveness.c: Merge optimizations from the linear-il branch.
7825
7826 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
7827
7828         * mini-ia64.c (emit_call): Add a comment.
7829
7830         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
7831
7832         * tramp-ia64.c: Fix some warnings.
7833
7834 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
7835
7836         * mini.h: don't use gboolean for bitfields.
7837         * mini.c: verifier changes for fields and methods accessibility.
7838
7839 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
7840
7841         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
7842         lazy icall wrapper changes.
7843
7844         * dominators.c: Replace all the dominator algorithms with faster
7845         ones from the linear-il branch.
7846
7847         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
7848         the mempool.
7849
7850         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
7851         common cases are done first.
7852
7853         * mini-amd64.c: Fix some warnings.
7854
7855         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
7856         from the mempool.
7857
7858         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
7859         added code.
7860
7861         * mini.h: Add a missing prototype.
7862
7863 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
7864
7865         * mini.c: Compile icall wrappers lazily.
7866
7867         * mini-codegen.c: Use printf instead of g_print since its much faster.
7868
7869         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
7870         function.
7871
7872         * mini.c (optimize_branches): Cache the negative result from 
7873         remove_block_if_useless ().
7874
7875         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
7876         Also fix some bblock linking issues.
7877
7878         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
7879         assembly files.
7880
7881         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
7882
7883         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
7884         accessed fields first, for better cache behavior.
7885         
7886 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
7887
7888         * mini.c: speedup IList<T> array accesses.
7889
7890 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
7891
7892         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
7893         inline_costs counter. Fixes #77190.
7894
7895 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
7896
7897         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
7898         trace messages. Fixes #77706.
7899
7900 2006-03-04  Martin Baulig  <martin@ximian.com>
7901
7902         * tramp-amd64.c, tramp-x86.c
7903         (mono_debugger_create_notification_function): Use
7904         mono_global_codeman_reserve() to allocate a buffer at runtime and
7905         return it.
7906
7907         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
7908
7909         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
7910         notification function at runtime and then call `initialize' in the
7911         `MONO_DEBUGGER__debugger_info' vtable.
7912
7913 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
7914
7915         * iltests.il: Fix a visibility problem.
7916
7917 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
7918
7919         * driver.c, mini.c: add hooks for the counters API.
7920
7921 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
7922
7923         * driver.c: show disabled options.
7924
7925 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
7926
7927         * linear-scan.c: always use cost-driven selection.
7928
7929 2006-02-28  Raja R Harinath  <rharinath@novell.com>
7930
7931         * jit-icalls.c (helper_compile_generic_method): Revert change from
7932         2006-02-24.
7933
7934 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
7935
7936         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
7937
7938 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
7939
7940         * inssel.brg: style fixes, mostly to force the updated monoburg
7941         to run for people using svn.
7942
7943 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
7944
7945         * mini.c: match monoburg changes.
7946
7947 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
7948
7949         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
7950         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
7951         declaration in the header file.
7952
7953 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
7954
7955         * helpers.c: reduce relocations and mem usage.
7956
7957 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
7958
7959         * mini.h, mini-codegen.c: disable logging features if
7960         requested by configure.
7961
7962 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
7963
7964         * mini.c: tiny verifier changes.
7965
7966 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
7967
7968         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
7969         cpu-pentium.md: stack alignment changes for osx/x86,
7970         partially from Geoff Norton <gnorton@customerdna.com>.
7971
7972 2006-02-24  Raja R Harinath  <harinath@gmail.com>
7973
7974         * jit-icalls.c (helper_compile_generic_method): Update to changes
7975         in metadata/class.c.
7976
7977 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
7978         
7979         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
7980         
7981         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
7982         interface calls with large offsets.
7983
7984 2006-02-23  Raja R Harinath  <rharinath@novell.com>
7985
7986         * jit-icalls.c (helper_compile_generic_method): Document the
7987         special-case we depend on so that we can inflate the method twice
7988         with the same context with no bad side-effects.
7989
7990 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
7991
7992         * mini-x86.c, mini-amd64.c: fix for case when xen support
7993         is disabled.
7994
7995 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
7996
7997         * mini-x86.c, mini-amd64.c: generate code to access tls items
7998         in a faster way for Xen systems.
7999
8000 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
8001
8002         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
8003         updates and compilation fixes for the OSX/x86 port, mostly from
8004         Geoff Norton <gnorton@customerdna.com>.
8005
8006 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
8007
8008         * inssel.brg: faster interface call implementation
8009         to sync with the interface_offsets MonoVTable changes.
8010
8011 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
8012
8013         * mini.c: more verification checks.
8014
8015 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
8016
8017         * mini.c: added a few more verification checks.
8018
8019 2006-02-17      Neale Ferguson <neale@sinenomine.net>
8020
8021         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
8022         facility on the processor and use it if available.
8023
8024 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
8025
8026         * driver.c, aot.c, mini.c: throw exception if the IL code is
8027         invalid or unverifiable.
8028
8029 2006-02-17  Raja R Harinath  <rharinath@novell.com>
8030
8031         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
8032         m.StructField.
8033
8034 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
8035
8036         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
8037
8038 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8039
8040         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
8041         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
8042         handling of instantiated generic valuetypes.
8043
8044 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
8045
8046         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
8047         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
8048         instead.
8049
8050         * generics.2.cs: Revert the nullable reftypes tests.
8051
8052 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
8053
8054         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
8055         using __builtin_frame_address (1) as it doesn't work in the presence
8056         of optimizations. Hopefully fixes #77273.
8057
8058         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
8059         -> generics.cs change as it doesn't work with some automake versions.
8060
8061 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
8062
8063         * mini.c: handle systems that sue a different way to
8064         retrieve the stack address of the current thread.
8065
8066 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
8067
8068         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
8069         it specially in the makefile.
8070
8071         * generics.2.cs: Add tests for nullable reference types.
8072
8073 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8074
8075         * mini.c: always handle the case when mono_jit_init()
8076         is called in a thread different from the main thread,
8077         confusing libgc (bug #77309).
8078
8079 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
8080
8081         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
8082
8083 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
8084
8085         * mini.c: change optimize_branches () to use a single loop
8086         and introduce a new optimization to simplify some range checks.
8087
8088 2006-02-03  Martin Baulig  <martin@ximian.com>
8089
8090         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
8091         and merged with debugger_thread_manager_add_thread().
8092         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
8093         inform the debugger about the main thread.
8094
8095 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
8096
8097         * basic.cs: Add test for div.un/rem.un constant folding.
8098
8099 2006-02-03  Neale Ferguson <neale@sinenomine.net>
8100
8101         * cpu-s390x.md: correct int_xor_imm length
8102
8103 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
8104
8105         * generics.2.cs: New test for #77442.
8106
8107         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
8108         #77442.
8109
8110 2006-02-02  Martin Baulig  <martin@ximian.com>
8111
8112         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
8113         <mono/metadata/mono-debug-debugger.h>   
8114
8115         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
8116
8117 2006-02-02  Martin Baulig  <martin@ximian.com>
8118
8119         * debug-debugger.h: New header file for debug-debugger.c.
8120
8121         * debug-debugger.c: Big API cleanup; don't run the managed Main()
8122         function is a separate thread anymore; add support for attaching.
8123
8124 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
8125
8126         * tramp-x86.c: Fix a warning.
8127
8128 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
8129
8130         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
8131         on very large methods.
8132
8133         * aot.c (load_patch_info): Fix a warning.
8134
8135 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
8136
8137         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
8138         mini-ops.h: alu membase optimizations.
8139
8140 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
8141
8142         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
8143         to speedup StringBuilder.
8144
8145 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
8146
8147         * dominators.c (mono_compute_natural_loops): Fix detection of
8148         loop body start blocks.
8149
8150         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
8151
8152 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
8153
8154         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
8155         #75145.
8156
8157 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
8158
8159         * aliasing.c: Fixed aliasing issue on 64 bit archs.
8160
8161 2006-01-25  Martin Baulig  <martin@ximian.com>
8162
8163         * debug-debugger.c: Moved the `MonoDebuggerManager' and
8164         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
8165         started to cleanup this file a little bit.
8166
8167 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
8168
8169         * mini.c: optimize a codepath frequently happening in generics code.
8170
8171 2006-01-23  Martin Baulig  <martin@ximian.com>
8172
8173         * Makefile.am: Only compile debug-debugger.c on supported platforms.
8174
8175         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
8176         functions directly.
8177
8178         * driver.c: debug-debugger.c is only available if
8179         `MONO_DEBUGGER_SUPPORTED' is defined.   
8180
8181 2006-01-23  Martin Baulig  <martin@ximian.com>
8182
8183         * debug-debugger.c: Only enable this on platforms where the Mono
8184         Debugger is working (x86 and x86_64).
8185
8186 2006-01-21  Martin Baulig  <martin@ximian.com>
8187
8188         The Mono Debugger is now using the normal `mono' instead of the
8189         `mono-debugger-mini-wrapper' when executing managed code.
8190
8191         * debug-debugger.c: New file; previously known as
8192         debugger/wrapper/wrapper.c.
8193
8194         * debug-mini.c (mono_init_debugger): Removed.
8195
8196         * driver.c (mono_main): Added new `--inside-mdb' command line
8197         argument which is used when running inside the debugger.
8198
8199 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
8200
8201         * liveness.c (mono_analyze_liveness): Remove some unused data
8202         structures.
8203
8204 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
8205
8206         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
8207
8208 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
8209
8210         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
8211         depends on implementation details of monobitset.
8212
8213         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
8214         Fixes #77271.
8215
8216 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
8217
8218         * liveness.c: Update after monobitset changes.
8219
8220 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
8221
8222         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
8223
8224 2006-01-11 Neale Ferguson <neale@sinenomine.net>
8225
8226         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
8227
8228         * mini-s390x.c: Remove warning messages.
8229
8230 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
8231
8232         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
8233
8234 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
8235
8236         * generics.2.cs: Add ldelem/stelem_any test.
8237
8238 2006-01-10 Neale Ferguson <neale@sinenomine.net>
8239
8240         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
8241
8242 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
8243
8244         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
8245         
8246 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
8247
8248         * generics.2.cs: Reenable vtype tests.
8249
8250         * inssel-x86.brg: Remove an icorrect valuetype rule.
8251
8252 2006-01-06 Neale Ferguson <neale@sinenomine.net>
8253
8254         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
8255         initial support for OP_ABS.
8256
8257 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8258
8259         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
8260
8261 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8262
8263         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
8264         conversion and implement LADD/LSUB.
8265
8266         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
8267         architectures.
8268
8269 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8270
8271         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
8272
8273         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
8274         architectures.
8275
8276 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8277
8278         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
8279         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
8280         (stack walk problem).
8281
8282 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
8283
8284         * aot.c (mono_aot_load_method): Fix a warning.
8285
8286 2006-01-03  Neale Ferguson <neale@sinenomine.net>
8287
8288         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
8289
8290 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
8291
8292         * iltests.il: Add test for #77148.
8293
8294         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
8295         #77148.
8296
8297 2006-01-03  Neale Ferguson <neale@sinenomine.net>
8298
8299         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
8300
8301 2006-01-03  Neale Ferguson <neale@sinenomine.net>
8302
8303         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
8304         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
8305
8306         * basic-long.cs: Add lconv-to-r4/r8 tests.
8307
8308 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
8309
8310         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
8311
8312         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
8313         here as on other archs.
8314
8315 2005-12-29 Neale Ferguson <neale@sinenomine.net>
8316
8317         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
8318
8319 2005-12-29 Neale Ferguson <neale@sinenomine.net>
8320
8321         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
8322         
8323         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
8324
8325         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
8326         instrument_prolog; Add memory_barrier instruction.
8327
8328 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
8329
8330         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
8331
8332 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
8333
8334         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
8335
8336         * aliasing.c inssel.brg: Fix warnings.
8337
8338         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
8339         could skip initialization of some parts of memory.
8340
8341         * mini.c mini-ia64.c: Fix warnings.
8342
8343         * inssel-sparc.brg: Add an implementation of lneg which actually works.
8344
8345 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
8346
8347         * aliasing.c (mono_build_aliasing_information): Add a workaround for
8348         a crash seen on sparc.
8349
8350         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
8351         
8352         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
8353
8354 2005-12-21 Neale Ferguson <neale@sinenomine.net>
8355
8356         * mini-ops.h: Add s390_backchain instruction
8357
8358         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
8359
8360         * cpu-s390.md: Add s390_backchain instruction
8361
8362         * mini-s390.c: Significant ABI changes
8363
8364         * mini-s390.h: Cater for zero length structures
8365
8366 2005-12-20 Neale Ferguson <neale@sinenomine.net>
8367
8368         * mini-s390.c: ABI fixes
8369
8370         * inssel-s390.brg: Remove debug statements
8371
8372         * cpu-s390.md: Fix length of ATOMIC_xx operations
8373
8374 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
8375
8376         * basic-float.cs: Add float<->long conversion tests.
8377
8378 2005-12-16 Neale Ferguson <neale@sinenomine.net>
8379
8380         * mini-s390.c: Fix LOCALLOC processing.
8381
8382         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
8383
8384 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
8385
8386         * iltests.il: Add tests for some opcodes not covered by the other
8387         tests.
8388
8389 2005-12-15 Neale Ferguson <neale@sinenomine.net>
8390
8391         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
8392         register loading for Tail processing; Correct trace output.
8393
8394         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
8395
8396         * cpu-s390.md: Correct size of jmp instruction. 
8397
8398 2005-12-13 Neale Ferguson <neale@sinenomine.net>
8399
8400         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
8401
8402 2005-12-13 Neale Ferguson <neale@sinenomine.net>
8403
8404         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
8405           Bring s390 up to current level.
8406
8407 2005-12-12  Zltan Varga  <vargaz@gmail.com>
8408
8409         * generics.2.cs: Disable the newly added tests as they do not work yet.
8410         
8411         * generics.2.cs: Add valuetype tests.
8412
8413 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
8414
8415         * basic-long.cs: Add i4->u8 test.
8416
8417         * objects.cs: Add tests for JIT intrinsic.
8418
8419         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
8420         optimizations lost by a mistake.
8421
8422 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
8423
8424         * basic-long.cs: Remove a test moved to objects.cs.
8425
8426         * arrays.cs: Add more array tests.
8427
8428 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
8429
8430         * arrays.cs: Add new tests for multi-dimensional arrays.
8431
8432 2005-12-06  Raja R Harinath  <rharinath@novell.com>
8433
8434         * Makefile.am (test_sources2): Add generics.2.cs.
8435         (EXTRA_DIST): Add test_sources2.
8436
8437 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
8438
8439         Support for boxing and unboxing nullable types as well as the
8440         isinst operation on nullables, per the CLI ammendment.
8441
8442         * inssel.brg (CEE_ISINST): Special case for nullable
8443
8444         * mini.c (handle_unbox_nullable): new method
8445         (handle_box): Special case for nullable types
8446         (mono_method_to_ir): Call handle_unbox_nullable in correct
8447         places.
8448
8449         * generics.2.cs: New test suite
8450
8451         * Makefile.am: Support for regression tests with generics.
8452
8453 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
8454
8455         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
8456         allocated to registers. Fixes #76800.
8457
8458 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
8459
8460         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
8461
8462 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
8463
8464         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
8465         of platforms.
8466
8467 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
8468
8469         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
8470         objects.cs.
8471
8472         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
8473         
8474         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
8475 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
8476
8477         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
8478         single precision before storing to a single precision location.
8479
8480 2005-11-28  Raja R Harinath  <rharinath@novell.com>
8481
8482         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
8483
8484 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
8485
8486         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
8487         correct files.
8488
8489         * basic.cs: Remove test_0_byte_compares test which was moved to
8490         objects.cs a long time ago.
8491
8492 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
8493
8494         * aliasing.c: Fixed aliasing issue on 64 bit archs.
8495
8496 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
8497
8498         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
8499         handlers are called.
8500
8501         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
8502         throwing code.
8503
8504          * mini-ia64.c: Add support for the throw->branch exception 
8505         optimization.   
8506
8507         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
8508
8509 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
8510
8511         * mini.c: Enabled "fastpath" deadce :-)
8512         
8513 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
8514
8515         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
8516         alias analysis pass to support it.
8517         * mini.h: Likewise.
8518         * ssa.c: Likewise.
8519         * liveness.c: Likewise (liveness computation can use aliasing
8520         information to be more accurate).
8521         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
8522         moreover made so that "--compile-all" uses the given optimization
8523         flags and not the default ones.
8524         * aliasing.c: Alias analysis (new file).
8525         * aliasing.h: Likewise.
8526         * Makefile.am: added "aliasing.c" and "aliasing.h".
8527         
8528 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
8529
8530         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
8531         OP_L opcodes.
8532
8533 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
8534
8535         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
8536         fp >= end_of_stack exit condition, as it is not needed, and it might
8537         become true for fp eliminated frames.
8538
8539 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
8540
8541         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
8542         coded offsets.
8543
8544 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
8545
8546         * mini-arm.c: fixed alignment of doubles/longs to match
8547         the C ABI (bug #76635).
8548
8549 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
8550
8551         * aot.c: fix compilation with --enable-minimal=aot.
8552
8553 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
8554
8555         * mini-arm.c: fixed compatibility with the new
8556         floating point emulator package for compares.
8557
8558 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
8559
8560         * mini.c : reverted sig->pinvoke changes (r51396-51397).
8561
8562 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
8563
8564         * mini-exceptions.c (print_stack_frame): Output to stderr.
8565         (mono_handle_native_sigsegv): Ditto.
8566
8567 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
8568
8569         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
8570         OP_LCONV_TO_OVF_I implementation.
8571
8572         * mini-amd64.c: Add support for the throw->branch exception 
8573         optimization.
8574
8575         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
8576         when the catch clause catches a more general exception, i.e. Object.
8577
8578 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
8579
8580         * cpu-ia64.md: Remove unused opcodes.
8581
8582         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
8583         specific defines for architectures defining USE_SIGACTION.
8584
8585         * mini-ia64.c: Fix some warnings.
8586
8587         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
8588         version seemed to skip a frame.
8589
8590 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
8591
8592         * mini.c: Clean up the usage of sig->pinvoke flag. Now
8593         only calls which are made to native code use this flag.
8594
8595 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
8596
8597         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
8598         varargs methods as well.
8599         
8600         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
8601         which have save_lmf set. Reorganize methods prologs a bit.
8602
8603         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
8604         debugger to the proper place.
8605
8606 2005-10-29  Martin Baulig  <martin@ximian.com>
8607
8608         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
8609         when running inside the debugger until the debugger has support
8610         for it.
8611
8612 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
8613
8614         * mini.h: Fix a warning.
8615
8616 2005-10-24  Miguel de Icaza  <miguel@novell.com>
8617
8618         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
8619         we expose publicly, this returns the string.
8620
8621 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
8622
8623         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
8624         with fp elimination.
8625
8626 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
8627
8628         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
8629         native stacktrace using the glibc 'backtrace' function if available.
8630
8631 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
8632
8633         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
8634
8635         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
8636         handle SIGSEGVs received while in native code.
8637
8638         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
8639         code, call mono_handle_native_sigsegv which will abort the runtime
8640         after printing some diagnostics, instead of converting it into a
8641         confusing NullReferenceException.
8642
8643 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
8644
8645         * cpu-pentium.md: Remove unused opcodes.
8646
8647 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
8648
8649         * mini-amd64.h (MonoLMF): Add rsp field.
8650
8651         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
8652         the lmf too.
8653
8654 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
8655
8656         * mini-codegen.c (get_register_spilling): Fix some warnings.
8657
8658 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
8659
8660         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
8661         elimination during exception handling. Enable fp elimination by
8662         default.
8663
8664         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
8665         elimination.
8666
8667 2005-10-16  Martin Baulig  <martin@ximian.com>
8668
8669         * mini-exceptions.c
8670         (mono_debugger_run_finally): New public method for the debugger.
8671
8672 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
8673
8674         * debug-mini.c (mono_debug_init_method): Fix warning.
8675
8676         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
8677         the 'exname' parameter const to fix some warnings.
8678
8679 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
8680
8681         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
8682         introduced by the previous patch.
8683
8684 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
8685
8686         * basic-float.cs: Add test for precision of float arithmetic.
8687
8688         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
8689         when loading/storing single values from/to memory.
8690
8691         * mini.c (mono_jit_compile_method_with_opt): Create the function
8692         pointers in the correct domain.
8693
8694 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
8695
8696         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
8697         introduced by previous patch.
8698         
8699         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
8700         when out_filter_idx is NULL.
8701
8702         * mini-exceptions.c: Don't run filter clauses twice during exception
8703         handling. Fixes #75755.
8704
8705 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
8706
8707         * aot.c: Add support for ldflda wrappers.
8708
8709         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
8710         #75902.
8711
8712 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
8713
8714         * mini.c, mini.h: do not consider exception handlers blocks when
8715         setting up interface variables.
8716
8717 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
8718
8719         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
8720
8721 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
8722
8723         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
8724         causes a regression.
8725
8726         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
8727
8728 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
8729
8730         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
8731         of the OP_P definitions.
8732
8733         * TODO: Add a proposal for dealing with the CEE/OP mess.
8734
8735         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
8736         optimizations from the x86 port.
8737
8738         * cpu-amd64.md: Ditto.
8739
8740         * basic.cs basic-long.cs: Add tests.
8741
8742 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
8743
8744         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
8745         Patrik Torstensson's implementation of my exception-handling
8746         optimization idea, when the exception object is not used
8747         (bug #62150).
8748
8749 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
8750
8751         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
8752         of the mul_imm optimizations from the old jit.
8753
8754 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
8755
8756         * mini.c, liveness.c: patch by Patrik Torstensson and
8757         Zoltan Varga to improve performance in methods with
8758         exception clauses.
8759
8760 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
8761
8762         * driver.c: Remove 'Globalization' entry from --version.
8763
8764 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
8765
8766         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
8767         there is a profiler interested in JIT events.
8768
8769         * aot.c: Load profile files produced by the AOT profiling module, and
8770         reorder methods based on the profiling info. Add a 'method_order' table
8771         to the AOT file to make mono_aot_find_jit_info work with the reordered
8772         methods.
8773
8774         * mini.h: Bump AOT file version info.
8775
8776 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
8777
8778         * mini-arm.h: work around what looks like a gcc bug when optimizations
8779         are enabled.
8780
8781 2005-09-28  Raja R Harinath  <rharinath@novell.com>
8782
8783         * Makefile.am (AM_CFLAGS): Don't use += to append inside
8784         conditionals.  Use ...
8785         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
8786
8787 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
8788
8789         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
8790         to determine the amount of memory to copy when passing valuetypes.
8791
8792         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
8793         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
8794
8795 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
8796
8797         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
8798         information about aot.
8799
8800 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
8801
8802         * *.c: Replace the use of {Enter,Leave}CriticalSection with
8803         macros. This will allow a deadlock debugger to easily be plugged
8804         in.
8805
8806 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
8807
8808         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
8809
8810 2005-09-27  Raja R Harinath  <rharinath@novell.com>
8811
8812         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
8813         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
8814         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
8815         ($(arch_built)) [CROSS_COMPILING]: Error out.
8816
8817 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
8818
8819         * aot.c: Add support for the no_special_static flag for classes.
8820
8821 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
8822
8823         * Reapply reverted patches.
8824
8825         * *: Revert r50174 as well.
8826
8827         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
8828
8829 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
8830
8831         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
8832
8833 2005-09-23  Miguel de Icaza  <miguel@novell.com>
8834
8835         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
8836         part of the SIG_HANDLER_SIGNATURE.  
8837
8838 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
8839
8840         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
8841         statistics.
8842
8843         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
8844         introduced by previous patch.
8845
8846 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
8847
8848         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
8849         saved registers too.
8850
8851         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
8852         upon the information returned by get_call_info ().
8853         
8854         * mini-x86.c (add_float): Fix stack size calculation.
8855         (mono_arch_call_opcode): Rewrite this so it works based up the
8856         information returned by get_call_info ().
8857         (mono_arch_get_this_vret_args): Ditto.
8858
8859 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
8860
8861         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
8862         in cinfo to determine the registers which need to be used.
8863
8864 2005-09-20  Miguel de Icaza  <miguel@novell.com>
8865
8866         * driver.c (mono_main): Add --server and --desktop flags. 
8867
8868 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
8869
8870         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
8871         registers as global registers.
8872
8873         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
8874         longer needed with the new register allocator.
8875
8876         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
8877
8878         * cpu-ia64.md: Remove unused opcodes.
8879         
8880         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
8881         
8882 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
8883
8884         * cpu-amd64.md: Remove unused opcodes.
8885
8886         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
8887         needed with the new register allocator.
8888
8889         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
8890         reg-reg moves.
8891
8892 2005-09-16  Raja R Harinath  <rharinath@novell.com>
8893
8894         * Makefile.am (check-local): Don't invoke semdel-wrapper.
8895
8896 2005-09-16  Martin Baulig  <martin@ximian.com>
8897
8898         * exceptions-amd64.c
8899         (throw_exception): Don't call mono_debugger_throw_exception() if
8900         we're a rethrow - see the FIXME in the code.
8901
8902 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
8903
8904         * mini.c (mono_init_exceptions): This only works on some architectures.
8905         
8906 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
8907
8908         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
8909         on ia64.
8910
8911         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
8912
8913         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
8914         now in mini-exceptions.c.
8915
8916 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
8917
8918         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
8919         now in mini-exceptions.c.
8920
8921 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
8922
8923         * exceptions-x86.c: Applied patch from Patrik Torstensson 
8924         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
8925
8926         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
8927         code into mini-exceptions.c. Add some assertions to it.
8928
8929 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
8930
8931         * aot.c (emit_section_change): Applied patch from "The Software Team" 
8932         (<software@solmersa.com>). Fix as errors on windows.
8933
8934 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
8935
8936         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
8937         method info into the LMF.
8938
8939 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
8940         
8941         * mini-ia64.c: Add proper unwind info for method epilogs.
8942
8943         * exceptions-ia64.c: Add some code to help debugging.
8944         
8945         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
8946
8947         * mini-exceptions.c: Fix warning.
8948
8949 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
8950
8951         * mini.c: Really fix build.
8952
8953         * mini-x86.c mini-amd64.c: Fix build.
8954
8955 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
8956
8957         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
8958
8959         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
8960         some Interlocked methods as intrinsics.
8961
8962         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
8963         for Thread methods as well.
8964
8965         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
8966
8967         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
8968
8969         * mini-ia64.c mini-x86.c mini-amd64.c 
8970         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
8971         OP_MEMORY_BARRIER.
8972         
8973         * mini.c (mono_init_exceptions): Fix build breakage.
8974
8975 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
8976
8977         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
8978         of instructions. Use the new ia64_unw_op macros for emitting unwind
8979         info.
8980
8981         * mini.c (mono_init_exceptions): Initialize exception handling
8982         related trampolines at startup.
8983
8984 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
8985
8986         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
8987
8988 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
8989
8990         * mini.c: Handle type loading errors gracefully during compilation and
8991         throw the appropriate exception.
8992
8993 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
8994
8995         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
8996         for the mono binary.
8997
8998 2005-09-09  Martin Baulig  <martin@ximian.com>
8999
9000         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
9001         the release.
9002
9003 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
9004
9005         * mini-arm.h: use emulation for conv.r.un for the release.
9006
9007 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
9008
9009         * mini-arm.c, objects.cs: more fixes and tests for them.
9010
9011 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
9012
9013         * mini-arm.c: align structures to at least 4 bytes to be able
9014         to keep our current optimized memcpy.
9015
9016 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
9017
9018         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
9019
9020 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9021
9022         * mini.c: ignore SIGPIPE.
9023
9024 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
9025
9026         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
9027
9028         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
9029
9030 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
9031
9032         * mini.h: Add prototype for mono_allocate_stack_slots_full.
9033
9034 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
9035
9036         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
9037         exception handling support.
9038         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
9039         patch by Brian Koropoff <briank@marakicorp.com>).
9040
9041 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
9042
9043         * mini.c: revert another 'optimization' which breaks when
9044         items on the eval stack need to be saved at a basic block end
9045         (bug #75940).
9046
9047 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
9048
9049         * jit-icalls.c: for arrays, ensure we always provide
9050         lower bounds.
9051
9052 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
9053
9054         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
9055         
9056         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
9057
9058 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
9059
9060         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
9061         arguments in their original register.
9062
9063 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
9064
9065         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
9066         memset/memcpy.
9067
9068         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
9069         when ssapre is enabled.
9070
9071         * inssel-long.brg: Fix bug in previous patch.
9072
9073         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
9074         multiplication by a constant.
9075
9076 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
9077
9078         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
9079         icc.
9080
9081         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
9082         saving registers.
9083
9084 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
9085
9086         * inssel-arm.brg: apply changes tested by Brian Koropoff
9087         <briank@marakicorp.com>.
9088
9089 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
9090
9091         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
9092         
9093 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
9094
9095         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
9096         to the same register if dreg is just a base register.
9097         (print_ins): Improve printing of membase opcodes.
9098
9099         * inssel-x86.brg: Add optimized ldind(reg) rules.
9100
9101         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
9102
9103 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
9104
9105         * mini.c: when running under valgrind, set the stack bottom for
9106         the GC at the actual approximate stack for the app (fixes running
9107         mono with valgrind).
9108
9109 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
9110
9111         * mini.c: do no break at the first valuetype to init found
9112         (fixes bug #75791).
9113
9114 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
9115
9116         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
9117
9118 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
9119
9120         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
9121
9122 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
9123
9124         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
9125
9126 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
9127
9128         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
9129
9130         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
9131         code.
9132
9133         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
9134         code.
9135
9136         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
9137         methods.
9138
9139 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
9140
9141         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
9142
9143 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
9144
9145         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
9146         in the tail recursion optimization.
9147
9148         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
9149         debug info into the assembly file.
9150
9151         * iltests.il: Add test for filter regions.
9152
9153         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
9154         initial stack of filter regions. Fixes #75755.
9155
9156 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
9157
9158         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
9159         stack requirements.
9160
9161 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
9162
9163         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
9164         the check for an already compiled method on non-ia64 platforms.
9165         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
9166         proper domain.
9167
9168         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
9169
9170         * inssel-x86.brg: Add some optimized call rules.
9171
9172 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
9173
9174         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
9175         method here.
9176
9177         * mini.h mini-trampolines.c: Pass the trampoline argument to 
9178         mono_arch_patch_delegate_trampoline.
9179
9180         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
9181
9182         * mini-trampolines.c: Fix build.
9183
9184         * mini-amd64.h: Add delegate trampolines.
9185
9186         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
9187
9188         * inssel-amd64.brg: Add optimized call rules.
9189         
9190         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
9191
9192         * inssel-ia64.brg: Add optimized ldind(reg) rules.
9193
9194 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
9195
9196         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
9197         change.
9198
9199         * mini-ia64.c: Remove LMF fixmes.
9200
9201         * mini-ia64.h: Remove most fields from LMF.
9202
9203         * inssel-ia64.brg (stmt): Fix unaligned access errors.
9204
9205         * mini-trampolines.c: Add support for IA64 function descriptors.
9206
9207         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
9208         for IA64 function descriptors.
9209
9210 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
9211
9212         * tramp-arm.c: patch the vtable for virtual calls. Added
9213         support code to register/unregister the LMF.
9214         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
9215         more LMF work.
9216
9217 2005-08-19  Dick Porter  <dick@ximian.com>
9218
9219         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
9220         bit value if needed.
9221
9222 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
9223
9224         * mini.c (mini_get_method): Move handling of wrapper data here.
9225
9226         * mini.c (mono_method_to_ir): Add support for dynamic methods.
9227
9228         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
9229         virtual.
9230
9231         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
9232         bblock->code does not remain empty.
9233
9234 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
9235
9236         * arrays.cs: Add regression test for #75832.
9237
9238         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
9239         rules. Fixes #75832.
9240
9241         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
9242         instruction scheduling.
9243
9244 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
9245
9246         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
9247
9248 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
9249
9250         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
9251
9252         * mini-codegen.c: Fix VC build.
9253
9254         * cpu-pentium.md: Increase length of atomic_exhange_i4.
9255
9256 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9257
9258         * mini.h: fix signature for mono_register_opcode_emulation.
9259
9260 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
9261
9262         * mini.c: Get rid of most of the helper_sig_... constants using
9263         mono_create_icall_signature ().
9264
9265 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
9266
9267         * jit-icalls.c (helper_ldstr): New helper function.
9268
9269         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
9270
9271         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
9272         throw, load the string using a helper call instead of creating a string object.
9273
9274         * aot.c: Update after LDSTR changes.
9275
9276         * mini.h: Bump AOT file version.
9277         
9278         * aot.c: Save class size info into the AOT file. Print more statistics during
9279         compilation.
9280
9281         * mini.h: Bump AOT file version.
9282
9283         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
9284         ordering of disasm cases. Fixes #74957.
9285
9286 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
9287
9288         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
9289         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
9290         the generic code needed for the ARM port.
9291
9292 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
9293
9294         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
9295         inssel-arm.brg: more ARM features and fixes.
9296
9297 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
9298
9299         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
9300         ARM port work in progress.
9301
9302 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
9303
9304         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
9305
9306         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
9307
9308         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
9309
9310         * inssel.brg (mini_emit_memset): Add support for unaligned access.
9311
9312         * *-ia64.*: Ongoing IA64 work.
9313         
9314         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
9315
9316 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
9317
9318         * TODO: Remove out-of-data todo stuff.
9319
9320         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
9321         dead code.
9322
9323         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
9324
9325         * mini.h: Bump corlib version.
9326
9327 2005-07-27  Martin Baulig  <martin@ximian.com>
9328
9329         * mini-codegen.c
9330         (create_copy_ins): Added `const unsigned char *ip' argument; set
9331         `copy->cil_code' from it.
9332
9333 2005-07-27  Martin Baulig  <martin@ximian.com>
9334
9335         * mini-exceptions.c (mono_handle_exception): Don't call
9336         mono_debugger_handle_exception() for filters.
9337
9338 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
9339
9340         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
9341         as well.
9342
9343 2005-07-26  Martin Baulig  <martin@ximian.com>
9344
9345         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
9346
9347         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
9348         helper_compile_generic_method() if the method is actually virtual
9349         and non-final.
9350
9351 2005-07-26  Martin Baulig  <martin@ximian.com>
9352
9353         * mini.c
9354         (trampoline_code): Renamed to `mono_trampoline_code' and made it
9355         public; this is now accessed directly by the debugger.
9356         (mono_generic_trampoline_code): Removed.
9357
9358         * debug-mini.c
9359         (mono_debug_init_method): Also add interncalls and wrappers.
9360
9361 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
9362
9363         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
9364
9365 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
9366
9367         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
9368
9369 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
9370
9371         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
9372
9373 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
9374
9375         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
9376         getting TLS offsets on AMD64 too.
9377
9378 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
9379
9380         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
9381
9382 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
9383
9384         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
9385         inssel-arm.brg, mini-arm.h: ARM port work in progress.
9386
9387 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
9388
9389         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
9390
9391         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
9392         to mini.c.
9393
9394         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
9395         mono_sparc_is_virtual_call ().
9396         
9397         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
9398
9399         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
9400         trampoline parameters.
9401
9402         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
9403         
9404         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
9405         to mono_arch_get_vcall_slot_addr.
9406
9407         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
9408         trampoline code.
9409
9410         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
9411
9412 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
9413
9414         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
9415
9416 2005-07-19  Martin Baulig  <martin@ximian.com>
9417
9418         * exceptions-amd64.c (throw_exception): Call
9419         mono_debugger_throw_exception() here like we're doing it on i386.
9420
9421 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
9422
9423         * mini-ia64.c: Add optimized TLS access support.
9424
9425 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
9426
9427         * mini-exceptions.c: Ongoing IA64 work.
9428
9429         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
9430
9431         * mini.c: Use the default optimization set when embedding. Fixes
9432         #75194.
9433
9434 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
9435
9436         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
9437         of trampolines to a separate file.
9438
9439         * mini-trampolines.c: New file.
9440
9441         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
9442         separate file.
9443         
9444         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
9445         amd64/ia64 code.
9446
9447         * mini-codegen.c: Fix cygwin build.
9448
9449 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
9450
9451         * mini.c: Add some minor changes needed by the IA64 port.
9452
9453         * *-ia64.*: Ongoing IA64 work.
9454
9455 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
9456
9457         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
9458         trampolines into arch-independent and arch-dependent parts.
9459
9460         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
9461
9462 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
9463
9464         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
9465
9466         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
9467         the xp-regalloc-branch for amd64.
9468
9469         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
9470         xp-regalloc-branch for x86.
9471
9472 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
9473
9474         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
9475
9476 2005-07-06  Martin Baulig  <martin@ximian.com>
9477
9478         * mini.c
9479         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
9480         (mono_jit_runtime_invoke): Likewise.
9481
9482 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
9483
9484         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
9485         on x86 too.
9486         
9487         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
9488         without loading their metadata. Reorganize the file format so exception handling+
9489         debug info is kept separate from normal method info. Create MonoJitInfo 
9490         structures for methods lazily.
9491
9492         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
9493         loading metadata.
9494         (x86_class_init_trampoline): Patch AOT class init trampolines too.
9495
9496         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
9497
9498         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
9499         in AOT code.
9500
9501         * mini.h: Bump AOT file version.
9502
9503 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
9504
9505         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
9506
9507 2005-07-01  Raja R Harinath  <rharinath@novell.com>
9508
9509         * Makefile.am (check-local): Call semdel-wrapper.
9510
9511 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
9512
9513         * mini-x86.c: Revert the last change as it seems to break the build..
9514
9515 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
9516
9517         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
9518         
9519         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
9520
9521 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
9522
9523         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
9524         outside of the macro, so strange stuff doesn't happen with gcc4
9525         (NEW_AOTCONST_TOKEN): Likewise.
9526
9527 2005-06-28  Martin Baulig  <martin@ximian.com>
9528
9529         * mini.c (mini_class_is_system_array): New static method; use this
9530         instead of `klass->parent == mono_defaults.array_class' everywhere
9531         since this also works for the new generic array class.
9532
9533 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
9534
9535         * inssel.brg: Remove warnings.
9536
9537 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
9538
9539         * mini-ia64.c: Ongoing IA64 work.
9540
9541         * basic-float.cs: Add float->i1 conversion test.
9542
9543         * iltests.il: Add conv.u4 test.
9544
9545 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
9546
9547         * inssel-long.brg: Fix bug caused by last change.
9548
9549 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
9550
9551         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
9552         BSDs.  Allows the x86 JIT to work on OSX86
9553
9554 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
9555
9556         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
9557         u4->i8 conversion.
9558
9559         * mini-ia64.c: Ongoing IA64 work.
9560
9561 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
9562
9563         * mini-ia64.c: Ongoing IA64 work.
9564
9565         * driver.c: Clean up jit_code_hash as well when using --regression.
9566
9567         * inssel-long.brg: Fix long->i4/u4 conversion rules.
9568
9569         * basic-long.cs: Add tests for long->u4 conversion.
9570
9571 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
9572
9573         * mini.c: Take mono_get_domainvar out of macros. This makes sure
9574         that we do not depend on undefined C behavior: the order stuff
9575         gets evaluated within an expression. Fixes mono when compiled on
9576         GCC 4.
9577
9578 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
9579
9580         * *-ia64.*: Ongoing IA64 work.
9581
9582         * aot.c: Lower memory usage while loading AOT methods.
9583
9584         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
9585
9586         * mini.h: Bump AOT file format version.
9587
9588 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
9589
9590         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
9591
9592 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
9593
9594         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
9595         not on callee assembly). Fixed some comments.
9596
9597 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
9598
9599         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
9600         it gets proper disassembly.
9601         (emit_method_info): Remove some dead code.
9602
9603         * mini.c (mini_method_compile): Allways allocate the GOT var in
9604         mono_method_to_ir for emulating opcodes.
9605
9606 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
9607
9608         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
9609         before freeing the code memory. Fixes #74990.
9610
9611         * objects.cs: Add regression test for #74992.
9612
9613         * liveness.c: Extend live ranges of arguments to the beginning of the
9614         method. Fixes #74992.
9615
9616         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
9617         so it points into the faulting instruction.
9618
9619 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
9620
9621         * jit-icalls.c (mono_imul_ovf): Add exception handling.
9622
9623         * *-ia64.*: Ongoing IA64 work.
9624
9625         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
9626
9627 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
9628
9629         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
9630
9631         * *-ia64.*: Ongoing IA64 work.
9632
9633 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
9634
9635         * basic-long.cs: Add tests for add/sub.ovf.
9636
9637         * basic.cs: Add tests for sub.ovf.
9638
9639         * *-ia64.*: Ongoing IA64 work.
9640
9641 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
9642
9643         * *-ia64.*: Ongoing IA64 work.
9644
9645         * basic.cs: Add conv.ovf.i4.un test.
9646
9647 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
9648
9649         * mini.c: (remove_block_if_useless) Fixed bug 75061.
9650         
9651 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9652
9653         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
9654
9655 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
9656
9657         * *-ia64.*: Ongoing IA64 work.
9658
9659 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9660
9661         * trace.[ch]:
9662         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
9663
9664 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
9665
9666         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
9667
9668 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
9669
9670         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
9671
9672         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
9673         of a call is callable by a near call.
9674
9675 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
9676
9677         * mini-ia64.c: Ongoing IA64 work.
9678
9679 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
9680
9681         * genmdesc.c: Make the generated array non-static.
9682
9683         * inssel-long.brg: Fix LSHR_IMM rule.
9684
9685         * *-ia64.*: Ongoing IA64 work.
9686
9687         * *-ia64.*: Ongoing IA64 work.
9688
9689 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
9690
9691         * *-ia64.*: Ongoing IA64 work.
9692
9693         * *-ia64.*: Ongoing IA64 work.
9694         
9695         * mini-ia64.c: Ongoing IA64 work.
9696
9697         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
9698
9699 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
9700
9701         * objects.cs basic-calls.cs: Move some tests to objects.cs.
9702         
9703         * objects.cs basic-long.cs: Move some tests to objects.cs.
9704
9705 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
9706
9707         * *-ia64.*: Ongoing IA64 work.
9708
9709         * iltests.il: Add a new test.
9710
9711         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
9712         newobj. Fixes #75042.
9713
9714 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
9715
9716         * *-ia64.*: Ongoing IA64 work.
9717         
9718         * *-ia64.*: Ongoing IA64 work.
9719         
9720         * *-ia64.*: Ongoing IA64 work.
9721
9722         * basic.cs objects.cs: Move tests accessing static variables as well.
9723
9724         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
9725
9726 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
9727
9728         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
9729
9730         * driver.c: Always print failed tests.
9731
9732         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
9733         frame pointer.
9734
9735         * *ia64*: Ongoing IA64 work.
9736
9737 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
9738
9739         * basic.cs: Add tests for add.ovf. Fix warnings.
9740
9741 2005-05-18  Miguel de Icaza  <miguel@novell.com>
9742
9743         * driver.c (mono_main): Avoid crash if no argument is passed to
9744         --break;  Do not use g_error, but f_printf.   And fix all other
9745         ocurrences of the same crash.
9746
9747 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
9748
9749         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
9750         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
9751         Fixes #74742.
9752
9753 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
9754
9755         * *-ia64.*: Add beginnings of IA64 backend.
9756
9757         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
9758
9759 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
9760
9761         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
9762         Fixes #74925.
9763
9764         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
9765
9766         * mini-amd64.c: Fix a warning.
9767
9768 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
9769
9770         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
9771         in float_neg. Fixes #74897.
9772
9773         * mini-amd64.c (emit_call): Fix another near call bug.
9774
9775 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
9776
9777         * declsec.c: Keep the appdomain information in the structure. Added a 
9778         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
9779         value gets overwritten).
9780         * declsec.h: Set the default MonoArray for the the stack to 6. Added
9781         an MonoAppDomain member to MonoSecurityFrame.
9782         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
9783         used in the stack walk. Now use a MonoArray which grow (double) when
9784         it gets full.
9785
9786 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
9787
9788         * mini.c: Re-enabled runtime cleanup, since running threads should
9789         now properly stop when exiting.
9790
9791 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
9792
9793         * mini-codegen.c: New file contaning the arch-independent local
9794         register allocator. Not used by any architectures yet.
9795
9796         * mini.h linear-scan.c: Merge some changes from the 
9797         mini-xp-local-regalloc branch.
9798
9799 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
9800
9801         * mini-amd64.c (emit_call): Fix calls to native functions when the
9802         runtime is compiled as a shared library. Fixes #74756.
9803
9804         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
9805         on a literal field. Fixes #74751.
9806
9807 2005-04-25  Raja R Harinath  <rharinath@novell.com>
9808
9809         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
9810
9811 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
9812
9813         * objects.cs: Add missing null casting test.
9814
9815 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
9816
9817         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
9818         in wrapper methods. Also rename 'address' variable to 'offset'.
9819
9820 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
9821
9822         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
9823         warnings.
9824         
9825         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
9826
9827         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
9828         work on windows.
9829
9830 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
9831
9832         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
9833
9834 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
9835
9836         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
9837         just the last bytes.
9838
9839 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
9840
9841         * aot.c (mono_compile_assembly): Fix warning.
9842
9843         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
9844         by the _MSC_VER stuff.
9845
9846 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
9847
9848         * inssel-long.brg: Fix #74588.
9849
9850         * cpu-amd64.md: Fix #74591.
9851
9852         * iltests.il: Add new regression tests.
9853
9854 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
9855
9856         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
9857         valuetype.
9858
9859 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
9860
9861         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
9862
9863         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
9864         from Bill Middleton <flashdict@gmail.com>.
9865
9866 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
9867
9868         * arrays.cs: Add new regression test. Fix warnings.
9869
9870 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
9871
9872         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
9873         and leakage in CKFINITE.
9874
9875         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
9876         this to a null op since it is called on amd64 too.
9877
9878         * exceptions-amd64.c (get_throw_trampoline): Align stack.
9879
9880         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
9881         body since this is not used on amd64.
9882         
9883         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
9884
9885         * mini-amd64.c: Remove obsolete fixmes.
9886
9887         * mini.c (print_method_from_ip): Fix debugging support.
9888
9889 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
9890
9891         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
9892         so that expressions that don't give much gain are not reduced.
9893         * ssapre.h: Likewise.
9894
9895 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
9896
9897         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
9898
9899         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
9900
9901         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
9902
9903 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
9904
9905         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
9906
9907         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
9908
9909 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
9910
9911         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
9912         stack touching.
9913
9914         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
9915
9916         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
9917
9918         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
9919
9920         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
9921         MONO_ARCH_USE_SIGACTION. Fixes #74252.
9922
9923         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
9924
9925         * mini-x86.c: Fix up stack overflow handling.   
9926
9927         * exceptions.cs: Add new regression test.
9928
9929 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
9930
9931         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
9932         mono_jit_thread_attach.
9933
9934         * mini.c (mono_method_to_ir): Verify called method is not abstract.
9935
9936 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
9937
9938         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
9939         avoid calling constructors using callvirt.
9940
9941         * inssel.brg: Fix #74073.
9942
9943 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
9944
9945         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
9946         compilation with non-GCC compilers.
9947         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
9948         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
9949
9950 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
9951
9952         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
9953         klass->interface_offsets (will likely fix bug#74073).
9954
9955 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
9956
9957         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
9958
9959 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
9960
9961         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
9962         to amd64_div_reg_size ().
9963         
9964         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
9965
9966 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
9967
9968         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
9969
9970 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
9971
9972         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
9973
9974 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
9975
9976         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
9977         
9978         * mini.c (mono_precompile_assembly): Load and precompile referenced
9979         assemblies as well. Fixes #74015.
9980
9981 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
9982
9983         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
9984
9985 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
9986
9987         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
9988         a lot of checks and (anyway) permissions cannot work until corlib is 
9989         loaded.
9990
9991 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
9992
9993         * mini-ppc.c: fixed ABI issue on sysv/ppc.
9994
9995 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
9996
9997         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
9998         calls (fixes bug#72824).
9999
10000 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
10001
10002         * mini.c: fix tail recursion elimination (see test in bug#73936).
10003
10004 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
10005
10006         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
10007         some fp functions in sse2 mode.
10008
10009 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
10010
10011         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
10012
10013 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
10014
10015         * mini.h mini.c: Add mono_get_jit_tls_key ().
10016
10017         * mini-x86.c: Enable fast TLS support on windows.
10018
10019 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
10020
10021         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
10022         * mini.c: Check for p/invoke method when generating code. If a
10023         p/invoke method, or it's class, isn't decorated with [Suppress
10024         UnmanagedCodeSecurity] then generate code to call System.Security.
10025         UnmanagedDemand (only if the security manager is active).
10026
10027 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
10028
10029         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
10030         last change as it seems to cause strange crashes.
10031         
10032 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10033
10034         * *.c: handle unsafe function pointers where needed.
10035
10036 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
10037
10038         * mini.c (mono_jit_free_method): Remove the fixme too.
10039
10040 2005-03-15  Miguel de Icaza  <miguel@novell.com>
10041
10042         * mini.c: As discussed, make the code actually free the delegate
10043         thunk now, to enable the debugging of delegate problems, use
10044         MONO_DEBUG=1 when running Mono. 
10045
10046         This takes also care of parts of the leaks as seen by Joe.
10047
10048 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
10049
10050         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
10051         thread_tls_offset calculation.
10052
10053 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
10054
10055         * declsec.c: Reworked linkdemand checks for icall. The previous code
10056         was using the declaration code (untrusted) and didn't work as expected
10057         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
10058         specific case.
10059
10060 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
10061
10062         * iltests.il: Add new localloc test.
10063
10064         * mini-amd64.c: Handle large stack allocations the same way as on
10065         windows if stack overflow handling is working.
10066         
10067         * mini-amd64.c: Allocate the signal stack using mmap.
10068
10069         * mini.c (sigsegv_signal_handler): Fix reading of context.
10070
10071         * mini-exceptions.c: Fix up stack overflow handling.
10072
10073         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
10074
10075         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
10076
10077         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
10078
10079         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
10080
10081         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
10082         tramp_init functions as they are no longer needed.
10083
10084 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
10085
10086         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
10087         
10088         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
10089
10090         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
10091         
10092         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
10093         support that now.
10094
10095         * mini-ops.h: Add OP_LMUL_IMM.
10096
10097         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
10098         long mul/div opcodes as intrinsic.
10099
10100         * mini-amd64.c (emit_call): Handle the case when the callee might be
10101         an AOT method.
10102
10103 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
10104
10105         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
10106         extra safe.
10107         
10108         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
10109
10110         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
10111
10112 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
10113
10114         * mini.c (mono_codegen): Don't leak here, to help people running
10115         monogrind.
10116
10117 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
10118
10119         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
10120         conversions in sse2 mode.
10121
10122         * basic-float.cs: Add regression test.
10123         
10124         * mini-amd64.c: Reenable sse2.
10125
10126 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
10127
10128         * mini-amd64.c: Disable sse2 until some regressions are fixed.
10129
10130 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
10131
10132         * driver.c: Copyright text should include 2005.
10133         
10134 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
10135
10136         * cpu-amd64.md (load_membase): Fix more max lengths.
10137
10138 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
10139
10140         * cpu-amd64.md (load_membase): Fix max length.
10141
10142         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
10143
10144         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
10145
10146         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
10147         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
10148
10149         * basic-float.cs: Add rounding regression test.
10150
10151         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
10152
10153 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
10154
10155         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
10156         structures in registers for pinvoke wrappers.
10157
10158 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
10159
10160         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
10161
10162 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
10163
10164         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
10165         wrapper to mono_jit_thread_attach.
10166
10167         * mini.c (mini_jit_thread_attach): New jit icall.
10168
10169         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
10170         native->managed wrappers.
10171
10172         * exceptions.cs: Add new regression test.
10173
10174         * mini.c (optimize_branches): Check regions in the cbranch to throw
10175         block case as well. Fixes #73242.
10176
10177 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
10178
10179         * mini.c: thread safety fixes.
10180
10181 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
10182
10183         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
10184         patching stuff, since delegates use jump trampolines so there is
10185         no caller.
10186
10187         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
10188         jump trampolines.
10189         
10190         * tramp-amd64.c: Fix build.
10191
10192         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
10193         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
10194
10195         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
10196         Rename this to mono_arch....
10197         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
10198
10199         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
10200
10201         * mini-amd64.c (emit_call): If both the caller and the callee is
10202         guaranteed to have 32 bit addresses, emit a normal call.
10203
10204         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
10205
10206         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
10207         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
10208         method_ptr inside delegates.
10209
10210 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
10211
10212         * mini.c (mono_jit_free_method): Free the method info even if the native code is
10213         invalidated. Fixes #73001.
10214
10215         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
10216
10217         * mini-x86.c: Only use stdcall for pinvokes on windows.
10218
10219 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
10220
10221         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
10222         * mini-x86.c: remove unreliable __thread var offset detection,
10223         use the correct accessors and enable by default.
10224
10225 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
10226
10227         * mini.c (mono_jit_free_method): Fix memory leak.
10228
10229 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
10230
10231         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
10232
10233 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
10234
10235         * cpu-amd64.md: Fix lengths of atomic opcodes.
10236
10237 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
10238
10239         * driver.c: try to not imply using ICU is any good.
10240
10241 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
10242
10243         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
10244         functions as inline ops.
10245
10246         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
10247         some Interlocked functions as inline ops.
10248
10249         * mini.c (move_basic_block_to_end): Fix bug in last patch.
10250
10251         * mini.h (MonoBasicBlock): Reorganize fields a bit.
10252
10253         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
10254
10255         * mini.c: Add support for OP_NOT_TAKEN.
10256
10257         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
10258         structures in registers for pinvoke wrappers.
10259
10260         * mini-amd64.c: Fix warnings.
10261
10262 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
10263
10264         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
10265
10266         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
10267
10268         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
10269         address instead of loading the address from it.
10270
10271         * mini-x86.c: Add support for returning small structs in registers
10272         on Win32. Fixes part of #70864.
10273         
10274 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
10275
10276         * trace.c (get_token): Improve error checking.
10277
10278 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
10279
10280         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
10281
10282 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
10283  
10284         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
10285         it can be reused for MonoClass.
10286         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
10287         _LINKDEMAND.
10288
10289 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
10290
10291         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
10292         instead of a MonoReflectionMethod. The method information wasn't used
10293         when displaying SecurityException details (but will be now).
10294
10295 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
10296
10297         * Makefile.am : windows build fix.
10298
10299 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
10300
10301         * iltests.il: Add new regression test.
10302
10303         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
10304         #72522.
10305
10306 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
10307  
10308         * mini.c: Moved linkdemand check into helper function check_linkdemand
10309         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
10310         LDFTN, LDVIRTFTN).
10311
10312 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
10313
10314         * declsec.c: Added statistics counter for different kinds of 
10315         LinkDemands.
10316         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
10317         (and commented) declaration.
10318         * mini.c: Added statistics counter for security Demand code 
10319         generation. Added display of security statistics.
10320
10321 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
10322
10323         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
10324         Fix compilation errors under gcc-2.95.
10325
10326 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
10327
10328         * mini.c, driver.c: Use the new jit trampoline hashtable
10329
10330 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10331
10332         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
10333
10334 2005-02-11  Martin Baulig  <martin@ximian.com>
10335
10336         * debug-mini.c (mono_debug_close_method): Free the line number array.
10337
10338 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
10339
10340         * aot.c: Break up large methods into smaller ones. Share GOT slots for
10341         icalls.
10342
10343         * mini.h: Bump AOT file format version. 
10344
10345 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
10346
10347         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
10348         APTC and P/Invoke.
10349         * declsec.h: Added macros to get/set lazyly initialized security 
10350         informations about assemblies. Added new enum for different type of
10351         possible LinkDemand violation. Added function to check LinkDemands.
10352         * mini.h: Added a field to MonoCompile to hold any security violation
10353         detected when JITting a method (so it can be thrown later).
10354         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
10355         and CEE_CALLVIRT. Added code to throw exception at the end of
10356         mini_method_compile (note: the exception is unhandled right now).
10357
10358 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
10359
10360         * mini.c, jit-icalls.c: use the managed implementation of
10361         memset for initobj and memset, to avoid managed <-> unmanaged
10362         transitions.
10363
10364 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
10365
10366         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
10367         optimization if it would need a GOT var.
10368
10369         * basic.cs: Add tests for constant propagation and switch statements.
10370
10371         * ssa.c: Fix out-of-range constant propagation and switch statements.
10372
10373 2005-02-09    <vargaz@freemail.hu>
10374
10375         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
10376
10377 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
10378
10379         * cpu-amd64.md (load_membase): Fix max length of load_membase.
10380
10381 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10382
10383         * mini.c: update to new signature of mono_class_get_allocation_ftn().
10384
10385 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
10386
10387         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
10388         arithmetic operations.
10389
10390 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
10391
10392         * mini-ppc.c: add a workaround for broken user code that
10393         DllImports vararg functions with non-vararg signatures.
10394
10395 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
10396
10397         * mini.c (mono_jit_compile_method_inner): Add detection and a 
10398         meaningfull error message for assemblies written in Managed C++.
10399
10400         * tramp-amd64.c mini-amd64.h: Add support for 
10401         create_trampoline_from_token ().
10402
10403         * aot.c mini-x86.c abcremoval.c: Applied patch from
10404         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
10405
10406 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
10407
10408         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
10409         which takes a MonoImage/token as parameter instead of a MonoMethod.
10410
10411         * aot.c: Use the new trampoline for initializing vtables.
10412
10413         * aot.c: Add support for ldfld/stfld_remote wrappers.
10414
10415         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
10416         rules for compare <MEM>, IMM.
10417
10418         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
10419
10420         * aot.c: Handle inherited finalizers correctly.
10421
10422 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
10423
10424         * inssel.brg (stmt): Add a missing _setup_... ().
10425
10426         * aot.c: Save some parts of the class state to the AOT file and use it
10427         to recompute that state when a class is initialized.
10428
10429         * mini.c: Install AOT hooks into the runtime.
10430
10431         * mini.h: Bump AOT file format version.
10432         
10433         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
10434         Fixes #72148.
10435
10436         * iltests.il: Add new test.
10437
10438 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
10439
10440         * mini.c: fix typo.
10441
10442 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
10443
10444         * mini.c: setup the statistical profiler in the thread attach
10445         callback to cope with the new single thread code.
10446
10447 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
10448
10449         * mini-ppc.c: ensure we have enough room for the profiler
10450         calls (fixed bug#72084).
10451
10452 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
10453
10454         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
10455         it.
10456
10457 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10458
10459         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
10460
10461 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10462
10463         * ssapre.c: Fixed an issue with down safety (this allows IronPython
10464         to succesfully execute parrotbench).
10465         * ssapre.h: Likewise.
10466
10467 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10468
10469         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
10470         variable for stores to method arguments (fixes a SSAPRE issue).
10471
10472 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
10473
10474         * mini.c: handle value types in dup, fixes gen-112.cs.
10475
10476 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
10477
10478         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
10479         sequence for calls in dynamic methods to avoid thunks.
10480
10481 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
10482
10483         * mini.c: correctly remove dynamic methods from the hashtable.
10484
10485 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
10486
10487         * driver.c: Disabled SSAPRE until fix the bug that appears
10488         in IronPython's parrotbench.
10489
10490 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
10491
10492         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
10493
10494         * mini.c (mono_method_to_ir): Revert the previous change.
10495         
10496         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
10497         when AOT compiling.
10498
10499         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
10500         mono_jit_info_table_find () etc. when running under valgrind.
10501
10502         * inssel.brg: Fix warnings.
10503
10504         * mini-exceptions.c: Fix warnings.
10505
10506 2005-01-31  Martin Baulig  <martin@ximian.com>
10507
10508         * driver.c (compile_all_methods_thread_main): Don't try to compile
10509         generic methods or anything which has type parameters.
10510
10511 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
10512
10513         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
10514
10515         * TestDriver.cs: Add --verbose flags.
10516
10517         * graph.c ssa.c: Fix 64 bit warnings.
10518         
10519         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
10520         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
10521         Fix 64 bit warnings.
10522
10523         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
10524         variable not spotted by gcc.
10525         
10526         * mini-amd64.c inssel-amd64.brg: Applied patch from  
10527         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
10528         X86_COMPARE_MEMBASE opcodes.
10529
10530         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
10531
10532 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
10533
10534         * *: MonoMethod->signature might be NULL now. You *MUST* use
10535         mono_method_signature.
10536
10537 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
10538
10539         * driver.c (compile_all_methods_thread_main): Compile the methods
10540         without invoking cctors.
10541
10542 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
10543
10544         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
10545         * basic-calls.cs: test for the above.
10546
10547 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
10548
10549         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
10550         MonoJitInfo changes.
10551
10552 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
10553
10554         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
10555         eagerly if it contains dynamic methods.
10556         
10557         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
10558
10559         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
10560         trace, it is now computed by an icall from trace_ips.
10561         
10562         * mini-exceptions.c: Fix a warning.
10563
10564 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
10565
10566         * mini-exceptions.c: don't bother getting stack trace info if
10567         it's not going to be used.
10568
10569 2005-01-27  Raja R Harinath  <rharinath@novell.com>
10570
10571         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
10572         ssapre-mini-ops.h.
10573
10574 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
10575
10576         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
10577
10578         * aot.c: Avoid calling mono_method_get_header () if not needed.
10579
10580         * mini.h: Bump AOT file format version.
10581         
10582         * mini.c (mono_emit_native_call): Allocate a GOT var here.
10583
10584         * mini.c (mono_print_tree): Print more info for calls.
10585
10586 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
10587
10588         * declsec.h: Remove warning by adding missing include for marshal.h
10589
10590 2005-01-26  Martin Baulig  <martin@ximian.com>
10591
10592         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
10593         `ip' twice.
10594
10595 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
10596
10597         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
10598         flags.
10599
10600         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
10601
10602         * aot.c (mono_compile_assembly): Fix a warning.
10603
10604 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
10605
10606         * declsec.c: Look for security attributes on the original MonoMethod 
10607         (and not the wrapped one). This fix permissions on icalls.
10608
10609 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
10610
10611         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
10612
10613         * mini.c (mono_allocate_stack_slots): Add a fixme.
10614
10615         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
10616
10617 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
10618
10619         * inssel.brg: optimize casts of sealed types (more
10620         optimizations waiting for fixes in remoting).
10621
10622 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
10623
10624         * inssel.brg (stmt): Add another dummy rule.
10625
10626         * driver.c: Fix warnings.
10627
10628         * driver.c (mono_main): If running under valgrind, instruct glib to use
10629         the system allocation functions so valgrind can track the memory
10630         allocated by the g_... functions.
10631
10632         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
10633
10634         * mini-ops.h: Add OP_DUMMY_STORE opcode.
10635
10636         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
10637
10638         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
10639         variables in try regions.
10640
10641         * mini.c (mini_method_compile): Don't disable optimizations on large
10642         methods when AOT compiling.
10643
10644         * mini.c (mono_allocate_stack_slots): New arch independent method to 
10645         allocate stack slots. Not yet used.
10646
10647 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
10648
10649         * debug-mini.c (mono_debug_close_method): Plug some leaks.
10650
10651 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
10652
10653         * mini-ppc.c: make the branch info relative as the code
10654         buffer can be reallocated.
10655
10656 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
10657
10658         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
10659         * driver.c: Removed the AOT/security restriction. Now initialize the
10660         security manager (in metadata) if --security is used.
10661         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
10662         rather than the pointer to declarative security, when AOT is used.
10663
10664 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
10665
10666         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
10667         basic blocks, reduced intrinsic exception throwing code size.
10668
10669 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
10670
10671         * driver.c (mini_usage): Reorder the usage screen.
10672
10673 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
10674
10675         * mini.c (mono_resolve_patch_target): Fix warning.
10676
10677 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
10678
10679         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
10680         previous patch.
10681
10682         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
10683
10684         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
10685         breaks the amd64 build.
10686
10687         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
10688         register allocation. Fixes #71454.
10689
10690         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
10691
10692         * arrays.cs: Add new regression test.   
10693
10694 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
10695
10696         * ssapre.c: Turned usage of snprintf to GString.
10697         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
10698         (I left it on by mistake in my previous commit).
10699
10700 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
10701
10702         * mini.c, cfold.c, basic-calls.cs: preserve side effects
10703         on cond branch optimization (fixes bug# 71515).
10704
10705 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
10706
10707         * abcremoval.c: Fixed bug 71062.
10708         * abcremoval.h: Likewise.
10709
10710 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
10711
10712         * mini.c: Added a new functionality to optimize_branches, the removal
10713         of useless basic blocks, and fixed some problem in the removal of
10714         critical edges; some utility functions added for both purposes.
10715         * ssapre.c: Added complex expression support, and fixed bug 70637.
10716         * ssapre.h: Likewise.
10717         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
10718         enabled in SSAPRE.
10719         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
10720         * driver.c: Re-enabled SSAPRE.
10721
10722 2005-01-19  Martin Baulig  <martin@ximian.com>
10723
10724         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
10725         the result of mono_get_method_constrained().
10726
10727 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
10728
10729         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
10730         manager.
10731
10732 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
10733
10734         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
10735         be detected.  Fixes #59296.
10736
10737 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
10738
10739         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
10740         which can happen. Fixes #71361.
10741
10742 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
10743
10744         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
10745         manager.
10746
10747 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
10748
10749         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
10750         appdomain-unload.exe to fail.
10751         
10752         * mini.c: Fix some memory leaks.
10753
10754 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
10755
10756         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
10757         Fixed bug and sped up some codepaths.
10758
10759 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
10760
10761         * mini.c: Fix some memory leaks.
10762
10763         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
10764         conversion.
10765
10766         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
10767
10768         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
10769         #71320.
10770
10771         * iltests.il: Add regression test for #71320.
10772
10773 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
10774
10775         * mini.c (mono_codegen): Fix installation of profiler hooks.
10776
10777         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
10778
10779 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
10780
10781         * mini.h, mini.c, cfold.c: optimize access to enum
10782         readonly fields, too. Eval conditional branches if possible
10783         to perform unreachable code removal in more cases.
10784
10785 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
10786
10787         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
10788
10789         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
10790         code manager.
10791
10792         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
10793         WinXP DEP. Fixes #71244.
10794
10795 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
10796
10797         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
10798
10799 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
10800
10801         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
10802
10803 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
10804
10805         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
10806         changes.
10807
10808         * mini.h: Bump AOT version.
10809
10810         * mini.h (MonoCompile): Change exvar to a hash table.
10811
10812         * mini.c: Allocate a separate exvar for each handler block.
10813
10814         * mini.c: Get rid of the computation of filter_lengths, its not needed.
10815
10816         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
10817         ex var with the pending exception and only throw if the two are equal.
10818         Fixes #68552.
10819         
10820         * exceptions.cs: Add tests for rethrow and nested catch clauses.
10821
10822         * mini-x86.c: Fix warnings.
10823
10824         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
10825         used by all the ports now.
10826
10827         * aot.c: Add write-symbols and save-temps options.
10828
10829 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
10830
10831         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
10832
10833 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
10834
10835         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
10836         operations.
10837
10838         * tramp-s390.c: Check vtable slot belongs to the domain.
10839
10840         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
10841         as per other platforms.
10842
10843         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
10844
10845 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
10846
10847         * driver.c: we don't run the Main() code in a subthread anymore.
10848
10849 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
10850
10851         * mini.c: added experimental rtc support in the statistical
10852         profiler: if the user has the permission, more accurate statistics
10853         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
10854         The MONO_RTC value must be restricted to what the linux rtc allows:
10855         power of two from 64 to 8192 Hz.
10856
10857 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
10858
10859         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
10860
10861 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
10862
10863         * mini-ppc.c: better icache flush for smp.
10864
10865 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
10866
10867         * mini-amd64.c (emit_move_return_value): Fix memory leak.
10868
10869         * mini-x86.c (get_call_info): Add the get_call_info () code from the
10870         amd64 port, not yet used.
10871
10872 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
10873
10874         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
10875         a struct type.
10876
10877 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
10878
10879         * driver.c: Added --security option to activate the security manager.
10880         Right now this will allow code generation for declarative demands and
10881         is disabled when AOT is specified.
10882         * mini.c: Add code generation for declarative security demands.
10883         * mini.h: Add mono_use_security_manager as an extern gboolean.
10884
10885 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
10886
10887         * aot.c (mono_compile_assembly): Speed up compilation a bit by
10888         emitting more dense assembly code.
10889
10890         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
10891         exception throwing stuff.
10892
10893 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
10894
10895         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
10896         dead code.
10897
10898         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
10899         left in by mistake.
10900
10901         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
10902         fixed.
10903
10904         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
10905
10906         * tramp-*.c: Only patch vtable slots if the object is in the current
10907         domain. Fixes appdomain-unload.exe.
10908
10909         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
10910         
10911         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
10912         x86 branch.
10913
10914 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
10915
10916         * mini.c (reverse_branch_op): New helper function.
10917
10918         * mini.c (optimize_branches): Run the new optimization only on 
10919         platforms which support it. Also reverse all kinds of branches.
10920
10921         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
10922
10923         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
10924         a throw statement.
10925
10926         * mini.c (optimize_branches): Reverse not-equals branches if the false
10927         bblock is a throw. This happens a lot of time with argument checking in
10928         corlib.
10929
10930         * mini.c (mono_codegen): Add support for placing basic blocks after
10931         the function epilogue.
10932
10933         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
10934         function epilogue.
10935         
10936 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
10937
10938         * mini.c (setup_stat_profiler): Only set this up if the platform
10939         supports ITIMER_PROF.
10940
10941 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
10942
10943         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
10944         previous patch.
10945
10946         * inssel.brg: Fix a warning.
10947
10948 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
10949
10950         * mini.c: added support for statistical profiler 
10951         (run with: --profile=default:stat).
10952
10953 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
10954
10955         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
10956
10957         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
10958
10959         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
10960         related to global registers from the amd64 port.
10961
10962 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
10963
10964         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
10965
10966         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
10967         with global registers.
10968         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
10969
10970         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
10971
10972 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
10973
10974         * debug-mini.c (encode_value): Fix off-by-one.
10975
10976         * aot.c (encode_value): Likewise.
10977
10978         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
10979
10980 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
10981
10982         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
10983         AOT.
10984
10985         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
10986         
10987         * aot.c (emit_method_info): Increase size of temp buffer.
10988
10989         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
10990         the AOT case.
10991
10992 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
10993
10994         * aot.c (emit_method_info): Fix build.
10995         
10996         * aot.c: Further rework of the AOT file format to reduce the size of
10997         the method info data.
10998
10999         * mini.h: Bump AOT file format version.
11000
11001 2004-12-27  Martin Baulig  <martin@ximian.com>
11002
11003         * mini.c (mini_get_method): New static method; call
11004         mono_get_method_full() and mono_get_inflated_method().
11005         (mono_method_to_ir): Use mini_get_method() instead of
11006         mono_get_method_full(). 
11007
11008 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
11009
11010         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
11011
11012 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
11013
11014         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
11015
11016         * inssel-amd64.brg: Add some optimization rules.
11017
11018 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
11019
11020         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
11021         standard not GC'd stuff is fine.
11022
11023 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
11024
11025         * aot.c: Rework the AOT file format to get rid of most of the global
11026         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
11027
11028         * mini.h: Bump AOT file format version.
11029         
11030 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
11031
11032         * mini.h: Bump AOT file format version.
11033
11034         * aot.c (mono_aot_is_got_entry): New function to determine if an 
11035         address is inside a GOT.
11036
11037         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
11038
11039         * cpu-pentium.md: Increase the maximum size of some instructions which
11040         might involve a got access.
11041         
11042         * mini.c (get_method_from_ip): Another debug helper function.
11043
11044         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
11045         when got var accesses are created during the decompose phase.
11046
11047         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
11048
11049         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
11050         argument mini_compile_method and to MonoCompile, and use this to
11051         determine whenever a given method is compiled for AOT. This allows the
11052         other methods compiled during AOT compilation to be free of AOT stuff,
11053         so the backends does not need to add special support for them by
11054         creating a fake GOT etc.
11055
11056         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
11057         longer needed.
11058
11059 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
11060
11061         * mini.c (mono_method_to_ir): It turns out that some of the
11062         x-appdomain wrappers are lax with types, so just ignore this for
11063         all wrappers.
11064
11065         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
11066         at the vtable->klass. If it is non-shared code we can just use the
11067         vtable.
11068
11069 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
11070
11071         * mini-ppc.c: access MonoDomain from tls, too.
11072
11073 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
11074
11075         * declsec.c: Removed unused variable (and related warning ;-)
11076
11077 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
11078
11079         * iltests.il: New test for LDELEMA on an array of ref types.
11080
11081         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
11082         all ldelema's on reftypes.
11083         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
11084         it was the wrong place to put it.
11085
11086         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
11087         register to pop to make this cleaner, at the request of Paolo.
11088
11089 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
11090
11091         * mini-ops.h (OP_GETHASHCODE): New op.
11092
11093         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
11094
11095         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
11096         operation.
11097
11098         For a microbenchmark, this reduces the cost of Hashtable.get_Item
11099         by 25%.
11100         
11101         * mini-x86.c (mono_arch_output_basic_block): Rather than
11102
11103         add ebp, 4
11104
11105         Emit
11106
11107         pop edx
11108
11109         The first is 3 bytes while the second is 1. This saves 36 kb on
11110         mscorlib, quite a big saving. When bootstraping mcs, I was able to
11111         see a small boost because of icache locality.
11112
11113         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
11114
11115 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
11116
11117         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
11118         started code sharing with the generic code.
11119
11120 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
11121
11122         * mini-ppc.c, cpu-g4.md: added code for direct access to
11123         tls data slots.
11124
11125 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
11126
11127         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
11128          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
11129         to OP_TLS_GET.
11130
11131 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
11132
11133         * declsec.c|h: Added functions to cache the declarative stack modifiers
11134         in MonoJitInfo and to create a security frame from a MonoJitInfo 
11135         structure.
11136         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
11137         created. Register internal calls for System.Security.SecurityFrame::
11138         _GetSecurityFrame and _GetSecurityStack.
11139         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
11140         the definitions for the new stack walk/callback mechanism.
11141         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
11142         first security frame for LinkDemands and InheritanceDemands) and
11143         GetSecurityStack for Demands. Both use the new mono_walk_stack code
11144         from lupus.
11145         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
11146         walk initialization (lupus).
11147
11148 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
11149
11150         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
11151         idiom.
11152         (handle_loaded_temps): Do not create a temporary variable for
11153         things that we know are temps. They will never be modified.
11154         (mono_spill_call): Set MONO_INST_IS_TEMP
11155         (mono_emulate_opcode): ditto
11156         (emit_tree): ditto
11157         (mono_method_to_ir.CEE_DUP): ditto
11158
11159 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
11160
11161         * mini.c (type_to_eval_stack_type): Make this handle the void type
11162         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
11163         (emit_tree): use ip_in_bb to special case some common idioms
11164         Update all callers to pass in the IP.
11165         (mono_method_to_ir): Make CEE_CALL* do the above as well.
11166
11167         This gives us a nice 2% speedup in mcs bootstrap.
11168
11169         * mini-x86.c (peephole_pass): Peephole pass to make
11170         mov  [foo], eax
11171         push [foo]
11172
11173         into
11174
11175         mov [foo], eax
11176         push eax
11177
11178         * mini.c (ip_in_bb): new method.
11179         (mono_method_to_ir): use this method rather than doing the hash
11180         lookup ourselves.
11181
11182         * linear-scan.c (mono_linear_scan): When expiring actives, you
11183         don't need to keep around variables that expire on this
11184         instruction. This makes it so that:
11185              a = b + 1
11186         will turn into:
11187              store (ebx add (ebx, 1))
11188         which will become
11189              add ebx, 1
11190
11191 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
11192
11193         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
11194         combination to avoid doing two copies. Fix up problems with previous
11195         patch.
11196
11197         * mini.c: Fix 64 bit warnings.
11198
11199         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
11200
11201 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
11202
11203         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
11204         changes from the x86 code.
11205
11206         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
11207
11208 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
11209
11210         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
11211         throwing code to reduce its size, unify the AOT and non-aot code and 
11212         get rid of relocations in the AOT case.
11213
11214         * mini-x86.h mini.c exceptions-x86.c 
11215         (mono_arch_get_throw_corlib_exception): New arch specific function to 
11216         raise corlib exceptions which doesn't require relocations in the 
11217         caller.
11218
11219         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
11220
11221 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
11222
11223         * mini.c (mono_emit_method_call): Only allocate the got var when it is
11224         needed.
11225
11226         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
11227         in the AOT case.
11228
11229 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
11230
11231         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
11232         with add function when used from Inc/dec atomic 
11233         functions. Re-enabled optimization on x86.
11234         * mini-ops.h: renamed atomic_add functions to
11235         allow _add to match the Interlocked::Add and
11236         _add_next to match Interlocked::Inc/Dec.
11237
11238 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
11239
11240         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
11241         linking of BBs to the end BB, and enabled SSAPRE also with
11242         consprop and copyprop (which was prevented by that bug).
11243
11244 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
11245
11246         * mini-x86.c: disabling the Interlocked optimizing code. 
11247
11248 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
11249
11250         * aot.c (load_aot_module): Move reading of got_addr after the AOT
11251         file version check.
11252         
11253 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
11254
11255         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
11256         interlocked optimization due lack of support on x86, rewrote 
11257         exchange to take into account that base may be in eax.
11258         
11259         xsp works again; activated Interlocked optimizing code.
11260         
11261 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
11262
11263         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
11264
11265 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
11266
11267         * mini-ops.h: Add new opcodes.
11268
11269         * mini.h: Add new patch types. Add got_var to MonoCompile.
11270
11271         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
11272         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
11273         make it work with all kinds of patchable code.
11274
11275         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
11276         address of the GOT, and referencing entries in the GOT.
11277
11278         * mini.c: Add code to load the GOT address if needed by an opcode.
11279
11280         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
11281         independent AOT code on the x86 using an elf-style Global Offset Table.
11282
11283 2004-12-14  Raja R Harinath  <rharinath@novell.com>
11284
11285         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
11286
11287 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11288
11289         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
11290         when running xsp.
11291
11292 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
11293
11294         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
11295         of Interlocked:Increment/Decrement/Add as inline ops.
11296         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
11297
11298 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
11299
11300         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
11301         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
11302
11303 2004-12-12  Duncan Mak  <duncan@ximian.com>
11304
11305         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
11306         again. `patch_info->table_size' is no longer valid after Zoltan's
11307         commit #37636.
11308
11309 2004-12-12  Martin Baulig  <martin@ximian.com>
11310
11311         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
11312         if we are the "real" method, ie. not an inlined method inside it.
11313
11314 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
11315
11316         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
11317         before we look in the special fields table. This fixes
11318         ../tests/thread-static-init.cs.
11319
11320 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11321
11322         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
11323         for Array get_Rank and get_Length. Fixes bug #70465.
11324
11325 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
11326
11327         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
11328         separate structure to reduce the size of MonoJumpInfo.
11329
11330 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
11331
11332         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
11333
11334 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
11335
11336         * mini.c (mini_get_inst_for_method): Changed to allow ports
11337         to return a MonoInst instead of opcode 
11338         (renamed mini_get_opcode_for_method to better reflect the new functionality)
11339         
11340         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
11341         Allow ports to return a created MonoInst instead of op-code, will enable
11342         new optimizations.
11343         (renamed mini_get_opcode_for_method to better reflected the functionality)
11344
11345 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
11346
11347         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
11348
11349 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
11350
11351         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
11352         Fixes #69985.
11353
11354 2004-12-08  Martin Baulig  <martin@ximian.com>
11355
11356         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
11357         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
11358
11359 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
11360
11361         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
11362         correctly.
11363
11364         * exceptions.cs: Disable some tests which depend on properties of x86 fp
11365         arithmetic.
11366
11367 2004-12-08  Raja R Harinath  <rharinath@novell.com>
11368
11369         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
11370
11371 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
11372
11373         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
11374         bug introduced by the previous patch.
11375
11376 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
11377
11378         * mini-ppc.c, objectc.cs: handle large structs passed by value
11379         (fixes bug #69972).
11380
11381 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
11382
11383         * mini-ppc.c: OP_ARGLIST implementation from
11384         Geoff Norton  <gnorton@customerdna.com>.
11385
11386 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
11387
11388         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
11389         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
11390
11391 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
11392
11393         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
11394
11395 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11396
11397         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
11398         support.
11399
11400 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
11401
11402         * mini-sparc.c: Zero out localled-ed memory.
11403
11404         * iltests.il: Add tests for zeroing out localloc-ed memory.
11405
11406 2004-12-04  Martin Baulig  <martin@ximian.com>
11407
11408         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
11409         mono_method_get_signature_full().       
11410
11411 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
11412
11413         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
11414         and some utility functions (always for SSAPRE), integrated SSAPRE.
11415         * mini.h: Likewise.
11416         * driver.c: Added ssapre option.
11417         * ssa.c: Small fix on OP_ARG handling.
11418         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
11419         * Makefile.am: Likewise.
11420
11421 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
11422
11423         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
11424         now in the xp code.
11425
11426         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
11427         icall.
11428
11429 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11430
11431         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
11432         
11433         * cpu-s390.md : Increase instruction length of oparglist.
11434
11435         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
11436
11437 2004-11-30  Martin Baulig  <martin@ximian.com>
11438
11439         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
11440         virtual generic methods.  We call a special helper_compile_generic_method()
11441         icall to retrieve the method from the vtable, inflate and compile
11442         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
11443
11444         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
11445
11446 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
11447
11448         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
11449
11450 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
11451
11452         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
11453         Fixes #69929.
11454
11455 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
11456
11457         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
11458         platforms with PIC aot.
11459
11460 2004-11-28  Martin Baulig  <martin@ximian.com>
11461
11462         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
11463         Fixes gen-112.cs.
11464
11465 2004-11-28  Martin Baulig  <martin@ximian.com>
11466
11467         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
11468         the result of mono_type_get_underlying_type() to check whether
11469         we're byref.
11470
11471 2004-11-26  Martin Baulig  <martin@ximian.com>
11472
11473         * mini.c
11474         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
11475         in the g_assert().
11476
11477 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
11478
11479         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
11480         the same way as the other arguments so they won't get clobbered.
11481
11482         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
11483         calls through R11 since it is clobbered by the trampoline code.
11484
11485 2004-11-26  Raja R Harinath  <rharinath@novell.com>
11486
11487         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
11488         pick up in-tree mscorlib.dll.
11489
11490 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
11491
11492         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
11493
11494         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
11495         runtime data/code are now stored in a table similar to the GOT in ELF. 
11496         This allows the code itself to be position independent.
11497
11498         * aot.c: Fix loading of referenced assemblies after the lazy assembly
11499         loading changes.
11500
11501         * aot.c: Attach ELF type (object/function) directives to all global
11502         symbols.
11503
11504         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
11505
11506         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
11507
11508         * mini-amd64.h: Turn on PIC AOT code.
11509
11510         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
11511         returning the offset within an OP_AOTCONST instruction where the GOT
11512         offset needs to be added.
11513
11514         * mini.h: Bump AOT file format version.
11515
11516 2004-11-25  Martin Baulig  <martin@ximian.com>
11517
11518         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
11519         uninflated generic methods.
11520
11521 2004-11-25  Martin Baulig  <martin@ximian.com>
11522
11523         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
11524
11525 2004-11-24  Martin Baulig  <martin@ximian.com>
11526
11527         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
11528         original klass (this only applies for generic instances).
11529
11530 2004-11-24  Martin Baulig  <martin@ximian.com>
11531
11532         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
11533         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
11534         that array).
11535
11536 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
11537
11538         * mini.c (mono_method_to_ir): Disable inlining for methods containing
11539         localloc. Fixes #69678.
11540
11541         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
11542         
11543 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
11544
11545         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
11546         used SSE registers on pinvoke calls. Fixes #69774.
11547
11548 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
11549
11550         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
11551         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
11552
11553 2004-11-23  Raja R Harinath  <rharinath@novell.com>
11554
11555         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
11556         Refer directly to the mcs/ tree.
11557
11558 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11559
11560         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
11561         Check if a trampoline for a synchronized method is required. 
11562
11563 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
11564
11565         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
11566         with localloc if needed. Throe arithmetric exception in
11567         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
11568         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
11569
11570 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
11571
11572         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
11573         types before switching on type.  Fixes #69622.
11574
11575 2004-11-19  Raja R Harinath  <rharinath@novell.com>
11576
11577         * Makefile.am (check-local): New.  Integrate into 'make check'.
11578         (MCS,RUNTIME): Define using in-tree mono and mcs.
11579         (ILASM): New.
11580         (%.exe): Use $(ILASM).
11581
11582 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
11583
11584         * mini-ppc.c: adjust initial prolog size (bug #69691).
11585
11586 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
11587
11588         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
11589         #69664.
11590
11591 2004-11-17  Raja R Harinath  <rharinath@novell.com>
11592
11593         * Makefile.am (clean-local): Rename from 'clean'.
11594
11595 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11596
11597         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
11598         to mono_arch_is_int_overflow. 
11599         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
11600         SIGFPE events.
11601
11602 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
11603
11604         * declsec.c|h: New files to support declarative security attributes.
11605         Added function to check if a method has (applicable) security.
11606         * mini.c|h: Add check for declarative security attributes in
11607         mono_method_check_inlining.
11608         * Makefile.am: Added declsec.c and declsec.h to the build.
11609
11610 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
11611
11612         * mini.c, mini.h: update to keep dynamic code info per-domain.
11613
11614 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
11615
11616         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
11617         (mini_init): Get rid of it from here too.
11618
11619 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
11620
11621         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
11622         implemented OP_RETHROW (patch by Geoff Norton
11623         <gnorton@customerdna.com>).
11624
11625 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
11626
11627         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
11628         between appdomains.  Fixes appdomain-unload on PPC.
11629
11630 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
11631
11632         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
11633         mini-exceptions.c: handle the new wrapper types.
11634         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
11635         token value as a MonoClass* when compiling a wrapper.
11636         mono_jit_create_remoting_trampoline now takes an additional
11637         MonoRemotingTarget parameter.
11638         
11639 2004-11-10  Martin Baulig  <martin@localhost>
11640
11641         * mini.c (mono_method_to_ir): Use `generic_container->context'
11642         rather than creating a new one.
11643
11644 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11645
11646         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
11647
11648         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
11649
11650 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
11651
11652         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
11653         the experimental aot cache stuff.
11654
11655 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
11656
11657         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
11658         mini-exceptions.c: update to exception clause structure changes.
11659
11660 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
11661
11662         * exceptions-x86.c (throw_exception): Fix warnings.
11663
11664         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
11665         for OP_RETHROW.
11666
11667 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
11668
11669         * exceptions-sparc.c (get_throw_exception): Really fix this.
11670
11671 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
11672
11673         * tramp-*.c: we no longer support icalls without wrappers, so
11674         a bit of code can be removed here
11675
11676 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
11677
11678         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
11679         patch.
11680
11681         * cpu-sparc.md: Add op_rethrow.
11682
11683         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
11684
11685         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
11686
11687         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
11688         * mini-ops.h: Add OP_RETHROW.
11689
11690         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
11691
11692         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
11693
11694 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
11695         
11696         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
11697         Makes the output much easier to read
11698
11699 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
11700
11701         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
11702         prevents another huge leak when compiling with ssa. Secondly, the
11703         performance of doing this rather than freeing the lists is much
11704         better. GList does a lock every time you allocate a list link,
11705         so that it can use a memory pool. So, it is better to just use
11706         a memory pool of our own.
11707         
11708         * ssa.c, linear-scan.c: replace g_list_remove_link with
11709         g_list_delete.  The remove one does not free the GList, so we were
11710         leaking memory. On -O=all --compile-all with corlib, this cut down
11711         3 MB of allocations.
11712
11713 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
11714
11715         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
11716
11717         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
11718
11719         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
11720         into a new function mono_create_jit_trampoline ().
11721
11722 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
11723
11724         * trace.c (get_spec): Allow tracing of classes without a namespace.
11725
11726 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
11727
11728         * mini.c: Fix pointer overwrite in mini_method_compile.
11729
11730 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
11731
11732         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
11733         The darwin ABI needs some special handling for 1 and 2 byte structs
11734         Lets use lbz/lhz instead of lwz everywhere.
11735         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
11736         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
11737         Use stb/sth for the former, and put the latter always on stack instead of in
11738         argument registers.
11739
11740 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
11741
11742         * trace.c (is_filenamechar): Add '_'.
11743
11744 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
11745
11746         * mini-s390.c: Fix prolog length to allow for large trace requirements.
11747
11748         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
11749
11750 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
11751
11752         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
11753         depends on libmonogc. Fixes #68805.
11754
11755 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
11756
11757         * mini.c (mono_jit_free_method): Provide extra information for
11758         this error.  Currently this leaks, but will be turned into a
11759         developer option in the future.
11760
11761 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
11762
11763         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
11764
11765 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
11766
11767         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
11768         boundary. Fixes reading of PATCH_INFO_R4 and R8.
11769         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
11770
11771 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
11772
11773         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
11774         trampolines for AOT code.
11775
11776 2004-10-22    <vargaz@freemail.hu>
11777
11778         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
11779         constructed types. Fixes #68136.
11780
11781 2004-10-21  Martin Baulig  <martin@ximian.com>
11782
11783         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
11784         if it returns true, unwind the stack to the call instruction.
11785
11786 2004-10-21    <vargaz@freemail.hu>
11787
11788         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
11789
11790         * mini.h: Bump AOT version number.
11791
11792         * objects.cs: Add another test for unbox trampolines.
11793
11794         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
11795         valuetype methods.
11796
11797 2004-10-20    <vargaz@freemail.hu>
11798
11799         * driver.c: Add SHARED to the set of optimizations tested.
11800
11801         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
11802
11803         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
11804         used by CEE_NEWARR.
11805
11806         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
11807
11808 2004-10-20  Martin Baulig  <martin@ximian.com>
11809
11810         * mini-exceptions.c (mono_handle_exception): Call
11811         mono_debugger_handle_exception() to tell the debugger about
11812         catch/finally clauses.
11813
11814 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
11815
11816         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
11817
11818         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
11819         #68447.
11820
11821 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
11822
11823         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
11824         methods as their native size, fixed bug #57543, #57545.
11825         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
11826         This saves a temporary register and mullw call down into 1 (minor perf
11827         increase for cases like sum = sum * 5;  This use to translate into:
11828             li r11,5
11829             mullw r28,r28,r11
11830         It now translates to
11831             mulli r28,r28,5
11832
11833 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
11834
11835         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
11836         #68388.
11837
11838 2004-10-11  Martin Baulig  <martin@ximian.com>
11839
11840         * mini.c (mono_method_to_ir): If we're a generic method, get the
11841         MonoGenericContainer from our MonoMethodNormal and create a
11842         MonoGenericContext from it.
11843
11844 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
11845
11846         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
11847
11848         * basic-long.cs: Add test for checked i8->i2 cast.
11849
11850 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11851
11852         * inssel-ppc.brg: added a couple of speedup rules.
11853
11854 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
11855
11856         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
11857         to speed up rebuilds.
11858
11859 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11860
11861         * mini-s390.c: Minor fix to OP_OR_IMM.
11862
11863 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
11864
11865         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
11866         better. Fixes appdomain-unload.exe on sparc.
11867
11868 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
11869
11870         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
11871         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
11872         see bug 67324.
11873
11874 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
11875
11876         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
11877
11878 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
11879
11880         * mini.c: Always generate a field read/write wrapper for members
11881         of the class MarshalByRefObject since the actual instance could
11882         be a CBO.
11883
11884 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
11885
11886         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
11887
11888 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
11889
11890         * driver.c mini.h trace.c: Move the setting of the main assembly into
11891         a separate function called mono_trace_set_assembly () and call it after
11892         actually loading the main assembly. Fixes #66872.
11893
11894 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
11895
11896         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
11897         using the code manager.
11898
11899 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
11900
11901         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
11902
11903 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
11904
11905         * cpu-amd64.md: Fix bug in previous patch.
11906         
11907         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
11908         #66650.
11909
11910 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
11911
11912         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
11913         mini-exceptions.c: updates for changed stack walk interface.
11914
11915 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11916
11917         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
11918
11919 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
11920
11921         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
11922
11923 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
11924
11925         * driver.c (mini_regression_list): Do not call mono_assembly_close 
11926         since assemblies can't be unloaded.
11927         
11928 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
11929
11930         * cpu-amd64.md: Fix more instruction lengths.
11931
11932         * cpu-amd64.md: Fix lengths of some instructions.
11933
11934 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
11935
11936         * inssel.brg: Make the array ldelema check aot friendly.
11937
11938 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
11939
11940         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
11941
11942         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
11943
11944 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
11945
11946         * mini-x86.c: Fix build.
11947
11948         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
11949         mono_type_get_underlying_type () helper function to simplify code.
11950         
11951 2004-09-09  Martin Baulig  <martin@ximian.com>
11952
11953         * mini-amd64.c: Don't access `type->data.klass' directly, call
11954         mono_class_from_mono_type() instead since the type may be a
11955         generic instance.
11956
11957 2004-09-09  Martin Baulig  <martin@ximian.com>
11958
11959         * mini-amd64.c (get_call_info): Fix support for generic instances.
11960         (add_valuetype): Use mono_class_from_mono_type() to get the class
11961         since we can be a generic instance.
11962
11963 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
11964
11965         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
11966
11967 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
11968
11969         * liveness.c: reset spill costs on each scan: bug 62107
11970
11971 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
11972
11973         * exceptions-sparc.c (mono_arch_find_jit_info): remove
11974         unnecessary line that doesn't compile
11975
11976 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
11977
11978         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
11979         trampolines, make them call an error function so people can fix their
11980         code.
11981
11982 2004-09-06  Martin Baulig  <martin@ximian.com>
11983
11984         * mini.c (mono_method_to_ir): When initializing locals, handle a
11985         generic instances like a valuetype if it's a valuetype and like a
11986         class if it's a class.
11987
11988 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
11989
11990         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
11991         stack. Fixes #64674.
11992
11993         * exceptions.cs: Add test for unwinding of call arguments.
11994
11995 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
11996
11997         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
11998         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
11999         set the carry/borrow flag). The sparc and s390 implementations
12000         can now use optimized versions (and simplify the code). ppc bugfixes.
12001
12002 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
12003
12004         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
12005
12006 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
12007
12008         * inssel-amd64.brg: Remove leftover 32 bit rule.
12009
12010         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
12011
12012 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
12013
12014         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
12015         mono_arch_find_jit_info functions into a new function. Fix a memory
12016         leak.
12017
12018         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
12019         refactored code.
12020         
12021 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
12022
12023         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
12024         as well.
12025         
12026         * exceptions.cs: Add array size tests.
12027
12028         * mini.c: Allocate a separate icall wrapper for each arity of 
12029         mono_array_new_va. Fixes #59509.
12030
12031         * exceptions.cs: Add testcase for 64578.
12032
12033         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
12034
12035         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
12036         
12037 2004-09-02  Martin Baulig  <martin@ximian.com>
12038
12039         * mini.c (mono_method_to_ir): When initializing the locals, call
12040         handle_initobj() on the generic instance itself, not its
12041         underlying type.
12042
12043 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
12044
12045         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
12046         MonoJitInfo for dynamic methods.
12047
12048         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
12049
12050         * mini.c: Add support for freeing JIT data for dynamic methods.
12051         
12052 2004-09-01  Martin Baulig  <martin@ximian.com>
12053
12054         * mini-x86.c (is_regsize_var): Added support for generic
12055         instances.
12056         (mono_arch_emit_prolog): Make this compile again, use
12057         `x86_push_imm_template (code)'.
12058
12059 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
12060
12061         * mini-x86.c: make all push_imm instructions that get
12062         patched always emit the long form
12063
12064 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
12065
12066         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
12067         in a per-domain hash.
12068
12069         * mini-amd64.c (merge_argument_class_from_type): Handle generic
12070         types.
12071
12072 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
12073
12074         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
12075         work.
12076         
12077         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
12078         work.
12079
12080         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
12081         Beginnings of SSE2 support.
12082
12083         * exceptions.cs: Add more tests for checked int<->uint casts.
12084
12085 2004-08-28  Martin Baulig  <martin@ximian.com>
12086
12087         * mini-x86.c (mono_arch_instrument_epilog): Added support for
12088         generic instances.
12089
12090         * mini.c
12091         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
12092         Handle generic instances recursively.
12093
12094 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
12095
12096         * iltests.il: test for conv.u8 on a constant
12097
12098 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
12099
12100         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
12101         LCONV_x4 (shrun_32 (membase)).
12102
12103 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
12104
12105         * inssel-x86.brg: c&p rules for push/setret of long
12106
12107 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
12108
12109         * inssel-x86.brg: c&p rules for compare (base, regvar) and
12110         compare (regvar, base)
12111
12112         * inssel-x86.brg: more burg love
12113
12114         * inssel.brg: more cleanup
12115
12116         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
12117
12118 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
12119
12120         * basic-long.cs, basic-calls.cs: new tests for optimization.
12121
12122 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
12123
12124         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
12125         patch.
12126
12127 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
12128
12129         * mini-amd64.c (read_tls_offset_from_method): Add another case.
12130         
12131 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
12132
12133         * inssel.brg (mini_emit_memcpy): use 
12134         NO_UNALIGNED_ACCESS to disable memcpy optimization
12135
12136 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
12137
12138         * mini-amd64.c: Handle generic types in various places.
12139
12140         * mini.c (mono_method_to_ir): Handle generic types in init locals.
12141
12142 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
12143
12144         * mini.c (handle_box): Fix warning.
12145
12146         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
12147
12148         * mini-amd64.h: Enable the emit_state optimization.
12149
12150         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
12151
12152         * mini-amd64.c: Add some new 64 bit peephole opts.
12153
12154         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
12155
12156         * cpu-amd64.md: sreg1 of div instructions must be %rax.
12157
12158         * mini-amd64.c: Register allocator fixes.
12159
12160         * mini.c: Add an optimization to emit_state to avoid allocation of new
12161         registers on some platforms.
12162
12163 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
12164
12165         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
12166
12167         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
12168         allocation. Fixes #63085.
12169
12170         * basic-long.cs: Add new regression test.
12171
12172         * mini-amd64.c: Register allocator improvements.
12173
12174 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
12175
12176         * mini-amd64.c (read_tls_offset_from_method): Add another code
12177         sequence.
12178
12179         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
12180         instruction sequence for nullifying class init trampolines.
12181
12182         * objects.cs: Add new regalloc test.
12183
12184         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
12185
12186 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
12187
12188         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
12189         
12190         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
12191         arguments.
12192
12193         * driver.c: Fix profiling after TLS changes.
12194         
12195         * driver.c (mono_main): Set mono_stats.enabled if needed.
12196
12197         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
12198         CEE_BOX.
12199
12200 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
12201
12202         * mini-x86.c: use a 1 op rather than a 2 op tls access
12203         instruction -> faster.
12204
12205 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
12206
12207         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
12208         x86 backend.
12209
12210 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
12211
12212         * exceptions-sparc.c (throw_exception): fix typo
12213
12214 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
12215
12216         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
12217         set tree->dreg correctly with tls. Allow any
12218         register to be used.
12219
12220         * mini-x86.c (read_tls_offset_from_method): add new code
12221         generation pattern seen with GCC.
12222
12223
12224 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
12225
12226         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
12227         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12228         exceptions-sparc.c: fix some performance issues in exception
12229         handling and setting of the stack trace for exceptions that were
12230         already thrown.
12231
12232 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
12233
12234         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
12235         x86 backend.
12236         
12237         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
12238         registers.
12239
12240 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
12241
12242         This patch inlines tls access, when possible.
12243         
12244         * mini.h: new arch functions for TLS intrinsics.
12245         All platforms updated with a stub.
12246
12247         * mini.c: use the new intrinsics
12248
12249         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
12250         arch specific intrinsic for tls variables
12251
12252 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
12253
12254         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
12255         under windows.
12256
12257 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
12258
12259         * mini.c: thread local allocation
12260
12261 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
12262
12263         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
12264
12265         * Makefile.am: Link against the static version of libmonogc.
12266         
12267         * Makefile.am: Link the static versions of the convenience libraries
12268         into the mono executable.
12269
12270         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
12271
12272 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
12273
12274         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
12275         on integer overflow.
12276
12277         * mini-amd64.c: Reorganize function call code.
12278
12279         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
12280
12281 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
12282
12283         * inssel-x86.brg: use xor eax,eax.
12284         
12285         * basic.cs: new tests
12286
12287 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
12288
12289         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
12290         in exception throwing code.
12291         
12292 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
12293
12294         * inssel-x86.brg: use xor esi,esi.
12295
12296 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
12297
12298         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
12299         can trace methods compiled during mini_init () too.
12300
12301         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
12302         CEE_CONV_U4.
12303
12304 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
12305
12306         * Makefile.am: static link on x86 (r=zoltan)
12307
12308 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
12309
12310         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
12311         code since it causes some programs to fail.
12312
12313 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
12314
12315         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
12316
12317 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
12318
12319         * mini.c: ovfops_op_map - add STACK_OBJ case for
12320         CONV_I 
12321         * basic.cs: add test_0_pin_string as test
12322         case for above.
12323
12324 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
12325
12326         * Makefile.am: build C# if srcdir != builddir
12327
12328 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
12329
12330         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
12331         fall-through blocks.
12332
12333 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
12334
12335         * driver.c: enable loop by default again and include abcrem in -O=all.
12336
12337 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
12338
12339         * iltests.il: Add some localloc tests.
12340
12341         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
12342
12343         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
12344         Fixes #62574.
12345
12346         * inssel-amd64.brg: Add some optimizations.
12347
12348         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
12349         for gcc-3.4.
12350
12351         * Makefile.am: Statically link mono against libmono on AMD64.
12352         
12353         * mini-amd64.c inssel-amd64.brg: Optimizations.
12354
12355 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
12356
12357         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
12358
12359         * tramp-amd64.c: Patch calling code in trampolines.
12360
12361 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
12362
12363         * mini-amd64.c: pinvoke struct passing fixes.
12364
12365 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
12366
12367         * mini-sparc.c: redo change, make mono_arch_cpu_init call
12368         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
12369
12370 2004-08-05  Duncan Mak  <duncan@ximian.com>
12371
12372         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
12373         CEE_LDELEM_ANY.
12374
12375 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
12376
12377         * mini-amd64.c (emit_move_return_value): Move return value for normal
12378         calls too.
12379
12380 2004-08-05  Martin Baulig  <martin@ximian.com>
12381
12382         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
12383         `type->type'; just modify `type' itself when dealing with enums
12384         and generic instances.
12385         (check_call_signature): Make `simple_type' a `MonoType *'.
12386
12387 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
12388
12389         * mini.c: Use OP_PADD to add offsets to addresses.
12390
12391         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
12392
12393 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
12394
12395         * mini-sparc.c (mono_arch_emit_epilog): fix check
12396         for folding last op into restore instruction
12397
12398 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
12399
12400         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
12401         helper methods using the code manager.
12402         
12403         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
12404
12405         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
12406
12407 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12408         
12409         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
12410           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
12411
12412         * mini-s390.c: fix tail processing
12413
12414 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
12415
12416         * mini-ppc.c: mul.ovf.un exception name fix.
12417
12418 2004-08-03  Martin Baulig  <martin@ximian.com>
12419
12420         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
12421         instances; before jumping to `handle_enum', also modify `ptype'.
12422
12423 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
12424
12425         * cpu-sparc.md: fcall maximal length too small.
12426
12427 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
12428
12429         * mini-amd64.c mini.h: Add initial support for passing/returning 
12430         structures to/from pinvoked methods.
12431
12432 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
12433
12434         * mini-ppc.c: reg allocator fix.
12435
12436 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
12437
12438         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
12439
12440         * inssel.brg: Optimize memset on 64 bit machines.
12441
12442         * mini-amd64.c: Fix some vararg cases.
12443
12444 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12445
12446         * mini-s390.c: Corrected macro in emit_float_to_int
12447
12448         * s390-abi.cs: Tests to exercise the s390 ABI
12449
12450 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
12451
12452         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
12453         caller saved regs.
12454
12455         * basic.cs: Add a test for add.ovf.un.
12456
12457 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
12458
12459         * mini-sparc.c: add case for OP_IDIV_UN
12460
12461 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
12462
12463         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
12464         
12465         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
12466
12467 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
12468
12469         * basic.cs: regression tests.
12470
12471         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
12472         regressions.
12473
12474 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
12475
12476         * basic.cs: Add a new test.
12477
12478         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
12479         and AOT. Various fixes and optimizations.
12480
12481         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
12482
12483 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
12484
12485         * mini-ppc.c: make sure temp regs are not used for global reg
12486         allocation.
12487
12488 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
12489
12490         * cpu-sparc.md: conv_i8 fix for 64bits
12491
12492         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
12493
12494 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
12495         
12496         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
12497         add opcode for cmp BYTE PTR [eax], imm.
12498
12499         * inssel.brg: Make memcpy and memset takes bases.
12500
12501 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
12502
12503         * *-amd64.*: More AMD64 work.
12504         
12505 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
12506
12507         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
12508         add a compare-not-equal opcode.
12509         
12510 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
12511
12512         * mini.c: Use mono_init_from_assembly instead of mono_init.
12513         
12514 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
12515
12516         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
12517
12518         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
12519
12520         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
12521
12522         * inssel.brg: 64 bit fixes.
12523
12524         * mini.h (MonoCallInst): Add some AMD64 specific data.
12525
12526         * mini.h: Add some OP_P opcodes.
12527
12528 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
12529
12530         * basic.cs: tests for 61797 and 61740
12531
12532 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
12533
12534         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
12535         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
12536
12537 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
12538
12539         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
12540
12541         * *-amd64*.*: Ongoing AMD64 work.
12542
12543 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
12544
12545         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
12546
12547         * *-amd64*: Ongoing AMD64 work.
12548
12549         * mini-arch.h: Add AMD64 support.
12550
12551         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
12552
12553         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
12554
12555         * mini-ops.h: Add new opcodes.
12556
12557         * Makefile.am: Add AMD64 support.
12558
12559         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
12560         rules into the inssel-long*.brg files.
12561
12562         * *-amd64.*: Add beginnings of AMD64 backend.
12563
12564 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
12565
12566         * mini.c (print_dfn): commenting out the code that prints
12567         the cil. With -O=deadce, this makes -v -v crash.
12568         
12569         * cpu-pentium.md: make checkthis have a length of 2
12570
12571 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
12572
12573         * mini-sparc.h: fix implementations of __builtin
12574         functions for Sun compiler for V9.
12575
12576 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
12577
12578         * mini.c: use the new stelem.ref wrapper
12579         * exceptions.cs, arrays.cs: new stelem.ref tests
12580
12581 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
12582
12583         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
12584         new XSP should work with these changes).
12585
12586 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
12587         
12588         * inssel-{long32,x86,}.brg: trivial optimizations.
12589         
12590 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
12591
12592         * mini.c: load value when emitting box operation in
12593         constrained calls.
12594
12595 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
12596
12597         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
12598         is one byte shorter than cmp DWORD PTR [eax], 0.
12599
12600 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
12601
12602         * inssel-ppc.brg: arguments on the stack are always
12603         relative to the stack pointer (spotted by Neale Ferguson).
12604
12605 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12606
12607         * exceptions-x86.c: delay appending the method name to the trace until
12608         after mono_jit_info_table_find is called, as this gets the real
12609         MonoMethod.
12610
12611 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
12612
12613         * aot.c: register roots
12614
12615 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
12616
12617         * aot.c : I could just use PLATFORM_WIN32 flag.
12618
12619 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
12620
12621         * aot.c : Reverting the previous fix. This time it broke linux build.
12622
12623 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
12624
12625         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
12626
12627 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
12628
12629         * mini.c (handle_stack_args): Remove some more debugging code.
12630         
12631         * mini.c (handle_stack_args): Remove debug output left in by mistake.
12632
12633         * driver.c mini.h aot.c: Allow additional options to be specified with
12634         --aot and pass them to mono_compile_assembly.
12635
12636         * aot.c: Add experimental code to AOT compile all loaded assemblies
12637         on demand and save the code into a cache in the filesystem.
12638
12639         * aot.c: Add support for more wrapper methods.
12640         
12641         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
12642         58863.
12643
12644         * cpu-*.md: Remove removed opcodes.
12645
12646         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
12647         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
12648         related icalls to marshal.c.
12649
12650 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
12651
12652         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
12653
12654         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
12655
12656         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
12657
12658 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
12659         * liveness.c: If liveness is recomputated we need to reset the information
12660         for each variable. This way, if the liveness range has been narrowed
12661         by optimizations that happened after the last computation, we can return
12662         a smaller range.
12663         
12664         For example, if you have
12665         
12666         {
12667                 int i = 0;
12668                 
12669                 // Tons of code that does not affect i
12670                 
12671                 i = foo ();
12672                 ...
12673         }
12674         
12675         i = 0 is dead code and will be removed by SSA. However, when
12676         linear scan gets to the code, i will still appear to be live
12677         throughout the entire block. This prevents good register allocation.
12678
12679 2004-07-06  Martin Baulig  <martin@ximian.com>
12680
12681         * debug-mini.c (mono_debug_init_method): Allow
12682         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
12683         (mono_debug_add_icall_wrapper): New method.
12684
12685         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
12686
12687 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
12688
12689         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
12690         optimization.
12691
12692 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
12693
12694         * aot.c (mono_aot_load_method): Fix loading of debug info.
12695
12696 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
12697
12698         * aot.c: Add logging support.
12699
12700 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
12701
12702         * mini.h: Add prototype for mono_print_method_from_ip.
12703
12704         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
12705
12706         * inssel.brg: 64 bit fixes.
12707
12708         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
12709         inssel-long32.brg.
12710
12711         * Makefile.am: Add SPARC64 support.
12712
12713 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
12714
12715         * aot.c: Fix alignment problems on 32 bit platforms.
12716
12717 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
12718
12719         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
12720         SPARC64.
12721
12722         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
12723         problems.
12724
12725         * mini.h: Bump AOT file version. Some 64 bit fixes.
12726
12727 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
12728
12729         * inssel-sparc.brg: Add new rule to avoid register moves.
12730
12731         * inssel.brg: Add ldind_to_load_membase helper function.
12732
12733 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
12734
12735         * mini.c: OffsetToStringData intrinsic.
12736         
12737 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
12738
12739         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
12740
12741         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
12742         regression tests.
12743
12744         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
12745 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
12746
12747         * mini.c: reinstated mono_compile_get_interface_var()
12748         on x86, too, since the change breaks the Gtk# build there as well.
12749
12750 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12751
12752         * driver.c: remove loop from the default optimizations: it seems to
12753         interact badly with some of the other options (see bug #60613).
12754
12755 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
12756
12757         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
12758         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
12759
12760 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
12761
12762         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
12763         vararg-using methods.
12764
12765 2004-06-21  Martin Baulig  <martin@ximian.com>
12766
12767         * mini/mini-exceptions.c
12768         (mono_handle_exception): Added `gpointer original_ip' argument.
12769         After calling mono_unhandled_exception(), call
12770         mono_debugger_unhandled_exception() and if that returns true,
12771         restore the context and return.
12772
12773 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
12774
12775         * mini-ppc.c: prefer the use of relative branches so
12776         they won't need to be patched in aot code (patch from Patrick Beard).
12777
12778 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
12779
12780         * aot.c: patch from Patrick Beard to make the output assembly
12781         more correct for the MacOSX assembler. Small tweak to
12782         generate sane images on Linux/PPC, too.
12783
12784 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12785
12786         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
12787         case until bug #59509 is fixed (shows up in #60332).
12788
12789 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12790
12791         * mini.c: make sure the needed wrappers are compiled, too, with
12792         precomp.
12793
12794 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
12795
12796         * driver.c: remove NPTL reference in --version output.
12797
12798 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12799
12800         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
12801         generate valid assembly for the Mach-O assembler.
12802
12803 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
12804
12805         * driver.c: don't include abcrem in the all optimization specifier
12806         since it slows down jit compilation too much for now.
12807
12808 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
12809
12810         * mini.c: use BIGMUL only if both operands have the same signage.
12811         * iltests.il: Test for bug 60056. (errors related to signage in
12812         BIGMUL).
12813
12814         r=lupus.
12815
12816 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
12817
12818         * mini.c, aot.c: memory leak fixes.
12819
12820 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
12821
12822         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
12823
12824 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
12825
12826         * Makefile.am: remove the -static hack completely, it links in
12827         statically glib as well.
12828
12829 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
12830
12831         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
12832         * exceptions.cs: make it compile with new mcs/csc.
12833
12834 2004-06-03 Massimiliano Mantione <massi@ximian.com>
12835         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
12836         and added relevant test case.
12837
12838 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
12839
12840         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
12841         regressions in gtk-sharp.
12842
12843 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
12844
12845         * exceptions.cs: New regression tests.
12846
12847         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
12848
12849 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
12850
12851         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
12852
12853 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
12854
12855         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
12856
12857         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
12858
12859 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
12860
12861         * mini.c (mono_jit_runtime_invoke): Init class in this
12862         method instead of trusting mono_jit_compile_method to
12863         do the work (because wrappers can be in object class)
12864
12865 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
12866
12867         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
12868
12869         * basic-long.cs: New regression test.
12870
12871 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
12872
12873         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
12874         and div/rem checks.
12875
12876 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
12877
12878         * Makefile.am: fix miguel's change to build mono statically against
12879         libmono (track build dependencies).
12880
12881 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
12882
12883         * cfold.c: Some glib versions do not have G_MININT32.
12884
12885 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
12886
12887         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
12888         with precision of tan, atan, sin and cos, and implemented related
12889         regressions tests (fixes bug 54467, but one new problem appeared and
12890         is not fixed yet).
12891
12892 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
12893
12894         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
12895
12896         * exceptions.cs: Add test for constant folding && division by zero.
12897
12898         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
12899         since driver.c is in libmono too, so the optimization was useless.
12900
12901         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
12902         variable to driver.c so the compiler can emit more efficient code to
12903         access them.
12904
12905 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12906
12907         * Makefile.am: don't distribute generated inssel.[ch] files.
12908
12909 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
12910
12911         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
12912         into the default appdomain. Fixes #58707.
12913
12914         * jit-icalls.c: Remove the broken approximation for truncl, doing
12915         no conversion is better.
12916
12917         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
12918         Fixes #58863.
12919
12920 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
12921
12922         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
12923         of the mcrxr instruction which is not available on some processors
12924         even if it's documented to be. Implement add and sub overflow correctly
12925         (still not complete for long unsigned). Speed up icalls a bit.
12926
12927 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
12928
12929         * mini.c (mono_jit_compile_method_with_opt): Make sure that
12930         we run .cctor in the current domain instead of target_domain.
12931         
12932         Fixes bug #58558, .cctor not being called in -O=shared.
12933
12934 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
12935
12936         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
12937
12938 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
12939
12940         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
12941         which can be done with an imm8, do it that way.
12942         (mono_arch_output_basic_block): ditto for a jmp
12943         (mono_arch_emit_prolog): Computate maximum offset of a label.
12944
12945 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
12946
12947         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
12948         now tries to allocate prefered physical reg's for virtual
12949         regs. This reduces the number of emited spills/loads with
12950         20-30% on our core assemblies.
12951
12952 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12953
12954         * jit-icalls.c: truncl() is not needed and trunc() is
12955         the correct thing to do anyway (bug #58287).
12956
12957 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
12958
12959         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
12960         if available.
12961
12962 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
12963
12964         * driver.c: enable loop optimizations by default.
12965
12966 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
12967
12968         * mini-x86.c: fix calc of max loop size when aligning loops start.
12969
12970 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
12971
12972         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
12973         the stack.
12974
12975 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
12976
12977         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
12978         should set carry.
12979
12980         * basic-long.cs: Add tests for add/subtract of immediates with carry.
12981
12982         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
12983         
12984         * mini.c (inline_method): Allways inline some wrappers even if the cost
12985         is too large. Fixes #58785.
12986
12987         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
12988         
12989 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
12990
12991         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
12992         (crichton@gimp.org). Beginning of support for sparc/linux.
12993
12994         * mini-sparc.c: Optimize retrieval of LMF address.
12995
12996 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
12997
12998         * exceptions-ppc.c:  handle alloca in methods with clauses.
12999
13000 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
13001
13002         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
13003
13004 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
13005
13006         * mini.c: Delegate most of the abort signal work to 
13007           mono_thread_request_interruption, which also handles Stop and Suspend
13008           states.
13009
13010 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
13011
13012         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
13013         supports the save/restore lmf opcodes.
13014
13015 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
13016
13017         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
13018         by gcc-3.4 as well.
13019
13020         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
13021
13022 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
13023
13024         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
13025         methods which contain array accesses.
13026
13027         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
13028         boundaries. Fixes #58537.
13029
13030         * iltests.il: Add regression test for #58537.
13031
13032 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
13033
13034         * mini-x86.c (mono_arch_local_regalloc): Last part of
13035         fix for bug #58633 (releasing register to early).
13036
13037 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
13038
13039         * basic-long.cs: Add new regression test.
13040
13041 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
13042
13043         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
13044         register too early on the chain.
13045
13046 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
13047
13048         * mini.c (create_helper_signature): Use a helper function to reduce
13049         the code which needs to be written. Also set the calling convention of
13050         icalls on windows. Fixes #57840.
13051
13052 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
13053
13054         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
13055         exceptions-ppc.c: added helper function to get the instruction address
13056         from a signal handler context.
13057
13058 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13059
13060         * helpers.c: use g_get_tmp_dir. Invokes happyness 
13061         from gonzalo.
13062
13063 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13064
13065         * helpers.c: Add new env variable to pass args to objdump.
13066         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
13067
13068 2004-05-17  Radek Doulik  <rodo@ximian.com>
13069
13070         * Makefile.am (common_sources): added abcremoval.h so it get
13071         disted and daily mono packages on go-mono.com will build again
13072
13073 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
13074
13075         * abcremoval.c: Fixed coding style, added copyright header.
13076
13077         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
13078
13079         * mini.h: Added prototype for abc removal main function.
13080
13081         * build_relations_propagation_table.pl: Added copyright header.
13082
13083 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
13084
13085         * basic-long.cs: reg test for complex ceq_long bug.
13086
13087 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
13088
13089         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
13090         reg in long and clob case (bug #58343). Fixed/added comments.
13091
13092 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
13093
13094         * mini.c (mono_jit_runtime_invoke): Follow new convention
13095         of calling the invoke method with an function pointer.
13096
13097 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
13098
13099         * ChangeLog: Fix author of memory leak patch.
13100
13101 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
13102
13103         * Makefile.am: fix make dist as well...
13104
13105
13106 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
13107
13108         * cfold.c: Made so that conversions from pointer to int4 are no-ops
13109         on archs where pointers are 4 bytes long.
13110
13111         * Makefile.am: Added abcremoval.c source file.
13112
13113         * abcremoval.c: Added abcremoval.c.
13114
13115         * abcremoval.h: Added abcremoval.h.
13116
13117         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
13118
13119         * inssel.brg: Enabled bounds check removal.
13120
13121         * mini.c: Added support for abcrem optimization.
13122
13123         * mini.h: Added abcrem optimization label.
13124
13125         * driver.c: Added support for abcrem optimization.
13126
13127         * propagated_relations_table.def: Added propagated_relations_table.def.
13128
13129 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
13130
13131         * mini.c, cfold.c: fix style.
13132
13133 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13134
13135         * mini.c: handle issue with the low-level implementation of
13136         some long opcodes (bug #54209).
13137
13138 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
13139
13140         * basic.cs: test for my new cmov stuff.
13141
13142 2004-05-13      Patrik Torstensson
13143
13144         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
13145         opt and added peephole documentation.
13146
13147 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
13148
13149         * tramp-ppc.c: rewrote the generic trampoline code.
13150
13151 2004-05-11      Patrik Torstensson
13152
13153         * mini-x86.c: optimize long shl/shr asm code (one less branch)
13154
13155 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
13156
13157         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
13158
13159         * mini.h mini.c dominators.c: Applied patch from Derek Woo
13160         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
13161
13162         * mini.c: Add new icalls for AsAny marshalling.
13163
13164 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
13165
13166         * tramp-ppc.c, mini-ppc.c: more cleanups.
13167
13168 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13169
13170         * mini.c: no warnings.
13171
13172 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13173
13174         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
13175
13176 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
13177
13178         * mini.c: In the thread abort signal handler, if the thread is in the
13179         process of being stoped, don't throw the Abort exception, just stop the
13180         thread.
13181
13182 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
13183
13184         * tramp-ppc.c: removed old code.
13185
13186 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13187
13188         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
13189         do some simple speed optimizations on ppc.
13190
13191 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
13192
13193         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
13194         and large offsets in load/store.
13195
13196 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
13197
13198         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
13199         it causes regressions.
13200
13201 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
13202
13203         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
13204         support.
13205
13206 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13207
13208         * jit-icalls.c: remove warnings.
13209         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
13210         speedups for unsafe code.
13211
13212 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
13213
13214         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
13215
13216 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
13217
13218         * basic-calls.cs: Add new regression test.
13219
13220         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
13221         more portable.
13222
13223         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
13224
13225         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
13226         is no longer used.
13227
13228 2004-05-06      Patrik Torstensson
13229
13230         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
13231         long reg allocation in any reg (not only eax:edx) and implemented 
13232         long shl/shr ops in asm instead of helpers.
13233
13234 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
13235
13236         * mini-sparc.h: Fix warnings.
13237
13238         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
13239         stack.
13240
13241         * mini-exceptions.c (mono_handle_exception): Call the filter in a
13242         separate statement for clarity.
13243
13244         * mini-sparc.c: Update status.
13245
13246 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
13247
13248         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
13249         here.
13250
13251 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13252
13253         * inssel-ppc.brg: another small pre-release workaround:
13254         we don't do overflow detection for long_sub_un.
13255
13256 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13257
13258         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
13259         (also works around a weird ppc bug: 57957).
13260
13261 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
13262
13263         * tramp-ppc.c: trampoline fixes.
13264
13265 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
13266
13267         * mini-ppc.c: fixed typos.
13268
13269 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
13270
13271         * mini-ppc.c, exceptions-ppc.c: more code saves registers
13272         at the top of the stack. Fixed typos. Use a frame registers
13273         for all the methods with exception clauses.
13274
13275 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
13276
13277         * exceptions-ppc.c: restore fp registers.
13278
13279 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
13280
13281         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
13282         order from the stack top (moved the stack room to save the
13283         return value for trace after the param area). Fixed corruption
13284         in restoring registers on unwind.
13285
13286 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
13287
13288         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
13289
13290 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13291
13292         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
13293         and prolog/epilog for methods that use it. Allow
13294         enough param area room for varargs methods. Fix miguel's
13295         breakage in exception handling.
13296
13297 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13298
13299         * Makefile.am: run genmdesc only on current arch.
13300
13301 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13302
13303         * exceptions-x86.c:
13304         * mini-x86.h: fix the build on windows.
13305
13306 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
13307
13308         * 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.
13309
13310         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
13311
13312         * mini-exceptions.c: New file.
13313         
13314         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
13315         Move some parts of the x86 exception handling code to an 
13316         arch-independent file so it can be shared with other ports.
13317
13318 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
13319
13320         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
13321
13322 2004-04-26  David Waite  <mass@akuma.org>
13323
13324         * driver.c: remove comma from end of enumeration declaration
13325
13326 2004-04-26  Jackson Harper  <jackson@ximian.com>
13327
13328         * driver.c: parse config file before loading first assembly. This
13329         allows the user gac to be enabled/disabled. 
13330         
13331 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
13332
13333         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
13334         simpler mechanism: we do not care what is encoded initially
13335         (branch absolute or relative), we care about the code and its
13336         target.  I kept the old code for reference for now.
13337
13338         The new code tries first to determine if the jump is anywhere in
13339         the -/+32 absolute meg range, if it succeeds, it encodes using the
13340         absolute branch;  If not, it tried to find something in the
13341         relative range, if not, it uses the handle_thunk code. 
13342
13343 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
13344
13345         * exceptions-ppc.c: use the correct ip register on macosx.
13346
13347 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
13348
13349         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
13350
13351 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
13352
13353         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
13354         Raise exception on integer divide by zero by hand since the hw
13355         doesn't support it. Handle NaNs in FP compares.
13356
13357 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
13358
13359         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
13360         code reducing duplication between the platforms and enabled
13361         signal exception handling (on linux for now).
13362
13363 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
13364
13365         * exceptions-ppc.c: more macosx support.
13366
13367 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13368
13369         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
13370
13371 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
13372
13373         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
13374
13375 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
13376
13377         * iltests.il: more tests.
13378
13379 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
13380
13381         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
13382         vars as well.
13383
13384 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
13385
13386         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
13387
13388 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
13389
13390         * liveness.c: Mark variables as volatile in all basic blocks reachable
13391         from exception clauses.
13392
13393 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
13394
13395         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
13396         inlining.
13397
13398 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
13399
13400         * iltests.il, basic.cs: more tests for regalloc.
13401
13402 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13403
13404         * iltests.il: Some tests for register allocation modifications
13405         I have locally.
13406
13407 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
13408
13409         * exceptions.cs: Add regression test for bug #56782.
13410
13411         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
13412         original stack trace if an exception is rethrown. Fixes #56782. Oh,
13413         the beauty of fixing the same thing in 5 different files...
13414
13415 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
13416
13417         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
13418         methods.
13419
13420 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
13421
13422         * mini.c: Add support for STRWLPARRAY marshalling convention.
13423
13424 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
13425
13426         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
13427         to init the context to setup the regs pointer).
13428
13429 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
13430
13431         * exceptions-ppc.c: more exceptions work.
13432
13433 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13434
13435         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
13436         not allowed.
13437
13438 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
13439
13440         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
13441         can use the memory directly.
13442
13443         * cpu-pentium.md: Update documentation from a post from Zoltan. 
13444
13445         add x86_add_membase, x86_sub_membase, x86_mul_membase
13446
13447 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
13448
13449         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
13450         GENERAL_REGS they were also hardcoded for all PPC ports.
13451
13452         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
13453
13454         Remove hard-coded limit for floating point registers, use
13455         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
13456
13457         Notice that in MacOS X calling conventions you can fit a lot more
13458         floating point values in registers, so I should update the PInvoke
13459         test to excercise the passing of floating point values on the
13460         stack (currently broken).
13461         
13462 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
13463
13464         * tramp-ppc.c (create_trampoline_code): Added
13465         JUMP_TRAMPOLINE_SIZE. 
13466         (ppc_magic_trampoline): Follow the pattern from
13467         x86_magic_trampoline: if code is set to zero, return. 
13468         (create_trampoline_code): Always pass MonoMethod to the jump
13469         trampoline, before it was passing a null.
13470         (mono_arch_create_jump_trampoline): Implement the jump stub, could
13471         share the code with mono_arch_create_jit_trampoline. 
13472
13473         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
13474         implemented.
13475         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
13476         implemented.  
13477
13478         * cpu-g4.md: Added length for jmp instruction, the worst case
13479         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
13480         for save_lmf).
13481
13482 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
13483
13484         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
13485
13486 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
13487
13488         * mini.c: Only set bblock->real_offset when adding a new bblock, and
13489         before each IL instruction.
13490
13491         * mini.c (CEE_BOX): Fix warnings.
13492
13493 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13494
13495         * mini.c: removed a few unused vars and extra whitespace.
13496
13497 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
13498
13499         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
13500         checks.
13501         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
13502         index.
13503         (OP_GETCHR): use the above
13504         (CEE_LDELEMA): use the above.
13505
13506         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
13507         version of the generic impl.
13508         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
13509         (CEE_LDELEMA): use the above.
13510
13511 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
13512
13513         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
13514         Fixes #56317.
13515
13516         * iltests.il: Added new regression test for #56317.
13517
13518 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
13519
13520         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
13521         under NetBSD. Fixes #56450.
13522
13523         * liveness.c (update_gen_kill_set): Fix previous patch.
13524
13525 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13526
13527         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
13528
13529 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
13530
13531         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
13532         ldsfld and ldsflda.
13533
13534         * inssel-sparc.brg: Add more optimizations.
13535
13536         * mini-sparc.c: Replace multiply/divide with shifts if possible.
13537
13538 2004-04-01  Martin Baulig  <martin@ximian.com>
13539
13540         * mini.c (handle_box): New static function; moved the
13541         implementation of CEE_BOX here.
13542         (mono_method_to_ir): Added `constrained_call' variable.
13543         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
13544         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
13545         mono_method_get_constrained() to get the method.
13546
13547 2004-04-01  Martin Baulig  <martin@ximian.com>
13548
13549         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
13550         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
13551         (mono_method_to_ir): We don't need these macros anymore since
13552         mono_class_get_full() already takes care of it. 
13553
13554 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13555
13556         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
13557         use @function (as doesn't accept #function here) and check the return
13558         value of system and stop if fails.
13559
13560 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13561
13562         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
13563
13564 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
13565
13566         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
13567
13568         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
13569
13570         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
13571         #56223.
13572
13573         * basic-long.cs: Add test for negation of Int64.MinValue.
13574
13575 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
13576
13577         * mini-sparc.c: Update status.
13578
13579         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
13580
13581         * exceptions-sparc.c: Fix return value in filters.
13582
13583         * inssel-sparc.brg: Fix register allocation in some rules.
13584
13585 2004-03-28  Martin Baulig  <martin@ximian.com>
13586
13587         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
13588         if neccessary.  
13589
13590 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
13591
13592         * mini-x86.c (mono_arch_patch_code): Fix warnings.
13593         
13594         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
13595         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
13596         remove unused conv_u4 opcode.
13597
13598         * mini-x86.c: Remove valgrind workaround since it slows down things
13599         even when mono is not run under valgrind.
13600
13601 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
13602
13603         * mini-sparc.c: Update status.
13604
13605         * inssel-sparc.brg: Add some optimizations.
13606
13607         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
13608         future delay slot filling. Add support for varargs, tail calls and JMP.
13609
13610         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
13611         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
13612
13613         * inssel.brg: Fix register allocation in OP_ARGLIST.
13614
13615         * inssel.brg: Fix warnings.
13616
13617 2004-03-25  Martin Baulig  <martin@ximian.com>
13618
13619         * mini.c (inflate_generic_field): Removed.
13620         (mini_get_method): Removed, use mono_get_method_full(),
13621         (mini_get_class): Removed, use mono_class_get_full().
13622         (mono_method_to_ir): Pass our generic context to
13623         mono_field_from_token().        
13624
13625 2004-03-25  Martin Baulig  <martin@ximian.com>
13626
13627         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
13628         of a `MonoMethod *'.
13629         (mini_get_method): Take a `MonoGenericContext *' instead
13630         of a `MonoMethod *'.
13631         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
13632         a new local variable called `generic_context' which holds the
13633         current `MonoGenericContext *'; use it to lookup things.
13634
13635 2004-03-24  Martin Baulig  <martin@ximian.com>
13636
13637         * mini.c (mini_get_class): New static method; if we're inside a
13638         generic instance, inflate the class if neccessary.
13639         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
13640
13641 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
13642
13643         * iltests.il: New regression test for #55976.
13644
13645         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
13646         #55976.
13647
13648 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
13649
13650         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
13651         output.
13652
13653 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
13654
13655         * liveness.c: Consider SSA stores as well as loads when making vars
13656         volatile.
13657
13658         * exceptions.cs: New regression tests for register allocation.
13659         
13660 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
13661
13662         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
13663         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
13664           domain lock only to protect puntual access to data structures.
13665           Added access lock for sighash, jit_icall_hash_name, 
13666           jit_icall_hash_addr and domain->code_mp.
13667
13668 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
13669
13670         * driver.c: Print SIGSEGV handling method.
13671
13672         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
13673
13674         * mini.c (setup_jit_tls_data): Handle case when this is called
13675         multiple times for a thread.
13676
13677         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
13678         is different from fbxx_un. Fixes #54303. Also use constants instead of
13679         magic numbers in a lot of places.
13680
13681 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
13682
13683         * exceptions.cs: Fix cctor test when --regression is used.
13684
13685 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
13686
13687         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
13688         for Linux/ppc.
13689
13690 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
13691
13692         * inssel-ppc.brg: fixed register assignments for some rules.
13693
13694 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
13695
13696         * exceptions.cs: Add test for exceptions in static constructors.
13697
13698         * mini.c (mono_jit_compile_method_with_out): Move the calling of
13699         static constructors outside the domain lock. Fixes #55720.
13700
13701 2004-03-17  Martin Baulig  <martin@ximian.com>
13702
13703         * mini.c (get_generic_field_inst): Removed, this'll never happen.
13704         (inflate_generic_field): Take the `MonoMethod *' instead of the
13705         `MonoClass *' and added support for generic method.
13706         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
13707         have a `field->parent->gen_params', only inflate the field if it's
13708         an open constructed type.
13709
13710 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
13711
13712         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
13713         exception object instead of the preconstructed ones.
13714
13715 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13716
13717         * mini.c: reverted changed to sigsegv_signal_handler commited
13718         accidentally in the previous patch.
13719
13720 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13721
13722         * mini.c:
13723         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
13724         running --aot with an old assembly.
13725
13726 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
13727
13728         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
13729         point values.
13730
13731         * mini-sparc.c: Add support for v9 branches with prediction.
13732
13733 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
13734
13735         * mini.c (mini_init): #warning is GNUC only
13736
13737         * mini-sparc.h: implement __builtin_frame_address
13738         and __builtin_return_address for Sun C compiler
13739
13740 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
13741
13742         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
13743
13744 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
13745
13746         * basic-calls.cs: Add test for unaligned byref long argument passing.
13747
13748         * mini-ops.h: Add sparcv9 compare and branch instructions.
13749
13750         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
13751         v9 instructions if we have a v9 cpu.
13752
13753         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
13754         registers for global allocation.
13755
13756         * exceptions-sparc.c: Fixes.
13757         
13758 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
13759
13760         * liveness.c (mono_analyze_liveness): Optimized version.
13761
13762         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
13763
13764         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
13765         sparc work.
13766
13767         * basic-float.cs basic-calls.cs: New regression tests.
13768
13769 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
13770
13771         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
13772         sigaltstack implementation.
13773
13774         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
13775         
13776         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
13777         stuff if SIGSEGV_ON_ALTSTACK is not defined.
13778
13779 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
13780
13781         * mini.c: Fix warnings.
13782         
13783         * mini.c (mono_resolve_patch_target): New function which contains the
13784         arch independent part of the patching process.
13785
13786         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
13787         patching code to a separate function.
13788
13789 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
13790
13791         * mini.c (add_signal_handler): ifdef out on Windows
13792
13793 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
13794
13795         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
13796         cpu-sparc.md: Add exception handling support + other fixes.
13797
13798         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
13799         typed GC detection in --version.
13800
13801         * basic.cs exceptions.cs: New regression tests.
13802
13803         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
13804         the arch specific code can store data during a compilation.
13805
13806         * mini-ops.h: Add OP_SETFRET.
13807
13808         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
13809         function, register a separate icall for each arity, so the icalls can
13810         get a wrapper.
13811         
13812         * mini.c (mono_print_tree): Print negative offsets in a more readable
13813         form.
13814         
13815         * mini.c: Make signal handling work on sparc.
13816         
13817         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
13818
13819         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
13820
13821         * jit-icalls.c: Emulate truncl by aintl on solaris.
13822
13823         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
13824
13825 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
13826
13827         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
13828
13829 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
13830
13831         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
13832         a MarshalByRef type, inline a method that performs the check, taking into
13833         account that the object can be a proxy. Also implemented tow new opcodes:
13834         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
13835         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
13836         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
13837
13838 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
13839
13840         * mini-ppc.c: if a relative branch displacement is too big
13841         but it points to and area reachable with an absolute branch, 
13842         avoid the thunks.
13843
13844 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
13845
13846         * mini.c: optimize small copies in cpblk.
13847
13848 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
13849
13850         * basic-calls.cs basic-float.cs: New regression tests.
13851
13852         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
13853         negative offsets from %fp. Implement localloc. Fix local register 
13854         allocation. Fix the case when the this argument needs to be saved to
13855         the stack. Implement some missing opcodes.
13856
13857 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
13858
13859         * mini.c (mini_method_compile): Reenable global regalloc in methods
13860         with exception handlers.
13861
13862         * linear-scan.c (mono_varlist_sort): Fix warning.
13863
13864         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
13865
13866         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
13867         regalloc costs.
13868
13869         * liveness.c: Make all variables uses in exception clauses volatile, to
13870         prevent them from being allocated to registers. Fixes #42136.
13871
13872 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
13873
13874         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
13875         causes regressions.
13876
13877         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
13878         argument to mono_arch_regalloc_cost.
13879
13880         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
13881         precisely.
13882
13883 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
13884
13885         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
13886         Make the cost of allocating a variable to a register arch dependent.
13887
13888         * basic-calls.cs: Fix compilation of tests.
13889         
13890         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
13891         helper function to cut back on the number of #ifdefs needed.
13892
13893         * mini-ppc.c: Fix compilation.
13894
13895         * basic-calls.cs: New regression tests.
13896
13897         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
13898
13899         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
13900         of l0 since that is callee saved.
13901
13902         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
13903         to virtual calls.
13904
13905         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
13906         of delay instruction.
13907
13908         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
13909
13910         * mini.h (MonoCallInst): Add 'virtual' flag.
13911
13912         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
13913
13914 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
13915
13916         * *.cs: New regression tests.
13917
13918         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
13919         work.
13920
13921         * mini.c (mono_runtime_install_handlers): Fix build.
13922
13923         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
13924         'signal_stack_size' members.
13925
13926         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
13927         alternate signal stack.
13928
13929         * exceptions-x86.c: Add stack overflow handling.
13930
13931         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
13932         functions to arch independent code.
13933
13934         * mini.c (mono_print_tree): Print more detailed info for load_membase
13935         opcodes.
13936         
13937 2004-02-23  Martin Baulig  <martin@ximian.com>
13938
13939         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
13940
13941 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
13942
13943         * mini-x86.c: fixed reg allocation for div/rem.
13944
13945 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
13946
13947         * driver.c (mono_main): Report some configuratio options on --version.
13948
13949 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
13950
13951         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
13952         low in the address space. Correctly flush memory in thunks where we
13953         output native code.
13954
13955 2004-02-20  Martin Baulig  <martin@ximian.com>
13956
13957         * mini.c (mini_get_method): New static method; inflate all generic
13958         methods and methods in open generic instances.
13959         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
13960         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
13961
13962 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
13963
13964         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
13965
13966         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
13967
13968 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
13969
13970         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
13971
13972         * mini-sparc.c (flushi mono_arch_output_basic_block): make
13973         it compile using Sun's compiler.
13974
13975 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
13976
13977         * 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.
13978
13979         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
13980
13981 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
13982
13983         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
13984         code.
13985         * mini-ppc.c: handle calls outside of the allowed range with thunks
13986         allocated using the code manager.
13987         * tramp-ppc.c: use the code manager to hold generated native code.
13988         Fixed the magic trampoline to just patch vtable entries.
13989
13990 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
13991
13992         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
13993         independent file.
13994
13995 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
13996
13997         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
13998         PPC.
13999
14000         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
14001         if we have a working __thread implementation.
14002
14003         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
14004         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
14005
14006 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
14007
14008         * mini-x86.c: Fix compilation under gcc 2.
14009         
14010 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
14011
14012         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
14013         contains a call to the wrapped function.
14014
14015         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
14016         OP_<CALL>_IMM opcodes, and use them under X86.
14017         
14018         * mini.c (mono_jit_find_compiled_method): Fix warning.
14019
14020         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
14021
14022         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
14023
14024         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
14025         functionality to mini.c.
14026
14027         * mini.c (mono_create_jump_trampoline): New function to create a jump
14028         trampoline. Return a compiled method instead of a trampoline if it
14029         exists. Add a cache for jump trampolines.
14030
14031         * mini.c (mono_jit_find_compiled_method): New function to return a
14032         compiled method if it exists.
14033
14034         * mini-x86.c: Call mono_create_jump_trampoline instead of 
14035         mono_arch_create_jit_trampoline.
14036
14037         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
14038         a jump trampoline. Fixes #52092.
14039         
14040 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
14041
14042         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
14043         which is not up-to-date. Add check_corlib_version () instead.
14044
14045         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
14046         have to call it.
14047         
14048         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
14049         since newer valgrind versions do not need it.
14050
14051         * mini.c (mono_jit_compile_method_with_opt): New helper function to
14052         compile a method with a given set of optimizations.
14053
14054         * mini.c: Compile icall wrappers on-demand instead of at startup.
14055
14056         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
14057         wrapper for an icall.
14058
14059 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
14060
14061         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
14062         #54063.
14063
14064         * iltests.il: Add test for non-empty stack before switch instruction.
14065
14066 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
14067
14068         * mini.c: Add support for new stringbuilder marshalling conventions.
14069
14070         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
14071
14072 2004-02-01  Martin Baulig  <martin@ximian.com>
14073
14074         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
14075         in `ginst->mtype_argv'.
14076
14077 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
14078
14079         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
14080         facilitate grepping.
14081
14082 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
14083
14084         * mini.c: fixed buglet in initobj generic implementation for references.
14085
14086 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
14087
14088         * Makefile.am: make the version script conditional.
14089         * jit-icalls.c: handle missing truncl().
14090
14091 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
14092
14093         * exceptions.cs: Add more tests for double->int conversion.
14094
14095         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
14096         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
14097
14098 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
14099
14100         * driver.c: make --verbose --version emit an error
14101         if the loaded corlib doesn't match the runtime version.
14102
14103 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
14104
14105         * mini-ppc.h: export ppc_patch().
14106         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
14107         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
14108         on par or better than on MacOSX.
14109
14110 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
14111
14112         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
14113         mono_lookup_pinvoke_call.
14114
14115         * mini-x86.c: Under windows, the default pinvoke calling convention is
14116         stdcall. Fixes #52834.
14117
14118         * mini.c (optimize_branches): Add an upper bound to the number of
14119         iterations to prevent infinite loops on strange loops. Fixes #53003.
14120
14121 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
14122
14123         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
14124         and ISINST. Fixes #52093.
14125
14126         * objects.cs (test_0_vector_array_cast): New tests.
14127         
14128 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
14129
14130         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
14131         checking in Array.Set ().
14132
14133         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
14134         #52590.
14135
14136         * object.cs (test_0_multi_array_cast): New regression test.
14137
14138 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
14139
14140         * exceptions-ppc.c: fix build on Linux/PPC.
14141
14142 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
14143
14144         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
14145         running under valgrind.
14146         (x86_magic_trampoline): Fix build bustage.
14147
14148         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
14149         negative values as well. This is needed for the encoding of the line number
14150         info, since sometimes the line numbers are not in increasing order.
14151
14152 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
14153
14154         * cpu-pentium.md (localloc): Increase the size of the localloc 
14155         instruction since it is a loop under Win32.
14156
14157         * debug-mini.c (record_line_number): Get rid of unneccesary memory
14158         allocation.
14159
14160 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
14161
14162         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
14163         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
14164         Max Horn (max@quendi.de). Fix file names in comments.
14165
14166 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
14167
14168         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
14169         avoid stack overflow.
14170         (replace_usage): Avoid uninitialized variable warnings.
14171
14172         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
14173         and taking the address of valuetype variables.
14174
14175 2004-01-03  Patrik Torstensson
14176
14177         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
14178         for other purposes than FP later on.
14179
14180 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
14181
14182         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
14183         of tail calls.
14184
14185 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
14186
14187         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
14188
14189 2003-12-30  Patrik Torstensson <p@rxc.se>
14190
14191         * mini-x86.h: Decreased number of availiable fp regs.
14192         Solves corner cases with FP spilling.
14193
14194 2003-12-23  Patrik Torstensson <p@rxc.se>
14195
14196         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
14197         for floating point stack tracking / spilling on x86. 
14198         Fixes bug #49012.
14199         
14200         * basic-float.cs: added float mul overflow test.
14201
14202 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
14203
14204         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
14205
14206 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14207
14208         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
14209         supports for cond branches that overflow the immediate
14210         overflow offset. mcs can compile simple programs.
14211
14212 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14213
14214         * exceptions-ppc.c: exception handling support wip:
14215         finally handlers get run on exception.
14216
14217 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
14218
14219         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
14220         profiling.
14221
14222 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
14223
14224         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
14225         initial support for stack walking and unwinding.
14226
14227 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
14228
14229         * driver.c (mono_main): Make corlib-out-of-sync message more 
14230         descriptive. Also remove verify_corlib call.
14231
14232 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
14233
14234         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
14235         not overlap with other call's arguments, too.
14236
14237 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
14238
14239         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
14240         move to arch-specific code the choice of arch-specific
14241         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
14242         * mini.c: ensure emulation calls will not interleave
14243         with other calls.
14244
14245 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
14246
14247         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
14248         the magic trampoline stack frame is dropped before executing
14249         the new method.
14250
14251 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14252
14253         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
14254         and integer to fp conversions. Added support for overflowing
14255         arguments on the stack. Reserve a couple more registers as temps.
14256         Added support for aot compilation (as output still needs to be
14257         tweaked, though).
14258
14259 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14260
14261         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
14262         Don't overwrite return register in some corner cases.
14263
14264 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
14265
14266         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
14267         static constructors when AOT compiling.
14268
14269         * driver.c (mono_main): Call mono_check_corlib_version.
14270
14271 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
14272
14273         * cpu-g4.md, basic.cs: fixed div target register.
14274
14275 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
14276
14277         * mini-ppc.c, basic.cs: shl_imm fix with test.
14278
14279 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
14280
14281         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
14282         structures by value. Misc fixes.
14283         * objects.cs: more tests.
14284
14285 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
14286
14287         * mini-ppc.c: lconv.ovf.i implemented.
14288
14289 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14290
14291         * mini.c:
14292         (mini_init): don't error out if someone already called g_thread_init.
14293
14294 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
14295
14296         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
14297         to be any type per the spec. Fix abnormal memory usage when
14298         the same object is repeatedly thrown.
14299
14300 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
14301
14302         * mini.c: check for overruns in IL code.
14303
14304 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
14305
14306         * TODO: Add/remove some todo entries.
14307
14308 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
14309
14310         * driver.c (mono_main): Call mono_verify_corlib.
14311
14312 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
14313
14314         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
14315         This has been moved to mini.c
14316         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
14317         type being casted is marshalbyref it could be a proxy, so instead of
14318         emitting the type check code, emit a call to a runtime method that will
14319         perform the check by calling CanCastTo if needed.
14320
14321 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
14322
14323         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
14324         methods with large stack frames under Win32.
14325
14326 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
14327
14328         * Makefile.am: Distribute regression tests.
14329
14330         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
14331         at the end instead of inserting each variable into the sorted list.
14332
14333         * linear-scan.c (mono_varlist_sort): New helper function.
14334         
14335 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
14336
14337         * mini.c: ensure arguments and locals are within bounds.
14338
14339 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14340
14341         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
14342         related fixes.
14343
14344 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
14345
14346         * mini.c (mono_cprop_copy_values): Fix crash.
14347
14348         * aot.c: Set verbosity back to 0.
14349         
14350 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14351
14352         * regalloc.c: complete memory leak fix by Laurent Morichetti
14353         (l_m@pacbell.net).
14354
14355 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
14356
14357         * driver.c (main_thread_handler): Revert the previous patch.
14358
14359         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
14360         under valgrind.
14361
14362         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
14363         memory from the memory pool.
14364
14365         * driver.c (main_thread_handler): Turn on all optimizations when
14366         --aot is used.
14367
14368         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
14369         an array for better performance.
14370
14371         * regalloc.c (mono_regstate_assign): Fix memory leak.
14372
14373         * debug-mini.c (mono_debug_serialize_debug_info): New function to
14374         serialize the debug info.
14375
14376         * debug-mini.c (mono_debug_add_aot_method): New function to load the
14377         debug info from the serialized representation.
14378
14379         * aot.c: Save debug info into the generated file and load it when 
14380         loading a method.
14381
14382         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
14383
14384 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
14385
14386         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
14387         More FP-related fixes.
14388
14389 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
14390
14391         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
14392         and register allocation buglet. Hello world now runs.
14393
14394 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
14395
14396         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
14397         * tramp-ppc.c: fixed class init trampoline.
14398         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
14399
14400 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
14401
14402         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
14403         mini.c: more ppc changes/fixes.
14404
14405 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
14406
14407         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
14408         Also optimize the case when the arguments are the same in the caller 
14409         and in the callee.
14410
14411         * iltests.il: Add tests for tail calls with valuetype arguments.
14412
14413 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
14414
14415         * mini-ppc.c: fixes for struct return type.
14416
14417 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
14418
14419         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
14420         mono_spillvar_offset() to arch-specific code.
14421
14422 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
14423
14424         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
14425
14426 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
14427
14428         * exceptions-x86.c: Fix stack space leaks.
14429         
14430         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
14431         registers from the lmf if the method has save_lmf set.
14432
14433 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
14434
14435         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
14436         of icall wrappers into InvokeInDomain, since these are now per-domain.
14437
14438 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
14439
14440         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
14441         make some opcode emulation and intrinsic ops enabled/disabled 
14442         according to the architecture. More fixes.
14443
14444 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
14445
14446         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
14447
14448 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
14449
14450         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
14451         arch-specific handling for 'this' and struct return type to
14452         arch-specific code.
14453
14454 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14455
14456         * aot.c: prevent divide by zero error when reporting (it happened with
14457         Accessibility.dll).
14458
14459 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
14460
14461         * mini.h (inst_switch): Remove unused macro.
14462
14463 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14464
14465         * aot.c:
14466         (load_aot_module): free 'info->methods' and 'info' properly. No more
14467         "free(): invalid pointer blah" messages when you have an old aot
14468         compiled assembly.
14469
14470 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
14471
14472         * jit-icalls.c, mini.c: Added support for context static fields.
14473
14474 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
14475
14476         * mini.c (mono_method_blittable): Methods which set LastError are not 
14477         blittable either. Fixes #51108.
14478         
14479 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
14480
14481         * mini.c: flush icache.
14482         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
14483
14484 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
14485
14486         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
14487
14488 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
14489
14490         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
14491         safe on IA32.
14492
14493         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
14494         vararg calls.
14495
14496         * inssel.brg (CEE_MKREFANY): Fix AOT case.
14497
14498 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
14499
14500         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
14501         instruction when the result is discarded.
14502
14503         * iltests.il (test_0_div_regalloc): New regression test.
14504
14505         * arrays.cs: Fix compilation error.
14506
14507 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
14508
14509         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
14510         float rules to inssel-x86.brg: sane architectures with FP registers
14511         don't need to implement these rules.
14512
14513 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
14514
14515         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
14516
14517 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14518
14519         * mini.h, inssel-long32.brg: fixed endianess issues in int64
14520         implementation of 32 bit systems.
14521
14522 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
14523
14524         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
14525         (Jeroen Zwartepoorte).
14526
14527 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
14528
14529         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
14530         the caller and the callee matches.
14531         
14532         * mini.c (mono_method_to_ir): Add comment.
14533
14534         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
14535         signbit is missing on some platforms.
14536
14537 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
14538
14539         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
14540
14541         * mini.c (setup_jit_tls_data): Call the new function.
14542         
14543         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
14544
14545         * mini-x86.c: Add experimental support for fast access to the lmf
14546         structure under NPTL/Linux 2.6.x.
14547
14548 2003-11-06  Martin Baulig  <martin@ximian.com>
14549
14550         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
14551         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
14552         the debugger.
14553
14554 2003-11-02  Martin Baulig  <martin@ximian.com>
14555
14556         * mini.c (inflate_generic_field): New static method.
14557         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
14558         generic instance and the field is declared in a generic type, call
14559         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
14560
14561 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
14562
14563         * mini.h mini.c (mono_method_same_domain): New function to return
14564         whenever the caller and the callee are in the same domain.
14565
14566         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
14567
14568 2003-10-30  Martin Baulig  <martin@ximian.com>
14569
14570         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
14571         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
14572         method parameters.
14573         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
14574         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
14575
14576 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
14577
14578         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
14579         propagation.
14580
14581         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
14582         object here, so it is in the correct appdomain etc.
14583
14584 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
14585
14586         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
14587         already done.
14588         (mono_method_to_ir): Avoid freeing the type created returned from
14589         mono_type_create_from_typespec, since it is put into an internal cache
14590         by the function. Fixes pointer.exe.
14591
14592         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
14593         trampolines for icalls and pinvokes as well. Fixes #33569.
14594
14595 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
14596
14597         * mini.c: Update after appdomain changes.
14598
14599         * mini.c (mono_jit_compile_method_inner): Allways compile native
14600         method wrappers in the root domain, since there can only be one
14601         instance of them, whose address is stored in method->info.
14602
14603 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
14604
14605         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
14606         environment variable. Instead detect automatically whenever running
14607         under valgrind using the magic macro RUNNING_ON_VALGRIND from
14608         valgrind.h.
14609
14610 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
14611
14612         * trace.c, trace.h: New files that implement the new trace option
14613         parsing. 
14614
14615         * driver.c: Document new --trace options.
14616
14617         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
14618         mini-x86.c: Apply:
14619
14620         -       if (mono_jit_trace_calls)
14621         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
14622
14623         * mini.h: prototypes.
14624         
14625 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
14626
14627         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
14628
14629         * mini.c inssel.brg: Implement typedefbyref opcodes.
14630
14631         * mini.c (mono_jit_compile_method): Remove unused local variable.
14632
14633         * mini.c (mono_jit_compile_method_inner): Ditto.
14634         
14635 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
14636
14637         * tramp-x86.c (x86_class_init_trampoline): Fix build.
14638         
14639         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
14640
14641 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
14642
14643         * mini.c (mono_no_aot): Remove unused global variable.
14644
14645         * mini.c: Thread safety fixes.
14646
14647 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
14648
14649         * mini.c (mono_create_class_init_trampoline): Add a lock around
14650         class_init_hash_addr.
14651
14652         * arrays.cs (test_0_newarr_emulation): Add new regression test for
14653         #30073.
14654
14655         * mini.c: Decompose the NEWARR instruction before decomposing its
14656         arguments. Fixes #30073.
14657
14658 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
14659
14660         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
14661         convention.
14662
14663 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
14664
14665         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
14666
14667         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
14668
14669         * driver.c: Add support for compiling icall wrappers to --compile.
14670
14671 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
14672
14673         * inssel.brg: The empty value in class->interface_offsets is -1, not
14674         0. Fixes #49287.
14675
14676 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
14677
14678         * objects.cs: New test for 'is' operator on an array of interfaces.
14679
14680 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
14681
14682         * tramp-ppc.c: update trampoline code to support jumps
14683         and class initialization.
14684
14685 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
14686
14687         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
14688
14689         * inssel.brg (OP_UNBOXCAST): Fix #46027.
14690
14691         * inssel.brg (OP_UNBOX): Remove unused rule.
14692
14693         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
14694         region instead of one for each method. Fixes #47813.
14695
14696 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
14697
14698         * exceptions.cs (test_0_nested_finally): New regression test for
14699         nested exception handlers.
14700
14701         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
14702
14703         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
14704
14705         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
14706         inlining.
14707
14708         * mini.c (mono_method_check_inlining): Make the inlining limit 
14709         configurable by an environment variable.
14710         
14711         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
14712
14713         * mini.h: Bump AOT file version.
14714
14715         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
14716         token, store the image along with the token, since the token might not 
14717         refer to the same image as the method containing the relocation, 
14718         because of inlining.
14719
14720 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
14721
14722         * mini.c (mono_precompile_assemblies): New function to compile
14723         all methods in all loaded assemblies.
14724
14725         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
14726
14727         * regalloc.h regalloc.c (MonoRegState): Change the type of 
14728         iassign and fassign to int*, since they can contain large negative
14729         values if the register is spilled. Also added some comments. Fixes
14730         #45817.
14731
14732         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
14733         under Win32. Fixes #42964.
14734
14735 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
14736
14737         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
14738
14739         * aot.c: Added support for AOT compiling methods which contain calls
14740         to wrappers. Currently, only remoting-invoke-with-check wrappers are
14741         handled.
14742         
14743         * driver.c (compile_all_methods): Run the compilation in a thread
14744         managed by mono. Fixes #44023.
14745
14746         * mini.c (mono_codegen): Print full method name in verbose output.
14747
14748         * mini-x86.c (mono_arch_patch_code): Fix warning.
14749         
14750         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
14751         jumps, since the method we are jumping to might be domain-specific.
14752
14753         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
14754
14755 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
14756
14757         * inssel.brg: string chars are unsigned.
14758
14759 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
14760
14761         * TODO: New todo item.
14762
14763         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
14764         which calls mono_runtime_class_init and patches the call site to
14765         avoid further calls.
14766         (mono_arch_create_class_init_trampoline): New arch specific function 
14767         to create a class init trampoline.
14768         (create_trampoline_code): Generalized so it can create
14769         class init trampolines as well.
14770
14771         * mini.c (helper_sig_class_init_trampoline): New helper variable.
14772         (mono_create_class_init_trampoline): New function to create and cache
14773         class init trampolines.
14774         (mono_find_class_init_trampoline_by_addr): New function to lookup the
14775         vtable given the address of a class init trampoline. Used by the
14776         patching process.
14777         (mono_codegen): Generate a call to a trampoline instead of
14778         mono_runtime_class_init in LDSFLD[A].
14779         (mono_codegen): Add relocations for the new trampoline.
14780         
14781         * mini.h mini-x86.c aot.c: Added a new relocation type: 
14782         MONO_PATCH_INFO_CLASS_INIT.
14783
14784         * mini.h: Bump AOT version number.
14785
14786         * aot.c: Create a copy of the loaded code instead of using the original
14787         so methods which call each other will be close in memory, improving
14788         cache behaviour.
14789         
14790         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
14791         patch since it breaks the regression tests.
14792         
14793         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
14794         for the register saving instruction sequence since the 
14795         frame_state_for function in glibc 2.3.2 don't seem to detect it.
14796
14797 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
14798
14799         * TODO: Fix todo item && remove another.
14800
14801 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
14802
14803         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
14804         previous checkin.
14805
14806         * aot.c: Moved the check for MONO_LASTAOT into the initialization
14807         function of the module.
14808
14809         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
14810         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
14811         --no-aot command line option.
14812
14813 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
14814
14815         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
14816         by Bernie Solomon (bernard@ugsolutions.com).
14817
14818         * inssel.brg: Refactor the interface offset table related code into
14819         its separate functions and add support for the AOT case.
14820
14821 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
14822
14823         * aot.c (mono_aot_get_method_inner): Fix memory leak.
14824         
14825         * aot.c: Added mono_aot_verbose variable and made all debugging
14826         output depend on the value of this variable.
14827
14828         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
14829         method_label and info_label.
14830
14831         * mini.h mini-x86.c aot.c: Added a new relocation type 
14832         MONO_PATCH_INFO_IID for klass->interface_id.
14833
14834         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
14835         the MonoJitInfo structure.
14836
14837         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
14838         a non-root appdomain in shared mode.
14839
14840 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
14841
14842         * aot.c: make aot loader less verbose. Remove free of unused variable.
14843
14844 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
14845
14846         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
14847
14848         * .cvsignore: Added *.dll.
14849
14850         * mini.c (mono_print_tree_nl): New function callable while debugging.
14851
14852         * mini.c (mono_print_code): Export this.
14853
14854         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
14855         patched code.
14856
14857 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
14858
14859         * mini.h (MonoCompile): Added 'jit_info' field.
14860
14861         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
14862         the cfg structure, since it is needed by the AOT compiler.
14863
14864         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
14865
14866         * aot.c: A major rewrite. Changes include:
14867         - save exception tables for methods which have them.
14868         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
14869         to g_module_symbol.
14870         - reworked the file format so it is now much smaller and needs
14871         fewer relocation entries.
14872         
14873 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
14874
14875         * aot.c (load_aot_module): Fix build bustage on platforms without
14876         Boehm GC.
14877
14878 2003-09-04  Martin Baulig  <martin@ximian.com>
14879
14880         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
14881
14882 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
14883
14884         * TODO: Some new optimization ideas.
14885
14886         * aot.c: Move AOT module loading logic here from mono_assembly_open.
14887
14888         * aot.c: Save the optimization flags used to compile the code into
14889         the AOT module.
14890
14891         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
14892         support emitting domain specific code.
14893         
14894         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
14895         no longer domain neutral. It can be made domain neutral by compiling 
14896         with --optimize=shared.
14897
14898         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
14899         between appdomains.
14900
14901         * driver.c mini.h mini.c: New --no-aot debugging option which disables
14902         loading of AOT code.
14903
14904         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
14905         
14906         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
14907         if there is no domain neutrality information.
14908
14909 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
14910
14911         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
14912         format version into the generated library.
14913
14914         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
14915         callee method into the caller since one of them could be shared.
14916
14917         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
14918         system exceptions from AOT code now works.
14919
14920         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
14921         method if it is domain neutral and the callee is not.
14922
14923         * graph.c (cfg_emit_one_loop_level): Fix warning.
14924
14925 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
14926
14927         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
14928         last checkin.
14929
14930 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
14931
14932         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
14933         is needed  by code which is executed before mono_runtime_init ().
14934         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
14935         
14936         * mini.c (mono_thread_abort): Fix warning.
14937         (mono_jit_compile_method): Call static constructor in the AOT case too.
14938
14939         * aot.c (mono_compile_assembly): Fix warning.
14940
14941 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14942
14943         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
14944
14945 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
14946
14947         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
14948
14949         * cpu-pentium.md: Fix the length of call opcodes so they include the
14950         ESP restoring instruction. Fixes #47968.
14951
14952 2003-08-28  Martin Baulig  <martin@ximian.com>
14953
14954         * mini-x86.c (mono_arch_call_opcode): Added support for
14955         MONO_TYPE_GENERICINST.
14956
14957         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
14958
14959 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
14960
14961         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
14962         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
14963
14964         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
14965         metadata_section.
14966
14967 2003-08-26  Martin Baulig  <martin@ximian.com>
14968
14969         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
14970         when reporting an error, set this to the actual error location.
14971         (mono_method_to_ir): Report the correct error location if
14972         get_basic_blocks() returned an error.
14973
14974 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
14975
14976         * mini.c (mono_type_blittable): OBJECT is not blittable.
14977         (mono_method_blittable): Methods which have marshalling descriptors
14978         are not blittable either. Fixes #47842.
14979
14980 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
14981
14982         * driver.c mini.c: Use an environment variable instead of a global 
14983         variable. Also fix the build.
14984
14985         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
14986         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
14987         reporting this. 
14988
14989         * driver.c mini.c: Added --with-valgrind option to turn off some
14990         code which prevents mono from running under valgrind.
14991
14992         * mini.c (mono_emit_call_args): Fixed warning.
14993
14994         * mini.c (mono_emulate_opcode): Fixed warning.
14995
14996 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14997
14998         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
14999         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
15000         regalloc.c, regalloc.h: specify available registers in arch-specific
15001         code and support floats in the regallocator (patch by Laurent Morichetti 
15002         <l_m@pacbell.net>)
15003
15004 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
15005
15006         * mini.c: mono_thread_current() can be called only after
15007         mono_runtime_init(): rearrange code to not call it early on.
15008
15009 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15010
15011         * mini.c: allocate jump tables in the code mempools.
15012
15013 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15014
15015         * mini.c, mini.h: make sure per-thread data allocated by the jit is
15016         freed.
15017
15018 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
15019
15020         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
15021         12 to 16.  This fixes bug #47453.
15022
15023
15024 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
15025
15026         * mini-ppc.c: fixed indexed load and unsigned compares.
15027
15028 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
15029
15030         * mini.c: reenabled installation of handler for
15031           thread abort signal.
15032
15033 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15034
15035         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
15036         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
15037         until it's fixed and actually useful.
15038
15039 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15040
15041         * inssel-long32.brg: couple more opcodes implemented.
15042
15043 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
15044         
15045         * mini-sparc.c: Even more opcodes implemeted.
15046
15047 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
15048
15049         * mini-sparc.c: More opcodes implemented.
15050
15051 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
15052
15053         * mini-sparc.c: More opcodes implemented.
15054
15055 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
15056
15057         * inssel-sparc.brg: Add some needed rules.  Direct
15058         copy from PPC.
15059         * Makefile.am: Use inssel-sparc.brg
15060         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
15061         an assert happy for now.
15062
15063 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
15064
15065         * mini-sparc.c: Fixed compile errors.
15066         * exceptions-sparc.c: Same.  We now produce a mono binary 
15067         on sparc-linux.  Yea.
15068
15069 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
15070
15071         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
15072         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
15073         They compile, but do not work.
15074
15075 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15076
15077         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
15078         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
15079         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
15080         (ct@gentoo.org).
15081
15082 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15083
15084         * mini.c: more opcodes implemented and better support for generics.
15085
15086 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
15087
15088         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
15089         * mini.c, mini.h: first cut at generics support: some new instructions 
15090         added and changed the behaviour of some of the existing ones.
15091
15092 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
15093
15094         * mini.c: Removed definition of metadata_shared mutex here.
15095
15096 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
15097
15098         * mini-x86.c: make vararg calls work for instance methods.
15099
15100 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
15101
15102         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
15103         returns the arguments in a separte list, now.
15104
15105 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15106
15107         * aot.c, mini.c: updates for array type representation changes.
15108
15109 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
15110
15111         * mini.c: register function to perform jit shutdown.
15112
15113 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15114
15115         * mini.c: use a faster allocator if possible.
15116
15117 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
15118
15119         * aot.c: some cleanups and portability changes.
15120
15121 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15122
15123         * mini.c: use faster allocation for CEE_BOX if possible.
15124
15125 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
15126
15127         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
15128         Moved inlined mempcy code to its own function so that is can be
15129         reused. Added an inline memset function as well (optimized initobj).
15130         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
15131
15132 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15133
15134         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
15135
15136 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
15137
15138         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
15139         arch code can setup the cpu for CLR execution, if needed.
15140         We use it on x86 to set the precision of FP operations.
15141
15142 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
15143
15144         * mini.c: disable some optimizations if we can guess they'll cost too
15145         much for a given method.
15146
15147 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
15148
15149         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
15150         
15151 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
15152         * mini.h mini.c mini-x86.c: Added instruction level coverage 
15153         info collection support.
15154
15155 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15156
15157         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
15158         is now implemented in the profiling API. Get rid of a couple of
15159         unnecessary global variables.
15160
15161 2003-06-15  Nick Drochak <ndrochak@gol.com>
15162
15163         * basic-long.cs: tests for negative values for bigmul, and unsigned.
15164         * cpu-g4.md: add op_bigmul and op_bigmul_un
15165         * cpu_pentium.md: add op_bigmul_un
15166         * inssel-long32.brg: add rule for unsigned bigmul
15167         * mini-ops.h: define OP_BIGMUL_UN
15168         * mini-x86.c: THE BUG: handle (un)signed properly
15169         * mini.c: choose unsigned opcode if needed.
15170         This set of patches fixes bug #44291
15171
15172 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
15173
15174         * mini.c (optimize_branches): improved to handle all kinds of
15175         conditional branches.
15176
15177 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
15178
15179         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
15180         don't raise exceptions.
15181
15182 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15183
15184         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
15185         to arch-specific files.
15186
15187 2003-06-09  Martin Baulig  <martin@ximian.com>
15188
15189         * Makefile.am (libs): Added $(LIBGC_LIBS).
15190
15191 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
15192
15193         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
15194         and OP_ATAN (fixes bug#44293).
15195
15196 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
15197
15198         * Makefile.am, mini-x86.c: rename cpu description array to
15199         pentium_desc, since some compilers define the 'pentium' preprocessor
15200         symbol.
15201
15202 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
15203
15204         * mini.c (mini_select_instructions): add explicit branch if the
15205         following block is not the false target of a conditional branch -
15206         we need this with any optimization that reorder or remove bblocks
15207
15208         * mini.c (optimize_branches): bug fixes
15209
15210 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
15211
15212         * mini.c (mono_method_to_ir): inline static readonly fields
15213
15214         * ssa.c (fold_tree): start cfold support for long (very simple
15215         cases only)
15216
15217         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
15218
15219 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15220
15221         * inssel.brg: fixed memcpy (bug #44219).
15222
15223 2003-06-05  Dick Porter  <dick@ximian.com>
15224
15225         * driver.c: Set the glib log levels to not abort if g_message
15226         recurses.
15227
15228         g_set_prgname() has to happen before mini_init() so that the
15229         process handle gets the info.
15230         
15231 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15232
15233         * driver.c: add intrins to the default optimizations to get wider
15234         exposure.
15235
15236 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
15237
15238         * mini.h: some large basic blocks will overflow a 16-bit
15239         integers for symbolic registers.
15240
15241 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
15242
15243         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
15244         (mono_arch_output_basic_block): fix bug 43499 
15245
15246 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
15247
15248         * mini.c: kill duplicated definition of mono_debug_format.
15249
15250 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
15251
15252         * mini-x86.c, arrays.cs: fixed register allocation bug.
15253
15254 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
15255
15256         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
15257
15258         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
15259
15260 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15261
15262         * mini.c:
15263         (print_method_from_ip): also print source location information if
15264         available.
15265
15266 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
15267
15268         * mini.c (mono_find_block_region): bug fix in region code
15269         (mini_method_compile): enable removing unreachable code again, but
15270         only in methods without exception clauses.
15271
15272 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
15273
15274         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
15275         Implemented arglist opcode and handling of TypedReference type.
15276         Fixed x86 call convention when a structure is returned.
15277         Minimal support for calling static vararg methods.
15278
15279 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
15280
15281         * mini.c (mini_method_compile):  always remove unreachable code,
15282         because the code in them may be inconsistent  (access to dead
15283         variables for example).
15284
15285 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
15286
15287         * driver.c, debug-mini.c: warning fixes.
15288
15289 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
15290
15291         * Makefile.am, jit.h, mini.h: install header for embedding mono.
15292
15293 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
15294
15295         * mini.c: thread-static fields are registered in mono_class_vtable(),
15296         so ensure the function is called before checking for them.
15297
15298 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
15299
15300         * mini.c (optimize_branches): fix for bug 43586
15301
15302         * jit-icalls.c (mono_llmult_ovf): added an additional check for
15303         overflow (fixes Bug #43639)
15304
15305 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15306
15307         * mini.c, objects.cs: allow the use of stobj for primitive types.
15308
15309 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15310
15311         * mini.c: be less strict about argument checking until we support
15312         running the verifier.
15313
15314 2003-05-27  Nick Drochak <ndrochak@gol.com>
15315
15316         * basic-long.cs: tests for (ulong)int * (ulong)int also
15317         * mini.c: use the same trick for (ulong)int * (ulong)int
15318
15319 2003-05-27  Nick Drochak <ndrochak@gol.com>
15320
15321         * basic-long.cs: add regression test for (long)int * (long)int
15322         * cpu-pentium.md: add op_bigmul specification
15323         * inssel-long32.brg: add OP_BIGMUL rule
15324         * mini-ops.h: add OP_BIGMUL
15325         * mini-x86.c: register allocator: handle case where src1 needs to be
15326         in EAX.
15327         * mini.c: substitute special BIGMUL opcode in the tree for 
15328         (long)int * (long)int
15329
15330 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
15331
15332         * jit-icalls.c: call the type ctor on field access if needed.
15333
15334 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
15335
15336         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
15337         to a method (including results of ldelema, bug#43207).
15338
15339 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
15340
15341         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
15342         colors to show exception handler blocks.
15343
15344         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
15345         (fix for pinvoke7.cs).
15346
15347 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15348
15349         * mini.h, mini.c: ensure correct initialization order for types that
15350         require it. Prepare for lazy compilation of jit icall wrappers.
15351         Provide a name for opcode emulation to reduce unneeded mallocing.
15352
15353 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
15354
15355         * mini-x86.c: better register restoring code and profiling
15356         support for tail calls.
15357
15358 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15359
15360         * mini.h, driver.c: prepare for leaf methods optimization.
15361
15362 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
15363
15364         * mini.c: get targets of branches before converting a method.
15365
15366 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
15367
15368         * mini.c (optimize_branches): added some experimental code (disbaled) 
15369
15370 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
15371
15372         * mini.c (optimize_branches): fix branch to branch optimization 
15373
15374         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
15375
15376         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
15377
15378         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
15379
15380         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
15381         if needed.
15382
15383 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
15384
15385         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
15386         enable use of interface variables again.
15387
15388         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
15389         I1 to registers because there is no simply way to sign extend 8bit
15390         quantities in caller saved registers on x86.
15391
15392         * inssel-float.brg: set costs of some rules to 2 so
15393         that monobure always select the arch. specific ones if supplied,
15394         regardless of the order we pass the files to monoburg.
15395
15396 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
15397
15398         * mini.c, mini-x86.c: since the magic trampoline for jumps
15399         can't patch the code directly, we do it as soon as the
15400         method gets compiled.
15401
15402 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
15403
15404         * mini-x86.c, mini.h: introduce a new patching method
15405         to support CEE_JMP and tail calls.
15406         * mini.c: obey tail.call. Don't precompile methods target
15407         of CEE_JMP.
15408         * tramp-x86.c: new trampoline code to handle methods
15409         reached through a jump.
15410
15411 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
15412
15413         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
15414         bit values to registers
15415
15416 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
15417
15418         * mini.c (mono_compile_get_interface_var): share interface
15419         variables if possible.
15420
15421 2003-05-16  Martin Baulig  <martin@ximian.com>
15422
15423         * debug-mini.c (mono_init_debugger): New function to initialize
15424         the debugger.  This is not in the debugger since it needs to
15425         access some of mini's internals.
15426
15427 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
15428
15429         * mini.c (mono_method_to_ir): inlining fixes/cleanups
15430
15431 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
15432
15433         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
15434         for value type handling.
15435
15436 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
15437
15438         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
15439         (mono_method_check_inlining): enable inlining of all kinds of wrappers
15440
15441 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
15442
15443         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
15444           the constructor through a proxy.
15445
15446 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15447
15448         * jit-icalls.c, inssel.brg: fixes to array element address
15449         calculations.
15450
15451 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
15452
15453         * mini-x86.c (is_regsize_var): allocate pointer to registers
15454
15455 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15456
15457         * driver.c: fixed typo, added intrins to the set of optimizations
15458         tested with regressions.
15459
15460 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
15461
15462         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
15463         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
15464         test case.
15465
15466 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
15467
15468         * inssel.brg: remove some common pop instructions without side effects
15469
15470 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15471
15472         * inssel-x86.brg: fixed thinko in int to double conversions.
15473
15474 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
15475
15476         * mini.c, jit-icalls.c: added runtime thread-static variable support.
15477
15478 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
15479
15480         * inssel-long32.brg: two more missing instructions.
15481
15482 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
15483
15484         * mini.c (mono_emit_call_args): set the cil_code for all arguments
15485         if not already set.
15486
15487 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
15488
15489         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
15490         correctly.
15491
15492         * basic-float.cs: Added tests for negative zero.
15493
15494 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15495
15496         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
15497         a couple of missing operations for long casts, with test cases.
15498
15499 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15500
15501         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
15502
15503 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
15504
15505         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
15506         code size estimation.
15507
15508 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
15509
15510         * mini.c (mono_jit_create_remoting_trampoline): make it work with
15511         abstract methods (fix bug 42542)
15512
15513         * aot.c: add ability to handle array types
15514         
15515 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
15516
15517         * mini.c: Call the _specific versions of the object allocation
15518         functions if possible.
15519
15520 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
15521
15522         * driver.c: call setlocale ().
15523
15524 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
15525
15526         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
15527         windows build.
15528
15529 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
15530
15531         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
15532
15533         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
15534         wrappers (fix bug 42122)
15535
15536 2003-05-04  Martin Baulig  <martin@ximian.com>
15537
15538         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
15539
15540         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
15541         s/mini_set_defaults/mono_set_defaults/g.
15542
15543 2003-05-04  Martin Baulig  <martin@ximian.com>
15544
15545         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
15546
15547 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15548
15549         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
15550         (reported by Don Roberts).
15551
15552 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
15553
15554         * mini.c: temporarily work around two bugs for this release.
15555
15556 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15557
15558         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
15559         that contains -export-dynamic and it makes using the ld script
15560         useless.
15561         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
15562
15563 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
15564
15565         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
15566         specific cpu.
15567
15568 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
15569
15570         * mini.c: make sure leave calls all the needed finally blocks,
15571         even when the target jumps out of multiple exception clauses.
15572
15573 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15574
15575         * ldscript, Makefile.am: add linker script to reduce the number of
15576         exported symbols (should also fix the issues with libwine defining
15577         some of the same symbols in io-layer).
15578
15579 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
15580
15581         * driver.c (mini_main): Avoid assertion when no file name is given on 
15582         the command line.
15583
15584 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
15585
15586         * driver.c: added --version/-V command line option.
15587         Added the inline optimization in the regression tests.
15588
15589 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15590
15591         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
15592         to the type in the method signature (fixes bug#42134).
15593
15594 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
15595
15596         * mini.c: when inlining, check this is not null only when needed (bug #42135).
15597
15598 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
15599
15600         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
15601
15602 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15603
15604         * driver.c: fixed bug #42100.
15605
15606 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
15607
15608         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
15609
15610 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
15611
15612         * mini.c: moved most of the code required to do inlining to its own
15613         function so it can be reused. Inline also ctors if appropriate.
15614
15615 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
15616
15617         * Makefile.am: Link with -export-dynamic so shared libs loaded by
15618         the runtime can call mono API functions.
15619
15620 2003-04-27  Martin Baulig  <martin@ximian.com>
15621
15622         * debug-mini.c (mono_debug_init_method): Added
15623         `guint32 breakpoint_id' argument; if the method has a breakpoint,
15624         send a notification to the debugger.
15625
15626         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
15627         running in the Mono Debugger, just pass the breakpoint number to
15628         mono_debug_init_method().
15629
15630         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
15631
15632 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
15633
15634         * mini.c: allow some more unsafe compares.
15635
15636 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15637
15638         * mini-x86.c, Makefile.am: make distcheck works (partially from
15639         a patch by Richard Lee <r.h.lee@attbi.com>).
15640         * regset.c, regset.h: removed, they are unused.
15641
15642 2003-04-25  Dick Porter  <dick@ximian.com>
15643
15644         * driver.c: Usage reports the name as 'mono' not 'mini'
15645         * exceptions-x86.c: Build and run on freebsd
15646
15647 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
15648
15649         * Makefile.am: install the program with the 'mono' name and
15650         the library as libmono instead of mini and libmini.
15651
15652 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
15653
15654         * driver.c: provide the APIs for the embedding interface of the old jit.
15655
15656 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
15657
15658         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
15659
15660 2003-04-23  Martin Baulig  <martin@ximian.com>
15661
15662         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
15663
15664         * driver.c: Added `--debug' command line argument to enable
15665         debugging support.
15666
15667 2003-04-23  Martin Baulig  <martin@ximian.com>
15668
15669         * debug.[ch]: Removed.  The code is now in
15670         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
15671
15672         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
15673         last six months.
15674
15675 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
15676
15677         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
15678
15679 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15680
15681         * mini.c:
15682         (mini_cleanup): moved mono_runtime_cleanup call after the call to
15683         mono_domain_finalize.
15684         (mini_method_compile): use mono_method_profile* if the the option is
15685         enabled.
15686
15687 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
15688
15689         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
15690         methods with their wrapper.
15691
15692         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
15693         methods with their wrapper.
15694
15695         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
15696         their wrapper.
15697
15698         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
15699         wrapper.
15700
15701         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
15702         methods.
15703
15704 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
15705
15706         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
15707
15708 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
15709
15710         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
15711         of the mempool. This is slightly faster and uses less memory
15712
15713 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15714
15715         * mini.c: avoid O(n) allocation for variables.
15716
15717 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15718
15719         * mini.c: handle items on the stack after inlining methods.
15720
15721 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
15722
15723         * mini.c: make the method->opcode optimization dependent
15724         on MONO_OPT_INSTRINS and do it lazily.
15725
15726 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
15727
15728         * driver.c: print overall results at the end of regression run.
15729
15730 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
15731
15732         * inssel.brg: don't overwrite symbolic registers.
15733
15734 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
15735
15736         * inssel-x86.brg: fix conversion from long to float.
15737
15738 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
15739
15740         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
15741
15742 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
15743
15744         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
15745
15746         * driver.c: Added --print-vtable option as in the old JIT.
15747
15748 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
15749
15750         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
15751
15752 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
15753
15754         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
15755
15756 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
15757
15758         * mini.c regalloc.c regalloc.h: Fix memory leak.
15759
15760 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
15761
15762         * aot.c (mono_aot_get_method): register all used strings
15763
15764 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15765
15766         * mini.c: always intern strings references with ldstr at compile time.
15767
15768 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15769
15770         * Makefile.am: add BUILT_SOURCES.
15771
15772 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
15773
15774         * driver.c: give a better error message when the assembly to execute
15775         doesn't have an entry point.
15776
15777 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
15778
15779         * Makefile.am: added hack for automake
15780
15781         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
15782         correct sematics.
15783
15784         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
15785
15786 22003-04-07  Martin Baulig  <martin@ximian.com>
15787
15788         * Makefile.am: Added Makefile.am.
15789
15790         * debugger-main.c: Removed, this is now in the debugger where it
15791         belongs.
15792
15793         * mini.pc.in: Call this package `mini' for the moment.
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
15804
15805
15806
15807