2008-10-01 Mark Probst <mark.probst@gmail.com>
[mono.git] / mono / mini / ChangeLog
1 2008-10-01  Mark Probst  <mark.probst@gmail.com>
2
3         * method-to-ir.c: When generic sharing is active, call
4         non-interface virtual generic methods via the standard trampoline.
5
6         * mini-trampolines.c: Handle virtual generic shared methods.
7
8         * mini.h, mini-x86.c, mini-x86.h: New argument for
9         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
10         method thunks and which is the trampoline to call if the lookup
11         fails.  Enable the virtual generic method thunk for x86.
12
13         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
14         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
15         argument but assert that it's NULL, because these archs don't yet
16         implement the virtual generic method thunk.  Changes in the IMT
17         thunk data structures.
18
19 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
20
21         * aot-compiler.c (emit_globals): Avoid invalid characters in
22         the static linking symbol.
23
24         * objects.cs: Add a test for the range check optimization. Fix warnings.
25
26         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
27         optimization from the current JIT.
28
29         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
30         later in decompose_array_access_opts () to allow more optimizations.
31
32         * method-to-ir.c (mono_handle_soft_float): Rename this to 
33         mono_decompose_soft_float () for consistency.
34
35         * mini-ops.h: Fix arguments of OP_STRLEN.
36
37         * method-to-ir.c (save_cast_details): Extract the cast details saving code
38         into a separate function.
39         (reset_cast_details): Ditto.
40         (handle_unbox): Save cast details. Fixes #431254.
41
42         * method-to-ir.c: Remove some obsolete FIXMEs.
43
44 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
45
46         * ir-emit.h (alloc_dreg): Write a warning before crashing.
47
48 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
49
50         * mini-codegen.c: More work on macros to make them
51         ready for multiple regbanks.
52
53 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
54
55         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
56
57         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
58
59 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
60
61         * mini-codegen.c (mono_spillvar_offset): Proper support for
62         multiple regbanks.
63
64 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
65
66         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
67         the stack overflow changes.
68
69 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
70
71         * mini-codegen.c: Make all bank macros depend on reg_bank.
72
73         * mini-codegen.c (mono_local_regalloc): Make free mask
74         initialization regbank aware.
75
76 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
77
78         * mini-codegen.c (mono_local_regalloc): Extract callee
79         mask selection to a function and make it regbank aware.
80
81 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
82
83         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
84         code to deal with many regbanks.
85
86 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
87
88         * mini-codegen.c: More fp->regbank changes.
89
90 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
91
92         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
93         of a hardcoded constant.
94
95 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
96
97         * method-to-ir.c (type_from_stack_type): Fix typo.
98
99 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
100
101         * mini-ia64.c (emit_move_return_value): Convert float return values to
102         double.
103
104         * objects.cs: Add a new test.
105         
106         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
107         VARARG methods to fix an assert later.
108
109         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
110         end so it at least compiles.
111
112 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
113
114         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
115
116 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
117
118         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
119         optimization to a new function (emit_optimized_ldloca_ir) and enable
120         it for both ldloca and ldloca_s.
121
122 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
123
124         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
125         gshared CASTCLASS code.
126
127         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
128         amd64, where the libc stack unwinder encounters stack frames referring to
129         native code in unmapped memory.
130
131         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
132         sharing.
133
134         * generics.cs: Add new test.
135
136 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
137
138         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
139         add a check that one of the ARM_FPU_ constants is defined.
140
141         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
142         
143         * mini-exceptions.c: Fix build on non-altstack platforms.
144
145         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
146         sharing of vtypes.
147
148         * ir-emit.h: Add a comment to NEW_PCONST.
149
150         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
151
152         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
153
154         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
155         after the changes to MonoJitDomainInfo.
156
157 2008-09-27  Mark Probst  <mark.probst@gmail.com>
158
159         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
160
161 2008-09-27  Mark Probst  <mark.probst@gmail.com>
162
163         * mini-ppc.c: Compiler warning fixes.
164
165 2008-09-27  Mark Probst  <mark.probst@gmail.com>
166
167         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
168         for pinvokes.
169
170 2008-09-27  Mark Probst  <mark.probst@gmail.com>
171
172         * exceptions-ppc.c, mini-ppc.h: Compile
173         mono_arch_handle_altstack_exception() on Darwin, too.
174
175 2008-09-27  Mark Probst  <mark.probst@gmail.com>
176
177         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
178         work on archs which don't have generic sharing implemented, only
179         without the vtable_arg.
180
181 2008-09-26  Mark Probst  <mark.probst@gmail.com>
182
183         * mini.c: Added comment explaining why delegate ctor icall
184         wrappers are compiled.
185
186 2008-09-26  Mark Probst  <mark.probst@gmail.com>
187
188         * mini.c: Don't produce trampolines to delegate ctor icall
189         wrappers but compile them upfront.
190
191 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
192
193         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
194         runtime-set function when going back to managed code. Currently this
195         is used to set back the protection on the soft ovf pages and/or to
196         throw the stack overflow exception that happened in unmanaged code.
197
198 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
199
200         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
201         runtime-set function when going back to managed code. Currently this
202         is used to set back the protection on the soft ovf pages and/or to
203         throw the stack overflow exception that happened in unmanaged code.
204
205 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
206
207         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
208         the support code for restoring stack protection after stack overflows
209         that happen in unmanaged code. Don't set the exec permission on the
210         soft overflow area.
211
212 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
213
214         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
215         delegate->method_ptr is set. Fixes #428054.
216
217 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
218
219         * tests.cs: Rename to ratests.cs.
220
221         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
222         emit_get_rgctx_... functions.
223
224 2008-09-25  Mark Probst  <mark.probst@gmail.com>
225
226         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
227
228 2008-09-25  Mark Probst  <mark.probst@gmail.com>
229
230         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
231         before asserting that method is sharable.
232
233 2008-09-25  Mark Probst  <mark.probst@gmail.com>
234
235         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
236         whether method needs a static RGCTX wrapper used instead of
237         complex conditions.
238
239         * generic-sharing.c, mini.h: A few functions moved to
240         metadata/generic-sharing.c.
241
242 2008-09-25  Mark Probst  <mark.probst@gmail.com>
243
244         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
245         Generic code sharing for value types, which essentially means
246         treating value type methods like static methods.  The RGCTX is
247         passed in the same way.
248
249 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
250
251         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
252         opcode when creating multi-dimensional arrays of open types.
253
254         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
255         open generic types.
256
257         * generics.cs: Add a test.
258
259         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
260
261 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
262
263         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
264
265         * mini.c (mini_method_compile): Set it when running under the debugger. 
266
267         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
268         vreg optimization if the flag is set.
269
270         * driver.c (mono_main): Add --attach= option to pass options to
271         the attach agent.
272
273         * mini.c (sigquit_signal_handler): Start the attach agent.
274
275         * ssapre.c: Disable this to save space since it is not yet ported to
276         linear IR.
277
278         * regalloc2.c: Disable this to save space.
279
280         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
281
282 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
283
284         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
285         the -v option useful again.
286
287 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
288
289         * mini-amd64.c (mono_arch_output_basic_block): Add support for
290         --break-at-bb.
291
292         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
293         arrays of arrays. Fixes #428406.
294
295         * method-to-ir.c (mini_emit_castclass): Ditto.
296
297         * objects.cs: Add new test.
298         
299 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
300
301         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
302         was wrong at it choked against target_type_is_incompatible for byref types.
303
304 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
305
306         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
307         places.
308
309 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
310
311         * mini-exceptions.c: update a few more exceptions-related counters.
312
313 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
314
315         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
316         new functions to allocate from persistent mempools.
317
318 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
319
320         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
321         multiple register banks in the future.
322
323         * mini-codegen.c (mono_local_regalloc): Fix a warning.
324
325 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
326
327         * mini.c (type_to_eval_stack_type): Remove duplicated function.
328
329         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
330
331         * mini.h: Export type_to_eval_stack_type.
332
333         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
334         is only ins->klass of byref types.
335
336 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
337
338         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
339         (mini_emit_memcpy2): Ditto.
340
341         * mini-amd64.c: Fix a warning.
342
343 2008-09-21  Mark Probst  <mark.probst@gmail.com>
344
345         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
346         linking.
347
348 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
349
350         * method-to-ir.c: Extract stloc micro-optimization to a
351         function and apply it to all cases.
352
353 2008-09-19  Mark Probst  <mark.probst@gmail.com>
354
355         * method-to-ir.c: Don't fail generic code sharing in cases we
356         already support.
357
358 2008-09-18  Mark Probst  <mark.probst@gmail.com>
359
360         * mini-ppc.c: Handle structs in tailcalls on Darwin.
361
362 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
363
364         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
365         implementation.
366
367 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
368
369         * trace.c: make tracing more useful and correct, with per-thread
370         id and indent info.
371
372 2008-09-15  Mark Probst  <mark.probst@gmail.com>
373
374         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
375         doing a method call and the argument is an R4.
376
377 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
378
379         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
380         generic methods.
381
382 2008-09-13  Mark Probst  <mark.probst@gmail.com>
383
384         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
385
386 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
387
388         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
389         (MONO_JUMP_TABLE_FROM_INS): Ditto.
390
391 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
392
393         * driver.c: Add a --agent argument (not supported yet) to load managed
394         agent assemblies before loading the main assembly, similarly to how the
395         Java VM handles agents.
396
397 2008-09-11  Mark Probst  <mark.probst@gmail.com>
398
399         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
400         function to do stack layout of local variables.
401
402 2008-09-11  Mark Probst  <mark.probst@gmail.com>
403
404         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
405         calculation.
406
407 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
408
409         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
410         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
411         JIT if DISABLE_JIT is defined.
412
413         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
414         defined.
415
416 2008-09-10  Mark Probst  <mark.probst@gmail.com>
417
418         * iltests.il.in: Disable the fconv test on PPC (the result is
419         undefined according to ECMA).
420
421 2008-09-10  Mark Probst  <mark.probst@gmail.com>
422
423         * iltests.il.in: Enable tail call tests for PPC.
424
425         * mini.h: Add variable for storing incoming valuetype argument
426         addresses for tail calls.
427
428         * mini-ppc.c: Implement valuetype arguments and return values for
429         tailcalls on Linux.
430
431 2008-09-09  Mark Probst  <mark.probst@gmail.com>
432
433         * mini-ppc.c: Partially implement tail calls (struct arguments and
434         return values not supported).
435
436         * method-to-ir.c: Enable tail calls on PPC.
437
438 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
439
440         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
441         runtime-invoke wrappers to work around the problem of them getting
442         assigned to a random class.
443
444         * aot-runtime.c (mono_aot_get_method): Ditto.
445         
446 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
447
448         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
449         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
450
451 2008-09-07  Mark Probst  <mark.probst@gmail.com>
452
453         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
454         until they're implemented properly.
455
456         * exceptions-ppc.c: Use arch-independent exception-handling code
457         instead of custom one.
458
459         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
460         for Linear IR.
461
462         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
463
464         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
465         applies when __powerpc__ is defined.
466
467 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
468
469         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
470         methods to their code to avoid computing the full name of wrappers and
471         doing a lookup in a string hash table.
472
473 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
474
475         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
476         we identify bblocks before method_to_ir () is ran.
477
478         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
479         Also avoid optimizing branches pointing to themselves.
480
481         * mini.c (mini_method_compile): Ditto. Fixes #422947.
482
483 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
484
485         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
486
487 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
488
489         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
490         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
491         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
492         'buf'.
493
494         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
495         jumped to the same entry in plt_jump_table.
496
497 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
498
499         * method-to-ir.c (initialize_array_data): Handle field with RVA from
500         dynamic images.
501
502 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
503
504         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
505         other assignment can be if converted. Saves 1.5% on corlib size and fixes
506         #421807.
507
508 2008-08-29  Geoff Norton  <gnorton@novell.com>
509
510         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
511         segment, and doesn't properly handle .space as .text.  Fixes
512         AOT Mach/ARM
513
514 2008-08-29  Geoff Norton  <gnorton@novell.com>
515
516         * mini.c: Disable the mach exception handler when running on 
517         ARM
518
519 2008-08-29  Geoff Norton  <gnorton@novell.com>
520
521         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
522         globals on Darwin/ARM
523
524 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
525
526         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
527         since too many things depend on it. Instead, call 
528         mono_runtime_set_no_exec ().
529         
530         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
531         the new JIT.
532
533         * aot-compiler.c: Add an 'asm-only' AOT option.
534
535         * mini.c: Avoid initializing the runtime when doing AOT compilation.
536                 
537         * aot-compiler.c (compile_method): Disable gshared support for now as it
538         doesn't yet work.
539
540 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
541
542         * mini-amd64.h : Fix a compiler warning.
543
544         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
545           Changed to use a callback function to retrieve the unwind info.
546           This avoids problems observed when code blocks were removed by
547           unloading an app domain.
548
549         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
550           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
551           to work properly.
552
553         Contributed under MIT/X11 license.
554
555 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
556
557         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
558           case to keep the stack aligned to 8.
559
560         Contributed under MIT/X11 license.
561
562 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
563
564         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
565         avoid repeated linear searches.
566
567 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
568
569         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
570         methods it can't handle.
571         
572         * aot-compiler.c (add_method): Avoid adding a method twice.
573         (add_wrappers): Add runtime invoke wrappers for all methods.
574
575         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
576         function to create an aot-compatible version of this trampoline.
577
578         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
579
580 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
581
582         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
583
584         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
585         with a generic sharing failure.
586
587         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
588
589         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
590         CEE_RETHROW. Fixes #419634.
591
592         * mini.c (mono_method_to_ir): Ditto.
593
594         * exceptions.cs: Add a new test.
595         
596         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
597         to mono_type_stack_size_internal () since some callers might not pass in
598         an rgctx.
599
600         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
601         instrument_prolog. Fixes #419878.
602
603         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
604         doubles in soft float mode volatile.
605
606 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
607
608         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
609
610         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
611         to handle soft float correctly.
612
613         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
614         the fast path.
615
616         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
617
618         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
619         to sp, since the generics catch code requires it.
620
621         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
622         copying.
623
624         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
625         mono_arch_emit_imt_argument ().
626
627         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
628
629         * mini-arm.c tramp-arm.c: Generic sharing updates.
630
631 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
632
633         * mini-arm.c: Fix the arm build.
634
635         * generic-sharing.c (mini_type_get_underlying_type): New helper function
636         handling enums, generic instances and generic sharing.
637         (mini_type_stack_size_full): Ditto.
638
639         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
640         
641         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
642
643         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
644
645         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
646         trampolines.
647
648         * mini-arm.c: Various small generic sharing changes.
649
650         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
651         this for x86.
652         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
653         custom code.
654
655         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
656         helper function to return a generic class init trampoline.
657
658         * method-to-ir.c mini.c: Use it.
659         
660         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
661         arch-specfic function to return a generic class init trampoline.
662
663         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
664         the GENERIC_CLASS_INIT custom code.
665
666         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
667         a fatal error, not a sharing failure.
668
669         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
670         needed.
671
672         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
673         trampoline argument from MONO_ARCH_VTABLE_REG.
674
675         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
676         order of the arguments to the C trampoline: pass 'slot' as the trampoline
677         argument, and pass the vtable in VTABLE_REG.
678
679         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
680         order of the arguments to the C trampoline: pass 'slot' as the trampoline
681         argument, and pass the vtable in VTABLE_REG.
682         (mono_arch_create_trampoline_code_full): Remove some special casing for
683         the rgctx fetch trampoline.
684
685         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
686         Fixes #419273.
687
688         * iltests.il: Add a test for it.
689
690 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
691
692         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
693
694         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
695         no longer needed.
696
697         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
698         use mono_jit_info_table_find () to avoid recursion.
699         (mono_delegate_trampoline): Add a sync wrapper here.
700
701         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
702         here.
703
704         * mini.c (mono_method_to_ir): Ditto.
705         
706         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
707         add_sync_wrapper argument. Don't add a sync wrapper here.
708         (mono_create_jump_trampoline): Don't add a sync wrapper here.
709
710         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
711         
712 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
713
714         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
715           of nonvolatile registers back from MonoContext to CONTEXT.
716
717         Contributed under MIT/X11 license.
718
719 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
720
721         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
722           arguments on Winx64 there are only 4 argument registers.  For this
723           logic to work the last argument must be pulled from the stack.  
724
725         Contributed under MIT/X11 license.
726
727 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
728
729         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
730
731         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
732         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
733         encode/decode_method_ref ().
734
735         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
736
737         * aot-runtime.c (decode_patch): Ditto.  
738
739         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
740         MONO_PATCH_INFO_METHOD.
741
742         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
743         MonoGenericJitInfo.
744
745         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
746         MonoGenericJitInfo.
747
748         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
749
750         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
751         one from the caller.
752
753         * aot-runtime.c (decode_generic_inst): New function to decode and
754         return a interned generic inst.
755         (decode_klass_ref): Use it.
756         (decode_method_ref): Ditto.
757
758         * aot-compiler.c (emit_exception_debug_info): Save 
759         jinfo->has_generic_jit_info too.
760
761 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
762
763         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
764
765         * iltests.il.in: Add a test for fconv_to_i.
766
767         * liveness.c: Disable the liveness2 pass for now to save space.
768
769         * regalloc2.c: Include mempool-internals.h to fix warnings.
770
771         * aot-compiler.c (encode_method_ref): Encode the context of generic
772         instance methods.
773
774         * aot-runtime.c (decode_method_ref): Inflate generic methods using
775         the context saved in the aot file.
776
777         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
778
779         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
780
781         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
782         volatile so they won't be optimized away.
783
784 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
785
786         * ssa.c:
787         * ssa2.c:
788         * mini.c:
789         * regalloc2.c:
790         * dominators.c: Remove duplicated functions that now are in
791         mempool-internals.h.
792
793 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
794
795         * aot-compiler.c: Fix warnings.
796
797         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
798
799         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
800
801         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
802         as the patch type.
803
804         * mini.c (mono_resolve_patch_target): Ditto.
805         
806         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
807         (encode_klass_ref): Add support for encoding VARs/MVARs.
808
809         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
810
811         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
812         the handling of the got entries into a separate 'decode_got_entry' function.
813         Add support for RGCTX_FETCH.
814
815         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
816         clobbered by the trampoline code.
817
818         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
819         not clobbered by the indirect calling code.
820
821 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
822
823         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
824         to fix the build.
825
826 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
827
828         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
829         signature using the compilation mempool otherwise we would leak it.
830
831 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
832
833         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
834         mono_emit_abs_call ().
835
836         * patch-info.h: Add GENERIC_CLASS_INIT.
837
838         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
839
840         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
841         as their target as a near call.
842
843         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
844         ABS handling code.
845         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
846
847         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
848         call to a runtime function described by a patch.
849
850         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
851         mono_emit_abs_call, this has the advantage that the ABS handling code in
852         mono_codegen () can handle them both, and can handle other stuff in the
853         future without additional code.
854
855         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
856         entry.
857         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
858         abs addresses.
859
860         * mini.h: Add missing bblock related prototypes.
861
862         * mini.h (MonoCompile): Remove unused reverse_inst_list and
863         reverse_inst_list_len fields.
864
865         * mini.c: Refactor this file a bit by moving branch optimizations to 
866         branch-opts.c.
867
868         * method-to-ir.c: Merge generic sharing changes missed earlier.
869
870         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
871
872         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
873         shared patches. Process METHODCONST as a shared patch.
874
875         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
876         as it crashes on the 2.0 mscorlib.
877
878         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
879         to cause crashes.
880         
881         * aot-compiler.c: Use is_plt_patch () in a few additional places.
882         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
883         by IMT.
884
885         * aot-compiler.c: Reorganize the got handling code to be a bit more
886         understandable.
887
888 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
889
890         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
891         mono_patch_info_equals/hash, and use it to massively simplify
892         get_plt_index ().
893
894         * mini.c (mono_patch_info_hash): Simplify this and add support for
895         more patch types.
896
897         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
898
899         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
900         handling code, since an offset is not enough to identify a trampoline.
901
902         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
903
904 2008-08-17  Mark Probst  <mark.probst@gmail.com>
905
906         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
907
908         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
909
910         * mini-ops.h: Argument and result types for OVF_CARRY ops.
911
912         * decompose.c: PPC decompositions for various ops.
913
914         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
915
916 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
917
918         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
919         call the generic trampoline code using a call, instead of a jump, to
920         remove some special casing from the generic trampoline code.
921
922         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
923         (mono_codegen): Ditto.
924
925         * aot-compiler.c aot-runtime.c: Ditto.
926
927         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
928
929         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
930         helper function to find the offset corresponding to a lazy fetch trampoline.
931
932         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
933         when doing generic sharing.
934
935         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
936         places.
937         
938         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
939         mini-trampolines.c to be with the other trampoline creation functions.
940
941         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
942         as it is equal to method->signature in most cases, add a 
943         mono_emit_method_call_full variant which takes a signature and an imt
944         argument as well.
945
946 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
947
948         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
949         to this function, since it could be computed easily from the method 
950         argument.
951         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
952         more.
953
954         * method-to-ir.c mini.c: Remove references to 
955         compile_generic_method_wo_context.
956
957         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
958         generic method calls.
959         
960         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
961         dimensional non-szarrays.
962
963         * mini.c (mini_init): Register mono_array_new_1.
964
965         * jit-icalls.c (mono_array_new_1): New jit icall.
966
967         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
968         pointing to the method.
969
970         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
971         method addresses belonging to METHOD_JUMP patches in the 
972         jump_target_got_slot_hash.
973         (mono_aot_load_method): Ditto.
974
975         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
976         METHOD_JUMP patches.
977
978         * mini.c (mini_create_jit_domain_info): New helper function which 
979         initializes/frees domain->runtime_info.
980         (mini_free_jit_domain_info): Ditto.
981         (mini_init): Install the domain hook functions with the runtime.
982
983         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
984         information maintained by the JIT.
985
986         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
987         insertion into jump_table_hash into mono_codegen (), also implement proper
988         locking.
989
990         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
991         tail calls, it is already done by the aot code.
992         
993         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
994         mechanism on amd64.
995
996         * iltests.il.in: Make the jmp test a bit more complex.
997
998         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
999         generic instances which doesn't have a token.
1000
1001         * aot-runtime.c (decode_method_ref): Ditto.
1002         
1003         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
1004         can handle this case now.
1005         (handle_box): Ditto.
1006
1007 2008-08-15  Geoff Norton  <gnorton@novell.com>
1008
1009         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
1010         debugging check.
1011
1012 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
1013
1014         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
1015         calling generic methods.
1016
1017         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
1018
1019         * aot-runtime.c (decode_patch_info): Ditto.
1020
1021         * mini.c (mono_resolve_patch_target): Ditto.
1022         
1023         * patch-info.h: Add METHOD_RGCTX.
1024
1025         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
1026
1027 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
1028
1029         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
1030         arguments in registers.
1031
1032         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
1033         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
1034
1035         * mini.c (mini_method_compile): Abort aot compilation for generic
1036         methods if generic sharing is disabled.
1037         
1038         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
1039         an mrgctx.
1040
1041         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
1042         requiring an mrgctx.
1043
1044         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
1045         store instructions when converting a vcall to a normal call.
1046
1047         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
1048         mono_arch_find_jit_info.
1049
1050 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
1051
1052         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
1053         avoid calling mono_method_full_name () for every method even if the
1054         env var is not set.
1055         (check_inline_caller_method_name_limit): Ditto.
1056
1057 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
1058
1059         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
1060         assemblies in one run.
1061
1062         * aot-compiler.c (mono_compile_assembly): Only print out a count of
1063         skipped methods if it is not 0.
1064
1065         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
1066
1067 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
1068
1069         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
1070           MONO_ARCH_HAVE_UNWIND_TABLE.
1071
1072         Contributed under MIT/X11 license.
1073
1074 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
1075
1076         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
1077           from default optimizaton list on Winx64.
1078
1079         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
1080
1081         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
1082           the LMF from the MonoJitTlsData structure.
1083
1084         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
1085
1086         Contributed under MIT/X11 license.
1087
1088 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
1089
1090         * mini.c (sigsegv_signal_handler): Fix the build.
1091
1092         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
1093         assembly->aot_module.
1094
1095         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
1096         hash table. This simplifies and speeds up a lot of code, and fixes support
1097         for .netmodules.
1098
1099         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
1100         with the runtime.
1101
1102         * mini-exceptions.c: Ditto.
1103         
1104         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
1105         'native_offset' argument, since these are computed in the 
1106         mono_find_jit_info () function.
1107
1108         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
1109         is used by exceptions-ppc.c.
1110
1111         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
1112         mono_arch_find_jit_info ().
1113         
1114         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
1115         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
1116         generic code in mini-exceptions.c.
1117
1118 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
1119
1120         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
1121
1122         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
1123         
1124         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
1125         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
1126         called while holding the loader lock. Fixes #415608.
1127         (mono_aot_get_method_from_token_inner): Ditto.
1128
1129 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
1130
1131         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
1132         to reduce differences between this and the generic implementation in
1133         mini-exceptions.c.
1134         (ves_icall_get_frame_info): Ditto.
1135
1136         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
1137
1138         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
1139         longer neccesarry.
1140
1141         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
1142         mono_arch_get_call_filter () and make it non-static, for consistency with the
1143         other architectures.
1144
1145 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
1146
1147         * mini.c:
1148         * local-propagation.c:
1149         * mini-x86.c: Correct the name of arch defines.
1150
1151 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
1152
1153         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
1154         NO_EMULATE_LONG_SHIFT_OPS define.
1155
1156 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
1157
1158         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
1159         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
1160
1161         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
1162         MACH fixes. Merged from the 2.0 branch.
1163
1164         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
1165
1166         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
1167         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
1168
1169         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
1170
1171         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
1172         mono_marshal_get_native_wrapper () signature changes.
1173
1174 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
1175
1176         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
1177         conversion bug under arm.
1178
1179 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
1180
1181         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
1182
1183         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
1184         with overflow checking.
1185
1186 2008-08-05  Marek Habersack  <mhabersack@novell.com>
1187
1188         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
1189         to the genmdesc.pl file
1190
1191 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
1192
1193         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
1194         arg_array in the soft-float versions of the LOAD/STORE macros.
1195
1196         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
1197         implementation.
1198
1199         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
1200
1201 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
1202
1203         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
1204         a float HFA. Fixes #413621.
1205
1206 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
1207
1208         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
1209         frame_size to args_size. Fixes build.
1210
1211 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
1212
1213         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
1214         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
1215
1216         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
1217         the stack are not unaligned. Fixes #413247.
1218         
1219 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
1220
1221         * mini.c: update jitted methods performance counters.
1222
1223 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
1224
1225         * mini-exceptions.c: increase the exceptions thrown performance
1226         counter in mono_handle_exception ().
1227
1228 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
1229
1230         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
1231         can work with netmodules.
1232
1233 2008-07-28  Geoff Norton  <gnorton@novell.com>
1234
1235         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
1236         regression tests.
1237
1238 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
1239
1240         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
1241         correct place.
1242
1243 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
1244
1245         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
1246           The float param registers and other param registers must be the 
1247           same index on Windows x64.
1248
1249         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
1250           ArgValuetypeAddrInIReg argument case.  Setting the argument
1251           op to OP_VTARG_ADDR (OP_REGOFFSET)).
1252
1253         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
1254           variable computed above as the copy length for arguments of storage
1255           type ArgValuetypeAddrInIReg.
1256
1257         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
1258           ArgValuetypeAddrInIReg argument case.  This case will rely on
1259           mono_arch_emit_outarg_vt to emit the correct code later in the process.
1260
1261         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
1262           a 32 byte stack allocation for all calls.  We will omit the adjustment for
1263           jump and tail call instructoins as they do not follow the typical call behavior.
1264
1265         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
1266           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
1267           local variable and pass the local variable by reference to the called method.
1268
1269         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
1270           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
1271           of a struct is passed in a register it must be saved with the other
1272           volatile argument on the stack.
1273
1274         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
1275           frame pointer the stack adjustment value must be saved to the unwind 
1276           info structure.
1277
1278         Contributed under MIT/X11 license.
1279
1280 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
1281
1282         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
1283         which got lost in the merge.
1284
1285 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
1286
1287         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
1288         build.
1289
1290         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
1291         
1292         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
1293         icalls, since they won't be patched.
1294
1295         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
1296         different code sequence when running under valgrind to prevent some valgrind
1297         errors.
1298
1299         * iltests.il.in: Add new regression test.
1300
1301         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
1302         end with a throw.
1303
1304         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
1305         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
1306
1307         * iltests.il.in: Add new test.
1308
1309         * aot-compiler.c: Fix some warnings.
1310
1311         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
1312         Fixes #412494.
1313
1314 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
1315
1316         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
1317         (mini_usage_jitdeveloper): Add a missing --wapi option.
1318
1319 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
1320
1321         * mini-codegen.c: Simplify the is_fp macros.
1322         (free_up_ireg): Remove, use free_up_reg instead.
1323         (free_up_reg): Fix the fp case.
1324
1325 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
1326
1327         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
1328         lowered earlier.
1329
1330         * exceptions-x86.c: Merge some changes which seemed to have got lost
1331         in the linear-ir merge.
1332
1333         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
1334
1335         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
1336         long vreg volatile even if the variable was already created.
1337
1338         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
1339         volatile variables.
1340
1341 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
1342
1343         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
1344
1345         * mini.c (mono_jit_compile_method_inner): Add support for 
1346         MONO_EXCEPTION_BAD_IMAGE.
1347
1348         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
1349         mini_method_get_context () returns NULL. Fixes #356531.
1350
1351         * mini.c (mono_method_to_ir): Ditto.
1352         
1353         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
1354         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
1355
1356 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
1357
1358         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
1359         in the LDFTN implementation.
1360
1361 2008-07-25  Mark Probst  <mark.probst@gmail.com>
1362
1363         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
1364         code, patch calls to icalls, too, even if they're not in the
1365         shared generic code hash.  Fixes #411962.
1366
1367 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
1368
1369         * cpu-x86.md: Increase the length of the fcall opcodes.
1370
1371         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
1372         calls returning floats.
1373
1374         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
1375         on NEWARR.
1376         
1377         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
1378         missed earlier.
1379
1380         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
1381         into the domain->method_code_hash.
1382
1383         * aot-compiler.c: Fix win32 build.
1384
1385         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
1386         
1387         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
1388         gshared NEWARR implementation.
1389
1390         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
1391
1392         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
1393         can be used outside of method_to_ir.
1394
1395         * mini.h (MonoCompile): Add arg_types field.
1396
1397         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
1398         
1399         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
1400         the values of the local arg_array and param_types array.
1401
1402 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
1403
1404         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
1405         got accesses might only get generated later when NEWOBJ is decomposed.
1406         
1407         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
1408         looking up the native code of the target method when a delegate is called
1409         for the first time.
1410
1411         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
1412         optimization.
1413
1414         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
1415
1416         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
1417         AOT work on platforms without a working dlsym implementation.
1418
1419         * mini.h: Bump AOT image format version.
1420         
1421 2008-07-24  Mark Probst  <mark.probst@gmail.com>
1422
1423         * mini-exceptions.c: Free a MonoType with
1424         mono_metadata_free_type() instead of g_free().
1425
1426         * aot-runtime.c: Free a MonoType.
1427
1428 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
1429
1430         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
1431         optimization.
1432
1433         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
1434         fp stack on x86.
1435
1436 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
1437         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
1438         profiler hook.
1439
1440 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
1441
1442         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
1443         NEWOBJ calls on valuetypes.
1444
1445         * iltests.il.in: Add new test.
1446
1447         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
1448
1449 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
1450
1451         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
1452         is no longer needed.
1453
1454         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
1455         non register sized integer arguments.
1456         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
1457         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
1458         emit_memcpy2 ().
1459
1460         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
1461         CEE_MONO_RETOBJ.
1462         
1463         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
1464         two a binop with different sized arguments is emitted.
1465
1466         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
1467         instruction in the ins==NULL case.
1468
1469 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
1470
1471         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
1472
1473         * mini-x86.c: Fix osx build.
1474
1475         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
1476         opcodes as well.
1477
1478         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
1479         instruction for non int sized variables.
1480
1481         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
1482         implementation.
1483
1484 2008-07-23  Robert Jordan  <robertj@gmx.net>
1485
1486         * method-to-ir.c: Fix MSVC build.
1487
1488 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
1489
1490         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
1491         a non int sized type, widen it to an int since newer versions of gcc seem to
1492         generate code which needs this.
1493
1494         * ssa2.c abcremoval2.c: Fix warnings.
1495
1496         * *: Merge the Linear IR branch.
1497
1498         The original branch is at trunk/branches/vargaz/mini-linear-il, and
1499         the ChangeLog file there describes all the changes done over the years. 
1500         Further documentation can be found at www.mono-project.com/Linear_IL.
1501
1502 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
1503
1504         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
1505           The float param registers and other param registers must be the 
1506           same index on Windows x64.
1507
1508         Contributed under MIT/X11 license.
1509
1510 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
1511
1512         * mini.c: Make the previous fix GC safe.
1513
1514 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
1515
1516         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
1517
1518 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
1519
1520         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
1521           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
1522           ArgValuetypeAddrInIReg instead.
1523
1524         Contributed under MIT/X11 license.
1525
1526 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
1527
1528         * mini-codegen.c (get_register_spilling): Fix a warning.
1529
1530 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
1531
1532         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
1533         for types which the initialization fails. Raises the provided exception
1534         at the right stop after cleanup.
1535
1536 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
1537
1538         * aot-compiler.c: Free most of the memory allocated during compilation.
1539
1540         * mini.c (mini_parse_debug_options): Fix a leak.
1541         
1542         * mini.c (mini_method_compile): Don't add the method to the jit info tables
1543         during aot compilation.
1544
1545 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
1546
1547         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
1548         it has too much register pressure.
1549
1550 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
1551
1552         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
1553
1554 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
1555
1556         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
1557         on x86.
1558
1559         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
1560         on amd64 similar to the way it is done on arm.
1561
1562         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
1563
1564         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
1565         consistency, normalize error messages, avoid loading aot-only modules in
1566         normal mode.
1567
1568         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
1569         for consistency.
1570
1571         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
1572
1573 2008-07-11  Martin Baulig  <martin@ximian.com>
1574
1575         * debug-debugger.h
1576         (MonoDebuggerInfo): Add `interruption_request'.
1577
1578 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
1579
1580         * aot-compiler.c (emit_plt): Remove some dead code.
1581
1582         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
1583
1584         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
1585         return the plt info offset belonging to a given plt entry.
1586
1587         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
1588         mono_aot_get_plt_info_offset.
1589         
1590         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
1591         similar to the amd64 code by makeing jumps through a separate jump table 
1592         instead of embedding the jump addresses into the code.
1593
1594 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
1595
1596         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
1597         method.
1598
1599 2008-07-10  Martin Baulig  <martin@ximian.com>
1600
1601         * mini.c (mini_method_compile): Disable generics sharing when
1602         running in the debugger.
1603
1604 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
1605
1606         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
1607
1608         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
1609         the local register allocator from running out of registers on x86 when 
1610         using aot.
1611
1612 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
1613
1614         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
1615         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
1616         C4146.
1617
1618         Contributed under MIT/X11 license.
1619
1620 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
1621
1622         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
1623         speed up the assembler.
1624
1625 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
1626
1627         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
1628         support.
1629
1630         * mini.c: Move the soft float handling macros a bit earlier, add 
1631         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
1632         place.
1633
1634         * mini.h: Add prototype for mono_arch_fixup_jinfo.
1635
1636         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
1637         read-only to help catch code allocation requests.
1638         
1639         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
1640         and turn it off when using --aot-only or when compiling with --aot=full.
1641
1642         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
1643         jump table for switches from the normal domain mempool, not the code
1644         manager.
1645
1646         * mini-trampolines.c (get_unbox_trampoline): New function to return an
1647         unbox trampoline which handles aot-only mode too.
1648
1649         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
1650         an AOTed unbox trampoline.
1651
1652         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
1653
1654 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
1655
1656         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
1657         ""
1658
1659         Contributed under MIT/X11 license.
1660
1661 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
1662
1663         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
1664           the unwind information for the method at the end of the allocated block.
1665           
1666         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
1667           MonoCompileArch to hold the unwind info for SEH on Winx64
1668         
1669         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
1670           frame pointer info for the method being compiled.
1671           
1672         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
1673           the call to mono_exception_from_token.
1674           
1675         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
1676           storing the method prolog information in a format that the Winx64 SEH can understand.  This
1677           information is stored a the end of the method block because it is all 32-bit offset based.
1678
1679         Contributed under MIT/X11 license.
1680
1681 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
1682
1683         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
1684
1685         * wapihandles.c: Fix warnings.
1686
1687         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
1688         mode.
1689
1690         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
1691         mono_jit_compile_method in aot-only mode since that calls the type 
1692         initializer.
1693         
1694         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
1695         get_delegate_invoke_impl in aot-only mode.
1696
1697         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
1698
1699 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
1700
1701         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
1702
1703         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
1704         is on by default.
1705
1706         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
1707
1708         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
1709         init trampoline from the AOT file as well.
1710
1711         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
1712         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
1713         code.
1714
1715         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
1716         mono_init.
1717
1718         * exceptions-amd64.c: Add _full variants for the remaining exception code
1719         creation functions as well, allow emission of relocatable code, remove
1720         caching since that is now done by the caller.
1721
1722         * mini-exceptions.c: Add _full variants for the remaining exception code
1723         creation functions as well, add aot-only support.
1724
1725         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
1726         if we can determine a proper token for them.
1727         (add_wrappers): Add a few more wrappers.
1728         (emit_method_code): Remove some dead code.
1729         (emit_trampolines): Emit exception code too.
1730
1731         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
1732
1733         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
1734         mono_array_new_va which avoids varargs.
1735
1736         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
1737
1738         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
1739         mono_arch_create_specific_trampoline () in all places.
1740
1741         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
1742         a bit so it can be used for other things as well.
1743         
1744         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
1745         on demand as well.
1746
1747         * exceptions-amd64.c: Rename the caching from the exception code creation
1748         functions, it is done by the caller instead.
1749         
1750         * exceptions-amd64.c: Change the signature of the exception code creation 
1751         functions to allow the creation of relocatable code later.
1752
1753         * mini-exceptions.c: Add a set of functions to query the various 
1754         runtime-generated exception functions.
1755
1756         * mini.c mini-exceptions.c: Use the newly added functions instead of the
1757         mono_arch_.. () functions.
1758         
1759 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
1760
1761         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
1762
1763         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
1764
1765         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
1766         (mini_get_vtable_trampoline): Ditto.
1767
1768         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
1769         code in the AOT case by returning the code size and a list of relocations to
1770         the caller.
1771
1772         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
1773
1774 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
1775
1776         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
1777           clean the stack.
1778
1779         Contributed under MIT/X11 license.
1780
1781 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
1782
1783         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
1784         so the buffer size can be computed correctly. Fixes #404735.
1785
1786         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
1787         normally as cfg->debug_info is already freed.
1788
1789 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
1790
1791         * mini-amd64.c: For calls returning vtypes in registers, don't store
1792         the return address on the stack, instead allocate a separate local for
1793         it. Fixes #404729.
1794
1795 2008-07-05  Mark Probst  <mark.probst@gmail.com>
1796
1797         * mini-trampolines.c, mini.h: Add an argument to
1798         mono_create_jit_trampoline_in_domain() for turning off the adding
1799         of the sync wrapper.
1800
1801         * mini.c: Use the JIT trampoline without sync instead of
1802         ldftn_nosync in static RGCTX invoke wrappers so that the call can
1803         be patched.
1804
1805 2008-07-04  Mark Probst  <mark.probst@gmail.com>
1806
1807         * driver.c: Turn on GSHARED optimization by default.
1808
1809 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
1810
1811         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
1812         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
1813
1814         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
1815         create a variant of the generic trampoline code callable from AOTed trampolines.
1816
1817         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
1818         trampoline code callable from AOTed trampolines.
1819
1820         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
1821
1822 2008-07-04  Mark Probst  <mark.probst@gmail.com>
1823
1824         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
1825         pass-through manner.
1826
1827         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
1828         and don't fail sharing for them anymore.
1829
1830         * mini-exceptions.c: Handle exceptions in shared generic methods.
1831
1832         * generic-sharing.c: When checking the context of a generic
1833         method, also check its class's context.  Don't treat wrappers as
1834         sharable.
1835
1836         * mini-trampolines.c: Some code factored out to
1837         metadata/generic-sharing.c.  Handle the MRGCTX case.
1838
1839         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
1840         we must deal with the method being of another instantiation of the
1841         class.  Add static rgctx invoke wrappers to generic methods.
1842
1843 2008-07-04  Mark Probst  <mark.probst@gmail.com>
1844
1845         * mini.c: Provide all jit infos of generic shared methods with a
1846         generic jit info.
1847
1848         * mini-exceptions.c: Handle the new situation that a generic info
1849         might be available, but not info about the this/vtable/mrgctx
1850         variable.
1851
1852 2008-07-03  Mark Probst  <mark.probst@gmail.com>
1853
1854         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
1855         generic methods.
1856
1857 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
1858
1859         * dominators.c (check_dominance_frontier): Fix a warning.
1860
1861         * mini.h: Add some missing prototypes.
1862
1863         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
1864
1865         * driver.c (mono_jit_init_version): Correct the comments since the first
1866         argument should be the name of the root domain, not a filename.
1867
1868         * aot-runtime.c (make_writable): Error out if this is called while running
1869         with --aot-only.
1870         (load_aot_module): Ditto.
1871
1872         * aot-compiler.c: Really fix the computation of method indexes.
1873
1874         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
1875         optimizations as this is no longer called frequently.
1876
1877         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
1878         method and the invoke impl code and pass it to the delegate trampoline instead of
1879         just the delegate class.
1880
1881 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
1882
1883         * aot-compiler.c: Fixup the computation of method indexes.
1884         (add_wrappers): Create the base methods of the runtime invoke wrappers using
1885         the method builder infrastructure.
1886
1887         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
1888         has no header.
1889
1890         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
1891         mode, load the method right away instead of creating a trampoline.
1892
1893         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
1894
1895         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
1896         some checks a bit.
1897
1898 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
1899
1900         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
1901         (mono_aot_load_method): Use method_index instead of method->token.
1902
1903         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
1904         can handle icalls etc. properly.
1905
1906         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
1907
1908         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
1909
1910         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
1911         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
1912         JIT_ICALL_ADDR patch type.
1913
1914         * patch-info.h: Add JIT_ICALL_ADDR patch type.
1915
1916         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
1917         request flag.
1918         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
1919
1920         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
1921
1922 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
1923
1924         * mini.c: Use domain->jit_code_hash_lock for controlling access to
1925         domain->jit_code_hash.
1926
1927 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
1928
1929         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
1930
1931 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
1932
1933         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
1934         get_this_arg_from_call, let it compute it when needed.
1935
1936         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
1937         gsctx from code only when needed.
1938
1939         * mini-trampolines.c (get_generic_context): Rename this to 
1940         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
1941         it can be called by the arch backends.
1942
1943         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
1944
1945 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
1946
1947         * driver.c (mono_main): Add experimental --aot-only command line option.
1948
1949         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
1950         set.
1951
1952 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
1953
1954         * driver.c (DllMain): Remove mono_module_handle.
1955
1956         Contributed under MIT/X11 license.
1957
1958 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
1959
1960         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
1961         for emitting methods which are not in the source assembly. Detect and report
1962         failure of assembling+linking.
1963         
1964         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
1965
1966         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
1967
1968 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
1969
1970         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
1971
1972 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
1973
1974         * mini.h: Remove some obsolete prototypes.
1975
1976         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
1977
1978 2008-06-24  Mark Probst  <mark.probst@gmail.com>
1979
1980         * mini.c (get_object_generic_inst): Variable-sized arrays are not
1981         supported by Visual Studio, so use alloca().
1982
1983 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
1984
1985         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
1986         Fixes #402585.
1987
1988 2008-06-23  Mark Probst  <mark.probst@gmail.com>
1989
1990         * mini.c: Fail sharing of a generic method if it contains an open
1991         catch clause (because we don't pass MRGCTXs yet).
1992
1993 2008-06-23  Mark Probst  <mark.probst@gmail.com>
1994
1995         * mini.c: When compiling a method with generic sharing, insert the
1996         method instantiated with an all-Object generic context into the
1997         jit info table, instead of the context of the first instantiation
1998         of the method we happen to compile.
1999
2000 2008-06-18  Martin Baulig  <martin@ximian.com>
2001
2002         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
2003         `major_version' and `minor_version'.
2004
2005 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2006
2007         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
2008         mono_method_is_generic_sharable_impl() takes an additional
2009         argument specifying whether to treat type variables as reference
2010         types.
2011
2012 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2013
2014         * mini.h: Removed obsolete prototypes.
2015
2016 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2017
2018         * mini.c: Don't fail generic sharing for initobj and sizeof - we
2019         already handle them.
2020
2021 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2022
2023         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
2024         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
2025         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
2026         tramp-x86.c: Added a MonoGenericContext* argument to
2027         mono_arch_get_unbox_trampoline() so that it can call other
2028         functions which require it.
2029
2030 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2031
2032         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
2033         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
2034         mono_arch_get_this_arg_from_call() takes a
2035         MonoGenericSharingContext* as well.
2036
2037 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2038
2039         * mini.c: Factor out code for emitting unbox into emit_unbox() and
2040         implement generic sharing of unbox.
2041
2042 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2043
2044         * mini.c: Don't compute the vtable to determine whether a field is
2045         special static, because it might not work for open types.
2046
2047 2008-06-17  Mark Probst  <mark.probst@gmail.com>
2048
2049         * mini.c: Removed the unused token_type and token_source arguments
2050         from get_runtime_generic_context_ptr().
2051
2052 2008-06-17  Marek Habersack  <mhabersack@novell.com>
2053
2054         * mini.c (ADD_BINOP): fix the build
2055
2056 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
2057
2058         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
2059         a widening op.
2060
2061 2008-06-16  Mark Probst  <mark.probst@gmail.com>
2062
2063         * mini.h: Removed class relations enum that's not used anymore.
2064
2065 2008-06-16  Mark Probst  <mark.probst@gmail.com>
2066
2067         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
2068
2069         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
2070         the lazy fetch trampoline access code.
2071
2072 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
2073
2074         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
2075
2076 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
2077
2078         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
2079
2080         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
2081
2082         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
2083
2084 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
2085
2086         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
2087         intrinsics.
2088
2089         * mini-ops.h: Add MIN/MAX_UN opcodes.
2090
2091         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
2092         intrinsics.
2093
2094         * basic-math.cs: Add more min/max tests.
2095
2096         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
2097
2098 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2099
2100         * mini.c: Small fix in the prologue of emit_castclass.
2101
2102 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
2103
2104         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
2105
2106         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
2107         do not work even for unsigned types. Fixes #400014.
2108
2109         * basic-math.cs: Add regression tests for unsigned Min/Max.
2110
2111 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2112
2113         * mini.c: Added additional context_used argument to several
2114         functions, which will be needed for sharing generic methods.  Use
2115         GET_RGCTX macro wherever appropriate.  Declare only one
2116         context_used in mono_method_to_ir().
2117
2118 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2119
2120         * mini.c, generic-sharing.c: Removed generic class relations.
2121
2122         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
2123         functions due to MRGCTX changes.
2124
2125 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2126
2127         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
2128         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
2129         with calculated IMT.
2130
2131         * mini.c: Generic sharing of calls via generic interfaces.
2132
2133         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
2134         generic method with non-constant MonoGenericContext*.  Instead,
2135         the context is taken out of the method itself.
2136
2137 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2138
2139         * mini.c: Generic sharing of ldvirtftn.
2140
2141 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2142
2143         * mini.c: Generic sharing of ldftn.
2144
2145 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2146
2147         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
2148
2149 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2150
2151         * mini.c: Generic sharing of the special case of ldtoken followed
2152         by a call to GetTypeFromHandle.
2153
2154 2008-06-13  Mark Probst  <mark.probst@gmail.com>
2155
2156         * mini.c: Generic sharing of box for nullable types.
2157
2158 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
2159
2160         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
2161         are passed on the stack. Fixes #324807.
2162
2163 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
2164
2165         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
2166         for the ArgValuetypeAddrInIReg case.
2167
2168         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
2169         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
2170
2171         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
2172         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
2173         local variable and pass the local variable by reference to the called method.
2174           
2175         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
2176         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
2177
2178         Contributed under MIT/X11 license.
2179
2180 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
2181
2182         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
2183
2184         * debug-mini.c (mono_debug_print_vars): Release memory after printing
2185         everything.
2186
2187 2008-06-10  Martin Baulig  <martin@ximian.com>
2188
2189         * debug-mini.c
2190         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
2191
2192 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
2193
2194         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
2195         possible error when no arguments are passed.
2196
2197         Contributed under MIT/X11 license.
2198
2199 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
2200
2201         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
2202         where the file name is NULL.
2203
2204 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
2205
2206         * mini.c: Fix s390 build.
2207
2208 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
2209
2210         * trace.c (mono_trace_parse_options): Fix warnings.
2211
2212         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
2213
2214 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
2215
2216         * mini.c (remove_block_if_useless): Avoid printing the method name.
2217         
2218         * mini.c: Remove needless setting of ins->cil_code which is now done by 
2219         MONO_INST_NEW.
2220
2221         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
2222         LMF. Not yet used.
2223
2224         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
2225         translated code after it has been patched.
2226
2227 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
2228
2229         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
2230         avoid problems during code patching on SMP systems.
2231         (emit_call): Avoid adding a patch info which is already added by 
2232         emit_call_body.
2233         (mono_arch_emit_exceptions): Ditto.
2234
2235 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
2236
2237         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
2238         MONO_TYPE_ISSTRUCT already checks for it.
2239
2240 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
2241
2242         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
2243           structs with floats on Winx64 the float registers are not used.  
2244           The integer registers are always used..
2245         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
2246           only one register will be used and only if the size of the struct 
2247           is 1,2,4, or 8 bytes.
2248
2249         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
2250           to work for Winx64.
2251
2252         Contributed under MIT/X11 license.
2253
2254 2008-06-05  Martin Baulig  <martin@ximian.com>
2255
2256         * debug-debugger.c (debugger_lookup_class): Also call
2257         mono_class_setup_methods() here; we're only called from RTI.
2258
2259 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
2260
2261         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
2262         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
2263         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
2264         Post-process object files and add dtrace-generated object, if necessary.
2265
2266         Contributed under MIT/X11 license.
2267
2268 2008-06-04  Mark Probst  <mark.probst@gmail.com>
2269
2270         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
2271         element class.
2272
2273         * mini.c: Generic sharing for unbox.any and castclass.
2274
2275 2008-06-04  Mark Probst  <mark.probst@gmail.com>
2276
2277         * mini.c: Ignore tailcall prefix in shared generic code and when
2278         doing calls which require a vtable/rgctx argument.
2279
2280 2008-06-04  Mark Probst  <mark.probst@gmail.com>
2281
2282         * mini.c: Don't free the JIT info.
2283
2284         * driver.c: Changes in the JIT info table testing code.
2285
2286 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
2287
2288         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
2289         interruption. Fix some warnings.
2290
2291         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
2292         interruption_checkpoint.
2293
2294 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
2295
2296         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
2297         from embedding applications.
2298
2299 2008-06-02  William Holmes  <billholmes54@gmail.com>
2300
2301         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
2302           reserving 32 bytes on the stack when making calls. 
2303
2304         Contributed under MIT/X11 license.
2305
2306 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
2307
2308         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
2309         the linear IL branch.
2310
2311         * driver.c: Print out more information for --version on arm.
2312
2313 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
2314
2315         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
2316         bb_exit instead, since out of line bblocks might not actually be emitted
2317         out-of-line.
2318         
2319         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
2320         maximum epilog size for out of line bblocks if tracing is enabled.
2321
2322         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
2323
2324 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
2325
2326         * arrays.cs: Regression tests for allocating arrays with negative sizes.
2327
2328 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
2329
2330         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
2331         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
2332         opcodes.
2333
2334 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
2335
2336         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
2337         the 'value' to store is a constant.
2338
2339         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
2340
2341         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
2342         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
2343
2344 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
2345
2346         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
2347         for accessing method->generic_container.
2348
2349 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
2350
2351         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
2352         
2353         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
2354
2355         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
2356
2357         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
2358         fails.
2359
2360 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
2361
2362         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
2363
2364         * mini.c: Handle the case when mono_class_vtable () fails.
2365
2366 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
2367         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
2368         the stat profiler.
2369
2370 2008-05-22  Mark Probst  <mark.probst@gmail.com>
2371
2372         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
2373         together with domain sharing.
2374
2375 2008-05-22  Mark Probst  <mark.probst@gmail.com>
2376
2377         * mini.c: Treat callvirts to final methods like non-virtual calls
2378         when doing generic sharing, i.e. look them up in the runtime
2379         generic context.
2380
2381 2008-05-22  Mark Probst  <mark.probst@gmail.com>
2382
2383         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
2384         with computed types (for generic sharing).
2385
2386         * mini.c: Generic sharing for mkrefany and refanyval.
2387
2388 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
2389
2390         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
2391         possible.
2392
2393         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
2394         the generic sharing code.
2395         
2396         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
2397         when needed.
2398
2399 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
2400
2401         * mini.h: Remove the declaration of mono_aot_init_vtable ().
2402
2403 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
2404
2405         * driver.c: updated copyright date
2406
2407 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
2408
2409         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
2410         needed.
2411
2412 2008-05-19  Martin Baulig  <martin@ximian.com>
2413
2414         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
2415         pointing to the new `_mono_debug_using_mono_debugger' variable.
2416
2417         * driver.c
2418         (mono_main): Check mono_debug_using_mono_debugger() rather than
2419         the `MONO_INSIDE_MDB' environment variable to check whether we're
2420         inside the debugger.
2421
2422 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
2423
2424         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
2425         argument.
2426
2427 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
2428
2429         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
2430
2431         * mini.c: Added mini_assembly_can_skip_verification. This
2432         function checks if the assembly requested to skip verification. 
2433         Fixes part of #387274.
2434
2435 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
2436
2437         * mini.c (mini_get_method): Disable the check for open generic classes when
2438         using generic sharing.
2439
2440         * generics.cs: Add a test #387034.
2441
2442         * mini.c (mini_get_method): Check whenever the method class is an open generic
2443         type, and return NULL in that case, causing a verification error. Fixes
2444         #384123.
2445
2446 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
2447
2448         * driver.c (mono_main): Revert r102623. The right
2449         thing to do is to enable the verifier under verifiable
2450         unless a --security flag was passed.
2451
2452         We need this non-trivial behavior for --verify-all otherwise
2453         mcs-compileall won't be able to use it. As it needs everything to
2454         be verified under validil.
2455
2456 2008-05-06  Martin Baulig  <martin@ximian.com>
2457
2458         Fix #383749.
2459
2460         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
2461         (mono_debugger_thread_cleanup): Likewise.
2462         (mono_debugger_extended_notification): Likewise.
2463
2464 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
2465
2466         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
2467         against both inflated and non-inflated methods. We need to check against the
2468         generic definition for cases where the instantiated method is not visible.
2469         We need to check against the inflated types for cases where the instantiation
2470         changes any super type. This fixes #382986.
2471
2472         Note that this doesn't need to be applied to other parts of mono_method_to_ir
2473         that check for visibiliy as generic params only appears as the type subject
2474         of tokens on call opcodes. Field manipulation and ldftn must always
2475         target an exact type.
2476
2477 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
2478
2479         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
2480         if no related --security flag is passed.
2481
2482 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
2483
2484         * mini-arch.h: Prepare support for ppc64.
2485
2486         Contributed under MIT/X11 license.
2487
2488 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
2489
2490         * aot-runtime.c: Prepare support for ppc64.
2491
2492         Contributed under MIT/X11 license.
2493
2494 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
2495
2496         * mini-ops.h: Prepare support for ppc64.
2497
2498         Contributed under MIT/X11 license.
2499
2500 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
2501
2502         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
2503
2504         Contributed under MIT/X11 license.
2505
2506 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
2507
2508         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
2509         assemblies, since aot_name is not a full path, causing us to load MS.NET 
2510         assemblies on windows.
2511
2512 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
2513
2514         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
2515         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
2516         * main.c: Use UTF-8 encoded command line instead of Windows default code
2517         page on Windows to support Unicode.
2518         * driver.c (DllMain): New function for mixed-mode assembly support.
2519         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
2520         export __stdcall functions without decoration.
2521
2522         Contributed under MIT/X11 license.
2523
2524 2008-04-28  Mark Probst  <mark.probst@gmail.com>
2525
2526         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
2527         saving it very early.
2528
2529 2008-04-28  Mark Probst  <mark.probst@gmail.com>
2530
2531         * mini.h, mini.c: Lots of code for accessing the old RGCTX
2532         deleted.  The only way to access the new RGCTX is via the
2533         trampline.
2534
2535         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
2536         vtable instead of the RGCTX to static methods.
2537
2538         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
2539         accessing the new RGCTX.
2540
2541         * generic-sharing.c: There is no separation between self, type
2542         arguments and other types in the RGCTX anymore.
2543
2544 2008-04-25  Jonathan Chambers <joncham@gmail.com>
2545
2546         * mini-amd64.c (add_general): Remove previous stack adjustment.
2547         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
2548         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
2549         for 32 bytes of stack space reserved for all calls.
2550         
2551         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
2552         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
2553         adjustment.
2554         
2555         Code contributed under MIT/X11 license.
2556
2557 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
2558
2559         * mini.c (mini_method_verify): Only verify non-inflated methods, check
2560         against the root definition, peeling out method and type instantiations.
2561         Cache verify success results, code that fails verification is still
2562         checked multiple times.
2563
2564 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
2565
2566         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
2567
2568 2008-04-23  Jonathan Chambers <joncham@gmail.com>
2569
2570         * mini-amd64.c (add_general): Always increment stack on Win64.
2571         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
2572         on Win64.
2573         
2574         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
2575         stack based argument handling on Win64.
2576         
2577         Code contributed under MIT/X11 license.
2578
2579 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
2580
2581         * Makefile.am (version.h): Add support for git-svn.
2582
2583 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
2584
2585         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
2586         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
2587         avoiding allocations and libc functions which might deadlock.
2588         
2589         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
2590         'no-gdb-backtrace' option is set.
2591
2592         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
2593
2594         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
2595
2596 2008-04-21  Martin Baulig  <martin@ximian.com>
2597
2598         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
2599         and `get_lmf_addr'; `notification_address' is no longer a pointer.
2600
2601 2008-04-21  Martin Baulig  <martin@ximian.com>
2602
2603         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
2604         `thread_vtable', `event_handler_ptr' and `event_handler'.
2605
2606 2008-04-21  Martin Baulig  <martin@ximian.com>
2607
2608         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
2609         allows delayed initialization of the `executable_code_buffer' when
2610         attaching.
2611
2612 2008-04-21  Martin Baulig  <martin@ximian.com>
2613
2614         * mini.h (mono_debugger_create_notification_function): Removed.
2615         * tramp-*.c (mono_debugger_create_notification_function): Removed.
2616
2617         * mdb-debug-info64.s
2618         (MONO_DEBUGGER__notification_function): Added this in the .text section.
2619
2620         * mdb-debug-info32.s
2621         (MONO_DEBUGGER__notification_function): Added this in the .text section.
2622
2623         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
2624         currently only works on x86 and x86_64, so don't create it on ppc.
2625
2626 2008-04-21  Martin Baulig  <martin@ximian.com>
2627
2628         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
2629
2630         * mini.c
2631         (mini_method_compile): In the fp elimination check, check
2632         `debug_options.mdb_optimizations' in addition to
2633         mono_debug_using_mono_debugger().       
2634
2635         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
2636         disable some JIT optimizations which are only disabled when
2637         running inside the debugger.
2638         Added `--help-debug' option to describe the debugging options.
2639         (parse_debug_options): New static function to parse the `--debug'
2640         options, so we can easily add more stuff in future.
2641
2642 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
2643
2644         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
2645         the method has no body.
2646
2647 2008-04-19  Jonathan Chambers <joncham@gmail.com>
2648
2649         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
2650         assembly is not allowed in MSVC 64-bit compiler. 
2651         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
2652         as we get floating point exceptions everywhere.
2653         
2654         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
2655         correctly align arguments for call to throw_exception.
2656         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
2657         
2658         Code contributed under MIT/X11 license.
2659
2660 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
2661
2662         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
2663
2664 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
2665
2666         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
2667
2668         * mini-amd64.c (NEW_INS): Set cil_code.
2669
2670         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
2671         from mini-amd64.c so all debugger related logic is in one place.
2672
2673         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
2674         later won't have a random ip assigned to them.
2675
2676 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
2677
2678         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
2679         the arch specific function initializes code_size.
2680         (mono_create_delegate_trampoline): Ditto.
2681
2682         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
2683         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
2684         platforms.
2685
2686         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
2687         running under the debugger.
2688
2689         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
2690         debugger.
2691
2692         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
2693         debugger. Also move the disabling of optimizations here from driver.c.
2694         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
2695         debugger.
2696
2697         * mini.h (MonoCompile): Add a few new flags.
2698
2699 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
2700
2701         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
2702         so the cil_code field of created MonoInst's is properly set.
2703         (mini_select_instructions): Ditto.
2704
2705         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
2706         (MONO_INST_NEW_CALL): Ditto.
2707
2708         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
2709         in many places so the ins->cil_code field is properly initialized.
2710
2711         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
2712         place.
2713
2714 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
2715
2716         * mini.c (mini_method_compile): Print a different message when compiling a 
2717         shared method.
2718         
2719         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
2720         > 1.
2721
2722 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
2723
2724         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
2725         SSE2 instructions.
2726
2727         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
2728         
2729 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
2730
2731         * mini.c (handle_stack_args): Make this return void since its return value was
2732         never used. Also set cfg->unverifiable for invalid IL instead of calling
2733         G_BREAKPOINT ().
2734
2735 2008-04-10  Mark Probst  <mark.probst@gmail.com>
2736
2737         * mini.c: Make sure "this" is live in catch clauses with type
2738         variables in shared generic code.
2739
2740 2008-04-08  Mark Probst  <mark.probst@gmail.com>
2741
2742         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
2743         generic_class_is_reference_type() to ensure the proper behaviour
2744         when sharing generic code and the type in question is a type
2745         argument.
2746
2747 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
2748
2749         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
2750         race conditions when printing thread dumps. Fixes #377738.
2751
2752 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
2753         
2754         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
2755         shows up when both MonoInst arguments can cause aliasig.
2756         There is likely no way in the current JIT to trigger this problem, but
2757         it showed up in the development of generics sharing, when in a new
2758         opcode both args of an OP_GROUP can be aliases (addresses of a local).
2759         When the generics sharing code will be committed, its tests will be
2760         valid also for this bug.
2761
2762 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
2763
2764         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
2765         PATCH_INFO_METHOD.
2766
2767         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
2768         NULL.
2769
2770 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
2771
2772         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
2773         use a more detailed exception message for InvalidCastException.
2774
2775         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
2776
2777         * driver.c (mono_main): Add --debug=casts option to turn on better 
2778         InvalidCastException message details.
2779
2780         * mini.c (mini_get_debug_options): New helper function to return the address of
2781         the debug_options variable.
2782
2783         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
2784         the jit_tls TLS variable.
2785
2786         * mini.c (mono_jit_tls): New TLS variable.
2787
2788         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
2789         option is used.
2790
2791 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
2792
2793         * mini.h: Removed verifer related stuff. This code was moved to verify.c
2794
2795         * mini.c: Removed verifer related stuff, code moved to verify.c.
2796
2797         * driver.c: Using code from verify.c instead of mini.c.
2798
2799 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
2800
2801         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
2802         longer valid.
2803
2804 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
2805
2806         * mini.c (check_for_method_verify): Enabling verification of
2807         corlib if mono_verify_all is set. Bugs in the verifier preventing that
2808         have been fixed.
2809
2810 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
2811
2812         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
2813         caller saved registers as well.
2814         
2815         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
2816         saved registers as well.
2817
2818 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
2819
2820         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
2821
2822         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
2823         code.
2824
2825 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
2826
2827         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
2828         to get_call_info.
2829         (get_call_info): Take a gsctx argument instead of 'cfg'.
2830
2831 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
2832
2833         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
2834         mono_verify_all is set.
2835
2836         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
2837
2838         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
2839
2840 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
2841
2842         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
2843         an exception.
2844
2845         * driver.c mini.c mini.h: Add a --verify-all development option to test the
2846         verifier and the code generated by the compiler.
2847
2848 2008-03-25  Mark Probst  <mark.probst@gmail.com>
2849
2850         * mini.c: Generic sharing of the non-nullable case of the box
2851         instruction.
2852
2853 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
2854
2855         * inssel.brg: Fix the build.
2856
2857         * iltests.il.in: Add a test for lconv.ovf.u8.un.
2858
2859 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
2860
2861         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
2862         Array:Address. Fixes #372410.
2863
2864         * iltests.il.in: New tests for readonly prefix.
2865
2866 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
2867
2868         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
2869         mini-trampolines.c.
2870
2871         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
2872         mini-exceptions.c.
2873
2874         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
2875         
2876         * mini.c (mono_decompose_op_imm): New helper function.
2877
2878         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
2879         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
2880         return value.
2881
2882         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
2883         mono_arch_output_basic_block. Fix warnings.
2884
2885         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
2886         for now.
2887
2888 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
2889
2890         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
2891         since the extra frame is now detected automatically inside the loop.
2892
2893         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
2894         opts which are now in mono_peephole_ins ().
2895         
2896         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
2897
2898         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
2899         frames and skip duplicate managed-to-native frames. Fixes #367665.
2900
2901         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
2902         opts which are now in mono_peephole_ins ().
2903         (mono_arch_peephole_pass_2): Ditto.
2904
2905         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
2906
2907         * mini-codegen.c (mono_peephole_ins): New helper function containing the
2908         arch independent peephole optimizations.
2909
2910         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
2911         opts which are now in mono_peephole_ins ().
2912
2913         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
2914         
2915         * mini-s390.c (mono_arch_output_basic_block): Fix build.
2916
2917         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
2918         pattern.
2919
2920         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
2921         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
2922         opcode. 
2923
2924 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
2925
2926         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
2927         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
2928         return value.
2929
2930         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
2931         mono_arch_output_basic_block. Fix warnings.
2932
2933 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
2934
2935         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
2936         conv.ovf.u.un.
2937
2938 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
2939
2940         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
2941         conv.ovf.u.un.
2942
2943         * iltests.il: Add new tests.
2944
2945 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
2946
2947         * mini.c: Removed Windows version macros.
2948
2949 2008-03-20  Mark Probst  <mark.probst@gmail.com>
2950
2951         * generic-sharing.c: Put reflection types in the extensible part
2952         of the runtime generic context.
2953
2954         * mini.c: Generic sharing of the GetTypeHandle special case of the
2955         ldtoken instruction.
2956
2957 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
2958
2959         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
2960
2961         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
2962         
2963         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
2964         consistency with the other version on the linear IR branch.
2965
2966         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
2967
2968         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
2969
2970         * iltests.il.in: Add new tests.
2971
2972 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
2973
2974         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
2975
2976         * iltests.il.in: Add new tests.
2977
2978 2008-03-19  Mark Probst  <mark.probst@gmail.com>
2979
2980         * mini.c: Two variables with the same name were declared in
2981         nesting contexts and one wasn't initialized.  Fixed.
2982
2983 2008-03-19  Mark Probst  <mark.probst@gmail.com>
2984
2985         * mini.c: Generic sharing of the initobj instruction.
2986
2987 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
2988
2989         * mini.c: make the test to optimize ldtoken from typeof() more
2990         precise.
2991
2992 2008-03-18  Mark Probst  <mark.probst@gmail.com>
2993
2994         * mini.c: Generic sharing of the initobj instruction for reference
2995         types.
2996
2997 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
2998
2999         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
3000         the mono_breakpoint_clean_code() code to perform bound checks.
3001
3002 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
3003
3004         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
3005         mono_arch_patch_callsite() to include the start of the managed method
3006         to be able to perform bound checks.
3007
3008 2008-03-17  Mark Probst  <mark.probst@gmail.com>
3009
3010         * mini.c: Generic sharing for the isinst instruction.
3011
3012 2008-03-17  Mark Probst  <mark.probst@gmail.com>
3013
3014         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
3015         inssel-long32-mips.brg: Added opcodes for doing indirect calls
3016         with the runtime generic context argument.
3017
3018         * mini.c: Share calls to several types of unsharable methods by
3019         putting the address of the method code in the runtime generic
3020         context and doing an indirect call.
3021
3022         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
3023         to switches.
3024
3025 2008-03-16  Mark Probst  <mark.probst@gmail.com>
3026
3027         * generic-sharing.c: Change due to a change in the runtime genric
3028         context API.
3029
3030 2008-03-15  Martin Baulig  <martin@ximian.com>
3031
3032         * tramp-x86.c
3033         (mono_arch_nullify_class_init_trampoline): Add call to
3034         mono_breakpoint_clean_code() to make things work when running
3035         inside the debugger.
3036
3037         * tramp-amd64.c
3038         (mono_arch_nullify_class_init_trampoline): Add call to
3039         mono_breakpoint_clean_code() to make things work when running
3040         inside the debugger.
3041
3042 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
3043
3044         * inssel-long.brg (reg): Fix 64 bit build.
3045
3046 2008-03-14  Mark Probst  <mark.probst@gmail.com>
3047
3048         * mini.c, mini.h: Share static generic code by passing it an
3049         implicit argument pointing to the runtime generic context.
3050
3051         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
3052         inssel-long32-mips.brg: New opcodes for calling shared static,
3053         which need to be passed the runtime generic context.
3054
3055         * mini-amd64.c, mini-x86.c: Save the runtime generic context
3056         argument on the stack in the prologue if needed.  New function for
3057         finding the runtime generic context argument from the registers
3058         saved by the trampoline.
3059
3060         * mini-amd64.h, mini-x86.h: Specify which register to use for the
3061         runtime generic context argument.
3062
3063         * tramp-amd64.c: Also restore the register used for the runtime
3064         generic context argument.
3065
3066         * mini-trampoline.c: Resolve shared static calls by consulting the
3067         runtime generic context via the new argument.
3068
3069         * generic-sharing.c: Add an argument to sharability-checking
3070         functions that specifies whether type variables should be treated
3071         as sharable type arguments.
3072
3073         * inssel-x86.brg: Removed a superfluous, buggy rule.
3074
3075         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
3076         to switches.
3077
3078 2008-03-14  Martin Baulig  <martin@ximian.com>
3079
3080         * debug-debugger.c (main_thread_handler): Call
3081         mono_runtime_run_main() without sending any notifications.
3082
3083         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
3084
3085 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
3086
3087         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
3088
3089 2008-03-14  Mark Probst  <mark.probst@gmail.com>
3090
3091         * tramp-x86.c: Fixed register restore offsets in the trampoline
3092         code for ECX and EDX.
3093
3094 2008-03-12  Geoff Norton  <gnorton@novell.com>
3095
3096         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
3097         different ucontext_t implementations.
3098         * exceptions-arm.c: Use the above defines to get exceptions working on 
3099         iPhone (based on a patch by Luke Howard lukeh@padl.com)
3100         * mini-arm.c: Implement iPhone icache support (based on a patch by
3101         Luke Howard lukeh@padl.com)
3102
3103 2008-03-12  Mark Probst  <mark.probst@gmail.com>
3104
3105         * mini.c: Enable generic sharing of calls to non-static
3106         non-interface non-generic non-value-type methods.
3107
3108         * mini-trampolines.c: Resolve calls from shared generic code.
3109
3110 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
3111
3112         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
3113
3114         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
3115
3116 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
3117
3118         * mini.c: some fixes for the AOT compiler.
3119
3120 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
3121
3122         * cpu-amd64.md: Add clob:1 to some float opcodes.
3123
3124 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
3125
3126         * mini.h: Added MiniVerifierMode enumeration.
3127
3128         * mini.c: Added mini_verifier_set_mode to control
3129         the usage of the new verifier.
3130
3131         * mini.c (mono_method): Integrated the new verifier.
3132
3133         * driver.c: Extended --security option with validil and
3134         verifiable options to activate the new verifier.
3135
3136 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
3137
3138         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
3139         optimization to ctors taking 0 or 2 arguments too.
3140
3141         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
3142         a bit.
3143
3144         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
3145
3146         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
3147
3148 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
3149
3150         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
3151         non-aot case as well.
3152
3153         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
3154
3155         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
3156         changes.
3157
3158         * aot-compiler.c (encode_patch): Ditto.
3159
3160         * mini.h (G_MININT32): Fix the definition of this.
3161
3162 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
3163
3164         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
3165
3166         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
3167
3168 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
3169
3170         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
3171         methods returning vtypes in registers.
3172         (mono_arch_allocate_vars): Ditto.
3173
3174         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
3175
3176         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
3177
3178         * generics.cs: Add a test from the linear IR branch.
3179
3180         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
3181
3182         * mini.c (inline_method): Cache failed inline attempts.
3183
3184 2008-03-04  Mark Probst  <mark.probst@gmail.com>
3185
3186         * mini.c: For shared methods of generic classes put the location
3187         of "this" into the MonoGenericJitInfo.
3188
3189         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
3190         register out of a MonoContext by register number.  Add the generic
3191         sharing context as an argument to mono_arch_find_this_argument().
3192
3193         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
3194         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
3195         for new arch function.
3196
3197         * mini-exception.c: Handle open exception clauses in shared
3198         generic code.
3199
3200         * mini-trampolines.c: Supply additional argument to
3201         mono_arch_find_this_argument().
3202
3203 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
3204
3205         * Makefile.am (regtests): Run the bench.exe tests last.
3206
3207 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
3208
3209         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
3210         a bit.
3211
3212 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
3213
3214         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
3215         with MS.
3216
3217         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
3218         
3219         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
3220
3221         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
3222         whose class has no cctor.
3223
3224         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
3225
3226 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
3227
3228         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
3229         unverified.
3230
3231 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
3232
3233         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
3234         to be in sync with the code on the linear IR branch.
3235
3236         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
3237
3238         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
3239
3240 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
3241
3242         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
3243
3244         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
3245
3246         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
3247
3248         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
3249
3250         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
3251         
3252         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
3253         body.
3254
3255 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
3256
3257         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
3258         OP_LOADR4_MEMBASE emission.
3259
3260         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
3261         (mono_spillvar_offset_float): Ditto.
3262
3263         * mini-mips.c (mono_arch_emit_prolog): Ditto.
3264
3265         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
3266         emission.
3267
3268         * basic-long.cs: Add regression tests for them.
3269
3270         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
3271         use.
3272         (mono_arch_allocate_vars): Fix representation of single-precision float
3273         argument.
3274         (mono_arch_output_basic_block): Ditto.
3275
3276         * inssel-mips.brg: Ditto, remove duplicate items.
3277
3278         * mini-mips.c (emit_load_volatile_arguments): New function to handle
3279         arguments of tail calls as on other platforms.
3280         (mono_arch_output_basic_block): Handle tail calls.
3281
3282         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
3283         register.
3284
3285         * objects.cs (test_5_pass_static_struct): Add test for it.
3286
3287         Contributed under MIT/X11 license.
3288
3289 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
3290
3291         * Makefile.am: Use gmcs for compiling the regression tests.
3292
3293         * *.2.cs *.2.il: Rename to *.cs and *.il.
3294
3295 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
3296
3297         * regalloc.h: Make the vassign array smaller.
3298
3299         * mini.c (mini_method_compile): Remove an unused field in cfg.
3300
3301         * mini-codegen.c: Add a bunch of micro optimizations.
3302
3303 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
3304
3305         * regalloc.h: Remove some unused fields.
3306
3307 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
3308
3309         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
3310
3311         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
3312
3313 2008-02-22  Mark Probst  <mark.probst@gmail.com>
3314
3315         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
3316
3317         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
3318         trampoline: Fetch an entry from the runtime generic context.  If
3319         it's NULL, jump to the actual trampoline to fill the runtime
3320         generic context.  Otherwise, return it.
3321
3322         * mini.c: Call the lazy fetch trampoline to get entries out of the
3323         runtime generic context.
3324
3325         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
3326         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
3327         tramp-sparc.c: Stubs for the lazy fetch trampoline.
3328
3329 2008-02-21  Mark Probst  <mark.probst@gmail.com>
3330
3331         * mini.c: Fetch data out of the extensible part of the runtime
3332         generic context instead of calling a helper function.
3333
3334         * generic-sharing.c: Some functions moved into
3335         metadata/generic-sharing.c.  Helper function for fetching other
3336         types now checks and asserts against extensible rgctx (just for
3337         debugging purposes - the helper function isn't called anymore
3338         unless for debugging).
3339
3340 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
3341
3342         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
3343         for tail calls up to the point that the tests in iltests.exe run. Also add a
3344         dummy CKFINITE implementation.
3345         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
3346         needed for trampoline LMF frames.
3347
3348         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
3349         trampoline LMF frames.
3350
3351 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
3352
3353         * mini.c (inline_method): clean any pending loader error when inlining fail.
3354         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
3355
3356 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
3357
3358         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
3359
3360         * aot-runtime.c (decode_patch_info): Ditto.
3361
3362         * mini.c (mono_resolve_patch_target): Ditto.
3363         
3364         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
3365         icall wrappers.
3366
3367         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
3368         
3369         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
3370         if it references an icall address.
3371
3372 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
3373
3374         * cpu-s390x.md: Remove some more unused opcodes.
3375         
3376         * cpu-s390x.md: Remove some unused opcodes.
3377
3378         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
3379         mono_op_imm_to_op ().
3380
3381         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
3382         instead of a switch statement.
3383         
3384         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
3385         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
3386
3387         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
3388         
3389         * mini-codegen.c: Remove unused mono_regstate2_... functions.
3390
3391         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
3392         -1.
3393
3394 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
3395
3396         * driver.c (mono_main): Improve error reporting when an assembly cannot be
3397         opened. Fixes #362607.
3398
3399         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
3400
3401         * iltests.il.in: Add a test for static methods in interfaces.
3402
3403 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
3404
3405         * genmdesc.c (build_table): Fix a crash on older glib versions.
3406
3407         * cpu-sparc.md: Remove some unused opcodes.
3408         
3409         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
3410         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
3411
3412         * cpu-amd64.md: Remove some unused opcodes.
3413
3414         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
3415         like the other opcodes.
3416
3417 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
3418
3419         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
3420
3421         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
3422
3423         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
3424         variables 'cfg' instead of 'm' for consistency.
3425
3426         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
3427
3428         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
3429         argument holding the vtype return address, to avoid the ambigious use of
3430         cfg->ret for this purpose.
3431
3432         * mini.c (NEW_RETLOADA): Use vret_addr if set.
3433
3434         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
3435         
3436         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
3437         new mono_print_ins () function which only takes one argument.
3438
3439 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
3440
3441         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
3442         macro arguments.
3443
3444 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
3445
3446         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
3447
3448         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
3449
3450         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
3451         opcodes and other small changes.
3452
3453         * mini-ops.h: Add some new opcodes from the linear IR branch.
3454
3455         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
3456
3457         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
3458         opcodes, use the REG_MEMBASE opcodes instead.
3459         
3460         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
3461         opcodes, use the REG_MEMBASE opcodes instead.
3462         
3463         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
3464         linear IR branch.
3465
3466         * mini.c (mono_op_imm_to_op): New helper function.
3467
3468         * mini-ops.h: Add some opcodes from linear IR branch.
3469
3470 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
3471
3472         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
3473         <tsv@solvo.ru>.
3474
3475 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
3476
3477         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
3478         OP_ICONV_TO_R4/R8.
3479
3480         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
3481
3482 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
3483
3484         * aot-compiler.c (emit_method_code): Add an assert.
3485
3486         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
3487         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
3488         methods.
3489
3490 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
3491
3492         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
3493         some load/store opcodes so they are consistent. 
3494         (mono_arch_emit_prolog): Simplify some code.
3495
3496         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
3497
3498         * objects.cs: Add tests for large argument offsets on ARM.
3499
3500         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
3501         stack offsets. Fixes #359651.
3502
3503         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
3504
3505         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
3506
3507         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
3508
3509         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
3510
3511         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
3512
3513         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
3514         rid of CEE_CONV_R_UN.
3515
3516         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
3517
3518 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
3519
3520         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
3521
3522         * mini.c (mono_normalize_opcodes): Add some more opcodes.
3523
3524         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
3525
3526         * cpu-amd64.md: Remove some unused opcodes.
3527
3528         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
3529
3530         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
3531
3532         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
3533         arch specific functions for its parts. Call the peephole pass after local
3534         regalloc so the prolog can compute a more accurate max_offset.
3535         
3536         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
3537         the corresponding OP_I/OP_L opcodes.
3538
3539         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
3540
3541         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
3542
3543 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
3544
3545         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
3546         as they are handled in mini.c.
3547
3548         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
3549         
3550         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
3551         case since it is handled in mini.c.
3552
3553         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
3554
3555         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
3556
3557         * *.c: Use the new opcodes in the IR and back end code.
3558
3559         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
3560
3561         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
3562
3563 2008-02-06  Mark Probst  <mark.probst@gmail.com>
3564
3565         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
3566         an assert because it has a race condition.
3567
3568 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
3569
3570         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
3571
3572         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
3573
3574         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
3575
3576         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
3577         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
3578
3579 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
3580
3581         * cpu-amd64.md (move): Correct the maximum size of move.
3582
3583 2008-02-05  Mark Probst  <mark.probst@gmail.com>
3584
3585         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
3586         the generic class init trampoline to return quickly if the class
3587         is already inited.
3588
3589 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
3590
3591         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
3592         issues where an 32 bit callsite cannot be patched by a 64 bit address.
3593
3594 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
3595
3596         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
3597         branch.
3598
3599 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
3600
3601         * objects.cs: Add some soft-float tests.
3602
3603         * mini.c: Fix a couple more soft-float issues.
3604
3605         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
3606
3607         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
3608         avoid a REX prefix.
3609
3610 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
3611
3612         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
3613         exception happens while compiling a virtual method.
3614
3615 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
3616
3617         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
3618         
3619         * mini-sparc.c: Fix build.
3620
3621         * mini-sparc.c (get_call_info): Add support for generic sharing.
3622
3623         * mini-exceptions.c: Add a FIXME.
3624
3625 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
3626
3627         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
3628         altstack handling code.
3629
3630         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
3631         
3632         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
3633
3634         * mini-s390.c: Add support for generic sharing.
3635
3636         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
3637         Fix CAS on s390.
3638         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
3639
3640         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
3641
3642         * mini-s390x.c: Add support for generic sharing.
3643         
3644         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
3645         Fix CAS on ia64.
3646         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
3647
3648         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
3649         can be used since it takes a 16 bit signed immediate.
3650
3651         * inssel-s390x.brg: Fix OP_SETRET.
3652
3653         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
3654
3655         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
3656
3657         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
3658
3659         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
3660
3661         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
3662         in one place.
3663
3664         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
3665         stuff.
3666
3667         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
3668         of the unused mono_arch_patch_delegate_trampoline stuff.
3669
3670 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
3671
3672         * basic-long.cs: Move the fp related tests to basic-float.cs.
3673
3674         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
3675
3676         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
3677
3678         * basic-calls.cs: Add a test for proper float argument passing.
3679
3680         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
3681         if the context corresponds to an exception received through a signal.
3682
3683         * exceptions.cs: Add a test for nullref handling at the start of a try
3684         clause.
3685
3686         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
3687
3688         * jit-icalls.c (mono_break): New JIT icall.
3689
3690         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
3691
3692         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
3693
3694 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
3695
3696         * cpu-*.md: Get rid of unused opcodes.
3697
3698         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
3699
3700         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
3701         by all platforms.
3702
3703         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
3704         define.
3705
3706         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
3707         the arch independent trampoline code in mini-trampolines.c.
3708
3709         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
3710
3711         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
3712
3713         * mini-s390.h: Remove an unused define.
3714         
3715         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
3716         the arch independent trampoline code in mini-trampolines.c.
3717
3718         * mini-arm.c (mono_arch_emit_prolog): Fix build.
3719
3720 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
3721
3722         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
3723
3724         * mini-s390.c (mono_arch_emit_prolog): Fix build.
3725
3726         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
3727
3728         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
3729
3730         * cpu-amd64.md: Use smaller sizes for int opcodes.
3731
3732         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
3733
3734         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
3735         objects.cs.
3736
3737         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
3738         debugging.
3739
3740         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
3741         instead of though a pointer to save an indirection when accessing elements of
3742         the array.
3743
3744         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
3745         some typos.
3746         (NOT_IMPLEMENTED): New helper macro.
3747         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
3748         of a bb.
3749
3750         * *.c: Use the new helper macro.
3751
3752 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
3753
3754         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
3755
3756 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
3757
3758         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
3759         stack slots.
3760
3761 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
3762
3763         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
3764         profiling is enabled.
3765         
3766         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
3767         the end.
3768         (mono_arch_emit_prolog): Add more first bblock optimizations.
3769
3770         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
3771         in order if possible.
3772         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
3773         bblock, since the arguments are still in their original registers.
3774
3775         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
3776
3777 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
3778
3779         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
3780         as well.
3781
3782         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
3783         offset 0.
3784
3785         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
3786
3787         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
3788         process async exceptions received while in unmanaged code.
3789
3790         * mini.c (mini_init): Install a callback with the runtime which will be called
3791         when a thread receives an async exception while in unmanaged code.
3792
3793         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
3794
3795         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
3796
3797 2008-01-16  Wade Berrier  <wberrier@novell.com>
3798
3799         * cpu-g4.md:
3800         * cpu-arm.md:
3801         * cpu-s390x.md:
3802         fix build
3803
3804 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
3805
3806         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
3807         compilation with sun cc.
3808
3809         * cpu-*.md: Fix the build.
3810
3811         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
3812
3813         * mini-amd64.h: Add some comments to the MonoLMF structure.
3814
3815         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
3816         
3817         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
3818         in the LMF structure if possible. This saves two instructions in the
3819         managed->native wrappers.
3820
3821         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
3822
3823 2008-01-16  Mark Probst  <mark.probst@gmail.com>
3824
3825         * generic-sharing.c: New type argument lookup code which uses the
3826         runtime generic context template.
3827
3828 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
3829
3830         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
3831
3832         * mini-arm.c (add_general): Fix arm eabi parameter passing.
3833         (mono_arch_output_basic_block): Fix localloc implementation.
3834
3835         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
3836
3837         * mini-ia64.c (peephole_pass): Fix ia64 build.
3838
3839         * mini-amd64.c (peephole_pass): Fix a warning.
3840         
3841         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
3842         at a constant offset from sp/fp.
3843
3844         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
3845         instead of obtaining it from *lmf in the managed method case.
3846
3847 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
3848
3849         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
3850
3851 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
3852
3853         * mini.h (MonoInstList): New type.
3854         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
3855         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
3856         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
3857         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
3858         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
3859         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
3860         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
3861         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
3862         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
3863         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
3864         MONO_INST_LIST_FOR_EACH_ENTRY,
3865         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
3866         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
3867         mono_inst_list_first, mono_inst_list_last,
3868         mono_inst_list_next, mono_inst_list_prev): New instruction
3869         list handling interfaces.
3870         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
3871         list head 'ins_list'.
3872         (MonoInst): Replace next pointer with list head 'node'.
3873         (MonoCallInst): Make 'out_args' a MonoInstList.
3874         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
3875         (MonoCompile): Delete reverse_inst_list and
3876         reverse_inst_list_len.
3877         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
3878         mono_arch_lowering_pass, mono_arch_local_regalloc,
3879         mono_arch_output_basic_block, mono_arch_emit_prolog):
3880         Convert to new instruction lists.
3881         (insert_after_ins): Delete.
3882         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
3883         instruction lists.
3884         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
3885         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
3886         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
3887         mono_emulate_opcode, mono_emit_load_got_addr,
3888         inline_method, mono_method_to_ir, mono_print_bb_code,
3889         print_dfn, decompose_pass, nullify_basic_block,
3890         replace_out_block_in_code, remove_block_if_useless,
3891         merge_basic_blocks, move_basic_block_to_end,
3892         try_unsigned_compare, optimize_branches, mono_print_code,
3893         mini_select_instructions, remove_critical_edges): Likewise.
3894         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
3895         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
3896         mono_arch_output_basic_block, mono_arch_emit_prolog):
3897         Likewise.
3898         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
3899         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
3900         mono_arch_output_basic_block): Likewise.
3901         (inst_list_prepend, insert_after_ins): Delete.
3902         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
3903         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
3904         instruction lists.
3905         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
3906         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
3907         mono_arch_emit_prolog): Likewise.
3908         * cfold.c (mono_constant_fold): Likewise.
3909         * liveness.c (visit_bb, mono_analyze_liveness,
3910         optimize_initlocals): Likewise.
3911         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
3912         * graph.c (mono_draw_code_cfg): Likewise.
3913         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
3914         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
3915         mono_ssa_cprop): Likewise.
3916         * abcremoval (get_relations_from_previous_bb, process_block):
3917         Likewise.
3918         * local-propagation (mono_cprop_invalidate_values,
3919         mono_local_cprop_bb): Likewise.
3920         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
3921         peephole_pass, mono_arch_output_basic_block,
3922         mono_arch_emit_prolog): Likewise.
3923         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
3924         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
3925         mono_arch_emit_prolog): Likewise.
3926         (insert_after_ins): Delete.
3927         * aliasing.c (print_code_with_aliasing_information,
3928         mono_build_aliasing_information, mono_aliasing_deadce):
3929         Convert to new instruction lists.
3930         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
3931         peephole_pass, NEW_INS, mono_arch_lowering_pass,
3932         mono_arch_local_regalloc, mono_arch_output_basic_block):
3933         Likewise.
3934         (insert_after_ins): Delete.
3935         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
3936         peephole_pass, mono_arch_output_basic_block): Convert to
3937         new instruction lists.
3938         * mini-codegen (InstList, inst_list_prepend,
3939         insert_after_ins): Delete.
3940         (insert_before_ins, get_register_force_spilling,
3941         get_register_spilling, free_up_ireg, free_up_reg,
3942         create_copy_ins, create_spilled_store, alloc_int_reg,
3943         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
3944         to new instruction lists.
3945         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
3946         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
3947         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
3948         (insert_after_ins): Delete.
3949         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
3950         mono_arch_local_regalloc, mono_arch_output_basic_block,
3951         mono_arch_call_opcode): Convert to new instruction lists.
3952         (insert_after_ins): Delete.
3953         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
3954         peephole_pass, mono_arch_output_basic_block,
3955         mono_arch_emit_prolog): Convert to new instruction lists.
3956
3957 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
3958
3959         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
3960
3961         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
3962         Fixes #353182.
3963
3964         * Makefile.am (version.h): Make this work with non-bash shells.
3965
3966 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
3967
3968         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
3969
3970 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
3971
3972         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
3973         the InitializeArray optimization.
3974
3975 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
3976
3977         * mini.c driver.c: Don't include os/gc_wrapper.h.
3978
3979 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
3980
3981         * mini.c (print_jit_stats): Print GC statistics if available.
3982
3983 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
3984
3985         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
3986
3987 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
3988
3989         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
3990
3991 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
3992
3993         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
3994         
3995         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
3996
3997         * driver.c (mono_main): Ditto.
3998
3999 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
4000
4001         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
4002
4003         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
4004         in the vtable can't be encoded.
4005         (compile_method): Ditto.
4006
4007 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
4008
4009         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
4010         defined.
4011
4012         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
4013         lmf->rbp.
4014
4015         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
4016         the top LMF entry belongs to the current method.
4017
4018         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
4019
4020 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
4021
4022         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
4023         
4024         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
4025
4026         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
4027
4028         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
4029
4030         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
4031
4032         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
4033         implementation.
4034
4035         * basic-float.cs: Add an ulong->double cast test.
4036
4037 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
4038
4039         * mini.c (mono_method_to_ir): Fix a warning.
4040
4041 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
4042
4043         * mini-ops.h: Add OP_SWITCH.
4044
4045         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
4046         CEE_SWITCH in back-end code, use OP_SWITCH instead.
4047
4048 2007-12-11  Geoff Norton  <gnorton@novell.com>
4049
4050         * mini-s390x.c: Minor change to the MAX() define to allow
4051         it to compile with other gcc versions.
4052
4053 2007-12-11  Geoff Norton  <gnorton@novell.com>
4054
4055         * cpu-s390x.md:
4056         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
4057
4058 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
4059
4060         exceptions-arm.c (mono_arch_get_restore_context): Restore
4061         the frame pointer.
4062
4063         exceptions-arm.c (throw_exception): Save the frame pointer.
4064         This is a partial fix for #323747. Only the client side is
4065         fixed.
4066
4067 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
4068
4069         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
4070         was using an unrelated variable to log the class which
4071         needed the cctor to be called. This was crashing on arm.
4072
4073 2007-12-09  Robert Jordan  <robertj@gmx.net>
4074
4075         * mini-x86.c (mono_arch_emit_epilog):
4076         Consider all kinds of 64-bit types. Fixes #323114.
4077
4078 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
4079
4080         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
4081
4082 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
4083
4084         * mini-amd64.c (peephole_pass): Add a missing instruction check.
4085
4086 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
4087
4088         * mini.c: run type ctor before allocating an object, not only
4089         when running it's constructor method (fixes at least part of bug #342507).
4090
4091 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
4092         
4093         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
4094         
4095         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
4096         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
4097         function.
4098
4099         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
4100         mono_generic_class_init_trampoline () the same as it is done with the other
4101         trampolines.
4102
4103         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
4104         aot-runtime.c aot-compiler.c: Implement AOT support.    
4105
4106 2007-12-07  Mark Probst  <mark.probst@gmail.com>
4107
4108         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
4109         build for archs which don't have the vtable trampoline defined
4110         yet.
4111
4112 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
4113
4114         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
4115
4116         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
4117
4118         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
4119
4120         * tramp-<ARCH>.c: Use the new helper function.
4121
4122 2007-12-07  Mark Probst  <mark.probst@gmail.com>
4123
4124         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
4125         trampoline call, which takes a vtable argument.
4126
4127         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
4128         OP_TRAMPCALL_VTABLEs like other calls.
4129
4130         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
4131         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
4132         call.  Implemented a support function which fetches the vtable
4133         from a register set.
4134
4135         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
4136         Implemented a generic class init trampoline, using the
4137         OP_TRAMPCALL_VTABLE opcode.
4138
4139         * mini.c: Implemented static field access when sharing generic
4140         code.  This implies initing the class using the new
4141         OP_TRAMPCALL_VTABLE call.
4142
4143 2007-12-07  Mark Probst  <mark.probst@gmail.com>
4144
4145         * mini.c: Don't compile methods with sharing enabled if their
4146         classes are disabled for sharing.
4147
4148 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
4149
4150         * inssel.brg: Add a missing sign extension to the GETCHR and array access
4151         opcodes. Fixes #346563.
4152
4153         * objects.cs: Add a new test.
4154
4155         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
4156
4157         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
4158         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
4159
4160 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
4161
4162         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
4163
4164 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
4165
4166         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
4167         code stream.
4168
4169 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
4170
4171         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
4172
4173         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
4174         optimization in the AOT case.
4175         
4176 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
4177
4178         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
4179         
4180         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
4181
4182         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
4183
4184         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
4185
4186         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
4187         is created by the inlined delegate ctor.
4188
4189         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
4190
4191         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
4192
4193 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
4194
4195         * cpu-x86.md: Fix the length of ckfinite.
4196
4197 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
4198
4199         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
4200         
4201         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
4202         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
4203
4204         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
4205
4206         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
4207         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
4208
4209 2007-11-28  Martin Baulig  <martin@ximian.com>
4210
4211         * mini-x86.c
4212         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
4213         after creating the trampoline.
4214
4215 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
4216
4217         * aot-runtime.c (load_aot_module): Check runtime version if needed.
4218
4219         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
4220         the same version.
4221
4222         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
4223         instead of the calling method to help AOT.
4224
4225         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
4226
4227 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
4228
4229         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
4230         is defined.
4231
4232 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
4233
4234         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
4235         
4236         * aot-compiler.c (compile_method): Correct check for generic method definitions.
4237         (encode_method_ref): No need to handle generic method definitions specially.
4238
4239         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
4240
4241         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
4242         decode_klass_info.
4243
4244         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
4245         encode_klass_info.
4246         (compile_method): Enable generic sharing.
4247
4248 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
4249
4250         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
4251         (mini_method_compile): Add preliminary support for AOTing shared generic code.
4252
4253         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
4254         generic code.
4255
4256         * mini-trampolines.c: Fix a warning.
4257
4258         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
4259         NEW_PCONST.
4260         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
4261         (generic_class_is_reference_type): Remove unused function.
4262
4263         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
4264         in the generic vtable trampoline case.
4265
4266         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
4267         
4268         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
4269         return an AOT method based on a vtable slot.
4270
4271         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
4272
4273         * mini.c (mini_get_vtable_trampoline): Export this.
4274
4275 2007-11-22  Martin Baulig  <martin@ximian.com>
4276
4277         * debug-debugger.h
4278         (MonoDebuggerInfo): Move `debugger_version' up.
4279
4280 2007-11-22  Martin Baulig  <martin@ximian.com>
4281
4282         * mini-amd64.c
4283         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
4284
4285         * mini-trampolines.c
4286         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
4287         after compiling the method.
4288
4289 2007-11-20  Martin Baulig  <martin@ximian.com>
4290
4291         * debug-mini.c
4292         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
4293         (mono_debugger_remove_breakpoint): Likewise.
4294         (mono_debugger_check_breakpoints): Likewise.
4295
4296         * debug-debugger.c: Implement the new breakpoint interface here.
4297
4298 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
4299
4300         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
4301         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
4302
4303         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
4304
4305 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
4306
4307         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
4308
4309         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
4310         mini.c.
4311
4312         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
4313         mini.c.
4314
4315         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
4316         returning a vtype in a register.
4317
4318         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
4319         here from the arch specific code.
4320
4321         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
4322         mini.c.
4323
4324         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
4325         (mono_arch_emit_prolog): Increment maximum prolog size.
4326
4327         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
4328         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
4329
4330         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
4331         MonoGenericSharingContext.
4332
4333         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
4334         MonoGenericSharingContext. Allocate memory from the cfg mempool.
4335
4336 2007-11-15  Mark Probst  <mark.probst@gmail.com>
4337
4338         * mini.c, mini.h, generic-sharing.c: Functions for producing code
4339         which extract fields out of the runtime generic context.  Full
4340         sharing of the NEWARR opcode.
4341
4342 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
4343
4344         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
4345         --enable-minimal=ssa.
4346
4347 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
4348
4349         * mini-trampolines.c (mono_delegate_trampoline): Update after 
4350         mono_marshal_get_delegate_invoke () signature change.
4351
4352 2007-11-13  Mark Probst  <mark.probst@gmail.com>
4353
4354         * mini.c: Removed the shared context in favor of the generic
4355         sharing context.  Allocate the MonoJitInfo structure with room for
4356         the generic sharing context if it's needed.
4357
4358         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
4359         domain-internals.h now.
4360
4361         * mini-x86.c: Pass the generic sharing context to get_call_info ().
4362
4363         * generic-sharing.c: Several changes for working without a shared
4364         context and instead operating on open types instead.
4365
4366 2007-11-12  David S. Miller  <davem@davemloft.net>
4367
4368        * inssel-sparc.brg: Fix double instruction emit.
4369
4370 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
4371
4372         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
4373         Get/Set/Address methods.
4374         
4375         * mini.c debug-debugger.c mini-trampolines.c: Update after 
4376         mono_marshal_get_delegate_invoke signature change.
4377
4378 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
4379
4380         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
4381         This can happens with dynamic methods. Fixes the other bug in #322722.
4382
4383 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
4384
4385         * tramp-arm.c (mono_arch_patch_callsite): Support patching
4386         BX call sequence.
4387
4388         * mini-arm.c (arm_patch): Implement patching of BX call
4389         sequence. Fixes one of the bugs in #322722.
4390
4391 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
4392
4393        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
4394        under Linux.  We only need to flush every 32-byte cache line.    
4395
4396 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
4397
4398         * mini.c:
4399         move_basic_block_to_end: Add branches when needed, eventually creating
4400         a new BB.
4401         optimize_branches: added a parameter that tells if it's ok to create
4402         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
4403         and avoid calling move_basic_block_to_end when it's not ok.
4404         Fixes bug 318677.
4405
4406 2007-11-07  Mark Probst  <mark.probst@gmail.com>
4407
4408         * mini.c: Abort inlining call to InitializeArray if something
4409         looks wrong.  Let the icall handle it, which now has proper safety
4410         checks.
4411
4412 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
4413
4414         * mini.c (mono_spill_call): add support for soft-float.
4415
4416         * mini.c (mono_method_to_ir): add support for soft-float
4417         to inlined functions that return float.
4418
4419         * mini.c (mono_method_to_ir): add support for soft-float
4420         to cee_stsfld opcode on float fields.
4421
4422 2007-11-05  Geoff Norton  <gnorton@novell.com>
4423
4424         * mini-x86.h: Fix the structure access for X86 Leopard.
4425
4426
4427 2007-11-05  Martin Baulig  <martin@ximian.com>
4428
4429         * mini-trampolines.c
4430         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
4431         after compiling the method to notify the debugger.
4432
4433 2007-11-05  Martin Baulig  <martin@ximian.com>
4434
4435         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
4436
4437 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
4438
4439         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
4440         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
4441
4442 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
4443
4444         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
4445         native-to-managed wrappers.
4446         
4447 2007-11-01  Geoff Norton  <gnorton@novell.com>
4448
4449         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
4450         members.
4451
4452 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
4453
4454         * mini.c, mini-x86.c: when getting back from unmanaged code
4455         to managed via a marshaled delegate we also need to set the
4456         right domain.
4457
4458 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
4459
4460         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
4461         for amd64.
4462
4463 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
4464
4465         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
4466         let the debugger or other external agents to tell the JIT when
4467         a sw breakpoint has been inserted in the code that the JIT needs
4468         to be able to inspect.
4469
4470 2007-10-31  Martin Baulig  <martin@ximian.com>
4471
4472         * debug-debugger.h
4473         (MonoDebuggerInfo): Remove `runtime_class_init'.
4474
4475 2007-10-30  Martin Baulig  <martin@ximian.com>
4476
4477         * debug-mini.h
4478         (mono_debugger_thread_created): Added `MonoThread *' argument.
4479         (mono_debugger_extended_notification): New public method.
4480         (mono_debugger_trampoline_compiled): New public method.
4481
4482         * debug-mini.c
4483         (MonoDebuggerThreadInfo): Added `thread' and
4484         `extended_notifications' fields.
4485
4486         * debug-debugger.c
4487         (debugger_executable_code_buffer): New static variable.
4488
4489         * debug-debugger.h
4490         (MonoDebuggerInfo): Added `executable_code_buffer',
4491         `executable_code_buffer_size', `breakpoint_info_area',
4492         `breakpoint_table' and `breakpoint_table_size'.
4493
4494 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
4495
4496         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
4497         that IP  either is an unused value or the vtable pointer. IMT 
4498         calls use vtable + offset now. Reduced by almost half the size
4499         of IMT entries.
4500
4501 2007-10-26  Jonathan Chambers <joncham@gmail.com>
4502
4503         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
4504         defines to access param registers. Replace long usage with
4505         gsize as sizeof(long) != sizeof(void*) on Win64.
4506
4507         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
4508         on Win64. Fix intrinsic, use _AddressOfReturnAddress
4509         instead of non-existant _GetAddressOfReturnAddress.
4510
4511         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
4512         param registers. Save/restore %rdi and %rsi in MonoLMF.
4513
4514         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
4515         param registers. Modify (throw_exception) signature to take 
4516         %rdi and %rsi on Win64. 
4517
4518         Code is contributed under MIT/X11 license.
4519
4520 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
4521
4522         * helpers.c: unlink debugging output files.
4523
4524 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
4525
4526         * mini.c: Move mono_create_ftnptr () to object.c.
4527
4528 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
4529
4530         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
4531         optional. This function can now be used to disassemble code generated
4532         outside the JIT such as trampolines and IMT thunks.
4533
4534         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
4535
4536         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
4537         vtable pointer from a ldr instruction.
4538
4539         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
4540         new IMT call sequence.
4541
4542         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
4543         call sequence for interface invocations.
4544
4545         * mini-arm.c (mono_arch_emit_imt_argument): added, required
4546         for imt support. This function is empty since IMT on ARM requires no
4547         special handling on the IR side.
4548
4549         * mini-arm.c (mono_arch_find_imt_method): added, required for
4550         imt support.
4551
4552         * mini-arm.c (mono_arch_find_this_argument): added, required
4553         for imt support.
4554
4555         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
4556         a ldr instruction to load a value stored in the code stream.
4557
4558         * mini-arm.c (mono_arch_build_imt_thunk):added, required
4559         for imt support.
4560
4561
4562 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
4563
4564         * mini.c (mini_init): Install the jump trampoline callback.
4565
4566 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4567
4568         * mini-trampolines.c: handle synchronized methods with the common
4569         vtable trampoline (bug #335601).
4570
4571 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
4572
4573         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
4574
4575         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
4576         64 bit platforms.
4577
4578         * mini-ia64.h mini-ia64.c: Add support for IMT.
4579
4580         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
4581         prolog. Fixes #331958.
4582
4583 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
4584
4585         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
4586
4587 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4588
4589         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
4590         trampoline.
4591
4592 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4593
4594         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
4595         trampoline.
4596
4597 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
4598
4599         * mini-x86.c, mini-x86.h: x86 support for the common vtable
4600         trampoline.
4601
4602 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
4603
4604         * mini-trampolines.c: changed the magic rampoline to understand
4605         the common vtable trampoline method: the method to invoke is
4606         determined by the vtable displacement of the call.
4607
4608 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
4609
4610         * mini.c, mini.h: register the common vtable trampoline if the
4611         architecture supports it.
4612
4613 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4614
4615         * cpu-amd64.md: use the correct max length for tls_get.
4616
4617 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
4618
4619         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
4620         CEE_STELEM_ANY. Fixes #333696.
4621
4622 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
4623
4624         * exceptions-x86.c: provide more graceful handling of the case where
4625         we followed a bogus function pointer from managed code (bug #332866).
4626
4627 2007-10-11  Mark Probst  <mark.probst@gmail.com>
4628
4629         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
4630         replaces the generic_shared flag and will carry more information
4631         in the future.
4632
4633         * generic-sharing.c: Added mini_type_stack_size() which allows
4634         allows open types if given a generic sharing context.
4635         mini_get_basic_type_from_generic() takes a
4636         MonoGenericSharingContext* instead of a MonoCompile* now.
4637
4638         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
4639         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
4640         mini-sparc.c, mini-x86.c: Trivial changes required by the two
4641         changes above.  Just passing arguments through to the right
4642         places.
4643
4644 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
4645
4646         * mini-arm.c: unify the call emission to emit_code_seq().
4647
4648 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
4649
4650         * tramp-arm.c: reduced the trampoline size.
4651
4652 2007-10-10  Mark Probst  <mark.probst@gmail.com>
4653
4654         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
4655         variable handling out of arch-specific code.
4656
4657 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
4658
4659         * mini-arm.c: implemented fast delegate dispatch.
4660
4661 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
4662
4663         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
4664         that fp elimination is turned off if the space required by locals is too
4665         big. Fixes #331958.
4666
4667 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
4668
4669         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
4670         ARM to the new style trampoline.
4671
4672 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
4673
4674         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
4675
4676         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
4677
4678 2007-10-09  Martin Baulig  <martin@ximian.com>
4679
4680         * debug-debugger.h
4681         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
4682         `field_info_offset_offset'.     
4683
4684 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
4685
4686         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
4687         removed more internal usage of the r11 register and made it available
4688         to the register allocator.
4689
4690 2007-10-08  Mark Probst  <mark.probst@gmail.com>
4691
4692         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
4693         when sharing generics and treat type variables as references.
4694
4695 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
4696
4697         * mini-ppc.c: started removing the internal uses of register r11
4698         to eventually allow the register allocator to manage it as an
4699         additional available register.
4700
4701 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
4702
4703         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
4704
4705 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
4706
4707         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
4708         specific trampolines as they are not performance critical as a jump
4709         target (maybe align as before only for AOT code?). This saves about
4710         200 KB of native code on x86 for monodevelop startup.
4711
4712 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
4713
4714         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
4715         monodevelop startup.
4716
4717 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
4718
4719         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
4720
4721         * mini-sparc.h mini-sparc.c: Implement IMT support.
4722
4723         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
4724         its smaller and doesn't clobber sparc_g1.
4725
4726         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
4727
4728 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
4729
4730         * mini-ppc.c: optimized the size of the IMT thunks a bit.
4731
4732 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
4733
4734         * mini-ppc.c: implemented fast delegate invocation.
4735
4736 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
4737
4738         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
4739
4740 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
4741
4742         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
4743         code to the new style trampoline in preparation for IMT support.
4744
4745 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
4746
4747         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
4748         systems already. This also reduces the specific trampiline sizes and
4749         prepares for the use of r12 as the IMT identifier register.
4750
4751 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4752
4753         * mini-mips.h: endianess fix (simplified from a patch by
4754         Thomas Kunze <thommy@tabao.de>, bug #323737).
4755
4756 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
4757
4758         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
4759         to access ucontext fields and enable netbsd support
4760         (partially from Magnus Henoch <mange@freemail.hu>).
4761
4762 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4763
4764         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
4765         use the preprocessor from the CPP env var if it is set.
4766
4767 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
4768
4769         * mini-trampolines.c: fixed an assertion and moved it earlier in the
4770         code, before interface_offset gets used.
4771
4772 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
4773
4774         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
4775         mono_class_setup_vtable () before accessing klass->vtable.
4776
4777 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
4778
4779         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
4780         hackish.
4781
4782 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4783
4784         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
4785         IMT slots (this saves hundreds of KB of memory in programs like
4786         IronPython and Monodevelop).
4787
4788 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
4789
4790         * mini.c: print the delegate counter.
4791
4792 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
4793
4794         * mini-x86.c: make it easier to enable the debugging code for IMT
4795         slots.
4796
4797 2007-09-28  Martin Baulig  <martin@ximian.com>
4798
4799         * debug-debugger.h
4800         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
4801         `mono_method_klass_offset' and `mono_method_token_offset'.
4802
4803 2007-09-20  Mark Probst  <mark.probst@gmail.com>
4804
4805         * mini.c: First generics sharing implementation.  Can only share
4806         in very simple cases.  If sharing doesn't work it falls back to
4807         dedicated compilation.
4808
4809         * mini.h: Flag in MonoCompile to specify whether generic
4810         compilation is shared.  Flags enum for marking which generic inst
4811         of a context is used.  Prototypes for helper functions.
4812
4813         * generic-sharing.c: Helper functions for generic method sharing.
4814
4815         * optflags-def.h: Optimization flag (gshared) for enabling generic
4816         method sharing added.
4817
4818         * Makefile.am: generic-sharing.c added.
4819
4820 2007-09-19 Daniel Nauck <dna@mono-project.de>
4821
4822         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
4823
4824 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
4825         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
4826         fixes bug 325507.
4827
4828 2007-09-19  Martin Baulig  <martin@ximian.com>
4829
4830         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
4831         mono_debug_cleanup() is now part of mono_cleanup().
4832
4833 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
4834
4835         * driver.c (mono_main): Fix a warning.
4836
4837 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
4838
4839         * aot-compiler.c: Optimize various parts when processing large assemblies.
4840         Fixes ##325568.
4841
4842         * mini.c (mono_patch_info_hash): Improve hash function.
4843
4844 2007-09-14  Jonathan Chambers <joncham@gmail.com>
4845
4846         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
4847         
4848         Code is contributed under MIT/X11 license.
4849
4850 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
4851
4852         * mini.c (mini_init): Fix a leak.
4853
4854         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
4855
4856 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
4857
4858         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
4859
4860 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
4861
4862         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
4863
4864 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
4865
4866         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
4867         variance tests.
4868
4869         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
4870
4871         * mini.c (handle_alloc): Enable managed allocators in AOT code.
4872
4873         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
4874
4875         * aot-runtime.c (decode_patch_info): Ditto.
4876
4877 2007-09-12  Jonathan Chambers <joncham@gmail.com>
4878
4879         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
4880         static case. Cache delegates in architecture specific code, 
4881         based on number of parameters.
4882         
4883         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
4884         in architecture specific code, based on number of parameters.
4885         
4886         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
4887         caching happen in architecture specific code now.
4888         
4889         Code is contributed under MIT/X11 license.
4890
4891 2007-09-12  Jonathan Chambers <joncham@gmail.com>
4892
4893         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
4894         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
4895         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
4896
4897         Code is contributed under MIT/X11 license.
4898
4899 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
4900         * mini.c: (mono_thread_abort) Fixed bug #82416.
4901
4902 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
4903
4904         * mini.: hook the new managed GC allocation feature into the JIT.
4905
4906 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
4907
4908         * mini.c: implementation for the new runtime tls opcode.
4909
4910 2007-09-11  Martin Baulig  <martin@ximian.com>
4911
4912         * debug-debugger.h
4913         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
4914         `mono_method_inflated_offset'.
4915
4916 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
4917
4918         * driver.c mini.h mini.c: Add a new devel command line option for injecting
4919         async exceptions into a method.
4920
4921         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
4922         purpose of testing whenever the unwinder works at every instruction.
4923
4924 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
4925
4926         * mini.c: check accessibility of method used in ldftn (fixes
4927         bug #82635).
4928
4929 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
4930
4931         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
4932
4933         * inssel.brg: Fix a warning.
4934
4935 2007-09-03  Martin Baulig  <martin@ximian.com>
4936
4937         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
4938         now takes the `main_method' as argument.
4939
4940 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
4941
4942         * cpu-sparc.md (endfilter): Add missing src1:i argument.
4943
4944 2007-08-30  Jonathan Chambers <joncham@gmail.com>
4945
4946         * driver.c: include the cil-coff.h header on Windows.
4947         
4948         Code is contributed under MIT/X11 license.
4949
4950 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
4951
4952         * mini.c, driver.c: don't include the cil-coff.h header.
4953
4954 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
4955
4956         * mini.c: flag places that needs fixes fo soft-float support.
4957
4958 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
4959
4960         * mini.h, inssel-float.brg: fix soft-float constant loads on big
4961         endian systems (partially from Dean Jenkins, bug #81924).
4962
4963 2007-08-28  Mark Probst  <mark.probst@gmail.com>
4964
4965         * mini.c (check_linkdemand): Remove embedded reference object in
4966         call to LinkDemandSecurityException.
4967         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
4968         with an IntPtr instead of a reference object.
4969
4970 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
4971
4972         * mini.c (handle_initobj): Handle alignment properly.
4973
4974         * inssel.brg (mini_emit_memset): Ditto. 
4975
4976         * inssel.brg (mini_emit_memcpy): Ditto. 
4977
4978         * inssel-sparc.brg: Ditto.              
4979
4980         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
4981
4982 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
4983
4984         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
4985         exceptions raised in unmanaged code. Fixes part of #82594.
4986
4987 2007-08-24  Mark Probst  <mark.probst@gmail.com>
4988
4989         * mini.c (mono_method_to_ir), declsec.c
4990         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
4991
4992 2007-08-22  Martin Baulig  <martin@ximian.com>
4993
4994         * debug-mini.h
4995         (MonoDebuggerThreadInfo): New typedef.
4996         (mono_debugger_thread_table): New global variable.
4997         (mono_debugger_thread_created): New public function.
4998         (mono_debugger_thread_cleanup): New public function.
4999
5000         * debug-debugger.h
5001         (MonoDebuggerInfo):
5002         - removed `get_current_thread' and `lookup_assembly'.
5003         - removed `data_table'.
5004         - added `thread_table'.
5005
5006         * mini.c
5007         (mono_thread_start_cb): Call mono_debugger_thread_created().
5008         (mono_thread_attach_cb): Likewise.
5009         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
5010         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
5011         initial domain.
5012
5013         * driver.c (mono_main): Move mono_debug_init() up, before calling
5014         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
5015
5016 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5017
5018         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
5019         together when passing several arguments of type double (gives a small
5020         speedup and saves a few bytes of generated code).
5021
5022 2007-08-20  Jb Evain  <jbevain@novell.com>
5023
5024         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
5025
5026 2007-08-20  Jb Evain  <jbevain@novell.com>
5027
5028         * mini.c (mono_method_to_ir): throw MethodAccessException
5029         and FieldAccessException instead of InvalidProgramException.
5030
5031 2007-08-20  Mark Probst  <mark.probst@gmail.com>
5032
5033         * mini.c: CoreCLR security checks.
5034
5035         * mini.h: Removed MonoSecurityMode (moved to
5036         metadata/security-manager.h) and mono_security_mode global var
5037         (replaced by set/get functions in security-manager.h).
5038
5039         * driver.c: Added "core-clr-test" security mode for testing.  Used
5040         set-function for setting security mode.
5041
5042 2007-08-17  Mark Probst  <mark.probst@gmail.com>
5043
5044         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
5045         the new jit_info_table.
5046
5047         * driver.c: Test code for the new jit_info_table (enabled by the
5048         define MONO_JIT_INFO_TABLE_TEST).
5049
5050 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
5051
5052         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
5053         detection of call <REG> instruction sequence. Fixes build on freebsd.
5054
5055 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
5056
5057         * mini-exceptions.c: Fix a warning.
5058
5059 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
5060
5061         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
5062         stack overflow handling code on amd64 too.
5063
5064         * mini-exceptions.c (mono_setup_altstack): Make this use 
5065         mono_thread_get_stack_bounds ().
5066
5067         * mini-x86.h: Disable sigaltstack on solaris x86.
5068
5069 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
5070
5071         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
5072
5073 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
5074
5075         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
5076
5077 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
5078
5079         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
5080
5081         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
5082
5083 2007-08-03  Neale Ferguson <neale@sinenomine.net>
5084
5085         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
5086         due to alignment.
5087
5088 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
5089
5090         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
5091         to be emitted (bug #82281).
5092
5093 2007-08-01  Martin Baulig  <martin@ximian.com>
5094
5095         Merged the `debugger-dublin' branch.
5096
5097         * debug-debugger.h (MonoDebuggerInfo):
5098         Removed the `old_*' compatibility entries.
5099         Added `debugger_version' and `data_table'.
5100         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
5101         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
5102
5103         * debug-mini.c
5104         (MiniDebugMethodBreakpointInfo): Add `address_list'.
5105         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
5106         instead of a `gconstpointer'.
5107         (mono_debugger_insert_method_breakpoint): Return a
5108         `MonoDebugMethodAddressList *'.
5109
5110 2007-06-28  Martin Baulig  <martin@ximian.com>
5111
5112         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
5113
5114 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
5115
5116         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
5117         __builtin_frame_address () since it is broken on older gcc versions.
5118
5119 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
5120
5121         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
5122         on the stack overflow handling and made the managed stack overflows
5123         catchable in most cases using soft guard pages.
5124         * exceptions-x86.c: added code to restore the protection in the soft
5125         guard pages at the end of exception handling.
5126
5127 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
5128
5129         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
5130
5131 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5132
5133         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
5134         exception handling.
5135
5136 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5137
5138         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
5139         signal handling support until it has been ported to the new mechanism.
5140         * mini.c: fixed stack overflow detection and use the new
5141         architecture code  to handle signals on the altstack.
5142
5143 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
5144
5145         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
5146         stack overflows on the alt stack.
5147
5148 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
5149
5150         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
5151         stack overflows on the alt stack.
5152
5153 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
5154
5155         * exceptions-ppc.c: cleanup preparing for altstack support.
5156
5157 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
5158
5159         * exceptions-arm.c: cleanup preparing for altstack support.
5160
5161 2007-07-27  Mark Probst  <mark.probst@gmail.com>
5162
5163         * mini.c (print_jit_stats): Output hazard pointer stats.
5164
5165 2007-07-26  Mark Probst  <mark.probst@gmail.com>
5166
5167         * driver.c, mini.c: Replaced security mode flags with a single
5168         enum variable.
5169
5170 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
5171
5172         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
5173
5174 2007-07-25  Mark Probst  <mark.probst@gmail.com>
5175
5176         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
5177         (which doesn't do anything yet) for activating Core CLR
5178         (Silverlight) security.
5179
5180 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
5181
5182         * mini-codegen.c: work around a possible gcc bug on arm.
5183
5184 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
5185
5186         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
5187         message for platforms that don't support AOT compilation.
5188
5189 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
5190
5191         * mini.h, mini.c, driver.c: temporary smcs hack.
5192
5193 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
5194
5195         * mini-arm.h, mini-arm.c: arm EABI fixes.
5196
5197 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
5198
5199         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
5200         case.
5201
5202         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
5203         trampolines taking a method argument.
5204
5205         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
5206
5207         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
5208         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
5209
5210         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
5211         JIT compilation throws an exception. Fixes #82050.
5212
5213 2007-07-19  Mark Probst  <mark.probst@gmail.com>
5214
5215         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
5216         with the MONO_EXCEPTION_ defines.
5217
5218 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
5219
5220         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
5221         #82117.
5222         
5223         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
5224         the cause of an assertion.
5225
5226 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
5227
5228         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
5229         removed.
5230
5231 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
5232
5233         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
5234         assert. Should fix #82103.
5235
5236 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
5237
5238         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
5239         here too. Fixes #82095.
5240
5241         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
5242         addresses.
5243
5244         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
5245
5246         * mini-amd64.h: Enable IMT for amd64.
5247         
5248         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
5249
5250 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
5251
5252         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
5253
5254 2007-07-12  Mark Probst  <mark.probst@gmail.com>
5255
5256         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
5257         as soon as check_linkdemand sets an exception_type.
5258
5259 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
5260
5261         * mini-x86.c: fixed offsets for IMT call sequence.
5262         * mini-x86.h: enable IMT again.
5263
5264 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
5265
5266         * trace.c (mono_trace_enter_method): Decode MonoType too.
5267
5268         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
5269
5270         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
5271
5272         * mini-amd64.c: Add preliminary IMT implementation.
5273         
5274 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
5275
5276         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
5277         understand the new IMT-base interface invocation (thanks to
5278         Daniel Nauck for the report and the remote debugging session).
5279
5280 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
5281
5282         * mini-x86.c: size and speed optimizations for the IMT bsearch.
5283
5284 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
5285
5286         * Makefile.am (aotcheck): Make this actually use the AOTed code.
5287
5288 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
5289
5290         * mini-trampolines.c: implement AOT IMT support.
5291         * mini-x86.h: enable IMT support for wider testing.
5292
5293 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
5294
5295         * inssel.brg (emit_imt_argument): Add aot support here.
5296
5297         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
5298
5299 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
5300
5301         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
5302         of the IMT implementation, partially from massi, with my
5303         implementation of the bsearch sequence. Disabled by default until
5304         the AOT code is implemented.
5305
5306 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
5307
5308         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
5309
5310         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
5311
5312 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
5313
5314         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
5315         arch-independent IMT JIT code from Massimiliano
5316         Mantione (massi@ximian.com) with small cleanups from me.
5317
5318 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
5319
5320         * Makefile.am: fix svn invocation to get the svn revision to be
5321         independent of the local language (build fix).
5322
5323 2007-07-09  Mark Probst  <mark.probst@gmail.com>
5324
5325         * mini.c (inline_method): Reset cfg->exception_type if the
5326         inlining is aborted.  Fixes: 82049.
5327
5328 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
5329
5330         * mini.c: remove assert from exception handling code when exception_ptr
5331         is not set.
5332
5333 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
5334
5335         * mini.c (mono_codegen): Add an assert.
5336
5337         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
5338         enter and leave code.
5339         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
5340
5341 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5342
5343         * mini-ppc.c: fixed memory corruption for localloc(0)
5344         (bug #81852).
5345
5346 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
5347         
5348         * mini.c: Fix warnings.
5349
5350 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
5351
5352         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
5353         to emit better double->int conversions.
5354
5355 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
5356
5357         * mini.c: the provided Min/Max optimizations are valid for unisgned
5358         ints.
5359
5360 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
5361
5362         * 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
5363
5364 2007-06-28  Miguel de Icaza  <miguel@novell.com>
5365
5366         * mini.c (mono_running_on_valgrind): Add support for reporting the
5367         method and  its boundaries to valgrind.
5368
5369 2007-06-28  Martin Baulig  <martin@ximian.com>
5370
5371         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
5372
5373 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
5374
5375         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
5376
5377         * generic.2.cs: Add new test case.
5378
5379 2007-06-25  Martin Baulig  <martin@ximian.com>
5380
5381         Merged the `debugger-dublin' branch.
5382
5383         * debug-mini.c
5384         (mono_debugger_insert_method_breakpoint): New public method.
5385         (mono_debugger_remove_method_breakpoint): Likewise.
5386         (mono_debugger_check_breakpoints): New static method.
5387         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
5388
5389         * debug-debugger.h (MonoDebuggerInfo):
5390         Renamed (to keep backward compatibility in the vtable):
5391         `insert_breakpoint' -> `old_insert_breakpoint'.
5392         `remove_breakpoint' -> `old_remove_breakpoint'.
5393         `create_string' -> `old_create_string'.
5394         `lookup_class' -> `old_lookup_class'.
5395         `lookup_type' -> removed; changed into a dummy field.
5396         `lookup_assembly' -> `old_lookup_assembly'.
5397         Added (same functionality, but different signature):
5398         `create_string', `lookup_class', `lookup_assembly'
5399         Added new:
5400         `get_method_addr_or_bpt', `remove_method_breakpoint',
5401         `runtime_class_init'.
5402
5403         * debug-debugger.c: Merged the `debugger-dublin' branch.
5404
5405 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
5406
5407         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
5408         well.
5409         (peephole_pass): Likewise.
5410
5411 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
5412
5413         * driver.c: hopefully make setaffinity work also for ancient
5414         versions of linux.
5415
5416 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
5417
5418         * driver.c : win32 build fix.
5419
5420 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
5421
5422         * driver.c: check for the MONO_NO_SMP env var and bind to a single
5423         processor if it is set.
5424
5425 2007-06-21  Martin Baulig  <martin@ximian.com>
5426
5427         * debug-mini.h: New file.
5428
5429         * debug-mini.c
5430         (mono_debugger_insert_breakpoint_full): Moved here from
5431         ../metadata/mono-debug-debugger.c.
5432         (mono_debugger_remove_breakpoint): Likewise.
5433         (mono_debugger_breakpoint_callback): Likewise.
5434
5435 2007-06-15  Raja R Harinath  <rharinath@novell.com>
5436
5437         * jit-icalls.c (mono_helper_compile_generic_method): Update to
5438         changes in MonoGenericClass.
5439
5440 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
5441
5442         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
5443
5444 2007-06-14  Raja R Harinath  <rharinath@novell.com>
5445
5446         * jit-icalls.c (mono_helper_compile_generic_method): Update to
5447         removal of MonoGenericMethod.
5448
5449 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5450
5451         * mini-exceptions.c: hooks for the exception events profiling API.
5452
5453 2007-06-14  Randolph Chung  <tausq@debian.org>
5454
5455         * Makefile.ma: Add hppa target.
5456         * mini-arch.h: Include mini-hppa.h
5457         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
5458         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
5459         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5460
5461 2007-06-14  Randolph Chung  <tausq@debian.org>
5462
5463         * inssel.brg: Add rules for "chained" compare-branch operations so that
5464         a single compare op can affect multiple branches.  Adjust cost for
5465         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
5466         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
5467         cost for some rules so that they can more easily be overridden by
5468         per-arch rules (with fixes from lupus).
5469         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5470
5471 2007-06-13  Randolph Chung  <tausq@debian.org>
5472
5473         * mini-ops.h: Reorder branch ops so that they match the order of the
5474         corresponding CEE_* ops.  The code expects them this way.
5475         Add new ops for HPPA target.
5476         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5477
5478 2007-06-13  Randolph Chung  <tausq@debian.org>
5479
5480         * mini-exceptions.c: Handle cases where the stack grows towards
5481         larger addresses.
5482         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5483
5484 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
5485
5486         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
5487         counter.
5488         * driver.c: explain where a non-matching corlib is found.
5489
5490 2007-06-13  Mark Probst  <mark.probst@gmail.com>
5491
5492         * mini.c (print_jit_stats): Output dynamic code allocation stats.
5493
5494 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
5495
5496         * mini-exceptions.c: Generate a method profile leave event during
5497         an exception to ensure that the profiler gets notified.
5498
5499 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
5500
5501         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
5502         branch.
5503
5504         * cpu-amd64.md: Add long_and/or/xor opcodes.
5505
5506 2007-06-06  Wade Berrier  <wberrier@novell.com>
5507
5508         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
5509         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
5510         length of instruction shr_imm (expected 8, got 10)
5511
5512 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
5513
5514         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
5515
5516 2007-06-06  Mark Probst  <mark.probst@gmail.com>
5517
5518         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
5519         MonoInternalHashTable again (fixed bug in the internal hash table
5520         code).
5521
5522 2007-06-06  Mark Probst  <mark.probst@gmail.com>
5523
5524         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
5525         Have to figure out what makes it crash the SWF regression.
5526
5527 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
5528
5529         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
5530
5531 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5532
5533         * mini.c: optimize out the type check when storing null in a
5534         reference array.
5535
5536 2007-06-04  Mark Probst  <mark.probst@gmail.com>
5537
5538         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
5539         MonoInternalHashTable.
5540
5541 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
5542
5543         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
5544         signed integer methods.
5545
5546 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
5547
5548         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
5549         permanently since the current approach doesn't work.
5550
5551 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
5552
5553         * inssel.brg (stmt): Only call delegate->invoke_impl if 
5554         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
5555
5556 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
5557
5558         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
5559         the sreg2==rdx case.
5560         
5561         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
5562         account if it contains a rex prefix.
5563         (peephole_pass): Handle OP_FMOVE as well.
5564
5565 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
5566
5567         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
5568         as it causes regressions.
5569
5570 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
5571
5572         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
5573         static case as well.
5574
5575         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
5576
5577         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
5578         (mono_arch_get_this_arg_from_call): Ditto.
5579
5580         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
5581
5582         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
5583         invoke_impl field.
5584
5585         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
5586         (mono_arch_get_this_arg_from_call): Ditto.
5587
5588         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
5589         
5590         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
5591         try to create optimized invoke code and use that for further invocations. 
5592         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
5593
5594         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
5595
5596 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
5597
5598         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
5599         sealed classes or methods.
5600         *devirtualization.cs: tests for the new optimization
5601
5602 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
5603
5604         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
5605         by the update_volatile () function.
5606
5607 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
5608
5609         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
5610         require it.
5611
5612         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
5613
5614 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
5615
5616         * mini.c: Add configure checks for header files.
5617         * mini-x86.c: Add configure checks for header files.
5618         * trace.c: Add configure checks for header files.
5619         * aot-runtime.c: Add configure checks for header files.
5620         * aot-compiler.c: Add configure checks for header files.
5621         * driver.c: Add configure checks for header files.
5622         * mini-codegen.c: Add configure checks for header files.
5623         
5624         Code is contributed under MIT/X11 license.
5625
5626 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
5627
5628         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
5629         icompare_imm -128 + op_iclt. Fixes #81703.
5630
5631 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
5632
5633         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
5634
5635 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
5636
5637         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
5638         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
5639         so that all isinst checks now use "interface_bitmap".
5640
5641 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
5642
5643         * cpu-amd64.md (jmp): Fix a warning.
5644
5645         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
5646
5647         * basic.cs: Add new regression test.
5648
5649         * basic.cs: Remove test which is now in basic-long.cs.
5650
5651         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
5652
5653         * basic-long.cs: Add new test.
5654         
5655 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
5656
5657         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
5658
5659 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
5660
5661         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
5662
5663         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
5664         places.
5665         
5666         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
5667         throwing code a bit.
5668
5669         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
5670         the exception throwing code a bit.
5671
5672         * mini-x86.c (get_call_info): Allocate result from a mempool.
5673
5674 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
5675
5676         * aot-compiler.c (find_typespec_for_class): Fix the assert.
5677
5678         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
5679
5680         * mini.h (MonoCompile): Add 'token_info_hash' field.
5681
5682         * mini.c: Save token->method associations during compilation so the AOT 
5683         compiler can use it.
5684         
5685         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
5686         which reference generic classes and methods.
5687
5688 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
5689
5690         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
5691
5692         * aot-compiler.c (compile_method): Fix a typo in a comment.
5693
5694         * aot-runtime.c (decode_cached_class_info): Skip generic types.
5695
5696         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
5697         everything generic.
5698
5699         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
5700
5701 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
5702
5703         * mini.h (MonoCompile): Add 'args' field.
5704
5705         * mini.c (mono_compile_create_vars): Store variables representing the arguments
5706         into cfg->args.
5707
5708         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
5709
5710 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
5711
5712         * mini.c (mono_compile_get_interface_var): Remove this unused function.
5713
5714         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
5715
5716         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
5717         opcodes for some opcodes.
5718
5719         * mini.h *.brg *.c: Use the new opcodes.
5720
5721 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
5722
5723         * mini.h: Bumped aot revision.
5724
5725         * inssel.brg: modified code generation of type checks for interfaces
5726         to use the new "MonoClass.interface_bitmap" instead of the old
5727         "MonoClass.interface_offsets".
5728
5729 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
5730
5731         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
5732
5733 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
5734
5735         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
5736         64 bit platforms.
5737
5738 2007-04-27  Neale Ferguson <neale@sinenomine.net>
5739
5740         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
5741
5742 2007-04-27  Wade Berrier  <wberrier@novell.com>
5743
5744         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
5745         mini.h) to fix build.
5746
5747 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
5748
5749         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
5750         
5751         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
5752         causes the corlib unit tests to fail.
5753
5754 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
5755
5756         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
5757
5758         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
5759
5760         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
5761         opcodes to the comparison relations.
5762
5763         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
5764         opcodes to their types.
5765         
5766         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
5767
5768         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
5769         it in cfg->arch.cinfo.
5770
5771         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
5772
5773         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
5774         cfg->cil_offset_to_bb.
5775
5776 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
5777
5778         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
5779         created becase of initlocals.
5780
5781 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
5782
5783         * mini-alpha.c cpu-alpha.md: More alpha port work from 
5784         Sergey Tikhonov <tsv@solvo.ru>.
5785
5786 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
5787
5788         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
5789
5790 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
5791
5792         * cpu-s390.md (break): Correct the length of break instruction.
5793
5794 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5795
5796         * mini.c: fix a couple of soft-float issues and comments.
5797
5798 2007-04-15  Miguel de Icaza  <miguel@novell.com>
5799
5800         * trace.c (is_filenamechar): - is also a filename char.
5801
5802 2007-04-15  Neale Ferguson <neale@sinenomine.net>
5803
5804         * mini-s390.c: Correct checking for enum type in return value processing.
5805
5806 2007-04-14  Raja R Harinath  <rharinath@novell.com>
5807
5808         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
5809         (version.h): Makefile is in the build directory.
5810
5811 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
5812
5813         * mini-amd64.h: fix for assertion failure on Solaris/amd64
5814
5815 2007-04-11  Martin Baulig  <martin@ximian.com>
5816
5817         * mini.c (can_access_member): Fix handling of generic classes;
5818         fixes #81259.
5819
5820 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
5821
5822         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
5823
5824 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
5825
5826         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
5827
5828 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
5829
5830         * mini-codegen.c: make sure the right spill amount is
5831         used for fp or integer registers (fixes the float_sub_spill() on ppc).
5832
5833 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
5834
5835         * mini-ppc.c: fixes for the fp_branch_nan test.
5836
5837 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
5838
5839         * basic.cs: Comment out new test which still fails on ia64.
5840
5841 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
5842
5843         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
5844
5845 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
5846
5847         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
5848
5849 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
5850
5851         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
5852         on 64 bit machines. Fixes part of #80738.
5853
5854         * basic.cs: Add regression test.
5855
5856 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
5857
5858         * inssel.brg basic.cs: Revert previous change to fix build.
5859
5860         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
5861         platforms.
5862         
5863         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
5864
5865         * basic.cs: Add new regression test.
5866
5867 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
5868
5869         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
5870         many arguments.
5871
5872 2007-03-16  Neale Ferguson <neale@sinenomine.net>
5873
5874         * cpu-s390x.md: Correct length of break instruction.
5875
5876 2007-03-16  Neale Ferguson <neale@sinenomine.net>
5877
5878         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
5879         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
5880
5881 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
5882
5883         * *.c: Begin WIN64 port.
5884         * mini.c:  Use correct register in profiler.
5885         * mini-amd64.c: No inline assembly on Win64.
5886         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
5887         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
5888         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
5889         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
5890         mono_arch_ip_from_context for Win64.
5891         
5892         Contributed under MIT/X11 license.
5893
5894 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
5895
5896         * exceptions-amd64.c (seh_handler): Ditto.
5897
5898         * exceptions-x86.c (seh_handler): Fix a memory leak.
5899
5900 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
5901
5902         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
5903         mini-s390x.c: fixed peephole optimizations to deal
5904         correctly with 1 and 2 byte reload avoidance.
5905
5906 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
5907
5908         * cpu-s390.md, cpu-s390x.md: update localloc length.
5909
5910 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
5911
5912         * cpu-g4.md: added missing descriptions.
5913
5914 2007-03-14  Miguel de Icaza  <miguel@novell.com>
5915
5916         *  Makefile.am: Add support so the tail tests are not executed on
5917         PowerPC as that is a known limitation of the PowerPC port.
5918
5919 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
5920
5921         * runmdesc.bat:  Move to msvc directory.
5922         
5923 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
5924
5925         * runmdesc.bat:  Run executable that was produced by the current
5926         target and sent via an argument.
5927         
5928 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
5929
5930         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
5931         #81102.
5932
5933         * generics.2.cs: Add regression test.
5934
5935 2007-03-09  Wade berrier  <wberrier@novell.com>
5936
5937         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
5938
5939 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
5940
5941         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
5942         AOT code depends on this.
5943
5944 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
5945
5946         * mini.c: more precise tracking of types in the eval stack
5947         (part of fix for bug #81044).
5948
5949 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
5950
5951         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
5952
5953         * aot-compiler.c (encode_patch): Remove an obsolete comment.
5954
5955 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
5956
5957         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
5958
5959         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
5960
5961 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
5962
5963         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
5964         a pointer on 64 bit systems. Fixes #80190.
5965
5966         * iltests.il: Add new regression test.
5967
5968 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
5969
5970         * mini.c: inline a constant for Environment.IsRunningOnWindows.
5971
5972 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
5973
5974         * trace.c: Remove an erroneous alignemnt check when tracing.
5975           Fixes --trace on OSX86.
5976
5977 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
5978
5979         * mini-$(arch).h: initialize SP in context for all the archs.
5980
5981 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
5982
5983         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
5984         regressions in the thread tests.
5985
5986 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
5987
5988         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
5989         - fixed implementation of LOCALLOC opcode
5990         - implemented non-un compare for floats
5991         - code cleanup
5992         - implementation of FDIV and CKFINITE opcodes
5993         - fixes for latest mono updates
5994         - additional arch opcodes
5995
5996 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
5997
5998         * Makefile.am: simplify and merge rules for cross-compilation.
5999
6000 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
6001
6002         * local-propagation.c: Actually *apply* the fix for bug 80591...
6003
6004 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
6005
6006         * mini-exceptions.c: backuot part of the last change
6007         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
6008
6009 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
6010         * inssel.brg: Fix bug 59286.
6011
6012
6013 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
6014
6015         * mini-exceptions.c: patch from Zoltan to correctly check for
6016         stack boundaries (using the stack register, not the frame register),
6017         fixes bugs #80724, #79717.
6018
6019 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
6020
6021         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
6022         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
6023
6024         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
6025         presence of frame pointer elimination.
6026
6027 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
6028         
6029         * mini-x86.h: NetBSD UCONTEX_REG defines.
6030
6031 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
6032
6033         * inssel-amd64.brg: Fix amd64 build.
6034
6035 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
6036
6037         * mini.h: remove extern to workaround what looks likes gcc bug 26905
6038         on amd64.
6039
6040 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
6041
6042         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
6043         ends.
6044
6045         * mini-<ARCH>.c: Use mono_is_regsize_var ().
6046
6047 2007-01-30 Mark Mason <mason@broadcom.com>
6048
6049            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
6050            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
6051            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
6052            beginning support for CEE_JMP [not quite working yet]
6053            * tramp-mips.c: LMF handling now works
6054         
6055 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
6056
6057         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
6058
6059         * mini.h (NULLIFY_INS): New macro.
6060
6061 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
6062
6063         * mini.c: statistical profiler fix for windows, patch
6064         from Tor Lillqvist (tml@novell.com).
6065
6066 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
6067         * local-propagation.c: Fix bug 80591.
6068
6069 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
6070
6071         * Makefile.am: put back the --export-dynamic option as with
6072         the previous gmodule flags (thanks to Robert Jordan).
6073
6074 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
6075
6076         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
6077
6078         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
6079         simplify and speed up the local register allocator. Also rename some fields
6080         like iassign->vassign.
6081         
6082         * regalloc.c: Remove some functions which are no longer used since their
6083         inlined version is in mini-codegen.c.
6084         
6085         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
6086
6087         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
6088
6089 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
6090
6091         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
6092         narrowing. Fixes #80622.
6093
6094         * iltests.il: Add new regresssion test. 
6095
6096 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
6097
6098         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
6099         debug-debugger.c, debug-debugger.h: warning fixes.
6100         * driver.c: updated copyright year and made it fit in one line.
6101
6102 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
6103
6104         * aot-runtime.c: updated to use mono-dl instead of gmodule.
6105
6106 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
6107
6108         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
6109
6110         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
6111
6112         * iltests.il: Add new test for bug #80507.
6113
6114 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6115
6116         * mini-arm.h: use soft-float also on vfp for now.
6117
6118 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
6119
6120         * mini.c: fix some more soft-float issues.
6121
6122 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
6123
6124         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
6125
6126 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
6127         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
6128         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
6129         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
6130
6131 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
6132
6133         * mini-arm.c: typo fix.
6134
6135 2007-01-23  Neale Ferguson <neale@sinenomine.net>
6136
6137         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
6138
6139 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
6140
6141         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
6142         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
6143
6144         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
6145
6146         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
6147
6148         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
6149         
6150         * inssel.brg: Fix a warning.
6151
6152         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
6153
6154         * abcremoval.c ssa.c ssapre.c: Update after this change.
6155         
6156         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
6157
6158         * dominators.c (df_set): Use mono_bitset_union_fast.    
6159
6160 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
6161
6162         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
6163         mini-codegen.c: reduce relocations and memory usage for the cpu
6164         description.
6165
6166 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
6167
6168         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
6169
6170         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
6171         to reduce their size.
6172
6173 2007-01-19 Mark Mason <mason@broadcom.com>
6174
6175         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
6176         * mini-mips.c: more configuration macros, support long conditional branches, additional
6177         asserts, fix epilog instrumentation.
6178         * mini-mips.h: use standard stack walk
6179         * cpu-mips.md: increase size of div, rem and conditional branches
6180         
6181 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
6182
6183         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
6184         to cpu spec data.
6185
6186 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
6187
6188         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
6189         (compile_method): Ditto.
6190
6191         * aot-runtime.c (decode_klass_info): Ditto.
6192
6193         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
6194         needed by the code generated by inssel.brg. Also fix a warning.
6195
6196 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
6197
6198         * mini.c: deal with enums that become genericinsts by
6199         being nested in a generic class (bug #79956).
6200
6201 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
6202
6203         * mini.c: match the generic definition to check for
6204         private access with generic types (bug #78431).
6205
6206 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
6207
6208         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
6209         to make life easier for people cross-compiling that insist on not
6210         using scratchbox.
6211
6212 2007-01-17 Mark Mason <mason@broadcom.com>
6213
6214         * inssel-long.brg: patch to deal with mips missing flags
6215         * inssel-long32-mips.brg: implement overflow checks
6216         * insset-mips.brg: implement overflow checks
6217         * mini-mips.h: implement conditional exception handling
6218         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
6219           Remove unused code, minor cleanups.
6220         * exceptions-mips.c: minor cleanups
6221         * mini-ops.h: add mips conditional exception ops
6222         * cpu-mips.md: add mips conditional exception ops
6223
6224         
6225 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
6226
6227         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
6228         to deal with mips missing of flags.
6229
6230 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
6231
6232         * exceptions-ppc.c: execute fault handlers.
6233
6234 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
6235
6236         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
6237
6238 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
6239
6240         * mini.c: handle also floating point values in initialize_array.
6241
6242 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
6243
6244         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
6245         array initialization and make it conditional on the intrins option.
6246
6247 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
6248
6249         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
6250         relocations and put the patch info names close to the enum definition.
6251
6252 2007-01-15 Mark Mason <mason@broadcom.com>
6253
6254         * basic.cs, exceptions.cs: break up large tests to increase debugability.
6255
6256 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
6257
6258         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
6259
6260 2007-01-12  Raja R Harinath  <rharinath@novell.com>
6261
6262         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
6263
6264 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
6265
6266         * Makefile.am: distribute the mips sources.
6267
6268 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
6269
6270         * mini-codegen.h: handle bug #80489 here, by excluding ecx
6271         directly.
6272
6273 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
6274
6275         * cpu-x86.md: back out for now as this triggers other regressions.
6276
6277 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
6278
6279         * cpu-x86.md: force src1 and dest regpair for long shift instructions
6280         to eax:edx, so ecx can't get allocated to them (bug #80489).
6281
6282 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
6283
6284         * mini.c, mini-exceptions.c: enabled running fault handlers
6285         (bug #80469).
6286
6287 2007-01-03  Miguel de Icaza  <miguel@novell.com>
6288
6289         * driver.c: If nothing fail, do not use the string "failed",
6290         because it makes it very annoying to view test result logs on the
6291         web. 
6292
6293 2006-12-30  Miguel de Icaza  <miguel@novell.com>
6294
6295         * debug-debugger.c (mono_debugger_main): Rename "main" to
6296         "main_method" to prevent a warning.
6297
6298         Remove a warning for unused field.
6299
6300 2006-12-28  Martin Baulig  <martin@ximian.com>
6301
6302         * debug-debugger.c
6303         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
6304
6305 2006-12-22  Martin Baulig  <martin@ximian.com>
6306
6307         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
6308         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
6309         seperate `.mdb_debug_info' section, so we can access it from the
6310         debugger even if the binary is stripped.
6311
6312         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
6313         from the `.mdb_debug_info' here to prevent the linker from
6314         removing that section.
6315
6316         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
6317         mdb-debug-info64.s.
6318
6319 2006-12-19  Robert Jordan  <robertj@gmx.net>
6320
6321         * mini-x86: enable the code to return small structures in
6322         registers for FreeBSD as well. Fixes bug #80278.
6323         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
6324
6325 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6326
6327         * mini-x86.c: align the stack when calling the profiler
6328         function instrumenting the prolog (on OSX).
6329
6330 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
6331
6332         * mini.c: emit a break opcode where Debugger.Break () is called.
6333
6334 2006-12-13  Miguel de Icaza  <miguel@novell.com>
6335
6336         * mini.c (mono_method_to_ir): Provide useful information on this
6337         assert, to prevent others from debugging like I did.
6338
6339 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
6340
6341         * mini.c: enable code which was incorrectly commented
6342         (bug #80235).
6343
6344 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
6345
6346         * mini-x86.c: enable on OSX, too, the code to return small
6347         structures in registers.
6348
6349 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
6350
6351         * mini-x86.c: remove the use of the dynamic code manager here, too.
6352
6353 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
6354
6355         * mini.h, debug-debugger.c, tramp-*.c: fixed 
6356         mono_debugger_create_notification_function() to use
6357         mono_global_codeman_reserve () instead of a dynamic code manager.
6358
6359 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
6360
6361         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
6362         ves_array_element_address() jit icall and use a generated
6363         managed method instead (which is about 4 times faster for a rank 3
6364         array access).
6365
6366 2006-11-29  Mark Mason  <mason@broadcom.com>
6367
6368         * basic-calls.cs: additional tests for passing
6369         structures as function arguments.
6370
6371 2006-11-29  Mark Mason  <mason@broadcom.com>
6372
6373         * mini-mips.h: disable custom exception handling
6374         * mini-mips.c: throw/rethrow should use jalr to call
6375         exception stubs.  Fixed bug with passing structures
6376         by value. More support for tracing floating point
6377         functions.
6378
6379 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6380
6381         * mini.c: fixed typo in the soft-float ldind.r4 handling
6382         (bug #80086).
6383
6384 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
6385
6386         * mini.c, mini.h, driver.c: added --runtime command line
6387         option to select a different runtime than the autodetected one.
6388         * jit.h: added API for embedders to initialize with a specific
6389         runtime version.
6390
6391 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
6392
6393         * mini.c: handle also boxing of r4 values (bug #80024).
6394
6395 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
6396
6397         * mini-ppc.c: force indirect calls until we reserve
6398         enough address space for all the generated code.
6399
6400 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
6401
6402         * exceptions-arm.c: workaround bugs in the libc definition
6403         of struct ucontext.
6404
6405 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
6406
6407         * inssel.brg: fixes from me and Mark Mason.
6408
6409 2006-11-23  Dick Porter  <dick@ximian.com>
6410
6411         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
6412         semaphore display now we've fixed the initial value
6413
6414 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6415
6416         * inssel.brg: partially revert the last change to fix the build.
6417
6418 2006-11-21  Mark Mason  <mason@broadcom.com>
6419
6420         * inssel.brg: Add and use compare-and-branch macros to support
6421         architectures that do not have condition code registers (ie. MIPS).
6422         * *-mips.{c,brg,md}: Fix copyright statements
6423
6424 2006-11-20  Mark Mason  <mason@broadcom.com>
6425
6426         * Makefile.am: remove mini-codegen.c from list of MIPS sources
6427         * mini.c: Allow GET_CONTEXT to be specified by the arch port
6428         * mini.h: Added declaration for mono_print_ins()
6429         * mini-codegen.c: added ins_spec initializer for MIPS
6430         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
6431         vreg to be virtual and hreg to be non-virtual.
6432         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
6433         is not yet working/implemented correctly.
6434         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
6435         non-static, fixup calls to print_ins() from other parts in the file.
6436
6437 2006-11-20  Mark Mason  <mason@broadcom.com>
6438
6439         * basic-calls.cs: added tests for passing structures as arguments
6440         to calls.
6441
6442 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
6443
6444         * inssel-long32.brg: optimize signed division by power of two.
6445
6446 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
6447
6448         * mini-arm.c: added support for interworking with thumb code
6449         (mono must be still be built using the ARM instruction encoding).
6450
6451 2006-11-19  Miguel de Icaza  <miguel@novell.com>
6452
6453         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
6454         verifier has different rules for it.   Fixes a few verifier issues
6455         in the test suite.
6456
6457         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
6458         at the end, so people know what happened.
6459
6460 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
6461
6462         * brach-opts.c: in optimize_exception_target() make sure we
6463         are in a catch clause (fixes bug #79871).
6464
6465 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6466
6467         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
6468         more soft-float support fixes.
6469
6470 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
6471
6472         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
6473         that are passed half on the stack and half in registers.
6474
6475 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
6476
6477         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
6478         more mips integration work from Mark E Mason 
6479         <mark.e.mason@broadcom.com>.
6480
6481 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
6482
6483         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
6484         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
6485         tramp-mips.c: added sources for the mips port, not
6486         integrated in the build yet. Contributed by
6487         Mark E Mason <mark.e.mason@broadcom.com>.
6488
6489 2006-11-14  Neale Ferguson <neale@sinenomine.net>
6490
6491         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
6492
6493 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6494
6495         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
6496         put the soft-float rules in its own file since it seems to
6497         break s390 compilation.
6498
6499 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
6500
6501         * mini-arm.c: fixed wrnings.
6502
6503 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
6504
6505         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
6506         inssel-arm.brg: ARM support for soft-float.
6507
6508 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
6509
6510         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
6511         loads and stores of 32 bit fp values.
6512
6513 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
6514
6515         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
6516
6517         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
6518         works. Fixes #79852 and #79463.
6519
6520 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6521
6522         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
6523         more soft-float support WIP and fixes.
6524
6525 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
6526
6527         * mini-arm.c: some VFP updates.
6528
6529 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
6530
6531         * mini-exceptions.c: 0 is a valid local var offset in some
6532         architectures, don't assert (bug #78508).
6533
6534 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
6535
6536         * exceptions-arm.c: fixed off by one error in stack walk code.
6537
6538 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
6539
6540         * mini.h, mini.c: more precise tracking of type load exceptions.
6541
6542 2006-11-03  Robert Jordan  <robertj@gmx.net>
6543
6544         * Makefile.am: [WIN32] Add monow.exe target.
6545         * driver.c: [WIN32] Don't detach the console when debugging.
6546         Fixes bug #79797.
6547         
6548 2006-10-30  Miguel de Icaza  <miguel@novell.com>
6549
6550         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
6551
6552 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
6553
6554         * aot-compiler.c (emit_method_info): Add a case missed earlier.
6555
6556         * driver.c (mini_regression): Fix --regression with AOT.
6557
6558         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
6559
6560 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
6561
6562         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
6563
6564         * mini-sparc.h: Don't use sigaction on sparc/linux.
6565
6566         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
6567
6568         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
6569
6570         * mini-exceptions.c: Add proper include files for getpid ().
6571
6572 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
6573
6574         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
6575         address instead of a MonoJitInfo* to avoid decoding the exception info for the
6576         method.
6577
6578         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
6579         name cache to reduce its size.
6580
6581         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
6582
6583 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
6584
6585         * mini-x86.c: Save/restore the current LMF structure more efficiently using
6586         the mono_lmf TLS variable.
6587
6588         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
6589         trampoline lmf frames.  
6590
6591         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
6592
6593 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
6594
6595         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
6596         the mono_lmf TLS variable.
6597
6598         * mini-exceptions.c: Access the LMF structure through accessors.
6599
6600         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
6601         variable instead of in jit_tls->lmf.
6602
6603         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
6604         
6605         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
6606         trampoline lmf frames.
6607
6608         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
6609
6610 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
6611
6612        * mini.c trace.c mini-x86.c: Revert these too.
6613         
6614        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
6615        signature change.
6616
6617 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
6618
6619         * genmdesc.c: removed now dead code.
6620
6621 2006-10-09  Robert Jordan <robertj@gmx.net>
6622
6623         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
6624
6625 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
6626
6627         * mini.h: do not leave gaps in the opcode values.
6628
6629 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
6630
6631         * jit-icalls.h: flag functions as internal here, too.
6632
6633 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
6634
6635         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
6636         functions with the internal attribute.
6637
6638 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
6639
6640         * aot-compiler.c: fclose the file descriptor in the profile read loop.
6641
6642 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
6643
6644         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
6645         for soft-float.
6646
6647 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
6648
6649         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
6650         tail calls as on other platforms.
6651
6652         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
6653
6654         * iltests.il: Add a few tailcall tests.
6655
6656 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
6657
6658         * driver.c: fix loop for old compilers (bug #79521).
6659
6660 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
6661
6662         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
6663
6664         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
6665
6666         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
6667         metadata without any code.
6668
6669         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
6670         more precise debugging information using gdb.
6671
6672 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
6673
6674         * inssel-ia64.brg: Make the helper methods static.
6675
6676 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
6677
6678         * inssel-x86.brg: make the helper methods static.
6679
6680 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
6681
6682         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
6683
6684 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
6685
6686         * mini.c: updates for monoburg changes.
6687         * inssel.brg: make a few helper functions static as they should.
6688
6689 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
6690
6691         * Makefile.am: Move mini-codegen.c to common_sources.
6692
6693 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
6694
6695         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
6696         instructions.
6697         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
6698         mini-ppc.h: port to use the common local register allocator.
6699
6700 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
6701
6702         * mini.h: Remove the comment too then.
6703
6704 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
6705
6706         * mini.h: put back backend.data which is to be used shortly and
6707         doesn't increase the size of MonoInst. If any 64 bit arch aligned
6708         pointers on 4 byte boundaries it'd have much bigger issues running
6709         and you can ifdef it out anyway.
6710
6711 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
6712
6713         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
6714         MonoInst size by 4 bytes on 64 bit machines.
6715
6716 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
6717
6718         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
6719         replacement with more meaningful field names. Arch maintainers, please
6720         check the assigned names are good enough for your arch.
6721
6722 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
6723
6724         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
6725         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
6726
6727 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
6728
6729         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
6730         relocations and memory requirements, put the optimization flags
6731         definitions in their own file.
6732
6733 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
6734
6735         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
6736
6737         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
6738
6739 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
6740
6741         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
6742
6743 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
6744
6745         * inssel.brg: use the correct function to get the size of an item
6746         in an array, given an element class.
6747         * aot-compiler.c: do not access class->class_size directly.
6748
6749 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
6750
6751         * mini.h, debug-mini.c: added a debugging function to print
6752         info about local variables and arguments in a jitted method.
6753
6754 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
6755
6756         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
6757
6758         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
6759
6760 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
6761
6762         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
6763         inner and outer loops when passing vtypes.
6764
6765 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
6766
6767         * mini-ppc.c: take into account the cpu errata for cache flushing
6768         which caused some random errors (bug #79381).
6769
6770 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
6771
6772         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
6773         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
6774
6775 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
6776
6777         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
6778         loaded.
6779
6780         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
6781         freebsd ports tree.
6782
6783         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
6784         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
6785
6786         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
6787         displacement.
6788
6789 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
6790
6791         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
6792
6793 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
6794
6795         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
6796         macro does not have to be changed during debugging.
6797
6798         * 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>.
6799
6800         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
6801
6802         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
6803         
6804         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
6805         MONO_ARCH_NO_EMULATE_MUL is defined.
6806
6807         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
6808
6809         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
6810
6811         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
6812
6813         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
6814         
6815 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
6816
6817         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
6818         stuff to mini-exceptions.c where it is used.
6819
6820         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
6821         setup code, the real one is in mini-exceptions.c.
6822
6823         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
6824         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
6825         some changes from the freebsd ports tree.
6826
6827         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
6828         constants.
6829         
6830         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
6831
6832 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
6833
6834         * mini.c: on Linux, check for /proc to be mounted
6835         (bug# 79351, novell bug#201204).
6836
6837 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
6838
6839         * mini.c: handle cases where pthread_attr_getstack() behaves
6840         incorrectly (bug #78096).
6841
6842 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
6843
6844         * mini-arm.c: support larger stack frames (bug #79272).
6845
6846 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
6847
6848         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
6849
6850         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
6851         tokens.
6852
6853         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
6854         mono_class_from_name () to find a class from its name.
6855
6856         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
6857
6858 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
6859
6860         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
6861
6862 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
6863
6864         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
6865
6866 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
6867
6868         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
6869         callinfo->trampoline.
6870
6871         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
6872         fixes #79271.
6873         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
6874         future.
6875
6876 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
6877
6878         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
6879
6880 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
6881
6882         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
6883         stats.method_trampolines, it is already done by the generic trampoline code.
6884
6885         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
6886         
6887 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
6888
6889         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
6890
6891         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
6892
6893         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
6894
6895         * mini.c (print_jit_stats): Print mscorlib mempool size too.
6896         
6897         * mini.c (print_jit_stats): Print new stats.
6898
6899         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
6900
6901 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
6902
6903         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
6904         Address on two dimensional arrays. Fixes #78729.
6905
6906         * mini.h (MonoCompile): Add a 'skip_visibility' field.
6907
6908         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
6909         a method.
6910
6911         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
6912
6913         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
6914         #79130.
6915         
6916         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
6917         a race condition.
6918         (mini_get_ldelema_ins): Ditto.
6919
6920 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
6921
6922         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
6923         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
6924         Fixes #79213.
6925
6926 2006-08-29 Neale Ferguson <neale@sinenomine.net>
6927
6928         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
6929         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
6930
6931         * exceptions-s390x.c: Cosmetic change.
6932
6933         * tramp-s390.c: Fix warning.
6934
6935         * cpu-s390.md: Correct length of mul_imm.
6936
6937 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
6938
6939         * aot-compiler.c: added binary writer with ELF backend
6940         implementation (only on Linux/x86 for now).
6941
6942 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
6943
6944         * Makefile.am: Don't run net 2.0 AOT tests.
6945
6946         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
6947         (mono_compile_assembly): Skip net 2.0 assemblies as well.
6948
6949         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
6950
6951 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
6952
6953         * aot-compiler.c: simplified and refactored the asm-writing code
6954         to allow different backends.
6955
6956 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
6957
6958         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
6959
6960         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
6961         little. Share patches of type TYPE_FROM_HANDLE as well.
6962
6963         * mini.c (mono_patch_info_equal): New helper function.
6964         (mono_patch_info_hash): Ditto.
6965
6966         * aot-compiler.c (emit_method_code): Fix s390 build.
6967
6968         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
6969         is not handled because it is stored as a flag and not as a type ctor. Fixes
6970         #79016.
6971
6972 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
6973
6974         * aot-compiler.c: Fix computation of GOT slot statistics.
6975         
6976         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
6977         Also remove support for not PIC AOT.
6978
6979         * mini.h: Bump AOT file format version.
6980
6981         * objects.cs: Add a test for #78990.
6982
6983         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
6984         (peter.dettman@iinet.net.au). Fixes #79087.
6985
6986         * basic-long.cs: Add a test for the above.
6987
6988 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
6989
6990         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
6991         
6992         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
6993         code somewhat.
6994
6995 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
6996
6997         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
6998         exceptions.
6999
7000 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
7001
7002         * mini.c: Don't verify COM proxy invoke calls
7003         
7004
7005 2006-08-10  Dick Porter  <dick@ximian.com>
7006
7007         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
7008         which process is holding semaphores locked.
7009
7010 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
7011
7012         * mini-ia64.c mini-amd64.c: Fix #79027.
7013
7014         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
7015
7016         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
7017
7018         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
7019         implicit arguments in a vararg call. Fixes #79027.
7020
7021 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
7022
7023         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
7024         (mono_get_array_new_va_signature): Ditto.
7025
7026 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
7027
7028         * aot-runtime.c: Call init_plt lazily.
7029
7030         * inssel-long.brg: Fix unsigned long->int conversion.
7031
7032         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
7033
7034         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
7035         that most data is now in the .rss/.data section.
7036
7037 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
7038
7039         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
7040
7041         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
7042
7043         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
7044
7045         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
7046
7047         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
7048         virtual call. Fixes #79010.
7049
7050         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
7051         and use the result as the this argument in the real call.
7052
7053         * generics.2.cs: Add a new test for #79010.
7054         
7055 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
7056
7057         * mini-x86.c: Fix a warning.
7058
7059         * aot-compiler.c: Add a bunch of statistics.
7060
7061         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
7062
7063 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
7064
7065         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
7066
7067 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
7068
7069         * 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>.
7070
7071 2006-07-13  Miguel de Icaza  <miguel@novell.com>
7072
7073         * mini.c (mono_method_to_ir): Obtain the original method in the
7074         CIL stream and use this to perform validation.
7075
7076         Fixed: #78816
7077
7078 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
7079
7080         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
7081         (mono_arch_call_opcode): Ditto.
7082
7083         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
7084         #78826.
7085
7086         * mini.c (mono_patch_info_dup_mp): New helper function.
7087         
7088         * aot-compiler.c (compile_method): Fix some of the memory allocated during
7089         compilation. Fixes #78827.
7090
7091 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
7092
7093         * declsec.c: Use original security informations for
7094           MONO_WRAPPER_MANAGED_TO_MANAGED.
7095
7096 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
7097
7098         * mini.c: Allow Com Interop methods/classes and
7099         don't verify COM wrapper calls
7100         
7101
7102 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
7103
7104         * inssel-long32.brg: Fix long->i4 checked conversion.
7105
7106         * exceptions.cs: Add a test for the above.
7107
7108 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
7109
7110         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
7111
7112         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
7113         leaks.
7114
7115         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
7116         #78775.
7117
7118 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
7119
7120         * mini.c: Fix solaris/x86 exception handling.
7121
7122         * Makefile.am: Get rid of $(ICU_LIBS).
7123
7124 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
7125
7126         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
7127         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
7128         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
7129
7130         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
7131
7132         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
7133         this function causes a SIGSEGV.
7134
7135 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
7136
7137         * mini.c: Remove unused solaris/x86 includes.
7138
7139 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
7140
7141         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
7142
7143 2006-06-20  Jb Evain  <jbevain@gmail.com>
7144
7145         * cpu-g4.md: fix max length of start_handler instruction.
7146
7147 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
7148         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
7149
7150 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
7151         * ssa.c: Fixed bug 78653 for SSA based deadce.
7152         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
7153         MonoInst.flags, used in SSA based deadce.
7154         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
7155         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
7156
7157 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
7158
7159         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
7160         it can end up using non executable memory on ppc64 systems
7161         running ppc32 userspace (fix from Johannes Berg).
7162
7163 2006-06-14  Dick Porter  <dick@ximian.com>
7164
7165         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
7166         4.1.1
7167
7168 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
7169         * mini.c: Made so that inline is locally disabled if it would
7170         trigger a .cctor, because too many apps depend on this behavior
7171         (which seems to be also the one of the MS CLR).
7172
7173 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
7174
7175         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
7176         No idea why this worked before.
7177
7178         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
7179         which branch to outer exception clauses since they could skip the
7180         inner finally clauses. Fixes #78633.
7181
7182         * exceptions.cs: Add a test for the above.
7183
7184         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
7185         Fixes #78629.
7186
7187         * iltests.il: Add a test for the above.
7188
7189 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
7190
7191         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
7192         after the end of a try bblock, to prevent asserts in mini_method_compile ().
7193
7194         * iltests.il: Add a test for the above.
7195
7196 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
7197
7198         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
7199         
7200         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
7201         methods as instrinsics.
7202
7203 2006-06-09  Wade Berrier <wberrier@novell.com>
7204
7205         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
7206         (simple-cee-ops.h ssapre-mini-ops.h)
7207
7208 2006-06-09  Neale Ferguson <neale@sinenomine.net>
7209
7210         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
7211         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
7212         instruction).
7213         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
7214         * cpu-s390x.md: Fix max. length values for a couple of instructions.
7215
7216 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
7217
7218         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
7219
7220 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
7221
7222         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
7223         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
7224         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
7225         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
7226         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
7227         of opcodes, so that bug 78549 should not happen again.
7228         * ssapre.c: Updated to use the renamed files.
7229
7230 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
7231
7232         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
7233         in OP_ATOMIC_EXCHANGE_I4.
7234
7235 2006-06-07  Wade Berrier <wberrier@novell.com>
7236
7237         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
7238         in mono_debugger_create_notification_function)
7239
7240 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
7241
7242         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
7243         
7244         * mini.c (type_from_stack_type): Disable some changes which do not
7245         seem to work.
7246
7247         * driver.c: Reenable opts.
7248
7249         * mini.h (MonoStackSlot): New structure to keep track of the verification state
7250         of the evaluation stack.
7251         
7252         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
7253         evaluation stack trace at entry to the bblock.
7254
7255         * mini.c (merge_stacks): New function to perform verification of stack merges.
7256         Turned off by default.
7257
7258         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
7259         STACK_MP.
7260         
7261 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
7262
7263         * local-propagation.c: Fixed bug 78549.
7264
7265 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
7266
7267         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
7268
7269 2006-06-02  Miguel de Icaza  <miguel@novell.com>
7270
7271         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
7272         tramp-arm.c, tramp-ia64.c
7273         (mono_debugger_create_notification_function): Update signature to
7274         new signature and use new protocol for creating the notification
7275         function.  
7276
7277         Should fix the build.
7278
7279 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
7280
7281         * exceptions-ppc.c (mono_jit_walk_stack)
7282         (ves_icall_get_frame_info): Fix the build
7283
7284 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
7285
7286         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
7287
7288 2006-05-31  Raja R Harinath  <rharinath@novell.com>
7289
7290         * il2tests.2.il: New file for generics CIL tests.  Add test for
7291         #78019.
7292         * Makefile.am: Update.
7293
7294         Fix #78019
7295         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
7296         to nullable types.
7297
7298 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
7299
7300         * aliasing.c: Fixed bug 78311.
7301
7302 2006-05-29  Martin Baulig  <martin@ximian.com>
7303
7304         * mini-exceptions.c (mono_find_jit_info): When computing the
7305         native offset, check whether we're actually inside the method's
7306         code; call mono_debug_print_stack_frame() to format the frame.
7307         (ves_icall_System_Exception_get_trace): Call
7308         mono_debug_print_stack_frame() to format the stack frame.
7309         (ves_icall_get_trace): Update to the new debugging API.
7310         (mono_jit_walk_stack_from_ctx): Likewise.
7311         (ves_icall_get_frame_info): Likewise.
7312
7313         * mini.c (get_method_from_ip): Use the new debugging API.
7314         (mono_print_method_from_ip): Likewise.
7315
7316         * exceptions-ppc.c
7317         (mono_jit_walk_stack): Use the new debugging API.
7318         (ves_icall_get_frame_info): Likewise.   
7319
7320 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
7321
7322         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
7323
7324 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
7325
7326         * mini.c: Added "limitator" to inline for debugging.
7327
7328 2006-05-24  Martin Baulig  <martin@ximian.com>
7329
7330         * debug-debugger.c (mono_debugger_init): Create a private,
7331         malloc()-based code manager for the notification function and
7332         intentionally leak it on exit.  This fixes the crash-on-exit race
7333         condition.
7334
7335         * tramp-amd64.c
7336         (mono_debugger_create_notification_function): Added
7337         `MonoCodeManager *' argument.
7338
7339         * tramp-x86.c
7340         (mono_debugger_create_notification_function): Added
7341         `MonoCodeManager *' argument.
7342
7343 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
7344
7345         * aliasing.c: Fixed 64 bit issue.
7346         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
7347         default since all known bugs are fixed (one more time!).
7348
7349 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
7350
7351         * mini.c: write barrier support.
7352
7353 2006-05-23  Martin Baulig  <martin@ximian.com>
7354
7355         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
7356         check at the top of the file.
7357
7358 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
7359
7360         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
7361         reverting changes without reason and without changelog entries.
7362
7363 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
7364
7365         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
7366         to a few opcodes. Fixes #78439.
7367
7368         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
7369         consistency with other archs.
7370
7371         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
7372
7373 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
7374
7375         * debug-debugger.c: fix the build.
7376
7377 2006-05-17  Martin Baulig  <martin@ximian.com>
7378
7379         * debug-debugger.c
7380         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
7381         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
7382         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
7383         (debugger_attach): Call GC_mono_debugger_add_all_threads().
7384
7385 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
7386
7387         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
7388
7389 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
7390
7391         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
7392         MONO_TYPE_GENERICINST.
7393         
7394         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
7395         MONO_TYPE_GENERICINST.
7396
7397 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
7398
7399         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
7400         #78325.
7401
7402 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
7403
7404         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
7405         mempool.
7406         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
7407
7408 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
7409
7410         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
7411         mono_trace_cleanup ().
7412
7413         * iltests.il: Fix problem with the newly added test.
7414
7415         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
7416         due to register constraints, free up the previous hreg. Fixes #78314.
7417
7418         * iltests.il: Add new test for #78314.  
7419
7420         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
7421         Interlocked.Add. Fixes #78312.
7422
7423         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
7424         
7425 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
7426
7427         * inssel.brg (mini_emit_virtual_call): Fix a warning.
7428
7429 2006-05-05  Martin Baulig  <martin@ximian.com>
7430
7431         * debug-mini.c (mono_debug_open_block): New method.
7432
7433         * mini-amd64.c
7434         (mono_arch_output_basic_block): Call mono_debug_open_block() at
7435         the beginning of each basic block.
7436
7437         * mini-x86.c
7438         (mono_arch_output_basic_block): Call mono_debug_open_block() at
7439         the beginning of each basic block.
7440
7441 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
7442
7443         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
7444         default until I understand why they break the build on amd64.
7445
7446 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
7447
7448         * mini.c (mini_cleanup): Call mono_cleanup ().
7449
7450         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
7451         errors.
7452
7453 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
7454
7455         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
7456         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
7457         default since all known bugs are fixed, and I cannot reproduce bug
7458         77944... I'm asking Matt Hargett to test again after this commit.
7459
7460 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
7461
7462         * mini-codegen.c: Fixed typo that thrashed inline.
7463
7464 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
7465
7466         * dominators.c (compute_dominators): Avoid using a worklist since
7467         it is not correct in some cases. Instead, iterate over all bblocks as
7468         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
7469
7470 2006-04-28  Miguel de Icaza  <miguel@novell.com>
7471
7472         * mini.c (mono_jit_compile_method_inner): Use
7473         mono_prepare_exception_from_error that resets the value
7474         internally.
7475
7476 2006-04-27  Miguel de Icaza  <miguel@novell.com>
7477
7478         * mini.c: Move the mini_loader_error_to_exception to metadata. 
7479         
7480 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
7481
7482         * aliasing.c: Fixed bug 78210.
7483
7484 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
7485
7486         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
7487         default until all their problems (or the ones they trigger) are fixed.
7488
7489 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
7490
7491         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
7492         
7493         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
7494         as loaded only after resolving patches since that could invoke the same method.
7495
7496         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
7497
7498         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
7499         functions.
7500
7501         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
7502         AOT loader.
7503
7504         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
7505         stack.
7506
7507         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
7508         made from AOT code through the PLT table.
7509
7510         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
7511         holding the plt offset when a call is made to the aot plt trampoline.
7512         
7513 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
7514
7515         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
7516         amd64 AOT support.
7517
7518         * Makefile.am (common_sources): Fix build breakage.
7519
7520         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
7521         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
7522         intra-assembly calls if possible.
7523         
7524         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
7525
7526         * mini-trampolines.c: Handle PLT entries.
7527
7528         * mini.c: Avoid creating a GOT var for calls.
7529
7530         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
7531         from mscorlib code.
7532
7533         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
7534         from mscorlib code.
7535
7536         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
7537         AOT code.       
7538
7539         * mini.h: Bump AOT file format version.
7540         
7541         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
7542         covers more cases.
7543
7544 2006-04-25  Martin Baulig  <martin@ximian.com>
7545
7546         * driver.c: Disable copyprop, consprop and inline when running
7547         inside the debugger.
7548
7549 2006-04-25  Martin Baulig  <martin@ximian.com>
7550
7551         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
7552         with `get_current_thread' and added `detach'.
7553         (MonoDebuggerMetadataInfo): Added `thread_size',
7554         `thread_tid_offset', `thread_stack_ptr_offset' and
7555         `thread_end_stack_offset'.
7556
7557 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
7558
7559         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
7560         aot-runtime.c.
7561
7562         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
7563         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
7564
7565         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
7566
7567         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
7568
7569         * aot.c: Add support for ADJUSTED_IID.  
7570
7571 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
7572
7573         * aot.c (emit_method_order): Don't align method_order_end.
7574
7575         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
7576         the interface ID changes.
7577
7578 2006-04-21  Dick Porter  <dick@ximian.com>
7579
7580         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
7581         cleaning up a thread.  Fixes the new part of bug 77470.
7582
7583 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
7584
7585         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
7586         to managed wrapper.
7587                      
7588 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
7589
7590         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
7591         
7592         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
7593         SIGSEGV. Fixes #78072.
7594
7595         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
7596         unregister our SIGABRT handler.
7597
7598 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
7599
7600         * mini.c: Disabled inline where it can alter the call stack in a
7601         way visible from managed code.
7602         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
7603         default.
7604
7605 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
7606
7607         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
7608         on other platforms. Fixes #78089.
7609
7610 2006-04-13  Martin Baulig  <martin@ximian.com>
7611
7612         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
7613         determine whether we're inside the debugger.
7614
7615         * debug-debugger.h
7616         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
7617
7618 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
7619
7620         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
7621         handler clauses. Fixes #78024.
7622
7623         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
7624         in the CALL_MEMBASE opcodes. Fixes #78088.
7625         (mono_arch_get_vcall_slot_addr): Ditto.
7626
7627 2006-04-10  Martin Baulig  <martin@ximian.com>
7628
7629         * debug-debugger.c: The thread handling code has now been moved
7630         into ../metadata/threads.c.
7631
7632 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
7633
7634         * driver.c (mono_main): Fix --with-gc=none build.
7635
7636         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
7637         (mono_spillvar_offset_float): Ditto.
7638         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
7639         hreg, not when its !global, since on ia64, there is a third category: stacked
7640         registers.      
7641
7642 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
7643
7644         * mini.c: set MonoInst->klass for load field address and a few other
7645         places.
7646
7647 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
7648
7649         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
7650
7651 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
7652
7653         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
7654         the branch opt changes.
7655
7656 2006-04-06  Dick Porter  <dick@ximian.com>
7657
7658         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
7659         
7660         * wapihandles.c (mini_wapi_seminfo): 
7661         * driver.c (mono_main): Add semaphore info option
7662
7663 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
7664
7665         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
7666         branch optimization changes. Fixes #78009.
7667
7668 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
7669
7670         * mini.c: ignore accessibility of methods in managed->native wrappers.
7671
7672 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
7673
7674         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
7675         
7676         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
7677
7678 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
7679
7680         * mini.c: Modify the branch optimizations to preserve the invariant that
7681         the entries inside the in_bb and out_bb arrays are unique.
7682         (mono_unlink_bblock): Avoid creation of new arrays.
7683
7684 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
7685
7686         * mini.c (mono_unlink_bblock): Fix regression caused by previous
7687         change (#77992).
7688
7689 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
7690
7691         * mini.c (optimize_branches): Remove the "optimizations" in
7692         the cbranch1/cbranch2 -> branch cases which were causing several
7693         problems in the past. Fixes #77986.
7694
7695 2006-03-31  Chris Toshok  <toshok@ximian.com>
7696
7697         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
7698         default optimizations :(
7699
7700 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
7701
7702         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
7703         branch.
7704
7705 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
7706
7707         * local-propagation.c: Added comments to structs and removed
7708         "Mono" prefixes from local tree mover types.
7709
7710 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
7711
7712         * Makefile.am (arch_sources): Define this for each architecture so 
7713         libmono_la_SOURCES is defined in one place.
7714
7715 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
7716
7717         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
7718         from handles/.
7719
7720 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
7721
7722         * driver.c: print the GC name supplied by configure.
7723
7724 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
7725
7726         * local-propagation.c: Added tree mover, and moved here all the
7727         local propagation code from mini.c
7728         * mini.c: Added support for treeprop, and moved all the local
7729         propagation code to local-propagation.c
7730         * mini.h: Added support for treeprop
7731         * driver.c: Added support for treeprop, enabled consprop, copyprop,
7732         treeprop, inline and deadce by default
7733         * Makefile.am: Added local-propagation.c
7734
7735 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
7736
7737         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
7738
7739 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
7740
7741         * debug-debugger.c: make it compile without the Boehm GC.
7742
7743 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
7744
7745         * mini.c: fixed issue with mismatch when an icall is registered
7746         with multiple names but same address.
7747
7748 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
7749
7750         * declsec.c, mini-exceptions.c: use write barrier to set reference
7751         fields of managed objects.
7752
7753 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
7754
7755         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
7756         (can_access_internals): Fix a warning.
7757
7758         * mini.c (print_method_from_ip): Rename this to 
7759         mono_print_method_from_ip so it gets exported.
7760
7761         * trace.c: Deal with strings inside StringBuilder's containing garbage
7762         and fix memory leaks. Fixes #77848.
7763
7764 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
7765
7766         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
7767         fixes #77787.
7768
7769 2006-03-16 Neale Ferguson <neale@sinenomine.net>
7770         
7771         * mini-s390.c: Remove OP_X86_TEST_NULL.
7772
7773 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
7774
7775         * mini.c: use the correct GetHashCode() for the moving collector.
7776
7777 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
7778
7779         * liveness.c: Regalloc spill cost tuning.
7780
7781 2006-03-15 Neale Ferguson <neale@sinenomine.net>
7782         
7783         * mini-s390x.h: Correct S390_LONG macro.
7784
7785         * mini-s390x.c: Cleanup unused code.
7786
7787 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
7788
7789         * jit-icalls.h: New file.
7790
7791         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
7792         icalls and include that instead of including jit-icalls.c.
7793
7794         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
7795         OP_X86 opcodes.
7796
7797 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
7798
7799         * mini.c: when checking for member accessibility, also check for
7800         friend assemblies and for explicit interface implementations.
7801
7802 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
7803
7804         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
7805
7806         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
7807
7808         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
7809         common cases are done first.    
7810
7811         * mini-ops.h: Only define platform specific opcodes on the given platform.
7812
7813         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
7814         branch.
7815         
7816 2006-03-14  Martin Baulig  <martin@ximian.com>
7817
7818         Revert Paolo's change from r57348:
7819
7820         * mini.h: don't use gboolean for bitfields.
7821         * mini.c: verifier changes for fields and methods accessibility.
7822
7823 2006-03-13  Neale Ferguson <neale@sinenomine.net>
7824
7825         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
7826
7827         * mini-s390x.c: Fix conv_r_un.
7828
7829         * cpu-s390, cpu-s390x.md: Fix lengths.
7830
7831 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
7832
7833         * mini.c: nested types have access to all the nesting
7834         levels, not just the enclosing types.
7835
7836 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
7837
7838         * mini.c: added a few more verification checks.
7839
7840 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
7841
7842         * liveness.c: Merge optimizations from the linear-il branch.
7843
7844 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
7845
7846         * mini-ia64.c (emit_call): Add a comment.
7847
7848         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
7849
7850         * tramp-ia64.c: Fix some warnings.
7851
7852 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
7853
7854         * mini.h: don't use gboolean for bitfields.
7855         * mini.c: verifier changes for fields and methods accessibility.
7856
7857 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
7858
7859         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
7860         lazy icall wrapper changes.
7861
7862         * dominators.c: Replace all the dominator algorithms with faster
7863         ones from the linear-il branch.
7864
7865         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
7866         the mempool.
7867
7868         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
7869         common cases are done first.
7870
7871         * mini-amd64.c: Fix some warnings.
7872
7873         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
7874         from the mempool.
7875
7876         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
7877         added code.
7878
7879         * mini.h: Add a missing prototype.
7880
7881 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
7882
7883         * mini.c: Compile icall wrappers lazily.
7884
7885         * mini-codegen.c: Use printf instead of g_print since its much faster.
7886
7887         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
7888         function.
7889
7890         * mini.c (optimize_branches): Cache the negative result from 
7891         remove_block_if_useless ().
7892
7893         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
7894         Also fix some bblock linking issues.
7895
7896         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
7897         assembly files.
7898
7899         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
7900
7901         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
7902         accessed fields first, for better cache behavior.
7903         
7904 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
7905
7906         * mini.c: speedup IList<T> array accesses.
7907
7908 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
7909
7910         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
7911         inline_costs counter. Fixes #77190.
7912
7913 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
7914
7915         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
7916         trace messages. Fixes #77706.
7917
7918 2006-03-04  Martin Baulig  <martin@ximian.com>
7919
7920         * tramp-amd64.c, tramp-x86.c
7921         (mono_debugger_create_notification_function): Use
7922         mono_global_codeman_reserve() to allocate a buffer at runtime and
7923         return it.
7924
7925         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
7926
7927         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
7928         notification function at runtime and then call `initialize' in the
7929         `MONO_DEBUGGER__debugger_info' vtable.
7930
7931 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
7932
7933         * iltests.il: Fix a visibility problem.
7934
7935 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
7936
7937         * driver.c, mini.c: add hooks for the counters API.
7938
7939 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
7940
7941         * driver.c: show disabled options.
7942
7943 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
7944
7945         * linear-scan.c: always use cost-driven selection.
7946
7947 2006-02-28  Raja R Harinath  <rharinath@novell.com>
7948
7949         * jit-icalls.c (helper_compile_generic_method): Revert change from
7950         2006-02-24.
7951
7952 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
7953
7954         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
7955
7956 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
7957
7958         * inssel.brg: style fixes, mostly to force the updated monoburg
7959         to run for people using svn.
7960
7961 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
7962
7963         * mini.c: match monoburg changes.
7964
7965 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
7966
7967         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
7968         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
7969         declaration in the header file.
7970
7971 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
7972
7973         * helpers.c: reduce relocations and mem usage.
7974
7975 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
7976
7977         * mini.h, mini-codegen.c: disable logging features if
7978         requested by configure.
7979
7980 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
7981
7982         * mini.c: tiny verifier changes.
7983
7984 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
7985
7986         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
7987         cpu-pentium.md: stack alignment changes for osx/x86,
7988         partially from Geoff Norton <gnorton@customerdna.com>.
7989
7990 2006-02-24  Raja R Harinath  <harinath@gmail.com>
7991
7992         * jit-icalls.c (helper_compile_generic_method): Update to changes
7993         in metadata/class.c.
7994
7995 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
7996         
7997         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
7998         
7999         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
8000         interface calls with large offsets.
8001
8002 2006-02-23  Raja R Harinath  <rharinath@novell.com>
8003
8004         * jit-icalls.c (helper_compile_generic_method): Document the
8005         special-case we depend on so that we can inflate the method twice
8006         with the same context with no bad side-effects.
8007
8008 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
8009
8010         * mini-x86.c, mini-amd64.c: fix for case when xen support
8011         is disabled.
8012
8013 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
8014
8015         * mini-x86.c, mini-amd64.c: generate code to access tls items
8016         in a faster way for Xen systems.
8017
8018 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
8019
8020         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
8021         updates and compilation fixes for the OSX/x86 port, mostly from
8022         Geoff Norton <gnorton@customerdna.com>.
8023
8024 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
8025
8026         * inssel.brg: faster interface call implementation
8027         to sync with the interface_offsets MonoVTable changes.
8028
8029 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
8030
8031         * mini.c: more verification checks.
8032
8033 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
8034
8035         * mini.c: added a few more verification checks.
8036
8037 2006-02-17      Neale Ferguson <neale@sinenomine.net>
8038
8039         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
8040         facility on the processor and use it if available.
8041
8042 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
8043
8044         * driver.c, aot.c, mini.c: throw exception if the IL code is
8045         invalid or unverifiable.
8046
8047 2006-02-17  Raja R Harinath  <rharinath@novell.com>
8048
8049         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
8050         m.StructField.
8051
8052 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
8053
8054         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
8055
8056 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8057
8058         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
8059         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
8060         handling of instantiated generic valuetypes.
8061
8062 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
8063
8064         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
8065         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
8066         instead.
8067
8068         * generics.2.cs: Revert the nullable reftypes tests.
8069
8070 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
8071
8072         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
8073         using __builtin_frame_address (1) as it doesn't work in the presence
8074         of optimizations. Hopefully fixes #77273.
8075
8076         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
8077         -> generics.cs change as it doesn't work with some automake versions.
8078
8079 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
8080
8081         * mini.c: handle systems that sue a different way to
8082         retrieve the stack address of the current thread.
8083
8084 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
8085
8086         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
8087         it specially in the makefile.
8088
8089         * generics.2.cs: Add tests for nullable reference types.
8090
8091 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8092
8093         * mini.c: always handle the case when mono_jit_init()
8094         is called in a thread different from the main thread,
8095         confusing libgc (bug #77309).
8096
8097 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
8098
8099         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
8100
8101 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
8102
8103         * mini.c: change optimize_branches () to use a single loop
8104         and introduce a new optimization to simplify some range checks.
8105
8106 2006-02-03  Martin Baulig  <martin@ximian.com>
8107
8108         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
8109         and merged with debugger_thread_manager_add_thread().
8110         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
8111         inform the debugger about the main thread.
8112
8113 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
8114
8115         * basic.cs: Add test for div.un/rem.un constant folding.
8116
8117 2006-02-03  Neale Ferguson <neale@sinenomine.net>
8118
8119         * cpu-s390x.md: correct int_xor_imm length
8120
8121 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
8122
8123         * generics.2.cs: New test for #77442.
8124
8125         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
8126         #77442.
8127
8128 2006-02-02  Martin Baulig  <martin@ximian.com>
8129
8130         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
8131         <mono/metadata/mono-debug-debugger.h>   
8132
8133         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
8134
8135 2006-02-02  Martin Baulig  <martin@ximian.com>
8136
8137         * debug-debugger.h: New header file for debug-debugger.c.
8138
8139         * debug-debugger.c: Big API cleanup; don't run the managed Main()
8140         function is a separate thread anymore; add support for attaching.
8141
8142 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
8143
8144         * tramp-x86.c: Fix a warning.
8145
8146 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
8147
8148         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
8149         on very large methods.
8150
8151         * aot.c (load_patch_info): Fix a warning.
8152
8153 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
8154
8155         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
8156         mini-ops.h: alu membase optimizations.
8157
8158 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
8159
8160         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
8161         to speedup StringBuilder.
8162
8163 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
8164
8165         * dominators.c (mono_compute_natural_loops): Fix detection of
8166         loop body start blocks.
8167
8168         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
8169
8170 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
8171
8172         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
8173         #75145.
8174
8175 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
8176
8177         * aliasing.c: Fixed aliasing issue on 64 bit archs.
8178
8179 2006-01-25  Martin Baulig  <martin@ximian.com>
8180
8181         * debug-debugger.c: Moved the `MonoDebuggerManager' and
8182         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
8183         started to cleanup this file a little bit.
8184
8185 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
8186
8187         * mini.c: optimize a codepath frequently happening in generics code.
8188
8189 2006-01-23  Martin Baulig  <martin@ximian.com>
8190
8191         * Makefile.am: Only compile debug-debugger.c on supported platforms.
8192
8193         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
8194         functions directly.
8195
8196         * driver.c: debug-debugger.c is only available if
8197         `MONO_DEBUGGER_SUPPORTED' is defined.   
8198
8199 2006-01-23  Martin Baulig  <martin@ximian.com>
8200
8201         * debug-debugger.c: Only enable this on platforms where the Mono
8202         Debugger is working (x86 and x86_64).
8203
8204 2006-01-21  Martin Baulig  <martin@ximian.com>
8205
8206         The Mono Debugger is now using the normal `mono' instead of the
8207         `mono-debugger-mini-wrapper' when executing managed code.
8208
8209         * debug-debugger.c: New file; previously known as
8210         debugger/wrapper/wrapper.c.
8211
8212         * debug-mini.c (mono_init_debugger): Removed.
8213
8214         * driver.c (mono_main): Added new `--inside-mdb' command line
8215         argument which is used when running inside the debugger.
8216
8217 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
8218
8219         * liveness.c (mono_analyze_liveness): Remove some unused data
8220         structures.
8221
8222 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
8223
8224         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
8225
8226 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
8227
8228         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
8229         depends on implementation details of monobitset.
8230
8231         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
8232         Fixes #77271.
8233
8234 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
8235
8236         * liveness.c: Update after monobitset changes.
8237
8238 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
8239
8240         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
8241
8242 2006-01-11 Neale Ferguson <neale@sinenomine.net>
8243
8244         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
8245
8246         * mini-s390x.c: Remove warning messages.
8247
8248 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
8249
8250         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
8251
8252 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
8253
8254         * generics.2.cs: Add ldelem/stelem_any test.
8255
8256 2006-01-10 Neale Ferguson <neale@sinenomine.net>
8257
8258         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
8259
8260 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
8261
8262         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
8263         
8264 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
8265
8266         * generics.2.cs: Reenable vtype tests.
8267
8268         * inssel-x86.brg: Remove an icorrect valuetype rule.
8269
8270 2006-01-06 Neale Ferguson <neale@sinenomine.net>
8271
8272         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
8273         initial support for OP_ABS.
8274
8275 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8276
8277         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
8278
8279 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8280
8281         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
8282         conversion and implement LADD/LSUB.
8283
8284         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
8285         architectures.
8286
8287 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8288
8289         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
8290
8291         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
8292         architectures.
8293
8294 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8295
8296         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
8297         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
8298         (stack walk problem).
8299
8300 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
8301
8302         * aot.c (mono_aot_load_method): Fix a warning.
8303
8304 2006-01-03  Neale Ferguson <neale@sinenomine.net>
8305
8306         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
8307
8308 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
8309
8310         * iltests.il: Add test for #77148.
8311
8312         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
8313         #77148.
8314
8315 2006-01-03  Neale Ferguson <neale@sinenomine.net>
8316
8317         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
8318
8319 2006-01-03  Neale Ferguson <neale@sinenomine.net>
8320
8321         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
8322         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
8323
8324         * basic-long.cs: Add lconv-to-r4/r8 tests.
8325
8326 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
8327
8328         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
8329
8330         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
8331         here as on other archs.
8332
8333 2005-12-29 Neale Ferguson <neale@sinenomine.net>
8334
8335         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
8336
8337 2005-12-29 Neale Ferguson <neale@sinenomine.net>
8338
8339         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
8340         
8341         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
8342
8343         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
8344         instrument_prolog; Add memory_barrier instruction.
8345
8346 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
8347
8348         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
8349
8350 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
8351
8352         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
8353
8354         * aliasing.c inssel.brg: Fix warnings.
8355
8356         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
8357         could skip initialization of some parts of memory.
8358
8359         * mini.c mini-ia64.c: Fix warnings.
8360
8361         * inssel-sparc.brg: Add an implementation of lneg which actually works.
8362
8363 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
8364
8365         * aliasing.c (mono_build_aliasing_information): Add a workaround for
8366         a crash seen on sparc.
8367
8368         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
8369         
8370         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
8371
8372 2005-12-21 Neale Ferguson <neale@sinenomine.net>
8373
8374         * mini-ops.h: Add s390_backchain instruction
8375
8376         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
8377
8378         * cpu-s390.md: Add s390_backchain instruction
8379
8380         * mini-s390.c: Significant ABI changes
8381
8382         * mini-s390.h: Cater for zero length structures
8383
8384 2005-12-20 Neale Ferguson <neale@sinenomine.net>
8385
8386         * mini-s390.c: ABI fixes
8387
8388         * inssel-s390.brg: Remove debug statements
8389
8390         * cpu-s390.md: Fix length of ATOMIC_xx operations
8391
8392 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
8393
8394         * basic-float.cs: Add float<->long conversion tests.
8395
8396 2005-12-16 Neale Ferguson <neale@sinenomine.net>
8397
8398         * mini-s390.c: Fix LOCALLOC processing.
8399
8400         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
8401
8402 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
8403
8404         * iltests.il: Add tests for some opcodes not covered by the other
8405         tests.
8406
8407 2005-12-15 Neale Ferguson <neale@sinenomine.net>
8408
8409         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
8410         register loading for Tail processing; Correct trace output.
8411
8412         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
8413
8414         * cpu-s390.md: Correct size of jmp instruction. 
8415
8416 2005-12-13 Neale Ferguson <neale@sinenomine.net>
8417
8418         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
8419
8420 2005-12-13 Neale Ferguson <neale@sinenomine.net>
8421
8422         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
8423           Bring s390 up to current level.
8424
8425 2005-12-12  Zltan Varga  <vargaz@gmail.com>
8426
8427         * generics.2.cs: Disable the newly added tests as they do not work yet.
8428         
8429         * generics.2.cs: Add valuetype tests.
8430
8431 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
8432
8433         * basic-long.cs: Add i4->u8 test.
8434
8435         * objects.cs: Add tests for JIT intrinsic.
8436
8437         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
8438         optimizations lost by a mistake.
8439
8440 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
8441
8442         * basic-long.cs: Remove a test moved to objects.cs.
8443
8444         * arrays.cs: Add more array tests.
8445
8446 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
8447
8448         * arrays.cs: Add new tests for multi-dimensional arrays.
8449
8450 2005-12-06  Raja R Harinath  <rharinath@novell.com>
8451
8452         * Makefile.am (test_sources2): Add generics.2.cs.
8453         (EXTRA_DIST): Add test_sources2.
8454
8455 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
8456
8457         Support for boxing and unboxing nullable types as well as the
8458         isinst operation on nullables, per the CLI ammendment.
8459
8460         * inssel.brg (CEE_ISINST): Special case for nullable
8461
8462         * mini.c (handle_unbox_nullable): new method
8463         (handle_box): Special case for nullable types
8464         (mono_method_to_ir): Call handle_unbox_nullable in correct
8465         places.
8466
8467         * generics.2.cs: New test suite
8468
8469         * Makefile.am: Support for regression tests with generics.
8470
8471 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
8472
8473         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
8474         allocated to registers. Fixes #76800.
8475
8476 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
8477
8478         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
8479
8480 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
8481
8482         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
8483         of platforms.
8484
8485 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
8486
8487         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
8488         objects.cs.
8489
8490         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
8491         
8492         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
8493 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
8494
8495         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
8496         single precision before storing to a single precision location.
8497
8498 2005-11-28  Raja R Harinath  <rharinath@novell.com>
8499
8500         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
8501
8502 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
8503
8504         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
8505         correct files.
8506
8507         * basic.cs: Remove test_0_byte_compares test which was moved to
8508         objects.cs a long time ago.
8509
8510 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
8511
8512         * aliasing.c: Fixed aliasing issue on 64 bit archs.
8513
8514 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
8515
8516         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
8517         handlers are called.
8518
8519         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
8520         throwing code.
8521
8522          * mini-ia64.c: Add support for the throw->branch exception 
8523         optimization.   
8524
8525         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
8526
8527 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
8528
8529         * mini.c: Enabled "fastpath" deadce :-)
8530         
8531 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
8532
8533         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
8534         alias analysis pass to support it.
8535         * mini.h: Likewise.
8536         * ssa.c: Likewise.
8537         * liveness.c: Likewise (liveness computation can use aliasing
8538         information to be more accurate).
8539         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
8540         moreover made so that "--compile-all" uses the given optimization
8541         flags and not the default ones.
8542         * aliasing.c: Alias analysis (new file).
8543         * aliasing.h: Likewise.
8544         * Makefile.am: added "aliasing.c" and "aliasing.h".
8545         
8546 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
8547
8548         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
8549         OP_L opcodes.
8550
8551 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
8552
8553         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
8554         fp >= end_of_stack exit condition, as it is not needed, and it might
8555         become true for fp eliminated frames.
8556
8557 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
8558
8559         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
8560         coded offsets.
8561
8562 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
8563
8564         * mini-arm.c: fixed alignment of doubles/longs to match
8565         the C ABI (bug #76635).
8566
8567 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
8568
8569         * aot.c: fix compilation with --enable-minimal=aot.
8570
8571 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
8572
8573         * mini-arm.c: fixed compatibility with the new
8574         floating point emulator package for compares.
8575
8576 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
8577
8578         * mini.c : reverted sig->pinvoke changes (r51396-51397).
8579
8580 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
8581
8582         * mini-exceptions.c (print_stack_frame): Output to stderr.
8583         (mono_handle_native_sigsegv): Ditto.
8584
8585 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
8586
8587         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
8588         OP_LCONV_TO_OVF_I implementation.
8589
8590         * mini-amd64.c: Add support for the throw->branch exception 
8591         optimization.
8592
8593         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
8594         when the catch clause catches a more general exception, i.e. Object.
8595
8596 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
8597
8598         * cpu-ia64.md: Remove unused opcodes.
8599
8600         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
8601         specific defines for architectures defining USE_SIGACTION.
8602
8603         * mini-ia64.c: Fix some warnings.
8604
8605         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
8606         version seemed to skip a frame.
8607
8608 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
8609
8610         * mini.c: Clean up the usage of sig->pinvoke flag. Now
8611         only calls which are made to native code use this flag.
8612
8613 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
8614
8615         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
8616         varargs methods as well.
8617         
8618         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
8619         which have save_lmf set. Reorganize methods prologs a bit.
8620
8621         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
8622         debugger to the proper place.
8623
8624 2005-10-29  Martin Baulig  <martin@ximian.com>
8625
8626         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
8627         when running inside the debugger until the debugger has support
8628         for it.
8629
8630 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
8631
8632         * mini.h: Fix a warning.
8633
8634 2005-10-24  Miguel de Icaza  <miguel@novell.com>
8635
8636         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
8637         we expose publicly, this returns the string.
8638
8639 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
8640
8641         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
8642         with fp elimination.
8643
8644 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
8645
8646         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
8647         native stacktrace using the glibc 'backtrace' function if available.
8648
8649 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
8650
8651         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
8652
8653         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
8654         handle SIGSEGVs received while in native code.
8655
8656         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
8657         code, call mono_handle_native_sigsegv which will abort the runtime
8658         after printing some diagnostics, instead of converting it into a
8659         confusing NullReferenceException.
8660
8661 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
8662
8663         * cpu-pentium.md: Remove unused opcodes.
8664
8665 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
8666
8667         * mini-amd64.h (MonoLMF): Add rsp field.
8668
8669         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
8670         the lmf too.
8671
8672 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
8673
8674         * mini-codegen.c (get_register_spilling): Fix some warnings.
8675
8676 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
8677
8678         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
8679         elimination during exception handling. Enable fp elimination by
8680         default.
8681
8682         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
8683         elimination.
8684
8685 2005-10-16  Martin Baulig  <martin@ximian.com>
8686
8687         * mini-exceptions.c
8688         (mono_debugger_run_finally): New public method for the debugger.
8689
8690 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
8691
8692         * debug-mini.c (mono_debug_init_method): Fix warning.
8693
8694         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
8695         the 'exname' parameter const to fix some warnings.
8696
8697 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
8698
8699         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
8700         introduced by the previous patch.
8701
8702 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
8703
8704         * basic-float.cs: Add test for precision of float arithmetic.
8705
8706         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
8707         when loading/storing single values from/to memory.
8708
8709         * mini.c (mono_jit_compile_method_with_opt): Create the function
8710         pointers in the correct domain.
8711
8712 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
8713
8714         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
8715         introduced by previous patch.
8716         
8717         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
8718         when out_filter_idx is NULL.
8719
8720         * mini-exceptions.c: Don't run filter clauses twice during exception
8721         handling. Fixes #75755.
8722
8723 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
8724
8725         * aot.c: Add support for ldflda wrappers.
8726
8727         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
8728         #75902.
8729
8730 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
8731
8732         * mini.c, mini.h: do not consider exception handlers blocks when
8733         setting up interface variables.
8734
8735 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
8736
8737         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
8738
8739 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
8740
8741         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
8742         causes a regression.
8743
8744         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
8745
8746 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
8747
8748         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
8749         of the OP_P definitions.
8750
8751         * TODO: Add a proposal for dealing with the CEE/OP mess.
8752
8753         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
8754         optimizations from the x86 port.
8755
8756         * cpu-amd64.md: Ditto.
8757
8758         * basic.cs basic-long.cs: Add tests.
8759
8760 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
8761
8762         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
8763         Patrik Torstensson's implementation of my exception-handling
8764         optimization idea, when the exception object is not used
8765         (bug #62150).
8766
8767 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
8768
8769         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
8770         of the mul_imm optimizations from the old jit.
8771
8772 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
8773
8774         * mini.c, liveness.c: patch by Patrik Torstensson and
8775         Zoltan Varga to improve performance in methods with
8776         exception clauses.
8777
8778 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
8779
8780         * driver.c: Remove 'Globalization' entry from --version.
8781
8782 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
8783
8784         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
8785         there is a profiler interested in JIT events.
8786
8787         * aot.c: Load profile files produced by the AOT profiling module, and
8788         reorder methods based on the profiling info. Add a 'method_order' table
8789         to the AOT file to make mono_aot_find_jit_info work with the reordered
8790         methods.
8791
8792         * mini.h: Bump AOT file version info.
8793
8794 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
8795
8796         * mini-arm.h: work around what looks like a gcc bug when optimizations
8797         are enabled.
8798
8799 2005-09-28  Raja R Harinath  <rharinath@novell.com>
8800
8801         * Makefile.am (AM_CFLAGS): Don't use += to append inside
8802         conditionals.  Use ...
8803         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
8804
8805 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
8806
8807         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
8808         to determine the amount of memory to copy when passing valuetypes.
8809
8810         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
8811         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
8812
8813 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
8814
8815         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
8816         information about aot.
8817
8818 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
8819
8820         * *.c: Replace the use of {Enter,Leave}CriticalSection with
8821         macros. This will allow a deadlock debugger to easily be plugged
8822         in.
8823
8824 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
8825
8826         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
8827
8828 2005-09-27  Raja R Harinath  <rharinath@novell.com>
8829
8830         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
8831         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
8832         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
8833         ($(arch_built)) [CROSS_COMPILING]: Error out.
8834
8835 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
8836
8837         * aot.c: Add support for the no_special_static flag for classes.
8838
8839 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
8840
8841         * Reapply reverted patches.
8842
8843         * *: Revert r50174 as well.
8844
8845         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
8846
8847 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
8848
8849         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
8850
8851 2005-09-23  Miguel de Icaza  <miguel@novell.com>
8852
8853         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
8854         part of the SIG_HANDLER_SIGNATURE.  
8855
8856 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
8857
8858         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
8859         statistics.
8860
8861         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
8862         introduced by previous patch.
8863
8864 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
8865
8866         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
8867         saved registers too.
8868
8869         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
8870         upon the information returned by get_call_info ().
8871         
8872         * mini-x86.c (add_float): Fix stack size calculation.
8873         (mono_arch_call_opcode): Rewrite this so it works based up the
8874         information returned by get_call_info ().
8875         (mono_arch_get_this_vret_args): Ditto.
8876
8877 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
8878
8879         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
8880         in cinfo to determine the registers which need to be used.
8881
8882 2005-09-20  Miguel de Icaza  <miguel@novell.com>
8883
8884         * driver.c (mono_main): Add --server and --desktop flags. 
8885
8886 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
8887
8888         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
8889         registers as global registers.
8890
8891         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
8892         longer needed with the new register allocator.
8893
8894         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
8895
8896         * cpu-ia64.md: Remove unused opcodes.
8897         
8898         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
8899         
8900 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
8901
8902         * cpu-amd64.md: Remove unused opcodes.
8903
8904         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
8905         needed with the new register allocator.
8906
8907         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
8908         reg-reg moves.
8909
8910 2005-09-16  Raja R Harinath  <rharinath@novell.com>
8911
8912         * Makefile.am (check-local): Don't invoke semdel-wrapper.
8913
8914 2005-09-16  Martin Baulig  <martin@ximian.com>
8915
8916         * exceptions-amd64.c
8917         (throw_exception): Don't call mono_debugger_throw_exception() if
8918         we're a rethrow - see the FIXME in the code.
8919
8920 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
8921
8922         * mini.c (mono_init_exceptions): This only works on some architectures.
8923         
8924 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
8925
8926         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
8927         on ia64.
8928
8929         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
8930
8931         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
8932         now in mini-exceptions.c.
8933
8934 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
8935
8936         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
8937         now in mini-exceptions.c.
8938
8939 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
8940
8941         * exceptions-x86.c: Applied patch from Patrik Torstensson 
8942         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
8943
8944         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
8945         code into mini-exceptions.c. Add some assertions to it.
8946
8947 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
8948
8949         * aot.c (emit_section_change): Applied patch from "The Software Team" 
8950         (<software@solmersa.com>). Fix as errors on windows.
8951
8952 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
8953
8954         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
8955         method info into the LMF.
8956
8957 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
8958         
8959         * mini-ia64.c: Add proper unwind info for method epilogs.
8960
8961         * exceptions-ia64.c: Add some code to help debugging.
8962         
8963         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
8964
8965         * mini-exceptions.c: Fix warning.
8966
8967 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
8968
8969         * mini.c: Really fix build.
8970
8971         * mini-x86.c mini-amd64.c: Fix build.
8972
8973 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
8974
8975         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
8976
8977         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
8978         some Interlocked methods as intrinsics.
8979
8980         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
8981         for Thread methods as well.
8982
8983         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
8984
8985         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
8986
8987         * mini-ia64.c mini-x86.c mini-amd64.c 
8988         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
8989         OP_MEMORY_BARRIER.
8990         
8991         * mini.c (mono_init_exceptions): Fix build breakage.
8992
8993 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
8994
8995         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
8996         of instructions. Use the new ia64_unw_op macros for emitting unwind
8997         info.
8998
8999         * mini.c (mono_init_exceptions): Initialize exception handling
9000         related trampolines at startup.
9001
9002 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
9003
9004         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
9005
9006 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
9007
9008         * mini.c: Handle type loading errors gracefully during compilation and
9009         throw the appropriate exception.
9010
9011 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
9012
9013         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
9014         for the mono binary.
9015
9016 2005-09-09  Martin Baulig  <martin@ximian.com>
9017
9018         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
9019         the release.
9020
9021 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
9022
9023         * mini-arm.h: use emulation for conv.r.un for the release.
9024
9025 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
9026
9027         * mini-arm.c, objects.cs: more fixes and tests for them.
9028
9029 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
9030
9031         * mini-arm.c: align structures to at least 4 bytes to be able
9032         to keep our current optimized memcpy.
9033
9034 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
9035
9036         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
9037
9038 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9039
9040         * mini.c: ignore SIGPIPE.
9041
9042 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
9043
9044         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
9045
9046         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
9047
9048 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
9049
9050         * mini.h: Add prototype for mono_allocate_stack_slots_full.
9051
9052 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
9053
9054         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
9055         exception handling support.
9056         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
9057         patch by Brian Koropoff <briank@marakicorp.com>).
9058
9059 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
9060
9061         * mini.c: revert another 'optimization' which breaks when
9062         items on the eval stack need to be saved at a basic block end
9063         (bug #75940).
9064
9065 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
9066
9067         * jit-icalls.c: for arrays, ensure we always provide
9068         lower bounds.
9069
9070 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
9071
9072         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
9073         
9074         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
9075
9076 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
9077
9078         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
9079         arguments in their original register.
9080
9081 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
9082
9083         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
9084         memset/memcpy.
9085
9086         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
9087         when ssapre is enabled.
9088
9089         * inssel-long.brg: Fix bug in previous patch.
9090
9091         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
9092         multiplication by a constant.
9093
9094 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
9095
9096         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
9097         icc.
9098
9099         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
9100         saving registers.
9101
9102 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
9103
9104         * inssel-arm.brg: apply changes tested by Brian Koropoff
9105         <briank@marakicorp.com>.
9106
9107 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
9108
9109         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
9110         
9111 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
9112
9113         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
9114         to the same register if dreg is just a base register.
9115         (print_ins): Improve printing of membase opcodes.
9116
9117         * inssel-x86.brg: Add optimized ldind(reg) rules.
9118
9119         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
9120
9121 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
9122
9123         * mini.c: when running under valgrind, set the stack bottom for
9124         the GC at the actual approximate stack for the app (fixes running
9125         mono with valgrind).
9126
9127 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
9128
9129         * mini.c: do no break at the first valuetype to init found
9130         (fixes bug #75791).
9131
9132 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
9133
9134         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
9135
9136 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
9137
9138         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
9139
9140 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
9141
9142         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
9143
9144 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
9145
9146         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
9147
9148         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
9149         code.
9150
9151         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
9152         code.
9153
9154         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
9155         methods.
9156
9157 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
9158
9159         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
9160
9161 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
9162
9163         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
9164         in the tail recursion optimization.
9165
9166         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
9167         debug info into the assembly file.
9168
9169         * iltests.il: Add test for filter regions.
9170
9171         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
9172         initial stack of filter regions. Fixes #75755.
9173
9174 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
9175
9176         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
9177         stack requirements.
9178
9179 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
9180
9181         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
9182         the check for an already compiled method on non-ia64 platforms.
9183         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
9184         proper domain.
9185
9186         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
9187
9188         * inssel-x86.brg: Add some optimized call rules.
9189
9190 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
9191
9192         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
9193         method here.
9194
9195         * mini.h mini-trampolines.c: Pass the trampoline argument to 
9196         mono_arch_patch_delegate_trampoline.
9197
9198         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
9199
9200         * mini-trampolines.c: Fix build.
9201
9202         * mini-amd64.h: Add delegate trampolines.
9203
9204         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
9205
9206         * inssel-amd64.brg: Add optimized call rules.
9207         
9208         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
9209
9210         * inssel-ia64.brg: Add optimized ldind(reg) rules.
9211
9212 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
9213
9214         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
9215         change.
9216
9217         * mini-ia64.c: Remove LMF fixmes.
9218
9219         * mini-ia64.h: Remove most fields from LMF.
9220
9221         * inssel-ia64.brg (stmt): Fix unaligned access errors.
9222
9223         * mini-trampolines.c: Add support for IA64 function descriptors.
9224
9225         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
9226         for IA64 function descriptors.
9227
9228 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
9229
9230         * tramp-arm.c: patch the vtable for virtual calls. Added
9231         support code to register/unregister the LMF.
9232         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
9233         more LMF work.
9234
9235 2005-08-19  Dick Porter  <dick@ximian.com>
9236
9237         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
9238         bit value if needed.
9239
9240 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
9241
9242         * mini.c (mini_get_method): Move handling of wrapper data here.
9243
9244         * mini.c (mono_method_to_ir): Add support for dynamic methods.
9245
9246         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
9247         virtual.
9248
9249         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
9250         bblock->code does not remain empty.
9251
9252 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
9253
9254         * arrays.cs: Add regression test for #75832.
9255
9256         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
9257         rules. Fixes #75832.
9258
9259         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
9260         instruction scheduling.
9261
9262 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
9263
9264         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
9265
9266 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
9267
9268         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
9269
9270         * mini-codegen.c: Fix VC build.
9271
9272         * cpu-pentium.md: Increase length of atomic_exhange_i4.
9273
9274 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9275
9276         * mini.h: fix signature for mono_register_opcode_emulation.
9277
9278 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
9279
9280         * mini.c: Get rid of most of the helper_sig_... constants using
9281         mono_create_icall_signature ().
9282
9283 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
9284
9285         * jit-icalls.c (helper_ldstr): New helper function.
9286
9287         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
9288
9289         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
9290         throw, load the string using a helper call instead of creating a string object.
9291
9292         * aot.c: Update after LDSTR changes.
9293
9294         * mini.h: Bump AOT file version.
9295         
9296         * aot.c: Save class size info into the AOT file. Print more statistics during
9297         compilation.
9298
9299         * mini.h: Bump AOT file version.
9300
9301         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
9302         ordering of disasm cases. Fixes #74957.
9303
9304 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
9305
9306         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
9307         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
9308         the generic code needed for the ARM port.
9309
9310 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
9311
9312         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
9313         inssel-arm.brg: more ARM features and fixes.
9314
9315 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
9316
9317         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
9318         ARM port work in progress.
9319
9320 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
9321
9322         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
9323
9324         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
9325
9326         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
9327
9328         * inssel.brg (mini_emit_memset): Add support for unaligned access.
9329
9330         * *-ia64.*: Ongoing IA64 work.
9331         
9332         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
9333
9334 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
9335
9336         * TODO: Remove out-of-data todo stuff.
9337
9338         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
9339         dead code.
9340
9341         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
9342
9343         * mini.h: Bump corlib version.
9344
9345 2005-07-27  Martin Baulig  <martin@ximian.com>
9346
9347         * mini-codegen.c
9348         (create_copy_ins): Added `const unsigned char *ip' argument; set
9349         `copy->cil_code' from it.
9350
9351 2005-07-27  Martin Baulig  <martin@ximian.com>
9352
9353         * mini-exceptions.c (mono_handle_exception): Don't call
9354         mono_debugger_handle_exception() for filters.
9355
9356 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
9357
9358         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
9359         as well.
9360
9361 2005-07-26  Martin Baulig  <martin@ximian.com>
9362
9363         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
9364
9365         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
9366         helper_compile_generic_method() if the method is actually virtual
9367         and non-final.
9368
9369 2005-07-26  Martin Baulig  <martin@ximian.com>
9370
9371         * mini.c
9372         (trampoline_code): Renamed to `mono_trampoline_code' and made it
9373         public; this is now accessed directly by the debugger.
9374         (mono_generic_trampoline_code): Removed.
9375
9376         * debug-mini.c
9377         (mono_debug_init_method): Also add interncalls and wrappers.
9378
9379 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
9380
9381         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
9382
9383 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
9384
9385         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
9386
9387 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
9388
9389         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
9390
9391 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
9392
9393         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
9394         getting TLS offsets on AMD64 too.
9395
9396 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
9397
9398         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
9399
9400 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
9401
9402         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
9403         inssel-arm.brg, mini-arm.h: ARM port work in progress.
9404
9405 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
9406
9407         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
9408
9409         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
9410         to mini.c.
9411
9412         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
9413         mono_sparc_is_virtual_call ().
9414         
9415         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
9416
9417         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
9418         trampoline parameters.
9419
9420         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
9421         
9422         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
9423         to mono_arch_get_vcall_slot_addr.
9424
9425         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
9426         trampoline code.
9427
9428         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
9429
9430 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
9431
9432         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
9433
9434 2005-07-19  Martin Baulig  <martin@ximian.com>
9435
9436         * exceptions-amd64.c (throw_exception): Call
9437         mono_debugger_throw_exception() here like we're doing it on i386.
9438
9439 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
9440
9441         * mini-ia64.c: Add optimized TLS access support.
9442
9443 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
9444
9445         * mini-exceptions.c: Ongoing IA64 work.
9446
9447         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
9448
9449         * mini.c: Use the default optimization set when embedding. Fixes
9450         #75194.
9451
9452 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
9453
9454         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
9455         of trampolines to a separate file.
9456
9457         * mini-trampolines.c: New file.
9458
9459         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
9460         separate file.
9461         
9462         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
9463         amd64/ia64 code.
9464
9465         * mini-codegen.c: Fix cygwin build.
9466
9467 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
9468
9469         * mini.c: Add some minor changes needed by the IA64 port.
9470
9471         * *-ia64.*: Ongoing IA64 work.
9472
9473 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
9474
9475         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
9476         trampolines into arch-independent and arch-dependent parts.
9477
9478         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
9479
9480 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
9481
9482         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
9483
9484         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
9485         the xp-regalloc-branch for amd64.
9486
9487         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
9488         xp-regalloc-branch for x86.
9489
9490 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
9491
9492         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
9493
9494 2005-07-06  Martin Baulig  <martin@ximian.com>
9495
9496         * mini.c
9497         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
9498         (mono_jit_runtime_invoke): Likewise.
9499
9500 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
9501
9502         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
9503         on x86 too.
9504         
9505         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
9506         without loading their metadata. Reorganize the file format so exception handling+
9507         debug info is kept separate from normal method info. Create MonoJitInfo 
9508         structures for methods lazily.
9509
9510         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
9511         loading metadata.
9512         (x86_class_init_trampoline): Patch AOT class init trampolines too.
9513
9514         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
9515
9516         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
9517         in AOT code.
9518
9519         * mini.h: Bump AOT file version.
9520
9521 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
9522
9523         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
9524
9525 2005-07-01  Raja R Harinath  <rharinath@novell.com>
9526
9527         * Makefile.am (check-local): Call semdel-wrapper.
9528
9529 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
9530
9531         * mini-x86.c: Revert the last change as it seems to break the build..
9532
9533 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
9534
9535         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
9536         
9537         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
9538
9539 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
9540
9541         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
9542         outside of the macro, so strange stuff doesn't happen with gcc4
9543         (NEW_AOTCONST_TOKEN): Likewise.
9544
9545 2005-06-28  Martin Baulig  <martin@ximian.com>
9546
9547         * mini.c (mini_class_is_system_array): New static method; use this
9548         instead of `klass->parent == mono_defaults.array_class' everywhere
9549         since this also works for the new generic array class.
9550
9551 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
9552
9553         * inssel.brg: Remove warnings.
9554
9555 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
9556
9557         * mini-ia64.c: Ongoing IA64 work.
9558
9559         * basic-float.cs: Add float->i1 conversion test.
9560
9561         * iltests.il: Add conv.u4 test.
9562
9563 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
9564
9565         * inssel-long.brg: Fix bug caused by last change.
9566
9567 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
9568
9569         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
9570         BSDs.  Allows the x86 JIT to work on OSX86
9571
9572 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
9573
9574         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
9575         u4->i8 conversion.
9576
9577         * mini-ia64.c: Ongoing IA64 work.
9578
9579 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
9580
9581         * mini-ia64.c: Ongoing IA64 work.
9582
9583         * driver.c: Clean up jit_code_hash as well when using --regression.
9584
9585         * inssel-long.brg: Fix long->i4/u4 conversion rules.
9586
9587         * basic-long.cs: Add tests for long->u4 conversion.
9588
9589 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
9590
9591         * mini.c: Take mono_get_domainvar out of macros. This makes sure
9592         that we do not depend on undefined C behavior: the order stuff
9593         gets evaluated within an expression. Fixes mono when compiled on
9594         GCC 4.
9595
9596 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
9597
9598         * *-ia64.*: Ongoing IA64 work.
9599
9600         * aot.c: Lower memory usage while loading AOT methods.
9601
9602         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
9603
9604         * mini.h: Bump AOT file format version.
9605
9606 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
9607
9608         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
9609
9610 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
9611
9612         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
9613         not on callee assembly). Fixed some comments.
9614
9615 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
9616
9617         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
9618         it gets proper disassembly.
9619         (emit_method_info): Remove some dead code.
9620
9621         * mini.c (mini_method_compile): Allways allocate the GOT var in
9622         mono_method_to_ir for emulating opcodes.
9623
9624 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
9625
9626         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
9627         before freeing the code memory. Fixes #74990.
9628
9629         * objects.cs: Add regression test for #74992.
9630
9631         * liveness.c: Extend live ranges of arguments to the beginning of the
9632         method. Fixes #74992.
9633
9634         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
9635         so it points into the faulting instruction.
9636
9637 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
9638
9639         * jit-icalls.c (mono_imul_ovf): Add exception handling.
9640
9641         * *-ia64.*: Ongoing IA64 work.
9642
9643         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
9644
9645 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
9646
9647         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
9648
9649         * *-ia64.*: Ongoing IA64 work.
9650
9651 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
9652
9653         * basic-long.cs: Add tests for add/sub.ovf.
9654
9655         * basic.cs: Add tests for sub.ovf.
9656
9657         * *-ia64.*: Ongoing IA64 work.
9658
9659 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
9660
9661         * *-ia64.*: Ongoing IA64 work.
9662
9663         * basic.cs: Add conv.ovf.i4.un test.
9664
9665 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
9666
9667         * mini.c: (remove_block_if_useless) Fixed bug 75061.
9668         
9669 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9670
9671         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
9672
9673 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
9674
9675         * *-ia64.*: Ongoing IA64 work.
9676
9677 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9678
9679         * trace.[ch]:
9680         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
9681
9682 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
9683
9684         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
9685
9686 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
9687
9688         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
9689
9690         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
9691         of a call is callable by a near call.
9692
9693 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
9694
9695         * mini-ia64.c: Ongoing IA64 work.
9696
9697 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
9698
9699         * genmdesc.c: Make the generated array non-static.
9700
9701         * inssel-long.brg: Fix LSHR_IMM rule.
9702
9703         * *-ia64.*: Ongoing IA64 work.
9704
9705         * *-ia64.*: Ongoing IA64 work.
9706
9707 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
9708
9709         * *-ia64.*: Ongoing IA64 work.
9710
9711         * *-ia64.*: Ongoing IA64 work.
9712         
9713         * mini-ia64.c: Ongoing IA64 work.
9714
9715         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
9716
9717 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
9718
9719         * objects.cs basic-calls.cs: Move some tests to objects.cs.
9720         
9721         * objects.cs basic-long.cs: Move some tests to objects.cs.
9722
9723 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
9724
9725         * *-ia64.*: Ongoing IA64 work.
9726
9727         * iltests.il: Add a new test.
9728
9729         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
9730         newobj. Fixes #75042.
9731
9732 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
9733
9734         * *-ia64.*: Ongoing IA64 work.
9735         
9736         * *-ia64.*: Ongoing IA64 work.
9737         
9738         * *-ia64.*: Ongoing IA64 work.
9739
9740         * basic.cs objects.cs: Move tests accessing static variables as well.
9741
9742         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
9743
9744 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
9745
9746         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
9747
9748         * driver.c: Always print failed tests.
9749
9750         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
9751         frame pointer.
9752
9753         * *ia64*: Ongoing IA64 work.
9754
9755 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
9756
9757         * basic.cs: Add tests for add.ovf. Fix warnings.
9758
9759 2005-05-18  Miguel de Icaza  <miguel@novell.com>
9760
9761         * driver.c (mono_main): Avoid crash if no argument is passed to
9762         --break;  Do not use g_error, but f_printf.   And fix all other
9763         ocurrences of the same crash.
9764
9765 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
9766
9767         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
9768         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
9769         Fixes #74742.
9770
9771 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
9772
9773         * *-ia64.*: Add beginnings of IA64 backend.
9774
9775         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
9776
9777 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
9778
9779         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
9780         Fixes #74925.
9781
9782         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
9783
9784         * mini-amd64.c: Fix a warning.
9785
9786 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
9787
9788         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
9789         in float_neg. Fixes #74897.
9790
9791         * mini-amd64.c (emit_call): Fix another near call bug.
9792
9793 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
9794
9795         * declsec.c: Keep the appdomain information in the structure. Added a 
9796         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
9797         value gets overwritten).
9798         * declsec.h: Set the default MonoArray for the the stack to 6. Added
9799         an MonoAppDomain member to MonoSecurityFrame.
9800         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
9801         used in the stack walk. Now use a MonoArray which grow (double) when
9802         it gets full.
9803
9804 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
9805
9806         * mini.c: Re-enabled runtime cleanup, since running threads should
9807         now properly stop when exiting.
9808
9809 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
9810
9811         * mini-codegen.c: New file contaning the arch-independent local
9812         register allocator. Not used by any architectures yet.
9813
9814         * mini.h linear-scan.c: Merge some changes from the 
9815         mini-xp-local-regalloc branch.
9816
9817 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
9818
9819         * mini-amd64.c (emit_call): Fix calls to native functions when the
9820         runtime is compiled as a shared library. Fixes #74756.
9821
9822         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
9823         on a literal field. Fixes #74751.
9824
9825 2005-04-25  Raja R Harinath  <rharinath@novell.com>
9826
9827         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
9828
9829 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
9830
9831         * objects.cs: Add missing null casting test.
9832
9833 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
9834
9835         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
9836         in wrapper methods. Also rename 'address' variable to 'offset'.
9837
9838 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
9839
9840         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
9841         warnings.
9842         
9843         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
9844
9845         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
9846         work on windows.
9847
9848 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
9849
9850         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
9851
9852 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
9853
9854         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
9855         just the last bytes.
9856
9857 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
9858
9859         * aot.c (mono_compile_assembly): Fix warning.
9860
9861         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
9862         by the _MSC_VER stuff.
9863
9864 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
9865
9866         * inssel-long.brg: Fix #74588.
9867
9868         * cpu-amd64.md: Fix #74591.
9869
9870         * iltests.il: Add new regression tests.
9871
9872 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
9873
9874         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
9875         valuetype.
9876
9877 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
9878
9879         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
9880
9881         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
9882         from Bill Middleton <flashdict@gmail.com>.
9883
9884 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
9885
9886         * arrays.cs: Add new regression test. Fix warnings.
9887
9888 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
9889
9890         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
9891         and leakage in CKFINITE.
9892
9893         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
9894         this to a null op since it is called on amd64 too.
9895
9896         * exceptions-amd64.c (get_throw_trampoline): Align stack.
9897
9898         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
9899         body since this is not used on amd64.
9900         
9901         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
9902
9903         * mini-amd64.c: Remove obsolete fixmes.
9904
9905         * mini.c (print_method_from_ip): Fix debugging support.
9906
9907 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
9908
9909         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
9910         so that expressions that don't give much gain are not reduced.
9911         * ssapre.h: Likewise.
9912
9913 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
9914
9915         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
9916
9917         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
9918
9919         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
9920
9921 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
9922
9923         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
9924
9925         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
9926
9927 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
9928
9929         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
9930         stack touching.
9931
9932         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
9933
9934         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
9935
9936         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
9937
9938         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
9939         MONO_ARCH_USE_SIGACTION. Fixes #74252.
9940
9941         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
9942
9943         * mini-x86.c: Fix up stack overflow handling.   
9944
9945         * exceptions.cs: Add new regression test.
9946
9947 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
9948
9949         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
9950         mono_jit_thread_attach.
9951
9952         * mini.c (mono_method_to_ir): Verify called method is not abstract.
9953
9954 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
9955
9956         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
9957         avoid calling constructors using callvirt.
9958
9959         * inssel.brg: Fix #74073.
9960
9961 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
9962
9963         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
9964         compilation with non-GCC compilers.
9965         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
9966         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
9967
9968 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
9969
9970         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
9971         klass->interface_offsets (will likely fix bug#74073).
9972
9973 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
9974
9975         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
9976
9977 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
9978
9979         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
9980         to amd64_div_reg_size ().
9981         
9982         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
9983
9984 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
9985
9986         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
9987
9988 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
9989
9990         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
9991
9992 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
9993
9994         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
9995         
9996         * mini.c (mono_precompile_assembly): Load and precompile referenced
9997         assemblies as well. Fixes #74015.
9998
9999 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
10000
10001         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
10002
10003 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
10004
10005         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
10006         a lot of checks and (anyway) permissions cannot work until corlib is 
10007         loaded.
10008
10009 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
10010
10011         * mini-ppc.c: fixed ABI issue on sysv/ppc.
10012
10013 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
10014
10015         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
10016         calls (fixes bug#72824).
10017
10018 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
10019
10020         * mini.c: fix tail recursion elimination (see test in bug#73936).
10021
10022 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
10023
10024         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
10025         some fp functions in sse2 mode.
10026
10027 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
10028
10029         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
10030
10031 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
10032
10033         * mini.h mini.c: Add mono_get_jit_tls_key ().
10034
10035         * mini-x86.c: Enable fast TLS support on windows.
10036
10037 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
10038
10039         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
10040         * mini.c: Check for p/invoke method when generating code. If a
10041         p/invoke method, or it's class, isn't decorated with [Suppress
10042         UnmanagedCodeSecurity] then generate code to call System.Security.
10043         UnmanagedDemand (only if the security manager is active).
10044
10045 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
10046
10047         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
10048         last change as it seems to cause strange crashes.
10049         
10050 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10051
10052         * *.c: handle unsafe function pointers where needed.
10053
10054 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
10055
10056         * mini.c (mono_jit_free_method): Remove the fixme too.
10057
10058 2005-03-15  Miguel de Icaza  <miguel@novell.com>
10059
10060         * mini.c: As discussed, make the code actually free the delegate
10061         thunk now, to enable the debugging of delegate problems, use
10062         MONO_DEBUG=1 when running Mono. 
10063
10064         This takes also care of parts of the leaks as seen by Joe.
10065
10066 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
10067
10068         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
10069         thread_tls_offset calculation.
10070
10071 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
10072
10073         * declsec.c: Reworked linkdemand checks for icall. The previous code
10074         was using the declaration code (untrusted) and didn't work as expected
10075         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
10076         specific case.
10077
10078 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
10079
10080         * iltests.il: Add new localloc test.
10081
10082         * mini-amd64.c: Handle large stack allocations the same way as on
10083         windows if stack overflow handling is working.
10084         
10085         * mini-amd64.c: Allocate the signal stack using mmap.
10086
10087         * mini.c (sigsegv_signal_handler): Fix reading of context.
10088
10089         * mini-exceptions.c: Fix up stack overflow handling.
10090
10091         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
10092
10093         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
10094
10095         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
10096
10097         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
10098
10099         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
10100         tramp_init functions as they are no longer needed.
10101
10102 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
10103
10104         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
10105         
10106         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
10107
10108         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
10109         
10110         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
10111         support that now.
10112
10113         * mini-ops.h: Add OP_LMUL_IMM.
10114
10115         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
10116         long mul/div opcodes as intrinsic.
10117
10118         * mini-amd64.c (emit_call): Handle the case when the callee might be
10119         an AOT method.
10120
10121 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
10122
10123         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
10124         extra safe.
10125         
10126         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
10127
10128         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
10129
10130 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
10131
10132         * mini.c (mono_codegen): Don't leak here, to help people running
10133         monogrind.
10134
10135 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
10136
10137         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
10138         conversions in sse2 mode.
10139
10140         * basic-float.cs: Add regression test.
10141         
10142         * mini-amd64.c: Reenable sse2.
10143
10144 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
10145
10146         * mini-amd64.c: Disable sse2 until some regressions are fixed.
10147
10148 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
10149
10150         * driver.c: Copyright text should include 2005.
10151         
10152 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
10153
10154         * cpu-amd64.md (load_membase): Fix more max lengths.
10155
10156 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
10157
10158         * cpu-amd64.md (load_membase): Fix max length.
10159
10160         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
10161
10162         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
10163
10164         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
10165         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
10166
10167         * basic-float.cs: Add rounding regression test.
10168
10169         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
10170
10171 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
10172
10173         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
10174         structures in registers for pinvoke wrappers.
10175
10176 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
10177
10178         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
10179
10180 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
10181
10182         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
10183         wrapper to mono_jit_thread_attach.
10184
10185         * mini.c (mini_jit_thread_attach): New jit icall.
10186
10187         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
10188         native->managed wrappers.
10189
10190         * exceptions.cs: Add new regression test.
10191
10192         * mini.c (optimize_branches): Check regions in the cbranch to throw
10193         block case as well. Fixes #73242.
10194
10195 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
10196
10197         * mini.c: thread safety fixes.
10198
10199 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
10200
10201         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
10202         patching stuff, since delegates use jump trampolines so there is
10203         no caller.
10204
10205         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
10206         jump trampolines.
10207         
10208         * tramp-amd64.c: Fix build.
10209
10210         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
10211         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
10212
10213         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
10214         Rename this to mono_arch....
10215         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
10216
10217         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
10218
10219         * mini-amd64.c (emit_call): If both the caller and the callee is
10220         guaranteed to have 32 bit addresses, emit a normal call.
10221
10222         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
10223
10224         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
10225         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
10226         method_ptr inside delegates.
10227
10228 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
10229
10230         * mini.c (mono_jit_free_method): Free the method info even if the native code is
10231         invalidated. Fixes #73001.
10232
10233         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
10234
10235         * mini-x86.c: Only use stdcall for pinvokes on windows.
10236
10237 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
10238
10239         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
10240         * mini-x86.c: remove unreliable __thread var offset detection,
10241         use the correct accessors and enable by default.
10242
10243 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
10244
10245         * mini.c (mono_jit_free_method): Fix memory leak.
10246
10247 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
10248
10249         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
10250
10251 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
10252
10253         * cpu-amd64.md: Fix lengths of atomic opcodes.
10254
10255 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
10256
10257         * driver.c: try to not imply using ICU is any good.
10258
10259 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
10260
10261         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
10262         functions as inline ops.
10263
10264         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
10265         some Interlocked functions as inline ops.
10266
10267         * mini.c (move_basic_block_to_end): Fix bug in last patch.
10268
10269         * mini.h (MonoBasicBlock): Reorganize fields a bit.
10270
10271         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
10272
10273         * mini.c: Add support for OP_NOT_TAKEN.
10274
10275         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
10276         structures in registers for pinvoke wrappers.
10277
10278         * mini-amd64.c: Fix warnings.
10279
10280 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
10281
10282         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
10283
10284         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
10285
10286         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
10287         address instead of loading the address from it.
10288
10289         * mini-x86.c: Add support for returning small structs in registers
10290         on Win32. Fixes part of #70864.
10291         
10292 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
10293
10294         * trace.c (get_token): Improve error checking.
10295
10296 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
10297
10298         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
10299
10300 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
10301  
10302         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
10303         it can be reused for MonoClass.
10304         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
10305         _LINKDEMAND.
10306
10307 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
10308
10309         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
10310         instead of a MonoReflectionMethod. The method information wasn't used
10311         when displaying SecurityException details (but will be now).
10312
10313 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
10314
10315         * Makefile.am : windows build fix.
10316
10317 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
10318
10319         * iltests.il: Add new regression test.
10320
10321         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
10322         #72522.
10323
10324 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
10325  
10326         * mini.c: Moved linkdemand check into helper function check_linkdemand
10327         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
10328         LDFTN, LDVIRTFTN).
10329
10330 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
10331
10332         * declsec.c: Added statistics counter for different kinds of 
10333         LinkDemands.
10334         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
10335         (and commented) declaration.
10336         * mini.c: Added statistics counter for security Demand code 
10337         generation. Added display of security statistics.
10338
10339 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
10340
10341         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
10342         Fix compilation errors under gcc-2.95.
10343
10344 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
10345
10346         * mini.c, driver.c: Use the new jit trampoline hashtable
10347
10348 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10349
10350         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
10351
10352 2005-02-11  Martin Baulig  <martin@ximian.com>
10353
10354         * debug-mini.c (mono_debug_close_method): Free the line number array.
10355
10356 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
10357
10358         * aot.c: Break up large methods into smaller ones. Share GOT slots for
10359         icalls.
10360
10361         * mini.h: Bump AOT file format version. 
10362
10363 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
10364
10365         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
10366         APTC and P/Invoke.
10367         * declsec.h: Added macros to get/set lazyly initialized security 
10368         informations about assemblies. Added new enum for different type of
10369         possible LinkDemand violation. Added function to check LinkDemands.
10370         * mini.h: Added a field to MonoCompile to hold any security violation
10371         detected when JITting a method (so it can be thrown later).
10372         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
10373         and CEE_CALLVIRT. Added code to throw exception at the end of
10374         mini_method_compile (note: the exception is unhandled right now).
10375
10376 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
10377
10378         * mini.c, jit-icalls.c: use the managed implementation of
10379         memset for initobj and memset, to avoid managed <-> unmanaged
10380         transitions.
10381
10382 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
10383
10384         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
10385         optimization if it would need a GOT var.
10386
10387         * basic.cs: Add tests for constant propagation and switch statements.
10388
10389         * ssa.c: Fix out-of-range constant propagation and switch statements.
10390
10391 2005-02-09    <vargaz@freemail.hu>
10392
10393         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
10394
10395 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
10396
10397         * cpu-amd64.md (load_membase): Fix max length of load_membase.
10398
10399 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10400
10401         * mini.c: update to new signature of mono_class_get_allocation_ftn().
10402
10403 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
10404
10405         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
10406         arithmetic operations.
10407
10408 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
10409
10410         * mini-ppc.c: add a workaround for broken user code that
10411         DllImports vararg functions with non-vararg signatures.
10412
10413 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
10414
10415         * mini.c (mono_jit_compile_method_inner): Add detection and a 
10416         meaningfull error message for assemblies written in Managed C++.
10417
10418         * tramp-amd64.c mini-amd64.h: Add support for 
10419         create_trampoline_from_token ().
10420
10421         * aot.c mini-x86.c abcremoval.c: Applied patch from
10422         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
10423
10424 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
10425
10426         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
10427         which takes a MonoImage/token as parameter instead of a MonoMethod.
10428
10429         * aot.c: Use the new trampoline for initializing vtables.
10430
10431         * aot.c: Add support for ldfld/stfld_remote wrappers.
10432
10433         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
10434         rules for compare <MEM>, IMM.
10435
10436         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
10437
10438         * aot.c: Handle inherited finalizers correctly.
10439
10440 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
10441
10442         * inssel.brg (stmt): Add a missing _setup_... ().
10443
10444         * aot.c: Save some parts of the class state to the AOT file and use it
10445         to recompute that state when a class is initialized.
10446
10447         * mini.c: Install AOT hooks into the runtime.
10448
10449         * mini.h: Bump AOT file format version.
10450         
10451         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
10452         Fixes #72148.
10453
10454         * iltests.il: Add new test.
10455
10456 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
10457
10458         * mini.c: fix typo.
10459
10460 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
10461
10462         * mini.c: setup the statistical profiler in the thread attach
10463         callback to cope with the new single thread code.
10464
10465 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
10466
10467         * mini-ppc.c: ensure we have enough room for the profiler
10468         calls (fixed bug#72084).
10469
10470 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
10471
10472         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
10473         it.
10474
10475 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10476
10477         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
10478
10479 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10480
10481         * ssapre.c: Fixed an issue with down safety (this allows IronPython
10482         to succesfully execute parrotbench).
10483         * ssapre.h: Likewise.
10484
10485 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10486
10487         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
10488         variable for stores to method arguments (fixes a SSAPRE issue).
10489
10490 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
10491
10492         * mini.c: handle value types in dup, fixes gen-112.cs.
10493
10494 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
10495
10496         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
10497         sequence for calls in dynamic methods to avoid thunks.
10498
10499 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
10500
10501         * mini.c: correctly remove dynamic methods from the hashtable.
10502
10503 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
10504
10505         * driver.c: Disabled SSAPRE until fix the bug that appears
10506         in IronPython's parrotbench.
10507
10508 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
10509
10510         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
10511
10512         * mini.c (mono_method_to_ir): Revert the previous change.
10513         
10514         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
10515         when AOT compiling.
10516
10517         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
10518         mono_jit_info_table_find () etc. when running under valgrind.
10519
10520         * inssel.brg: Fix warnings.
10521
10522         * mini-exceptions.c: Fix warnings.
10523
10524 2005-01-31  Martin Baulig  <martin@ximian.com>
10525
10526         * driver.c (compile_all_methods_thread_main): Don't try to compile
10527         generic methods or anything which has type parameters.
10528
10529 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
10530
10531         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
10532
10533         * TestDriver.cs: Add --verbose flags.
10534
10535         * graph.c ssa.c: Fix 64 bit warnings.
10536         
10537         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
10538         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
10539         Fix 64 bit warnings.
10540
10541         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
10542         variable not spotted by gcc.
10543         
10544         * mini-amd64.c inssel-amd64.brg: Applied patch from  
10545         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
10546         X86_COMPARE_MEMBASE opcodes.
10547
10548         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
10549
10550 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
10551
10552         * *: MonoMethod->signature might be NULL now. You *MUST* use
10553         mono_method_signature.
10554
10555 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
10556
10557         * driver.c (compile_all_methods_thread_main): Compile the methods
10558         without invoking cctors.
10559
10560 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
10561
10562         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
10563         * basic-calls.cs: test for the above.
10564
10565 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
10566
10567         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
10568         MonoJitInfo changes.
10569
10570 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
10571
10572         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
10573         eagerly if it contains dynamic methods.
10574         
10575         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
10576
10577         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
10578         trace, it is now computed by an icall from trace_ips.
10579         
10580         * mini-exceptions.c: Fix a warning.
10581
10582 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
10583
10584         * mini-exceptions.c: don't bother getting stack trace info if
10585         it's not going to be used.
10586
10587 2005-01-27  Raja R Harinath  <rharinath@novell.com>
10588
10589         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
10590         ssapre-mini-ops.h.
10591
10592 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
10593
10594         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
10595
10596         * aot.c: Avoid calling mono_method_get_header () if not needed.
10597
10598         * mini.h: Bump AOT file format version.
10599         
10600         * mini.c (mono_emit_native_call): Allocate a GOT var here.
10601
10602         * mini.c (mono_print_tree): Print more info for calls.
10603
10604 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
10605
10606         * declsec.h: Remove warning by adding missing include for marshal.h
10607
10608 2005-01-26  Martin Baulig  <martin@ximian.com>
10609
10610         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
10611         `ip' twice.
10612
10613 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
10614
10615         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
10616         flags.
10617
10618         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
10619
10620         * aot.c (mono_compile_assembly): Fix a warning.
10621
10622 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
10623
10624         * declsec.c: Look for security attributes on the original MonoMethod 
10625         (and not the wrapped one). This fix permissions on icalls.
10626
10627 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
10628
10629         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
10630
10631         * mini.c (mono_allocate_stack_slots): Add a fixme.
10632
10633         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
10634
10635 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
10636
10637         * inssel.brg: optimize casts of sealed types (more
10638         optimizations waiting for fixes in remoting).
10639
10640 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
10641
10642         * inssel.brg (stmt): Add another dummy rule.
10643
10644         * driver.c: Fix warnings.
10645
10646         * driver.c (mono_main): If running under valgrind, instruct glib to use
10647         the system allocation functions so valgrind can track the memory
10648         allocated by the g_... functions.
10649
10650         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
10651
10652         * mini-ops.h: Add OP_DUMMY_STORE opcode.
10653
10654         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
10655
10656         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
10657         variables in try regions.
10658
10659         * mini.c (mini_method_compile): Don't disable optimizations on large
10660         methods when AOT compiling.
10661
10662         * mini.c (mono_allocate_stack_slots): New arch independent method to 
10663         allocate stack slots. Not yet used.
10664
10665 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
10666
10667         * debug-mini.c (mono_debug_close_method): Plug some leaks.
10668
10669 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
10670
10671         * mini-ppc.c: make the branch info relative as the code
10672         buffer can be reallocated.
10673
10674 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
10675
10676         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
10677         * driver.c: Removed the AOT/security restriction. Now initialize the
10678         security manager (in metadata) if --security is used.
10679         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
10680         rather than the pointer to declarative security, when AOT is used.
10681
10682 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
10683
10684         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
10685         basic blocks, reduced intrinsic exception throwing code size.
10686
10687 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
10688
10689         * driver.c (mini_usage): Reorder the usage screen.
10690
10691 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
10692
10693         * mini.c (mono_resolve_patch_target): Fix warning.
10694
10695 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
10696
10697         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
10698         previous patch.
10699
10700         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
10701
10702         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
10703         breaks the amd64 build.
10704
10705         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
10706         register allocation. Fixes #71454.
10707
10708         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
10709
10710         * arrays.cs: Add new regression test.   
10711
10712 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
10713
10714         * ssapre.c: Turned usage of snprintf to GString.
10715         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
10716         (I left it on by mistake in my previous commit).
10717
10718 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
10719
10720         * mini.c, cfold.c, basic-calls.cs: preserve side effects
10721         on cond branch optimization (fixes bug# 71515).
10722
10723 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
10724
10725         * abcremoval.c: Fixed bug 71062.
10726         * abcremoval.h: Likewise.
10727
10728 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
10729
10730         * mini.c: Added a new functionality to optimize_branches, the removal
10731         of useless basic blocks, and fixed some problem in the removal of
10732         critical edges; some utility functions added for both purposes.
10733         * ssapre.c: Added complex expression support, and fixed bug 70637.
10734         * ssapre.h: Likewise.
10735         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
10736         enabled in SSAPRE.
10737         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
10738         * driver.c: Re-enabled SSAPRE.
10739
10740 2005-01-19  Martin Baulig  <martin@ximian.com>
10741
10742         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
10743         the result of mono_get_method_constrained().
10744
10745 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
10746
10747         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
10748         manager.
10749
10750 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
10751
10752         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
10753         be detected.  Fixes #59296.
10754
10755 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
10756
10757         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
10758         which can happen. Fixes #71361.
10759
10760 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
10761
10762         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
10763         manager.
10764
10765 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
10766
10767         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
10768         appdomain-unload.exe to fail.
10769         
10770         * mini.c: Fix some memory leaks.
10771
10772 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
10773
10774         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
10775         Fixed bug and sped up some codepaths.
10776
10777 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
10778
10779         * mini.c: Fix some memory leaks.
10780
10781         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
10782         conversion.
10783
10784         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
10785
10786         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
10787         #71320.
10788
10789         * iltests.il: Add regression test for #71320.
10790
10791 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
10792
10793         * mini.c (mono_codegen): Fix installation of profiler hooks.
10794
10795         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
10796
10797 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
10798
10799         * mini.h, mini.c, cfold.c: optimize access to enum
10800         readonly fields, too. Eval conditional branches if possible
10801         to perform unreachable code removal in more cases.
10802
10803 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
10804
10805         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
10806
10807         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
10808         code manager.
10809
10810         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
10811         WinXP DEP. Fixes #71244.
10812
10813 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
10814
10815         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
10816
10817 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
10818
10819         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
10820
10821 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
10822
10823         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
10824         changes.
10825
10826         * mini.h: Bump AOT version.
10827
10828         * mini.h (MonoCompile): Change exvar to a hash table.
10829
10830         * mini.c: Allocate a separate exvar for each handler block.
10831
10832         * mini.c: Get rid of the computation of filter_lengths, its not needed.
10833
10834         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
10835         ex var with the pending exception and only throw if the two are equal.
10836         Fixes #68552.
10837         
10838         * exceptions.cs: Add tests for rethrow and nested catch clauses.
10839
10840         * mini-x86.c: Fix warnings.
10841
10842         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
10843         used by all the ports now.
10844
10845         * aot.c: Add write-symbols and save-temps options.
10846
10847 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
10848
10849         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
10850
10851 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
10852
10853         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
10854         operations.
10855
10856         * tramp-s390.c: Check vtable slot belongs to the domain.
10857
10858         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
10859         as per other platforms.
10860
10861         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
10862
10863 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
10864
10865         * driver.c: we don't run the Main() code in a subthread anymore.
10866
10867 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
10868
10869         * mini.c: added experimental rtc support in the statistical
10870         profiler: if the user has the permission, more accurate statistics
10871         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
10872         The MONO_RTC value must be restricted to what the linux rtc allows:
10873         power of two from 64 to 8192 Hz.
10874
10875 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
10876
10877         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
10878
10879 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
10880
10881         * mini-ppc.c: better icache flush for smp.
10882
10883 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
10884
10885         * mini-amd64.c (emit_move_return_value): Fix memory leak.
10886
10887         * mini-x86.c (get_call_info): Add the get_call_info () code from the
10888         amd64 port, not yet used.
10889
10890 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
10891
10892         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
10893         a struct type.
10894
10895 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
10896
10897         * driver.c: Added --security option to activate the security manager.
10898         Right now this will allow code generation for declarative demands and
10899         is disabled when AOT is specified.
10900         * mini.c: Add code generation for declarative security demands.
10901         * mini.h: Add mono_use_security_manager as an extern gboolean.
10902
10903 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
10904
10905         * aot.c (mono_compile_assembly): Speed up compilation a bit by
10906         emitting more dense assembly code.
10907
10908         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
10909         exception throwing stuff.
10910
10911 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
10912
10913         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
10914         dead code.
10915
10916         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
10917         left in by mistake.
10918
10919         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
10920         fixed.
10921
10922         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
10923
10924         * tramp-*.c: Only patch vtable slots if the object is in the current
10925         domain. Fixes appdomain-unload.exe.
10926
10927         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
10928         
10929         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
10930         x86 branch.
10931
10932 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
10933
10934         * mini.c (reverse_branch_op): New helper function.
10935
10936         * mini.c (optimize_branches): Run the new optimization only on 
10937         platforms which support it. Also reverse all kinds of branches.
10938
10939         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
10940
10941         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
10942         a throw statement.
10943
10944         * mini.c (optimize_branches): Reverse not-equals branches if the false
10945         bblock is a throw. This happens a lot of time with argument checking in
10946         corlib.
10947
10948         * mini.c (mono_codegen): Add support for placing basic blocks after
10949         the function epilogue.
10950
10951         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
10952         function epilogue.
10953         
10954 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
10955
10956         * mini.c (setup_stat_profiler): Only set this up if the platform
10957         supports ITIMER_PROF.
10958
10959 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
10960
10961         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
10962         previous patch.
10963
10964         * inssel.brg: Fix a warning.
10965
10966 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
10967
10968         * mini.c: added support for statistical profiler 
10969         (run with: --profile=default:stat).
10970
10971 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
10972
10973         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
10974
10975         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
10976
10977         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
10978         related to global registers from the amd64 port.
10979
10980 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
10981
10982         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
10983
10984         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
10985         with global registers.
10986         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
10987
10988         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
10989
10990 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
10991
10992         * debug-mini.c (encode_value): Fix off-by-one.
10993
10994         * aot.c (encode_value): Likewise.
10995
10996         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
10997
10998 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
10999
11000         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
11001         AOT.
11002
11003         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
11004         
11005         * aot.c (emit_method_info): Increase size of temp buffer.
11006
11007         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
11008         the AOT case.
11009
11010 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
11011
11012         * aot.c (emit_method_info): Fix build.
11013         
11014         * aot.c: Further rework of the AOT file format to reduce the size of
11015         the method info data.
11016
11017         * mini.h: Bump AOT file format version.
11018
11019 2004-12-27  Martin Baulig  <martin@ximian.com>
11020
11021         * mini.c (mini_get_method): New static method; call
11022         mono_get_method_full() and mono_get_inflated_method().
11023         (mono_method_to_ir): Use mini_get_method() instead of
11024         mono_get_method_full(). 
11025
11026 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
11027
11028         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
11029
11030 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
11031
11032         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
11033
11034         * inssel-amd64.brg: Add some optimization rules.
11035
11036 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
11037
11038         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
11039         standard not GC'd stuff is fine.
11040
11041 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
11042
11043         * aot.c: Rework the AOT file format to get rid of most of the global
11044         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
11045
11046         * mini.h: Bump AOT file format version.
11047         
11048 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
11049
11050         * mini.h: Bump AOT file format version.
11051
11052         * aot.c (mono_aot_is_got_entry): New function to determine if an 
11053         address is inside a GOT.
11054
11055         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
11056
11057         * cpu-pentium.md: Increase the maximum size of some instructions which
11058         might involve a got access.
11059         
11060         * mini.c (get_method_from_ip): Another debug helper function.
11061
11062         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
11063         when got var accesses are created during the decompose phase.
11064
11065         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
11066
11067         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
11068         argument mini_compile_method and to MonoCompile, and use this to
11069         determine whenever a given method is compiled for AOT. This allows the
11070         other methods compiled during AOT compilation to be free of AOT stuff,
11071         so the backends does not need to add special support for them by
11072         creating a fake GOT etc.
11073
11074         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
11075         longer needed.
11076
11077 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
11078
11079         * mini.c (mono_method_to_ir): It turns out that some of the
11080         x-appdomain wrappers are lax with types, so just ignore this for
11081         all wrappers.
11082
11083         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
11084         at the vtable->klass. If it is non-shared code we can just use the
11085         vtable.
11086
11087 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
11088
11089         * mini-ppc.c: access MonoDomain from tls, too.
11090
11091 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
11092
11093         * declsec.c: Removed unused variable (and related warning ;-)
11094
11095 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
11096
11097         * iltests.il: New test for LDELEMA on an array of ref types.
11098
11099         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
11100         all ldelema's on reftypes.
11101         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
11102         it was the wrong place to put it.
11103
11104         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
11105         register to pop to make this cleaner, at the request of Paolo.
11106
11107 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
11108
11109         * mini-ops.h (OP_GETHASHCODE): New op.
11110
11111         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
11112
11113         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
11114         operation.
11115
11116         For a microbenchmark, this reduces the cost of Hashtable.get_Item
11117         by 25%.
11118         
11119         * mini-x86.c (mono_arch_output_basic_block): Rather than
11120
11121         add ebp, 4
11122
11123         Emit
11124
11125         pop edx
11126
11127         The first is 3 bytes while the second is 1. This saves 36 kb on
11128         mscorlib, quite a big saving. When bootstraping mcs, I was able to
11129         see a small boost because of icache locality.
11130
11131         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
11132
11133 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
11134
11135         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
11136         started code sharing with the generic code.
11137
11138 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
11139
11140         * mini-ppc.c, cpu-g4.md: added code for direct access to
11141         tls data slots.
11142
11143 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
11144
11145         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
11146          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
11147         to OP_TLS_GET.
11148
11149 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
11150
11151         * declsec.c|h: Added functions to cache the declarative stack modifiers
11152         in MonoJitInfo and to create a security frame from a MonoJitInfo 
11153         structure.
11154         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
11155         created. Register internal calls for System.Security.SecurityFrame::
11156         _GetSecurityFrame and _GetSecurityStack.
11157         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
11158         the definitions for the new stack walk/callback mechanism.
11159         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
11160         first security frame for LinkDemands and InheritanceDemands) and
11161         GetSecurityStack for Demands. Both use the new mono_walk_stack code
11162         from lupus.
11163         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
11164         walk initialization (lupus).
11165
11166 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
11167
11168         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
11169         idiom.
11170         (handle_loaded_temps): Do not create a temporary variable for
11171         things that we know are temps. They will never be modified.
11172         (mono_spill_call): Set MONO_INST_IS_TEMP
11173         (mono_emulate_opcode): ditto
11174         (emit_tree): ditto
11175         (mono_method_to_ir.CEE_DUP): ditto
11176
11177 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
11178
11179         * mini.c (type_to_eval_stack_type): Make this handle the void type
11180         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
11181         (emit_tree): use ip_in_bb to special case some common idioms
11182         Update all callers to pass in the IP.
11183         (mono_method_to_ir): Make CEE_CALL* do the above as well.
11184
11185         This gives us a nice 2% speedup in mcs bootstrap.
11186
11187         * mini-x86.c (peephole_pass): Peephole pass to make
11188         mov  [foo], eax
11189         push [foo]
11190
11191         into
11192
11193         mov [foo], eax
11194         push eax
11195
11196         * mini.c (ip_in_bb): new method.
11197         (mono_method_to_ir): use this method rather than doing the hash
11198         lookup ourselves.
11199
11200         * linear-scan.c (mono_linear_scan): When expiring actives, you
11201         don't need to keep around variables that expire on this
11202         instruction. This makes it so that:
11203              a = b + 1
11204         will turn into:
11205              store (ebx add (ebx, 1))
11206         which will become
11207              add ebx, 1
11208
11209 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
11210
11211         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
11212         combination to avoid doing two copies. Fix up problems with previous
11213         patch.
11214
11215         * mini.c: Fix 64 bit warnings.
11216
11217         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
11218
11219 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
11220
11221         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
11222         changes from the x86 code.
11223
11224         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
11225
11226 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
11227
11228         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
11229         throwing code to reduce its size, unify the AOT and non-aot code and 
11230         get rid of relocations in the AOT case.
11231
11232         * mini-x86.h mini.c exceptions-x86.c 
11233         (mono_arch_get_throw_corlib_exception): New arch specific function to 
11234         raise corlib exceptions which doesn't require relocations in the 
11235         caller.
11236
11237         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
11238
11239 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
11240
11241         * mini.c (mono_emit_method_call): Only allocate the got var when it is
11242         needed.
11243
11244         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
11245         in the AOT case.
11246
11247 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
11248
11249         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
11250         with add function when used from Inc/dec atomic 
11251         functions. Re-enabled optimization on x86.
11252         * mini-ops.h: renamed atomic_add functions to
11253         allow _add to match the Interlocked::Add and
11254         _add_next to match Interlocked::Inc/Dec.
11255
11256 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
11257
11258         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
11259         linking of BBs to the end BB, and enabled SSAPRE also with
11260         consprop and copyprop (which was prevented by that bug).
11261
11262 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
11263
11264         * mini-x86.c: disabling the Interlocked optimizing code. 
11265
11266 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
11267
11268         * aot.c (load_aot_module): Move reading of got_addr after the AOT
11269         file version check.
11270         
11271 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
11272
11273         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
11274         interlocked optimization due lack of support on x86, rewrote 
11275         exchange to take into account that base may be in eax.
11276         
11277         xsp works again; activated Interlocked optimizing code.
11278         
11279 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
11280
11281         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
11282
11283 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
11284
11285         * mini-ops.h: Add new opcodes.
11286
11287         * mini.h: Add new patch types. Add got_var to MonoCompile.
11288
11289         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
11290         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
11291         make it work with all kinds of patchable code.
11292
11293         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
11294         address of the GOT, and referencing entries in the GOT.
11295
11296         * mini.c: Add code to load the GOT address if needed by an opcode.
11297
11298         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
11299         independent AOT code on the x86 using an elf-style Global Offset Table.
11300
11301 2004-12-14  Raja R Harinath  <rharinath@novell.com>
11302
11303         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
11304
11305 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11306
11307         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
11308         when running xsp.
11309
11310 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
11311
11312         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
11313         of Interlocked:Increment/Decrement/Add as inline ops.
11314         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
11315
11316 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
11317
11318         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
11319         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
11320
11321 2004-12-12  Duncan Mak  <duncan@ximian.com>
11322
11323         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
11324         again. `patch_info->table_size' is no longer valid after Zoltan's
11325         commit #37636.
11326
11327 2004-12-12  Martin Baulig  <martin@ximian.com>
11328
11329         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
11330         if we are the "real" method, ie. not an inlined method inside it.
11331
11332 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
11333
11334         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
11335         before we look in the special fields table. This fixes
11336         ../tests/thread-static-init.cs.
11337
11338 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11339
11340         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
11341         for Array get_Rank and get_Length. Fixes bug #70465.
11342
11343 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
11344
11345         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
11346         separate structure to reduce the size of MonoJumpInfo.
11347
11348 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
11349
11350         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
11351
11352 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
11353
11354         * mini.c (mini_get_inst_for_method): Changed to allow ports
11355         to return a MonoInst instead of opcode 
11356         (renamed mini_get_opcode_for_method to better reflect the new functionality)
11357         
11358         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
11359         Allow ports to return a created MonoInst instead of op-code, will enable
11360         new optimizations.
11361         (renamed mini_get_opcode_for_method to better reflected the functionality)
11362
11363 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
11364
11365         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
11366
11367 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
11368
11369         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
11370         Fixes #69985.
11371
11372 2004-12-08  Martin Baulig  <martin@ximian.com>
11373
11374         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
11375         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
11376
11377 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
11378
11379         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
11380         correctly.
11381
11382         * exceptions.cs: Disable some tests which depend on properties of x86 fp
11383         arithmetic.
11384
11385 2004-12-08  Raja R Harinath  <rharinath@novell.com>
11386
11387         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
11388
11389 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
11390
11391         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
11392         bug introduced by the previous patch.
11393
11394 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
11395
11396         * mini-ppc.c, objectc.cs: handle large structs passed by value
11397         (fixes bug #69972).
11398
11399 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
11400
11401         * mini-ppc.c: OP_ARGLIST implementation from
11402         Geoff Norton  <gnorton@customerdna.com>.
11403
11404 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
11405
11406         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
11407         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
11408
11409 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
11410
11411         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
11412
11413 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11414
11415         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
11416         support.
11417
11418 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
11419
11420         * mini-sparc.c: Zero out localled-ed memory.
11421
11422         * iltests.il: Add tests for zeroing out localloc-ed memory.
11423
11424 2004-12-04  Martin Baulig  <martin@ximian.com>
11425
11426         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
11427         mono_method_get_signature_full().       
11428
11429 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
11430
11431         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
11432         and some utility functions (always for SSAPRE), integrated SSAPRE.
11433         * mini.h: Likewise.
11434         * driver.c: Added ssapre option.
11435         * ssa.c: Small fix on OP_ARG handling.
11436         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
11437         * Makefile.am: Likewise.
11438
11439 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
11440
11441         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
11442         now in the xp code.
11443
11444         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
11445         icall.
11446
11447 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11448
11449         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
11450         
11451         * cpu-s390.md : Increase instruction length of oparglist.
11452
11453         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
11454
11455 2004-11-30  Martin Baulig  <martin@ximian.com>
11456
11457         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
11458         virtual generic methods.  We call a special helper_compile_generic_method()
11459         icall to retrieve the method from the vtable, inflate and compile
11460         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
11461
11462         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
11463
11464 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
11465
11466         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
11467
11468 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
11469
11470         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
11471         Fixes #69929.
11472
11473 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
11474
11475         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
11476         platforms with PIC aot.
11477
11478 2004-11-28  Martin Baulig  <martin@ximian.com>
11479
11480         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
11481         Fixes gen-112.cs.
11482
11483 2004-11-28  Martin Baulig  <martin@ximian.com>
11484
11485         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
11486         the result of mono_type_get_underlying_type() to check whether
11487         we're byref.
11488
11489 2004-11-26  Martin Baulig  <martin@ximian.com>
11490
11491         * mini.c
11492         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
11493         in the g_assert().
11494
11495 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
11496
11497         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
11498         the same way as the other arguments so they won't get clobbered.
11499
11500         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
11501         calls through R11 since it is clobbered by the trampoline code.
11502
11503 2004-11-26  Raja R Harinath  <rharinath@novell.com>
11504
11505         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
11506         pick up in-tree mscorlib.dll.
11507
11508 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
11509
11510         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
11511
11512         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
11513         runtime data/code are now stored in a table similar to the GOT in ELF. 
11514         This allows the code itself to be position independent.
11515
11516         * aot.c: Fix loading of referenced assemblies after the lazy assembly
11517         loading changes.
11518
11519         * aot.c: Attach ELF type (object/function) directives to all global
11520         symbols.
11521
11522         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
11523
11524         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
11525
11526         * mini-amd64.h: Turn on PIC AOT code.
11527
11528         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
11529         returning the offset within an OP_AOTCONST instruction where the GOT
11530         offset needs to be added.
11531
11532         * mini.h: Bump AOT file format version.
11533
11534 2004-11-25  Martin Baulig  <martin@ximian.com>
11535
11536         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
11537         uninflated generic methods.
11538
11539 2004-11-25  Martin Baulig  <martin@ximian.com>
11540
11541         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
11542
11543 2004-11-24  Martin Baulig  <martin@ximian.com>
11544
11545         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
11546         original klass (this only applies for generic instances).
11547
11548 2004-11-24  Martin Baulig  <martin@ximian.com>
11549
11550         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
11551         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
11552         that array).
11553
11554 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
11555
11556         * mini.c (mono_method_to_ir): Disable inlining for methods containing
11557         localloc. Fixes #69678.
11558
11559         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
11560         
11561 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
11562
11563         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
11564         used SSE registers on pinvoke calls. Fixes #69774.
11565
11566 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
11567
11568         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
11569         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
11570
11571 2004-11-23  Raja R Harinath  <rharinath@novell.com>
11572
11573         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
11574         Refer directly to the mcs/ tree.
11575
11576 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11577
11578         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
11579         Check if a trampoline for a synchronized method is required. 
11580
11581 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
11582
11583         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
11584         with localloc if needed. Throe arithmetric exception in
11585         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
11586         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
11587
11588 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
11589
11590         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
11591         types before switching on type.  Fixes #69622.
11592
11593 2004-11-19  Raja R Harinath  <rharinath@novell.com>
11594
11595         * Makefile.am (check-local): New.  Integrate into 'make check'.
11596         (MCS,RUNTIME): Define using in-tree mono and mcs.
11597         (ILASM): New.
11598         (%.exe): Use $(ILASM).
11599
11600 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
11601
11602         * mini-ppc.c: adjust initial prolog size (bug #69691).
11603
11604 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
11605
11606         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
11607         #69664.
11608
11609 2004-11-17  Raja R Harinath  <rharinath@novell.com>
11610
11611         * Makefile.am (clean-local): Rename from 'clean'.
11612
11613 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11614
11615         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
11616         to mono_arch_is_int_overflow. 
11617         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
11618         SIGFPE events.
11619
11620 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
11621
11622         * declsec.c|h: New files to support declarative security attributes.
11623         Added function to check if a method has (applicable) security.
11624         * mini.c|h: Add check for declarative security attributes in
11625         mono_method_check_inlining.
11626         * Makefile.am: Added declsec.c and declsec.h to the build.
11627
11628 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
11629
11630         * mini.c, mini.h: update to keep dynamic code info per-domain.
11631
11632 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
11633
11634         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
11635         (mini_init): Get rid of it from here too.
11636
11637 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
11638
11639         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
11640         implemented OP_RETHROW (patch by Geoff Norton
11641         <gnorton@customerdna.com>).
11642
11643 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
11644
11645         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
11646         between appdomains.  Fixes appdomain-unload on PPC.
11647
11648 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
11649
11650         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
11651         mini-exceptions.c: handle the new wrapper types.
11652         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
11653         token value as a MonoClass* when compiling a wrapper.
11654         mono_jit_create_remoting_trampoline now takes an additional
11655         MonoRemotingTarget parameter.
11656         
11657 2004-11-10  Martin Baulig  <martin@localhost>
11658
11659         * mini.c (mono_method_to_ir): Use `generic_container->context'
11660         rather than creating a new one.
11661
11662 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11663
11664         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
11665
11666         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
11667
11668 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
11669
11670         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
11671         the experimental aot cache stuff.
11672
11673 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
11674
11675         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
11676         mini-exceptions.c: update to exception clause structure changes.
11677
11678 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
11679
11680         * exceptions-x86.c (throw_exception): Fix warnings.
11681
11682         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
11683         for OP_RETHROW.
11684
11685 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
11686
11687         * exceptions-sparc.c (get_throw_exception): Really fix this.
11688
11689 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
11690
11691         * tramp-*.c: we no longer support icalls without wrappers, so
11692         a bit of code can be removed here
11693
11694 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
11695
11696         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
11697         patch.
11698
11699         * cpu-sparc.md: Add op_rethrow.
11700
11701         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
11702
11703         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
11704
11705         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
11706         * mini-ops.h: Add OP_RETHROW.
11707
11708         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
11709
11710         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
11711
11712 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
11713         
11714         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
11715         Makes the output much easier to read
11716
11717 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
11718
11719         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
11720         prevents another huge leak when compiling with ssa. Secondly, the
11721         performance of doing this rather than freeing the lists is much
11722         better. GList does a lock every time you allocate a list link,
11723         so that it can use a memory pool. So, it is better to just use
11724         a memory pool of our own.
11725         
11726         * ssa.c, linear-scan.c: replace g_list_remove_link with
11727         g_list_delete.  The remove one does not free the GList, so we were
11728         leaking memory. On -O=all --compile-all with corlib, this cut down
11729         3 MB of allocations.
11730
11731 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
11732
11733         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
11734
11735         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
11736
11737         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
11738         into a new function mono_create_jit_trampoline ().
11739
11740 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
11741
11742         * trace.c (get_spec): Allow tracing of classes without a namespace.
11743
11744 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
11745
11746         * mini.c: Fix pointer overwrite in mini_method_compile.
11747
11748 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
11749
11750         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
11751         The darwin ABI needs some special handling for 1 and 2 byte structs
11752         Lets use lbz/lhz instead of lwz everywhere.
11753         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
11754         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
11755         Use stb/sth for the former, and put the latter always on stack instead of in
11756         argument registers.
11757
11758 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
11759
11760         * trace.c (is_filenamechar): Add '_'.
11761
11762 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
11763
11764         * mini-s390.c: Fix prolog length to allow for large trace requirements.
11765
11766         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
11767
11768 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
11769
11770         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
11771         depends on libmonogc. Fixes #68805.
11772
11773 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
11774
11775         * mini.c (mono_jit_free_method): Provide extra information for
11776         this error.  Currently this leaks, but will be turned into a
11777         developer option in the future.
11778
11779 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
11780
11781         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
11782
11783 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
11784
11785         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
11786         boundary. Fixes reading of PATCH_INFO_R4 and R8.
11787         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
11788
11789 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
11790
11791         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
11792         trampolines for AOT code.
11793
11794 2004-10-22    <vargaz@freemail.hu>
11795
11796         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
11797         constructed types. Fixes #68136.
11798
11799 2004-10-21  Martin Baulig  <martin@ximian.com>
11800
11801         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
11802         if it returns true, unwind the stack to the call instruction.
11803
11804 2004-10-21    <vargaz@freemail.hu>
11805
11806         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
11807
11808         * mini.h: Bump AOT version number.
11809
11810         * objects.cs: Add another test for unbox trampolines.
11811
11812         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
11813         valuetype methods.
11814
11815 2004-10-20    <vargaz@freemail.hu>
11816
11817         * driver.c: Add SHARED to the set of optimizations tested.
11818
11819         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
11820
11821         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
11822         used by CEE_NEWARR.
11823
11824         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
11825
11826 2004-10-20  Martin Baulig  <martin@ximian.com>
11827
11828         * mini-exceptions.c (mono_handle_exception): Call
11829         mono_debugger_handle_exception() to tell the debugger about
11830         catch/finally clauses.
11831
11832 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
11833
11834         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
11835
11836         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
11837         #68447.
11838
11839 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
11840
11841         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
11842         methods as their native size, fixed bug #57543, #57545.
11843         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
11844         This saves a temporary register and mullw call down into 1 (minor perf
11845         increase for cases like sum = sum * 5;  This use to translate into:
11846             li r11,5
11847             mullw r28,r28,r11
11848         It now translates to
11849             mulli r28,r28,5
11850
11851 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
11852
11853         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
11854         #68388.
11855
11856 2004-10-11  Martin Baulig  <martin@ximian.com>
11857
11858         * mini.c (mono_method_to_ir): If we're a generic method, get the
11859         MonoGenericContainer from our MonoMethodNormal and create a
11860         MonoGenericContext from it.
11861
11862 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
11863
11864         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
11865
11866         * basic-long.cs: Add test for checked i8->i2 cast.
11867
11868 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11869
11870         * inssel-ppc.brg: added a couple of speedup rules.
11871
11872 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
11873
11874         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
11875         to speed up rebuilds.
11876
11877 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11878
11879         * mini-s390.c: Minor fix to OP_OR_IMM.
11880
11881 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
11882
11883         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
11884         better. Fixes appdomain-unload.exe on sparc.
11885
11886 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
11887
11888         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
11889         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
11890         see bug 67324.
11891
11892 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
11893
11894         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
11895
11896 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
11897
11898         * mini.c: Always generate a field read/write wrapper for members
11899         of the class MarshalByRefObject since the actual instance could
11900         be a CBO.
11901
11902 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
11903
11904         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
11905
11906 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
11907
11908         * driver.c mini.h trace.c: Move the setting of the main assembly into
11909         a separate function called mono_trace_set_assembly () and call it after
11910         actually loading the main assembly. Fixes #66872.
11911
11912 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
11913
11914         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
11915         using the code manager.
11916
11917 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
11918
11919         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
11920
11921 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
11922
11923         * cpu-amd64.md: Fix bug in previous patch.
11924         
11925         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
11926         #66650.
11927
11928 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
11929
11930         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
11931         mini-exceptions.c: updates for changed stack walk interface.
11932
11933 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11934
11935         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
11936
11937 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
11938
11939         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
11940
11941 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
11942
11943         * driver.c (mini_regression_list): Do not call mono_assembly_close 
11944         since assemblies can't be unloaded.
11945         
11946 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
11947
11948         * cpu-amd64.md: Fix more instruction lengths.
11949
11950         * cpu-amd64.md: Fix lengths of some instructions.
11951
11952 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
11953
11954         * inssel.brg: Make the array ldelema check aot friendly.
11955
11956 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
11957
11958         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
11959
11960         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
11961
11962 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
11963
11964         * mini-x86.c: Fix build.
11965
11966         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
11967         mono_type_get_underlying_type () helper function to simplify code.
11968         
11969 2004-09-09  Martin Baulig  <martin@ximian.com>
11970
11971         * mini-amd64.c: Don't access `type->data.klass' directly, call
11972         mono_class_from_mono_type() instead since the type may be a
11973         generic instance.
11974
11975 2004-09-09  Martin Baulig  <martin@ximian.com>
11976
11977         * mini-amd64.c (get_call_info): Fix support for generic instances.
11978         (add_valuetype): Use mono_class_from_mono_type() to get the class
11979         since we can be a generic instance.
11980
11981 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
11982
11983         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
11984
11985 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
11986
11987         * liveness.c: reset spill costs on each scan: bug 62107
11988
11989 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
11990
11991         * exceptions-sparc.c (mono_arch_find_jit_info): remove
11992         unnecessary line that doesn't compile
11993
11994 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
11995
11996         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
11997         trampolines, make them call an error function so people can fix their
11998         code.
11999
12000 2004-09-06  Martin Baulig  <martin@ximian.com>
12001
12002         * mini.c (mono_method_to_ir): When initializing locals, handle a
12003         generic instances like a valuetype if it's a valuetype and like a
12004         class if it's a class.
12005
12006 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
12007
12008         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
12009         stack. Fixes #64674.
12010
12011         * exceptions.cs: Add test for unwinding of call arguments.
12012
12013 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
12014
12015         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
12016         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
12017         set the carry/borrow flag). The sparc and s390 implementations
12018         can now use optimized versions (and simplify the code). ppc bugfixes.
12019
12020 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
12021
12022         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
12023
12024 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
12025
12026         * inssel-amd64.brg: Remove leftover 32 bit rule.
12027
12028         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
12029
12030 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
12031
12032         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
12033         mono_arch_find_jit_info functions into a new function. Fix a memory
12034         leak.
12035
12036         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
12037         refactored code.
12038         
12039 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
12040
12041         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
12042         as well.
12043         
12044         * exceptions.cs: Add array size tests.
12045
12046         * mini.c: Allocate a separate icall wrapper for each arity of 
12047         mono_array_new_va. Fixes #59509.
12048
12049         * exceptions.cs: Add testcase for 64578.
12050
12051         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
12052
12053         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
12054         
12055 2004-09-02  Martin Baulig  <martin@ximian.com>
12056
12057         * mini.c (mono_method_to_ir): When initializing the locals, call
12058         handle_initobj() on the generic instance itself, not its
12059         underlying type.
12060
12061 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
12062
12063         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
12064         MonoJitInfo for dynamic methods.
12065
12066         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
12067
12068         * mini.c: Add support for freeing JIT data for dynamic methods.
12069         
12070 2004-09-01  Martin Baulig  <martin@ximian.com>
12071
12072         * mini-x86.c (is_regsize_var): Added support for generic
12073         instances.
12074         (mono_arch_emit_prolog): Make this compile again, use
12075         `x86_push_imm_template (code)'.
12076
12077 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
12078
12079         * mini-x86.c: make all push_imm instructions that get
12080         patched always emit the long form
12081
12082 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
12083
12084         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
12085         in a per-domain hash.
12086
12087         * mini-amd64.c (merge_argument_class_from_type): Handle generic
12088         types.
12089
12090 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
12091
12092         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
12093         work.
12094         
12095         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
12096         work.
12097
12098         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
12099         Beginnings of SSE2 support.
12100
12101         * exceptions.cs: Add more tests for checked int<->uint casts.
12102
12103 2004-08-28  Martin Baulig  <martin@ximian.com>
12104
12105         * mini-x86.c (mono_arch_instrument_epilog): Added support for
12106         generic instances.
12107
12108         * mini.c
12109         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
12110         Handle generic instances recursively.
12111
12112 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
12113
12114         * iltests.il: test for conv.u8 on a constant
12115
12116 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
12117
12118         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
12119         LCONV_x4 (shrun_32 (membase)).
12120
12121 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
12122
12123         * inssel-x86.brg: c&p rules for push/setret of long
12124
12125 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
12126
12127         * inssel-x86.brg: c&p rules for compare (base, regvar) and
12128         compare (regvar, base)
12129
12130         * inssel-x86.brg: more burg love
12131
12132         * inssel.brg: more cleanup
12133
12134         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
12135
12136 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
12137
12138         * basic-long.cs, basic-calls.cs: new tests for optimization.
12139
12140 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
12141
12142         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
12143         patch.
12144
12145 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
12146
12147         * mini-amd64.c (read_tls_offset_from_method): Add another case.
12148         
12149 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
12150
12151         * inssel.brg (mini_emit_memcpy): use 
12152         NO_UNALIGNED_ACCESS to disable memcpy optimization
12153
12154 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
12155
12156         * mini-amd64.c: Handle generic types in various places.
12157
12158         * mini.c (mono_method_to_ir): Handle generic types in init locals.
12159
12160 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
12161
12162         * mini.c (handle_box): Fix warning.
12163
12164         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
12165
12166         * mini-amd64.h: Enable the emit_state optimization.
12167
12168         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
12169
12170         * mini-amd64.c: Add some new 64 bit peephole opts.
12171
12172         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
12173
12174         * cpu-amd64.md: sreg1 of div instructions must be %rax.
12175
12176         * mini-amd64.c: Register allocator fixes.
12177
12178         * mini.c: Add an optimization to emit_state to avoid allocation of new
12179         registers on some platforms.
12180
12181 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
12182
12183         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
12184
12185         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
12186         allocation. Fixes #63085.
12187
12188         * basic-long.cs: Add new regression test.
12189
12190         * mini-amd64.c: Register allocator improvements.
12191
12192 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
12193
12194         * mini-amd64.c (read_tls_offset_from_method): Add another code
12195         sequence.
12196
12197         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
12198         instruction sequence for nullifying class init trampolines.
12199
12200         * objects.cs: Add new regalloc test.
12201
12202         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
12203
12204 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
12205
12206         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
12207         
12208         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
12209         arguments.
12210
12211         * driver.c: Fix profiling after TLS changes.
12212         
12213         * driver.c (mono_main): Set mono_stats.enabled if needed.
12214
12215         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
12216         CEE_BOX.
12217
12218 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
12219
12220         * mini-x86.c: use a 1 op rather than a 2 op tls access
12221         instruction -> faster.
12222
12223 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
12224
12225         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
12226         x86 backend.
12227
12228 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
12229
12230         * exceptions-sparc.c (throw_exception): fix typo
12231
12232 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
12233
12234         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
12235         set tree->dreg correctly with tls. Allow any
12236         register to be used.
12237
12238         * mini-x86.c (read_tls_offset_from_method): add new code
12239         generation pattern seen with GCC.
12240
12241
12242 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
12243
12244         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
12245         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12246         exceptions-sparc.c: fix some performance issues in exception
12247         handling and setting of the stack trace for exceptions that were
12248         already thrown.
12249
12250 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
12251
12252         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
12253         x86 backend.
12254         
12255         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
12256         registers.
12257
12258 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
12259
12260         This patch inlines tls access, when possible.
12261         
12262         * mini.h: new arch functions for TLS intrinsics.
12263         All platforms updated with a stub.
12264
12265         * mini.c: use the new intrinsics
12266
12267         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
12268         arch specific intrinsic for tls variables
12269
12270 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
12271
12272         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
12273         under windows.
12274
12275 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
12276
12277         * mini.c: thread local allocation
12278
12279 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
12280
12281         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
12282
12283         * Makefile.am: Link against the static version of libmonogc.
12284         
12285         * Makefile.am: Link the static versions of the convenience libraries
12286         into the mono executable.
12287
12288         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
12289
12290 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
12291
12292         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
12293         on integer overflow.
12294
12295         * mini-amd64.c: Reorganize function call code.
12296
12297         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
12298
12299 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
12300
12301         * inssel-x86.brg: use xor eax,eax.
12302         
12303         * basic.cs: new tests
12304
12305 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
12306
12307         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
12308         in exception throwing code.
12309         
12310 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
12311
12312         * inssel-x86.brg: use xor esi,esi.
12313
12314 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
12315
12316         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
12317         can trace methods compiled during mini_init () too.
12318
12319         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
12320         CEE_CONV_U4.
12321
12322 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
12323
12324         * Makefile.am: static link on x86 (r=zoltan)
12325
12326 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
12327
12328         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
12329         code since it causes some programs to fail.
12330
12331 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
12332
12333         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
12334
12335 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
12336
12337         * mini.c: ovfops_op_map - add STACK_OBJ case for
12338         CONV_I 
12339         * basic.cs: add test_0_pin_string as test
12340         case for above.
12341
12342 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
12343
12344         * Makefile.am: build C# if srcdir != builddir
12345
12346 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
12347
12348         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
12349         fall-through blocks.
12350
12351 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
12352
12353         * driver.c: enable loop by default again and include abcrem in -O=all.
12354
12355 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
12356
12357         * iltests.il: Add some localloc tests.
12358
12359         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
12360
12361         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
12362         Fixes #62574.
12363
12364         * inssel-amd64.brg: Add some optimizations.
12365
12366         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
12367         for gcc-3.4.
12368
12369         * Makefile.am: Statically link mono against libmono on AMD64.
12370         
12371         * mini-amd64.c inssel-amd64.brg: Optimizations.
12372
12373 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
12374
12375         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
12376
12377         * tramp-amd64.c: Patch calling code in trampolines.
12378
12379 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
12380
12381         * mini-amd64.c: pinvoke struct passing fixes.
12382
12383 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
12384
12385         * mini-sparc.c: redo change, make mono_arch_cpu_init call
12386         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
12387
12388 2004-08-05  Duncan Mak  <duncan@ximian.com>
12389
12390         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
12391         CEE_LDELEM_ANY.
12392
12393 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
12394
12395         * mini-amd64.c (emit_move_return_value): Move return value for normal
12396         calls too.
12397
12398 2004-08-05  Martin Baulig  <martin@ximian.com>
12399
12400         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
12401         `type->type'; just modify `type' itself when dealing with enums
12402         and generic instances.
12403         (check_call_signature): Make `simple_type' a `MonoType *'.
12404
12405 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
12406
12407         * mini.c: Use OP_PADD to add offsets to addresses.
12408
12409         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
12410
12411 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
12412
12413         * mini-sparc.c (mono_arch_emit_epilog): fix check
12414         for folding last op into restore instruction
12415
12416 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
12417
12418         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
12419         helper methods using the code manager.
12420         
12421         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
12422
12423         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
12424
12425 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12426         
12427         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
12428           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
12429
12430         * mini-s390.c: fix tail processing
12431
12432 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
12433
12434         * mini-ppc.c: mul.ovf.un exception name fix.
12435
12436 2004-08-03  Martin Baulig  <martin@ximian.com>
12437
12438         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
12439         instances; before jumping to `handle_enum', also modify `ptype'.
12440
12441 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
12442
12443         * cpu-sparc.md: fcall maximal length too small.
12444
12445 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
12446
12447         * mini-amd64.c mini.h: Add initial support for passing/returning 
12448         structures to/from pinvoked methods.
12449
12450 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
12451
12452         * mini-ppc.c: reg allocator fix.
12453
12454 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
12455
12456         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
12457
12458         * inssel.brg: Optimize memset on 64 bit machines.
12459
12460         * mini-amd64.c: Fix some vararg cases.
12461
12462 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12463
12464         * mini-s390.c: Corrected macro in emit_float_to_int
12465
12466         * s390-abi.cs: Tests to exercise the s390 ABI
12467
12468 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
12469
12470         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
12471         caller saved regs.
12472
12473         * basic.cs: Add a test for add.ovf.un.
12474
12475 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
12476
12477         * mini-sparc.c: add case for OP_IDIV_UN
12478
12479 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
12480
12481         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
12482         
12483         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
12484
12485 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
12486
12487         * basic.cs: regression tests.
12488
12489         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
12490         regressions.
12491
12492 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
12493
12494         * basic.cs: Add a new test.
12495
12496         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
12497         and AOT. Various fixes and optimizations.
12498
12499         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
12500
12501 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
12502
12503         * mini-ppc.c: make sure temp regs are not used for global reg
12504         allocation.
12505
12506 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
12507
12508         * cpu-sparc.md: conv_i8 fix for 64bits
12509
12510         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
12511
12512 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
12513         
12514         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
12515         add opcode for cmp BYTE PTR [eax], imm.
12516
12517         * inssel.brg: Make memcpy and memset takes bases.
12518
12519 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
12520
12521         * *-amd64.*: More AMD64 work.
12522         
12523 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
12524
12525         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
12526         add a compare-not-equal opcode.
12527         
12528 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
12529
12530         * mini.c: Use mono_init_from_assembly instead of mono_init.
12531         
12532 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
12533
12534         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
12535
12536         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
12537
12538         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
12539
12540         * inssel.brg: 64 bit fixes.
12541
12542         * mini.h (MonoCallInst): Add some AMD64 specific data.
12543
12544         * mini.h: Add some OP_P opcodes.
12545
12546 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
12547
12548         * basic.cs: tests for 61797 and 61740
12549
12550 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
12551
12552         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
12553         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
12554
12555 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
12556
12557         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
12558
12559         * *-amd64*.*: Ongoing AMD64 work.
12560
12561 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
12562
12563         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
12564
12565         * *-amd64*: Ongoing AMD64 work.
12566
12567         * mini-arch.h: Add AMD64 support.
12568
12569         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
12570
12571         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
12572
12573         * mini-ops.h: Add new opcodes.
12574
12575         * Makefile.am: Add AMD64 support.
12576
12577         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
12578         rules into the inssel-long*.brg files.
12579
12580         * *-amd64.*: Add beginnings of AMD64 backend.
12581
12582 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
12583
12584         * mini.c (print_dfn): commenting out the code that prints
12585         the cil. With -O=deadce, this makes -v -v crash.
12586         
12587         * cpu-pentium.md: make checkthis have a length of 2
12588
12589 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
12590
12591         * mini-sparc.h: fix implementations of __builtin
12592         functions for Sun compiler for V9.
12593
12594 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
12595
12596         * mini.c: use the new stelem.ref wrapper
12597         * exceptions.cs, arrays.cs: new stelem.ref tests
12598
12599 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
12600
12601         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
12602         new XSP should work with these changes).
12603
12604 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
12605         
12606         * inssel-{long32,x86,}.brg: trivial optimizations.
12607         
12608 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
12609
12610         * mini.c: load value when emitting box operation in
12611         constrained calls.
12612
12613 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
12614
12615         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
12616         is one byte shorter than cmp DWORD PTR [eax], 0.
12617
12618 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
12619
12620         * inssel-ppc.brg: arguments on the stack are always
12621         relative to the stack pointer (spotted by Neale Ferguson).
12622
12623 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12624
12625         * exceptions-x86.c: delay appending the method name to the trace until
12626         after mono_jit_info_table_find is called, as this gets the real
12627         MonoMethod.
12628
12629 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
12630
12631         * aot.c: register roots
12632
12633 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
12634
12635         * aot.c : I could just use PLATFORM_WIN32 flag.
12636
12637 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
12638
12639         * aot.c : Reverting the previous fix. This time it broke linux build.
12640
12641 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
12642
12643         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
12644
12645 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
12646
12647         * mini.c (handle_stack_args): Remove some more debugging code.
12648         
12649         * mini.c (handle_stack_args): Remove debug output left in by mistake.
12650
12651         * driver.c mini.h aot.c: Allow additional options to be specified with
12652         --aot and pass them to mono_compile_assembly.
12653
12654         * aot.c: Add experimental code to AOT compile all loaded assemblies
12655         on demand and save the code into a cache in the filesystem.
12656
12657         * aot.c: Add support for more wrapper methods.
12658         
12659         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
12660         58863.
12661
12662         * cpu-*.md: Remove removed opcodes.
12663
12664         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
12665         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
12666         related icalls to marshal.c.
12667
12668 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
12669
12670         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
12671
12672         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
12673
12674         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
12675
12676 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
12677         * liveness.c: If liveness is recomputated we need to reset the information
12678         for each variable. This way, if the liveness range has been narrowed
12679         by optimizations that happened after the last computation, we can return
12680         a smaller range.
12681         
12682         For example, if you have
12683         
12684         {
12685                 int i = 0;
12686                 
12687                 // Tons of code that does not affect i
12688                 
12689                 i = foo ();
12690                 ...
12691         }
12692         
12693         i = 0 is dead code and will be removed by SSA. However, when
12694         linear scan gets to the code, i will still appear to be live
12695         throughout the entire block. This prevents good register allocation.
12696
12697 2004-07-06  Martin Baulig  <martin@ximian.com>
12698
12699         * debug-mini.c (mono_debug_init_method): Allow
12700         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
12701         (mono_debug_add_icall_wrapper): New method.
12702
12703         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
12704
12705 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
12706
12707         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
12708         optimization.
12709
12710 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
12711
12712         * aot.c (mono_aot_load_method): Fix loading of debug info.
12713
12714 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
12715
12716         * aot.c: Add logging support.
12717
12718 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
12719
12720         * mini.h: Add prototype for mono_print_method_from_ip.
12721
12722         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
12723
12724         * inssel.brg: 64 bit fixes.
12725
12726         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
12727         inssel-long32.brg.
12728
12729         * Makefile.am: Add SPARC64 support.
12730
12731 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
12732
12733         * aot.c: Fix alignment problems on 32 bit platforms.
12734
12735 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
12736
12737         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
12738         SPARC64.
12739
12740         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
12741         problems.
12742
12743         * mini.h: Bump AOT file version. Some 64 bit fixes.
12744
12745 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
12746
12747         * inssel-sparc.brg: Add new rule to avoid register moves.
12748
12749         * inssel.brg: Add ldind_to_load_membase helper function.
12750
12751 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
12752
12753         * mini.c: OffsetToStringData intrinsic.
12754         
12755 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
12756
12757         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
12758
12759         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
12760         regression tests.
12761
12762         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
12763 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
12764
12765         * mini.c: reinstated mono_compile_get_interface_var()
12766         on x86, too, since the change breaks the Gtk# build there as well.
12767
12768 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12769
12770         * driver.c: remove loop from the default optimizations: it seems to
12771         interact badly with some of the other options (see bug #60613).
12772
12773 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
12774
12775         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
12776         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
12777
12778 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
12779
12780         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
12781         vararg-using methods.
12782
12783 2004-06-21  Martin Baulig  <martin@ximian.com>
12784
12785         * mini/mini-exceptions.c
12786         (mono_handle_exception): Added `gpointer original_ip' argument.
12787         After calling mono_unhandled_exception(), call
12788         mono_debugger_unhandled_exception() and if that returns true,
12789         restore the context and return.
12790
12791 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
12792
12793         * mini-ppc.c: prefer the use of relative branches so
12794         they won't need to be patched in aot code (patch from Patrick Beard).
12795
12796 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
12797
12798         * aot.c: patch from Patrick Beard to make the output assembly
12799         more correct for the MacOSX assembler. Small tweak to
12800         generate sane images on Linux/PPC, too.
12801
12802 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12803
12804         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
12805         case until bug #59509 is fixed (shows up in #60332).
12806
12807 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12808
12809         * mini.c: make sure the needed wrappers are compiled, too, with
12810         precomp.
12811
12812 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
12813
12814         * driver.c: remove NPTL reference in --version output.
12815
12816 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12817
12818         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
12819         generate valid assembly for the Mach-O assembler.
12820
12821 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
12822
12823         * driver.c: don't include abcrem in the all optimization specifier
12824         since it slows down jit compilation too much for now.
12825
12826 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
12827
12828         * mini.c: use BIGMUL only if both operands have the same signage.
12829         * iltests.il: Test for bug 60056. (errors related to signage in
12830         BIGMUL).
12831
12832         r=lupus.
12833
12834 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
12835
12836         * mini.c, aot.c: memory leak fixes.
12837
12838 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
12839
12840         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
12841
12842 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
12843
12844         * Makefile.am: remove the -static hack completely, it links in
12845         statically glib as well.
12846
12847 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
12848
12849         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
12850         * exceptions.cs: make it compile with new mcs/csc.
12851
12852 2004-06-03 Massimiliano Mantione <massi@ximian.com>
12853         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
12854         and added relevant test case.
12855
12856 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
12857
12858         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
12859         regressions in gtk-sharp.
12860
12861 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
12862
12863         * exceptions.cs: New regression tests.
12864
12865         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
12866
12867 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
12868
12869         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
12870
12871 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
12872
12873         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
12874
12875         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
12876
12877 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
12878
12879         * mini.c (mono_jit_runtime_invoke): Init class in this
12880         method instead of trusting mono_jit_compile_method to
12881         do the work (because wrappers can be in object class)
12882
12883 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
12884
12885         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
12886
12887         * basic-long.cs: New regression test.
12888
12889 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
12890
12891         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
12892         and div/rem checks.
12893
12894 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
12895
12896         * Makefile.am: fix miguel's change to build mono statically against
12897         libmono (track build dependencies).
12898
12899 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
12900
12901         * cfold.c: Some glib versions do not have G_MININT32.
12902
12903 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
12904
12905         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
12906         with precision of tan, atan, sin and cos, and implemented related
12907         regressions tests (fixes bug 54467, but one new problem appeared and
12908         is not fixed yet).
12909
12910 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
12911
12912         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
12913
12914         * exceptions.cs: Add test for constant folding && division by zero.
12915
12916         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
12917         since driver.c is in libmono too, so the optimization was useless.
12918
12919         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
12920         variable to driver.c so the compiler can emit more efficient code to
12921         access them.
12922
12923 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12924
12925         * Makefile.am: don't distribute generated inssel.[ch] files.
12926
12927 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
12928
12929         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
12930         into the default appdomain. Fixes #58707.
12931
12932         * jit-icalls.c: Remove the broken approximation for truncl, doing
12933         no conversion is better.
12934
12935         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
12936         Fixes #58863.
12937
12938 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
12939
12940         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
12941         of the mcrxr instruction which is not available on some processors
12942         even if it's documented to be. Implement add and sub overflow correctly
12943         (still not complete for long unsigned). Speed up icalls a bit.
12944
12945 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
12946
12947         * mini.c (mono_jit_compile_method_with_opt): Make sure that
12948         we run .cctor in the current domain instead of target_domain.
12949         
12950         Fixes bug #58558, .cctor not being called in -O=shared.
12951
12952 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
12953
12954         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
12955
12956 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
12957
12958         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
12959         which can be done with an imm8, do it that way.
12960         (mono_arch_output_basic_block): ditto for a jmp
12961         (mono_arch_emit_prolog): Computate maximum offset of a label.
12962
12963 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
12964
12965         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
12966         now tries to allocate prefered physical reg's for virtual
12967         regs. This reduces the number of emited spills/loads with
12968         20-30% on our core assemblies.
12969
12970 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12971
12972         * jit-icalls.c: truncl() is not needed and trunc() is
12973         the correct thing to do anyway (bug #58287).
12974
12975 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
12976
12977         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
12978         if available.
12979
12980 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
12981
12982         * driver.c: enable loop optimizations by default.
12983
12984 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
12985
12986         * mini-x86.c: fix calc of max loop size when aligning loops start.
12987
12988 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
12989
12990         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
12991         the stack.
12992
12993 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
12994
12995         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
12996         should set carry.
12997
12998         * basic-long.cs: Add tests for add/subtract of immediates with carry.
12999
13000         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
13001         
13002         * mini.c (inline_method): Allways inline some wrappers even if the cost
13003         is too large. Fixes #58785.
13004
13005         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
13006         
13007 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
13008
13009         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
13010         (crichton@gimp.org). Beginning of support for sparc/linux.
13011
13012         * mini-sparc.c: Optimize retrieval of LMF address.
13013
13014 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
13015
13016         * exceptions-ppc.c:  handle alloca in methods with clauses.
13017
13018 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
13019
13020         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
13021
13022 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
13023
13024         * mini.c: Delegate most of the abort signal work to 
13025           mono_thread_request_interruption, which also handles Stop and Suspend
13026           states.
13027
13028 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
13029
13030         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
13031         supports the save/restore lmf opcodes.
13032
13033 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
13034
13035         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
13036         by gcc-3.4 as well.
13037
13038         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
13039
13040 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
13041
13042         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
13043         methods which contain array accesses.
13044
13045         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
13046         boundaries. Fixes #58537.
13047
13048         * iltests.il: Add regression test for #58537.
13049
13050 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
13051
13052         * mini-x86.c (mono_arch_local_regalloc): Last part of
13053         fix for bug #58633 (releasing register to early).
13054
13055 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
13056
13057         * basic-long.cs: Add new regression test.
13058
13059 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
13060
13061         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
13062         register too early on the chain.
13063
13064 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
13065
13066         * mini.c (create_helper_signature): Use a helper function to reduce
13067         the code which needs to be written. Also set the calling convention of
13068         icalls on windows. Fixes #57840.
13069
13070 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
13071
13072         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
13073         exceptions-ppc.c: added helper function to get the instruction address
13074         from a signal handler context.
13075
13076 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13077
13078         * helpers.c: use g_get_tmp_dir. Invokes happyness 
13079         from gonzalo.
13080
13081 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13082
13083         * helpers.c: Add new env variable to pass args to objdump.
13084         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
13085
13086 2004-05-17  Radek Doulik  <rodo@ximian.com>
13087
13088         * Makefile.am (common_sources): added abcremoval.h so it get
13089         disted and daily mono packages on go-mono.com will build again
13090
13091 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
13092
13093         * abcremoval.c: Fixed coding style, added copyright header.
13094
13095         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
13096
13097         * mini.h: Added prototype for abc removal main function.
13098
13099         * build_relations_propagation_table.pl: Added copyright header.
13100
13101 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
13102
13103         * basic-long.cs: reg test for complex ceq_long bug.
13104
13105 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
13106
13107         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
13108         reg in long and clob case (bug #58343). Fixed/added comments.
13109
13110 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
13111
13112         * mini.c (mono_jit_runtime_invoke): Follow new convention
13113         of calling the invoke method with an function pointer.
13114
13115 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
13116
13117         * ChangeLog: Fix author of memory leak patch.
13118
13119 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
13120
13121         * Makefile.am: fix make dist as well...
13122
13123
13124 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
13125
13126         * cfold.c: Made so that conversions from pointer to int4 are no-ops
13127         on archs where pointers are 4 bytes long.
13128
13129         * Makefile.am: Added abcremoval.c source file.
13130
13131         * abcremoval.c: Added abcremoval.c.
13132
13133         * abcremoval.h: Added abcremoval.h.
13134
13135         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
13136
13137         * inssel.brg: Enabled bounds check removal.
13138
13139         * mini.c: Added support for abcrem optimization.
13140
13141         * mini.h: Added abcrem optimization label.
13142
13143         * driver.c: Added support for abcrem optimization.
13144
13145         * propagated_relations_table.def: Added propagated_relations_table.def.
13146
13147 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
13148
13149         * mini.c, cfold.c: fix style.
13150
13151 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13152
13153         * mini.c: handle issue with the low-level implementation of
13154         some long opcodes (bug #54209).
13155
13156 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
13157
13158         * basic.cs: test for my new cmov stuff.
13159
13160 2004-05-13      Patrik Torstensson
13161
13162         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
13163         opt and added peephole documentation.
13164
13165 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
13166
13167         * tramp-ppc.c: rewrote the generic trampoline code.
13168
13169 2004-05-11      Patrik Torstensson
13170
13171         * mini-x86.c: optimize long shl/shr asm code (one less branch)
13172
13173 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
13174
13175         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
13176
13177         * mini.h mini.c dominators.c: Applied patch from Derek Woo
13178         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
13179
13180         * mini.c: Add new icalls for AsAny marshalling.
13181
13182 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
13183
13184         * tramp-ppc.c, mini-ppc.c: more cleanups.
13185
13186 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13187
13188         * mini.c: no warnings.
13189
13190 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13191
13192         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
13193
13194 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
13195
13196         * mini.c: In the thread abort signal handler, if the thread is in the
13197         process of being stoped, don't throw the Abort exception, just stop the
13198         thread.
13199
13200 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
13201
13202         * tramp-ppc.c: removed old code.
13203
13204 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13205
13206         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
13207         do some simple speed optimizations on ppc.
13208
13209 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
13210
13211         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
13212         and large offsets in load/store.
13213
13214 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
13215
13216         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
13217         it causes regressions.
13218
13219 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
13220
13221         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
13222         support.
13223
13224 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13225
13226         * jit-icalls.c: remove warnings.
13227         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
13228         speedups for unsafe code.
13229
13230 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
13231
13232         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
13233
13234 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
13235
13236         * basic-calls.cs: Add new regression test.
13237
13238         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
13239         more portable.
13240
13241         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
13242
13243         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
13244         is no longer used.
13245
13246 2004-05-06      Patrik Torstensson
13247
13248         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
13249         long reg allocation in any reg (not only eax:edx) and implemented 
13250         long shl/shr ops in asm instead of helpers.
13251
13252 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
13253
13254         * mini-sparc.h: Fix warnings.
13255
13256         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
13257         stack.
13258
13259         * mini-exceptions.c (mono_handle_exception): Call the filter in a
13260         separate statement for clarity.
13261
13262         * mini-sparc.c: Update status.
13263
13264 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
13265
13266         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
13267         here.
13268
13269 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13270
13271         * inssel-ppc.brg: another small pre-release workaround:
13272         we don't do overflow detection for long_sub_un.
13273
13274 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13275
13276         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
13277         (also works around a weird ppc bug: 57957).
13278
13279 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
13280
13281         * tramp-ppc.c: trampoline fixes.
13282
13283 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
13284
13285         * mini-ppc.c: fixed typos.
13286
13287 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
13288
13289         * mini-ppc.c, exceptions-ppc.c: more code saves registers
13290         at the top of the stack. Fixed typos. Use a frame registers
13291         for all the methods with exception clauses.
13292
13293 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
13294
13295         * exceptions-ppc.c: restore fp registers.
13296
13297 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
13298
13299         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
13300         order from the stack top (moved the stack room to save the
13301         return value for trace after the param area). Fixed corruption
13302         in restoring registers on unwind.
13303
13304 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
13305
13306         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
13307
13308 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13309
13310         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
13311         and prolog/epilog for methods that use it. Allow
13312         enough param area room for varargs methods. Fix miguel's
13313         breakage in exception handling.
13314
13315 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13316
13317         * Makefile.am: run genmdesc only on current arch.
13318
13319 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13320
13321         * exceptions-x86.c:
13322         * mini-x86.h: fix the build on windows.
13323
13324 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
13325
13326         * 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.
13327
13328         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
13329
13330         * mini-exceptions.c: New file.
13331         
13332         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
13333         Move some parts of the x86 exception handling code to an 
13334         arch-independent file so it can be shared with other ports.
13335
13336 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
13337
13338         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
13339
13340 2004-04-26  David Waite  <mass@akuma.org>
13341
13342         * driver.c: remove comma from end of enumeration declaration
13343
13344 2004-04-26  Jackson Harper  <jackson@ximian.com>
13345
13346         * driver.c: parse config file before loading first assembly. This
13347         allows the user gac to be enabled/disabled. 
13348         
13349 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
13350
13351         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
13352         simpler mechanism: we do not care what is encoded initially
13353         (branch absolute or relative), we care about the code and its
13354         target.  I kept the old code for reference for now.
13355
13356         The new code tries first to determine if the jump is anywhere in
13357         the -/+32 absolute meg range, if it succeeds, it encodes using the
13358         absolute branch;  If not, it tried to find something in the
13359         relative range, if not, it uses the handle_thunk code. 
13360
13361 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
13362
13363         * exceptions-ppc.c: use the correct ip register on macosx.
13364
13365 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
13366
13367         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
13368
13369 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
13370
13371         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
13372         Raise exception on integer divide by zero by hand since the hw
13373         doesn't support it. Handle NaNs in FP compares.
13374
13375 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
13376
13377         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
13378         code reducing duplication between the platforms and enabled
13379         signal exception handling (on linux for now).
13380
13381 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
13382
13383         * exceptions-ppc.c: more macosx support.
13384
13385 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13386
13387         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
13388
13389 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
13390
13391         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
13392
13393 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
13394
13395         * iltests.il: more tests.
13396
13397 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
13398
13399         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
13400         vars as well.
13401
13402 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
13403
13404         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
13405
13406 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
13407
13408         * liveness.c: Mark variables as volatile in all basic blocks reachable
13409         from exception clauses.
13410
13411 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
13412
13413         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
13414         inlining.
13415
13416 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
13417
13418         * iltests.il, basic.cs: more tests for regalloc.
13419
13420 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13421
13422         * iltests.il: Some tests for register allocation modifications
13423         I have locally.
13424
13425 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
13426
13427         * exceptions.cs: Add regression test for bug #56782.
13428
13429         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
13430         original stack trace if an exception is rethrown. Fixes #56782. Oh,
13431         the beauty of fixing the same thing in 5 different files...
13432
13433 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
13434
13435         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
13436         methods.
13437
13438 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
13439
13440         * mini.c: Add support for STRWLPARRAY marshalling convention.
13441
13442 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
13443
13444         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
13445         to init the context to setup the regs pointer).
13446
13447 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
13448
13449         * exceptions-ppc.c: more exceptions work.
13450
13451 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13452
13453         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
13454         not allowed.
13455
13456 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
13457
13458         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
13459         can use the memory directly.
13460
13461         * cpu-pentium.md: Update documentation from a post from Zoltan. 
13462
13463         add x86_add_membase, x86_sub_membase, x86_mul_membase
13464
13465 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
13466
13467         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
13468         GENERAL_REGS they were also hardcoded for all PPC ports.
13469
13470         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
13471
13472         Remove hard-coded limit for floating point registers, use
13473         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
13474
13475         Notice that in MacOS X calling conventions you can fit a lot more
13476         floating point values in registers, so I should update the PInvoke
13477         test to excercise the passing of floating point values on the
13478         stack (currently broken).
13479         
13480 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
13481
13482         * tramp-ppc.c (create_trampoline_code): Added
13483         JUMP_TRAMPOLINE_SIZE. 
13484         (ppc_magic_trampoline): Follow the pattern from
13485         x86_magic_trampoline: if code is set to zero, return. 
13486         (create_trampoline_code): Always pass MonoMethod to the jump
13487         trampoline, before it was passing a null.
13488         (mono_arch_create_jump_trampoline): Implement the jump stub, could
13489         share the code with mono_arch_create_jit_trampoline. 
13490
13491         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
13492         implemented.
13493         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
13494         implemented.  
13495
13496         * cpu-g4.md: Added length for jmp instruction, the worst case
13497         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
13498         for save_lmf).
13499
13500 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
13501
13502         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
13503
13504 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
13505
13506         * mini.c: Only set bblock->real_offset when adding a new bblock, and
13507         before each IL instruction.
13508
13509         * mini.c (CEE_BOX): Fix warnings.
13510
13511 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13512
13513         * mini.c: removed a few unused vars and extra whitespace.
13514
13515 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
13516
13517         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
13518         checks.
13519         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
13520         index.
13521         (OP_GETCHR): use the above
13522         (CEE_LDELEMA): use the above.
13523
13524         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
13525         version of the generic impl.
13526         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
13527         (CEE_LDELEMA): use the above.
13528
13529 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
13530
13531         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
13532         Fixes #56317.
13533
13534         * iltests.il: Added new regression test for #56317.
13535
13536 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
13537
13538         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
13539         under NetBSD. Fixes #56450.
13540
13541         * liveness.c (update_gen_kill_set): Fix previous patch.
13542
13543 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13544
13545         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
13546
13547 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
13548
13549         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
13550         ldsfld and ldsflda.
13551
13552         * inssel-sparc.brg: Add more optimizations.
13553
13554         * mini-sparc.c: Replace multiply/divide with shifts if possible.
13555
13556 2004-04-01  Martin Baulig  <martin@ximian.com>
13557
13558         * mini.c (handle_box): New static function; moved the
13559         implementation of CEE_BOX here.
13560         (mono_method_to_ir): Added `constrained_call' variable.
13561         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
13562         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
13563         mono_method_get_constrained() to get the method.
13564
13565 2004-04-01  Martin Baulig  <martin@ximian.com>
13566
13567         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
13568         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
13569         (mono_method_to_ir): We don't need these macros anymore since
13570         mono_class_get_full() already takes care of it. 
13571
13572 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13573
13574         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
13575         use @function (as doesn't accept #function here) and check the return
13576         value of system and stop if fails.
13577
13578 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13579
13580         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
13581
13582 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
13583
13584         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
13585
13586         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
13587
13588         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
13589         #56223.
13590
13591         * basic-long.cs: Add test for negation of Int64.MinValue.
13592
13593 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
13594
13595         * mini-sparc.c: Update status.
13596
13597         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
13598
13599         * exceptions-sparc.c: Fix return value in filters.
13600
13601         * inssel-sparc.brg: Fix register allocation in some rules.
13602
13603 2004-03-28  Martin Baulig  <martin@ximian.com>
13604
13605         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
13606         if neccessary.  
13607
13608 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
13609
13610         * mini-x86.c (mono_arch_patch_code): Fix warnings.
13611         
13612         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
13613         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
13614         remove unused conv_u4 opcode.
13615
13616         * mini-x86.c: Remove valgrind workaround since it slows down things
13617         even when mono is not run under valgrind.
13618
13619 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
13620
13621         * mini-sparc.c: Update status.
13622
13623         * inssel-sparc.brg: Add some optimizations.
13624
13625         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
13626         future delay slot filling. Add support for varargs, tail calls and JMP.
13627
13628         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
13629         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
13630
13631         * inssel.brg: Fix register allocation in OP_ARGLIST.
13632
13633         * inssel.brg: Fix warnings.
13634
13635 2004-03-25  Martin Baulig  <martin@ximian.com>
13636
13637         * mini.c (inflate_generic_field): Removed.
13638         (mini_get_method): Removed, use mono_get_method_full(),
13639         (mini_get_class): Removed, use mono_class_get_full().
13640         (mono_method_to_ir): Pass our generic context to
13641         mono_field_from_token().        
13642
13643 2004-03-25  Martin Baulig  <martin@ximian.com>
13644
13645         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
13646         of a `MonoMethod *'.
13647         (mini_get_method): Take a `MonoGenericContext *' instead
13648         of a `MonoMethod *'.
13649         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
13650         a new local variable called `generic_context' which holds the
13651         current `MonoGenericContext *'; use it to lookup things.
13652
13653 2004-03-24  Martin Baulig  <martin@ximian.com>
13654
13655         * mini.c (mini_get_class): New static method; if we're inside a
13656         generic instance, inflate the class if neccessary.
13657         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
13658
13659 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
13660
13661         * iltests.il: New regression test for #55976.
13662
13663         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
13664         #55976.
13665
13666 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
13667
13668         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
13669         output.
13670
13671 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
13672
13673         * liveness.c: Consider SSA stores as well as loads when making vars
13674         volatile.
13675
13676         * exceptions.cs: New regression tests for register allocation.
13677         
13678 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
13679
13680         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
13681         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
13682           domain lock only to protect puntual access to data structures.
13683           Added access lock for sighash, jit_icall_hash_name, 
13684           jit_icall_hash_addr and domain->code_mp.
13685
13686 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
13687
13688         * driver.c: Print SIGSEGV handling method.
13689
13690         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
13691
13692         * mini.c (setup_jit_tls_data): Handle case when this is called
13693         multiple times for a thread.
13694
13695         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
13696         is different from fbxx_un. Fixes #54303. Also use constants instead of
13697         magic numbers in a lot of places.
13698
13699 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
13700
13701         * exceptions.cs: Fix cctor test when --regression is used.
13702
13703 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
13704
13705         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
13706         for Linux/ppc.
13707
13708 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
13709
13710         * inssel-ppc.brg: fixed register assignments for some rules.
13711
13712 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
13713
13714         * exceptions.cs: Add test for exceptions in static constructors.
13715
13716         * mini.c (mono_jit_compile_method_with_out): Move the calling of
13717         static constructors outside the domain lock. Fixes #55720.
13718
13719 2004-03-17  Martin Baulig  <martin@ximian.com>
13720
13721         * mini.c (get_generic_field_inst): Removed, this'll never happen.
13722         (inflate_generic_field): Take the `MonoMethod *' instead of the
13723         `MonoClass *' and added support for generic method.
13724         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
13725         have a `field->parent->gen_params', only inflate the field if it's
13726         an open constructed type.
13727
13728 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
13729
13730         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
13731         exception object instead of the preconstructed ones.
13732
13733 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13734
13735         * mini.c: reverted changed to sigsegv_signal_handler commited
13736         accidentally in the previous patch.
13737
13738 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13739
13740         * mini.c:
13741         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
13742         running --aot with an old assembly.
13743
13744 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
13745
13746         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
13747         point values.
13748
13749         * mini-sparc.c: Add support for v9 branches with prediction.
13750
13751 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
13752
13753         * mini.c (mini_init): #warning is GNUC only
13754
13755         * mini-sparc.h: implement __builtin_frame_address
13756         and __builtin_return_address for Sun C compiler
13757
13758 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
13759
13760         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
13761
13762 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
13763
13764         * basic-calls.cs: Add test for unaligned byref long argument passing.
13765
13766         * mini-ops.h: Add sparcv9 compare and branch instructions.
13767
13768         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
13769         v9 instructions if we have a v9 cpu.
13770
13771         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
13772         registers for global allocation.
13773
13774         * exceptions-sparc.c: Fixes.
13775         
13776 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
13777
13778         * liveness.c (mono_analyze_liveness): Optimized version.
13779
13780         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
13781
13782         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
13783         sparc work.
13784
13785         * basic-float.cs basic-calls.cs: New regression tests.
13786
13787 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
13788
13789         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
13790         sigaltstack implementation.
13791
13792         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
13793         
13794         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
13795         stuff if SIGSEGV_ON_ALTSTACK is not defined.
13796
13797 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
13798
13799         * mini.c: Fix warnings.
13800         
13801         * mini.c (mono_resolve_patch_target): New function which contains the
13802         arch independent part of the patching process.
13803
13804         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
13805         patching code to a separate function.
13806
13807 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
13808
13809         * mini.c (add_signal_handler): ifdef out on Windows
13810
13811 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
13812
13813         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
13814         cpu-sparc.md: Add exception handling support + other fixes.
13815
13816         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
13817         typed GC detection in --version.
13818
13819         * basic.cs exceptions.cs: New regression tests.
13820
13821         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
13822         the arch specific code can store data during a compilation.
13823
13824         * mini-ops.h: Add OP_SETFRET.
13825
13826         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
13827         function, register a separate icall for each arity, so the icalls can
13828         get a wrapper.
13829         
13830         * mini.c (mono_print_tree): Print negative offsets in a more readable
13831         form.
13832         
13833         * mini.c: Make signal handling work on sparc.
13834         
13835         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
13836
13837         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
13838
13839         * jit-icalls.c: Emulate truncl by aintl on solaris.
13840
13841         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
13842
13843 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
13844
13845         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
13846
13847 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
13848
13849         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
13850         a MarshalByRef type, inline a method that performs the check, taking into
13851         account that the object can be a proxy. Also implemented tow new opcodes:
13852         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
13853         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
13854         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
13855
13856 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
13857
13858         * mini-ppc.c: if a relative branch displacement is too big
13859         but it points to and area reachable with an absolute branch, 
13860         avoid the thunks.
13861
13862 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
13863
13864         * mini.c: optimize small copies in cpblk.
13865
13866 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
13867
13868         * basic-calls.cs basic-float.cs: New regression tests.
13869
13870         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
13871         negative offsets from %fp. Implement localloc. Fix local register 
13872         allocation. Fix the case when the this argument needs to be saved to
13873         the stack. Implement some missing opcodes.
13874
13875 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
13876
13877         * mini.c (mini_method_compile): Reenable global regalloc in methods
13878         with exception handlers.
13879
13880         * linear-scan.c (mono_varlist_sort): Fix warning.
13881
13882         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
13883
13884         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
13885         regalloc costs.
13886
13887         * liveness.c: Make all variables uses in exception clauses volatile, to
13888         prevent them from being allocated to registers. Fixes #42136.
13889
13890 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
13891
13892         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
13893         causes regressions.
13894
13895         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
13896         argument to mono_arch_regalloc_cost.
13897
13898         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
13899         precisely.
13900
13901 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
13902
13903         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
13904         Make the cost of allocating a variable to a register arch dependent.
13905
13906         * basic-calls.cs: Fix compilation of tests.
13907         
13908         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
13909         helper function to cut back on the number of #ifdefs needed.
13910
13911         * mini-ppc.c: Fix compilation.
13912
13913         * basic-calls.cs: New regression tests.
13914
13915         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
13916
13917         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
13918         of l0 since that is callee saved.
13919
13920         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
13921         to virtual calls.
13922
13923         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
13924         of delay instruction.
13925
13926         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
13927
13928         * mini.h (MonoCallInst): Add 'virtual' flag.
13929
13930         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
13931
13932 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
13933
13934         * *.cs: New regression tests.
13935
13936         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
13937         work.
13938
13939         * mini.c (mono_runtime_install_handlers): Fix build.
13940
13941         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
13942         'signal_stack_size' members.
13943
13944         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
13945         alternate signal stack.
13946
13947         * exceptions-x86.c: Add stack overflow handling.
13948
13949         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
13950         functions to arch independent code.
13951
13952         * mini.c (mono_print_tree): Print more detailed info for load_membase
13953         opcodes.
13954         
13955 2004-02-23  Martin Baulig  <martin@ximian.com>
13956
13957         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
13958
13959 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
13960
13961         * mini-x86.c: fixed reg allocation for div/rem.
13962
13963 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
13964
13965         * driver.c (mono_main): Report some configuratio options on --version.
13966
13967 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
13968
13969         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
13970         low in the address space. Correctly flush memory in thunks where we
13971         output native code.
13972
13973 2004-02-20  Martin Baulig  <martin@ximian.com>
13974
13975         * mini.c (mini_get_method): New static method; inflate all generic
13976         methods and methods in open generic instances.
13977         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
13978         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
13979
13980 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
13981
13982         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
13983
13984         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
13985
13986 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
13987
13988         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
13989
13990         * mini-sparc.c (flushi mono_arch_output_basic_block): make
13991         it compile using Sun's compiler.
13992
13993 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
13994
13995         * 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.
13996
13997         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
13998
13999 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
14000
14001         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
14002         code.
14003         * mini-ppc.c: handle calls outside of the allowed range with thunks
14004         allocated using the code manager.
14005         * tramp-ppc.c: use the code manager to hold generated native code.
14006         Fixed the magic trampoline to just patch vtable entries.
14007
14008 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
14009
14010         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
14011         independent file.
14012
14013 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
14014
14015         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
14016         PPC.
14017
14018         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
14019         if we have a working __thread implementation.
14020
14021         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
14022         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
14023
14024 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
14025
14026         * mini-x86.c: Fix compilation under gcc 2.
14027         
14028 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
14029
14030         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
14031         contains a call to the wrapped function.
14032
14033         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
14034         OP_<CALL>_IMM opcodes, and use them under X86.
14035         
14036         * mini.c (mono_jit_find_compiled_method): Fix warning.
14037
14038         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
14039
14040         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
14041
14042         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
14043         functionality to mini.c.
14044
14045         * mini.c (mono_create_jump_trampoline): New function to create a jump
14046         trampoline. Return a compiled method instead of a trampoline if it
14047         exists. Add a cache for jump trampolines.
14048
14049         * mini.c (mono_jit_find_compiled_method): New function to return a
14050         compiled method if it exists.
14051
14052         * mini-x86.c: Call mono_create_jump_trampoline instead of 
14053         mono_arch_create_jit_trampoline.
14054
14055         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
14056         a jump trampoline. Fixes #52092.
14057         
14058 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
14059
14060         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
14061         which is not up-to-date. Add check_corlib_version () instead.
14062
14063         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
14064         have to call it.
14065         
14066         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
14067         since newer valgrind versions do not need it.
14068
14069         * mini.c (mono_jit_compile_method_with_opt): New helper function to
14070         compile a method with a given set of optimizations.
14071
14072         * mini.c: Compile icall wrappers on-demand instead of at startup.
14073
14074         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
14075         wrapper for an icall.
14076
14077 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
14078
14079         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
14080         #54063.
14081
14082         * iltests.il: Add test for non-empty stack before switch instruction.
14083
14084 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
14085
14086         * mini.c: Add support for new stringbuilder marshalling conventions.
14087
14088         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
14089
14090 2004-02-01  Martin Baulig  <martin@ximian.com>
14091
14092         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
14093         in `ginst->mtype_argv'.
14094
14095 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
14096
14097         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
14098         facilitate grepping.
14099
14100 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
14101
14102         * mini.c: fixed buglet in initobj generic implementation for references.
14103
14104 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
14105
14106         * Makefile.am: make the version script conditional.
14107         * jit-icalls.c: handle missing truncl().
14108
14109 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
14110
14111         * exceptions.cs: Add more tests for double->int conversion.
14112
14113         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
14114         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
14115
14116 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
14117
14118         * driver.c: make --verbose --version emit an error
14119         if the loaded corlib doesn't match the runtime version.
14120
14121 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
14122
14123         * mini-ppc.h: export ppc_patch().
14124         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
14125         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
14126         on par or better than on MacOSX.
14127
14128 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
14129
14130         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
14131         mono_lookup_pinvoke_call.
14132
14133         * mini-x86.c: Under windows, the default pinvoke calling convention is
14134         stdcall. Fixes #52834.
14135
14136         * mini.c (optimize_branches): Add an upper bound to the number of
14137         iterations to prevent infinite loops on strange loops. Fixes #53003.
14138
14139 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
14140
14141         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
14142         and ISINST. Fixes #52093.
14143
14144         * objects.cs (test_0_vector_array_cast): New tests.
14145         
14146 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
14147
14148         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
14149         checking in Array.Set ().
14150
14151         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
14152         #52590.
14153
14154         * object.cs (test_0_multi_array_cast): New regression test.
14155
14156 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
14157
14158         * exceptions-ppc.c: fix build on Linux/PPC.
14159
14160 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
14161
14162         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
14163         running under valgrind.
14164         (x86_magic_trampoline): Fix build bustage.
14165
14166         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
14167         negative values as well. This is needed for the encoding of the line number
14168         info, since sometimes the line numbers are not in increasing order.
14169
14170 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
14171
14172         * cpu-pentium.md (localloc): Increase the size of the localloc 
14173         instruction since it is a loop under Win32.
14174
14175         * debug-mini.c (record_line_number): Get rid of unneccesary memory
14176         allocation.
14177
14178 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
14179
14180         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
14181         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
14182         Max Horn (max@quendi.de). Fix file names in comments.
14183
14184 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
14185
14186         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
14187         avoid stack overflow.
14188         (replace_usage): Avoid uninitialized variable warnings.
14189
14190         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
14191         and taking the address of valuetype variables.
14192
14193 2004-01-03  Patrik Torstensson
14194
14195         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
14196         for other purposes than FP later on.
14197
14198 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
14199
14200         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
14201         of tail calls.
14202
14203 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
14204
14205         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
14206
14207 2003-12-30  Patrik Torstensson <p@rxc.se>
14208
14209         * mini-x86.h: Decreased number of availiable fp regs.
14210         Solves corner cases with FP spilling.
14211
14212 2003-12-23  Patrik Torstensson <p@rxc.se>
14213
14214         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
14215         for floating point stack tracking / spilling on x86. 
14216         Fixes bug #49012.
14217         
14218         * basic-float.cs: added float mul overflow test.
14219
14220 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
14221
14222         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
14223
14224 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14225
14226         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
14227         supports for cond branches that overflow the immediate
14228         overflow offset. mcs can compile simple programs.
14229
14230 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14231
14232         * exceptions-ppc.c: exception handling support wip:
14233         finally handlers get run on exception.
14234
14235 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
14236
14237         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
14238         profiling.
14239
14240 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
14241
14242         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
14243         initial support for stack walking and unwinding.
14244
14245 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
14246
14247         * driver.c (mono_main): Make corlib-out-of-sync message more 
14248         descriptive. Also remove verify_corlib call.
14249
14250 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
14251
14252         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
14253         not overlap with other call's arguments, too.
14254
14255 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
14256
14257         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
14258         move to arch-specific code the choice of arch-specific
14259         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
14260         * mini.c: ensure emulation calls will not interleave
14261         with other calls.
14262
14263 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
14264
14265         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
14266         the magic trampoline stack frame is dropped before executing
14267         the new method.
14268
14269 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14270
14271         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
14272         and integer to fp conversions. Added support for overflowing
14273         arguments on the stack. Reserve a couple more registers as temps.
14274         Added support for aot compilation (as output still needs to be
14275         tweaked, though).
14276
14277 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14278
14279         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
14280         Don't overwrite return register in some corner cases.
14281
14282 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
14283
14284         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
14285         static constructors when AOT compiling.
14286
14287         * driver.c (mono_main): Call mono_check_corlib_version.
14288
14289 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
14290
14291         * cpu-g4.md, basic.cs: fixed div target register.
14292
14293 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
14294
14295         * mini-ppc.c, basic.cs: shl_imm fix with test.
14296
14297 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
14298
14299         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
14300         structures by value. Misc fixes.
14301         * objects.cs: more tests.
14302
14303 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
14304
14305         * mini-ppc.c: lconv.ovf.i implemented.
14306
14307 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14308
14309         * mini.c:
14310         (mini_init): don't error out if someone already called g_thread_init.
14311
14312 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
14313
14314         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
14315         to be any type per the spec. Fix abnormal memory usage when
14316         the same object is repeatedly thrown.
14317
14318 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
14319
14320         * mini.c: check for overruns in IL code.
14321
14322 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
14323
14324         * TODO: Add/remove some todo entries.
14325
14326 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
14327
14328         * driver.c (mono_main): Call mono_verify_corlib.
14329
14330 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
14331
14332         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
14333         This has been moved to mini.c
14334         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
14335         type being casted is marshalbyref it could be a proxy, so instead of
14336         emitting the type check code, emit a call to a runtime method that will
14337         perform the check by calling CanCastTo if needed.
14338
14339 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
14340
14341         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
14342         methods with large stack frames under Win32.
14343
14344 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
14345
14346         * Makefile.am: Distribute regression tests.
14347
14348         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
14349         at the end instead of inserting each variable into the sorted list.
14350
14351         * linear-scan.c (mono_varlist_sort): New helper function.
14352         
14353 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
14354
14355         * mini.c: ensure arguments and locals are within bounds.
14356
14357 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14358
14359         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
14360         related fixes.
14361
14362 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
14363
14364         * mini.c (mono_cprop_copy_values): Fix crash.
14365
14366         * aot.c: Set verbosity back to 0.
14367         
14368 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14369
14370         * regalloc.c: complete memory leak fix by Laurent Morichetti
14371         (l_m@pacbell.net).
14372
14373 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
14374
14375         * driver.c (main_thread_handler): Revert the previous patch.
14376
14377         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
14378         under valgrind.
14379
14380         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
14381         memory from the memory pool.
14382
14383         * driver.c (main_thread_handler): Turn on all optimizations when
14384         --aot is used.
14385
14386         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
14387         an array for better performance.
14388
14389         * regalloc.c (mono_regstate_assign): Fix memory leak.
14390
14391         * debug-mini.c (mono_debug_serialize_debug_info): New function to
14392         serialize the debug info.
14393
14394         * debug-mini.c (mono_debug_add_aot_method): New function to load the
14395         debug info from the serialized representation.
14396
14397         * aot.c: Save debug info into the generated file and load it when 
14398         loading a method.
14399
14400         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
14401
14402 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
14403
14404         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
14405         More FP-related fixes.
14406
14407 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
14408
14409         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
14410         and register allocation buglet. Hello world now runs.
14411
14412 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
14413
14414         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
14415         * tramp-ppc.c: fixed class init trampoline.
14416         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
14417
14418 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
14419
14420         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
14421         mini.c: more ppc changes/fixes.
14422
14423 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
14424
14425         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
14426         Also optimize the case when the arguments are the same in the caller 
14427         and in the callee.
14428
14429         * iltests.il: Add tests for tail calls with valuetype arguments.
14430
14431 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
14432
14433         * mini-ppc.c: fixes for struct return type.
14434
14435 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
14436
14437         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
14438         mono_spillvar_offset() to arch-specific code.
14439
14440 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
14441
14442         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
14443
14444 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
14445
14446         * exceptions-x86.c: Fix stack space leaks.
14447         
14448         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
14449         registers from the lmf if the method has save_lmf set.
14450
14451 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
14452
14453         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
14454         of icall wrappers into InvokeInDomain, since these are now per-domain.
14455
14456 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
14457
14458         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
14459         make some opcode emulation and intrinsic ops enabled/disabled 
14460         according to the architecture. More fixes.
14461
14462 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
14463
14464         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
14465
14466 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
14467
14468         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
14469         arch-specific handling for 'this' and struct return type to
14470         arch-specific code.
14471
14472 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14473
14474         * aot.c: prevent divide by zero error when reporting (it happened with
14475         Accessibility.dll).
14476
14477 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
14478
14479         * mini.h (inst_switch): Remove unused macro.
14480
14481 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14482
14483         * aot.c:
14484         (load_aot_module): free 'info->methods' and 'info' properly. No more
14485         "free(): invalid pointer blah" messages when you have an old aot
14486         compiled assembly.
14487
14488 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
14489
14490         * jit-icalls.c, mini.c: Added support for context static fields.
14491
14492 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
14493
14494         * mini.c (mono_method_blittable): Methods which set LastError are not 
14495         blittable either. Fixes #51108.
14496         
14497 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
14498
14499         * mini.c: flush icache.
14500         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
14501
14502 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
14503
14504         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
14505
14506 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
14507
14508         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
14509         safe on IA32.
14510
14511         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
14512         vararg calls.
14513
14514         * inssel.brg (CEE_MKREFANY): Fix AOT case.
14515
14516 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
14517
14518         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
14519         instruction when the result is discarded.
14520
14521         * iltests.il (test_0_div_regalloc): New regression test.
14522
14523         * arrays.cs: Fix compilation error.
14524
14525 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
14526
14527         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
14528         float rules to inssel-x86.brg: sane architectures with FP registers
14529         don't need to implement these rules.
14530
14531 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
14532
14533         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
14534
14535 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14536
14537         * mini.h, inssel-long32.brg: fixed endianess issues in int64
14538         implementation of 32 bit systems.
14539
14540 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
14541
14542         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
14543         (Jeroen Zwartepoorte).
14544
14545 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
14546
14547         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
14548         the caller and the callee matches.
14549         
14550         * mini.c (mono_method_to_ir): Add comment.
14551
14552         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
14553         signbit is missing on some platforms.
14554
14555 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
14556
14557         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
14558
14559         * mini.c (setup_jit_tls_data): Call the new function.
14560         
14561         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
14562
14563         * mini-x86.c: Add experimental support for fast access to the lmf
14564         structure under NPTL/Linux 2.6.x.
14565
14566 2003-11-06  Martin Baulig  <martin@ximian.com>
14567
14568         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
14569         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
14570         the debugger.
14571
14572 2003-11-02  Martin Baulig  <martin@ximian.com>
14573
14574         * mini.c (inflate_generic_field): New static method.
14575         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
14576         generic instance and the field is declared in a generic type, call
14577         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
14578
14579 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
14580
14581         * mini.h mini.c (mono_method_same_domain): New function to return
14582         whenever the caller and the callee are in the same domain.
14583
14584         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
14585
14586 2003-10-30  Martin Baulig  <martin@ximian.com>
14587
14588         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
14589         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
14590         method parameters.
14591         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
14592         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
14593
14594 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
14595
14596         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
14597         propagation.
14598
14599         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
14600         object here, so it is in the correct appdomain etc.
14601
14602 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
14603
14604         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
14605         already done.
14606         (mono_method_to_ir): Avoid freeing the type created returned from
14607         mono_type_create_from_typespec, since it is put into an internal cache
14608         by the function. Fixes pointer.exe.
14609
14610         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
14611         trampolines for icalls and pinvokes as well. Fixes #33569.
14612
14613 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
14614
14615         * mini.c: Update after appdomain changes.
14616
14617         * mini.c (mono_jit_compile_method_inner): Allways compile native
14618         method wrappers in the root domain, since there can only be one
14619         instance of them, whose address is stored in method->info.
14620
14621 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
14622
14623         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
14624         environment variable. Instead detect automatically whenever running
14625         under valgrind using the magic macro RUNNING_ON_VALGRIND from
14626         valgrind.h.
14627
14628 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
14629
14630         * trace.c, trace.h: New files that implement the new trace option
14631         parsing. 
14632
14633         * driver.c: Document new --trace options.
14634
14635         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
14636         mini-x86.c: Apply:
14637
14638         -       if (mono_jit_trace_calls)
14639         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
14640
14641         * mini.h: prototypes.
14642         
14643 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
14644
14645         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
14646
14647         * mini.c inssel.brg: Implement typedefbyref opcodes.
14648
14649         * mini.c (mono_jit_compile_method): Remove unused local variable.
14650
14651         * mini.c (mono_jit_compile_method_inner): Ditto.
14652         
14653 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
14654
14655         * tramp-x86.c (x86_class_init_trampoline): Fix build.
14656         
14657         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
14658
14659 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
14660
14661         * mini.c (mono_no_aot): Remove unused global variable.
14662
14663         * mini.c: Thread safety fixes.
14664
14665 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
14666
14667         * mini.c (mono_create_class_init_trampoline): Add a lock around
14668         class_init_hash_addr.
14669
14670         * arrays.cs (test_0_newarr_emulation): Add new regression test for
14671         #30073.
14672
14673         * mini.c: Decompose the NEWARR instruction before decomposing its
14674         arguments. Fixes #30073.
14675
14676 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
14677
14678         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
14679         convention.
14680
14681 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
14682
14683         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
14684
14685         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
14686
14687         * driver.c: Add support for compiling icall wrappers to --compile.
14688
14689 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
14690
14691         * inssel.brg: The empty value in class->interface_offsets is -1, not
14692         0. Fixes #49287.
14693
14694 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
14695
14696         * objects.cs: New test for 'is' operator on an array of interfaces.
14697
14698 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
14699
14700         * tramp-ppc.c: update trampoline code to support jumps
14701         and class initialization.
14702
14703 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
14704
14705         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
14706
14707         * inssel.brg (OP_UNBOXCAST): Fix #46027.
14708
14709         * inssel.brg (OP_UNBOX): Remove unused rule.
14710
14711         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
14712         region instead of one for each method. Fixes #47813.
14713
14714 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
14715
14716         * exceptions.cs (test_0_nested_finally): New regression test for
14717         nested exception handlers.
14718
14719         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
14720
14721         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
14722
14723         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
14724         inlining.
14725
14726         * mini.c (mono_method_check_inlining): Make the inlining limit 
14727         configurable by an environment variable.
14728         
14729         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
14730
14731         * mini.h: Bump AOT file version.
14732
14733         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
14734         token, store the image along with the token, since the token might not 
14735         refer to the same image as the method containing the relocation, 
14736         because of inlining.
14737
14738 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
14739
14740         * mini.c (mono_precompile_assemblies): New function to compile
14741         all methods in all loaded assemblies.
14742
14743         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
14744
14745         * regalloc.h regalloc.c (MonoRegState): Change the type of 
14746         iassign and fassign to int*, since they can contain large negative
14747         values if the register is spilled. Also added some comments. Fixes
14748         #45817.
14749
14750         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
14751         under Win32. Fixes #42964.
14752
14753 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
14754
14755         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
14756
14757         * aot.c: Added support for AOT compiling methods which contain calls
14758         to wrappers. Currently, only remoting-invoke-with-check wrappers are
14759         handled.
14760         
14761         * driver.c (compile_all_methods): Run the compilation in a thread
14762         managed by mono. Fixes #44023.
14763
14764         * mini.c (mono_codegen): Print full method name in verbose output.
14765
14766         * mini-x86.c (mono_arch_patch_code): Fix warning.
14767         
14768         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
14769         jumps, since the method we are jumping to might be domain-specific.
14770
14771         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
14772
14773 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
14774
14775         * inssel.brg: string chars are unsigned.
14776
14777 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
14778
14779         * TODO: New todo item.
14780
14781         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
14782         which calls mono_runtime_class_init and patches the call site to
14783         avoid further calls.
14784         (mono_arch_create_class_init_trampoline): New arch specific function 
14785         to create a class init trampoline.
14786         (create_trampoline_code): Generalized so it can create
14787         class init trampolines as well.
14788
14789         * mini.c (helper_sig_class_init_trampoline): New helper variable.
14790         (mono_create_class_init_trampoline): New function to create and cache
14791         class init trampolines.
14792         (mono_find_class_init_trampoline_by_addr): New function to lookup the
14793         vtable given the address of a class init trampoline. Used by the
14794         patching process.
14795         (mono_codegen): Generate a call to a trampoline instead of
14796         mono_runtime_class_init in LDSFLD[A].
14797         (mono_codegen): Add relocations for the new trampoline.
14798         
14799         * mini.h mini-x86.c aot.c: Added a new relocation type: 
14800         MONO_PATCH_INFO_CLASS_INIT.
14801
14802         * mini.h: Bump AOT version number.
14803
14804         * aot.c: Create a copy of the loaded code instead of using the original
14805         so methods which call each other will be close in memory, improving
14806         cache behaviour.
14807         
14808         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
14809         patch since it breaks the regression tests.
14810         
14811         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
14812         for the register saving instruction sequence since the 
14813         frame_state_for function in glibc 2.3.2 don't seem to detect it.
14814
14815 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
14816
14817         * TODO: Fix todo item && remove another.
14818
14819 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
14820
14821         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
14822         previous checkin.
14823
14824         * aot.c: Moved the check for MONO_LASTAOT into the initialization
14825         function of the module.
14826
14827         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
14828         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
14829         --no-aot command line option.
14830
14831 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
14832
14833         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
14834         by Bernie Solomon (bernard@ugsolutions.com).
14835
14836         * inssel.brg: Refactor the interface offset table related code into
14837         its separate functions and add support for the AOT case.
14838
14839 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
14840
14841         * aot.c (mono_aot_get_method_inner): Fix memory leak.
14842         
14843         * aot.c: Added mono_aot_verbose variable and made all debugging
14844         output depend on the value of this variable.
14845
14846         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
14847         method_label and info_label.
14848
14849         * mini.h mini-x86.c aot.c: Added a new relocation type 
14850         MONO_PATCH_INFO_IID for klass->interface_id.
14851
14852         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
14853         the MonoJitInfo structure.
14854
14855         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
14856         a non-root appdomain in shared mode.
14857
14858 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
14859
14860         * aot.c: make aot loader less verbose. Remove free of unused variable.
14861
14862 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
14863
14864         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
14865
14866         * .cvsignore: Added *.dll.
14867
14868         * mini.c (mono_print_tree_nl): New function callable while debugging.
14869
14870         * mini.c (mono_print_code): Export this.
14871
14872         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
14873         patched code.
14874
14875 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
14876
14877         * mini.h (MonoCompile): Added 'jit_info' field.
14878
14879         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
14880         the cfg structure, since it is needed by the AOT compiler.
14881
14882         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
14883
14884         * aot.c: A major rewrite. Changes include:
14885         - save exception tables for methods which have them.
14886         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
14887         to g_module_symbol.
14888         - reworked the file format so it is now much smaller and needs
14889         fewer relocation entries.
14890         
14891 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
14892
14893         * aot.c (load_aot_module): Fix build bustage on platforms without
14894         Boehm GC.
14895
14896 2003-09-04  Martin Baulig  <martin@ximian.com>
14897
14898         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
14899
14900 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
14901
14902         * TODO: Some new optimization ideas.
14903
14904         * aot.c: Move AOT module loading logic here from mono_assembly_open.
14905
14906         * aot.c: Save the optimization flags used to compile the code into
14907         the AOT module.
14908
14909         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
14910         support emitting domain specific code.
14911         
14912         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
14913         no longer domain neutral. It can be made domain neutral by compiling 
14914         with --optimize=shared.
14915
14916         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
14917         between appdomains.
14918
14919         * driver.c mini.h mini.c: New --no-aot debugging option which disables
14920         loading of AOT code.
14921
14922         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
14923         
14924         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
14925         if there is no domain neutrality information.
14926
14927 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
14928
14929         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
14930         format version into the generated library.
14931
14932         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
14933         callee method into the caller since one of them could be shared.
14934
14935         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
14936         system exceptions from AOT code now works.
14937
14938         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
14939         method if it is domain neutral and the callee is not.
14940
14941         * graph.c (cfg_emit_one_loop_level): Fix warning.
14942
14943 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
14944
14945         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
14946         last checkin.
14947
14948 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
14949
14950         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
14951         is needed  by code which is executed before mono_runtime_init ().
14952         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
14953         
14954         * mini.c (mono_thread_abort): Fix warning.
14955         (mono_jit_compile_method): Call static constructor in the AOT case too.
14956
14957         * aot.c (mono_compile_assembly): Fix warning.
14958
14959 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14960
14961         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
14962
14963 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
14964
14965         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
14966
14967         * cpu-pentium.md: Fix the length of call opcodes so they include the
14968         ESP restoring instruction. Fixes #47968.
14969
14970 2003-08-28  Martin Baulig  <martin@ximian.com>
14971
14972         * mini-x86.c (mono_arch_call_opcode): Added support for
14973         MONO_TYPE_GENERICINST.
14974
14975         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
14976
14977 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
14978
14979         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
14980         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
14981
14982         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
14983         metadata_section.
14984
14985 2003-08-26  Martin Baulig  <martin@ximian.com>
14986
14987         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
14988         when reporting an error, set this to the actual error location.
14989         (mono_method_to_ir): Report the correct error location if
14990         get_basic_blocks() returned an error.
14991
14992 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
14993
14994         * mini.c (mono_type_blittable): OBJECT is not blittable.
14995         (mono_method_blittable): Methods which have marshalling descriptors
14996         are not blittable either. Fixes #47842.
14997
14998 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
14999
15000         * driver.c mini.c: Use an environment variable instead of a global 
15001         variable. Also fix the build.
15002
15003         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
15004         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
15005         reporting this. 
15006
15007         * driver.c mini.c: Added --with-valgrind option to turn off some
15008         code which prevents mono from running under valgrind.
15009
15010         * mini.c (mono_emit_call_args): Fixed warning.
15011
15012         * mini.c (mono_emulate_opcode): Fixed warning.
15013
15014 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15015
15016         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
15017         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
15018         regalloc.c, regalloc.h: specify available registers in arch-specific
15019         code and support floats in the regallocator (patch by Laurent Morichetti 
15020         <l_m@pacbell.net>)
15021
15022 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
15023
15024         * mini.c: mono_thread_current() can be called only after
15025         mono_runtime_init(): rearrange code to not call it early on.
15026
15027 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15028
15029         * mini.c: allocate jump tables in the code mempools.
15030
15031 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15032
15033         * mini.c, mini.h: make sure per-thread data allocated by the jit is
15034         freed.
15035
15036 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
15037
15038         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
15039         12 to 16.  This fixes bug #47453.
15040
15041
15042 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
15043
15044         * mini-ppc.c: fixed indexed load and unsigned compares.
15045
15046 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
15047
15048         * mini.c: reenabled installation of handler for
15049           thread abort signal.
15050
15051 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15052
15053         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
15054         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
15055         until it's fixed and actually useful.
15056
15057 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15058
15059         * inssel-long32.brg: couple more opcodes implemented.
15060
15061 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
15062         
15063         * mini-sparc.c: Even more opcodes implemeted.
15064
15065 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
15066
15067         * mini-sparc.c: More opcodes implemented.
15068
15069 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
15070
15071         * mini-sparc.c: More opcodes implemented.
15072
15073 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
15074
15075         * inssel-sparc.brg: Add some needed rules.  Direct
15076         copy from PPC.
15077         * Makefile.am: Use inssel-sparc.brg
15078         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
15079         an assert happy for now.
15080
15081 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
15082
15083         * mini-sparc.c: Fixed compile errors.
15084         * exceptions-sparc.c: Same.  We now produce a mono binary 
15085         on sparc-linux.  Yea.
15086
15087 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
15088
15089         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
15090         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
15091         They compile, but do not work.
15092
15093 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15094
15095         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
15096         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
15097         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
15098         (ct@gentoo.org).
15099
15100 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15101
15102         * mini.c: more opcodes implemented and better support for generics.
15103
15104 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
15105
15106         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
15107         * mini.c, mini.h: first cut at generics support: some new instructions 
15108         added and changed the behaviour of some of the existing ones.
15109
15110 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
15111
15112         * mini.c: Removed definition of metadata_shared mutex here.
15113
15114 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
15115
15116         * mini-x86.c: make vararg calls work for instance methods.
15117
15118 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
15119
15120         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
15121         returns the arguments in a separte list, now.
15122
15123 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15124
15125         * aot.c, mini.c: updates for array type representation changes.
15126
15127 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
15128
15129         * mini.c: register function to perform jit shutdown.
15130
15131 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15132
15133         * mini.c: use a faster allocator if possible.
15134
15135 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
15136
15137         * aot.c: some cleanups and portability changes.
15138
15139 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15140
15141         * mini.c: use faster allocation for CEE_BOX if possible.
15142
15143 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
15144
15145         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
15146         Moved inlined mempcy code to its own function so that is can be
15147         reused. Added an inline memset function as well (optimized initobj).
15148         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
15149
15150 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15151
15152         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
15153
15154 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
15155
15156         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
15157         arch code can setup the cpu for CLR execution, if needed.
15158         We use it on x86 to set the precision of FP operations.
15159
15160 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
15161
15162         * mini.c: disable some optimizations if we can guess they'll cost too
15163         much for a given method.
15164
15165 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
15166
15167         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
15168         
15169 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
15170         * mini.h mini.c mini-x86.c: Added instruction level coverage 
15171         info collection support.
15172
15173 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15174
15175         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
15176         is now implemented in the profiling API. Get rid of a couple of
15177         unnecessary global variables.
15178
15179 2003-06-15  Nick Drochak <ndrochak@gol.com>
15180
15181         * basic-long.cs: tests for negative values for bigmul, and unsigned.
15182         * cpu-g4.md: add op_bigmul and op_bigmul_un
15183         * cpu_pentium.md: add op_bigmul_un
15184         * inssel-long32.brg: add rule for unsigned bigmul
15185         * mini-ops.h: define OP_BIGMUL_UN
15186         * mini-x86.c: THE BUG: handle (un)signed properly
15187         * mini.c: choose unsigned opcode if needed.
15188         This set of patches fixes bug #44291
15189
15190 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
15191
15192         * mini.c (optimize_branches): improved to handle all kinds of
15193         conditional branches.
15194
15195 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
15196
15197         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
15198         don't raise exceptions.
15199
15200 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15201
15202         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
15203         to arch-specific files.
15204
15205 2003-06-09  Martin Baulig  <martin@ximian.com>
15206
15207         * Makefile.am (libs): Added $(LIBGC_LIBS).
15208
15209 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
15210
15211         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
15212         and OP_ATAN (fixes bug#44293).
15213
15214 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
15215
15216         * Makefile.am, mini-x86.c: rename cpu description array to
15217         pentium_desc, since some compilers define the 'pentium' preprocessor
15218         symbol.
15219
15220 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
15221
15222         * mini.c (mini_select_instructions): add explicit branch if the
15223         following block is not the false target of a conditional branch -
15224         we need this with any optimization that reorder or remove bblocks
15225
15226         * mini.c (optimize_branches): bug fixes
15227
15228 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
15229
15230         * mini.c (mono_method_to_ir): inline static readonly fields
15231
15232         * ssa.c (fold_tree): start cfold support for long (very simple
15233         cases only)
15234
15235         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
15236
15237 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15238
15239         * inssel.brg: fixed memcpy (bug #44219).
15240
15241 2003-06-05  Dick Porter  <dick@ximian.com>
15242
15243         * driver.c: Set the glib log levels to not abort if g_message
15244         recurses.
15245
15246         g_set_prgname() has to happen before mini_init() so that the
15247         process handle gets the info.
15248         
15249 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15250
15251         * driver.c: add intrins to the default optimizations to get wider
15252         exposure.
15253
15254 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
15255
15256         * mini.h: some large basic blocks will overflow a 16-bit
15257         integers for symbolic registers.
15258
15259 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
15260
15261         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
15262         (mono_arch_output_basic_block): fix bug 43499 
15263
15264 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
15265
15266         * mini.c: kill duplicated definition of mono_debug_format.
15267
15268 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
15269
15270         * mini-x86.c, arrays.cs: fixed register allocation bug.
15271
15272 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
15273
15274         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
15275
15276         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
15277
15278 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15279
15280         * mini.c:
15281         (print_method_from_ip): also print source location information if
15282         available.
15283
15284 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
15285
15286         * mini.c (mono_find_block_region): bug fix in region code
15287         (mini_method_compile): enable removing unreachable code again, but
15288         only in methods without exception clauses.
15289
15290 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
15291
15292         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
15293         Implemented arglist opcode and handling of TypedReference type.
15294         Fixed x86 call convention when a structure is returned.
15295         Minimal support for calling static vararg methods.
15296
15297 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
15298
15299         * mini.c (mini_method_compile):  always remove unreachable code,
15300         because the code in them may be inconsistent  (access to dead
15301         variables for example).
15302
15303 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
15304
15305         * driver.c, debug-mini.c: warning fixes.
15306
15307 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
15308
15309         * Makefile.am, jit.h, mini.h: install header for embedding mono.
15310
15311 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
15312
15313         * mini.c: thread-static fields are registered in mono_class_vtable(),
15314         so ensure the function is called before checking for them.
15315
15316 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
15317
15318         * mini.c (optimize_branches): fix for bug 43586
15319
15320         * jit-icalls.c (mono_llmult_ovf): added an additional check for
15321         overflow (fixes Bug #43639)
15322
15323 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15324
15325         * mini.c, objects.cs: allow the use of stobj for primitive types.
15326
15327 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15328
15329         * mini.c: be less strict about argument checking until we support
15330         running the verifier.
15331
15332 2003-05-27  Nick Drochak <ndrochak@gol.com>
15333
15334         * basic-long.cs: tests for (ulong)int * (ulong)int also
15335         * mini.c: use the same trick for (ulong)int * (ulong)int
15336
15337 2003-05-27  Nick Drochak <ndrochak@gol.com>
15338
15339         * basic-long.cs: add regression test for (long)int * (long)int
15340         * cpu-pentium.md: add op_bigmul specification
15341         * inssel-long32.brg: add OP_BIGMUL rule
15342         * mini-ops.h: add OP_BIGMUL
15343         * mini-x86.c: register allocator: handle case where src1 needs to be
15344         in EAX.
15345         * mini.c: substitute special BIGMUL opcode in the tree for 
15346         (long)int * (long)int
15347
15348 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
15349
15350         * jit-icalls.c: call the type ctor on field access if needed.
15351
15352 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
15353
15354         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
15355         to a method (including results of ldelema, bug#43207).
15356
15357 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
15358
15359         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
15360         colors to show exception handler blocks.
15361
15362         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
15363         (fix for pinvoke7.cs).
15364
15365 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15366
15367         * mini.h, mini.c: ensure correct initialization order for types that
15368         require it. Prepare for lazy compilation of jit icall wrappers.
15369         Provide a name for opcode emulation to reduce unneeded mallocing.
15370
15371 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
15372
15373         * mini-x86.c: better register restoring code and profiling
15374         support for tail calls.
15375
15376 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15377
15378         * mini.h, driver.c: prepare for leaf methods optimization.
15379
15380 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
15381
15382         * mini.c: get targets of branches before converting a method.
15383
15384 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
15385
15386         * mini.c (optimize_branches): added some experimental code (disbaled) 
15387
15388 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
15389
15390         * mini.c (optimize_branches): fix branch to branch optimization 
15391
15392         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
15393
15394         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
15395
15396         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
15397
15398         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
15399         if needed.
15400
15401 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
15402
15403         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
15404         enable use of interface variables again.
15405
15406         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
15407         I1 to registers because there is no simply way to sign extend 8bit
15408         quantities in caller saved registers on x86.
15409
15410         * inssel-float.brg: set costs of some rules to 2 so
15411         that monobure always select the arch. specific ones if supplied,
15412         regardless of the order we pass the files to monoburg.
15413
15414 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
15415
15416         * mini.c, mini-x86.c: since the magic trampoline for jumps
15417         can't patch the code directly, we do it as soon as the
15418         method gets compiled.
15419
15420 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
15421
15422         * mini-x86.c, mini.h: introduce a new patching method
15423         to support CEE_JMP and tail calls.
15424         * mini.c: obey tail.call. Don't precompile methods target
15425         of CEE_JMP.
15426         * tramp-x86.c: new trampoline code to handle methods
15427         reached through a jump.
15428
15429 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
15430
15431         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
15432         bit values to registers
15433
15434 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
15435
15436         * mini.c (mono_compile_get_interface_var): share interface
15437         variables if possible.
15438
15439 2003-05-16  Martin Baulig  <martin@ximian.com>
15440
15441         * debug-mini.c (mono_init_debugger): New function to initialize
15442         the debugger.  This is not in the debugger since it needs to
15443         access some of mini's internals.
15444
15445 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
15446
15447         * mini.c (mono_method_to_ir): inlining fixes/cleanups
15448
15449 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
15450
15451         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
15452         for value type handling.
15453
15454 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
15455
15456         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
15457         (mono_method_check_inlining): enable inlining of all kinds of wrappers
15458
15459 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
15460
15461         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
15462           the constructor through a proxy.
15463
15464 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15465
15466         * jit-icalls.c, inssel.brg: fixes to array element address
15467         calculations.
15468
15469 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
15470
15471         * mini-x86.c (is_regsize_var): allocate pointer to registers
15472
15473 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15474
15475         * driver.c: fixed typo, added intrins to the set of optimizations
15476         tested with regressions.
15477
15478 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
15479
15480         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
15481         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
15482         test case.
15483
15484 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
15485
15486         * inssel.brg: remove some common pop instructions without side effects
15487
15488 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15489
15490         * inssel-x86.brg: fixed thinko in int to double conversions.
15491
15492 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
15493
15494         * mini.c, jit-icalls.c: added runtime thread-static variable support.
15495
15496 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
15497
15498         * inssel-long32.brg: two more missing instructions.
15499
15500 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
15501
15502         * mini.c (mono_emit_call_args): set the cil_code for all arguments
15503         if not already set.
15504
15505 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
15506
15507         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
15508         correctly.
15509
15510         * basic-float.cs: Added tests for negative zero.
15511
15512 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15513
15514         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
15515         a couple of missing operations for long casts, with test cases.
15516
15517 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15518
15519         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
15520
15521 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
15522
15523         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
15524         code size estimation.
15525
15526 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
15527
15528         * mini.c (mono_jit_create_remoting_trampoline): make it work with
15529         abstract methods (fix bug 42542)
15530
15531         * aot.c: add ability to handle array types
15532         
15533 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
15534
15535         * mini.c: Call the _specific versions of the object allocation
15536         functions if possible.
15537
15538 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
15539
15540         * driver.c: call setlocale ().
15541
15542 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
15543
15544         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
15545         windows build.
15546
15547 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
15548
15549         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
15550
15551         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
15552         wrappers (fix bug 42122)
15553
15554 2003-05-04  Martin Baulig  <martin@ximian.com>
15555
15556         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
15557
15558         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
15559         s/mini_set_defaults/mono_set_defaults/g.
15560
15561 2003-05-04  Martin Baulig  <martin@ximian.com>
15562
15563         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
15564
15565 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15566
15567         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
15568         (reported by Don Roberts).
15569
15570 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
15571
15572         * mini.c: temporarily work around two bugs for this release.
15573
15574 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15575
15576         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
15577         that contains -export-dynamic and it makes using the ld script
15578         useless.
15579         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
15580
15581 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
15582
15583         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
15584         specific cpu.
15585
15586 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
15587
15588         * mini.c: make sure leave calls all the needed finally blocks,
15589         even when the target jumps out of multiple exception clauses.
15590
15591 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15592
15593         * ldscript, Makefile.am: add linker script to reduce the number of
15594         exported symbols (should also fix the issues with libwine defining
15595         some of the same symbols in io-layer).
15596
15597 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
15598
15599         * driver.c (mini_main): Avoid assertion when no file name is given on 
15600         the command line.
15601
15602 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
15603
15604         * driver.c: added --version/-V command line option.
15605         Added the inline optimization in the regression tests.
15606
15607 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15608
15609         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
15610         to the type in the method signature (fixes bug#42134).
15611
15612 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
15613
15614         * mini.c: when inlining, check this is not null only when needed (bug #42135).
15615
15616 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
15617
15618         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
15619
15620 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15621
15622         * driver.c: fixed bug #42100.
15623
15624 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
15625
15626         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
15627
15628 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
15629
15630         * mini.c: moved most of the code required to do inlining to its own
15631         function so it can be reused. Inline also ctors if appropriate.
15632
15633 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
15634
15635         * Makefile.am: Link with -export-dynamic so shared libs loaded by
15636         the runtime can call mono API functions.
15637
15638 2003-04-27  Martin Baulig  <martin@ximian.com>
15639
15640         * debug-mini.c (mono_debug_init_method): Added
15641         `guint32 breakpoint_id' argument; if the method has a breakpoint,
15642         send a notification to the debugger.
15643
15644         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
15645         running in the Mono Debugger, just pass the breakpoint number to
15646         mono_debug_init_method().
15647
15648         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
15649
15650 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
15651
15652         * mini.c: allow some more unsafe compares.
15653
15654 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15655
15656         * mini-x86.c, Makefile.am: make distcheck works (partially from
15657         a patch by Richard Lee <r.h.lee@attbi.com>).
15658         * regset.c, regset.h: removed, they are unused.
15659
15660 2003-04-25  Dick Porter  <dick@ximian.com>
15661
15662         * driver.c: Usage reports the name as 'mono' not 'mini'
15663         * exceptions-x86.c: Build and run on freebsd
15664
15665 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
15666
15667         * Makefile.am: install the program with the 'mono' name and
15668         the library as libmono instead of mini and libmini.
15669
15670 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
15671
15672         * driver.c: provide the APIs for the embedding interface of the old jit.
15673
15674 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
15675
15676         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
15677
15678 2003-04-23  Martin Baulig  <martin@ximian.com>
15679
15680         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
15681
15682         * driver.c: Added `--debug' command line argument to enable
15683         debugging support.
15684
15685 2003-04-23  Martin Baulig  <martin@ximian.com>
15686
15687         * debug.[ch]: Removed.  The code is now in
15688         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
15689
15690         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
15691         last six months.
15692
15693 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
15694
15695         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
15696
15697 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15698
15699         * mini.c:
15700         (mini_cleanup): moved mono_runtime_cleanup call after the call to
15701         mono_domain_finalize.
15702         (mini_method_compile): use mono_method_profile* if the the option is
15703         enabled.
15704
15705 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
15706
15707         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
15708         methods with their wrapper.
15709
15710         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
15711         methods with their wrapper.
15712
15713         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
15714         their wrapper.
15715
15716         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
15717         wrapper.
15718
15719         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
15720         methods.
15721
15722 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
15723
15724         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
15725
15726 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
15727
15728         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
15729         of the mempool. This is slightly faster and uses less memory
15730
15731 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15732
15733         * mini.c: avoid O(n) allocation for variables.
15734
15735 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15736
15737         * mini.c: handle items on the stack after inlining methods.
15738
15739 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
15740
15741         * mini.c: make the method->opcode optimization dependent
15742         on MONO_OPT_INSTRINS and do it lazily.
15743
15744 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
15745
15746         * driver.c: print overall results at the end of regression run.
15747
15748 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
15749
15750         * inssel.brg: don't overwrite symbolic registers.
15751
15752 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
15753
15754         * inssel-x86.brg: fix conversion from long to float.
15755
15756 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
15757
15758         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
15759
15760 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
15761
15762         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
15763
15764         * driver.c: Added --print-vtable option as in the old JIT.
15765
15766 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
15767
15768         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
15769
15770 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
15771
15772         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
15773
15774 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
15775
15776         * mini.c regalloc.c regalloc.h: Fix memory leak.
15777
15778 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
15779
15780         * aot.c (mono_aot_get_method): register all used strings
15781
15782 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15783
15784         * mini.c: always intern strings references with ldstr at compile time.
15785
15786 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15787
15788         * Makefile.am: add BUILT_SOURCES.
15789
15790 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
15791
15792         * driver.c: give a better error message when the assembly to execute
15793         doesn't have an entry point.
15794
15795 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
15796
15797         * Makefile.am: added hack for automake
15798
15799         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
15800         correct sematics.
15801
15802         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
15803
15804 22003-04-07  Martin Baulig  <martin@ximian.com>
15805
15806         * Makefile.am: Added Makefile.am.
15807
15808         * debugger-main.c: Removed, this is now in the debugger where it
15809         belongs.
15810
15811         * mini.pc.in: Call this package `mini' for the moment.
15812
15813
15814
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824
15825