2008-09-18 Mark Probst <mark.probst@gmail.com>
[mono.git] / mono / mini / ChangeLog
1 2008-09-18  Mark Probst  <mark.probst@gmail.com>
2
3         * mini-ppc.c: Handle structs in tailcalls on Darwin.
4
5 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
6
7         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
8         implementation.
9
10 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
11
12         * trace.c: make tracing more useful and correct, with per-thread
13         id and indent info.
14
15 2008-09-15  Mark Probst  <mark.probst@gmail.com>
16
17         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
18         doing a method call and the argument is an R4.
19
20 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
21
22         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
23         generic methods.
24
25 2008-09-13  Mark Probst  <mark.probst@gmail.com>
26
27         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
28
29 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
30
31         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
32         (MONO_JUMP_TABLE_FROM_INS): Ditto.
33
34 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
35
36         * driver.c: Add a --agent argument (not supported yet) to load managed
37         agent assemblies before loading the main assembly, similarly to how the
38         Java VM handles agents.
39
40 2008-09-11  Mark Probst  <mark.probst@gmail.com>
41
42         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
43         function to do stack layout of local variables.
44
45 2008-09-11  Mark Probst  <mark.probst@gmail.com>
46
47         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
48         calculation.
49
50 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
51
52         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
53         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
54         JIT if DISABLE_JIT is defined.
55
56         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
57         defined.
58
59 2008-09-10  Mark Probst  <mark.probst@gmail.com>
60
61         * iltests.il.in: Disable the fconv test on PPC (the result is
62         undefined according to ECMA).
63
64 2008-09-10  Mark Probst  <mark.probst@gmail.com>
65
66         * iltests.il.in: Enable tail call tests for PPC.
67
68         * mini.h: Add variable for storing incoming valuetype argument
69         addresses for tail calls.
70
71         * mini-ppc.c: Implement valuetype arguments and return values for
72         tailcalls on Linux.
73
74 2008-09-09  Mark Probst  <mark.probst@gmail.com>
75
76         * mini-ppc.c: Partially implement tail calls (struct arguments and
77         return values not supported).
78
79         * method-to-ir.c: Enable tail calls on PPC.
80
81 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
82
83         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
84         runtime-invoke wrappers to work around the problem of them getting
85         assigned to a random class.
86
87         * aot-runtime.c (mono_aot_get_method): Ditto.
88         
89 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
90
91         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
92         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
93
94 2008-09-07  Mark Probst  <mark.probst@gmail.com>
95
96         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
97         until they're implemented properly.
98
99         * exceptions-ppc.c: Use arch-independent exception-handling code
100         instead of custom one.
101
102         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
103         for Linear IR.
104
105         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
106
107         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
108         applies when __powerpc__ is defined.
109
110 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
111
112         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
113         methods to their code to avoid computing the full name of wrappers and
114         doing a lookup in a string hash table.
115
116 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
117
118         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
119         we identify bblocks before method_to_ir () is ran.
120
121         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
122         Also avoid optimizing branches pointing to themselves.
123
124         * mini.c (mini_method_compile): Ditto. Fixes #422947.
125
126 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
127
128         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
129
130 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
131
132         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
133         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
134         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
135         'buf'.
136
137         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
138         jumped to the same entry in plt_jump_table.
139
140 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
141
142         * method-to-ir.c (initialize_array_data): Handle field with RVA from
143         dynamic images.
144
145 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
146
147         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
148         other assignment can be if converted. Saves 1.5% on corlib size and fixes
149         #421807.
150
151 2008-08-29  Geoff Norton  <gnorton@novell.com>
152
153         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
154         segment, and doesn't properly handle .space as .text.  Fixes
155         AOT Mach/ARM
156
157 2008-08-29  Geoff Norton  <gnorton@novell.com>
158
159         * mini.c: Disable the mach exception handler when running on 
160         ARM
161
162 2008-08-29  Geoff Norton  <gnorton@novell.com>
163
164         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
165         globals on Darwin/ARM
166
167 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
168
169         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
170         since too many things depend on it. Instead, call 
171         mono_runtime_set_no_exec ().
172         
173         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
174         the new JIT.
175
176         * aot-compiler.c: Add an 'asm-only' AOT option.
177
178         * mini.c: Avoid initializing the runtime when doing AOT compilation.
179                 
180         * aot-compiler.c (compile_method): Disable gshared support for now as it
181         doesn't yet work.
182
183 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
184
185         * mini-amd64.h : Fix a compiler warning.
186
187         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
188           Changed to use a callback function to retrieve the unwind info.
189           This avoids problems observed when code blocks were removed by
190           unloading an app domain.
191
192         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
193           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
194           to work properly.
195
196         Contributed under MIT/X11 license.
197
198 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
199
200         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
201           case to keep the stack aligned to 8.
202
203         Contributed under MIT/X11 license.
204
205 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
206
207         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
208         avoid repeated linear searches.
209
210 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
211
212         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
213         methods it can't handle.
214         
215         * aot-compiler.c (add_method): Avoid adding a method twice.
216         (add_wrappers): Add runtime invoke wrappers for all methods.
217
218         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
219         function to create an aot-compatible version of this trampoline.
220
221         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
222
223 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
224
225         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
226
227         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
228         with a generic sharing failure.
229
230         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
231
232         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
233         CEE_RETHROW. Fixes #419634.
234
235         * mini.c (mono_method_to_ir): Ditto.
236
237         * exceptions.cs: Add a new test.
238         
239         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
240         to mono_type_stack_size_internal () since some callers might not pass in
241         an rgctx.
242
243         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
244         instrument_prolog. Fixes #419878.
245
246         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
247         doubles in soft float mode volatile.
248
249 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
250
251         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
252
253         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
254         to handle soft float correctly.
255
256         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
257         the fast path.
258
259         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
260
261         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
262         to sp, since the generics catch code requires it.
263
264         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
265         copying.
266
267         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
268         mono_arch_emit_imt_argument ().
269
270         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
271
272         * mini-arm.c tramp-arm.c: Generic sharing updates.
273
274 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
275
276         * mini-arm.c: Fix the arm build.
277
278         * generic-sharing.c (mini_type_get_underlying_type): New helper function
279         handling enums, generic instances and generic sharing.
280         (mini_type_stack_size_full): Ditto.
281
282         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
283         
284         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
285
286         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
287
288         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
289         trampolines.
290
291         * mini-arm.c: Various small generic sharing changes.
292
293         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
294         this for x86.
295         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
296         custom code.
297
298         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
299         helper function to return a generic class init trampoline.
300
301         * method-to-ir.c mini.c: Use it.
302         
303         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
304         arch-specfic function to return a generic class init trampoline.
305
306         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
307         the GENERIC_CLASS_INIT custom code.
308
309         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
310         a fatal error, not a sharing failure.
311
312         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
313         needed.
314
315         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
316         trampoline argument from MONO_ARCH_VTABLE_REG.
317
318         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
319         order of the arguments to the C trampoline: pass 'slot' as the trampoline
320         argument, and pass the vtable in VTABLE_REG.
321
322         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
323         order of the arguments to the C trampoline: pass 'slot' as the trampoline
324         argument, and pass the vtable in VTABLE_REG.
325         (mono_arch_create_trampoline_code_full): Remove some special casing for
326         the rgctx fetch trampoline.
327
328         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
329         Fixes #419273.
330
331         * iltests.il: Add a test for it.
332
333 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
334
335         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
336
337         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
338         no longer needed.
339
340         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
341         use mono_jit_info_table_find () to avoid recursion.
342         (mono_delegate_trampoline): Add a sync wrapper here.
343
344         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
345         here.
346
347         * mini.c (mono_method_to_ir): Ditto.
348         
349         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
350         add_sync_wrapper argument. Don't add a sync wrapper here.
351         (mono_create_jump_trampoline): Don't add a sync wrapper here.
352
353         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
354         
355 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
356
357         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
358           of nonvolatile registers back from MonoContext to CONTEXT.
359
360         Contributed under MIT/X11 license.
361
362 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
363
364         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
365           arguments on Winx64 there are only 4 argument registers.  For this
366           logic to work the last argument must be pulled from the stack.  
367
368         Contributed under MIT/X11 license.
369
370 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
371
372         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
373
374         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
375         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
376         encode/decode_method_ref ().
377
378         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
379
380         * aot-runtime.c (decode_patch): Ditto.  
381
382         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
383         MONO_PATCH_INFO_METHOD.
384
385         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
386         MonoGenericJitInfo.
387
388         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
389         MonoGenericJitInfo.
390
391         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
392
393         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
394         one from the caller.
395
396         * aot-runtime.c (decode_generic_inst): New function to decode and
397         return a interned generic inst.
398         (decode_klass_ref): Use it.
399         (decode_method_ref): Ditto.
400
401         * aot-compiler.c (emit_exception_debug_info): Save 
402         jinfo->has_generic_jit_info too.
403
404 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
405
406         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
407
408         * iltests.il.in: Add a test for fconv_to_i.
409
410         * liveness.c: Disable the liveness2 pass for now to save space.
411
412         * regalloc2.c: Include mempool-internals.h to fix warnings.
413
414         * aot-compiler.c (encode_method_ref): Encode the context of generic
415         instance methods.
416
417         * aot-runtime.c (decode_method_ref): Inflate generic methods using
418         the context saved in the aot file.
419
420         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
421
422         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
423
424         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
425         volatile so they won't be optimized away.
426
427 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
428
429         * ssa.c:
430         * ssa2.c:
431         * mini.c:
432         * regalloc2.c:
433         * dominators.c: Remove duplicated functions that now are in
434         mempool-internals.h.
435
436 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
437
438         * aot-compiler.c: Fix warnings.
439
440         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
441
442         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
443
444         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
445         as the patch type.
446
447         * mini.c (mono_resolve_patch_target): Ditto.
448         
449         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
450         (encode_klass_ref): Add support for encoding VARs/MVARs.
451
452         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
453
454         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
455         the handling of the got entries into a separate 'decode_got_entry' function.
456         Add support for RGCTX_FETCH.
457
458         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
459         clobbered by the trampoline code.
460
461         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
462         not clobbered by the indirect calling code.
463
464 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
465
466         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
467         to fix the build.
468
469 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
470
471         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
472         signature using the compilation mempool otherwise we would leak it.
473
474 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
475
476         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
477         mono_emit_abs_call ().
478
479         * patch-info.h: Add GENERIC_CLASS_INIT.
480
481         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
482
483         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
484         as their target as a near call.
485
486         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
487         ABS handling code.
488         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
489
490         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
491         call to a runtime function described by a patch.
492
493         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
494         mono_emit_abs_call, this has the advantage that the ABS handling code in
495         mono_codegen () can handle them both, and can handle other stuff in the
496         future without additional code.
497
498         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
499         entry.
500         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
501         abs addresses.
502
503         * mini.h: Add missing bblock related prototypes.
504
505         * mini.h (MonoCompile): Remove unused reverse_inst_list and
506         reverse_inst_list_len fields.
507
508         * mini.c: Refactor this file a bit by moving branch optimizations to 
509         branch-opts.c.
510
511         * method-to-ir.c: Merge generic sharing changes missed earlier.
512
513         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
514
515         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
516         shared patches. Process METHODCONST as a shared patch.
517
518         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
519         as it crashes on the 2.0 mscorlib.
520
521         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
522         to cause crashes.
523         
524         * aot-compiler.c: Use is_plt_patch () in a few additional places.
525         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
526         by IMT.
527
528         * aot-compiler.c: Reorganize the got handling code to be a bit more
529         understandable.
530
531 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
532
533         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
534         mono_patch_info_equals/hash, and use it to massively simplify
535         get_plt_index ().
536
537         * mini.c (mono_patch_info_hash): Simplify this and add support for
538         more patch types.
539
540         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
541
542         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
543         handling code, since an offset is not enough to identify a trampoline.
544
545         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
546
547 2008-08-17  Mark Probst  <mark.probst@gmail.com>
548
549         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
550
551         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
552
553         * mini-ops.h: Argument and result types for OVF_CARRY ops.
554
555         * decompose.c: PPC decompositions for various ops.
556
557         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
558
559 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
560
561         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
562         call the generic trampoline code using a call, instead of a jump, to
563         remove some special casing from the generic trampoline code.
564
565         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
566         (mono_codegen): Ditto.
567
568         * aot-compiler.c aot-runtime.c: Ditto.
569
570         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
571
572         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
573         helper function to find the offset corresponding to a lazy fetch trampoline.
574
575         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
576         when doing generic sharing.
577
578         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
579         places.
580         
581         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
582         mini-trampolines.c to be with the other trampoline creation functions.
583
584         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
585         as it is equal to method->signature in most cases, add a 
586         mono_emit_method_call_full variant which takes a signature and an imt
587         argument as well.
588
589 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
590
591         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
592         to this function, since it could be computed easily from the method 
593         argument.
594         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
595         more.
596
597         * method-to-ir.c mini.c: Remove references to 
598         compile_generic_method_wo_context.
599
600         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
601         generic method calls.
602         
603         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
604         dimensional non-szarrays.
605
606         * mini.c (mini_init): Register mono_array_new_1.
607
608         * jit-icalls.c (mono_array_new_1): New jit icall.
609
610         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
611         pointing to the method.
612
613         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
614         method addresses belonging to METHOD_JUMP patches in the 
615         jump_target_got_slot_hash.
616         (mono_aot_load_method): Ditto.
617
618         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
619         METHOD_JUMP patches.
620
621         * mini.c (mini_create_jit_domain_info): New helper function which 
622         initializes/frees domain->runtime_info.
623         (mini_free_jit_domain_info): Ditto.
624         (mini_init): Install the domain hook functions with the runtime.
625
626         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
627         information maintained by the JIT.
628
629         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
630         insertion into jump_table_hash into mono_codegen (), also implement proper
631         locking.
632
633         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
634         tail calls, it is already done by the aot code.
635         
636         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
637         mechanism on amd64.
638
639         * iltests.il.in: Make the jmp test a bit more complex.
640
641         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
642         generic instances which doesn't have a token.
643
644         * aot-runtime.c (decode_method_ref): Ditto.
645         
646         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
647         can handle this case now.
648         (handle_box): Ditto.
649
650 2008-08-15  Geoff Norton  <gnorton@novell.com>
651
652         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
653         debugging check.
654
655 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
656
657         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
658         calling generic methods.
659
660         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
661
662         * aot-runtime.c (decode_patch_info): Ditto.
663
664         * mini.c (mono_resolve_patch_target): Ditto.
665         
666         * patch-info.h: Add METHOD_RGCTX.
667
668         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
669
670 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
671
672         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
673         arguments in registers.
674
675         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
676         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
677
678         * mini.c (mini_method_compile): Abort aot compilation for generic
679         methods if generic sharing is disabled.
680         
681         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
682         an mrgctx.
683
684         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
685         requiring an mrgctx.
686
687         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
688         store instructions when converting a vcall to a normal call.
689
690         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
691         mono_arch_find_jit_info.
692
693 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
694
695         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
696         avoid calling mono_method_full_name () for every method even if the
697         env var is not set.
698         (check_inline_caller_method_name_limit): Ditto.
699
700 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
701
702         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
703         assemblies in one run.
704
705         * aot-compiler.c (mono_compile_assembly): Only print out a count of
706         skipped methods if it is not 0.
707
708         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
709
710 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
711
712         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
713           MONO_ARCH_HAVE_UNWIND_TABLE.
714
715         Contributed under MIT/X11 license.
716
717 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
718
719         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
720           from default optimizaton list on Winx64.
721
722         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
723
724         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
725           the LMF from the MonoJitTlsData structure.
726
727         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
728
729         Contributed under MIT/X11 license.
730
731 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
732
733         * mini.c (sigsegv_signal_handler): Fix the build.
734
735         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
736         assembly->aot_module.
737
738         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
739         hash table. This simplifies and speeds up a lot of code, and fixes support
740         for .netmodules.
741
742         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
743         with the runtime.
744
745         * mini-exceptions.c: Ditto.
746         
747         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
748         'native_offset' argument, since these are computed in the 
749         mono_find_jit_info () function.
750
751         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
752         is used by exceptions-ppc.c.
753
754         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
755         mono_arch_find_jit_info ().
756         
757         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
758         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
759         generic code in mini-exceptions.c.
760
761 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
762
763         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
764
765         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
766         
767         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
768         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
769         called while holding the loader lock. Fixes #415608.
770         (mono_aot_get_method_from_token_inner): Ditto.
771
772 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
773
774         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
775         to reduce differences between this and the generic implementation in
776         mini-exceptions.c.
777         (ves_icall_get_frame_info): Ditto.
778
779         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
780
781         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
782         longer neccesarry.
783
784         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
785         mono_arch_get_call_filter () and make it non-static, for consistency with the
786         other architectures.
787
788 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
789
790         * mini.c:
791         * local-propagation.c:
792         * mini-x86.c: Correct the name of arch defines.
793
794 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
795
796         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
797         NO_EMULATE_LONG_SHIFT_OPS define.
798
799 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
800
801         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
802         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
803
804         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
805         MACH fixes. Merged from the 2.0 branch.
806
807         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
808
809         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
810         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
811
812         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
813
814         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
815         mono_marshal_get_native_wrapper () signature changes.
816
817 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
818
819         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
820         conversion bug under arm.
821
822 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
823
824         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
825
826         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
827         with overflow checking.
828
829 2008-08-05  Marek Habersack  <mhabersack@novell.com>
830
831         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
832         to the genmdesc.pl file
833
834 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
835
836         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
837         arg_array in the soft-float versions of the LOAD/STORE macros.
838
839         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
840         implementation.
841
842         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
843
844 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
845
846         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
847         a float HFA. Fixes #413621.
848
849 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
850
851         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
852         frame_size to args_size. Fixes build.
853
854 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
855
856         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
857         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
858
859         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
860         the stack are not unaligned. Fixes #413247.
861         
862 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
863
864         * mini.c: update jitted methods performance counters.
865
866 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
867
868         * mini-exceptions.c: increase the exceptions thrown performance
869         counter in mono_handle_exception ().
870
871 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
872
873         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
874         can work with netmodules.
875
876 2008-07-28  Geoff Norton  <gnorton@novell.com>
877
878         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
879         regression tests.
880
881 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
882
883         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
884         correct place.
885
886 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
887
888         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
889           The float param registers and other param registers must be the 
890           same index on Windows x64.
891
892         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
893           ArgValuetypeAddrInIReg argument case.  Setting the argument
894           op to OP_VTARG_ADDR (OP_REGOFFSET)).
895
896         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
897           variable computed above as the copy length for arguments of storage
898           type ArgValuetypeAddrInIReg.
899
900         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
901           ArgValuetypeAddrInIReg argument case.  This case will rely on
902           mono_arch_emit_outarg_vt to emit the correct code later in the process.
903
904         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
905           a 32 byte stack allocation for all calls.  We will omit the adjustment for
906           jump and tail call instructoins as they do not follow the typical call behavior.
907
908         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
909           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
910           local variable and pass the local variable by reference to the called method.
911
912         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
913           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
914           of a struct is passed in a register it must be saved with the other
915           volatile argument on the stack.
916
917         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
918           frame pointer the stack adjustment value must be saved to the unwind 
919           info structure.
920
921         Contributed under MIT/X11 license.
922
923 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
924
925         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
926         which got lost in the merge.
927
928 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
929
930         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
931         build.
932
933         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
934         
935         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
936         icalls, since they won't be patched.
937
938         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
939         different code sequence when running under valgrind to prevent some valgrind
940         errors.
941
942         * iltests.il.in: Add new regression test.
943
944         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
945         end with a throw.
946
947         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
948         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
949
950         * iltests.il.in: Add new test.
951
952         * aot-compiler.c: Fix some warnings.
953
954         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
955         Fixes #412494.
956
957 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
958
959         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
960         (mini_usage_jitdeveloper): Add a missing --wapi option.
961
962 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
963
964         * mini-codegen.c: Simplify the is_fp macros.
965         (free_up_ireg): Remove, use free_up_reg instead.
966         (free_up_reg): Fix the fp case.
967
968 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
969
970         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
971         lowered earlier.
972
973         * exceptions-x86.c: Merge some changes which seemed to have got lost
974         in the linear-ir merge.
975
976         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
977
978         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
979         long vreg volatile even if the variable was already created.
980
981         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
982         volatile variables.
983
984 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
985
986         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
987
988         * mini.c (mono_jit_compile_method_inner): Add support for 
989         MONO_EXCEPTION_BAD_IMAGE.
990
991         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
992         mini_method_get_context () returns NULL. Fixes #356531.
993
994         * mini.c (mono_method_to_ir): Ditto.
995         
996         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
997         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
998
999 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
1000
1001         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
1002         in the LDFTN implementation.
1003
1004 2008-07-25  Mark Probst  <mark.probst@gmail.com>
1005
1006         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
1007         code, patch calls to icalls, too, even if they're not in the
1008         shared generic code hash.  Fixes #411962.
1009
1010 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
1011
1012         * cpu-x86.md: Increase the length of the fcall opcodes.
1013
1014         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
1015         calls returning floats.
1016
1017         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
1018         on NEWARR.
1019         
1020         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
1021         missed earlier.
1022
1023         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
1024         into the domain->method_code_hash.
1025
1026         * aot-compiler.c: Fix win32 build.
1027
1028         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
1029         
1030         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
1031         gshared NEWARR implementation.
1032
1033         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
1034
1035         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
1036         can be used outside of method_to_ir.
1037
1038         * mini.h (MonoCompile): Add arg_types field.
1039
1040         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
1041         
1042         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
1043         the values of the local arg_array and param_types array.
1044
1045 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
1046
1047         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
1048         got accesses might only get generated later when NEWOBJ is decomposed.
1049         
1050         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
1051         looking up the native code of the target method when a delegate is called
1052         for the first time.
1053
1054         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
1055         optimization.
1056
1057         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
1058
1059         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
1060         AOT work on platforms without a working dlsym implementation.
1061
1062         * mini.h: Bump AOT image format version.
1063         
1064 2008-07-24  Mark Probst  <mark.probst@gmail.com>
1065
1066         * mini-exceptions.c: Free a MonoType with
1067         mono_metadata_free_type() instead of g_free().
1068
1069         * aot-runtime.c: Free a MonoType.
1070
1071 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
1072
1073         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
1074         optimization.
1075
1076         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
1077         fp stack on x86.
1078
1079 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
1080         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
1081         profiler hook.
1082
1083 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
1084
1085         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
1086         NEWOBJ calls on valuetypes.
1087
1088         * iltests.il.in: Add new test.
1089
1090         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
1091
1092 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
1093
1094         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
1095         is no longer needed.
1096
1097         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
1098         non register sized integer arguments.
1099         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
1100         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
1101         emit_memcpy2 ().
1102
1103         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
1104         CEE_MONO_RETOBJ.
1105         
1106         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
1107         two a binop with different sized arguments is emitted.
1108
1109         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
1110         instruction in the ins==NULL case.
1111
1112 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
1113
1114         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
1115
1116         * mini-x86.c: Fix osx build.
1117
1118         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
1119         opcodes as well.
1120
1121         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
1122         instruction for non int sized variables.
1123
1124         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
1125         implementation.
1126
1127 2008-07-23  Robert Jordan  <robertj@gmx.net>
1128
1129         * method-to-ir.c: Fix MSVC build.
1130
1131 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
1132
1133         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
1134         a non int sized type, widen it to an int since newer versions of gcc seem to
1135         generate code which needs this.
1136
1137         * ssa2.c abcremoval2.c: Fix warnings.
1138
1139         * *: Merge the Linear IR branch.
1140
1141         The original branch is at trunk/branches/vargaz/mini-linear-il, and
1142         the ChangeLog file there describes all the changes done over the years. 
1143         Further documentation can be found at www.mono-project.com/Linear_IL.
1144
1145 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
1146
1147         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
1148           The float param registers and other param registers must be the 
1149           same index on Windows x64.
1150
1151         Contributed under MIT/X11 license.
1152
1153 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
1154
1155         * mini.c: Make the previous fix GC safe.
1156
1157 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
1158
1159         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
1160
1161 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
1162
1163         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
1164           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
1165           ArgValuetypeAddrInIReg instead.
1166
1167         Contributed under MIT/X11 license.
1168
1169 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
1170
1171         * mini-codegen.c (get_register_spilling): Fix a warning.
1172
1173 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
1174
1175         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
1176         for types which the initialization fails. Raises the provided exception
1177         at the right stop after cleanup.
1178
1179 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
1180
1181         * aot-compiler.c: Free most of the memory allocated during compilation.
1182
1183         * mini.c (mini_parse_debug_options): Fix a leak.
1184         
1185         * mini.c (mini_method_compile): Don't add the method to the jit info tables
1186         during aot compilation.
1187
1188 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
1189
1190         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
1191         it has too much register pressure.
1192
1193 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
1194
1195         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
1196
1197 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
1198
1199         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
1200         on x86.
1201
1202         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
1203         on amd64 similar to the way it is done on arm.
1204
1205         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
1206
1207         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
1208         consistency, normalize error messages, avoid loading aot-only modules in
1209         normal mode.
1210
1211         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
1212         for consistency.
1213
1214         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
1215
1216 2008-07-11  Martin Baulig  <martin@ximian.com>
1217
1218         * debug-debugger.h
1219         (MonoDebuggerInfo): Add `interruption_request'.
1220
1221 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
1222
1223         * aot-compiler.c (emit_plt): Remove some dead code.
1224
1225         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
1226
1227         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
1228         return the plt info offset belonging to a given plt entry.
1229
1230         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
1231         mono_aot_get_plt_info_offset.
1232         
1233         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
1234         similar to the amd64 code by makeing jumps through a separate jump table 
1235         instead of embedding the jump addresses into the code.
1236
1237 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
1238
1239         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
1240         method.
1241
1242 2008-07-10  Martin Baulig  <martin@ximian.com>
1243
1244         * mini.c (mini_method_compile): Disable generics sharing when
1245         running in the debugger.
1246
1247 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
1248
1249         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
1250
1251         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
1252         the local register allocator from running out of registers on x86 when 
1253         using aot.
1254
1255 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
1256
1257         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
1258         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
1259         C4146.
1260
1261         Contributed under MIT/X11 license.
1262
1263 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
1264
1265         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
1266         speed up the assembler.
1267
1268 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
1269
1270         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
1271         support.
1272
1273         * mini.c: Move the soft float handling macros a bit earlier, add 
1274         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
1275         place.
1276
1277         * mini.h: Add prototype for mono_arch_fixup_jinfo.
1278
1279         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
1280         read-only to help catch code allocation requests.
1281         
1282         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
1283         and turn it off when using --aot-only or when compiling with --aot=full.
1284
1285         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
1286         jump table for switches from the normal domain mempool, not the code
1287         manager.
1288
1289         * mini-trampolines.c (get_unbox_trampoline): New function to return an
1290         unbox trampoline which handles aot-only mode too.
1291
1292         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
1293         an AOTed unbox trampoline.
1294
1295         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
1296
1297 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
1298
1299         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
1300         ""
1301
1302         Contributed under MIT/X11 license.
1303
1304 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
1305
1306         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
1307           the unwind information for the method at the end of the allocated block.
1308           
1309         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
1310           MonoCompileArch to hold the unwind info for SEH on Winx64
1311         
1312         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
1313           frame pointer info for the method being compiled.
1314           
1315         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
1316           the call to mono_exception_from_token.
1317           
1318         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
1319           storing the method prolog information in a format that the Winx64 SEH can understand.  This
1320           information is stored a the end of the method block because it is all 32-bit offset based.
1321
1322         Contributed under MIT/X11 license.
1323
1324 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
1325
1326         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
1327
1328         * wapihandles.c: Fix warnings.
1329
1330         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
1331         mode.
1332
1333         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
1334         mono_jit_compile_method in aot-only mode since that calls the type 
1335         initializer.
1336         
1337         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
1338         get_delegate_invoke_impl in aot-only mode.
1339
1340         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
1341
1342 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
1343
1344         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
1345
1346         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
1347         is on by default.
1348
1349         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
1350
1351         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
1352         init trampoline from the AOT file as well.
1353
1354         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
1355         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
1356         code.
1357
1358         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
1359         mono_init.
1360
1361         * exceptions-amd64.c: Add _full variants for the remaining exception code
1362         creation functions as well, allow emission of relocatable code, remove
1363         caching since that is now done by the caller.
1364
1365         * mini-exceptions.c: Add _full variants for the remaining exception code
1366         creation functions as well, add aot-only support.
1367
1368         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
1369         if we can determine a proper token for them.
1370         (add_wrappers): Add a few more wrappers.
1371         (emit_method_code): Remove some dead code.
1372         (emit_trampolines): Emit exception code too.
1373
1374         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
1375
1376         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
1377         mono_array_new_va which avoids varargs.
1378
1379         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
1380
1381         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
1382         mono_arch_create_specific_trampoline () in all places.
1383
1384         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
1385         a bit so it can be used for other things as well.
1386         
1387         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
1388         on demand as well.
1389
1390         * exceptions-amd64.c: Rename the caching from the exception code creation
1391         functions, it is done by the caller instead.
1392         
1393         * exceptions-amd64.c: Change the signature of the exception code creation 
1394         functions to allow the creation of relocatable code later.
1395
1396         * mini-exceptions.c: Add a set of functions to query the various 
1397         runtime-generated exception functions.
1398
1399         * mini.c mini-exceptions.c: Use the newly added functions instead of the
1400         mono_arch_.. () functions.
1401         
1402 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
1403
1404         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
1405
1406         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
1407
1408         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
1409         (mini_get_vtable_trampoline): Ditto.
1410
1411         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
1412         code in the AOT case by returning the code size and a list of relocations to
1413         the caller.
1414
1415         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
1416
1417 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
1418
1419         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
1420           clean the stack.
1421
1422         Contributed under MIT/X11 license.
1423
1424 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
1425
1426         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
1427         so the buffer size can be computed correctly. Fixes #404735.
1428
1429         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
1430         normally as cfg->debug_info is already freed.
1431
1432 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
1433
1434         * mini-amd64.c: For calls returning vtypes in registers, don't store
1435         the return address on the stack, instead allocate a separate local for
1436         it. Fixes #404729.
1437
1438 2008-07-05  Mark Probst  <mark.probst@gmail.com>
1439
1440         * mini-trampolines.c, mini.h: Add an argument to
1441         mono_create_jit_trampoline_in_domain() for turning off the adding
1442         of the sync wrapper.
1443
1444         * mini.c: Use the JIT trampoline without sync instead of
1445         ldftn_nosync in static RGCTX invoke wrappers so that the call can
1446         be patched.
1447
1448 2008-07-04  Mark Probst  <mark.probst@gmail.com>
1449
1450         * driver.c: Turn on GSHARED optimization by default.
1451
1452 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
1453
1454         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
1455         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
1456
1457         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
1458         create a variant of the generic trampoline code callable from AOTed trampolines.
1459
1460         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
1461         trampoline code callable from AOTed trampolines.
1462
1463         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
1464
1465 2008-07-04  Mark Probst  <mark.probst@gmail.com>
1466
1467         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
1468         pass-through manner.
1469
1470         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
1471         and don't fail sharing for them anymore.
1472
1473         * mini-exceptions.c: Handle exceptions in shared generic methods.
1474
1475         * generic-sharing.c: When checking the context of a generic
1476         method, also check its class's context.  Don't treat wrappers as
1477         sharable.
1478
1479         * mini-trampolines.c: Some code factored out to
1480         metadata/generic-sharing.c.  Handle the MRGCTX case.
1481
1482         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
1483         we must deal with the method being of another instantiation of the
1484         class.  Add static rgctx invoke wrappers to generic methods.
1485
1486 2008-07-04  Mark Probst  <mark.probst@gmail.com>
1487
1488         * mini.c: Provide all jit infos of generic shared methods with a
1489         generic jit info.
1490
1491         * mini-exceptions.c: Handle the new situation that a generic info
1492         might be available, but not info about the this/vtable/mrgctx
1493         variable.
1494
1495 2008-07-03  Mark Probst  <mark.probst@gmail.com>
1496
1497         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
1498         generic methods.
1499
1500 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
1501
1502         * dominators.c (check_dominance_frontier): Fix a warning.
1503
1504         * mini.h: Add some missing prototypes.
1505
1506         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
1507
1508         * driver.c (mono_jit_init_version): Correct the comments since the first
1509         argument should be the name of the root domain, not a filename.
1510
1511         * aot-runtime.c (make_writable): Error out if this is called while running
1512         with --aot-only.
1513         (load_aot_module): Ditto.
1514
1515         * aot-compiler.c: Really fix the computation of method indexes.
1516
1517         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
1518         optimizations as this is no longer called frequently.
1519
1520         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
1521         method and the invoke impl code and pass it to the delegate trampoline instead of
1522         just the delegate class.
1523
1524 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
1525
1526         * aot-compiler.c: Fixup the computation of method indexes.
1527         (add_wrappers): Create the base methods of the runtime invoke wrappers using
1528         the method builder infrastructure.
1529
1530         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
1531         has no header.
1532
1533         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
1534         mode, load the method right away instead of creating a trampoline.
1535
1536         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
1537
1538         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
1539         some checks a bit.
1540
1541 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
1542
1543         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
1544         (mono_aot_load_method): Use method_index instead of method->token.
1545
1546         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
1547         can handle icalls etc. properly.
1548
1549         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
1550
1551         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
1552
1553         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
1554         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
1555         JIT_ICALL_ADDR patch type.
1556
1557         * patch-info.h: Add JIT_ICALL_ADDR patch type.
1558
1559         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
1560         request flag.
1561         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
1562
1563         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
1564
1565 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
1566
1567         * mini.c: Use domain->jit_code_hash_lock for controlling access to
1568         domain->jit_code_hash.
1569
1570 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
1571
1572         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
1573
1574 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
1575
1576         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
1577         get_this_arg_from_call, let it compute it when needed.
1578
1579         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
1580         gsctx from code only when needed.
1581
1582         * mini-trampolines.c (get_generic_context): Rename this to 
1583         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
1584         it can be called by the arch backends.
1585
1586         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
1587
1588 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
1589
1590         * driver.c (mono_main): Add experimental --aot-only command line option.
1591
1592         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
1593         set.
1594
1595 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
1596
1597         * driver.c (DllMain): Remove mono_module_handle.
1598
1599         Contributed under MIT/X11 license.
1600
1601 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
1602
1603         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
1604         for emitting methods which are not in the source assembly. Detect and report
1605         failure of assembling+linking.
1606         
1607         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
1608
1609         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
1610
1611 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
1612
1613         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
1614
1615 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
1616
1617         * mini.h: Remove some obsolete prototypes.
1618
1619         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
1620
1621 2008-06-24  Mark Probst  <mark.probst@gmail.com>
1622
1623         * mini.c (get_object_generic_inst): Variable-sized arrays are not
1624         supported by Visual Studio, so use alloca().
1625
1626 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
1627
1628         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
1629         Fixes #402585.
1630
1631 2008-06-23  Mark Probst  <mark.probst@gmail.com>
1632
1633         * mini.c: Fail sharing of a generic method if it contains an open
1634         catch clause (because we don't pass MRGCTXs yet).
1635
1636 2008-06-23  Mark Probst  <mark.probst@gmail.com>
1637
1638         * mini.c: When compiling a method with generic sharing, insert the
1639         method instantiated with an all-Object generic context into the
1640         jit info table, instead of the context of the first instantiation
1641         of the method we happen to compile.
1642
1643 2008-06-18  Martin Baulig  <martin@ximian.com>
1644
1645         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
1646         `major_version' and `minor_version'.
1647
1648 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1649
1650         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
1651         mono_method_is_generic_sharable_impl() takes an additional
1652         argument specifying whether to treat type variables as reference
1653         types.
1654
1655 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1656
1657         * mini.h: Removed obsolete prototypes.
1658
1659 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1660
1661         * mini.c: Don't fail generic sharing for initobj and sizeof - we
1662         already handle them.
1663
1664 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1665
1666         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
1667         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
1668         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
1669         tramp-x86.c: Added a MonoGenericContext* argument to
1670         mono_arch_get_unbox_trampoline() so that it can call other
1671         functions which require it.
1672
1673 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1674
1675         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
1676         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
1677         mono_arch_get_this_arg_from_call() takes a
1678         MonoGenericSharingContext* as well.
1679
1680 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1681
1682         * mini.c: Factor out code for emitting unbox into emit_unbox() and
1683         implement generic sharing of unbox.
1684
1685 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1686
1687         * mini.c: Don't compute the vtable to determine whether a field is
1688         special static, because it might not work for open types.
1689
1690 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1691
1692         * mini.c: Removed the unused token_type and token_source arguments
1693         from get_runtime_generic_context_ptr().
1694
1695 2008-06-17  Marek Habersack  <mhabersack@novell.com>
1696
1697         * mini.c (ADD_BINOP): fix the build
1698
1699 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
1700
1701         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
1702         a widening op.
1703
1704 2008-06-16  Mark Probst  <mark.probst@gmail.com>
1705
1706         * mini.h: Removed class relations enum that's not used anymore.
1707
1708 2008-06-16  Mark Probst  <mark.probst@gmail.com>
1709
1710         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
1711
1712         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
1713         the lazy fetch trampoline access code.
1714
1715 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
1716
1717         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
1718
1719 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
1720
1721         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
1722
1723         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
1724
1725         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
1726
1727 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
1728
1729         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
1730         intrinsics.
1731
1732         * mini-ops.h: Add MIN/MAX_UN opcodes.
1733
1734         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
1735         intrinsics.
1736
1737         * basic-math.cs: Add more min/max tests.
1738
1739         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
1740
1741 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1742
1743         * mini.c: Small fix in the prologue of emit_castclass.
1744
1745 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
1746
1747         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
1748
1749         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
1750         do not work even for unsigned types. Fixes #400014.
1751
1752         * basic-math.cs: Add regression tests for unsigned Min/Max.
1753
1754 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1755
1756         * mini.c: Added additional context_used argument to several
1757         functions, which will be needed for sharing generic methods.  Use
1758         GET_RGCTX macro wherever appropriate.  Declare only one
1759         context_used in mono_method_to_ir().
1760
1761 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1762
1763         * mini.c, generic-sharing.c: Removed generic class relations.
1764
1765         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
1766         functions due to MRGCTX changes.
1767
1768 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1769
1770         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
1771         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
1772         with calculated IMT.
1773
1774         * mini.c: Generic sharing of calls via generic interfaces.
1775
1776         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
1777         generic method with non-constant MonoGenericContext*.  Instead,
1778         the context is taken out of the method itself.
1779
1780 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1781
1782         * mini.c: Generic sharing of ldvirtftn.
1783
1784 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1785
1786         * mini.c: Generic sharing of ldftn.
1787
1788 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1789
1790         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
1791
1792 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1793
1794         * mini.c: Generic sharing of the special case of ldtoken followed
1795         by a call to GetTypeFromHandle.
1796
1797 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1798
1799         * mini.c: Generic sharing of box for nullable types.
1800
1801 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
1802
1803         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
1804         are passed on the stack. Fixes #324807.
1805
1806 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
1807
1808         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
1809         for the ArgValuetypeAddrInIReg case.
1810
1811         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
1812         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
1813
1814         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
1815         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
1816         local variable and pass the local variable by reference to the called method.
1817           
1818         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
1819         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
1820
1821         Contributed under MIT/X11 license.
1822
1823 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
1824
1825         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
1826
1827         * debug-mini.c (mono_debug_print_vars): Release memory after printing
1828         everything.
1829
1830 2008-06-10  Martin Baulig  <martin@ximian.com>
1831
1832         * debug-mini.c
1833         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
1834
1835 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
1836
1837         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
1838         possible error when no arguments are passed.
1839
1840         Contributed under MIT/X11 license.
1841
1842 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
1843
1844         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
1845         where the file name is NULL.
1846
1847 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
1848
1849         * mini.c: Fix s390 build.
1850
1851 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
1852
1853         * trace.c (mono_trace_parse_options): Fix warnings.
1854
1855         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
1856
1857 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
1858
1859         * mini.c (remove_block_if_useless): Avoid printing the method name.
1860         
1861         * mini.c: Remove needless setting of ins->cil_code which is now done by 
1862         MONO_INST_NEW.
1863
1864         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
1865         LMF. Not yet used.
1866
1867         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
1868         translated code after it has been patched.
1869
1870 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
1871
1872         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
1873         avoid problems during code patching on SMP systems.
1874         (emit_call): Avoid adding a patch info which is already added by 
1875         emit_call_body.
1876         (mono_arch_emit_exceptions): Ditto.
1877
1878 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
1879
1880         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
1881         MONO_TYPE_ISSTRUCT already checks for it.
1882
1883 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
1884
1885         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
1886           structs with floats on Winx64 the float registers are not used.  
1887           The integer registers are always used..
1888         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
1889           only one register will be used and only if the size of the struct 
1890           is 1,2,4, or 8 bytes.
1891
1892         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
1893           to work for Winx64.
1894
1895         Contributed under MIT/X11 license.
1896
1897 2008-06-05  Martin Baulig  <martin@ximian.com>
1898
1899         * debug-debugger.c (debugger_lookup_class): Also call
1900         mono_class_setup_methods() here; we're only called from RTI.
1901
1902 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
1903
1904         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
1905         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
1906         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
1907         Post-process object files and add dtrace-generated object, if necessary.
1908
1909         Contributed under MIT/X11 license.
1910
1911 2008-06-04  Mark Probst  <mark.probst@gmail.com>
1912
1913         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
1914         element class.
1915
1916         * mini.c: Generic sharing for unbox.any and castclass.
1917
1918 2008-06-04  Mark Probst  <mark.probst@gmail.com>
1919
1920         * mini.c: Ignore tailcall prefix in shared generic code and when
1921         doing calls which require a vtable/rgctx argument.
1922
1923 2008-06-04  Mark Probst  <mark.probst@gmail.com>
1924
1925         * mini.c: Don't free the JIT info.
1926
1927         * driver.c: Changes in the JIT info table testing code.
1928
1929 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
1930
1931         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
1932         interruption. Fix some warnings.
1933
1934         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
1935         interruption_checkpoint.
1936
1937 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
1938
1939         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
1940         from embedding applications.
1941
1942 2008-06-02  William Holmes  <billholmes54@gmail.com>
1943
1944         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
1945           reserving 32 bytes on the stack when making calls. 
1946
1947         Contributed under MIT/X11 license.
1948
1949 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
1950
1951         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
1952         the linear IL branch.
1953
1954         * driver.c: Print out more information for --version on arm.
1955
1956 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
1957
1958         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
1959         bb_exit instead, since out of line bblocks might not actually be emitted
1960         out-of-line.
1961         
1962         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
1963         maximum epilog size for out of line bblocks if tracing is enabled.
1964
1965         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
1966
1967 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
1968
1969         * arrays.cs: Regression tests for allocating arrays with negative sizes.
1970
1971 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
1972
1973         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
1974         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
1975         opcodes.
1976
1977 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
1978
1979         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
1980         the 'value' to store is a constant.
1981
1982         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
1983
1984         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
1985         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
1986
1987 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
1988
1989         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
1990         for accessing method->generic_container.
1991
1992 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
1993
1994         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
1995         
1996         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
1997
1998         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
1999
2000         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
2001         fails.
2002
2003 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
2004
2005         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
2006
2007         * mini.c: Handle the case when mono_class_vtable () fails.
2008
2009 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
2010         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
2011         the stat profiler.
2012
2013 2008-05-22  Mark Probst  <mark.probst@gmail.com>
2014
2015         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
2016         together with domain sharing.
2017
2018 2008-05-22  Mark Probst  <mark.probst@gmail.com>
2019
2020         * mini.c: Treat callvirts to final methods like non-virtual calls
2021         when doing generic sharing, i.e. look them up in the runtime
2022         generic context.
2023
2024 2008-05-22  Mark Probst  <mark.probst@gmail.com>
2025
2026         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
2027         with computed types (for generic sharing).
2028
2029         * mini.c: Generic sharing for mkrefany and refanyval.
2030
2031 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
2032
2033         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
2034         possible.
2035
2036         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
2037         the generic sharing code.
2038         
2039         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
2040         when needed.
2041
2042 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
2043
2044         * mini.h: Remove the declaration of mono_aot_init_vtable ().
2045
2046 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
2047
2048         * driver.c: updated copyright date
2049
2050 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
2051
2052         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
2053         needed.
2054
2055 2008-05-19  Martin Baulig  <martin@ximian.com>
2056
2057         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
2058         pointing to the new `_mono_debug_using_mono_debugger' variable.
2059
2060         * driver.c
2061         (mono_main): Check mono_debug_using_mono_debugger() rather than
2062         the `MONO_INSIDE_MDB' environment variable to check whether we're
2063         inside the debugger.
2064
2065 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
2066
2067         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
2068         argument.
2069
2070 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
2071
2072         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
2073
2074         * mini.c: Added mini_assembly_can_skip_verification. This
2075         function checks if the assembly requested to skip verification. 
2076         Fixes part of #387274.
2077
2078 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
2079
2080         * mini.c (mini_get_method): Disable the check for open generic classes when
2081         using generic sharing.
2082
2083         * generics.cs: Add a test #387034.
2084
2085         * mini.c (mini_get_method): Check whenever the method class is an open generic
2086         type, and return NULL in that case, causing a verification error. Fixes
2087         #384123.
2088
2089 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
2090
2091         * driver.c (mono_main): Revert r102623. The right
2092         thing to do is to enable the verifier under verifiable
2093         unless a --security flag was passed.
2094
2095         We need this non-trivial behavior for --verify-all otherwise
2096         mcs-compileall won't be able to use it. As it needs everything to
2097         be verified under validil.
2098
2099 2008-05-06  Martin Baulig  <martin@ximian.com>
2100
2101         Fix #383749.
2102
2103         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
2104         (mono_debugger_thread_cleanup): Likewise.
2105         (mono_debugger_extended_notification): Likewise.
2106
2107 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
2108
2109         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
2110         against both inflated and non-inflated methods. We need to check against the
2111         generic definition for cases where the instantiated method is not visible.
2112         We need to check against the inflated types for cases where the instantiation
2113         changes any super type. This fixes #382986.
2114
2115         Note that this doesn't need to be applied to other parts of mono_method_to_ir
2116         that check for visibiliy as generic params only appears as the type subject
2117         of tokens on call opcodes. Field manipulation and ldftn must always
2118         target an exact type.
2119
2120 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
2121
2122         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
2123         if no related --security flag is passed.
2124
2125 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
2126
2127         * mini-arch.h: Prepare support for ppc64.
2128
2129         Contributed under MIT/X11 license.
2130
2131 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
2132
2133         * aot-runtime.c: Prepare support for ppc64.
2134
2135         Contributed under MIT/X11 license.
2136
2137 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
2138
2139         * mini-ops.h: Prepare support for ppc64.
2140
2141         Contributed under MIT/X11 license.
2142
2143 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
2144
2145         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
2146
2147         Contributed under MIT/X11 license.
2148
2149 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
2150
2151         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
2152         assemblies, since aot_name is not a full path, causing us to load MS.NET 
2153         assemblies on windows.
2154
2155 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
2156
2157         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
2158         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
2159         * main.c: Use UTF-8 encoded command line instead of Windows default code
2160         page on Windows to support Unicode.
2161         * driver.c (DllMain): New function for mixed-mode assembly support.
2162         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
2163         export __stdcall functions without decoration.
2164
2165         Contributed under MIT/X11 license.
2166
2167 2008-04-28  Mark Probst  <mark.probst@gmail.com>
2168
2169         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
2170         saving it very early.
2171
2172 2008-04-28  Mark Probst  <mark.probst@gmail.com>
2173
2174         * mini.h, mini.c: Lots of code for accessing the old RGCTX
2175         deleted.  The only way to access the new RGCTX is via the
2176         trampline.
2177
2178         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
2179         vtable instead of the RGCTX to static methods.
2180
2181         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
2182         accessing the new RGCTX.
2183
2184         * generic-sharing.c: There is no separation between self, type
2185         arguments and other types in the RGCTX anymore.
2186
2187 2008-04-25  Jonathan Chambers <joncham@gmail.com>
2188
2189         * mini-amd64.c (add_general): Remove previous stack adjustment.
2190         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
2191         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
2192         for 32 bytes of stack space reserved for all calls.
2193         
2194         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
2195         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
2196         adjustment.
2197         
2198         Code contributed under MIT/X11 license.
2199
2200 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
2201
2202         * mini.c (mini_method_verify): Only verify non-inflated methods, check
2203         against the root definition, peeling out method and type instantiations.
2204         Cache verify success results, code that fails verification is still
2205         checked multiple times.
2206
2207 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
2208
2209         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
2210
2211 2008-04-23  Jonathan Chambers <joncham@gmail.com>
2212
2213         * mini-amd64.c (add_general): Always increment stack on Win64.
2214         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
2215         on Win64.
2216         
2217         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
2218         stack based argument handling on Win64.
2219         
2220         Code contributed under MIT/X11 license.
2221
2222 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
2223
2224         * Makefile.am (version.h): Add support for git-svn.
2225
2226 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
2227
2228         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
2229         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
2230         avoiding allocations and libc functions which might deadlock.
2231         
2232         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
2233         'no-gdb-backtrace' option is set.
2234
2235         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
2236
2237         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
2238
2239 2008-04-21  Martin Baulig  <martin@ximian.com>
2240
2241         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
2242         and `get_lmf_addr'; `notification_address' is no longer a pointer.
2243
2244 2008-04-21  Martin Baulig  <martin@ximian.com>
2245
2246         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
2247         `thread_vtable', `event_handler_ptr' and `event_handler'.
2248
2249 2008-04-21  Martin Baulig  <martin@ximian.com>
2250
2251         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
2252         allows delayed initialization of the `executable_code_buffer' when
2253         attaching.
2254
2255 2008-04-21  Martin Baulig  <martin@ximian.com>
2256
2257         * mini.h (mono_debugger_create_notification_function): Removed.
2258         * tramp-*.c (mono_debugger_create_notification_function): Removed.
2259
2260         * mdb-debug-info64.s
2261         (MONO_DEBUGGER__notification_function): Added this in the .text section.
2262
2263         * mdb-debug-info32.s
2264         (MONO_DEBUGGER__notification_function): Added this in the .text section.
2265
2266         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
2267         currently only works on x86 and x86_64, so don't create it on ppc.
2268
2269 2008-04-21  Martin Baulig  <martin@ximian.com>
2270
2271         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
2272
2273         * mini.c
2274         (mini_method_compile): In the fp elimination check, check
2275         `debug_options.mdb_optimizations' in addition to
2276         mono_debug_using_mono_debugger().       
2277
2278         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
2279         disable some JIT optimizations which are only disabled when
2280         running inside the debugger.
2281         Added `--help-debug' option to describe the debugging options.
2282         (parse_debug_options): New static function to parse the `--debug'
2283         options, so we can easily add more stuff in future.
2284
2285 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
2286
2287         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
2288         the method has no body.
2289
2290 2008-04-19  Jonathan Chambers <joncham@gmail.com>
2291
2292         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
2293         assembly is not allowed in MSVC 64-bit compiler. 
2294         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
2295         as we get floating point exceptions everywhere.
2296         
2297         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
2298         correctly align arguments for call to throw_exception.
2299         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
2300         
2301         Code contributed under MIT/X11 license.
2302
2303 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
2304
2305         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
2306
2307 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
2308
2309         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
2310
2311         * mini-amd64.c (NEW_INS): Set cil_code.
2312
2313         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
2314         from mini-amd64.c so all debugger related logic is in one place.
2315
2316         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
2317         later won't have a random ip assigned to them.
2318
2319 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
2320
2321         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
2322         the arch specific function initializes code_size.
2323         (mono_create_delegate_trampoline): Ditto.
2324
2325         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
2326         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
2327         platforms.
2328
2329         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
2330         running under the debugger.
2331
2332         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
2333         debugger.
2334
2335         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
2336         debugger. Also move the disabling of optimizations here from driver.c.
2337         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
2338         debugger.
2339
2340         * mini.h (MonoCompile): Add a few new flags.
2341
2342 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
2343
2344         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
2345         so the cil_code field of created MonoInst's is properly set.
2346         (mini_select_instructions): Ditto.
2347
2348         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
2349         (MONO_INST_NEW_CALL): Ditto.
2350
2351         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
2352         in many places so the ins->cil_code field is properly initialized.
2353
2354         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
2355         place.
2356
2357 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
2358
2359         * mini.c (mini_method_compile): Print a different message when compiling a 
2360         shared method.
2361         
2362         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
2363         > 1.
2364
2365 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
2366
2367         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
2368         SSE2 instructions.
2369
2370         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
2371         
2372 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
2373
2374         * mini.c (handle_stack_args): Make this return void since its return value was
2375         never used. Also set cfg->unverifiable for invalid IL instead of calling
2376         G_BREAKPOINT ().
2377
2378 2008-04-10  Mark Probst  <mark.probst@gmail.com>
2379
2380         * mini.c: Make sure "this" is live in catch clauses with type
2381         variables in shared generic code.
2382
2383 2008-04-08  Mark Probst  <mark.probst@gmail.com>
2384
2385         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
2386         generic_class_is_reference_type() to ensure the proper behaviour
2387         when sharing generic code and the type in question is a type
2388         argument.
2389
2390 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
2391
2392         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
2393         race conditions when printing thread dumps. Fixes #377738.
2394
2395 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
2396         
2397         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
2398         shows up when both MonoInst arguments can cause aliasig.
2399         There is likely no way in the current JIT to trigger this problem, but
2400         it showed up in the development of generics sharing, when in a new
2401         opcode both args of an OP_GROUP can be aliases (addresses of a local).
2402         When the generics sharing code will be committed, its tests will be
2403         valid also for this bug.
2404
2405 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
2406
2407         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
2408         PATCH_INFO_METHOD.
2409
2410         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
2411         NULL.
2412
2413 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
2414
2415         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
2416         use a more detailed exception message for InvalidCastException.
2417
2418         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
2419
2420         * driver.c (mono_main): Add --debug=casts option to turn on better 
2421         InvalidCastException message details.
2422
2423         * mini.c (mini_get_debug_options): New helper function to return the address of
2424         the debug_options variable.
2425
2426         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
2427         the jit_tls TLS variable.
2428
2429         * mini.c (mono_jit_tls): New TLS variable.
2430
2431         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
2432         option is used.
2433
2434 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
2435
2436         * mini.h: Removed verifer related stuff. This code was moved to verify.c
2437
2438         * mini.c: Removed verifer related stuff, code moved to verify.c.
2439
2440         * driver.c: Using code from verify.c instead of mini.c.
2441
2442 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
2443
2444         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
2445         longer valid.
2446
2447 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
2448
2449         * mini.c (check_for_method_verify): Enabling verification of
2450         corlib if mono_verify_all is set. Bugs in the verifier preventing that
2451         have been fixed.
2452
2453 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
2454
2455         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
2456         caller saved registers as well.
2457         
2458         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
2459         saved registers as well.
2460
2461 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
2462
2463         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
2464
2465         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
2466         code.
2467
2468 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
2469
2470         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
2471         to get_call_info.
2472         (get_call_info): Take a gsctx argument instead of 'cfg'.
2473
2474 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
2475
2476         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
2477         mono_verify_all is set.
2478
2479         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
2480
2481         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
2482
2483 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
2484
2485         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
2486         an exception.
2487
2488         * driver.c mini.c mini.h: Add a --verify-all development option to test the
2489         verifier and the code generated by the compiler.
2490
2491 2008-03-25  Mark Probst  <mark.probst@gmail.com>
2492
2493         * mini.c: Generic sharing of the non-nullable case of the box
2494         instruction.
2495
2496 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
2497
2498         * inssel.brg: Fix the build.
2499
2500         * iltests.il.in: Add a test for lconv.ovf.u8.un.
2501
2502 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
2503
2504         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
2505         Array:Address. Fixes #372410.
2506
2507         * iltests.il.in: New tests for readonly prefix.
2508
2509 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
2510
2511         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
2512         mini-trampolines.c.
2513
2514         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
2515         mini-exceptions.c.
2516
2517         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
2518         
2519         * mini.c (mono_decompose_op_imm): New helper function.
2520
2521         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
2522         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
2523         return value.
2524
2525         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
2526         mono_arch_output_basic_block. Fix warnings.
2527
2528         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
2529         for now.
2530
2531 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
2532
2533         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
2534         since the extra frame is now detected automatically inside the loop.
2535
2536         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
2537         opts which are now in mono_peephole_ins ().
2538         
2539         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
2540
2541         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
2542         frames and skip duplicate managed-to-native frames. Fixes #367665.
2543
2544         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
2545         opts which are now in mono_peephole_ins ().
2546         (mono_arch_peephole_pass_2): Ditto.
2547
2548         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
2549
2550         * mini-codegen.c (mono_peephole_ins): New helper function containing the
2551         arch independent peephole optimizations.
2552
2553         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
2554         opts which are now in mono_peephole_ins ().
2555
2556         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
2557         
2558         * mini-s390.c (mono_arch_output_basic_block): Fix build.
2559
2560         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
2561         pattern.
2562
2563         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
2564         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
2565         opcode. 
2566
2567 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
2568
2569         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
2570         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
2571         return value.
2572
2573         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
2574         mono_arch_output_basic_block. Fix warnings.
2575
2576 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
2577
2578         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
2579         conv.ovf.u.un.
2580
2581 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
2582
2583         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
2584         conv.ovf.u.un.
2585
2586         * iltests.il: Add new tests.
2587
2588 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
2589
2590         * mini.c: Removed Windows version macros.
2591
2592 2008-03-20  Mark Probst  <mark.probst@gmail.com>
2593
2594         * generic-sharing.c: Put reflection types in the extensible part
2595         of the runtime generic context.
2596
2597         * mini.c: Generic sharing of the GetTypeHandle special case of the
2598         ldtoken instruction.
2599
2600 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
2601
2602         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
2603
2604         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
2605         
2606         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
2607         consistency with the other version on the linear IR branch.
2608
2609         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
2610
2611         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
2612
2613         * iltests.il.in: Add new tests.
2614
2615 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
2616
2617         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
2618
2619         * iltests.il.in: Add new tests.
2620
2621 2008-03-19  Mark Probst  <mark.probst@gmail.com>
2622
2623         * mini.c: Two variables with the same name were declared in
2624         nesting contexts and one wasn't initialized.  Fixed.
2625
2626 2008-03-19  Mark Probst  <mark.probst@gmail.com>
2627
2628         * mini.c: Generic sharing of the initobj instruction.
2629
2630 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
2631
2632         * mini.c: make the test to optimize ldtoken from typeof() more
2633         precise.
2634
2635 2008-03-18  Mark Probst  <mark.probst@gmail.com>
2636
2637         * mini.c: Generic sharing of the initobj instruction for reference
2638         types.
2639
2640 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
2641
2642         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
2643         the mono_breakpoint_clean_code() code to perform bound checks.
2644
2645 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
2646
2647         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
2648         mono_arch_patch_callsite() to include the start of the managed method
2649         to be able to perform bound checks.
2650
2651 2008-03-17  Mark Probst  <mark.probst@gmail.com>
2652
2653         * mini.c: Generic sharing for the isinst instruction.
2654
2655 2008-03-17  Mark Probst  <mark.probst@gmail.com>
2656
2657         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
2658         inssel-long32-mips.brg: Added opcodes for doing indirect calls
2659         with the runtime generic context argument.
2660
2661         * mini.c: Share calls to several types of unsharable methods by
2662         putting the address of the method code in the runtime generic
2663         context and doing an indirect call.
2664
2665         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
2666         to switches.
2667
2668 2008-03-16  Mark Probst  <mark.probst@gmail.com>
2669
2670         * generic-sharing.c: Change due to a change in the runtime genric
2671         context API.
2672
2673 2008-03-15  Martin Baulig  <martin@ximian.com>
2674
2675         * tramp-x86.c
2676         (mono_arch_nullify_class_init_trampoline): Add call to
2677         mono_breakpoint_clean_code() to make things work when running
2678         inside the debugger.
2679
2680         * tramp-amd64.c
2681         (mono_arch_nullify_class_init_trampoline): Add call to
2682         mono_breakpoint_clean_code() to make things work when running
2683         inside the debugger.
2684
2685 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
2686
2687         * inssel-long.brg (reg): Fix 64 bit build.
2688
2689 2008-03-14  Mark Probst  <mark.probst@gmail.com>
2690
2691         * mini.c, mini.h: Share static generic code by passing it an
2692         implicit argument pointing to the runtime generic context.
2693
2694         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
2695         inssel-long32-mips.brg: New opcodes for calling shared static,
2696         which need to be passed the runtime generic context.
2697
2698         * mini-amd64.c, mini-x86.c: Save the runtime generic context
2699         argument on the stack in the prologue if needed.  New function for
2700         finding the runtime generic context argument from the registers
2701         saved by the trampoline.
2702
2703         * mini-amd64.h, mini-x86.h: Specify which register to use for the
2704         runtime generic context argument.
2705
2706         * tramp-amd64.c: Also restore the register used for the runtime
2707         generic context argument.
2708
2709         * mini-trampoline.c: Resolve shared static calls by consulting the
2710         runtime generic context via the new argument.
2711
2712         * generic-sharing.c: Add an argument to sharability-checking
2713         functions that specifies whether type variables should be treated
2714         as sharable type arguments.
2715
2716         * inssel-x86.brg: Removed a superfluous, buggy rule.
2717
2718         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
2719         to switches.
2720
2721 2008-03-14  Martin Baulig  <martin@ximian.com>
2722
2723         * debug-debugger.c (main_thread_handler): Call
2724         mono_runtime_run_main() without sending any notifications.
2725
2726         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
2727
2728 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
2729
2730         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
2731
2732 2008-03-14  Mark Probst  <mark.probst@gmail.com>
2733
2734         * tramp-x86.c: Fixed register restore offsets in the trampoline
2735         code for ECX and EDX.
2736
2737 2008-03-12  Geoff Norton  <gnorton@novell.com>
2738
2739         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
2740         different ucontext_t implementations.
2741         * exceptions-arm.c: Use the above defines to get exceptions working on 
2742         iPhone (based on a patch by Luke Howard lukeh@padl.com)
2743         * mini-arm.c: Implement iPhone icache support (based on a patch by
2744         Luke Howard lukeh@padl.com)
2745
2746 2008-03-12  Mark Probst  <mark.probst@gmail.com>
2747
2748         * mini.c: Enable generic sharing of calls to non-static
2749         non-interface non-generic non-value-type methods.
2750
2751         * mini-trampolines.c: Resolve calls from shared generic code.
2752
2753 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
2754
2755         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
2756
2757         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
2758
2759 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
2760
2761         * mini.c: some fixes for the AOT compiler.
2762
2763 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
2764
2765         * cpu-amd64.md: Add clob:1 to some float opcodes.
2766
2767 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
2768
2769         * mini.h: Added MiniVerifierMode enumeration.
2770
2771         * mini.c: Added mini_verifier_set_mode to control
2772         the usage of the new verifier.
2773
2774         * mini.c (mono_method): Integrated the new verifier.
2775
2776         * driver.c: Extended --security option with validil and
2777         verifiable options to activate the new verifier.
2778
2779 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
2780
2781         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
2782         optimization to ctors taking 0 or 2 arguments too.
2783
2784         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
2785         a bit.
2786
2787         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
2788
2789         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
2790
2791 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
2792
2793         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
2794         non-aot case as well.
2795
2796         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
2797
2798         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
2799         changes.
2800
2801         * aot-compiler.c (encode_patch): Ditto.
2802
2803         * mini.h (G_MININT32): Fix the definition of this.
2804
2805 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
2806
2807         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
2808
2809         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
2810
2811 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
2812
2813         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
2814         methods returning vtypes in registers.
2815         (mono_arch_allocate_vars): Ditto.
2816
2817         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
2818
2819         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
2820
2821         * generics.cs: Add a test from the linear IR branch.
2822
2823         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
2824
2825         * mini.c (inline_method): Cache failed inline attempts.
2826
2827 2008-03-04  Mark Probst  <mark.probst@gmail.com>
2828
2829         * mini.c: For shared methods of generic classes put the location
2830         of "this" into the MonoGenericJitInfo.
2831
2832         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
2833         register out of a MonoContext by register number.  Add the generic
2834         sharing context as an argument to mono_arch_find_this_argument().
2835
2836         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
2837         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
2838         for new arch function.
2839
2840         * mini-exception.c: Handle open exception clauses in shared
2841         generic code.
2842
2843         * mini-trampolines.c: Supply additional argument to
2844         mono_arch_find_this_argument().
2845
2846 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
2847
2848         * Makefile.am (regtests): Run the bench.exe tests last.
2849
2850 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
2851
2852         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
2853         a bit.
2854
2855 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
2856
2857         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
2858         with MS.
2859
2860         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
2861         
2862         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
2863
2864         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
2865         whose class has no cctor.
2866
2867         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
2868
2869 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
2870
2871         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
2872         unverified.
2873
2874 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
2875
2876         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
2877         to be in sync with the code on the linear IR branch.
2878
2879         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
2880
2881         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
2882
2883 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
2884
2885         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
2886
2887         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
2888
2889         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
2890
2891         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
2892
2893         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
2894         
2895         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
2896         body.
2897
2898 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
2899
2900         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
2901         OP_LOADR4_MEMBASE emission.
2902
2903         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
2904         (mono_spillvar_offset_float): Ditto.
2905
2906         * mini-mips.c (mono_arch_emit_prolog): Ditto.
2907
2908         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
2909         emission.
2910
2911         * basic-long.cs: Add regression tests for them.
2912
2913         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
2914         use.
2915         (mono_arch_allocate_vars): Fix representation of single-precision float
2916         argument.
2917         (mono_arch_output_basic_block): Ditto.
2918
2919         * inssel-mips.brg: Ditto, remove duplicate items.
2920
2921         * mini-mips.c (emit_load_volatile_arguments): New function to handle
2922         arguments of tail calls as on other platforms.
2923         (mono_arch_output_basic_block): Handle tail calls.
2924
2925         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
2926         register.
2927
2928         * objects.cs (test_5_pass_static_struct): Add test for it.
2929
2930         Contributed under MIT/X11 license.
2931
2932 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
2933
2934         * Makefile.am: Use gmcs for compiling the regression tests.
2935
2936         * *.2.cs *.2.il: Rename to *.cs and *.il.
2937
2938 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
2939
2940         * regalloc.h: Make the vassign array smaller.
2941
2942         * mini.c (mini_method_compile): Remove an unused field in cfg.
2943
2944         * mini-codegen.c: Add a bunch of micro optimizations.
2945
2946 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
2947
2948         * regalloc.h: Remove some unused fields.
2949
2950 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
2951
2952         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
2953
2954         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
2955
2956 2008-02-22  Mark Probst  <mark.probst@gmail.com>
2957
2958         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
2959
2960         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
2961         trampoline: Fetch an entry from the runtime generic context.  If
2962         it's NULL, jump to the actual trampoline to fill the runtime
2963         generic context.  Otherwise, return it.
2964
2965         * mini.c: Call the lazy fetch trampoline to get entries out of the
2966         runtime generic context.
2967
2968         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
2969         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
2970         tramp-sparc.c: Stubs for the lazy fetch trampoline.
2971
2972 2008-02-21  Mark Probst  <mark.probst@gmail.com>
2973
2974         * mini.c: Fetch data out of the extensible part of the runtime
2975         generic context instead of calling a helper function.
2976
2977         * generic-sharing.c: Some functions moved into
2978         metadata/generic-sharing.c.  Helper function for fetching other
2979         types now checks and asserts against extensible rgctx (just for
2980         debugging purposes - the helper function isn't called anymore
2981         unless for debugging).
2982
2983 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
2984
2985         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
2986         for tail calls up to the point that the tests in iltests.exe run. Also add a
2987         dummy CKFINITE implementation.
2988         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
2989         needed for trampoline LMF frames.
2990
2991         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
2992         trampoline LMF frames.
2993
2994 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
2995
2996         * mini.c (inline_method): clean any pending loader error when inlining fail.
2997         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
2998
2999 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
3000
3001         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
3002
3003         * aot-runtime.c (decode_patch_info): Ditto.
3004
3005         * mini.c (mono_resolve_patch_target): Ditto.
3006         
3007         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
3008         icall wrappers.
3009
3010         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
3011         
3012         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
3013         if it references an icall address.
3014
3015 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
3016
3017         * cpu-s390x.md: Remove some more unused opcodes.
3018         
3019         * cpu-s390x.md: Remove some unused opcodes.
3020
3021         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
3022         mono_op_imm_to_op ().
3023
3024         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
3025         instead of a switch statement.
3026         
3027         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
3028         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
3029
3030         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
3031         
3032         * mini-codegen.c: Remove unused mono_regstate2_... functions.
3033
3034         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
3035         -1.
3036
3037 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
3038
3039         * driver.c (mono_main): Improve error reporting when an assembly cannot be
3040         opened. Fixes #362607.
3041
3042         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
3043
3044         * iltests.il.in: Add a test for static methods in interfaces.
3045
3046 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
3047
3048         * genmdesc.c (build_table): Fix a crash on older glib versions.
3049
3050         * cpu-sparc.md: Remove some unused opcodes.
3051         
3052         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
3053         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
3054
3055         * cpu-amd64.md: Remove some unused opcodes.
3056
3057         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
3058         like the other opcodes.
3059
3060 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
3061
3062         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
3063
3064         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
3065
3066         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
3067         variables 'cfg' instead of 'm' for consistency.
3068
3069         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
3070
3071         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
3072         argument holding the vtype return address, to avoid the ambigious use of
3073         cfg->ret for this purpose.
3074
3075         * mini.c (NEW_RETLOADA): Use vret_addr if set.
3076
3077         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
3078         
3079         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
3080         new mono_print_ins () function which only takes one argument.
3081
3082 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
3083
3084         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
3085         macro arguments.
3086
3087 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
3088
3089         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
3090
3091         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
3092
3093         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
3094         opcodes and other small changes.
3095
3096         * mini-ops.h: Add some new opcodes from the linear IR branch.
3097
3098         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
3099
3100         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
3101         opcodes, use the REG_MEMBASE opcodes instead.
3102         
3103         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
3104         opcodes, use the REG_MEMBASE opcodes instead.
3105         
3106         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
3107         linear IR branch.
3108
3109         * mini.c (mono_op_imm_to_op): New helper function.
3110
3111         * mini-ops.h: Add some opcodes from linear IR branch.
3112
3113 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
3114
3115         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
3116         <tsv@solvo.ru>.
3117
3118 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
3119
3120         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
3121         OP_ICONV_TO_R4/R8.
3122
3123         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
3124
3125 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
3126
3127         * aot-compiler.c (emit_method_code): Add an assert.
3128
3129         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
3130         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
3131         methods.
3132
3133 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
3134
3135         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
3136         some load/store opcodes so they are consistent. 
3137         (mono_arch_emit_prolog): Simplify some code.
3138
3139         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
3140
3141         * objects.cs: Add tests for large argument offsets on ARM.
3142
3143         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
3144         stack offsets. Fixes #359651.
3145
3146         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
3147
3148         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
3149
3150         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
3151
3152         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
3153
3154         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
3155
3156         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
3157         rid of CEE_CONV_R_UN.
3158
3159         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
3160
3161 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
3162
3163         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
3164
3165         * mini.c (mono_normalize_opcodes): Add some more opcodes.
3166
3167         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
3168
3169         * cpu-amd64.md: Remove some unused opcodes.
3170
3171         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
3172
3173         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
3174
3175         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
3176         arch specific functions for its parts. Call the peephole pass after local
3177         regalloc so the prolog can compute a more accurate max_offset.
3178         
3179         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
3180         the corresponding OP_I/OP_L opcodes.
3181
3182         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
3183
3184         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
3185
3186 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
3187
3188         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
3189         as they are handled in mini.c.
3190
3191         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
3192         
3193         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
3194         case since it is handled in mini.c.
3195
3196         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
3197
3198         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
3199
3200         * *.c: Use the new opcodes in the IR and back end code.
3201
3202         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
3203
3204         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
3205
3206 2008-02-06  Mark Probst  <mark.probst@gmail.com>
3207
3208         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
3209         an assert because it has a race condition.
3210
3211 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
3212
3213         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
3214
3215         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
3216
3217         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
3218
3219         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
3220         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
3221
3222 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
3223
3224         * cpu-amd64.md (move): Correct the maximum size of move.
3225
3226 2008-02-05  Mark Probst  <mark.probst@gmail.com>
3227
3228         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
3229         the generic class init trampoline to return quickly if the class
3230         is already inited.
3231
3232 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
3233
3234         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
3235         issues where an 32 bit callsite cannot be patched by a 64 bit address.
3236
3237 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
3238
3239         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
3240         branch.
3241
3242 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
3243
3244         * objects.cs: Add some soft-float tests.
3245
3246         * mini.c: Fix a couple more soft-float issues.
3247
3248         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
3249
3250         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
3251         avoid a REX prefix.
3252
3253 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
3254
3255         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
3256         exception happens while compiling a virtual method.
3257
3258 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
3259
3260         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
3261         
3262         * mini-sparc.c: Fix build.
3263
3264         * mini-sparc.c (get_call_info): Add support for generic sharing.
3265
3266         * mini-exceptions.c: Add a FIXME.
3267
3268 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
3269
3270         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
3271         altstack handling code.
3272
3273         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
3274         
3275         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
3276
3277         * mini-s390.c: Add support for generic sharing.
3278
3279         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
3280         Fix CAS on s390.
3281         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
3282
3283         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
3284
3285         * mini-s390x.c: Add support for generic sharing.
3286         
3287         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
3288         Fix CAS on ia64.
3289         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
3290
3291         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
3292         can be used since it takes a 16 bit signed immediate.
3293
3294         * inssel-s390x.brg: Fix OP_SETRET.
3295
3296         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
3297
3298         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
3299
3300         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
3301
3302         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
3303
3304         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
3305         in one place.
3306
3307         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
3308         stuff.
3309
3310         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
3311         of the unused mono_arch_patch_delegate_trampoline stuff.
3312
3313 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
3314
3315         * basic-long.cs: Move the fp related tests to basic-float.cs.
3316
3317         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
3318
3319         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
3320
3321         * basic-calls.cs: Add a test for proper float argument passing.
3322
3323         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
3324         if the context corresponds to an exception received through a signal.
3325
3326         * exceptions.cs: Add a test for nullref handling at the start of a try
3327         clause.
3328
3329         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
3330
3331         * jit-icalls.c (mono_break): New JIT icall.
3332
3333         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
3334
3335         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
3336
3337 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
3338
3339         * cpu-*.md: Get rid of unused opcodes.
3340
3341         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
3342
3343         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
3344         by all platforms.
3345
3346         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
3347         define.
3348
3349         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
3350         the arch independent trampoline code in mini-trampolines.c.
3351
3352         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
3353
3354         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
3355
3356         * mini-s390.h: Remove an unused define.
3357         
3358         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
3359         the arch independent trampoline code in mini-trampolines.c.
3360
3361         * mini-arm.c (mono_arch_emit_prolog): Fix build.
3362
3363 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
3364
3365         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
3366
3367         * mini-s390.c (mono_arch_emit_prolog): Fix build.
3368
3369         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
3370
3371         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
3372
3373         * cpu-amd64.md: Use smaller sizes for int opcodes.
3374
3375         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
3376
3377         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
3378         objects.cs.
3379
3380         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
3381         debugging.
3382
3383         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
3384         instead of though a pointer to save an indirection when accessing elements of
3385         the array.
3386
3387         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
3388         some typos.
3389         (NOT_IMPLEMENTED): New helper macro.
3390         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
3391         of a bb.
3392
3393         * *.c: Use the new helper macro.
3394
3395 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
3396
3397         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
3398
3399 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
3400
3401         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
3402         stack slots.
3403
3404 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
3405
3406         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
3407         profiling is enabled.
3408         
3409         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
3410         the end.
3411         (mono_arch_emit_prolog): Add more first bblock optimizations.
3412
3413         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
3414         in order if possible.
3415         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
3416         bblock, since the arguments are still in their original registers.
3417
3418         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
3419
3420 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
3421
3422         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
3423         as well.
3424
3425         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
3426         offset 0.
3427
3428         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
3429
3430         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
3431         process async exceptions received while in unmanaged code.
3432
3433         * mini.c (mini_init): Install a callback with the runtime which will be called
3434         when a thread receives an async exception while in unmanaged code.
3435
3436         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
3437
3438         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
3439
3440 2008-01-16  Wade Berrier  <wberrier@novell.com>
3441
3442         * cpu-g4.md:
3443         * cpu-arm.md:
3444         * cpu-s390x.md:
3445         fix build
3446
3447 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
3448
3449         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
3450         compilation with sun cc.
3451
3452         * cpu-*.md: Fix the build.
3453
3454         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
3455
3456         * mini-amd64.h: Add some comments to the MonoLMF structure.
3457
3458         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
3459         
3460         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
3461         in the LMF structure if possible. This saves two instructions in the
3462         managed->native wrappers.
3463
3464         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
3465
3466 2008-01-16  Mark Probst  <mark.probst@gmail.com>
3467
3468         * generic-sharing.c: New type argument lookup code which uses the
3469         runtime generic context template.
3470
3471 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
3472
3473         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
3474
3475         * mini-arm.c (add_general): Fix arm eabi parameter passing.
3476         (mono_arch_output_basic_block): Fix localloc implementation.
3477
3478         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
3479
3480         * mini-ia64.c (peephole_pass): Fix ia64 build.
3481
3482         * mini-amd64.c (peephole_pass): Fix a warning.
3483         
3484         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
3485         at a constant offset from sp/fp.
3486
3487         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
3488         instead of obtaining it from *lmf in the managed method case.
3489
3490 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
3491
3492         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
3493
3494 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
3495
3496         * mini.h (MonoInstList): New type.
3497         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
3498         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
3499         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
3500         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
3501         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
3502         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
3503         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
3504         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
3505         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
3506         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
3507         MONO_INST_LIST_FOR_EACH_ENTRY,
3508         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
3509         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
3510         mono_inst_list_first, mono_inst_list_last,
3511         mono_inst_list_next, mono_inst_list_prev): New instruction
3512         list handling interfaces.
3513         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
3514         list head 'ins_list'.
3515         (MonoInst): Replace next pointer with list head 'node'.
3516         (MonoCallInst): Make 'out_args' a MonoInstList.
3517         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
3518         (MonoCompile): Delete reverse_inst_list and
3519         reverse_inst_list_len.
3520         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
3521         mono_arch_lowering_pass, mono_arch_local_regalloc,
3522         mono_arch_output_basic_block, mono_arch_emit_prolog):
3523         Convert to new instruction lists.
3524         (insert_after_ins): Delete.
3525         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
3526         instruction lists.
3527         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
3528         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
3529         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
3530         mono_emulate_opcode, mono_emit_load_got_addr,
3531         inline_method, mono_method_to_ir, mono_print_bb_code,
3532         print_dfn, decompose_pass, nullify_basic_block,
3533         replace_out_block_in_code, remove_block_if_useless,
3534         merge_basic_blocks, move_basic_block_to_end,
3535         try_unsigned_compare, optimize_branches, mono_print_code,
3536         mini_select_instructions, remove_critical_edges): Likewise.
3537         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
3538         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
3539         mono_arch_output_basic_block, mono_arch_emit_prolog):
3540         Likewise.
3541         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
3542         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
3543         mono_arch_output_basic_block): Likewise.
3544         (inst_list_prepend, insert_after_ins): Delete.
3545         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
3546         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
3547         instruction lists.
3548         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
3549         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
3550         mono_arch_emit_prolog): Likewise.
3551         * cfold.c (mono_constant_fold): Likewise.
3552         * liveness.c (visit_bb, mono_analyze_liveness,
3553         optimize_initlocals): Likewise.
3554         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
3555         * graph.c (mono_draw_code_cfg): Likewise.
3556         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
3557         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
3558         mono_ssa_cprop): Likewise.
3559         * abcremoval (get_relations_from_previous_bb, process_block):
3560         Likewise.
3561         * local-propagation (mono_cprop_invalidate_values,
3562         mono_local_cprop_bb): Likewise.
3563         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
3564         peephole_pass, mono_arch_output_basic_block,
3565         mono_arch_emit_prolog): Likewise.
3566         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
3567         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
3568         mono_arch_emit_prolog): Likewise.
3569         (insert_after_ins): Delete.
3570         * aliasing.c (print_code_with_aliasing_information,
3571         mono_build_aliasing_information, mono_aliasing_deadce):
3572         Convert to new instruction lists.
3573         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
3574         peephole_pass, NEW_INS, mono_arch_lowering_pass,
3575         mono_arch_local_regalloc, mono_arch_output_basic_block):
3576         Likewise.
3577         (insert_after_ins): Delete.
3578         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
3579         peephole_pass, mono_arch_output_basic_block): Convert to
3580         new instruction lists.
3581         * mini-codegen (InstList, inst_list_prepend,
3582         insert_after_ins): Delete.
3583         (insert_before_ins, get_register_force_spilling,
3584         get_register_spilling, free_up_ireg, free_up_reg,
3585         create_copy_ins, create_spilled_store, alloc_int_reg,
3586         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
3587         to new instruction lists.
3588         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
3589         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
3590         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
3591         (insert_after_ins): Delete.
3592         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
3593         mono_arch_local_regalloc, mono_arch_output_basic_block,
3594         mono_arch_call_opcode): Convert to new instruction lists.
3595         (insert_after_ins): Delete.
3596         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
3597         peephole_pass, mono_arch_output_basic_block,
3598         mono_arch_emit_prolog): Convert to new instruction lists.
3599
3600 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
3601
3602         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
3603
3604         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
3605         Fixes #353182.
3606
3607         * Makefile.am (version.h): Make this work with non-bash shells.
3608
3609 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
3610
3611         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
3612
3613 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
3614
3615         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
3616         the InitializeArray optimization.
3617
3618 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
3619
3620         * mini.c driver.c: Don't include os/gc_wrapper.h.
3621
3622 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
3623
3624         * mini.c (print_jit_stats): Print GC statistics if available.
3625
3626 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
3627
3628         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
3629
3630 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
3631
3632         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
3633
3634 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
3635
3636         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
3637         
3638         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
3639
3640         * driver.c (mono_main): Ditto.
3641
3642 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
3643
3644         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
3645
3646         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
3647         in the vtable can't be encoded.
3648         (compile_method): Ditto.
3649
3650 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
3651
3652         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
3653         defined.
3654
3655         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
3656         lmf->rbp.
3657
3658         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
3659         the top LMF entry belongs to the current method.
3660
3661         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
3662
3663 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
3664
3665         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
3666         
3667         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
3668
3669         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
3670
3671         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
3672
3673         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
3674
3675         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
3676         implementation.
3677
3678         * basic-float.cs: Add an ulong->double cast test.
3679
3680 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
3681
3682         * mini.c (mono_method_to_ir): Fix a warning.
3683
3684 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
3685
3686         * mini-ops.h: Add OP_SWITCH.
3687
3688         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
3689         CEE_SWITCH in back-end code, use OP_SWITCH instead.
3690
3691 2007-12-11  Geoff Norton  <gnorton@novell.com>
3692
3693         * mini-s390x.c: Minor change to the MAX() define to allow
3694         it to compile with other gcc versions.
3695
3696 2007-12-11  Geoff Norton  <gnorton@novell.com>
3697
3698         * cpu-s390x.md:
3699         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
3700
3701 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
3702
3703         exceptions-arm.c (mono_arch_get_restore_context): Restore
3704         the frame pointer.
3705
3706         exceptions-arm.c (throw_exception): Save the frame pointer.
3707         This is a partial fix for #323747. Only the client side is
3708         fixed.
3709
3710 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
3711
3712         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
3713         was using an unrelated variable to log the class which
3714         needed the cctor to be called. This was crashing on arm.
3715
3716 2007-12-09  Robert Jordan  <robertj@gmx.net>
3717
3718         * mini-x86.c (mono_arch_emit_epilog):
3719         Consider all kinds of 64-bit types. Fixes #323114.
3720
3721 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
3722
3723         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
3724
3725 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
3726
3727         * mini-amd64.c (peephole_pass): Add a missing instruction check.
3728
3729 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
3730
3731         * mini.c: run type ctor before allocating an object, not only
3732         when running it's constructor method (fixes at least part of bug #342507).
3733
3734 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
3735         
3736         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
3737         
3738         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
3739         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
3740         function.
3741
3742         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
3743         mono_generic_class_init_trampoline () the same as it is done with the other
3744         trampolines.
3745
3746         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
3747         aot-runtime.c aot-compiler.c: Implement AOT support.    
3748
3749 2007-12-07  Mark Probst  <mark.probst@gmail.com>
3750
3751         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
3752         build for archs which don't have the vtable trampoline defined
3753         yet.
3754
3755 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
3756
3757         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
3758
3759         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
3760
3761         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
3762
3763         * tramp-<ARCH>.c: Use the new helper function.
3764
3765 2007-12-07  Mark Probst  <mark.probst@gmail.com>
3766
3767         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
3768         trampoline call, which takes a vtable argument.
3769
3770         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
3771         OP_TRAMPCALL_VTABLEs like other calls.
3772
3773         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
3774         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
3775         call.  Implemented a support function which fetches the vtable
3776         from a register set.
3777
3778         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
3779         Implemented a generic class init trampoline, using the
3780         OP_TRAMPCALL_VTABLE opcode.
3781
3782         * mini.c: Implemented static field access when sharing generic
3783         code.  This implies initing the class using the new
3784         OP_TRAMPCALL_VTABLE call.
3785
3786 2007-12-07  Mark Probst  <mark.probst@gmail.com>
3787
3788         * mini.c: Don't compile methods with sharing enabled if their
3789         classes are disabled for sharing.
3790
3791 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
3792
3793         * inssel.brg: Add a missing sign extension to the GETCHR and array access
3794         opcodes. Fixes #346563.
3795
3796         * objects.cs: Add a new test.
3797
3798         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
3799
3800         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
3801         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
3802
3803 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
3804
3805         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
3806
3807 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
3808
3809         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
3810         code stream.
3811
3812 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
3813
3814         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
3815
3816         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
3817         optimization in the AOT case.
3818         
3819 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
3820
3821         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
3822         
3823         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
3824
3825         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
3826
3827         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
3828
3829         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
3830         is created by the inlined delegate ctor.
3831
3832         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
3833
3834         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
3835
3836 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
3837
3838         * cpu-x86.md: Fix the length of ckfinite.
3839
3840 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
3841
3842         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
3843         
3844         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
3845         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
3846
3847         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
3848
3849         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
3850         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
3851
3852 2007-11-28  Martin Baulig  <martin@ximian.com>
3853
3854         * mini-x86.c
3855         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
3856         after creating the trampoline.
3857
3858 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
3859
3860         * aot-runtime.c (load_aot_module): Check runtime version if needed.
3861
3862         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
3863         the same version.
3864
3865         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
3866         instead of the calling method to help AOT.
3867
3868         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
3869
3870 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
3871
3872         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
3873         is defined.
3874
3875 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
3876
3877         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
3878         
3879         * aot-compiler.c (compile_method): Correct check for generic method definitions.
3880         (encode_method_ref): No need to handle generic method definitions specially.
3881
3882         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
3883
3884         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
3885         decode_klass_info.
3886
3887         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
3888         encode_klass_info.
3889         (compile_method): Enable generic sharing.
3890
3891 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
3892
3893         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
3894         (mini_method_compile): Add preliminary support for AOTing shared generic code.
3895
3896         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
3897         generic code.
3898
3899         * mini-trampolines.c: Fix a warning.
3900
3901         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
3902         NEW_PCONST.
3903         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
3904         (generic_class_is_reference_type): Remove unused function.
3905
3906         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
3907         in the generic vtable trampoline case.
3908
3909         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
3910         
3911         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
3912         return an AOT method based on a vtable slot.
3913
3914         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
3915
3916         * mini.c (mini_get_vtable_trampoline): Export this.
3917
3918 2007-11-22  Martin Baulig  <martin@ximian.com>
3919
3920         * debug-debugger.h
3921         (MonoDebuggerInfo): Move `debugger_version' up.
3922
3923 2007-11-22  Martin Baulig  <martin@ximian.com>
3924
3925         * mini-amd64.c
3926         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
3927
3928         * mini-trampolines.c
3929         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
3930         after compiling the method.
3931
3932 2007-11-20  Martin Baulig  <martin@ximian.com>
3933
3934         * debug-mini.c
3935         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
3936         (mono_debugger_remove_breakpoint): Likewise.
3937         (mono_debugger_check_breakpoints): Likewise.
3938
3939         * debug-debugger.c: Implement the new breakpoint interface here.
3940
3941 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
3942
3943         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
3944         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
3945
3946         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
3947
3948 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
3949
3950         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
3951
3952         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
3953         mini.c.
3954
3955         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
3956         mini.c.
3957
3958         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
3959         returning a vtype in a register.
3960
3961         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
3962         here from the arch specific code.
3963
3964         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
3965         mini.c.
3966
3967         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
3968         (mono_arch_emit_prolog): Increment maximum prolog size.
3969
3970         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
3971         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
3972
3973         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
3974         MonoGenericSharingContext.
3975
3976         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
3977         MonoGenericSharingContext. Allocate memory from the cfg mempool.
3978
3979 2007-11-15  Mark Probst  <mark.probst@gmail.com>
3980
3981         * mini.c, mini.h, generic-sharing.c: Functions for producing code
3982         which extract fields out of the runtime generic context.  Full
3983         sharing of the NEWARR opcode.
3984
3985 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
3986
3987         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
3988         --enable-minimal=ssa.
3989
3990 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
3991
3992         * mini-trampolines.c (mono_delegate_trampoline): Update after 
3993         mono_marshal_get_delegate_invoke () signature change.
3994
3995 2007-11-13  Mark Probst  <mark.probst@gmail.com>
3996
3997         * mini.c: Removed the shared context in favor of the generic
3998         sharing context.  Allocate the MonoJitInfo structure with room for
3999         the generic sharing context if it's needed.
4000
4001         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
4002         domain-internals.h now.
4003
4004         * mini-x86.c: Pass the generic sharing context to get_call_info ().
4005
4006         * generic-sharing.c: Several changes for working without a shared
4007         context and instead operating on open types instead.
4008
4009 2007-11-12  David S. Miller  <davem@davemloft.net>
4010
4011        * inssel-sparc.brg: Fix double instruction emit.
4012
4013 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
4014
4015         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
4016         Get/Set/Address methods.
4017         
4018         * mini.c debug-debugger.c mini-trampolines.c: Update after 
4019         mono_marshal_get_delegate_invoke signature change.
4020
4021 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
4022
4023         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
4024         This can happens with dynamic methods. Fixes the other bug in #322722.
4025
4026 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
4027
4028         * tramp-arm.c (mono_arch_patch_callsite): Support patching
4029         BX call sequence.
4030
4031         * mini-arm.c (arm_patch): Implement patching of BX call
4032         sequence. Fixes one of the bugs in #322722.
4033
4034 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
4035
4036        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
4037        under Linux.  We only need to flush every 32-byte cache line.    
4038
4039 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
4040
4041         * mini.c:
4042         move_basic_block_to_end: Add branches when needed, eventually creating
4043         a new BB.
4044         optimize_branches: added a parameter that tells if it's ok to create
4045         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
4046         and avoid calling move_basic_block_to_end when it's not ok.
4047         Fixes bug 318677.
4048
4049 2007-11-07  Mark Probst  <mark.probst@gmail.com>
4050
4051         * mini.c: Abort inlining call to InitializeArray if something
4052         looks wrong.  Let the icall handle it, which now has proper safety
4053         checks.
4054
4055 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
4056
4057         * mini.c (mono_spill_call): add support for soft-float.
4058
4059         * mini.c (mono_method_to_ir): add support for soft-float
4060         to inlined functions that return float.
4061
4062         * mini.c (mono_method_to_ir): add support for soft-float
4063         to cee_stsfld opcode on float fields.
4064
4065 2007-11-05  Geoff Norton  <gnorton@novell.com>
4066
4067         * mini-x86.h: Fix the structure access for X86 Leopard.
4068
4069
4070 2007-11-05  Martin Baulig  <martin@ximian.com>
4071
4072         * mini-trampolines.c
4073         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
4074         after compiling the method to notify the debugger.
4075
4076 2007-11-05  Martin Baulig  <martin@ximian.com>
4077
4078         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
4079
4080 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
4081
4082         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
4083         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
4084
4085 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
4086
4087         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
4088         native-to-managed wrappers.
4089         
4090 2007-11-01  Geoff Norton  <gnorton@novell.com>
4091
4092         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
4093         members.
4094
4095 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
4096
4097         * mini.c, mini-x86.c: when getting back from unmanaged code
4098         to managed via a marshaled delegate we also need to set the
4099         right domain.
4100
4101 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
4102
4103         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
4104         for amd64.
4105
4106 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
4107
4108         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
4109         let the debugger or other external agents to tell the JIT when
4110         a sw breakpoint has been inserted in the code that the JIT needs
4111         to be able to inspect.
4112
4113 2007-10-31  Martin Baulig  <martin@ximian.com>
4114
4115         * debug-debugger.h
4116         (MonoDebuggerInfo): Remove `runtime_class_init'.
4117
4118 2007-10-30  Martin Baulig  <martin@ximian.com>
4119
4120         * debug-mini.h
4121         (mono_debugger_thread_created): Added `MonoThread *' argument.
4122         (mono_debugger_extended_notification): New public method.
4123         (mono_debugger_trampoline_compiled): New public method.
4124
4125         * debug-mini.c
4126         (MonoDebuggerThreadInfo): Added `thread' and
4127         `extended_notifications' fields.
4128
4129         * debug-debugger.c
4130         (debugger_executable_code_buffer): New static variable.
4131
4132         * debug-debugger.h
4133         (MonoDebuggerInfo): Added `executable_code_buffer',
4134         `executable_code_buffer_size', `breakpoint_info_area',
4135         `breakpoint_table' and `breakpoint_table_size'.
4136
4137 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
4138
4139         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
4140         that IP  either is an unused value or the vtable pointer. IMT 
4141         calls use vtable + offset now. Reduced by almost half the size
4142         of IMT entries.
4143
4144 2007-10-26  Jonathan Chambers <joncham@gmail.com>
4145
4146         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
4147         defines to access param registers. Replace long usage with
4148         gsize as sizeof(long) != sizeof(void*) on Win64.
4149
4150         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
4151         on Win64. Fix intrinsic, use _AddressOfReturnAddress
4152         instead of non-existant _GetAddressOfReturnAddress.
4153
4154         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
4155         param registers. Save/restore %rdi and %rsi in MonoLMF.
4156
4157         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
4158         param registers. Modify (throw_exception) signature to take 
4159         %rdi and %rsi on Win64. 
4160
4161         Code is contributed under MIT/X11 license.
4162
4163 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
4164
4165         * helpers.c: unlink debugging output files.
4166
4167 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
4168
4169         * mini.c: Move mono_create_ftnptr () to object.c.
4170
4171 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
4172
4173         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
4174         optional. This function can now be used to disassemble code generated
4175         outside the JIT such as trampolines and IMT thunks.
4176
4177         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
4178
4179         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
4180         vtable pointer from a ldr instruction.
4181
4182         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
4183         new IMT call sequence.
4184
4185         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
4186         call sequence for interface invocations.
4187
4188         * mini-arm.c (mono_arch_emit_imt_argument): added, required
4189         for imt support. This function is empty since IMT on ARM requires no
4190         special handling on the IR side.
4191
4192         * mini-arm.c (mono_arch_find_imt_method): added, required for
4193         imt support.
4194
4195         * mini-arm.c (mono_arch_find_this_argument): added, required
4196         for imt support.
4197
4198         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
4199         a ldr instruction to load a value stored in the code stream.
4200
4201         * mini-arm.c (mono_arch_build_imt_thunk):added, required
4202         for imt support.
4203
4204
4205 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
4206
4207         * mini.c (mini_init): Install the jump trampoline callback.
4208
4209 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4210
4211         * mini-trampolines.c: handle synchronized methods with the common
4212         vtable trampoline (bug #335601).
4213
4214 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
4215
4216         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
4217
4218         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
4219         64 bit platforms.
4220
4221         * mini-ia64.h mini-ia64.c: Add support for IMT.
4222
4223         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
4224         prolog. Fixes #331958.
4225
4226 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
4227
4228         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
4229
4230 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4231
4232         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
4233         trampoline.
4234
4235 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4236
4237         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
4238         trampoline.
4239
4240 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
4241
4242         * mini-x86.c, mini-x86.h: x86 support for the common vtable
4243         trampoline.
4244
4245 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
4246
4247         * mini-trampolines.c: changed the magic rampoline to understand
4248         the common vtable trampoline method: the method to invoke is
4249         determined by the vtable displacement of the call.
4250
4251 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
4252
4253         * mini.c, mini.h: register the common vtable trampoline if the
4254         architecture supports it.
4255
4256 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4257
4258         * cpu-amd64.md: use the correct max length for tls_get.
4259
4260 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
4261
4262         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
4263         CEE_STELEM_ANY. Fixes #333696.
4264
4265 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
4266
4267         * exceptions-x86.c: provide more graceful handling of the case where
4268         we followed a bogus function pointer from managed code (bug #332866).
4269
4270 2007-10-11  Mark Probst  <mark.probst@gmail.com>
4271
4272         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
4273         replaces the generic_shared flag and will carry more information
4274         in the future.
4275
4276         * generic-sharing.c: Added mini_type_stack_size() which allows
4277         allows open types if given a generic sharing context.
4278         mini_get_basic_type_from_generic() takes a
4279         MonoGenericSharingContext* instead of a MonoCompile* now.
4280
4281         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
4282         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
4283         mini-sparc.c, mini-x86.c: Trivial changes required by the two
4284         changes above.  Just passing arguments through to the right
4285         places.
4286
4287 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
4288
4289         * mini-arm.c: unify the call emission to emit_code_seq().
4290
4291 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
4292
4293         * tramp-arm.c: reduced the trampoline size.
4294
4295 2007-10-10  Mark Probst  <mark.probst@gmail.com>
4296
4297         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
4298         variable handling out of arch-specific code.
4299
4300 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
4301
4302         * mini-arm.c: implemented fast delegate dispatch.
4303
4304 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
4305
4306         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
4307         that fp elimination is turned off if the space required by locals is too
4308         big. Fixes #331958.
4309
4310 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
4311
4312         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
4313         ARM to the new style trampoline.
4314
4315 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
4316
4317         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
4318
4319         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
4320
4321 2007-10-09  Martin Baulig  <martin@ximian.com>
4322
4323         * debug-debugger.h
4324         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
4325         `field_info_offset_offset'.     
4326
4327 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
4328
4329         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
4330         removed more internal usage of the r11 register and made it available
4331         to the register allocator.
4332
4333 2007-10-08  Mark Probst  <mark.probst@gmail.com>
4334
4335         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
4336         when sharing generics and treat type variables as references.
4337
4338 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
4339
4340         * mini-ppc.c: started removing the internal uses of register r11
4341         to eventually allow the register allocator to manage it as an
4342         additional available register.
4343
4344 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
4345
4346         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
4347
4348 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
4349
4350         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
4351         specific trampolines as they are not performance critical as a jump
4352         target (maybe align as before only for AOT code?). This saves about
4353         200 KB of native code on x86 for monodevelop startup.
4354
4355 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
4356
4357         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
4358         monodevelop startup.
4359
4360 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
4361
4362         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
4363
4364         * mini-sparc.h mini-sparc.c: Implement IMT support.
4365
4366         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
4367         its smaller and doesn't clobber sparc_g1.
4368
4369         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
4370
4371 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
4372
4373         * mini-ppc.c: optimized the size of the IMT thunks a bit.
4374
4375 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
4376
4377         * mini-ppc.c: implemented fast delegate invocation.
4378
4379 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
4380
4381         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
4382
4383 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
4384
4385         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
4386         code to the new style trampoline in preparation for IMT support.
4387
4388 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
4389
4390         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
4391         systems already. This also reduces the specific trampiline sizes and
4392         prepares for the use of r12 as the IMT identifier register.
4393
4394 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4395
4396         * mini-mips.h: endianess fix (simplified from a patch by
4397         Thomas Kunze <thommy@tabao.de>, bug #323737).
4398
4399 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
4400
4401         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
4402         to access ucontext fields and enable netbsd support
4403         (partially from Magnus Henoch <mange@freemail.hu>).
4404
4405 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4406
4407         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
4408         use the preprocessor from the CPP env var if it is set.
4409
4410 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
4411
4412         * mini-trampolines.c: fixed an assertion and moved it earlier in the
4413         code, before interface_offset gets used.
4414
4415 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
4416
4417         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
4418         mono_class_setup_vtable () before accessing klass->vtable.
4419
4420 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
4421
4422         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
4423         hackish.
4424
4425 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4426
4427         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
4428         IMT slots (this saves hundreds of KB of memory in programs like
4429         IronPython and Monodevelop).
4430
4431 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
4432
4433         * mini.c: print the delegate counter.
4434
4435 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
4436
4437         * mini-x86.c: make it easier to enable the debugging code for IMT
4438         slots.
4439
4440 2007-09-28  Martin Baulig  <martin@ximian.com>
4441
4442         * debug-debugger.h
4443         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
4444         `mono_method_klass_offset' and `mono_method_token_offset'.
4445
4446 2007-09-20  Mark Probst  <mark.probst@gmail.com>
4447
4448         * mini.c: First generics sharing implementation.  Can only share
4449         in very simple cases.  If sharing doesn't work it falls back to
4450         dedicated compilation.
4451
4452         * mini.h: Flag in MonoCompile to specify whether generic
4453         compilation is shared.  Flags enum for marking which generic inst
4454         of a context is used.  Prototypes for helper functions.
4455
4456         * generic-sharing.c: Helper functions for generic method sharing.
4457
4458         * optflags-def.h: Optimization flag (gshared) for enabling generic
4459         method sharing added.
4460
4461         * Makefile.am: generic-sharing.c added.
4462
4463 2007-09-19 Daniel Nauck <dna@mono-project.de>
4464
4465         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
4466
4467 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
4468         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
4469         fixes bug 325507.
4470
4471 2007-09-19  Martin Baulig  <martin@ximian.com>
4472
4473         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
4474         mono_debug_cleanup() is now part of mono_cleanup().
4475
4476 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
4477
4478         * driver.c (mono_main): Fix a warning.
4479
4480 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
4481
4482         * aot-compiler.c: Optimize various parts when processing large assemblies.
4483         Fixes ##325568.
4484
4485         * mini.c (mono_patch_info_hash): Improve hash function.
4486
4487 2007-09-14  Jonathan Chambers <joncham@gmail.com>
4488
4489         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
4490         
4491         Code is contributed under MIT/X11 license.
4492
4493 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
4494
4495         * mini.c (mini_init): Fix a leak.
4496
4497         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
4498
4499 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
4500
4501         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
4502
4503 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
4504
4505         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
4506
4507 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
4508
4509         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
4510         variance tests.
4511
4512         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
4513
4514         * mini.c (handle_alloc): Enable managed allocators in AOT code.
4515
4516         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
4517
4518         * aot-runtime.c (decode_patch_info): Ditto.
4519
4520 2007-09-12  Jonathan Chambers <joncham@gmail.com>
4521
4522         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
4523         static case. Cache delegates in architecture specific code, 
4524         based on number of parameters.
4525         
4526         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
4527         in architecture specific code, based on number of parameters.
4528         
4529         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
4530         caching happen in architecture specific code now.
4531         
4532         Code is contributed under MIT/X11 license.
4533
4534 2007-09-12  Jonathan Chambers <joncham@gmail.com>
4535
4536         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
4537         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
4538         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
4539
4540         Code is contributed under MIT/X11 license.
4541
4542 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
4543         * mini.c: (mono_thread_abort) Fixed bug #82416.
4544
4545 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
4546
4547         * mini.: hook the new managed GC allocation feature into the JIT.
4548
4549 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
4550
4551         * mini.c: implementation for the new runtime tls opcode.
4552
4553 2007-09-11  Martin Baulig  <martin@ximian.com>
4554
4555         * debug-debugger.h
4556         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
4557         `mono_method_inflated_offset'.
4558
4559 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
4560
4561         * driver.c mini.h mini.c: Add a new devel command line option for injecting
4562         async exceptions into a method.
4563
4564         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
4565         purpose of testing whenever the unwinder works at every instruction.
4566
4567 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
4568
4569         * mini.c: check accessibility of method used in ldftn (fixes
4570         bug #82635).
4571
4572 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
4573
4574         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
4575
4576         * inssel.brg: Fix a warning.
4577
4578 2007-09-03  Martin Baulig  <martin@ximian.com>
4579
4580         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
4581         now takes the `main_method' as argument.
4582
4583 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
4584
4585         * cpu-sparc.md (endfilter): Add missing src1:i argument.
4586
4587 2007-08-30  Jonathan Chambers <joncham@gmail.com>
4588
4589         * driver.c: include the cil-coff.h header on Windows.
4590         
4591         Code is contributed under MIT/X11 license.
4592
4593 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
4594
4595         * mini.c, driver.c: don't include the cil-coff.h header.
4596
4597 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
4598
4599         * mini.c: flag places that needs fixes fo soft-float support.
4600
4601 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
4602
4603         * mini.h, inssel-float.brg: fix soft-float constant loads on big
4604         endian systems (partially from Dean Jenkins, bug #81924).
4605
4606 2007-08-28  Mark Probst  <mark.probst@gmail.com>
4607
4608         * mini.c (check_linkdemand): Remove embedded reference object in
4609         call to LinkDemandSecurityException.
4610         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
4611         with an IntPtr instead of a reference object.
4612
4613 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
4614
4615         * mini.c (handle_initobj): Handle alignment properly.
4616
4617         * inssel.brg (mini_emit_memset): Ditto. 
4618
4619         * inssel.brg (mini_emit_memcpy): Ditto. 
4620
4621         * inssel-sparc.brg: Ditto.              
4622
4623         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
4624
4625 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
4626
4627         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
4628         exceptions raised in unmanaged code. Fixes part of #82594.
4629
4630 2007-08-24  Mark Probst  <mark.probst@gmail.com>
4631
4632         * mini.c (mono_method_to_ir), declsec.c
4633         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
4634
4635 2007-08-22  Martin Baulig  <martin@ximian.com>
4636
4637         * debug-mini.h
4638         (MonoDebuggerThreadInfo): New typedef.
4639         (mono_debugger_thread_table): New global variable.
4640         (mono_debugger_thread_created): New public function.
4641         (mono_debugger_thread_cleanup): New public function.
4642
4643         * debug-debugger.h
4644         (MonoDebuggerInfo):
4645         - removed `get_current_thread' and `lookup_assembly'.
4646         - removed `data_table'.
4647         - added `thread_table'.
4648
4649         * mini.c
4650         (mono_thread_start_cb): Call mono_debugger_thread_created().
4651         (mono_thread_attach_cb): Likewise.
4652         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
4653         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
4654         initial domain.
4655
4656         * driver.c (mono_main): Move mono_debug_init() up, before calling
4657         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
4658
4659 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
4660
4661         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
4662         together when passing several arguments of type double (gives a small
4663         speedup and saves a few bytes of generated code).
4664
4665 2007-08-20  Jb Evain  <jbevain@novell.com>
4666
4667         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
4668
4669 2007-08-20  Jb Evain  <jbevain@novell.com>
4670
4671         * mini.c (mono_method_to_ir): throw MethodAccessException
4672         and FieldAccessException instead of InvalidProgramException.
4673
4674 2007-08-20  Mark Probst  <mark.probst@gmail.com>
4675
4676         * mini.c: CoreCLR security checks.
4677
4678         * mini.h: Removed MonoSecurityMode (moved to
4679         metadata/security-manager.h) and mono_security_mode global var
4680         (replaced by set/get functions in security-manager.h).
4681
4682         * driver.c: Added "core-clr-test" security mode for testing.  Used
4683         set-function for setting security mode.
4684
4685 2007-08-17  Mark Probst  <mark.probst@gmail.com>
4686
4687         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
4688         the new jit_info_table.
4689
4690         * driver.c: Test code for the new jit_info_table (enabled by the
4691         define MONO_JIT_INFO_TABLE_TEST).
4692
4693 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
4694
4695         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
4696         detection of call <REG> instruction sequence. Fixes build on freebsd.
4697
4698 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
4699
4700         * mini-exceptions.c: Fix a warning.
4701
4702 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
4703
4704         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
4705         stack overflow handling code on amd64 too.
4706
4707         * mini-exceptions.c (mono_setup_altstack): Make this use 
4708         mono_thread_get_stack_bounds ().
4709
4710         * mini-x86.h: Disable sigaltstack on solaris x86.
4711
4712 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
4713
4714         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
4715
4716 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
4717
4718         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
4719
4720 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
4721
4722         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
4723
4724         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
4725
4726 2007-08-03  Neale Ferguson <neale@sinenomine.net>
4727
4728         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
4729         due to alignment.
4730
4731 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
4732
4733         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
4734         to be emitted (bug #82281).
4735
4736 2007-08-01  Martin Baulig  <martin@ximian.com>
4737
4738         Merged the `debugger-dublin' branch.
4739
4740         * debug-debugger.h (MonoDebuggerInfo):
4741         Removed the `old_*' compatibility entries.
4742         Added `debugger_version' and `data_table'.
4743         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
4744         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
4745
4746         * debug-mini.c
4747         (MiniDebugMethodBreakpointInfo): Add `address_list'.
4748         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
4749         instead of a `gconstpointer'.
4750         (mono_debugger_insert_method_breakpoint): Return a
4751         `MonoDebugMethodAddressList *'.
4752
4753 2007-06-28  Martin Baulig  <martin@ximian.com>
4754
4755         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
4756
4757 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
4758
4759         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
4760         __builtin_frame_address () since it is broken on older gcc versions.
4761
4762 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
4763
4764         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
4765         on the stack overflow handling and made the managed stack overflows
4766         catchable in most cases using soft guard pages.
4767         * exceptions-x86.c: added code to restore the protection in the soft
4768         guard pages at the end of exception handling.
4769
4770 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
4771
4772         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
4773
4774 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
4775
4776         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
4777         exception handling.
4778
4779 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
4780
4781         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
4782         signal handling support until it has been ported to the new mechanism.
4783         * mini.c: fixed stack overflow detection and use the new
4784         architecture code  to handle signals on the altstack.
4785
4786 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
4787
4788         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
4789         stack overflows on the alt stack.
4790
4791 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
4792
4793         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
4794         stack overflows on the alt stack.
4795
4796 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
4797
4798         * exceptions-ppc.c: cleanup preparing for altstack support.
4799
4800 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
4801
4802         * exceptions-arm.c: cleanup preparing for altstack support.
4803
4804 2007-07-27  Mark Probst  <mark.probst@gmail.com>
4805
4806         * mini.c (print_jit_stats): Output hazard pointer stats.
4807
4808 2007-07-26  Mark Probst  <mark.probst@gmail.com>
4809
4810         * driver.c, mini.c: Replaced security mode flags with a single
4811         enum variable.
4812
4813 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
4814
4815         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
4816
4817 2007-07-25  Mark Probst  <mark.probst@gmail.com>
4818
4819         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
4820         (which doesn't do anything yet) for activating Core CLR
4821         (Silverlight) security.
4822
4823 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
4824
4825         * mini-codegen.c: work around a possible gcc bug on arm.
4826
4827 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
4828
4829         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
4830         message for platforms that don't support AOT compilation.
4831
4832 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
4833
4834         * mini.h, mini.c, driver.c: temporary smcs hack.
4835
4836 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
4837
4838         * mini-arm.h, mini-arm.c: arm EABI fixes.
4839
4840 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
4841
4842         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
4843         case.
4844
4845         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
4846         trampolines taking a method argument.
4847
4848         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
4849
4850         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
4851         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
4852
4853         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
4854         JIT compilation throws an exception. Fixes #82050.
4855
4856 2007-07-19  Mark Probst  <mark.probst@gmail.com>
4857
4858         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
4859         with the MONO_EXCEPTION_ defines.
4860
4861 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
4862
4863         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
4864         #82117.
4865         
4866         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
4867         the cause of an assertion.
4868
4869 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
4870
4871         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
4872         removed.
4873
4874 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
4875
4876         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
4877         assert. Should fix #82103.
4878
4879 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
4880
4881         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
4882         here too. Fixes #82095.
4883
4884         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
4885         addresses.
4886
4887         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
4888
4889         * mini-amd64.h: Enable IMT for amd64.
4890         
4891         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
4892
4893 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
4894
4895         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
4896
4897 2007-07-12  Mark Probst  <mark.probst@gmail.com>
4898
4899         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
4900         as soon as check_linkdemand sets an exception_type.
4901
4902 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
4903
4904         * mini-x86.c: fixed offsets for IMT call sequence.
4905         * mini-x86.h: enable IMT again.
4906
4907 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
4908
4909         * trace.c (mono_trace_enter_method): Decode MonoType too.
4910
4911         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
4912
4913         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
4914
4915         * mini-amd64.c: Add preliminary IMT implementation.
4916         
4917 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
4918
4919         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
4920         understand the new IMT-base interface invocation (thanks to
4921         Daniel Nauck for the report and the remote debugging session).
4922
4923 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
4924
4925         * mini-x86.c: size and speed optimizations for the IMT bsearch.
4926
4927 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
4928
4929         * Makefile.am (aotcheck): Make this actually use the AOTed code.
4930
4931 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
4932
4933         * mini-trampolines.c: implement AOT IMT support.
4934         * mini-x86.h: enable IMT support for wider testing.
4935
4936 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
4937
4938         * inssel.brg (emit_imt_argument): Add aot support here.
4939
4940         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
4941
4942 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
4943
4944         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
4945         of the IMT implementation, partially from massi, with my
4946         implementation of the bsearch sequence. Disabled by default until
4947         the AOT code is implemented.
4948
4949 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
4950
4951         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
4952
4953         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
4954
4955 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
4956
4957         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
4958         arch-independent IMT JIT code from Massimiliano
4959         Mantione (massi@ximian.com) with small cleanups from me.
4960
4961 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
4962
4963         * Makefile.am: fix svn invocation to get the svn revision to be
4964         independent of the local language (build fix).
4965
4966 2007-07-09  Mark Probst  <mark.probst@gmail.com>
4967
4968         * mini.c (inline_method): Reset cfg->exception_type if the
4969         inlining is aborted.  Fixes: 82049.
4970
4971 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
4972
4973         * mini.c: remove assert from exception handling code when exception_ptr
4974         is not set.
4975
4976 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
4977
4978         * mini.c (mono_codegen): Add an assert.
4979
4980         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
4981         enter and leave code.
4982         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
4983
4984 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4985
4986         * mini-ppc.c: fixed memory corruption for localloc(0)
4987         (bug #81852).
4988
4989 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
4990         
4991         * mini.c: Fix warnings.
4992
4993 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
4994
4995         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
4996         to emit better double->int conversions.
4997
4998 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
4999
5000         * mini.c: the provided Min/Max optimizations are valid for unisgned
5001         ints.
5002
5003 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
5004
5005         * 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
5006
5007 2007-06-28  Miguel de Icaza  <miguel@novell.com>
5008
5009         * mini.c (mono_running_on_valgrind): Add support for reporting the
5010         method and  its boundaries to valgrind.
5011
5012 2007-06-28  Martin Baulig  <martin@ximian.com>
5013
5014         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
5015
5016 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
5017
5018         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
5019
5020         * generic.2.cs: Add new test case.
5021
5022 2007-06-25  Martin Baulig  <martin@ximian.com>
5023
5024         Merged the `debugger-dublin' branch.
5025
5026         * debug-mini.c
5027         (mono_debugger_insert_method_breakpoint): New public method.
5028         (mono_debugger_remove_method_breakpoint): Likewise.
5029         (mono_debugger_check_breakpoints): New static method.
5030         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
5031
5032         * debug-debugger.h (MonoDebuggerInfo):
5033         Renamed (to keep backward compatibility in the vtable):
5034         `insert_breakpoint' -> `old_insert_breakpoint'.
5035         `remove_breakpoint' -> `old_remove_breakpoint'.
5036         `create_string' -> `old_create_string'.
5037         `lookup_class' -> `old_lookup_class'.
5038         `lookup_type' -> removed; changed into a dummy field.
5039         `lookup_assembly' -> `old_lookup_assembly'.
5040         Added (same functionality, but different signature):
5041         `create_string', `lookup_class', `lookup_assembly'
5042         Added new:
5043         `get_method_addr_or_bpt', `remove_method_breakpoint',
5044         `runtime_class_init'.
5045
5046         * debug-debugger.c: Merged the `debugger-dublin' branch.
5047
5048 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
5049
5050         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
5051         well.
5052         (peephole_pass): Likewise.
5053
5054 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
5055
5056         * driver.c: hopefully make setaffinity work also for ancient
5057         versions of linux.
5058
5059 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
5060
5061         * driver.c : win32 build fix.
5062
5063 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
5064
5065         * driver.c: check for the MONO_NO_SMP env var and bind to a single
5066         processor if it is set.
5067
5068 2007-06-21  Martin Baulig  <martin@ximian.com>
5069
5070         * debug-mini.h: New file.
5071
5072         * debug-mini.c
5073         (mono_debugger_insert_breakpoint_full): Moved here from
5074         ../metadata/mono-debug-debugger.c.
5075         (mono_debugger_remove_breakpoint): Likewise.
5076         (mono_debugger_breakpoint_callback): Likewise.
5077
5078 2007-06-15  Raja R Harinath  <rharinath@novell.com>
5079
5080         * jit-icalls.c (mono_helper_compile_generic_method): Update to
5081         changes in MonoGenericClass.
5082
5083 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
5084
5085         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
5086
5087 2007-06-14  Raja R Harinath  <rharinath@novell.com>
5088
5089         * jit-icalls.c (mono_helper_compile_generic_method): Update to
5090         removal of MonoGenericMethod.
5091
5092 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5093
5094         * mini-exceptions.c: hooks for the exception events profiling API.
5095
5096 2007-06-14  Randolph Chung  <tausq@debian.org>
5097
5098         * Makefile.ma: Add hppa target.
5099         * mini-arch.h: Include mini-hppa.h
5100         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
5101         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
5102         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5103
5104 2007-06-14  Randolph Chung  <tausq@debian.org>
5105
5106         * inssel.brg: Add rules for "chained" compare-branch operations so that
5107         a single compare op can affect multiple branches.  Adjust cost for
5108         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
5109         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
5110         cost for some rules so that they can more easily be overridden by
5111         per-arch rules (with fixes from lupus).
5112         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5113
5114 2007-06-13  Randolph Chung  <tausq@debian.org>
5115
5116         * mini-ops.h: Reorder branch ops so that they match the order of the
5117         corresponding CEE_* ops.  The code expects them this way.
5118         Add new ops for HPPA target.
5119         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5120
5121 2007-06-13  Randolph Chung  <tausq@debian.org>
5122
5123         * mini-exceptions.c: Handle cases where the stack grows towards
5124         larger addresses.
5125         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5126
5127 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
5128
5129         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
5130         counter.
5131         * driver.c: explain where a non-matching corlib is found.
5132
5133 2007-06-13  Mark Probst  <mark.probst@gmail.com>
5134
5135         * mini.c (print_jit_stats): Output dynamic code allocation stats.
5136
5137 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
5138
5139         * mini-exceptions.c: Generate a method profile leave event during
5140         an exception to ensure that the profiler gets notified.
5141
5142 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
5143
5144         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
5145         branch.
5146
5147         * cpu-amd64.md: Add long_and/or/xor opcodes.
5148
5149 2007-06-06  Wade Berrier  <wberrier@novell.com>
5150
5151         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
5152         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
5153         length of instruction shr_imm (expected 8, got 10)
5154
5155 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
5156
5157         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
5158
5159 2007-06-06  Mark Probst  <mark.probst@gmail.com>
5160
5161         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
5162         MonoInternalHashTable again (fixed bug in the internal hash table
5163         code).
5164
5165 2007-06-06  Mark Probst  <mark.probst@gmail.com>
5166
5167         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
5168         Have to figure out what makes it crash the SWF regression.
5169
5170 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
5171
5172         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
5173
5174 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5175
5176         * mini.c: optimize out the type check when storing null in a
5177         reference array.
5178
5179 2007-06-04  Mark Probst  <mark.probst@gmail.com>
5180
5181         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
5182         MonoInternalHashTable.
5183
5184 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
5185
5186         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
5187         signed integer methods.
5188
5189 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
5190
5191         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
5192         permanently since the current approach doesn't work.
5193
5194 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
5195
5196         * inssel.brg (stmt): Only call delegate->invoke_impl if 
5197         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
5198
5199 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
5200
5201         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
5202         the sreg2==rdx case.
5203         
5204         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
5205         account if it contains a rex prefix.
5206         (peephole_pass): Handle OP_FMOVE as well.
5207
5208 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
5209
5210         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
5211         as it causes regressions.
5212
5213 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
5214
5215         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
5216         static case as well.
5217
5218         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
5219
5220         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
5221         (mono_arch_get_this_arg_from_call): Ditto.
5222
5223         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
5224
5225         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
5226         invoke_impl field.
5227
5228         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
5229         (mono_arch_get_this_arg_from_call): Ditto.
5230
5231         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
5232         
5233         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
5234         try to create optimized invoke code and use that for further invocations. 
5235         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
5236
5237         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
5238
5239 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
5240
5241         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
5242         sealed classes or methods.
5243         *devirtualization.cs: tests for the new optimization
5244
5245 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
5246
5247         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
5248         by the update_volatile () function.
5249
5250 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
5251
5252         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
5253         require it.
5254
5255         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
5256
5257 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
5258
5259         * mini.c: Add configure checks for header files.
5260         * mini-x86.c: Add configure checks for header files.
5261         * trace.c: Add configure checks for header files.
5262         * aot-runtime.c: Add configure checks for header files.
5263         * aot-compiler.c: Add configure checks for header files.
5264         * driver.c: Add configure checks for header files.
5265         * mini-codegen.c: Add configure checks for header files.
5266         
5267         Code is contributed under MIT/X11 license.
5268
5269 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
5270
5271         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
5272         icompare_imm -128 + op_iclt. Fixes #81703.
5273
5274 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
5275
5276         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
5277
5278 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
5279
5280         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
5281         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
5282         so that all isinst checks now use "interface_bitmap".
5283
5284 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
5285
5286         * cpu-amd64.md (jmp): Fix a warning.
5287
5288         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
5289
5290         * basic.cs: Add new regression test.
5291
5292         * basic.cs: Remove test which is now in basic-long.cs.
5293
5294         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
5295
5296         * basic-long.cs: Add new test.
5297         
5298 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
5299
5300         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
5301
5302 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
5303
5304         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
5305
5306         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
5307         places.
5308         
5309         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
5310         throwing code a bit.
5311
5312         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
5313         the exception throwing code a bit.
5314
5315         * mini-x86.c (get_call_info): Allocate result from a mempool.
5316
5317 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
5318
5319         * aot-compiler.c (find_typespec_for_class): Fix the assert.
5320
5321         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
5322
5323         * mini.h (MonoCompile): Add 'token_info_hash' field.
5324
5325         * mini.c: Save token->method associations during compilation so the AOT 
5326         compiler can use it.
5327         
5328         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
5329         which reference generic classes and methods.
5330
5331 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
5332
5333         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
5334
5335         * aot-compiler.c (compile_method): Fix a typo in a comment.
5336
5337         * aot-runtime.c (decode_cached_class_info): Skip generic types.
5338
5339         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
5340         everything generic.
5341
5342         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
5343
5344 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
5345
5346         * mini.h (MonoCompile): Add 'args' field.
5347
5348         * mini.c (mono_compile_create_vars): Store variables representing the arguments
5349         into cfg->args.
5350
5351         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
5352
5353 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
5354
5355         * mini.c (mono_compile_get_interface_var): Remove this unused function.
5356
5357         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
5358
5359         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
5360         opcodes for some opcodes.
5361
5362         * mini.h *.brg *.c: Use the new opcodes.
5363
5364 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
5365
5366         * mini.h: Bumped aot revision.
5367
5368         * inssel.brg: modified code generation of type checks for interfaces
5369         to use the new "MonoClass.interface_bitmap" instead of the old
5370         "MonoClass.interface_offsets".
5371
5372 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
5373
5374         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
5375
5376 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
5377
5378         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
5379         64 bit platforms.
5380
5381 2007-04-27  Neale Ferguson <neale@sinenomine.net>
5382
5383         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
5384
5385 2007-04-27  Wade Berrier  <wberrier@novell.com>
5386
5387         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
5388         mini.h) to fix build.
5389
5390 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
5391
5392         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
5393         
5394         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
5395         causes the corlib unit tests to fail.
5396
5397 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
5398
5399         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
5400
5401         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
5402
5403         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
5404         opcodes to the comparison relations.
5405
5406         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
5407         opcodes to their types.
5408         
5409         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
5410
5411         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
5412         it in cfg->arch.cinfo.
5413
5414         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
5415
5416         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
5417         cfg->cil_offset_to_bb.
5418
5419 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
5420
5421         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
5422         created becase of initlocals.
5423
5424 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
5425
5426         * mini-alpha.c cpu-alpha.md: More alpha port work from 
5427         Sergey Tikhonov <tsv@solvo.ru>.
5428
5429 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
5430
5431         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
5432
5433 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
5434
5435         * cpu-s390.md (break): Correct the length of break instruction.
5436
5437 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5438
5439         * mini.c: fix a couple of soft-float issues and comments.
5440
5441 2007-04-15  Miguel de Icaza  <miguel@novell.com>
5442
5443         * trace.c (is_filenamechar): - is also a filename char.
5444
5445 2007-04-15  Neale Ferguson <neale@sinenomine.net>
5446
5447         * mini-s390.c: Correct checking for enum type in return value processing.
5448
5449 2007-04-14  Raja R Harinath  <rharinath@novell.com>
5450
5451         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
5452         (version.h): Makefile is in the build directory.
5453
5454 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
5455
5456         * mini-amd64.h: fix for assertion failure on Solaris/amd64
5457
5458 2007-04-11  Martin Baulig  <martin@ximian.com>
5459
5460         * mini.c (can_access_member): Fix handling of generic classes;
5461         fixes #81259.
5462
5463 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
5464
5465         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
5466
5467 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
5468
5469         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
5470
5471 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
5472
5473         * mini-codegen.c: make sure the right spill amount is
5474         used for fp or integer registers (fixes the float_sub_spill() on ppc).
5475
5476 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
5477
5478         * mini-ppc.c: fixes for the fp_branch_nan test.
5479
5480 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
5481
5482         * basic.cs: Comment out new test which still fails on ia64.
5483
5484 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
5485
5486         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
5487
5488 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
5489
5490         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
5491
5492 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
5493
5494         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
5495         on 64 bit machines. Fixes part of #80738.
5496
5497         * basic.cs: Add regression test.
5498
5499 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
5500
5501         * inssel.brg basic.cs: Revert previous change to fix build.
5502
5503         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
5504         platforms.
5505         
5506         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
5507
5508         * basic.cs: Add new regression test.
5509
5510 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
5511
5512         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
5513         many arguments.
5514
5515 2007-03-16  Neale Ferguson <neale@sinenomine.net>
5516
5517         * cpu-s390x.md: Correct length of break instruction.
5518
5519 2007-03-16  Neale Ferguson <neale@sinenomine.net>
5520
5521         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
5522         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
5523
5524 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
5525
5526         * *.c: Begin WIN64 port.
5527         * mini.c:  Use correct register in profiler.
5528         * mini-amd64.c: No inline assembly on Win64.
5529         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
5530         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
5531         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
5532         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
5533         mono_arch_ip_from_context for Win64.
5534         
5535         Contributed under MIT/X11 license.
5536
5537 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
5538
5539         * exceptions-amd64.c (seh_handler): Ditto.
5540
5541         * exceptions-x86.c (seh_handler): Fix a memory leak.
5542
5543 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
5544
5545         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
5546         mini-s390x.c: fixed peephole optimizations to deal
5547         correctly with 1 and 2 byte reload avoidance.
5548
5549 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
5550
5551         * cpu-s390.md, cpu-s390x.md: update localloc length.
5552
5553 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
5554
5555         * cpu-g4.md: added missing descriptions.
5556
5557 2007-03-14  Miguel de Icaza  <miguel@novell.com>
5558
5559         *  Makefile.am: Add support so the tail tests are not executed on
5560         PowerPC as that is a known limitation of the PowerPC port.
5561
5562 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
5563
5564         * runmdesc.bat:  Move to msvc directory.
5565         
5566 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
5567
5568         * runmdesc.bat:  Run executable that was produced by the current
5569         target and sent via an argument.
5570         
5571 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
5572
5573         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
5574         #81102.
5575
5576         * generics.2.cs: Add regression test.
5577
5578 2007-03-09  Wade berrier  <wberrier@novell.com>
5579
5580         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
5581
5582 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
5583
5584         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
5585         AOT code depends on this.
5586
5587 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
5588
5589         * mini.c: more precise tracking of types in the eval stack
5590         (part of fix for bug #81044).
5591
5592 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
5593
5594         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
5595
5596         * aot-compiler.c (encode_patch): Remove an obsolete comment.
5597
5598 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
5599
5600         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
5601
5602         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
5603
5604 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
5605
5606         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
5607         a pointer on 64 bit systems. Fixes #80190.
5608
5609         * iltests.il: Add new regression test.
5610
5611 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
5612
5613         * mini.c: inline a constant for Environment.IsRunningOnWindows.
5614
5615 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
5616
5617         * trace.c: Remove an erroneous alignemnt check when tracing.
5618           Fixes --trace on OSX86.
5619
5620 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
5621
5622         * mini-$(arch).h: initialize SP in context for all the archs.
5623
5624 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
5625
5626         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
5627         regressions in the thread tests.
5628
5629 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
5630
5631         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
5632         - fixed implementation of LOCALLOC opcode
5633         - implemented non-un compare for floats
5634         - code cleanup
5635         - implementation of FDIV and CKFINITE opcodes
5636         - fixes for latest mono updates
5637         - additional arch opcodes
5638
5639 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
5640
5641         * Makefile.am: simplify and merge rules for cross-compilation.
5642
5643 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
5644
5645         * local-propagation.c: Actually *apply* the fix for bug 80591...
5646
5647 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
5648
5649         * mini-exceptions.c: backuot part of the last change
5650         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
5651
5652 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
5653         * inssel.brg: Fix bug 59286.
5654
5655
5656 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
5657
5658         * mini-exceptions.c: patch from Zoltan to correctly check for
5659         stack boundaries (using the stack register, not the frame register),
5660         fixes bugs #80724, #79717.
5661
5662 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
5663
5664         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
5665         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
5666
5667         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
5668         presence of frame pointer elimination.
5669
5670 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
5671         
5672         * mini-x86.h: NetBSD UCONTEX_REG defines.
5673
5674 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
5675
5676         * inssel-amd64.brg: Fix amd64 build.
5677
5678 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
5679
5680         * mini.h: remove extern to workaround what looks likes gcc bug 26905
5681         on amd64.
5682
5683 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
5684
5685         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
5686         ends.
5687
5688         * mini-<ARCH>.c: Use mono_is_regsize_var ().
5689
5690 2007-01-30 Mark Mason <mason@broadcom.com>
5691
5692            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
5693            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
5694            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
5695            beginning support for CEE_JMP [not quite working yet]
5696            * tramp-mips.c: LMF handling now works
5697         
5698 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
5699
5700         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
5701
5702         * mini.h (NULLIFY_INS): New macro.
5703
5704 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
5705
5706         * mini.c: statistical profiler fix for windows, patch
5707         from Tor Lillqvist (tml@novell.com).
5708
5709 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
5710         * local-propagation.c: Fix bug 80591.
5711
5712 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
5713
5714         * Makefile.am: put back the --export-dynamic option as with
5715         the previous gmodule flags (thanks to Robert Jordan).
5716
5717 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
5718
5719         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
5720
5721         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
5722         simplify and speed up the local register allocator. Also rename some fields
5723         like iassign->vassign.
5724         
5725         * regalloc.c: Remove some functions which are no longer used since their
5726         inlined version is in mini-codegen.c.
5727         
5728         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
5729
5730         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
5731
5732 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
5733
5734         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
5735         narrowing. Fixes #80622.
5736
5737         * iltests.il: Add new regresssion test. 
5738
5739 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
5740
5741         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
5742         debug-debugger.c, debug-debugger.h: warning fixes.
5743         * driver.c: updated copyright year and made it fit in one line.
5744
5745 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
5746
5747         * aot-runtime.c: updated to use mono-dl instead of gmodule.
5748
5749 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
5750
5751         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
5752
5753         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
5754
5755         * iltests.il: Add new test for bug #80507.
5756
5757 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
5758
5759         * mini-arm.h: use soft-float also on vfp for now.
5760
5761 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
5762
5763         * mini.c: fix some more soft-float issues.
5764
5765 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
5766
5767         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
5768
5769 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
5770         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
5771         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
5772         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
5773
5774 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
5775
5776         * mini-arm.c: typo fix.
5777
5778 2007-01-23  Neale Ferguson <neale@sinenomine.net>
5779
5780         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
5781
5782 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
5783
5784         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
5785         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
5786
5787         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
5788
5789         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
5790
5791         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
5792         
5793         * inssel.brg: Fix a warning.
5794
5795         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
5796
5797         * abcremoval.c ssa.c ssapre.c: Update after this change.
5798         
5799         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
5800
5801         * dominators.c (df_set): Use mono_bitset_union_fast.    
5802
5803 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
5804
5805         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
5806         mini-codegen.c: reduce relocations and memory usage for the cpu
5807         description.
5808
5809 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
5810
5811         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
5812
5813         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
5814         to reduce their size.
5815
5816 2007-01-19 Mark Mason <mason@broadcom.com>
5817
5818         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
5819         * mini-mips.c: more configuration macros, support long conditional branches, additional
5820         asserts, fix epilog instrumentation.
5821         * mini-mips.h: use standard stack walk
5822         * cpu-mips.md: increase size of div, rem and conditional branches
5823         
5824 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
5825
5826         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
5827         to cpu spec data.
5828
5829 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
5830
5831         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
5832         (compile_method): Ditto.
5833
5834         * aot-runtime.c (decode_klass_info): Ditto.
5835
5836         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
5837         needed by the code generated by inssel.brg. Also fix a warning.
5838
5839 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
5840
5841         * mini.c: deal with enums that become genericinsts by
5842         being nested in a generic class (bug #79956).
5843
5844 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
5845
5846         * mini.c: match the generic definition to check for
5847         private access with generic types (bug #78431).
5848
5849 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
5850
5851         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
5852         to make life easier for people cross-compiling that insist on not
5853         using scratchbox.
5854
5855 2007-01-17 Mark Mason <mason@broadcom.com>
5856
5857         * inssel-long.brg: patch to deal with mips missing flags
5858         * inssel-long32-mips.brg: implement overflow checks
5859         * insset-mips.brg: implement overflow checks
5860         * mini-mips.h: implement conditional exception handling
5861         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
5862           Remove unused code, minor cleanups.
5863         * exceptions-mips.c: minor cleanups
5864         * mini-ops.h: add mips conditional exception ops
5865         * cpu-mips.md: add mips conditional exception ops
5866
5867         
5868 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
5869
5870         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
5871         to deal with mips missing of flags.
5872
5873 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
5874
5875         * exceptions-ppc.c: execute fault handlers.
5876
5877 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
5878
5879         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
5880
5881 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
5882
5883         * mini.c: handle also floating point values in initialize_array.
5884
5885 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
5886
5887         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
5888         array initialization and make it conditional on the intrins option.
5889
5890 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
5891
5892         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
5893         relocations and put the patch info names close to the enum definition.
5894
5895 2007-01-15 Mark Mason <mason@broadcom.com>
5896
5897         * basic.cs, exceptions.cs: break up large tests to increase debugability.
5898
5899 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
5900
5901         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
5902
5903 2007-01-12  Raja R Harinath  <rharinath@novell.com>
5904
5905         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
5906
5907 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
5908
5909         * Makefile.am: distribute the mips sources.
5910
5911 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
5912
5913         * mini-codegen.h: handle bug #80489 here, by excluding ecx
5914         directly.
5915
5916 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
5917
5918         * cpu-x86.md: back out for now as this triggers other regressions.
5919
5920 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
5921
5922         * cpu-x86.md: force src1 and dest regpair for long shift instructions
5923         to eax:edx, so ecx can't get allocated to them (bug #80489).
5924
5925 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
5926
5927         * mini.c, mini-exceptions.c: enabled running fault handlers
5928         (bug #80469).
5929
5930 2007-01-03  Miguel de Icaza  <miguel@novell.com>
5931
5932         * driver.c: If nothing fail, do not use the string "failed",
5933         because it makes it very annoying to view test result logs on the
5934         web. 
5935
5936 2006-12-30  Miguel de Icaza  <miguel@novell.com>
5937
5938         * debug-debugger.c (mono_debugger_main): Rename "main" to
5939         "main_method" to prevent a warning.
5940
5941         Remove a warning for unused field.
5942
5943 2006-12-28  Martin Baulig  <martin@ximian.com>
5944
5945         * debug-debugger.c
5946         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
5947
5948 2006-12-22  Martin Baulig  <martin@ximian.com>
5949
5950         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
5951         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
5952         seperate `.mdb_debug_info' section, so we can access it from the
5953         debugger even if the binary is stripped.
5954
5955         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
5956         from the `.mdb_debug_info' here to prevent the linker from
5957         removing that section.
5958
5959         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
5960         mdb-debug-info64.s.
5961
5962 2006-12-19  Robert Jordan  <robertj@gmx.net>
5963
5964         * mini-x86: enable the code to return small structures in
5965         registers for FreeBSD as well. Fixes bug #80278.
5966         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
5967
5968 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
5969
5970         * mini-x86.c: align the stack when calling the profiler
5971         function instrumenting the prolog (on OSX).
5972
5973 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
5974
5975         * mini.c: emit a break opcode where Debugger.Break () is called.
5976
5977 2006-12-13  Miguel de Icaza  <miguel@novell.com>
5978
5979         * mini.c (mono_method_to_ir): Provide useful information on this
5980         assert, to prevent others from debugging like I did.
5981
5982 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
5983
5984         * mini.c: enable code which was incorrectly commented
5985         (bug #80235).
5986
5987 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
5988
5989         * mini-x86.c: enable on OSX, too, the code to return small
5990         structures in registers.
5991
5992 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
5993
5994         * mini-x86.c: remove the use of the dynamic code manager here, too.
5995
5996 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
5997
5998         * mini.h, debug-debugger.c, tramp-*.c: fixed 
5999         mono_debugger_create_notification_function() to use
6000         mono_global_codeman_reserve () instead of a dynamic code manager.
6001
6002 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
6003
6004         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
6005         ves_array_element_address() jit icall and use a generated
6006         managed method instead (which is about 4 times faster for a rank 3
6007         array access).
6008
6009 2006-11-29  Mark Mason  <mason@broadcom.com>
6010
6011         * basic-calls.cs: additional tests for passing
6012         structures as function arguments.
6013
6014 2006-11-29  Mark Mason  <mason@broadcom.com>
6015
6016         * mini-mips.h: disable custom exception handling
6017         * mini-mips.c: throw/rethrow should use jalr to call
6018         exception stubs.  Fixed bug with passing structures
6019         by value. More support for tracing floating point
6020         functions.
6021
6022 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6023
6024         * mini.c: fixed typo in the soft-float ldind.r4 handling
6025         (bug #80086).
6026
6027 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
6028
6029         * mini.c, mini.h, driver.c: added --runtime command line
6030         option to select a different runtime than the autodetected one.
6031         * jit.h: added API for embedders to initialize with a specific
6032         runtime version.
6033
6034 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
6035
6036         * mini.c: handle also boxing of r4 values (bug #80024).
6037
6038 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
6039
6040         * mini-ppc.c: force indirect calls until we reserve
6041         enough address space for all the generated code.
6042
6043 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
6044
6045         * exceptions-arm.c: workaround bugs in the libc definition
6046         of struct ucontext.
6047
6048 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
6049
6050         * inssel.brg: fixes from me and Mark Mason.
6051
6052 2006-11-23  Dick Porter  <dick@ximian.com>
6053
6054         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
6055         semaphore display now we've fixed the initial value
6056
6057 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6058
6059         * inssel.brg: partially revert the last change to fix the build.
6060
6061 2006-11-21  Mark Mason  <mason@broadcom.com>
6062
6063         * inssel.brg: Add and use compare-and-branch macros to support
6064         architectures that do not have condition code registers (ie. MIPS).
6065         * *-mips.{c,brg,md}: Fix copyright statements
6066
6067 2006-11-20  Mark Mason  <mason@broadcom.com>
6068
6069         * Makefile.am: remove mini-codegen.c from list of MIPS sources
6070         * mini.c: Allow GET_CONTEXT to be specified by the arch port
6071         * mini.h: Added declaration for mono_print_ins()
6072         * mini-codegen.c: added ins_spec initializer for MIPS
6073         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
6074         vreg to be virtual and hreg to be non-virtual.
6075         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
6076         is not yet working/implemented correctly.
6077         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
6078         non-static, fixup calls to print_ins() from other parts in the file.
6079
6080 2006-11-20  Mark Mason  <mason@broadcom.com>
6081
6082         * basic-calls.cs: added tests for passing structures as arguments
6083         to calls.
6084
6085 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
6086
6087         * inssel-long32.brg: optimize signed division by power of two.
6088
6089 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
6090
6091         * mini-arm.c: added support for interworking with thumb code
6092         (mono must be still be built using the ARM instruction encoding).
6093
6094 2006-11-19  Miguel de Icaza  <miguel@novell.com>
6095
6096         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
6097         verifier has different rules for it.   Fixes a few verifier issues
6098         in the test suite.
6099
6100         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
6101         at the end, so people know what happened.
6102
6103 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
6104
6105         * brach-opts.c: in optimize_exception_target() make sure we
6106         are in a catch clause (fixes bug #79871).
6107
6108 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6109
6110         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
6111         more soft-float support fixes.
6112
6113 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
6114
6115         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
6116         that are passed half on the stack and half in registers.
6117
6118 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
6119
6120         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
6121         more mips integration work from Mark E Mason 
6122         <mark.e.mason@broadcom.com>.
6123
6124 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
6125
6126         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
6127         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
6128         tramp-mips.c: added sources for the mips port, not
6129         integrated in the build yet. Contributed by
6130         Mark E Mason <mark.e.mason@broadcom.com>.
6131
6132 2006-11-14  Neale Ferguson <neale@sinenomine.net>
6133
6134         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
6135
6136 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6137
6138         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
6139         put the soft-float rules in its own file since it seems to
6140         break s390 compilation.
6141
6142 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
6143
6144         * mini-arm.c: fixed wrnings.
6145
6146 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
6147
6148         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
6149         inssel-arm.brg: ARM support for soft-float.
6150
6151 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
6152
6153         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
6154         loads and stores of 32 bit fp values.
6155
6156 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
6157
6158         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
6159
6160         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
6161         works. Fixes #79852 and #79463.
6162
6163 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6164
6165         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
6166         more soft-float support WIP and fixes.
6167
6168 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
6169
6170         * mini-arm.c: some VFP updates.
6171
6172 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
6173
6174         * mini-exceptions.c: 0 is a valid local var offset in some
6175         architectures, don't assert (bug #78508).
6176
6177 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
6178
6179         * exceptions-arm.c: fixed off by one error in stack walk code.
6180
6181 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
6182
6183         * mini.h, mini.c: more precise tracking of type load exceptions.
6184
6185 2006-11-03  Robert Jordan  <robertj@gmx.net>
6186
6187         * Makefile.am: [WIN32] Add monow.exe target.
6188         * driver.c: [WIN32] Don't detach the console when debugging.
6189         Fixes bug #79797.
6190         
6191 2006-10-30  Miguel de Icaza  <miguel@novell.com>
6192
6193         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
6194
6195 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
6196
6197         * aot-compiler.c (emit_method_info): Add a case missed earlier.
6198
6199         * driver.c (mini_regression): Fix --regression with AOT.
6200
6201         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
6202
6203 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
6204
6205         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
6206
6207         * mini-sparc.h: Don't use sigaction on sparc/linux.
6208
6209         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
6210
6211         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
6212
6213         * mini-exceptions.c: Add proper include files for getpid ().
6214
6215 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
6216
6217         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
6218         address instead of a MonoJitInfo* to avoid decoding the exception info for the
6219         method.
6220
6221         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
6222         name cache to reduce its size.
6223
6224         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
6225
6226 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
6227
6228         * mini-x86.c: Save/restore the current LMF structure more efficiently using
6229         the mono_lmf TLS variable.
6230
6231         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
6232         trampoline lmf frames.  
6233
6234         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
6235
6236 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
6237
6238         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
6239         the mono_lmf TLS variable.
6240
6241         * mini-exceptions.c: Access the LMF structure through accessors.
6242
6243         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
6244         variable instead of in jit_tls->lmf.
6245
6246         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
6247         
6248         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
6249         trampoline lmf frames.
6250
6251         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
6252
6253 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
6254
6255        * mini.c trace.c mini-x86.c: Revert these too.
6256         
6257        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
6258        signature change.
6259
6260 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
6261
6262         * genmdesc.c: removed now dead code.
6263
6264 2006-10-09  Robert Jordan <robertj@gmx.net>
6265
6266         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
6267
6268 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
6269
6270         * mini.h: do not leave gaps in the opcode values.
6271
6272 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
6273
6274         * jit-icalls.h: flag functions as internal here, too.
6275
6276 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
6277
6278         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
6279         functions with the internal attribute.
6280
6281 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
6282
6283         * aot-compiler.c: fclose the file descriptor in the profile read loop.
6284
6285 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
6286
6287         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
6288         for soft-float.
6289
6290 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
6291
6292         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
6293         tail calls as on other platforms.
6294
6295         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
6296
6297         * iltests.il: Add a few tailcall tests.
6298
6299 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
6300
6301         * driver.c: fix loop for old compilers (bug #79521).
6302
6303 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
6304
6305         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
6306
6307         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
6308
6309         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
6310         metadata without any code.
6311
6312         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
6313         more precise debugging information using gdb.
6314
6315 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
6316
6317         * inssel-ia64.brg: Make the helper methods static.
6318
6319 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
6320
6321         * inssel-x86.brg: make the helper methods static.
6322
6323 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
6324
6325         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
6326
6327 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
6328
6329         * mini.c: updates for monoburg changes.
6330         * inssel.brg: make a few helper functions static as they should.
6331
6332 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
6333
6334         * Makefile.am: Move mini-codegen.c to common_sources.
6335
6336 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
6337
6338         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
6339         instructions.
6340         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
6341         mini-ppc.h: port to use the common local register allocator.
6342
6343 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
6344
6345         * mini.h: Remove the comment too then.
6346
6347 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
6348
6349         * mini.h: put back backend.data which is to be used shortly and
6350         doesn't increase the size of MonoInst. If any 64 bit arch aligned
6351         pointers on 4 byte boundaries it'd have much bigger issues running
6352         and you can ifdef it out anyway.
6353
6354 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
6355
6356         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
6357         MonoInst size by 4 bytes on 64 bit machines.
6358
6359 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
6360
6361         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
6362         replacement with more meaningful field names. Arch maintainers, please
6363         check the assigned names are good enough for your arch.
6364
6365 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
6366
6367         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
6368         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
6369
6370 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
6371
6372         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
6373         relocations and memory requirements, put the optimization flags
6374         definitions in their own file.
6375
6376 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
6377
6378         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
6379
6380         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
6381
6382 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
6383
6384         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
6385
6386 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
6387
6388         * inssel.brg: use the correct function to get the size of an item
6389         in an array, given an element class.
6390         * aot-compiler.c: do not access class->class_size directly.
6391
6392 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
6393
6394         * mini.h, debug-mini.c: added a debugging function to print
6395         info about local variables and arguments in a jitted method.
6396
6397 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
6398
6399         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
6400
6401         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
6402
6403 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
6404
6405         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
6406         inner and outer loops when passing vtypes.
6407
6408 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
6409
6410         * mini-ppc.c: take into account the cpu errata for cache flushing
6411         which caused some random errors (bug #79381).
6412
6413 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
6414
6415         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
6416         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
6417
6418 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
6419
6420         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
6421         loaded.
6422
6423         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
6424         freebsd ports tree.
6425
6426         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
6427         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
6428
6429         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
6430         displacement.
6431
6432 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
6433
6434         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
6435
6436 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
6437
6438         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
6439         macro does not have to be changed during debugging.
6440
6441         * 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>.
6442
6443         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
6444
6445         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
6446         
6447         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
6448         MONO_ARCH_NO_EMULATE_MUL is defined.
6449
6450         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
6451
6452         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
6453
6454         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
6455
6456         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
6457         
6458 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
6459
6460         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
6461         stuff to mini-exceptions.c where it is used.
6462
6463         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
6464         setup code, the real one is in mini-exceptions.c.
6465
6466         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
6467         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
6468         some changes from the freebsd ports tree.
6469
6470         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
6471         constants.
6472         
6473         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
6474
6475 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
6476
6477         * mini.c: on Linux, check for /proc to be mounted
6478         (bug# 79351, novell bug#201204).
6479
6480 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
6481
6482         * mini.c: handle cases where pthread_attr_getstack() behaves
6483         incorrectly (bug #78096).
6484
6485 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
6486
6487         * mini-arm.c: support larger stack frames (bug #79272).
6488
6489 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
6490
6491         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
6492
6493         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
6494         tokens.
6495
6496         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
6497         mono_class_from_name () to find a class from its name.
6498
6499         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
6500
6501 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
6502
6503         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
6504
6505 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
6506
6507         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
6508
6509 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
6510
6511         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
6512         callinfo->trampoline.
6513
6514         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
6515         fixes #79271.
6516         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
6517         future.
6518
6519 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
6520
6521         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
6522
6523 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
6524
6525         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
6526         stats.method_trampolines, it is already done by the generic trampoline code.
6527
6528         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
6529         
6530 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
6531
6532         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
6533
6534         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
6535
6536         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
6537
6538         * mini.c (print_jit_stats): Print mscorlib mempool size too.
6539         
6540         * mini.c (print_jit_stats): Print new stats.
6541
6542         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
6543
6544 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
6545
6546         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
6547         Address on two dimensional arrays. Fixes #78729.
6548
6549         * mini.h (MonoCompile): Add a 'skip_visibility' field.
6550
6551         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
6552         a method.
6553
6554         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
6555
6556         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
6557         #79130.
6558         
6559         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
6560         a race condition.
6561         (mini_get_ldelema_ins): Ditto.
6562
6563 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
6564
6565         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
6566         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
6567         Fixes #79213.
6568
6569 2006-08-29 Neale Ferguson <neale@sinenomine.net>
6570
6571         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
6572         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
6573
6574         * exceptions-s390x.c: Cosmetic change.
6575
6576         * tramp-s390.c: Fix warning.
6577
6578         * cpu-s390.md: Correct length of mul_imm.
6579
6580 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
6581
6582         * aot-compiler.c: added binary writer with ELF backend
6583         implementation (only on Linux/x86 for now).
6584
6585 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
6586
6587         * Makefile.am: Don't run net 2.0 AOT tests.
6588
6589         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
6590         (mono_compile_assembly): Skip net 2.0 assemblies as well.
6591
6592         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
6593
6594 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
6595
6596         * aot-compiler.c: simplified and refactored the asm-writing code
6597         to allow different backends.
6598
6599 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
6600
6601         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
6602
6603         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
6604         little. Share patches of type TYPE_FROM_HANDLE as well.
6605
6606         * mini.c (mono_patch_info_equal): New helper function.
6607         (mono_patch_info_hash): Ditto.
6608
6609         * aot-compiler.c (emit_method_code): Fix s390 build.
6610
6611         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
6612         is not handled because it is stored as a flag and not as a type ctor. Fixes
6613         #79016.
6614
6615 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
6616
6617         * aot-compiler.c: Fix computation of GOT slot statistics.
6618         
6619         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
6620         Also remove support for not PIC AOT.
6621
6622         * mini.h: Bump AOT file format version.
6623
6624         * objects.cs: Add a test for #78990.
6625
6626         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
6627         (peter.dettman@iinet.net.au). Fixes #79087.
6628
6629         * basic-long.cs: Add a test for the above.
6630
6631 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
6632
6633         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
6634         
6635         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
6636         code somewhat.
6637
6638 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
6639
6640         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
6641         exceptions.
6642
6643 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
6644
6645         * mini.c: Don't verify COM proxy invoke calls
6646         
6647
6648 2006-08-10  Dick Porter  <dick@ximian.com>
6649
6650         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
6651         which process is holding semaphores locked.
6652
6653 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
6654
6655         * mini-ia64.c mini-amd64.c: Fix #79027.
6656
6657         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
6658
6659         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
6660
6661         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
6662         implicit arguments in a vararg call. Fixes #79027.
6663
6664 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
6665
6666         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
6667         (mono_get_array_new_va_signature): Ditto.
6668
6669 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
6670
6671         * aot-runtime.c: Call init_plt lazily.
6672
6673         * inssel-long.brg: Fix unsigned long->int conversion.
6674
6675         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
6676
6677         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
6678         that most data is now in the .rss/.data section.
6679
6680 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
6681
6682         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
6683
6684         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
6685
6686         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
6687
6688         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
6689
6690         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
6691         virtual call. Fixes #79010.
6692
6693         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
6694         and use the result as the this argument in the real call.
6695
6696         * generics.2.cs: Add a new test for #79010.
6697         
6698 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
6699
6700         * mini-x86.c: Fix a warning.
6701
6702         * aot-compiler.c: Add a bunch of statistics.
6703
6704         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
6705
6706 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
6707
6708         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
6709
6710 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
6711
6712         * 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>.
6713
6714 2006-07-13  Miguel de Icaza  <miguel@novell.com>
6715
6716         * mini.c (mono_method_to_ir): Obtain the original method in the
6717         CIL stream and use this to perform validation.
6718
6719         Fixed: #78816
6720
6721 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
6722
6723         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
6724         (mono_arch_call_opcode): Ditto.
6725
6726         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
6727         #78826.
6728
6729         * mini.c (mono_patch_info_dup_mp): New helper function.
6730         
6731         * aot-compiler.c (compile_method): Fix some of the memory allocated during
6732         compilation. Fixes #78827.
6733
6734 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
6735
6736         * declsec.c: Use original security informations for
6737           MONO_WRAPPER_MANAGED_TO_MANAGED.
6738
6739 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
6740
6741         * mini.c: Allow Com Interop methods/classes and
6742         don't verify COM wrapper calls
6743         
6744
6745 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
6746
6747         * inssel-long32.brg: Fix long->i4 checked conversion.
6748
6749         * exceptions.cs: Add a test for the above.
6750
6751 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
6752
6753         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
6754
6755         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
6756         leaks.
6757
6758         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
6759         #78775.
6760
6761 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
6762
6763         * mini.c: Fix solaris/x86 exception handling.
6764
6765         * Makefile.am: Get rid of $(ICU_LIBS).
6766
6767 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
6768
6769         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
6770         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
6771         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
6772
6773         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
6774
6775         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
6776         this function causes a SIGSEGV.
6777
6778 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
6779
6780         * mini.c: Remove unused solaris/x86 includes.
6781
6782 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
6783
6784         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
6785
6786 2006-06-20  Jb Evain  <jbevain@gmail.com>
6787
6788         * cpu-g4.md: fix max length of start_handler instruction.
6789
6790 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
6791         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
6792
6793 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
6794         * ssa.c: Fixed bug 78653 for SSA based deadce.
6795         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
6796         MonoInst.flags, used in SSA based deadce.
6797         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
6798         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
6799
6800 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
6801
6802         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
6803         it can end up using non executable memory on ppc64 systems
6804         running ppc32 userspace (fix from Johannes Berg).
6805
6806 2006-06-14  Dick Porter  <dick@ximian.com>
6807
6808         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
6809         4.1.1
6810
6811 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
6812         * mini.c: Made so that inline is locally disabled if it would
6813         trigger a .cctor, because too many apps depend on this behavior
6814         (which seems to be also the one of the MS CLR).
6815
6816 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
6817
6818         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
6819         No idea why this worked before.
6820
6821         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
6822         which branch to outer exception clauses since they could skip the
6823         inner finally clauses. Fixes #78633.
6824
6825         * exceptions.cs: Add a test for the above.
6826
6827         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
6828         Fixes #78629.
6829
6830         * iltests.il: Add a test for the above.
6831
6832 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
6833
6834         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
6835         after the end of a try bblock, to prevent asserts in mini_method_compile ().
6836
6837         * iltests.il: Add a test for the above.
6838
6839 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
6840
6841         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
6842         
6843         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
6844         methods as instrinsics.
6845
6846 2006-06-09  Wade Berrier <wberrier@novell.com>
6847
6848         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
6849         (simple-cee-ops.h ssapre-mini-ops.h)
6850
6851 2006-06-09  Neale Ferguson <neale@sinenomine.net>
6852
6853         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
6854         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
6855         instruction).
6856         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
6857         * cpu-s390x.md: Fix max. length values for a couple of instructions.
6858
6859 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
6860
6861         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
6862
6863 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
6864
6865         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
6866         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
6867         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
6868         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
6869         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
6870         of opcodes, so that bug 78549 should not happen again.
6871         * ssapre.c: Updated to use the renamed files.
6872
6873 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
6874
6875         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
6876         in OP_ATOMIC_EXCHANGE_I4.
6877
6878 2006-06-07  Wade Berrier <wberrier@novell.com>
6879
6880         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
6881         in mono_debugger_create_notification_function)
6882
6883 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
6884
6885         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
6886         
6887         * mini.c (type_from_stack_type): Disable some changes which do not
6888         seem to work.
6889
6890         * driver.c: Reenable opts.
6891
6892         * mini.h (MonoStackSlot): New structure to keep track of the verification state
6893         of the evaluation stack.
6894         
6895         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
6896         evaluation stack trace at entry to the bblock.
6897
6898         * mini.c (merge_stacks): New function to perform verification of stack merges.
6899         Turned off by default.
6900
6901         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
6902         STACK_MP.
6903         
6904 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
6905
6906         * local-propagation.c: Fixed bug 78549.
6907
6908 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
6909
6910         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
6911
6912 2006-06-02  Miguel de Icaza  <miguel@novell.com>
6913
6914         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
6915         tramp-arm.c, tramp-ia64.c
6916         (mono_debugger_create_notification_function): Update signature to
6917         new signature and use new protocol for creating the notification
6918         function.  
6919
6920         Should fix the build.
6921
6922 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
6923
6924         * exceptions-ppc.c (mono_jit_walk_stack)
6925         (ves_icall_get_frame_info): Fix the build
6926
6927 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
6928
6929         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
6930
6931 2006-05-31  Raja R Harinath  <rharinath@novell.com>
6932
6933         * il2tests.2.il: New file for generics CIL tests.  Add test for
6934         #78019.
6935         * Makefile.am: Update.
6936
6937         Fix #78019
6938         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
6939         to nullable types.
6940
6941 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
6942
6943         * aliasing.c: Fixed bug 78311.
6944
6945 2006-05-29  Martin Baulig  <martin@ximian.com>
6946
6947         * mini-exceptions.c (mono_find_jit_info): When computing the
6948         native offset, check whether we're actually inside the method's
6949         code; call mono_debug_print_stack_frame() to format the frame.
6950         (ves_icall_System_Exception_get_trace): Call
6951         mono_debug_print_stack_frame() to format the stack frame.
6952         (ves_icall_get_trace): Update to the new debugging API.
6953         (mono_jit_walk_stack_from_ctx): Likewise.
6954         (ves_icall_get_frame_info): Likewise.
6955
6956         * mini.c (get_method_from_ip): Use the new debugging API.
6957         (mono_print_method_from_ip): Likewise.
6958
6959         * exceptions-ppc.c
6960         (mono_jit_walk_stack): Use the new debugging API.
6961         (ves_icall_get_frame_info): Likewise.   
6962
6963 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
6964
6965         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
6966
6967 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
6968
6969         * mini.c: Added "limitator" to inline for debugging.
6970
6971 2006-05-24  Martin Baulig  <martin@ximian.com>
6972
6973         * debug-debugger.c (mono_debugger_init): Create a private,
6974         malloc()-based code manager for the notification function and
6975         intentionally leak it on exit.  This fixes the crash-on-exit race
6976         condition.
6977
6978         * tramp-amd64.c
6979         (mono_debugger_create_notification_function): Added
6980         `MonoCodeManager *' argument.
6981
6982         * tramp-x86.c
6983         (mono_debugger_create_notification_function): Added
6984         `MonoCodeManager *' argument.
6985
6986 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
6987
6988         * aliasing.c: Fixed 64 bit issue.
6989         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
6990         default since all known bugs are fixed (one more time!).
6991
6992 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
6993
6994         * mini.c: write barrier support.
6995
6996 2006-05-23  Martin Baulig  <martin@ximian.com>
6997
6998         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
6999         check at the top of the file.
7000
7001 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
7002
7003         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
7004         reverting changes without reason and without changelog entries.
7005
7006 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
7007
7008         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
7009         to a few opcodes. Fixes #78439.
7010
7011         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
7012         consistency with other archs.
7013
7014         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
7015
7016 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
7017
7018         * debug-debugger.c: fix the build.
7019
7020 2006-05-17  Martin Baulig  <martin@ximian.com>
7021
7022         * debug-debugger.c
7023         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
7024         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
7025         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
7026         (debugger_attach): Call GC_mono_debugger_add_all_threads().
7027
7028 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
7029
7030         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
7031
7032 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
7033
7034         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
7035         MONO_TYPE_GENERICINST.
7036         
7037         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
7038         MONO_TYPE_GENERICINST.
7039
7040 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
7041
7042         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
7043         #78325.
7044
7045 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
7046
7047         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
7048         mempool.
7049         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
7050
7051 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
7052
7053         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
7054         mono_trace_cleanup ().
7055
7056         * iltests.il: Fix problem with the newly added test.
7057
7058         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
7059         due to register constraints, free up the previous hreg. Fixes #78314.
7060
7061         * iltests.il: Add new test for #78314.  
7062
7063         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
7064         Interlocked.Add. Fixes #78312.
7065
7066         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
7067         
7068 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
7069
7070         * inssel.brg (mini_emit_virtual_call): Fix a warning.
7071
7072 2006-05-05  Martin Baulig  <martin@ximian.com>
7073
7074         * debug-mini.c (mono_debug_open_block): New method.
7075
7076         * mini-amd64.c
7077         (mono_arch_output_basic_block): Call mono_debug_open_block() at
7078         the beginning of each basic block.
7079
7080         * mini-x86.c
7081         (mono_arch_output_basic_block): Call mono_debug_open_block() at
7082         the beginning of each basic block.
7083
7084 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
7085
7086         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
7087         default until I understand why they break the build on amd64.
7088
7089 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
7090
7091         * mini.c (mini_cleanup): Call mono_cleanup ().
7092
7093         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
7094         errors.
7095
7096 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
7097
7098         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
7099         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
7100         default since all known bugs are fixed, and I cannot reproduce bug
7101         77944... I'm asking Matt Hargett to test again after this commit.
7102
7103 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
7104
7105         * mini-codegen.c: Fixed typo that thrashed inline.
7106
7107 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
7108
7109         * dominators.c (compute_dominators): Avoid using a worklist since
7110         it is not correct in some cases. Instead, iterate over all bblocks as
7111         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
7112
7113 2006-04-28  Miguel de Icaza  <miguel@novell.com>
7114
7115         * mini.c (mono_jit_compile_method_inner): Use
7116         mono_prepare_exception_from_error that resets the value
7117         internally.
7118
7119 2006-04-27  Miguel de Icaza  <miguel@novell.com>
7120
7121         * mini.c: Move the mini_loader_error_to_exception to metadata. 
7122         
7123 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
7124
7125         * aliasing.c: Fixed bug 78210.
7126
7127 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
7128
7129         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
7130         default until all their problems (or the ones they trigger) are fixed.
7131
7132 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
7133
7134         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
7135         
7136         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
7137         as loaded only after resolving patches since that could invoke the same method.
7138
7139         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
7140
7141         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
7142         functions.
7143
7144         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
7145         AOT loader.
7146
7147         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
7148         stack.
7149
7150         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
7151         made from AOT code through the PLT table.
7152
7153         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
7154         holding the plt offset when a call is made to the aot plt trampoline.
7155         
7156 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
7157
7158         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
7159         amd64 AOT support.
7160
7161         * Makefile.am (common_sources): Fix build breakage.
7162
7163         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
7164         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
7165         intra-assembly calls if possible.
7166         
7167         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
7168
7169         * mini-trampolines.c: Handle PLT entries.
7170
7171         * mini.c: Avoid creating a GOT var for calls.
7172
7173         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
7174         from mscorlib code.
7175
7176         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
7177         from mscorlib code.
7178
7179         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
7180         AOT code.       
7181
7182         * mini.h: Bump AOT file format version.
7183         
7184         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
7185         covers more cases.
7186
7187 2006-04-25  Martin Baulig  <martin@ximian.com>
7188
7189         * driver.c: Disable copyprop, consprop and inline when running
7190         inside the debugger.
7191
7192 2006-04-25  Martin Baulig  <martin@ximian.com>
7193
7194         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
7195         with `get_current_thread' and added `detach'.
7196         (MonoDebuggerMetadataInfo): Added `thread_size',
7197         `thread_tid_offset', `thread_stack_ptr_offset' and
7198         `thread_end_stack_offset'.
7199
7200 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
7201
7202         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
7203         aot-runtime.c.
7204
7205         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
7206         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
7207
7208         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
7209
7210         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
7211
7212         * aot.c: Add support for ADJUSTED_IID.  
7213
7214 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
7215
7216         * aot.c (emit_method_order): Don't align method_order_end.
7217
7218         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
7219         the interface ID changes.
7220
7221 2006-04-21  Dick Porter  <dick@ximian.com>
7222
7223         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
7224         cleaning up a thread.  Fixes the new part of bug 77470.
7225
7226 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
7227
7228         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
7229         to managed wrapper.
7230                      
7231 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
7232
7233         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
7234         
7235         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
7236         SIGSEGV. Fixes #78072.
7237
7238         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
7239         unregister our SIGABRT handler.
7240
7241 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
7242
7243         * mini.c: Disabled inline where it can alter the call stack in a
7244         way visible from managed code.
7245         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
7246         default.
7247
7248 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
7249
7250         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
7251         on other platforms. Fixes #78089.
7252
7253 2006-04-13  Martin Baulig  <martin@ximian.com>
7254
7255         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
7256         determine whether we're inside the debugger.
7257
7258         * debug-debugger.h
7259         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
7260
7261 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
7262
7263         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
7264         handler clauses. Fixes #78024.
7265
7266         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
7267         in the CALL_MEMBASE opcodes. Fixes #78088.
7268         (mono_arch_get_vcall_slot_addr): Ditto.
7269
7270 2006-04-10  Martin Baulig  <martin@ximian.com>
7271
7272         * debug-debugger.c: The thread handling code has now been moved
7273         into ../metadata/threads.c.
7274
7275 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
7276
7277         * driver.c (mono_main): Fix --with-gc=none build.
7278
7279         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
7280         (mono_spillvar_offset_float): Ditto.
7281         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
7282         hreg, not when its !global, since on ia64, there is a third category: stacked
7283         registers.      
7284
7285 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
7286
7287         * mini.c: set MonoInst->klass for load field address and a few other
7288         places.
7289
7290 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
7291
7292         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
7293
7294 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
7295
7296         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
7297         the branch opt changes.
7298
7299 2006-04-06  Dick Porter  <dick@ximian.com>
7300
7301         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
7302         
7303         * wapihandles.c (mini_wapi_seminfo): 
7304         * driver.c (mono_main): Add semaphore info option
7305
7306 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
7307
7308         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
7309         branch optimization changes. Fixes #78009.
7310
7311 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
7312
7313         * mini.c: ignore accessibility of methods in managed->native wrappers.
7314
7315 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
7316
7317         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
7318         
7319         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
7320
7321 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
7322
7323         * mini.c: Modify the branch optimizations to preserve the invariant that
7324         the entries inside the in_bb and out_bb arrays are unique.
7325         (mono_unlink_bblock): Avoid creation of new arrays.
7326
7327 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
7328
7329         * mini.c (mono_unlink_bblock): Fix regression caused by previous
7330         change (#77992).
7331
7332 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
7333
7334         * mini.c (optimize_branches): Remove the "optimizations" in
7335         the cbranch1/cbranch2 -> branch cases which were causing several
7336         problems in the past. Fixes #77986.
7337
7338 2006-03-31  Chris Toshok  <toshok@ximian.com>
7339
7340         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
7341         default optimizations :(
7342
7343 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
7344
7345         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
7346         branch.
7347
7348 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
7349
7350         * local-propagation.c: Added comments to structs and removed
7351         "Mono" prefixes from local tree mover types.
7352
7353 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
7354
7355         * Makefile.am (arch_sources): Define this for each architecture so 
7356         libmono_la_SOURCES is defined in one place.
7357
7358 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
7359
7360         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
7361         from handles/.
7362
7363 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
7364
7365         * driver.c: print the GC name supplied by configure.
7366
7367 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
7368
7369         * local-propagation.c: Added tree mover, and moved here all the
7370         local propagation code from mini.c
7371         * mini.c: Added support for treeprop, and moved all the local
7372         propagation code to local-propagation.c
7373         * mini.h: Added support for treeprop
7374         * driver.c: Added support for treeprop, enabled consprop, copyprop,
7375         treeprop, inline and deadce by default
7376         * Makefile.am: Added local-propagation.c
7377
7378 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
7379
7380         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
7381
7382 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
7383
7384         * debug-debugger.c: make it compile without the Boehm GC.
7385
7386 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
7387
7388         * mini.c: fixed issue with mismatch when an icall is registered
7389         with multiple names but same address.
7390
7391 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
7392
7393         * declsec.c, mini-exceptions.c: use write barrier to set reference
7394         fields of managed objects.
7395
7396 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
7397
7398         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
7399         (can_access_internals): Fix a warning.
7400
7401         * mini.c (print_method_from_ip): Rename this to 
7402         mono_print_method_from_ip so it gets exported.
7403
7404         * trace.c: Deal with strings inside StringBuilder's containing garbage
7405         and fix memory leaks. Fixes #77848.
7406
7407 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
7408
7409         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
7410         fixes #77787.
7411
7412 2006-03-16 Neale Ferguson <neale@sinenomine.net>
7413         
7414         * mini-s390.c: Remove OP_X86_TEST_NULL.
7415
7416 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
7417
7418         * mini.c: use the correct GetHashCode() for the moving collector.
7419
7420 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
7421
7422         * liveness.c: Regalloc spill cost tuning.
7423
7424 2006-03-15 Neale Ferguson <neale@sinenomine.net>
7425         
7426         * mini-s390x.h: Correct S390_LONG macro.
7427
7428         * mini-s390x.c: Cleanup unused code.
7429
7430 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
7431
7432         * jit-icalls.h: New file.
7433
7434         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
7435         icalls and include that instead of including jit-icalls.c.
7436
7437         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
7438         OP_X86 opcodes.
7439
7440 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
7441
7442         * mini.c: when checking for member accessibility, also check for
7443         friend assemblies and for explicit interface implementations.
7444
7445 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
7446
7447         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
7448
7449         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
7450
7451         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
7452         common cases are done first.    
7453
7454         * mini-ops.h: Only define platform specific opcodes on the given platform.
7455
7456         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
7457         branch.
7458         
7459 2006-03-14  Martin Baulig  <martin@ximian.com>
7460
7461         Revert Paolo's change from r57348:
7462
7463         * mini.h: don't use gboolean for bitfields.
7464         * mini.c: verifier changes for fields and methods accessibility.
7465
7466 2006-03-13  Neale Ferguson <neale@sinenomine.net>
7467
7468         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
7469
7470         * mini-s390x.c: Fix conv_r_un.
7471
7472         * cpu-s390, cpu-s390x.md: Fix lengths.
7473
7474 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
7475
7476         * mini.c: nested types have access to all the nesting
7477         levels, not just the enclosing types.
7478
7479 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
7480
7481         * mini.c: added a few more verification checks.
7482
7483 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
7484
7485         * liveness.c: Merge optimizations from the linear-il branch.
7486
7487 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
7488
7489         * mini-ia64.c (emit_call): Add a comment.
7490
7491         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
7492
7493         * tramp-ia64.c: Fix some warnings.
7494
7495 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
7496
7497         * mini.h: don't use gboolean for bitfields.
7498         * mini.c: verifier changes for fields and methods accessibility.
7499
7500 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
7501
7502         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
7503         lazy icall wrapper changes.
7504
7505         * dominators.c: Replace all the dominator algorithms with faster
7506         ones from the linear-il branch.
7507
7508         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
7509         the mempool.
7510
7511         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
7512         common cases are done first.
7513
7514         * mini-amd64.c: Fix some warnings.
7515
7516         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
7517         from the mempool.
7518
7519         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
7520         added code.
7521
7522         * mini.h: Add a missing prototype.
7523
7524 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
7525
7526         * mini.c: Compile icall wrappers lazily.
7527
7528         * mini-codegen.c: Use printf instead of g_print since its much faster.
7529
7530         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
7531         function.
7532
7533         * mini.c (optimize_branches): Cache the negative result from 
7534         remove_block_if_useless ().
7535
7536         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
7537         Also fix some bblock linking issues.
7538
7539         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
7540         assembly files.
7541
7542         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
7543
7544         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
7545         accessed fields first, for better cache behavior.
7546         
7547 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
7548
7549         * mini.c: speedup IList<T> array accesses.
7550
7551 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
7552
7553         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
7554         inline_costs counter. Fixes #77190.
7555
7556 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
7557
7558         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
7559         trace messages. Fixes #77706.
7560
7561 2006-03-04  Martin Baulig  <martin@ximian.com>
7562
7563         * tramp-amd64.c, tramp-x86.c
7564         (mono_debugger_create_notification_function): Use
7565         mono_global_codeman_reserve() to allocate a buffer at runtime and
7566         return it.
7567
7568         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
7569
7570         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
7571         notification function at runtime and then call `initialize' in the
7572         `MONO_DEBUGGER__debugger_info' vtable.
7573
7574 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
7575
7576         * iltests.il: Fix a visibility problem.
7577
7578 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
7579
7580         * driver.c, mini.c: add hooks for the counters API.
7581
7582 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
7583
7584         * driver.c: show disabled options.
7585
7586 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
7587
7588         * linear-scan.c: always use cost-driven selection.
7589
7590 2006-02-28  Raja R Harinath  <rharinath@novell.com>
7591
7592         * jit-icalls.c (helper_compile_generic_method): Revert change from
7593         2006-02-24.
7594
7595 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
7596
7597         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
7598
7599 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
7600
7601         * inssel.brg: style fixes, mostly to force the updated monoburg
7602         to run for people using svn.
7603
7604 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
7605
7606         * mini.c: match monoburg changes.
7607
7608 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
7609
7610         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
7611         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
7612         declaration in the header file.
7613
7614 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
7615
7616         * helpers.c: reduce relocations and mem usage.
7617
7618 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
7619
7620         * mini.h, mini-codegen.c: disable logging features if
7621         requested by configure.
7622
7623 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
7624
7625         * mini.c: tiny verifier changes.
7626
7627 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
7628
7629         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
7630         cpu-pentium.md: stack alignment changes for osx/x86,
7631         partially from Geoff Norton <gnorton@customerdna.com>.
7632
7633 2006-02-24  Raja R Harinath  <harinath@gmail.com>
7634
7635         * jit-icalls.c (helper_compile_generic_method): Update to changes
7636         in metadata/class.c.
7637
7638 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
7639         
7640         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
7641         
7642         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
7643         interface calls with large offsets.
7644
7645 2006-02-23  Raja R Harinath  <rharinath@novell.com>
7646
7647         * jit-icalls.c (helper_compile_generic_method): Document the
7648         special-case we depend on so that we can inflate the method twice
7649         with the same context with no bad side-effects.
7650
7651 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
7652
7653         * mini-x86.c, mini-amd64.c: fix for case when xen support
7654         is disabled.
7655
7656 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
7657
7658         * mini-x86.c, mini-amd64.c: generate code to access tls items
7659         in a faster way for Xen systems.
7660
7661 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
7662
7663         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
7664         updates and compilation fixes for the OSX/x86 port, mostly from
7665         Geoff Norton <gnorton@customerdna.com>.
7666
7667 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
7668
7669         * inssel.brg: faster interface call implementation
7670         to sync with the interface_offsets MonoVTable changes.
7671
7672 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
7673
7674         * mini.c: more verification checks.
7675
7676 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
7677
7678         * mini.c: added a few more verification checks.
7679
7680 2006-02-17      Neale Ferguson <neale@sinenomine.net>
7681
7682         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
7683         facility on the processor and use it if available.
7684
7685 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
7686
7687         * driver.c, aot.c, mini.c: throw exception if the IL code is
7688         invalid or unverifiable.
7689
7690 2006-02-17  Raja R Harinath  <rharinath@novell.com>
7691
7692         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
7693         m.StructField.
7694
7695 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
7696
7697         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
7698
7699 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
7700
7701         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
7702         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
7703         handling of instantiated generic valuetypes.
7704
7705 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
7706
7707         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
7708         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
7709         instead.
7710
7711         * generics.2.cs: Revert the nullable reftypes tests.
7712
7713 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
7714
7715         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
7716         using __builtin_frame_address (1) as it doesn't work in the presence
7717         of optimizations. Hopefully fixes #77273.
7718
7719         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
7720         -> generics.cs change as it doesn't work with some automake versions.
7721
7722 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
7723
7724         * mini.c: handle systems that sue a different way to
7725         retrieve the stack address of the current thread.
7726
7727 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
7728
7729         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
7730         it specially in the makefile.
7731
7732         * generics.2.cs: Add tests for nullable reference types.
7733
7734 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
7735
7736         * mini.c: always handle the case when mono_jit_init()
7737         is called in a thread different from the main thread,
7738         confusing libgc (bug #77309).
7739
7740 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
7741
7742         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
7743
7744 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
7745
7746         * mini.c: change optimize_branches () to use a single loop
7747         and introduce a new optimization to simplify some range checks.
7748
7749 2006-02-03  Martin Baulig  <martin@ximian.com>
7750
7751         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
7752         and merged with debugger_thread_manager_add_thread().
7753         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
7754         inform the debugger about the main thread.
7755
7756 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
7757
7758         * basic.cs: Add test for div.un/rem.un constant folding.
7759
7760 2006-02-03  Neale Ferguson <neale@sinenomine.net>
7761
7762         * cpu-s390x.md: correct int_xor_imm length
7763
7764 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
7765
7766         * generics.2.cs: New test for #77442.
7767
7768         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
7769         #77442.
7770
7771 2006-02-02  Martin Baulig  <martin@ximian.com>
7772
7773         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
7774         <mono/metadata/mono-debug-debugger.h>   
7775
7776         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
7777
7778 2006-02-02  Martin Baulig  <martin@ximian.com>
7779
7780         * debug-debugger.h: New header file for debug-debugger.c.
7781
7782         * debug-debugger.c: Big API cleanup; don't run the managed Main()
7783         function is a separate thread anymore; add support for attaching.
7784
7785 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
7786
7787         * tramp-x86.c: Fix a warning.
7788
7789 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
7790
7791         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
7792         on very large methods.
7793
7794         * aot.c (load_patch_info): Fix a warning.
7795
7796 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
7797
7798         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
7799         mini-ops.h: alu membase optimizations.
7800
7801 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
7802
7803         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
7804         to speedup StringBuilder.
7805
7806 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
7807
7808         * dominators.c (mono_compute_natural_loops): Fix detection of
7809         loop body start blocks.
7810
7811         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
7812
7813 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
7814
7815         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
7816         #75145.
7817
7818 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
7819
7820         * aliasing.c: Fixed aliasing issue on 64 bit archs.
7821
7822 2006-01-25  Martin Baulig  <martin@ximian.com>
7823
7824         * debug-debugger.c: Moved the `MonoDebuggerManager' and
7825         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
7826         started to cleanup this file a little bit.
7827
7828 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
7829
7830         * mini.c: optimize a codepath frequently happening in generics code.
7831
7832 2006-01-23  Martin Baulig  <martin@ximian.com>
7833
7834         * Makefile.am: Only compile debug-debugger.c on supported platforms.
7835
7836         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
7837         functions directly.
7838
7839         * driver.c: debug-debugger.c is only available if
7840         `MONO_DEBUGGER_SUPPORTED' is defined.   
7841
7842 2006-01-23  Martin Baulig  <martin@ximian.com>
7843
7844         * debug-debugger.c: Only enable this on platforms where the Mono
7845         Debugger is working (x86 and x86_64).
7846
7847 2006-01-21  Martin Baulig  <martin@ximian.com>
7848
7849         The Mono Debugger is now using the normal `mono' instead of the
7850         `mono-debugger-mini-wrapper' when executing managed code.
7851
7852         * debug-debugger.c: New file; previously known as
7853         debugger/wrapper/wrapper.c.
7854
7855         * debug-mini.c (mono_init_debugger): Removed.
7856
7857         * driver.c (mono_main): Added new `--inside-mdb' command line
7858         argument which is used when running inside the debugger.
7859
7860 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
7861
7862         * liveness.c (mono_analyze_liveness): Remove some unused data
7863         structures.
7864
7865 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
7866
7867         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
7868
7869 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
7870
7871         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
7872         depends on implementation details of monobitset.
7873
7874         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
7875         Fixes #77271.
7876
7877 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
7878
7879         * liveness.c: Update after monobitset changes.
7880
7881 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
7882
7883         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
7884
7885 2006-01-11 Neale Ferguson <neale@sinenomine.net>
7886
7887         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
7888
7889         * mini-s390x.c: Remove warning messages.
7890
7891 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
7892
7893         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
7894
7895 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
7896
7897         * generics.2.cs: Add ldelem/stelem_any test.
7898
7899 2006-01-10 Neale Ferguson <neale@sinenomine.net>
7900
7901         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
7902
7903 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
7904
7905         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
7906         
7907 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
7908
7909         * generics.2.cs: Reenable vtype tests.
7910
7911         * inssel-x86.brg: Remove an icorrect valuetype rule.
7912
7913 2006-01-06 Neale Ferguson <neale@sinenomine.net>
7914
7915         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
7916         initial support for OP_ABS.
7917
7918 2006-01-05 Neale Ferguson <neale@sinenomine.net>
7919
7920         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
7921
7922 2006-01-05 Neale Ferguson <neale@sinenomine.net>
7923
7924         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
7925         conversion and implement LADD/LSUB.
7926
7927         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
7928         architectures.
7929
7930 2006-01-05 Neale Ferguson <neale@sinenomine.net>
7931
7932         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
7933
7934         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
7935         architectures.
7936
7937 2006-01-05 Neale Ferguson <neale@sinenomine.net>
7938
7939         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
7940         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
7941         (stack walk problem).
7942
7943 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
7944
7945         * aot.c (mono_aot_load_method): Fix a warning.
7946
7947 2006-01-03  Neale Ferguson <neale@sinenomine.net>
7948
7949         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
7950
7951 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
7952
7953         * iltests.il: Add test for #77148.
7954
7955         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
7956         #77148.
7957
7958 2006-01-03  Neale Ferguson <neale@sinenomine.net>
7959
7960         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
7961
7962 2006-01-03  Neale Ferguson <neale@sinenomine.net>
7963
7964         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
7965         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
7966
7967         * basic-long.cs: Add lconv-to-r4/r8 tests.
7968
7969 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
7970
7971         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
7972
7973         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
7974         here as on other archs.
7975
7976 2005-12-29 Neale Ferguson <neale@sinenomine.net>
7977
7978         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
7979
7980 2005-12-29 Neale Ferguson <neale@sinenomine.net>
7981
7982         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
7983         
7984         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
7985
7986         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
7987         instrument_prolog; Add memory_barrier instruction.
7988
7989 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
7990
7991         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
7992
7993 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
7994
7995         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
7996
7997         * aliasing.c inssel.brg: Fix warnings.
7998
7999         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
8000         could skip initialization of some parts of memory.
8001
8002         * mini.c mini-ia64.c: Fix warnings.
8003
8004         * inssel-sparc.brg: Add an implementation of lneg which actually works.
8005
8006 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
8007
8008         * aliasing.c (mono_build_aliasing_information): Add a workaround for
8009         a crash seen on sparc.
8010
8011         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
8012         
8013         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
8014
8015 2005-12-21 Neale Ferguson <neale@sinenomine.net>
8016
8017         * mini-ops.h: Add s390_backchain instruction
8018
8019         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
8020
8021         * cpu-s390.md: Add s390_backchain instruction
8022
8023         * mini-s390.c: Significant ABI changes
8024
8025         * mini-s390.h: Cater for zero length structures
8026
8027 2005-12-20 Neale Ferguson <neale@sinenomine.net>
8028
8029         * mini-s390.c: ABI fixes
8030
8031         * inssel-s390.brg: Remove debug statements
8032
8033         * cpu-s390.md: Fix length of ATOMIC_xx operations
8034
8035 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
8036
8037         * basic-float.cs: Add float<->long conversion tests.
8038
8039 2005-12-16 Neale Ferguson <neale@sinenomine.net>
8040
8041         * mini-s390.c: Fix LOCALLOC processing.
8042
8043         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
8044
8045 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
8046
8047         * iltests.il: Add tests for some opcodes not covered by the other
8048         tests.
8049
8050 2005-12-15 Neale Ferguson <neale@sinenomine.net>
8051
8052         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
8053         register loading for Tail processing; Correct trace output.
8054
8055         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
8056
8057         * cpu-s390.md: Correct size of jmp instruction. 
8058
8059 2005-12-13 Neale Ferguson <neale@sinenomine.net>
8060
8061         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
8062
8063 2005-12-13 Neale Ferguson <neale@sinenomine.net>
8064
8065         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
8066           Bring s390 up to current level.
8067
8068 2005-12-12  Zltan Varga  <vargaz@gmail.com>
8069
8070         * generics.2.cs: Disable the newly added tests as they do not work yet.
8071         
8072         * generics.2.cs: Add valuetype tests.
8073
8074 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
8075
8076         * basic-long.cs: Add i4->u8 test.
8077
8078         * objects.cs: Add tests for JIT intrinsic.
8079
8080         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
8081         optimizations lost by a mistake.
8082
8083 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
8084
8085         * basic-long.cs: Remove a test moved to objects.cs.
8086
8087         * arrays.cs: Add more array tests.
8088
8089 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
8090
8091         * arrays.cs: Add new tests for multi-dimensional arrays.
8092
8093 2005-12-06  Raja R Harinath  <rharinath@novell.com>
8094
8095         * Makefile.am (test_sources2): Add generics.2.cs.
8096         (EXTRA_DIST): Add test_sources2.
8097
8098 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
8099
8100         Support for boxing and unboxing nullable types as well as the
8101         isinst operation on nullables, per the CLI ammendment.
8102
8103         * inssel.brg (CEE_ISINST): Special case for nullable
8104
8105         * mini.c (handle_unbox_nullable): new method
8106         (handle_box): Special case for nullable types
8107         (mono_method_to_ir): Call handle_unbox_nullable in correct
8108         places.
8109
8110         * generics.2.cs: New test suite
8111
8112         * Makefile.am: Support for regression tests with generics.
8113
8114 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
8115
8116         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
8117         allocated to registers. Fixes #76800.
8118
8119 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
8120
8121         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
8122
8123 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
8124
8125         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
8126         of platforms.
8127
8128 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
8129
8130         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
8131         objects.cs.
8132
8133         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
8134         
8135         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
8136 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
8137
8138         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
8139         single precision before storing to a single precision location.
8140
8141 2005-11-28  Raja R Harinath  <rharinath@novell.com>
8142
8143         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
8144
8145 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
8146
8147         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
8148         correct files.
8149
8150         * basic.cs: Remove test_0_byte_compares test which was moved to
8151         objects.cs a long time ago.
8152
8153 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
8154
8155         * aliasing.c: Fixed aliasing issue on 64 bit archs.
8156
8157 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
8158
8159         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
8160         handlers are called.
8161
8162         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
8163         throwing code.
8164
8165          * mini-ia64.c: Add support for the throw->branch exception 
8166         optimization.   
8167
8168         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
8169
8170 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
8171
8172         * mini.c: Enabled "fastpath" deadce :-)
8173         
8174 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
8175
8176         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
8177         alias analysis pass to support it.
8178         * mini.h: Likewise.
8179         * ssa.c: Likewise.
8180         * liveness.c: Likewise (liveness computation can use aliasing
8181         information to be more accurate).
8182         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
8183         moreover made so that "--compile-all" uses the given optimization
8184         flags and not the default ones.
8185         * aliasing.c: Alias analysis (new file).
8186         * aliasing.h: Likewise.
8187         * Makefile.am: added "aliasing.c" and "aliasing.h".
8188         
8189 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
8190
8191         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
8192         OP_L opcodes.
8193
8194 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
8195
8196         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
8197         fp >= end_of_stack exit condition, as it is not needed, and it might
8198         become true for fp eliminated frames.
8199
8200 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
8201
8202         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
8203         coded offsets.
8204
8205 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
8206
8207         * mini-arm.c: fixed alignment of doubles/longs to match
8208         the C ABI (bug #76635).
8209
8210 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
8211
8212         * aot.c: fix compilation with --enable-minimal=aot.
8213
8214 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
8215
8216         * mini-arm.c: fixed compatibility with the new
8217         floating point emulator package for compares.
8218
8219 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
8220
8221         * mini.c : reverted sig->pinvoke changes (r51396-51397).
8222
8223 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
8224
8225         * mini-exceptions.c (print_stack_frame): Output to stderr.
8226         (mono_handle_native_sigsegv): Ditto.
8227
8228 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
8229
8230         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
8231         OP_LCONV_TO_OVF_I implementation.
8232
8233         * mini-amd64.c: Add support for the throw->branch exception 
8234         optimization.
8235
8236         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
8237         when the catch clause catches a more general exception, i.e. Object.
8238
8239 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
8240
8241         * cpu-ia64.md: Remove unused opcodes.
8242
8243         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
8244         specific defines for architectures defining USE_SIGACTION.
8245
8246         * mini-ia64.c: Fix some warnings.
8247
8248         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
8249         version seemed to skip a frame.
8250
8251 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
8252
8253         * mini.c: Clean up the usage of sig->pinvoke flag. Now
8254         only calls which are made to native code use this flag.
8255
8256 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
8257
8258         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
8259         varargs methods as well.
8260         
8261         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
8262         which have save_lmf set. Reorganize methods prologs a bit.
8263
8264         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
8265         debugger to the proper place.
8266
8267 2005-10-29  Martin Baulig  <martin@ximian.com>
8268
8269         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
8270         when running inside the debugger until the debugger has support
8271         for it.
8272
8273 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
8274
8275         * mini.h: Fix a warning.
8276
8277 2005-10-24  Miguel de Icaza  <miguel@novell.com>
8278
8279         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
8280         we expose publicly, this returns the string.
8281
8282 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
8283
8284         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
8285         with fp elimination.
8286
8287 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
8288
8289         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
8290         native stacktrace using the glibc 'backtrace' function if available.
8291
8292 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
8293
8294         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
8295
8296         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
8297         handle SIGSEGVs received while in native code.
8298
8299         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
8300         code, call mono_handle_native_sigsegv which will abort the runtime
8301         after printing some diagnostics, instead of converting it into a
8302         confusing NullReferenceException.
8303
8304 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
8305
8306         * cpu-pentium.md: Remove unused opcodes.
8307
8308 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
8309
8310         * mini-amd64.h (MonoLMF): Add rsp field.
8311
8312         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
8313         the lmf too.
8314
8315 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
8316
8317         * mini-codegen.c (get_register_spilling): Fix some warnings.
8318
8319 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
8320
8321         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
8322         elimination during exception handling. Enable fp elimination by
8323         default.
8324
8325         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
8326         elimination.
8327
8328 2005-10-16  Martin Baulig  <martin@ximian.com>
8329
8330         * mini-exceptions.c
8331         (mono_debugger_run_finally): New public method for the debugger.
8332
8333 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
8334
8335         * debug-mini.c (mono_debug_init_method): Fix warning.
8336
8337         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
8338         the 'exname' parameter const to fix some warnings.
8339
8340 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
8341
8342         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
8343         introduced by the previous patch.
8344
8345 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
8346
8347         * basic-float.cs: Add test for precision of float arithmetic.
8348
8349         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
8350         when loading/storing single values from/to memory.
8351
8352         * mini.c (mono_jit_compile_method_with_opt): Create the function
8353         pointers in the correct domain.
8354
8355 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
8356
8357         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
8358         introduced by previous patch.
8359         
8360         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
8361         when out_filter_idx is NULL.
8362
8363         * mini-exceptions.c: Don't run filter clauses twice during exception
8364         handling. Fixes #75755.
8365
8366 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
8367
8368         * aot.c: Add support for ldflda wrappers.
8369
8370         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
8371         #75902.
8372
8373 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
8374
8375         * mini.c, mini.h: do not consider exception handlers blocks when
8376         setting up interface variables.
8377
8378 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
8379
8380         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
8381
8382 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
8383
8384         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
8385         causes a regression.
8386
8387         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
8388
8389 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
8390
8391         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
8392         of the OP_P definitions.
8393
8394         * TODO: Add a proposal for dealing with the CEE/OP mess.
8395
8396         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
8397         optimizations from the x86 port.
8398
8399         * cpu-amd64.md: Ditto.
8400
8401         * basic.cs basic-long.cs: Add tests.
8402
8403 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
8404
8405         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
8406         Patrik Torstensson's implementation of my exception-handling
8407         optimization idea, when the exception object is not used
8408         (bug #62150).
8409
8410 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
8411
8412         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
8413         of the mul_imm optimizations from the old jit.
8414
8415 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
8416
8417         * mini.c, liveness.c: patch by Patrik Torstensson and
8418         Zoltan Varga to improve performance in methods with
8419         exception clauses.
8420
8421 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
8422
8423         * driver.c: Remove 'Globalization' entry from --version.
8424
8425 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
8426
8427         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
8428         there is a profiler interested in JIT events.
8429
8430         * aot.c: Load profile files produced by the AOT profiling module, and
8431         reorder methods based on the profiling info. Add a 'method_order' table
8432         to the AOT file to make mono_aot_find_jit_info work with the reordered
8433         methods.
8434
8435         * mini.h: Bump AOT file version info.
8436
8437 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
8438
8439         * mini-arm.h: work around what looks like a gcc bug when optimizations
8440         are enabled.
8441
8442 2005-09-28  Raja R Harinath  <rharinath@novell.com>
8443
8444         * Makefile.am (AM_CFLAGS): Don't use += to append inside
8445         conditionals.  Use ...
8446         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
8447
8448 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
8449
8450         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
8451         to determine the amount of memory to copy when passing valuetypes.
8452
8453         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
8454         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
8455
8456 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
8457
8458         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
8459         information about aot.
8460
8461 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
8462
8463         * *.c: Replace the use of {Enter,Leave}CriticalSection with
8464         macros. This will allow a deadlock debugger to easily be plugged
8465         in.
8466
8467 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
8468
8469         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
8470
8471 2005-09-27  Raja R Harinath  <rharinath@novell.com>
8472
8473         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
8474         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
8475         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
8476         ($(arch_built)) [CROSS_COMPILING]: Error out.
8477
8478 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
8479
8480         * aot.c: Add support for the no_special_static flag for classes.
8481
8482 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
8483
8484         * Reapply reverted patches.
8485
8486         * *: Revert r50174 as well.
8487
8488         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
8489
8490 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
8491
8492         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
8493
8494 2005-09-23  Miguel de Icaza  <miguel@novell.com>
8495
8496         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
8497         part of the SIG_HANDLER_SIGNATURE.  
8498
8499 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
8500
8501         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
8502         statistics.
8503
8504         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
8505         introduced by previous patch.
8506
8507 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
8508
8509         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
8510         saved registers too.
8511
8512         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
8513         upon the information returned by get_call_info ().
8514         
8515         * mini-x86.c (add_float): Fix stack size calculation.
8516         (mono_arch_call_opcode): Rewrite this so it works based up the
8517         information returned by get_call_info ().
8518         (mono_arch_get_this_vret_args): Ditto.
8519
8520 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
8521
8522         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
8523         in cinfo to determine the registers which need to be used.
8524
8525 2005-09-20  Miguel de Icaza  <miguel@novell.com>
8526
8527         * driver.c (mono_main): Add --server and --desktop flags. 
8528
8529 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
8530
8531         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
8532         registers as global registers.
8533
8534         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
8535         longer needed with the new register allocator.
8536
8537         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
8538
8539         * cpu-ia64.md: Remove unused opcodes.
8540         
8541         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
8542         
8543 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
8544
8545         * cpu-amd64.md: Remove unused opcodes.
8546
8547         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
8548         needed with the new register allocator.
8549
8550         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
8551         reg-reg moves.
8552
8553 2005-09-16  Raja R Harinath  <rharinath@novell.com>
8554
8555         * Makefile.am (check-local): Don't invoke semdel-wrapper.
8556
8557 2005-09-16  Martin Baulig  <martin@ximian.com>
8558
8559         * exceptions-amd64.c
8560         (throw_exception): Don't call mono_debugger_throw_exception() if
8561         we're a rethrow - see the FIXME in the code.
8562
8563 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
8564
8565         * mini.c (mono_init_exceptions): This only works on some architectures.
8566         
8567 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
8568
8569         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
8570         on ia64.
8571
8572         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
8573
8574         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
8575         now in mini-exceptions.c.
8576
8577 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
8578
8579         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
8580         now in mini-exceptions.c.
8581
8582 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
8583
8584         * exceptions-x86.c: Applied patch from Patrik Torstensson 
8585         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
8586
8587         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
8588         code into mini-exceptions.c. Add some assertions to it.
8589
8590 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
8591
8592         * aot.c (emit_section_change): Applied patch from "The Software Team" 
8593         (<software@solmersa.com>). Fix as errors on windows.
8594
8595 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
8596
8597         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
8598         method info into the LMF.
8599
8600 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
8601         
8602         * mini-ia64.c: Add proper unwind info for method epilogs.
8603
8604         * exceptions-ia64.c: Add some code to help debugging.
8605         
8606         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
8607
8608         * mini-exceptions.c: Fix warning.
8609
8610 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
8611
8612         * mini.c: Really fix build.
8613
8614         * mini-x86.c mini-amd64.c: Fix build.
8615
8616 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
8617
8618         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
8619
8620         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
8621         some Interlocked methods as intrinsics.
8622
8623         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
8624         for Thread methods as well.
8625
8626         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
8627
8628         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
8629
8630         * mini-ia64.c mini-x86.c mini-amd64.c 
8631         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
8632         OP_MEMORY_BARRIER.
8633         
8634         * mini.c (mono_init_exceptions): Fix build breakage.
8635
8636 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
8637
8638         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
8639         of instructions. Use the new ia64_unw_op macros for emitting unwind
8640         info.
8641
8642         * mini.c (mono_init_exceptions): Initialize exception handling
8643         related trampolines at startup.
8644
8645 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
8646
8647         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
8648
8649 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
8650
8651         * mini.c: Handle type loading errors gracefully during compilation and
8652         throw the appropriate exception.
8653
8654 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
8655
8656         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
8657         for the mono binary.
8658
8659 2005-09-09  Martin Baulig  <martin@ximian.com>
8660
8661         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
8662         the release.
8663
8664 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
8665
8666         * mini-arm.h: use emulation for conv.r.un for the release.
8667
8668 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
8669
8670         * mini-arm.c, objects.cs: more fixes and tests for them.
8671
8672 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
8673
8674         * mini-arm.c: align structures to at least 4 bytes to be able
8675         to keep our current optimized memcpy.
8676
8677 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
8678
8679         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
8680
8681 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8682
8683         * mini.c: ignore SIGPIPE.
8684
8685 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
8686
8687         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
8688
8689         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
8690
8691 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
8692
8693         * mini.h: Add prototype for mono_allocate_stack_slots_full.
8694
8695 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
8696
8697         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
8698         exception handling support.
8699         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
8700         patch by Brian Koropoff <briank@marakicorp.com>).
8701
8702 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
8703
8704         * mini.c: revert another 'optimization' which breaks when
8705         items on the eval stack need to be saved at a basic block end
8706         (bug #75940).
8707
8708 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
8709
8710         * jit-icalls.c: for arrays, ensure we always provide
8711         lower bounds.
8712
8713 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
8714
8715         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
8716         
8717         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
8718
8719 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
8720
8721         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
8722         arguments in their original register.
8723
8724 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
8725
8726         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
8727         memset/memcpy.
8728
8729         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
8730         when ssapre is enabled.
8731
8732         * inssel-long.brg: Fix bug in previous patch.
8733
8734         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
8735         multiplication by a constant.
8736
8737 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
8738
8739         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
8740         icc.
8741
8742         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
8743         saving registers.
8744
8745 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
8746
8747         * inssel-arm.brg: apply changes tested by Brian Koropoff
8748         <briank@marakicorp.com>.
8749
8750 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
8751
8752         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
8753         
8754 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
8755
8756         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
8757         to the same register if dreg is just a base register.
8758         (print_ins): Improve printing of membase opcodes.
8759
8760         * inssel-x86.brg: Add optimized ldind(reg) rules.
8761
8762         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
8763
8764 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
8765
8766         * mini.c: when running under valgrind, set the stack bottom for
8767         the GC at the actual approximate stack for the app (fixes running
8768         mono with valgrind).
8769
8770 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
8771
8772         * mini.c: do no break at the first valuetype to init found
8773         (fixes bug #75791).
8774
8775 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
8776
8777         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
8778
8779 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
8780
8781         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
8782
8783 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
8784
8785         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
8786
8787 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
8788
8789         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
8790
8791         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
8792         code.
8793
8794         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
8795         code.
8796
8797         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
8798         methods.
8799
8800 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
8801
8802         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
8803
8804 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
8805
8806         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
8807         in the tail recursion optimization.
8808
8809         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
8810         debug info into the assembly file.
8811
8812         * iltests.il: Add test for filter regions.
8813
8814         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
8815         initial stack of filter regions. Fixes #75755.
8816
8817 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
8818
8819         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
8820         stack requirements.
8821
8822 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
8823
8824         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
8825         the check for an already compiled method on non-ia64 platforms.
8826         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
8827         proper domain.
8828
8829         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
8830
8831         * inssel-x86.brg: Add some optimized call rules.
8832
8833 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
8834
8835         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
8836         method here.
8837
8838         * mini.h mini-trampolines.c: Pass the trampoline argument to 
8839         mono_arch_patch_delegate_trampoline.
8840
8841         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
8842
8843         * mini-trampolines.c: Fix build.
8844
8845         * mini-amd64.h: Add delegate trampolines.
8846
8847         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
8848
8849         * inssel-amd64.brg: Add optimized call rules.
8850         
8851         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
8852
8853         * inssel-ia64.brg: Add optimized ldind(reg) rules.
8854
8855 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
8856
8857         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
8858         change.
8859
8860         * mini-ia64.c: Remove LMF fixmes.
8861
8862         * mini-ia64.h: Remove most fields from LMF.
8863
8864         * inssel-ia64.brg (stmt): Fix unaligned access errors.
8865
8866         * mini-trampolines.c: Add support for IA64 function descriptors.
8867
8868         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
8869         for IA64 function descriptors.
8870
8871 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
8872
8873         * tramp-arm.c: patch the vtable for virtual calls. Added
8874         support code to register/unregister the LMF.
8875         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
8876         more LMF work.
8877
8878 2005-08-19  Dick Porter  <dick@ximian.com>
8879
8880         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
8881         bit value if needed.
8882
8883 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
8884
8885         * mini.c (mini_get_method): Move handling of wrapper data here.
8886
8887         * mini.c (mono_method_to_ir): Add support for dynamic methods.
8888
8889         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
8890         virtual.
8891
8892         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
8893         bblock->code does not remain empty.
8894
8895 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
8896
8897         * arrays.cs: Add regression test for #75832.
8898
8899         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
8900         rules. Fixes #75832.
8901
8902         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
8903         instruction scheduling.
8904
8905 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
8906
8907         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
8908
8909 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
8910
8911         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
8912
8913         * mini-codegen.c: Fix VC build.
8914
8915         * cpu-pentium.md: Increase length of atomic_exhange_i4.
8916
8917 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8918
8919         * mini.h: fix signature for mono_register_opcode_emulation.
8920
8921 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
8922
8923         * mini.c: Get rid of most of the helper_sig_... constants using
8924         mono_create_icall_signature ().
8925
8926 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
8927
8928         * jit-icalls.c (helper_ldstr): New helper function.
8929
8930         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
8931
8932         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
8933         throw, load the string using a helper call instead of creating a string object.
8934
8935         * aot.c: Update after LDSTR changes.
8936
8937         * mini.h: Bump AOT file version.
8938         
8939         * aot.c: Save class size info into the AOT file. Print more statistics during
8940         compilation.
8941
8942         * mini.h: Bump AOT file version.
8943
8944         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
8945         ordering of disasm cases. Fixes #74957.
8946
8947 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
8948
8949         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
8950         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
8951         the generic code needed for the ARM port.
8952
8953 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
8954
8955         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
8956         inssel-arm.brg: more ARM features and fixes.
8957
8958 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
8959
8960         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
8961         ARM port work in progress.
8962
8963 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
8964
8965         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
8966
8967         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
8968
8969         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
8970
8971         * inssel.brg (mini_emit_memset): Add support for unaligned access.
8972
8973         * *-ia64.*: Ongoing IA64 work.
8974         
8975         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
8976
8977 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
8978
8979         * TODO: Remove out-of-data todo stuff.
8980
8981         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
8982         dead code.
8983
8984         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
8985
8986         * mini.h: Bump corlib version.
8987
8988 2005-07-27  Martin Baulig  <martin@ximian.com>
8989
8990         * mini-codegen.c
8991         (create_copy_ins): Added `const unsigned char *ip' argument; set
8992         `copy->cil_code' from it.
8993
8994 2005-07-27  Martin Baulig  <martin@ximian.com>
8995
8996         * mini-exceptions.c (mono_handle_exception): Don't call
8997         mono_debugger_handle_exception() for filters.
8998
8999 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
9000
9001         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
9002         as well.
9003
9004 2005-07-26  Martin Baulig  <martin@ximian.com>
9005
9006         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
9007
9008         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
9009         helper_compile_generic_method() if the method is actually virtual
9010         and non-final.
9011
9012 2005-07-26  Martin Baulig  <martin@ximian.com>
9013
9014         * mini.c
9015         (trampoline_code): Renamed to `mono_trampoline_code' and made it
9016         public; this is now accessed directly by the debugger.
9017         (mono_generic_trampoline_code): Removed.
9018
9019         * debug-mini.c
9020         (mono_debug_init_method): Also add interncalls and wrappers.
9021
9022 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
9023
9024         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
9025
9026 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
9027
9028         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
9029
9030 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
9031
9032         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
9033
9034 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
9035
9036         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
9037         getting TLS offsets on AMD64 too.
9038
9039 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
9040
9041         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
9042
9043 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
9044
9045         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
9046         inssel-arm.brg, mini-arm.h: ARM port work in progress.
9047
9048 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
9049
9050         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
9051
9052         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
9053         to mini.c.
9054
9055         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
9056         mono_sparc_is_virtual_call ().
9057         
9058         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
9059
9060         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
9061         trampoline parameters.
9062
9063         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
9064         
9065         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
9066         to mono_arch_get_vcall_slot_addr.
9067
9068         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
9069         trampoline code.
9070
9071         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
9072
9073 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
9074
9075         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
9076
9077 2005-07-19  Martin Baulig  <martin@ximian.com>
9078
9079         * exceptions-amd64.c (throw_exception): Call
9080         mono_debugger_throw_exception() here like we're doing it on i386.
9081
9082 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
9083
9084         * mini-ia64.c: Add optimized TLS access support.
9085
9086 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
9087
9088         * mini-exceptions.c: Ongoing IA64 work.
9089
9090         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
9091
9092         * mini.c: Use the default optimization set when embedding. Fixes
9093         #75194.
9094
9095 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
9096
9097         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
9098         of trampolines to a separate file.
9099
9100         * mini-trampolines.c: New file.
9101
9102         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
9103         separate file.
9104         
9105         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
9106         amd64/ia64 code.
9107
9108         * mini-codegen.c: Fix cygwin build.
9109
9110 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
9111
9112         * mini.c: Add some minor changes needed by the IA64 port.
9113
9114         * *-ia64.*: Ongoing IA64 work.
9115
9116 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
9117
9118         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
9119         trampolines into arch-independent and arch-dependent parts.
9120
9121         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
9122
9123 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
9124
9125         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
9126
9127         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
9128         the xp-regalloc-branch for amd64.
9129
9130         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
9131         xp-regalloc-branch for x86.
9132
9133 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
9134
9135         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
9136
9137 2005-07-06  Martin Baulig  <martin@ximian.com>
9138
9139         * mini.c
9140         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
9141         (mono_jit_runtime_invoke): Likewise.
9142
9143 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
9144
9145         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
9146         on x86 too.
9147         
9148         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
9149         without loading their metadata. Reorganize the file format so exception handling+
9150         debug info is kept separate from normal method info. Create MonoJitInfo 
9151         structures for methods lazily.
9152
9153         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
9154         loading metadata.
9155         (x86_class_init_trampoline): Patch AOT class init trampolines too.
9156
9157         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
9158
9159         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
9160         in AOT code.
9161
9162         * mini.h: Bump AOT file version.
9163
9164 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
9165
9166         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
9167
9168 2005-07-01  Raja R Harinath  <rharinath@novell.com>
9169
9170         * Makefile.am (check-local): Call semdel-wrapper.
9171
9172 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
9173
9174         * mini-x86.c: Revert the last change as it seems to break the build..
9175
9176 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
9177
9178         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
9179         
9180         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
9181
9182 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
9183
9184         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
9185         outside of the macro, so strange stuff doesn't happen with gcc4
9186         (NEW_AOTCONST_TOKEN): Likewise.
9187
9188 2005-06-28  Martin Baulig  <martin@ximian.com>
9189
9190         * mini.c (mini_class_is_system_array): New static method; use this
9191         instead of `klass->parent == mono_defaults.array_class' everywhere
9192         since this also works for the new generic array class.
9193
9194 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
9195
9196         * inssel.brg: Remove warnings.
9197
9198 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
9199
9200         * mini-ia64.c: Ongoing IA64 work.
9201
9202         * basic-float.cs: Add float->i1 conversion test.
9203
9204         * iltests.il: Add conv.u4 test.
9205
9206 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
9207
9208         * inssel-long.brg: Fix bug caused by last change.
9209
9210 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
9211
9212         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
9213         BSDs.  Allows the x86 JIT to work on OSX86
9214
9215 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
9216
9217         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
9218         u4->i8 conversion.
9219
9220         * mini-ia64.c: Ongoing IA64 work.
9221
9222 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
9223
9224         * mini-ia64.c: Ongoing IA64 work.
9225
9226         * driver.c: Clean up jit_code_hash as well when using --regression.
9227
9228         * inssel-long.brg: Fix long->i4/u4 conversion rules.
9229
9230         * basic-long.cs: Add tests for long->u4 conversion.
9231
9232 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
9233
9234         * mini.c: Take mono_get_domainvar out of macros. This makes sure
9235         that we do not depend on undefined C behavior: the order stuff
9236         gets evaluated within an expression. Fixes mono when compiled on
9237         GCC 4.
9238
9239 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
9240
9241         * *-ia64.*: Ongoing IA64 work.
9242
9243         * aot.c: Lower memory usage while loading AOT methods.
9244
9245         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
9246
9247         * mini.h: Bump AOT file format version.
9248
9249 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
9250
9251         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
9252
9253 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
9254
9255         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
9256         not on callee assembly). Fixed some comments.
9257
9258 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
9259
9260         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
9261         it gets proper disassembly.
9262         (emit_method_info): Remove some dead code.
9263
9264         * mini.c (mini_method_compile): Allways allocate the GOT var in
9265         mono_method_to_ir for emulating opcodes.
9266
9267 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
9268
9269         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
9270         before freeing the code memory. Fixes #74990.
9271
9272         * objects.cs: Add regression test for #74992.
9273
9274         * liveness.c: Extend live ranges of arguments to the beginning of the
9275         method. Fixes #74992.
9276
9277         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
9278         so it points into the faulting instruction.
9279
9280 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
9281
9282         * jit-icalls.c (mono_imul_ovf): Add exception handling.
9283
9284         * *-ia64.*: Ongoing IA64 work.
9285
9286         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
9287
9288 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
9289
9290         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
9291
9292         * *-ia64.*: Ongoing IA64 work.
9293
9294 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
9295
9296         * basic-long.cs: Add tests for add/sub.ovf.
9297
9298         * basic.cs: Add tests for sub.ovf.
9299
9300         * *-ia64.*: Ongoing IA64 work.
9301
9302 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
9303
9304         * *-ia64.*: Ongoing IA64 work.
9305
9306         * basic.cs: Add conv.ovf.i4.un test.
9307
9308 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
9309
9310         * mini.c: (remove_block_if_useless) Fixed bug 75061.
9311         
9312 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9313
9314         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
9315
9316 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
9317
9318         * *-ia64.*: Ongoing IA64 work.
9319
9320 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9321
9322         * trace.[ch]:
9323         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
9324
9325 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
9326
9327         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
9328
9329 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
9330
9331         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
9332
9333         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
9334         of a call is callable by a near call.
9335
9336 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
9337
9338         * mini-ia64.c: Ongoing IA64 work.
9339
9340 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
9341
9342         * genmdesc.c: Make the generated array non-static.
9343
9344         * inssel-long.brg: Fix LSHR_IMM rule.
9345
9346         * *-ia64.*: Ongoing IA64 work.
9347
9348         * *-ia64.*: Ongoing IA64 work.
9349
9350 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
9351
9352         * *-ia64.*: Ongoing IA64 work.
9353
9354         * *-ia64.*: Ongoing IA64 work.
9355         
9356         * mini-ia64.c: Ongoing IA64 work.
9357
9358         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
9359
9360 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
9361
9362         * objects.cs basic-calls.cs: Move some tests to objects.cs.
9363         
9364         * objects.cs basic-long.cs: Move some tests to objects.cs.
9365
9366 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
9367
9368         * *-ia64.*: Ongoing IA64 work.
9369
9370         * iltests.il: Add a new test.
9371
9372         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
9373         newobj. Fixes #75042.
9374
9375 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
9376
9377         * *-ia64.*: Ongoing IA64 work.
9378         
9379         * *-ia64.*: Ongoing IA64 work.
9380         
9381         * *-ia64.*: Ongoing IA64 work.
9382
9383         * basic.cs objects.cs: Move tests accessing static variables as well.
9384
9385         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
9386
9387 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
9388
9389         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
9390
9391         * driver.c: Always print failed tests.
9392
9393         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
9394         frame pointer.
9395
9396         * *ia64*: Ongoing IA64 work.
9397
9398 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
9399
9400         * basic.cs: Add tests for add.ovf. Fix warnings.
9401
9402 2005-05-18  Miguel de Icaza  <miguel@novell.com>
9403
9404         * driver.c (mono_main): Avoid crash if no argument is passed to
9405         --break;  Do not use g_error, but f_printf.   And fix all other
9406         ocurrences of the same crash.
9407
9408 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
9409
9410         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
9411         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
9412         Fixes #74742.
9413
9414 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
9415
9416         * *-ia64.*: Add beginnings of IA64 backend.
9417
9418         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
9419
9420 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
9421
9422         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
9423         Fixes #74925.
9424
9425         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
9426
9427         * mini-amd64.c: Fix a warning.
9428
9429 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
9430
9431         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
9432         in float_neg. Fixes #74897.
9433
9434         * mini-amd64.c (emit_call): Fix another near call bug.
9435
9436 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
9437
9438         * declsec.c: Keep the appdomain information in the structure. Added a 
9439         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
9440         value gets overwritten).
9441         * declsec.h: Set the default MonoArray for the the stack to 6. Added
9442         an MonoAppDomain member to MonoSecurityFrame.
9443         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
9444         used in the stack walk. Now use a MonoArray which grow (double) when
9445         it gets full.
9446
9447 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
9448
9449         * mini.c: Re-enabled runtime cleanup, since running threads should
9450         now properly stop when exiting.
9451
9452 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
9453
9454         * mini-codegen.c: New file contaning the arch-independent local
9455         register allocator. Not used by any architectures yet.
9456
9457         * mini.h linear-scan.c: Merge some changes from the 
9458         mini-xp-local-regalloc branch.
9459
9460 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
9461
9462         * mini-amd64.c (emit_call): Fix calls to native functions when the
9463         runtime is compiled as a shared library. Fixes #74756.
9464
9465         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
9466         on a literal field. Fixes #74751.
9467
9468 2005-04-25  Raja R Harinath  <rharinath@novell.com>
9469
9470         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
9471
9472 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
9473
9474         * objects.cs: Add missing null casting test.
9475
9476 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
9477
9478         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
9479         in wrapper methods. Also rename 'address' variable to 'offset'.
9480
9481 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
9482
9483         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
9484         warnings.
9485         
9486         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
9487
9488         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
9489         work on windows.
9490
9491 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
9492
9493         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
9494
9495 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
9496
9497         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
9498         just the last bytes.
9499
9500 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
9501
9502         * aot.c (mono_compile_assembly): Fix warning.
9503
9504         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
9505         by the _MSC_VER stuff.
9506
9507 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
9508
9509         * inssel-long.brg: Fix #74588.
9510
9511         * cpu-amd64.md: Fix #74591.
9512
9513         * iltests.il: Add new regression tests.
9514
9515 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
9516
9517         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
9518         valuetype.
9519
9520 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
9521
9522         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
9523
9524         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
9525         from Bill Middleton <flashdict@gmail.com>.
9526
9527 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
9528
9529         * arrays.cs: Add new regression test. Fix warnings.
9530
9531 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
9532
9533         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
9534         and leakage in CKFINITE.
9535
9536         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
9537         this to a null op since it is called on amd64 too.
9538
9539         * exceptions-amd64.c (get_throw_trampoline): Align stack.
9540
9541         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
9542         body since this is not used on amd64.
9543         
9544         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
9545
9546         * mini-amd64.c: Remove obsolete fixmes.
9547
9548         * mini.c (print_method_from_ip): Fix debugging support.
9549
9550 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
9551
9552         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
9553         so that expressions that don't give much gain are not reduced.
9554         * ssapre.h: Likewise.
9555
9556 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
9557
9558         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
9559
9560         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
9561
9562         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
9563
9564 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
9565
9566         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
9567
9568         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
9569
9570 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
9571
9572         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
9573         stack touching.
9574
9575         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
9576
9577         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
9578
9579         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
9580
9581         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
9582         MONO_ARCH_USE_SIGACTION. Fixes #74252.
9583
9584         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
9585
9586         * mini-x86.c: Fix up stack overflow handling.   
9587
9588         * exceptions.cs: Add new regression test.
9589
9590 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
9591
9592         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
9593         mono_jit_thread_attach.
9594
9595         * mini.c (mono_method_to_ir): Verify called method is not abstract.
9596
9597 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
9598
9599         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
9600         avoid calling constructors using callvirt.
9601
9602         * inssel.brg: Fix #74073.
9603
9604 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
9605
9606         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
9607         compilation with non-GCC compilers.
9608         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
9609         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
9610
9611 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
9612
9613         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
9614         klass->interface_offsets (will likely fix bug#74073).
9615
9616 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
9617
9618         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
9619
9620 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
9621
9622         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
9623         to amd64_div_reg_size ().
9624         
9625         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
9626
9627 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
9628
9629         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
9630
9631 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
9632
9633         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
9634
9635 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
9636
9637         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
9638         
9639         * mini.c (mono_precompile_assembly): Load and precompile referenced
9640         assemblies as well. Fixes #74015.
9641
9642 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
9643
9644         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
9645
9646 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
9647
9648         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
9649         a lot of checks and (anyway) permissions cannot work until corlib is 
9650         loaded.
9651
9652 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
9653
9654         * mini-ppc.c: fixed ABI issue on sysv/ppc.
9655
9656 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
9657
9658         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
9659         calls (fixes bug#72824).
9660
9661 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
9662
9663         * mini.c: fix tail recursion elimination (see test in bug#73936).
9664
9665 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
9666
9667         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
9668         some fp functions in sse2 mode.
9669
9670 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
9671
9672         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
9673
9674 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
9675
9676         * mini.h mini.c: Add mono_get_jit_tls_key ().
9677
9678         * mini-x86.c: Enable fast TLS support on windows.
9679
9680 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
9681
9682         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
9683         * mini.c: Check for p/invoke method when generating code. If a
9684         p/invoke method, or it's class, isn't decorated with [Suppress
9685         UnmanagedCodeSecurity] then generate code to call System.Security.
9686         UnmanagedDemand (only if the security manager is active).
9687
9688 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
9689
9690         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
9691         last change as it seems to cause strange crashes.
9692         
9693 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
9694
9695         * *.c: handle unsafe function pointers where needed.
9696
9697 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
9698
9699         * mini.c (mono_jit_free_method): Remove the fixme too.
9700
9701 2005-03-15  Miguel de Icaza  <miguel@novell.com>
9702
9703         * mini.c: As discussed, make the code actually free the delegate
9704         thunk now, to enable the debugging of delegate problems, use
9705         MONO_DEBUG=1 when running Mono. 
9706
9707         This takes also care of parts of the leaks as seen by Joe.
9708
9709 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
9710
9711         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
9712         thread_tls_offset calculation.
9713
9714 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
9715
9716         * declsec.c: Reworked linkdemand checks for icall. The previous code
9717         was using the declaration code (untrusted) and didn't work as expected
9718         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
9719         specific case.
9720
9721 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
9722
9723         * iltests.il: Add new localloc test.
9724
9725         * mini-amd64.c: Handle large stack allocations the same way as on
9726         windows if stack overflow handling is working.
9727         
9728         * mini-amd64.c: Allocate the signal stack using mmap.
9729
9730         * mini.c (sigsegv_signal_handler): Fix reading of context.
9731
9732         * mini-exceptions.c: Fix up stack overflow handling.
9733
9734         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
9735
9736         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
9737
9738         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
9739
9740         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
9741
9742         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
9743         tramp_init functions as they are no longer needed.
9744
9745 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
9746
9747         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
9748         
9749         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
9750
9751         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
9752         
9753         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
9754         support that now.
9755
9756         * mini-ops.h: Add OP_LMUL_IMM.
9757
9758         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
9759         long mul/div opcodes as intrinsic.
9760
9761         * mini-amd64.c (emit_call): Handle the case when the callee might be
9762         an AOT method.
9763
9764 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
9765
9766         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
9767         extra safe.
9768         
9769         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
9770
9771         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
9772
9773 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
9774
9775         * mini.c (mono_codegen): Don't leak here, to help people running
9776         monogrind.
9777
9778 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
9779
9780         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
9781         conversions in sse2 mode.
9782
9783         * basic-float.cs: Add regression test.
9784         
9785         * mini-amd64.c: Reenable sse2.
9786
9787 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
9788
9789         * mini-amd64.c: Disable sse2 until some regressions are fixed.
9790
9791 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
9792
9793         * driver.c: Copyright text should include 2005.
9794         
9795 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
9796
9797         * cpu-amd64.md (load_membase): Fix more max lengths.
9798
9799 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
9800
9801         * cpu-amd64.md (load_membase): Fix max length.
9802
9803         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
9804
9805         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
9806
9807         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
9808         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
9809
9810         * basic-float.cs: Add rounding regression test.
9811
9812         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
9813
9814 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
9815
9816         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
9817         structures in registers for pinvoke wrappers.
9818
9819 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
9820
9821         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
9822
9823 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
9824
9825         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
9826         wrapper to mono_jit_thread_attach.
9827
9828         * mini.c (mini_jit_thread_attach): New jit icall.
9829
9830         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
9831         native->managed wrappers.
9832
9833         * exceptions.cs: Add new regression test.
9834
9835         * mini.c (optimize_branches): Check regions in the cbranch to throw
9836         block case as well. Fixes #73242.
9837
9838 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
9839
9840         * mini.c: thread safety fixes.
9841
9842 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
9843
9844         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
9845         patching stuff, since delegates use jump trampolines so there is
9846         no caller.
9847
9848         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
9849         jump trampolines.
9850         
9851         * tramp-amd64.c: Fix build.
9852
9853         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
9854         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
9855
9856         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
9857         Rename this to mono_arch....
9858         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
9859
9860         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
9861
9862         * mini-amd64.c (emit_call): If both the caller and the callee is
9863         guaranteed to have 32 bit addresses, emit a normal call.
9864
9865         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
9866
9867         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
9868         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
9869         method_ptr inside delegates.
9870
9871 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
9872
9873         * mini.c (mono_jit_free_method): Free the method info even if the native code is
9874         invalidated. Fixes #73001.
9875
9876         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
9877
9878         * mini-x86.c: Only use stdcall for pinvokes on windows.
9879
9880 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
9881
9882         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
9883         * mini-x86.c: remove unreliable __thread var offset detection,
9884         use the correct accessors and enable by default.
9885
9886 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
9887
9888         * mini.c (mono_jit_free_method): Fix memory leak.
9889
9890 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
9891
9892         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
9893
9894 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
9895
9896         * cpu-amd64.md: Fix lengths of atomic opcodes.
9897
9898 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
9899
9900         * driver.c: try to not imply using ICU is any good.
9901
9902 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
9903
9904         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
9905         functions as inline ops.
9906
9907         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
9908         some Interlocked functions as inline ops.
9909
9910         * mini.c (move_basic_block_to_end): Fix bug in last patch.
9911
9912         * mini.h (MonoBasicBlock): Reorganize fields a bit.
9913
9914         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
9915
9916         * mini.c: Add support for OP_NOT_TAKEN.
9917
9918         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
9919         structures in registers for pinvoke wrappers.
9920
9921         * mini-amd64.c: Fix warnings.
9922
9923 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
9924
9925         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
9926
9927         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
9928
9929         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
9930         address instead of loading the address from it.
9931
9932         * mini-x86.c: Add support for returning small structs in registers
9933         on Win32. Fixes part of #70864.
9934         
9935 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
9936
9937         * trace.c (get_token): Improve error checking.
9938
9939 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
9940
9941         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
9942
9943 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
9944  
9945         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
9946         it can be reused for MonoClass.
9947         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
9948         _LINKDEMAND.
9949
9950 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
9951
9952         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
9953         instead of a MonoReflectionMethod. The method information wasn't used
9954         when displaying SecurityException details (but will be now).
9955
9956 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
9957
9958         * Makefile.am : windows build fix.
9959
9960 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
9961
9962         * iltests.il: Add new regression test.
9963
9964         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
9965         #72522.
9966
9967 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
9968  
9969         * mini.c: Moved linkdemand check into helper function check_linkdemand
9970         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
9971         LDFTN, LDVIRTFTN).
9972
9973 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
9974
9975         * declsec.c: Added statistics counter for different kinds of 
9976         LinkDemands.
9977         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
9978         (and commented) declaration.
9979         * mini.c: Added statistics counter for security Demand code 
9980         generation. Added display of security statistics.
9981
9982 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
9983
9984         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
9985         Fix compilation errors under gcc-2.95.
9986
9987 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
9988
9989         * mini.c, driver.c: Use the new jit trampoline hashtable
9990
9991 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
9992
9993         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
9994
9995 2005-02-11  Martin Baulig  <martin@ximian.com>
9996
9997         * debug-mini.c (mono_debug_close_method): Free the line number array.
9998
9999 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
10000
10001         * aot.c: Break up large methods into smaller ones. Share GOT slots for
10002         icalls.
10003
10004         * mini.h: Bump AOT file format version. 
10005
10006 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
10007
10008         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
10009         APTC and P/Invoke.
10010         * declsec.h: Added macros to get/set lazyly initialized security 
10011         informations about assemblies. Added new enum for different type of
10012         possible LinkDemand violation. Added function to check LinkDemands.
10013         * mini.h: Added a field to MonoCompile to hold any security violation
10014         detected when JITting a method (so it can be thrown later).
10015         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
10016         and CEE_CALLVIRT. Added code to throw exception at the end of
10017         mini_method_compile (note: the exception is unhandled right now).
10018
10019 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
10020
10021         * mini.c, jit-icalls.c: use the managed implementation of
10022         memset for initobj and memset, to avoid managed <-> unmanaged
10023         transitions.
10024
10025 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
10026
10027         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
10028         optimization if it would need a GOT var.
10029
10030         * basic.cs: Add tests for constant propagation and switch statements.
10031
10032         * ssa.c: Fix out-of-range constant propagation and switch statements.
10033
10034 2005-02-09    <vargaz@freemail.hu>
10035
10036         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
10037
10038 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
10039
10040         * cpu-amd64.md (load_membase): Fix max length of load_membase.
10041
10042 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10043
10044         * mini.c: update to new signature of mono_class_get_allocation_ftn().
10045
10046 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
10047
10048         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
10049         arithmetic operations.
10050
10051 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
10052
10053         * mini-ppc.c: add a workaround for broken user code that
10054         DllImports vararg functions with non-vararg signatures.
10055
10056 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
10057
10058         * mini.c (mono_jit_compile_method_inner): Add detection and a 
10059         meaningfull error message for assemblies written in Managed C++.
10060
10061         * tramp-amd64.c mini-amd64.h: Add support for 
10062         create_trampoline_from_token ().
10063
10064         * aot.c mini-x86.c abcremoval.c: Applied patch from
10065         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
10066
10067 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
10068
10069         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
10070         which takes a MonoImage/token as parameter instead of a MonoMethod.
10071
10072         * aot.c: Use the new trampoline for initializing vtables.
10073
10074         * aot.c: Add support for ldfld/stfld_remote wrappers.
10075
10076         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
10077         rules for compare <MEM>, IMM.
10078
10079         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
10080
10081         * aot.c: Handle inherited finalizers correctly.
10082
10083 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
10084
10085         * inssel.brg (stmt): Add a missing _setup_... ().
10086
10087         * aot.c: Save some parts of the class state to the AOT file and use it
10088         to recompute that state when a class is initialized.
10089
10090         * mini.c: Install AOT hooks into the runtime.
10091
10092         * mini.h: Bump AOT file format version.
10093         
10094         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
10095         Fixes #72148.
10096
10097         * iltests.il: Add new test.
10098
10099 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
10100
10101         * mini.c: fix typo.
10102
10103 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
10104
10105         * mini.c: setup the statistical profiler in the thread attach
10106         callback to cope with the new single thread code.
10107
10108 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
10109
10110         * mini-ppc.c: ensure we have enough room for the profiler
10111         calls (fixed bug#72084).
10112
10113 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
10114
10115         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
10116         it.
10117
10118 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10119
10120         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
10121
10122 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10123
10124         * ssapre.c: Fixed an issue with down safety (this allows IronPython
10125         to succesfully execute parrotbench).
10126         * ssapre.h: Likewise.
10127
10128 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10129
10130         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
10131         variable for stores to method arguments (fixes a SSAPRE issue).
10132
10133 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
10134
10135         * mini.c: handle value types in dup, fixes gen-112.cs.
10136
10137 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
10138
10139         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
10140         sequence for calls in dynamic methods to avoid thunks.
10141
10142 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
10143
10144         * mini.c: correctly remove dynamic methods from the hashtable.
10145
10146 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
10147
10148         * driver.c: Disabled SSAPRE until fix the bug that appears
10149         in IronPython's parrotbench.
10150
10151 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
10152
10153         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
10154
10155         * mini.c (mono_method_to_ir): Revert the previous change.
10156         
10157         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
10158         when AOT compiling.
10159
10160         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
10161         mono_jit_info_table_find () etc. when running under valgrind.
10162
10163         * inssel.brg: Fix warnings.
10164
10165         * mini-exceptions.c: Fix warnings.
10166
10167 2005-01-31  Martin Baulig  <martin@ximian.com>
10168
10169         * driver.c (compile_all_methods_thread_main): Don't try to compile
10170         generic methods or anything which has type parameters.
10171
10172 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
10173
10174         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
10175
10176         * TestDriver.cs: Add --verbose flags.
10177
10178         * graph.c ssa.c: Fix 64 bit warnings.
10179         
10180         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
10181         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
10182         Fix 64 bit warnings.
10183
10184         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
10185         variable not spotted by gcc.
10186         
10187         * mini-amd64.c inssel-amd64.brg: Applied patch from  
10188         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
10189         X86_COMPARE_MEMBASE opcodes.
10190
10191         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
10192
10193 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
10194
10195         * *: MonoMethod->signature might be NULL now. You *MUST* use
10196         mono_method_signature.
10197
10198 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
10199
10200         * driver.c (compile_all_methods_thread_main): Compile the methods
10201         without invoking cctors.
10202
10203 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
10204
10205         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
10206         * basic-calls.cs: test for the above.
10207
10208 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
10209
10210         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
10211         MonoJitInfo changes.
10212
10213 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
10214
10215         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
10216         eagerly if it contains dynamic methods.
10217         
10218         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
10219
10220         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
10221         trace, it is now computed by an icall from trace_ips.
10222         
10223         * mini-exceptions.c: Fix a warning.
10224
10225 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
10226
10227         * mini-exceptions.c: don't bother getting stack trace info if
10228         it's not going to be used.
10229
10230 2005-01-27  Raja R Harinath  <rharinath@novell.com>
10231
10232         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
10233         ssapre-mini-ops.h.
10234
10235 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
10236
10237         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
10238
10239         * aot.c: Avoid calling mono_method_get_header () if not needed.
10240
10241         * mini.h: Bump AOT file format version.
10242         
10243         * mini.c (mono_emit_native_call): Allocate a GOT var here.
10244
10245         * mini.c (mono_print_tree): Print more info for calls.
10246
10247 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
10248
10249         * declsec.h: Remove warning by adding missing include for marshal.h
10250
10251 2005-01-26  Martin Baulig  <martin@ximian.com>
10252
10253         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
10254         `ip' twice.
10255
10256 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
10257
10258         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
10259         flags.
10260
10261         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
10262
10263         * aot.c (mono_compile_assembly): Fix a warning.
10264
10265 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
10266
10267         * declsec.c: Look for security attributes on the original MonoMethod 
10268         (and not the wrapped one). This fix permissions on icalls.
10269
10270 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
10271
10272         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
10273
10274         * mini.c (mono_allocate_stack_slots): Add a fixme.
10275
10276         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
10277
10278 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
10279
10280         * inssel.brg: optimize casts of sealed types (more
10281         optimizations waiting for fixes in remoting).
10282
10283 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
10284
10285         * inssel.brg (stmt): Add another dummy rule.
10286
10287         * driver.c: Fix warnings.
10288
10289         * driver.c (mono_main): If running under valgrind, instruct glib to use
10290         the system allocation functions so valgrind can track the memory
10291         allocated by the g_... functions.
10292
10293         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
10294
10295         * mini-ops.h: Add OP_DUMMY_STORE opcode.
10296
10297         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
10298
10299         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
10300         variables in try regions.
10301
10302         * mini.c (mini_method_compile): Don't disable optimizations on large
10303         methods when AOT compiling.
10304
10305         * mini.c (mono_allocate_stack_slots): New arch independent method to 
10306         allocate stack slots. Not yet used.
10307
10308 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
10309
10310         * debug-mini.c (mono_debug_close_method): Plug some leaks.
10311
10312 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
10313
10314         * mini-ppc.c: make the branch info relative as the code
10315         buffer can be reallocated.
10316
10317 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
10318
10319         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
10320         * driver.c: Removed the AOT/security restriction. Now initialize the
10321         security manager (in metadata) if --security is used.
10322         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
10323         rather than the pointer to declarative security, when AOT is used.
10324
10325 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
10326
10327         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
10328         basic blocks, reduced intrinsic exception throwing code size.
10329
10330 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
10331
10332         * driver.c (mini_usage): Reorder the usage screen.
10333
10334 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
10335
10336         * mini.c (mono_resolve_patch_target): Fix warning.
10337
10338 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
10339
10340         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
10341         previous patch.
10342
10343         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
10344
10345         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
10346         breaks the amd64 build.
10347
10348         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
10349         register allocation. Fixes #71454.
10350
10351         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
10352
10353         * arrays.cs: Add new regression test.   
10354
10355 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
10356
10357         * ssapre.c: Turned usage of snprintf to GString.
10358         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
10359         (I left it on by mistake in my previous commit).
10360
10361 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
10362
10363         * mini.c, cfold.c, basic-calls.cs: preserve side effects
10364         on cond branch optimization (fixes bug# 71515).
10365
10366 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
10367
10368         * abcremoval.c: Fixed bug 71062.
10369         * abcremoval.h: Likewise.
10370
10371 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
10372
10373         * mini.c: Added a new functionality to optimize_branches, the removal
10374         of useless basic blocks, and fixed some problem in the removal of
10375         critical edges; some utility functions added for both purposes.
10376         * ssapre.c: Added complex expression support, and fixed bug 70637.
10377         * ssapre.h: Likewise.
10378         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
10379         enabled in SSAPRE.
10380         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
10381         * driver.c: Re-enabled SSAPRE.
10382
10383 2005-01-19  Martin Baulig  <martin@ximian.com>
10384
10385         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
10386         the result of mono_get_method_constrained().
10387
10388 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
10389
10390         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
10391         manager.
10392
10393 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
10394
10395         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
10396         be detected.  Fixes #59296.
10397
10398 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
10399
10400         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
10401         which can happen. Fixes #71361.
10402
10403 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
10404
10405         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
10406         manager.
10407
10408 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
10409
10410         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
10411         appdomain-unload.exe to fail.
10412         
10413         * mini.c: Fix some memory leaks.
10414
10415 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
10416
10417         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
10418         Fixed bug and sped up some codepaths.
10419
10420 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
10421
10422         * mini.c: Fix some memory leaks.
10423
10424         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
10425         conversion.
10426
10427         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
10428
10429         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
10430         #71320.
10431
10432         * iltests.il: Add regression test for #71320.
10433
10434 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
10435
10436         * mini.c (mono_codegen): Fix installation of profiler hooks.
10437
10438         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
10439
10440 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
10441
10442         * mini.h, mini.c, cfold.c: optimize access to enum
10443         readonly fields, too. Eval conditional branches if possible
10444         to perform unreachable code removal in more cases.
10445
10446 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
10447
10448         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
10449
10450         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
10451         code manager.
10452
10453         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
10454         WinXP DEP. Fixes #71244.
10455
10456 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
10457
10458         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
10459
10460 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
10461
10462         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
10463
10464 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
10465
10466         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
10467         changes.
10468
10469         * mini.h: Bump AOT version.
10470
10471         * mini.h (MonoCompile): Change exvar to a hash table.
10472
10473         * mini.c: Allocate a separate exvar for each handler block.
10474
10475         * mini.c: Get rid of the computation of filter_lengths, its not needed.
10476
10477         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
10478         ex var with the pending exception and only throw if the two are equal.
10479         Fixes #68552.
10480         
10481         * exceptions.cs: Add tests for rethrow and nested catch clauses.
10482
10483         * mini-x86.c: Fix warnings.
10484
10485         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
10486         used by all the ports now.
10487
10488         * aot.c: Add write-symbols and save-temps options.
10489
10490 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
10491
10492         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
10493
10494 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
10495
10496         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
10497         operations.
10498
10499         * tramp-s390.c: Check vtable slot belongs to the domain.
10500
10501         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
10502         as per other platforms.
10503
10504         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
10505
10506 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
10507
10508         * driver.c: we don't run the Main() code in a subthread anymore.
10509
10510 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
10511
10512         * mini.c: added experimental rtc support in the statistical
10513         profiler: if the user has the permission, more accurate statistics
10514         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
10515         The MONO_RTC value must be restricted to what the linux rtc allows:
10516         power of two from 64 to 8192 Hz.
10517
10518 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
10519
10520         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
10521
10522 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
10523
10524         * mini-ppc.c: better icache flush for smp.
10525
10526 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
10527
10528         * mini-amd64.c (emit_move_return_value): Fix memory leak.
10529
10530         * mini-x86.c (get_call_info): Add the get_call_info () code from the
10531         amd64 port, not yet used.
10532
10533 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
10534
10535         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
10536         a struct type.
10537
10538 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
10539
10540         * driver.c: Added --security option to activate the security manager.
10541         Right now this will allow code generation for declarative demands and
10542         is disabled when AOT is specified.
10543         * mini.c: Add code generation for declarative security demands.
10544         * mini.h: Add mono_use_security_manager as an extern gboolean.
10545
10546 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
10547
10548         * aot.c (mono_compile_assembly): Speed up compilation a bit by
10549         emitting more dense assembly code.
10550
10551         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
10552         exception throwing stuff.
10553
10554 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
10555
10556         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
10557         dead code.
10558
10559         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
10560         left in by mistake.
10561
10562         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
10563         fixed.
10564
10565         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
10566
10567         * tramp-*.c: Only patch vtable slots if the object is in the current
10568         domain. Fixes appdomain-unload.exe.
10569
10570         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
10571         
10572         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
10573         x86 branch.
10574
10575 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
10576
10577         * mini.c (reverse_branch_op): New helper function.
10578
10579         * mini.c (optimize_branches): Run the new optimization only on 
10580         platforms which support it. Also reverse all kinds of branches.
10581
10582         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
10583
10584         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
10585         a throw statement.
10586
10587         * mini.c (optimize_branches): Reverse not-equals branches if the false
10588         bblock is a throw. This happens a lot of time with argument checking in
10589         corlib.
10590
10591         * mini.c (mono_codegen): Add support for placing basic blocks after
10592         the function epilogue.
10593
10594         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
10595         function epilogue.
10596         
10597 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
10598
10599         * mini.c (setup_stat_profiler): Only set this up if the platform
10600         supports ITIMER_PROF.
10601
10602 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
10603
10604         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
10605         previous patch.
10606
10607         * inssel.brg: Fix a warning.
10608
10609 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
10610
10611         * mini.c: added support for statistical profiler 
10612         (run with: --profile=default:stat).
10613
10614 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
10615
10616         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
10617
10618         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
10619
10620         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
10621         related to global registers from the amd64 port.
10622
10623 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
10624
10625         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
10626
10627         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
10628         with global registers.
10629         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
10630
10631         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
10632
10633 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
10634
10635         * debug-mini.c (encode_value): Fix off-by-one.
10636
10637         * aot.c (encode_value): Likewise.
10638
10639         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
10640
10641 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
10642
10643         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
10644         AOT.
10645
10646         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
10647         
10648         * aot.c (emit_method_info): Increase size of temp buffer.
10649
10650         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
10651         the AOT case.
10652
10653 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
10654
10655         * aot.c (emit_method_info): Fix build.
10656         
10657         * aot.c: Further rework of the AOT file format to reduce the size of
10658         the method info data.
10659
10660         * mini.h: Bump AOT file format version.
10661
10662 2004-12-27  Martin Baulig  <martin@ximian.com>
10663
10664         * mini.c (mini_get_method): New static method; call
10665         mono_get_method_full() and mono_get_inflated_method().
10666         (mono_method_to_ir): Use mini_get_method() instead of
10667         mono_get_method_full(). 
10668
10669 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
10670
10671         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
10672
10673 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
10674
10675         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
10676
10677         * inssel-amd64.brg: Add some optimization rules.
10678
10679 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
10680
10681         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
10682         standard not GC'd stuff is fine.
10683
10684 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
10685
10686         * aot.c: Rework the AOT file format to get rid of most of the global
10687         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
10688
10689         * mini.h: Bump AOT file format version.
10690         
10691 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
10692
10693         * mini.h: Bump AOT file format version.
10694
10695         * aot.c (mono_aot_is_got_entry): New function to determine if an 
10696         address is inside a GOT.
10697
10698         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
10699
10700         * cpu-pentium.md: Increase the maximum size of some instructions which
10701         might involve a got access.
10702         
10703         * mini.c (get_method_from_ip): Another debug helper function.
10704
10705         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
10706         when got var accesses are created during the decompose phase.
10707
10708         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
10709
10710         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
10711         argument mini_compile_method and to MonoCompile, and use this to
10712         determine whenever a given method is compiled for AOT. This allows the
10713         other methods compiled during AOT compilation to be free of AOT stuff,
10714         so the backends does not need to add special support for them by
10715         creating a fake GOT etc.
10716
10717         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
10718         longer needed.
10719
10720 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
10721
10722         * mini.c (mono_method_to_ir): It turns out that some of the
10723         x-appdomain wrappers are lax with types, so just ignore this for
10724         all wrappers.
10725
10726         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
10727         at the vtable->klass. If it is non-shared code we can just use the
10728         vtable.
10729
10730 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
10731
10732         * mini-ppc.c: access MonoDomain from tls, too.
10733
10734 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
10735
10736         * declsec.c: Removed unused variable (and related warning ;-)
10737
10738 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
10739
10740         * iltests.il: New test for LDELEMA on an array of ref types.
10741
10742         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
10743         all ldelema's on reftypes.
10744         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
10745         it was the wrong place to put it.
10746
10747         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
10748         register to pop to make this cleaner, at the request of Paolo.
10749
10750 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
10751
10752         * mini-ops.h (OP_GETHASHCODE): New op.
10753
10754         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
10755
10756         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
10757         operation.
10758
10759         For a microbenchmark, this reduces the cost of Hashtable.get_Item
10760         by 25%.
10761         
10762         * mini-x86.c (mono_arch_output_basic_block): Rather than
10763
10764         add ebp, 4
10765
10766         Emit
10767
10768         pop edx
10769
10770         The first is 3 bytes while the second is 1. This saves 36 kb on
10771         mscorlib, quite a big saving. When bootstraping mcs, I was able to
10772         see a small boost because of icache locality.
10773
10774         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
10775
10776 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
10777
10778         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
10779         started code sharing with the generic code.
10780
10781 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
10782
10783         * mini-ppc.c, cpu-g4.md: added code for direct access to
10784         tls data slots.
10785
10786 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
10787
10788         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
10789          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
10790         to OP_TLS_GET.
10791
10792 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
10793
10794         * declsec.c|h: Added functions to cache the declarative stack modifiers
10795         in MonoJitInfo and to create a security frame from a MonoJitInfo 
10796         structure.
10797         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
10798         created. Register internal calls for System.Security.SecurityFrame::
10799         _GetSecurityFrame and _GetSecurityStack.
10800         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
10801         the definitions for the new stack walk/callback mechanism.
10802         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
10803         first security frame for LinkDemands and InheritanceDemands) and
10804         GetSecurityStack for Demands. Both use the new mono_walk_stack code
10805         from lupus.
10806         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
10807         walk initialization (lupus).
10808
10809 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
10810
10811         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
10812         idiom.
10813         (handle_loaded_temps): Do not create a temporary variable for
10814         things that we know are temps. They will never be modified.
10815         (mono_spill_call): Set MONO_INST_IS_TEMP
10816         (mono_emulate_opcode): ditto
10817         (emit_tree): ditto
10818         (mono_method_to_ir.CEE_DUP): ditto
10819
10820 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
10821
10822         * mini.c (type_to_eval_stack_type): Make this handle the void type
10823         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
10824         (emit_tree): use ip_in_bb to special case some common idioms
10825         Update all callers to pass in the IP.
10826         (mono_method_to_ir): Make CEE_CALL* do the above as well.
10827
10828         This gives us a nice 2% speedup in mcs bootstrap.
10829
10830         * mini-x86.c (peephole_pass): Peephole pass to make
10831         mov  [foo], eax
10832         push [foo]
10833
10834         into
10835
10836         mov [foo], eax
10837         push eax
10838
10839         * mini.c (ip_in_bb): new method.
10840         (mono_method_to_ir): use this method rather than doing the hash
10841         lookup ourselves.
10842
10843         * linear-scan.c (mono_linear_scan): When expiring actives, you
10844         don't need to keep around variables that expire on this
10845         instruction. This makes it so that:
10846              a = b + 1
10847         will turn into:
10848              store (ebx add (ebx, 1))
10849         which will become
10850              add ebx, 1
10851
10852 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
10853
10854         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
10855         combination to avoid doing two copies. Fix up problems with previous
10856         patch.
10857
10858         * mini.c: Fix 64 bit warnings.
10859
10860         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
10861
10862 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
10863
10864         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
10865         changes from the x86 code.
10866
10867         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
10868
10869 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
10870
10871         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
10872         throwing code to reduce its size, unify the AOT and non-aot code and 
10873         get rid of relocations in the AOT case.
10874
10875         * mini-x86.h mini.c exceptions-x86.c 
10876         (mono_arch_get_throw_corlib_exception): New arch specific function to 
10877         raise corlib exceptions which doesn't require relocations in the 
10878         caller.
10879
10880         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
10881
10882 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
10883
10884         * mini.c (mono_emit_method_call): Only allocate the got var when it is
10885         needed.
10886
10887         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
10888         in the AOT case.
10889
10890 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
10891
10892         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
10893         with add function when used from Inc/dec atomic 
10894         functions. Re-enabled optimization on x86.
10895         * mini-ops.h: renamed atomic_add functions to
10896         allow _add to match the Interlocked::Add and
10897         _add_next to match Interlocked::Inc/Dec.
10898
10899 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
10900
10901         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
10902         linking of BBs to the end BB, and enabled SSAPRE also with
10903         consprop and copyprop (which was prevented by that bug).
10904
10905 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
10906
10907         * mini-x86.c: disabling the Interlocked optimizing code. 
10908
10909 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
10910
10911         * aot.c (load_aot_module): Move reading of got_addr after the AOT
10912         file version check.
10913         
10914 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
10915
10916         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
10917         interlocked optimization due lack of support on x86, rewrote 
10918         exchange to take into account that base may be in eax.
10919         
10920         xsp works again; activated Interlocked optimizing code.
10921         
10922 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
10923
10924         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
10925
10926 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
10927
10928         * mini-ops.h: Add new opcodes.
10929
10930         * mini.h: Add new patch types. Add got_var to MonoCompile.
10931
10932         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
10933         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
10934         make it work with all kinds of patchable code.
10935
10936         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
10937         address of the GOT, and referencing entries in the GOT.
10938
10939         * mini.c: Add code to load the GOT address if needed by an opcode.
10940
10941         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
10942         independent AOT code on the x86 using an elf-style Global Offset Table.
10943
10944 2004-12-14  Raja R Harinath  <rharinath@novell.com>
10945
10946         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
10947
10948 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10949
10950         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
10951         when running xsp.
10952
10953 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
10954
10955         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
10956         of Interlocked:Increment/Decrement/Add as inline ops.
10957         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
10958
10959 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
10960
10961         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
10962         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
10963
10964 2004-12-12  Duncan Mak  <duncan@ximian.com>
10965
10966         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
10967         again. `patch_info->table_size' is no longer valid after Zoltan's
10968         commit #37636.
10969
10970 2004-12-12  Martin Baulig  <martin@ximian.com>
10971
10972         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
10973         if we are the "real" method, ie. not an inlined method inside it.
10974
10975 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
10976
10977         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
10978         before we look in the special fields table. This fixes
10979         ../tests/thread-static-init.cs.
10980
10981 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10982
10983         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
10984         for Array get_Rank and get_Length. Fixes bug #70465.
10985
10986 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
10987
10988         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
10989         separate structure to reduce the size of MonoJumpInfo.
10990
10991 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
10992
10993         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
10994
10995 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
10996
10997         * mini.c (mini_get_inst_for_method): Changed to allow ports
10998         to return a MonoInst instead of opcode 
10999         (renamed mini_get_opcode_for_method to better reflect the new functionality)
11000         
11001         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
11002         Allow ports to return a created MonoInst instead of op-code, will enable
11003         new optimizations.
11004         (renamed mini_get_opcode_for_method to better reflected the functionality)
11005
11006 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
11007
11008         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
11009
11010 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
11011
11012         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
11013         Fixes #69985.
11014
11015 2004-12-08  Martin Baulig  <martin@ximian.com>
11016
11017         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
11018         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
11019
11020 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
11021
11022         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
11023         correctly.
11024
11025         * exceptions.cs: Disable some tests which depend on properties of x86 fp
11026         arithmetic.
11027
11028 2004-12-08  Raja R Harinath  <rharinath@novell.com>
11029
11030         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
11031
11032 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
11033
11034         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
11035         bug introduced by the previous patch.
11036
11037 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
11038
11039         * mini-ppc.c, objectc.cs: handle large structs passed by value
11040         (fixes bug #69972).
11041
11042 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
11043
11044         * mini-ppc.c: OP_ARGLIST implementation from
11045         Geoff Norton  <gnorton@customerdna.com>.
11046
11047 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
11048
11049         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
11050         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
11051
11052 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
11053
11054         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
11055
11056 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11057
11058         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
11059         support.
11060
11061 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
11062
11063         * mini-sparc.c: Zero out localled-ed memory.
11064
11065         * iltests.il: Add tests for zeroing out localloc-ed memory.
11066
11067 2004-12-04  Martin Baulig  <martin@ximian.com>
11068
11069         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
11070         mono_method_get_signature_full().       
11071
11072 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
11073
11074         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
11075         and some utility functions (always for SSAPRE), integrated SSAPRE.
11076         * mini.h: Likewise.
11077         * driver.c: Added ssapre option.
11078         * ssa.c: Small fix on OP_ARG handling.
11079         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
11080         * Makefile.am: Likewise.
11081
11082 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
11083
11084         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
11085         now in the xp code.
11086
11087         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
11088         icall.
11089
11090 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11091
11092         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
11093         
11094         * cpu-s390.md : Increase instruction length of oparglist.
11095
11096         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
11097
11098 2004-11-30  Martin Baulig  <martin@ximian.com>
11099
11100         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
11101         virtual generic methods.  We call a special helper_compile_generic_method()
11102         icall to retrieve the method from the vtable, inflate and compile
11103         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
11104
11105         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
11106
11107 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
11108
11109         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
11110
11111 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
11112
11113         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
11114         Fixes #69929.
11115
11116 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
11117
11118         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
11119         platforms with PIC aot.
11120
11121 2004-11-28  Martin Baulig  <martin@ximian.com>
11122
11123         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
11124         Fixes gen-112.cs.
11125
11126 2004-11-28  Martin Baulig  <martin@ximian.com>
11127
11128         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
11129         the result of mono_type_get_underlying_type() to check whether
11130         we're byref.
11131
11132 2004-11-26  Martin Baulig  <martin@ximian.com>
11133
11134         * mini.c
11135         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
11136         in the g_assert().
11137
11138 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
11139
11140         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
11141         the same way as the other arguments so they won't get clobbered.
11142
11143         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
11144         calls through R11 since it is clobbered by the trampoline code.
11145
11146 2004-11-26  Raja R Harinath  <rharinath@novell.com>
11147
11148         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
11149         pick up in-tree mscorlib.dll.
11150
11151 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
11152
11153         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
11154
11155         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
11156         runtime data/code are now stored in a table similar to the GOT in ELF. 
11157         This allows the code itself to be position independent.
11158
11159         * aot.c: Fix loading of referenced assemblies after the lazy assembly
11160         loading changes.
11161
11162         * aot.c: Attach ELF type (object/function) directives to all global
11163         symbols.
11164
11165         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
11166
11167         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
11168
11169         * mini-amd64.h: Turn on PIC AOT code.
11170
11171         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
11172         returning the offset within an OP_AOTCONST instruction where the GOT
11173         offset needs to be added.
11174
11175         * mini.h: Bump AOT file format version.
11176
11177 2004-11-25  Martin Baulig  <martin@ximian.com>
11178
11179         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
11180         uninflated generic methods.
11181
11182 2004-11-25  Martin Baulig  <martin@ximian.com>
11183
11184         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
11185
11186 2004-11-24  Martin Baulig  <martin@ximian.com>
11187
11188         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
11189         original klass (this only applies for generic instances).
11190
11191 2004-11-24  Martin Baulig  <martin@ximian.com>
11192
11193         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
11194         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
11195         that array).
11196
11197 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
11198
11199         * mini.c (mono_method_to_ir): Disable inlining for methods containing
11200         localloc. Fixes #69678.
11201
11202         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
11203         
11204 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
11205
11206         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
11207         used SSE registers on pinvoke calls. Fixes #69774.
11208
11209 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
11210
11211         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
11212         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
11213
11214 2004-11-23  Raja R Harinath  <rharinath@novell.com>
11215
11216         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
11217         Refer directly to the mcs/ tree.
11218
11219 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11220
11221         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
11222         Check if a trampoline for a synchronized method is required. 
11223
11224 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
11225
11226         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
11227         with localloc if needed. Throe arithmetric exception in
11228         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
11229         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
11230
11231 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
11232
11233         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
11234         types before switching on type.  Fixes #69622.
11235
11236 2004-11-19  Raja R Harinath  <rharinath@novell.com>
11237
11238         * Makefile.am (check-local): New.  Integrate into 'make check'.
11239         (MCS,RUNTIME): Define using in-tree mono and mcs.
11240         (ILASM): New.
11241         (%.exe): Use $(ILASM).
11242
11243 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
11244
11245         * mini-ppc.c: adjust initial prolog size (bug #69691).
11246
11247 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
11248
11249         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
11250         #69664.
11251
11252 2004-11-17  Raja R Harinath  <rharinath@novell.com>
11253
11254         * Makefile.am (clean-local): Rename from 'clean'.
11255
11256 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11257
11258         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
11259         to mono_arch_is_int_overflow. 
11260         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
11261         SIGFPE events.
11262
11263 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
11264
11265         * declsec.c|h: New files to support declarative security attributes.
11266         Added function to check if a method has (applicable) security.
11267         * mini.c|h: Add check for declarative security attributes in
11268         mono_method_check_inlining.
11269         * Makefile.am: Added declsec.c and declsec.h to the build.
11270
11271 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
11272
11273         * mini.c, mini.h: update to keep dynamic code info per-domain.
11274
11275 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
11276
11277         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
11278         (mini_init): Get rid of it from here too.
11279
11280 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
11281
11282         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
11283         implemented OP_RETHROW (patch by Geoff Norton
11284         <gnorton@customerdna.com>).
11285
11286 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
11287
11288         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
11289         between appdomains.  Fixes appdomain-unload on PPC.
11290
11291 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
11292
11293         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
11294         mini-exceptions.c: handle the new wrapper types.
11295         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
11296         token value as a MonoClass* when compiling a wrapper.
11297         mono_jit_create_remoting_trampoline now takes an additional
11298         MonoRemotingTarget parameter.
11299         
11300 2004-11-10  Martin Baulig  <martin@localhost>
11301
11302         * mini.c (mono_method_to_ir): Use `generic_container->context'
11303         rather than creating a new one.
11304
11305 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11306
11307         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
11308
11309         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
11310
11311 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
11312
11313         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
11314         the experimental aot cache stuff.
11315
11316 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
11317
11318         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
11319         mini-exceptions.c: update to exception clause structure changes.
11320
11321 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
11322
11323         * exceptions-x86.c (throw_exception): Fix warnings.
11324
11325         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
11326         for OP_RETHROW.
11327
11328 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
11329
11330         * exceptions-sparc.c (get_throw_exception): Really fix this.
11331
11332 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
11333
11334         * tramp-*.c: we no longer support icalls without wrappers, so
11335         a bit of code can be removed here
11336
11337 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
11338
11339         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
11340         patch.
11341
11342         * cpu-sparc.md: Add op_rethrow.
11343
11344         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
11345
11346         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
11347
11348         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
11349         * mini-ops.h: Add OP_RETHROW.
11350
11351         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
11352
11353         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
11354
11355 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
11356         
11357         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
11358         Makes the output much easier to read
11359
11360 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
11361
11362         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
11363         prevents another huge leak when compiling with ssa. Secondly, the
11364         performance of doing this rather than freeing the lists is much
11365         better. GList does a lock every time you allocate a list link,
11366         so that it can use a memory pool. So, it is better to just use
11367         a memory pool of our own.
11368         
11369         * ssa.c, linear-scan.c: replace g_list_remove_link with
11370         g_list_delete.  The remove one does not free the GList, so we were
11371         leaking memory. On -O=all --compile-all with corlib, this cut down
11372         3 MB of allocations.
11373
11374 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
11375
11376         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
11377
11378         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
11379
11380         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
11381         into a new function mono_create_jit_trampoline ().
11382
11383 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
11384
11385         * trace.c (get_spec): Allow tracing of classes without a namespace.
11386
11387 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
11388
11389         * mini.c: Fix pointer overwrite in mini_method_compile.
11390
11391 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
11392
11393         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
11394         The darwin ABI needs some special handling for 1 and 2 byte structs
11395         Lets use lbz/lhz instead of lwz everywhere.
11396         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
11397         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
11398         Use stb/sth for the former, and put the latter always on stack instead of in
11399         argument registers.
11400
11401 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
11402
11403         * trace.c (is_filenamechar): Add '_'.
11404
11405 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
11406
11407         * mini-s390.c: Fix prolog length to allow for large trace requirements.
11408
11409         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
11410
11411 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
11412
11413         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
11414         depends on libmonogc. Fixes #68805.
11415
11416 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
11417
11418         * mini.c (mono_jit_free_method): Provide extra information for
11419         this error.  Currently this leaks, but will be turned into a
11420         developer option in the future.
11421
11422 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
11423
11424         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
11425
11426 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
11427
11428         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
11429         boundary. Fixes reading of PATCH_INFO_R4 and R8.
11430         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
11431
11432 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
11433
11434         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
11435         trampolines for AOT code.
11436
11437 2004-10-22    <vargaz@freemail.hu>
11438
11439         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
11440         constructed types. Fixes #68136.
11441
11442 2004-10-21  Martin Baulig  <martin@ximian.com>
11443
11444         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
11445         if it returns true, unwind the stack to the call instruction.
11446
11447 2004-10-21    <vargaz@freemail.hu>
11448
11449         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
11450
11451         * mini.h: Bump AOT version number.
11452
11453         * objects.cs: Add another test for unbox trampolines.
11454
11455         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
11456         valuetype methods.
11457
11458 2004-10-20    <vargaz@freemail.hu>
11459
11460         * driver.c: Add SHARED to the set of optimizations tested.
11461
11462         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
11463
11464         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
11465         used by CEE_NEWARR.
11466
11467         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
11468
11469 2004-10-20  Martin Baulig  <martin@ximian.com>
11470
11471         * mini-exceptions.c (mono_handle_exception): Call
11472         mono_debugger_handle_exception() to tell the debugger about
11473         catch/finally clauses.
11474
11475 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
11476
11477         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
11478
11479         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
11480         #68447.
11481
11482 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
11483
11484         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
11485         methods as their native size, fixed bug #57543, #57545.
11486         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
11487         This saves a temporary register and mullw call down into 1 (minor perf
11488         increase for cases like sum = sum * 5;  This use to translate into:
11489             li r11,5
11490             mullw r28,r28,r11
11491         It now translates to
11492             mulli r28,r28,5
11493
11494 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
11495
11496         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
11497         #68388.
11498
11499 2004-10-11  Martin Baulig  <martin@ximian.com>
11500
11501         * mini.c (mono_method_to_ir): If we're a generic method, get the
11502         MonoGenericContainer from our MonoMethodNormal and create a
11503         MonoGenericContext from it.
11504
11505 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
11506
11507         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
11508
11509         * basic-long.cs: Add test for checked i8->i2 cast.
11510
11511 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11512
11513         * inssel-ppc.brg: added a couple of speedup rules.
11514
11515 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
11516
11517         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
11518         to speed up rebuilds.
11519
11520 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11521
11522         * mini-s390.c: Minor fix to OP_OR_IMM.
11523
11524 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
11525
11526         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
11527         better. Fixes appdomain-unload.exe on sparc.
11528
11529 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
11530
11531         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
11532         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
11533         see bug 67324.
11534
11535 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
11536
11537         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
11538
11539 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
11540
11541         * mini.c: Always generate a field read/write wrapper for members
11542         of the class MarshalByRefObject since the actual instance could
11543         be a CBO.
11544
11545 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
11546
11547         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
11548
11549 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
11550
11551         * driver.c mini.h trace.c: Move the setting of the main assembly into
11552         a separate function called mono_trace_set_assembly () and call it after
11553         actually loading the main assembly. Fixes #66872.
11554
11555 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
11556
11557         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
11558         using the code manager.
11559
11560 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
11561
11562         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
11563
11564 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
11565
11566         * cpu-amd64.md: Fix bug in previous patch.
11567         
11568         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
11569         #66650.
11570
11571 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
11572
11573         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
11574         mini-exceptions.c: updates for changed stack walk interface.
11575
11576 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11577
11578         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
11579
11580 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
11581
11582         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
11583
11584 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
11585
11586         * driver.c (mini_regression_list): Do not call mono_assembly_close 
11587         since assemblies can't be unloaded.
11588         
11589 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
11590
11591         * cpu-amd64.md: Fix more instruction lengths.
11592
11593         * cpu-amd64.md: Fix lengths of some instructions.
11594
11595 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
11596
11597         * inssel.brg: Make the array ldelema check aot friendly.
11598
11599 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
11600
11601         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
11602
11603         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
11604
11605 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
11606
11607         * mini-x86.c: Fix build.
11608
11609         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
11610         mono_type_get_underlying_type () helper function to simplify code.
11611         
11612 2004-09-09  Martin Baulig  <martin@ximian.com>
11613
11614         * mini-amd64.c: Don't access `type->data.klass' directly, call
11615         mono_class_from_mono_type() instead since the type may be a
11616         generic instance.
11617
11618 2004-09-09  Martin Baulig  <martin@ximian.com>
11619
11620         * mini-amd64.c (get_call_info): Fix support for generic instances.
11621         (add_valuetype): Use mono_class_from_mono_type() to get the class
11622         since we can be a generic instance.
11623
11624 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
11625
11626         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
11627
11628 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
11629
11630         * liveness.c: reset spill costs on each scan: bug 62107
11631
11632 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
11633
11634         * exceptions-sparc.c (mono_arch_find_jit_info): remove
11635         unnecessary line that doesn't compile
11636
11637 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
11638
11639         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
11640         trampolines, make them call an error function so people can fix their
11641         code.
11642
11643 2004-09-06  Martin Baulig  <martin@ximian.com>
11644
11645         * mini.c (mono_method_to_ir): When initializing locals, handle a
11646         generic instances like a valuetype if it's a valuetype and like a
11647         class if it's a class.
11648
11649 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
11650
11651         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
11652         stack. Fixes #64674.
11653
11654         * exceptions.cs: Add test for unwinding of call arguments.
11655
11656 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
11657
11658         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
11659         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
11660         set the carry/borrow flag). The sparc and s390 implementations
11661         can now use optimized versions (and simplify the code). ppc bugfixes.
11662
11663 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
11664
11665         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
11666
11667 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
11668
11669         * inssel-amd64.brg: Remove leftover 32 bit rule.
11670
11671         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
11672
11673 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
11674
11675         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
11676         mono_arch_find_jit_info functions into a new function. Fix a memory
11677         leak.
11678
11679         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
11680         refactored code.
11681         
11682 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
11683
11684         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
11685         as well.
11686         
11687         * exceptions.cs: Add array size tests.
11688
11689         * mini.c: Allocate a separate icall wrapper for each arity of 
11690         mono_array_new_va. Fixes #59509.
11691
11692         * exceptions.cs: Add testcase for 64578.
11693
11694         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
11695
11696         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
11697         
11698 2004-09-02  Martin Baulig  <martin@ximian.com>
11699
11700         * mini.c (mono_method_to_ir): When initializing the locals, call
11701         handle_initobj() on the generic instance itself, not its
11702         underlying type.
11703
11704 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
11705
11706         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
11707         MonoJitInfo for dynamic methods.
11708
11709         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
11710
11711         * mini.c: Add support for freeing JIT data for dynamic methods.
11712         
11713 2004-09-01  Martin Baulig  <martin@ximian.com>
11714
11715         * mini-x86.c (is_regsize_var): Added support for generic
11716         instances.
11717         (mono_arch_emit_prolog): Make this compile again, use
11718         `x86_push_imm_template (code)'.
11719
11720 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
11721
11722         * mini-x86.c: make all push_imm instructions that get
11723         patched always emit the long form
11724
11725 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
11726
11727         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
11728         in a per-domain hash.
11729
11730         * mini-amd64.c (merge_argument_class_from_type): Handle generic
11731         types.
11732
11733 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
11734
11735         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
11736         work.
11737         
11738         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
11739         work.
11740
11741         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
11742         Beginnings of SSE2 support.
11743
11744         * exceptions.cs: Add more tests for checked int<->uint casts.
11745
11746 2004-08-28  Martin Baulig  <martin@ximian.com>
11747
11748         * mini-x86.c (mono_arch_instrument_epilog): Added support for
11749         generic instances.
11750
11751         * mini.c
11752         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
11753         Handle generic instances recursively.
11754
11755 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
11756
11757         * iltests.il: test for conv.u8 on a constant
11758
11759 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
11760
11761         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
11762         LCONV_x4 (shrun_32 (membase)).
11763
11764 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
11765
11766         * inssel-x86.brg: c&p rules for push/setret of long
11767
11768 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
11769
11770         * inssel-x86.brg: c&p rules for compare (base, regvar) and
11771         compare (regvar, base)
11772
11773         * inssel-x86.brg: more burg love
11774
11775         * inssel.brg: more cleanup
11776
11777         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
11778
11779 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
11780
11781         * basic-long.cs, basic-calls.cs: new tests for optimization.
11782
11783 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
11784
11785         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
11786         patch.
11787
11788 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
11789
11790         * mini-amd64.c (read_tls_offset_from_method): Add another case.
11791         
11792 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
11793
11794         * inssel.brg (mini_emit_memcpy): use 
11795         NO_UNALIGNED_ACCESS to disable memcpy optimization
11796
11797 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
11798
11799         * mini-amd64.c: Handle generic types in various places.
11800
11801         * mini.c (mono_method_to_ir): Handle generic types in init locals.
11802
11803 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
11804
11805         * mini.c (handle_box): Fix warning.
11806
11807         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
11808
11809         * mini-amd64.h: Enable the emit_state optimization.
11810
11811         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
11812
11813         * mini-amd64.c: Add some new 64 bit peephole opts.
11814
11815         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
11816
11817         * cpu-amd64.md: sreg1 of div instructions must be %rax.
11818
11819         * mini-amd64.c: Register allocator fixes.
11820
11821         * mini.c: Add an optimization to emit_state to avoid allocation of new
11822         registers on some platforms.
11823
11824 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
11825
11826         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
11827
11828         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
11829         allocation. Fixes #63085.
11830
11831         * basic-long.cs: Add new regression test.
11832
11833         * mini-amd64.c: Register allocator improvements.
11834
11835 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
11836
11837         * mini-amd64.c (read_tls_offset_from_method): Add another code
11838         sequence.
11839
11840         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
11841         instruction sequence for nullifying class init trampolines.
11842
11843         * objects.cs: Add new regalloc test.
11844
11845         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
11846
11847 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
11848
11849         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
11850         
11851         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
11852         arguments.
11853
11854         * driver.c: Fix profiling after TLS changes.
11855         
11856         * driver.c (mono_main): Set mono_stats.enabled if needed.
11857
11858         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
11859         CEE_BOX.
11860
11861 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
11862
11863         * mini-x86.c: use a 1 op rather than a 2 op tls access
11864         instruction -> faster.
11865
11866 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
11867
11868         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
11869         x86 backend.
11870
11871 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
11872
11873         * exceptions-sparc.c (throw_exception): fix typo
11874
11875 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
11876
11877         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
11878         set tree->dreg correctly with tls. Allow any
11879         register to be used.
11880
11881         * mini-x86.c (read_tls_offset_from_method): add new code
11882         generation pattern seen with GCC.
11883
11884
11885 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
11886
11887         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
11888         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
11889         exceptions-sparc.c: fix some performance issues in exception
11890         handling and setting of the stack trace for exceptions that were
11891         already thrown.
11892
11893 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
11894
11895         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
11896         x86 backend.
11897         
11898         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
11899         registers.
11900
11901 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
11902
11903         This patch inlines tls access, when possible.
11904         
11905         * mini.h: new arch functions for TLS intrinsics.
11906         All platforms updated with a stub.
11907
11908         * mini.c: use the new intrinsics
11909
11910         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
11911         arch specific intrinsic for tls variables
11912
11913 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
11914
11915         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
11916         under windows.
11917
11918 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
11919
11920         * mini.c: thread local allocation
11921
11922 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
11923
11924         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
11925
11926         * Makefile.am: Link against the static version of libmonogc.
11927         
11928         * Makefile.am: Link the static versions of the convenience libraries
11929         into the mono executable.
11930
11931         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
11932
11933 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
11934
11935         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
11936         on integer overflow.
11937
11938         * mini-amd64.c: Reorganize function call code.
11939
11940         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
11941
11942 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
11943
11944         * inssel-x86.brg: use xor eax,eax.
11945         
11946         * basic.cs: new tests
11947
11948 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
11949
11950         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
11951         in exception throwing code.
11952         
11953 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
11954
11955         * inssel-x86.brg: use xor esi,esi.
11956
11957 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
11958
11959         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
11960         can trace methods compiled during mini_init () too.
11961
11962         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
11963         CEE_CONV_U4.
11964
11965 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
11966
11967         * Makefile.am: static link on x86 (r=zoltan)
11968
11969 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
11970
11971         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
11972         code since it causes some programs to fail.
11973
11974 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
11975
11976         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
11977
11978 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
11979
11980         * mini.c: ovfops_op_map - add STACK_OBJ case for
11981         CONV_I 
11982         * basic.cs: add test_0_pin_string as test
11983         case for above.
11984
11985 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
11986
11987         * Makefile.am: build C# if srcdir != builddir
11988
11989 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
11990
11991         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
11992         fall-through blocks.
11993
11994 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
11995
11996         * driver.c: enable loop by default again and include abcrem in -O=all.
11997
11998 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
11999
12000         * iltests.il: Add some localloc tests.
12001
12002         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
12003
12004         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
12005         Fixes #62574.
12006
12007         * inssel-amd64.brg: Add some optimizations.
12008
12009         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
12010         for gcc-3.4.
12011
12012         * Makefile.am: Statically link mono against libmono on AMD64.
12013         
12014         * mini-amd64.c inssel-amd64.brg: Optimizations.
12015
12016 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
12017
12018         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
12019
12020         * tramp-amd64.c: Patch calling code in trampolines.
12021
12022 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
12023
12024         * mini-amd64.c: pinvoke struct passing fixes.
12025
12026 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
12027
12028         * mini-sparc.c: redo change, make mono_arch_cpu_init call
12029         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
12030
12031 2004-08-05  Duncan Mak  <duncan@ximian.com>
12032
12033         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
12034         CEE_LDELEM_ANY.
12035
12036 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
12037
12038         * mini-amd64.c (emit_move_return_value): Move return value for normal
12039         calls too.
12040
12041 2004-08-05  Martin Baulig  <martin@ximian.com>
12042
12043         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
12044         `type->type'; just modify `type' itself when dealing with enums
12045         and generic instances.
12046         (check_call_signature): Make `simple_type' a `MonoType *'.
12047
12048 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
12049
12050         * mini.c: Use OP_PADD to add offsets to addresses.
12051
12052         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
12053
12054 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
12055
12056         * mini-sparc.c (mono_arch_emit_epilog): fix check
12057         for folding last op into restore instruction
12058
12059 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
12060
12061         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
12062         helper methods using the code manager.
12063         
12064         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
12065
12066         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
12067
12068 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12069         
12070         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
12071           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
12072
12073         * mini-s390.c: fix tail processing
12074
12075 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
12076
12077         * mini-ppc.c: mul.ovf.un exception name fix.
12078
12079 2004-08-03  Martin Baulig  <martin@ximian.com>
12080
12081         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
12082         instances; before jumping to `handle_enum', also modify `ptype'.
12083
12084 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
12085
12086         * cpu-sparc.md: fcall maximal length too small.
12087
12088 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
12089
12090         * mini-amd64.c mini.h: Add initial support for passing/returning 
12091         structures to/from pinvoked methods.
12092
12093 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
12094
12095         * mini-ppc.c: reg allocator fix.
12096
12097 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
12098
12099         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
12100
12101         * inssel.brg: Optimize memset on 64 bit machines.
12102
12103         * mini-amd64.c: Fix some vararg cases.
12104
12105 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12106
12107         * mini-s390.c: Corrected macro in emit_float_to_int
12108
12109         * s390-abi.cs: Tests to exercise the s390 ABI
12110
12111 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
12112
12113         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
12114         caller saved regs.
12115
12116         * basic.cs: Add a test for add.ovf.un.
12117
12118 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
12119
12120         * mini-sparc.c: add case for OP_IDIV_UN
12121
12122 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
12123
12124         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
12125         
12126         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
12127
12128 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
12129
12130         * basic.cs: regression tests.
12131
12132         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
12133         regressions.
12134
12135 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
12136
12137         * basic.cs: Add a new test.
12138
12139         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
12140         and AOT. Various fixes and optimizations.
12141
12142         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
12143
12144 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
12145
12146         * mini-ppc.c: make sure temp regs are not used for global reg
12147         allocation.
12148
12149 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
12150
12151         * cpu-sparc.md: conv_i8 fix for 64bits
12152
12153         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
12154
12155 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
12156         
12157         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
12158         add opcode for cmp BYTE PTR [eax], imm.
12159
12160         * inssel.brg: Make memcpy and memset takes bases.
12161
12162 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
12163
12164         * *-amd64.*: More AMD64 work.
12165         
12166 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
12167
12168         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
12169         add a compare-not-equal opcode.
12170         
12171 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
12172
12173         * mini.c: Use mono_init_from_assembly instead of mono_init.
12174         
12175 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
12176
12177         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
12178
12179         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
12180
12181         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
12182
12183         * inssel.brg: 64 bit fixes.
12184
12185         * mini.h (MonoCallInst): Add some AMD64 specific data.
12186
12187         * mini.h: Add some OP_P opcodes.
12188
12189 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
12190
12191         * basic.cs: tests for 61797 and 61740
12192
12193 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
12194
12195         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
12196         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
12197
12198 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
12199
12200         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
12201
12202         * *-amd64*.*: Ongoing AMD64 work.
12203
12204 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
12205
12206         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
12207
12208         * *-amd64*: Ongoing AMD64 work.
12209
12210         * mini-arch.h: Add AMD64 support.
12211
12212         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
12213
12214         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
12215
12216         * mini-ops.h: Add new opcodes.
12217
12218         * Makefile.am: Add AMD64 support.
12219
12220         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
12221         rules into the inssel-long*.brg files.
12222
12223         * *-amd64.*: Add beginnings of AMD64 backend.
12224
12225 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
12226
12227         * mini.c (print_dfn): commenting out the code that prints
12228         the cil. With -O=deadce, this makes -v -v crash.
12229         
12230         * cpu-pentium.md: make checkthis have a length of 2
12231
12232 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
12233
12234         * mini-sparc.h: fix implementations of __builtin
12235         functions for Sun compiler for V9.
12236
12237 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
12238
12239         * mini.c: use the new stelem.ref wrapper
12240         * exceptions.cs, arrays.cs: new stelem.ref tests
12241
12242 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
12243
12244         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
12245         new XSP should work with these changes).
12246
12247 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
12248         
12249         * inssel-{long32,x86,}.brg: trivial optimizations.
12250         
12251 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
12252
12253         * mini.c: load value when emitting box operation in
12254         constrained calls.
12255
12256 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
12257
12258         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
12259         is one byte shorter than cmp DWORD PTR [eax], 0.
12260
12261 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
12262
12263         * inssel-ppc.brg: arguments on the stack are always
12264         relative to the stack pointer (spotted by Neale Ferguson).
12265
12266 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12267
12268         * exceptions-x86.c: delay appending the method name to the trace until
12269         after mono_jit_info_table_find is called, as this gets the real
12270         MonoMethod.
12271
12272 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
12273
12274         * aot.c: register roots
12275
12276 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
12277
12278         * aot.c : I could just use PLATFORM_WIN32 flag.
12279
12280 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
12281
12282         * aot.c : Reverting the previous fix. This time it broke linux build.
12283
12284 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
12285
12286         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
12287
12288 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
12289
12290         * mini.c (handle_stack_args): Remove some more debugging code.
12291         
12292         * mini.c (handle_stack_args): Remove debug output left in by mistake.
12293
12294         * driver.c mini.h aot.c: Allow additional options to be specified with
12295         --aot and pass them to mono_compile_assembly.
12296
12297         * aot.c: Add experimental code to AOT compile all loaded assemblies
12298         on demand and save the code into a cache in the filesystem.
12299
12300         * aot.c: Add support for more wrapper methods.
12301         
12302         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
12303         58863.
12304
12305         * cpu-*.md: Remove removed opcodes.
12306
12307         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
12308         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
12309         related icalls to marshal.c.
12310
12311 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
12312
12313         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
12314
12315         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
12316
12317         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
12318
12319 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
12320         * liveness.c: If liveness is recomputated we need to reset the information
12321         for each variable. This way, if the liveness range has been narrowed
12322         by optimizations that happened after the last computation, we can return
12323         a smaller range.
12324         
12325         For example, if you have
12326         
12327         {
12328                 int i = 0;
12329                 
12330                 // Tons of code that does not affect i
12331                 
12332                 i = foo ();
12333                 ...
12334         }
12335         
12336         i = 0 is dead code and will be removed by SSA. However, when
12337         linear scan gets to the code, i will still appear to be live
12338         throughout the entire block. This prevents good register allocation.
12339
12340 2004-07-06  Martin Baulig  <martin@ximian.com>
12341
12342         * debug-mini.c (mono_debug_init_method): Allow
12343         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
12344         (mono_debug_add_icall_wrapper): New method.
12345
12346         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
12347
12348 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
12349
12350         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
12351         optimization.
12352
12353 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
12354
12355         * aot.c (mono_aot_load_method): Fix loading of debug info.
12356
12357 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
12358
12359         * aot.c: Add logging support.
12360
12361 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
12362
12363         * mini.h: Add prototype for mono_print_method_from_ip.
12364
12365         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
12366
12367         * inssel.brg: 64 bit fixes.
12368
12369         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
12370         inssel-long32.brg.
12371
12372         * Makefile.am: Add SPARC64 support.
12373
12374 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
12375
12376         * aot.c: Fix alignment problems on 32 bit platforms.
12377
12378 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
12379
12380         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
12381         SPARC64.
12382
12383         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
12384         problems.
12385
12386         * mini.h: Bump AOT file version. Some 64 bit fixes.
12387
12388 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
12389
12390         * inssel-sparc.brg: Add new rule to avoid register moves.
12391
12392         * inssel.brg: Add ldind_to_load_membase helper function.
12393
12394 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
12395
12396         * mini.c: OffsetToStringData intrinsic.
12397         
12398 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
12399
12400         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
12401
12402         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
12403         regression tests.
12404
12405         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
12406 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
12407
12408         * mini.c: reinstated mono_compile_get_interface_var()
12409         on x86, too, since the change breaks the Gtk# build there as well.
12410
12411 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12412
12413         * driver.c: remove loop from the default optimizations: it seems to
12414         interact badly with some of the other options (see bug #60613).
12415
12416 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
12417
12418         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
12419         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
12420
12421 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
12422
12423         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
12424         vararg-using methods.
12425
12426 2004-06-21  Martin Baulig  <martin@ximian.com>
12427
12428         * mini/mini-exceptions.c
12429         (mono_handle_exception): Added `gpointer original_ip' argument.
12430         After calling mono_unhandled_exception(), call
12431         mono_debugger_unhandled_exception() and if that returns true,
12432         restore the context and return.
12433
12434 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
12435
12436         * mini-ppc.c: prefer the use of relative branches so
12437         they won't need to be patched in aot code (patch from Patrick Beard).
12438
12439 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
12440
12441         * aot.c: patch from Patrick Beard to make the output assembly
12442         more correct for the MacOSX assembler. Small tweak to
12443         generate sane images on Linux/PPC, too.
12444
12445 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12446
12447         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
12448         case until bug #59509 is fixed (shows up in #60332).
12449
12450 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12451
12452         * mini.c: make sure the needed wrappers are compiled, too, with
12453         precomp.
12454
12455 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
12456
12457         * driver.c: remove NPTL reference in --version output.
12458
12459 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12460
12461         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
12462         generate valid assembly for the Mach-O assembler.
12463
12464 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
12465
12466         * driver.c: don't include abcrem in the all optimization specifier
12467         since it slows down jit compilation too much for now.
12468
12469 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
12470
12471         * mini.c: use BIGMUL only if both operands have the same signage.
12472         * iltests.il: Test for bug 60056. (errors related to signage in
12473         BIGMUL).
12474
12475         r=lupus.
12476
12477 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
12478
12479         * mini.c, aot.c: memory leak fixes.
12480
12481 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
12482
12483         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
12484
12485 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
12486
12487         * Makefile.am: remove the -static hack completely, it links in
12488         statically glib as well.
12489
12490 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
12491
12492         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
12493         * exceptions.cs: make it compile with new mcs/csc.
12494
12495 2004-06-03 Massimiliano Mantione <massi@ximian.com>
12496         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
12497         and added relevant test case.
12498
12499 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
12500
12501         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
12502         regressions in gtk-sharp.
12503
12504 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
12505
12506         * exceptions.cs: New regression tests.
12507
12508         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
12509
12510 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
12511
12512         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
12513
12514 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
12515
12516         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
12517
12518         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
12519
12520 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
12521
12522         * mini.c (mono_jit_runtime_invoke): Init class in this
12523         method instead of trusting mono_jit_compile_method to
12524         do the work (because wrappers can be in object class)
12525
12526 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
12527
12528         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
12529
12530         * basic-long.cs: New regression test.
12531
12532 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
12533
12534         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
12535         and div/rem checks.
12536
12537 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
12538
12539         * Makefile.am: fix miguel's change to build mono statically against
12540         libmono (track build dependencies).
12541
12542 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
12543
12544         * cfold.c: Some glib versions do not have G_MININT32.
12545
12546 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
12547
12548         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
12549         with precision of tan, atan, sin and cos, and implemented related
12550         regressions tests (fixes bug 54467, but one new problem appeared and
12551         is not fixed yet).
12552
12553 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
12554
12555         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
12556
12557         * exceptions.cs: Add test for constant folding && division by zero.
12558
12559         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
12560         since driver.c is in libmono too, so the optimization was useless.
12561
12562         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
12563         variable to driver.c so the compiler can emit more efficient code to
12564         access them.
12565
12566 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12567
12568         * Makefile.am: don't distribute generated inssel.[ch] files.
12569
12570 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
12571
12572         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
12573         into the default appdomain. Fixes #58707.
12574
12575         * jit-icalls.c: Remove the broken approximation for truncl, doing
12576         no conversion is better.
12577
12578         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
12579         Fixes #58863.
12580
12581 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
12582
12583         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
12584         of the mcrxr instruction which is not available on some processors
12585         even if it's documented to be. Implement add and sub overflow correctly
12586         (still not complete for long unsigned). Speed up icalls a bit.
12587
12588 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
12589
12590         * mini.c (mono_jit_compile_method_with_opt): Make sure that
12591         we run .cctor in the current domain instead of target_domain.
12592         
12593         Fixes bug #58558, .cctor not being called in -O=shared.
12594
12595 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
12596
12597         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
12598
12599 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
12600
12601         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
12602         which can be done with an imm8, do it that way.
12603         (mono_arch_output_basic_block): ditto for a jmp
12604         (mono_arch_emit_prolog): Computate maximum offset of a label.
12605
12606 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
12607
12608         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
12609         now tries to allocate prefered physical reg's for virtual
12610         regs. This reduces the number of emited spills/loads with
12611         20-30% on our core assemblies.
12612
12613 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12614
12615         * jit-icalls.c: truncl() is not needed and trunc() is
12616         the correct thing to do anyway (bug #58287).
12617
12618 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
12619
12620         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
12621         if available.
12622
12623 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
12624
12625         * driver.c: enable loop optimizations by default.
12626
12627 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
12628
12629         * mini-x86.c: fix calc of max loop size when aligning loops start.
12630
12631 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
12632
12633         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
12634         the stack.
12635
12636 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
12637
12638         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
12639         should set carry.
12640
12641         * basic-long.cs: Add tests for add/subtract of immediates with carry.
12642
12643         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
12644         
12645         * mini.c (inline_method): Allways inline some wrappers even if the cost
12646         is too large. Fixes #58785.
12647
12648         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
12649         
12650 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
12651
12652         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
12653         (crichton@gimp.org). Beginning of support for sparc/linux.
12654
12655         * mini-sparc.c: Optimize retrieval of LMF address.
12656
12657 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
12658
12659         * exceptions-ppc.c:  handle alloca in methods with clauses.
12660
12661 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
12662
12663         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
12664
12665 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
12666
12667         * mini.c: Delegate most of the abort signal work to 
12668           mono_thread_request_interruption, which also handles Stop and Suspend
12669           states.
12670
12671 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
12672
12673         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
12674         supports the save/restore lmf opcodes.
12675
12676 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
12677
12678         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
12679         by gcc-3.4 as well.
12680
12681         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
12682
12683 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
12684
12685         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
12686         methods which contain array accesses.
12687
12688         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
12689         boundaries. Fixes #58537.
12690
12691         * iltests.il: Add regression test for #58537.
12692
12693 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
12694
12695         * mini-x86.c (mono_arch_local_regalloc): Last part of
12696         fix for bug #58633 (releasing register to early).
12697
12698 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
12699
12700         * basic-long.cs: Add new regression test.
12701
12702 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
12703
12704         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
12705         register too early on the chain.
12706
12707 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
12708
12709         * mini.c (create_helper_signature): Use a helper function to reduce
12710         the code which needs to be written. Also set the calling convention of
12711         icalls on windows. Fixes #57840.
12712
12713 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
12714
12715         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
12716         exceptions-ppc.c: added helper function to get the instruction address
12717         from a signal handler context.
12718
12719 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
12720
12721         * helpers.c: use g_get_tmp_dir. Invokes happyness 
12722         from gonzalo.
12723
12724 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
12725
12726         * helpers.c: Add new env variable to pass args to objdump.
12727         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
12728
12729 2004-05-17  Radek Doulik  <rodo@ximian.com>
12730
12731         * Makefile.am (common_sources): added abcremoval.h so it get
12732         disted and daily mono packages on go-mono.com will build again
12733
12734 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
12735
12736         * abcremoval.c: Fixed coding style, added copyright header.
12737
12738         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
12739
12740         * mini.h: Added prototype for abc removal main function.
12741
12742         * build_relations_propagation_table.pl: Added copyright header.
12743
12744 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
12745
12746         * basic-long.cs: reg test for complex ceq_long bug.
12747
12748 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
12749
12750         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
12751         reg in long and clob case (bug #58343). Fixed/added comments.
12752
12753 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
12754
12755         * mini.c (mono_jit_runtime_invoke): Follow new convention
12756         of calling the invoke method with an function pointer.
12757
12758 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
12759
12760         * ChangeLog: Fix author of memory leak patch.
12761
12762 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
12763
12764         * Makefile.am: fix make dist as well...
12765
12766
12767 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
12768
12769         * cfold.c: Made so that conversions from pointer to int4 are no-ops
12770         on archs where pointers are 4 bytes long.
12771
12772         * Makefile.am: Added abcremoval.c source file.
12773
12774         * abcremoval.c: Added abcremoval.c.
12775
12776         * abcremoval.h: Added abcremoval.h.
12777
12778         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
12779
12780         * inssel.brg: Enabled bounds check removal.
12781
12782         * mini.c: Added support for abcrem optimization.
12783
12784         * mini.h: Added abcrem optimization label.
12785
12786         * driver.c: Added support for abcrem optimization.
12787
12788         * propagated_relations_table.def: Added propagated_relations_table.def.
12789
12790 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
12791
12792         * mini.c, cfold.c: fix style.
12793
12794 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
12795
12796         * mini.c: handle issue with the low-level implementation of
12797         some long opcodes (bug #54209).
12798
12799 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
12800
12801         * basic.cs: test for my new cmov stuff.
12802
12803 2004-05-13      Patrik Torstensson
12804
12805         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
12806         opt and added peephole documentation.
12807
12808 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
12809
12810         * tramp-ppc.c: rewrote the generic trampoline code.
12811
12812 2004-05-11      Patrik Torstensson
12813
12814         * mini-x86.c: optimize long shl/shr asm code (one less branch)
12815
12816 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
12817
12818         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
12819
12820         * mini.h mini.c dominators.c: Applied patch from Derek Woo
12821         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
12822
12823         * mini.c: Add new icalls for AsAny marshalling.
12824
12825 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
12826
12827         * tramp-ppc.c, mini-ppc.c: more cleanups.
12828
12829 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12830
12831         * mini.c: no warnings.
12832
12833 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12834
12835         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
12836
12837 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
12838
12839         * mini.c: In the thread abort signal handler, if the thread is in the
12840         process of being stoped, don't throw the Abort exception, just stop the
12841         thread.
12842
12843 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
12844
12845         * tramp-ppc.c: removed old code.
12846
12847 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12848
12849         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
12850         do some simple speed optimizations on ppc.
12851
12852 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
12853
12854         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
12855         and large offsets in load/store.
12856
12857 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
12858
12859         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
12860         it causes regressions.
12861
12862 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
12863
12864         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
12865         support.
12866
12867 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
12868
12869         * jit-icalls.c: remove warnings.
12870         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
12871         speedups for unsafe code.
12872
12873 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
12874
12875         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
12876
12877 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
12878
12879         * basic-calls.cs: Add new regression test.
12880
12881         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
12882         more portable.
12883
12884         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
12885
12886         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
12887         is no longer used.
12888
12889 2004-05-06      Patrik Torstensson
12890
12891         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
12892         long reg allocation in any reg (not only eax:edx) and implemented 
12893         long shl/shr ops in asm instead of helpers.
12894
12895 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
12896
12897         * mini-sparc.h: Fix warnings.
12898
12899         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
12900         stack.
12901
12902         * mini-exceptions.c (mono_handle_exception): Call the filter in a
12903         separate statement for clarity.
12904
12905         * mini-sparc.c: Update status.
12906
12907 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
12908
12909         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
12910         here.
12911
12912 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12913
12914         * inssel-ppc.brg: another small pre-release workaround:
12915         we don't do overflow detection for long_sub_un.
12916
12917 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
12918
12919         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
12920         (also works around a weird ppc bug: 57957).
12921
12922 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
12923
12924         * tramp-ppc.c: trampoline fixes.
12925
12926 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
12927
12928         * mini-ppc.c: fixed typos.
12929
12930 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
12931
12932         * mini-ppc.c, exceptions-ppc.c: more code saves registers
12933         at the top of the stack. Fixed typos. Use a frame registers
12934         for all the methods with exception clauses.
12935
12936 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
12937
12938         * exceptions-ppc.c: restore fp registers.
12939
12940 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
12941
12942         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
12943         order from the stack top (moved the stack room to save the
12944         return value for trace after the param area). Fixed corruption
12945         in restoring registers on unwind.
12946
12947 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
12948
12949         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
12950
12951 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12952
12953         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
12954         and prolog/epilog for methods that use it. Allow
12955         enough param area room for varargs methods. Fix miguel's
12956         breakage in exception handling.
12957
12958 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12959
12960         * Makefile.am: run genmdesc only on current arch.
12961
12962 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12963
12964         * exceptions-x86.c:
12965         * mini-x86.h: fix the build on windows.
12966
12967 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
12968
12969         * 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.
12970
12971         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
12972
12973         * mini-exceptions.c: New file.
12974         
12975         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
12976         Move some parts of the x86 exception handling code to an 
12977         arch-independent file so it can be shared with other ports.
12978
12979 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
12980
12981         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
12982
12983 2004-04-26  David Waite  <mass@akuma.org>
12984
12985         * driver.c: remove comma from end of enumeration declaration
12986
12987 2004-04-26  Jackson Harper  <jackson@ximian.com>
12988
12989         * driver.c: parse config file before loading first assembly. This
12990         allows the user gac to be enabled/disabled. 
12991         
12992 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
12993
12994         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
12995         simpler mechanism: we do not care what is encoded initially
12996         (branch absolute or relative), we care about the code and its
12997         target.  I kept the old code for reference for now.
12998
12999         The new code tries first to determine if the jump is anywhere in
13000         the -/+32 absolute meg range, if it succeeds, it encodes using the
13001         absolute branch;  If not, it tried to find something in the
13002         relative range, if not, it uses the handle_thunk code. 
13003
13004 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
13005
13006         * exceptions-ppc.c: use the correct ip register on macosx.
13007
13008 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
13009
13010         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
13011
13012 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
13013
13014         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
13015         Raise exception on integer divide by zero by hand since the hw
13016         doesn't support it. Handle NaNs in FP compares.
13017
13018 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
13019
13020         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
13021         code reducing duplication between the platforms and enabled
13022         signal exception handling (on linux for now).
13023
13024 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
13025
13026         * exceptions-ppc.c: more macosx support.
13027
13028 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13029
13030         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
13031
13032 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
13033
13034         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
13035
13036 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
13037
13038         * iltests.il: more tests.
13039
13040 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
13041
13042         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
13043         vars as well.
13044
13045 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
13046
13047         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
13048
13049 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
13050
13051         * liveness.c: Mark variables as volatile in all basic blocks reachable
13052         from exception clauses.
13053
13054 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
13055
13056         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
13057         inlining.
13058
13059 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
13060
13061         * iltests.il, basic.cs: more tests for regalloc.
13062
13063 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13064
13065         * iltests.il: Some tests for register allocation modifications
13066         I have locally.
13067
13068 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
13069
13070         * exceptions.cs: Add regression test for bug #56782.
13071
13072         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
13073         original stack trace if an exception is rethrown. Fixes #56782. Oh,
13074         the beauty of fixing the same thing in 5 different files...
13075
13076 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
13077
13078         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
13079         methods.
13080
13081 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
13082
13083         * mini.c: Add support for STRWLPARRAY marshalling convention.
13084
13085 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
13086
13087         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
13088         to init the context to setup the regs pointer).
13089
13090 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
13091
13092         * exceptions-ppc.c: more exceptions work.
13093
13094 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13095
13096         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
13097         not allowed.
13098
13099 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
13100
13101         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
13102         can use the memory directly.
13103
13104         * cpu-pentium.md: Update documentation from a post from Zoltan. 
13105
13106         add x86_add_membase, x86_sub_membase, x86_mul_membase
13107
13108 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
13109
13110         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
13111         GENERAL_REGS they were also hardcoded for all PPC ports.
13112
13113         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
13114
13115         Remove hard-coded limit for floating point registers, use
13116         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
13117
13118         Notice that in MacOS X calling conventions you can fit a lot more
13119         floating point values in registers, so I should update the PInvoke
13120         test to excercise the passing of floating point values on the
13121         stack (currently broken).
13122         
13123 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
13124
13125         * tramp-ppc.c (create_trampoline_code): Added
13126         JUMP_TRAMPOLINE_SIZE. 
13127         (ppc_magic_trampoline): Follow the pattern from
13128         x86_magic_trampoline: if code is set to zero, return. 
13129         (create_trampoline_code): Always pass MonoMethod to the jump
13130         trampoline, before it was passing a null.
13131         (mono_arch_create_jump_trampoline): Implement the jump stub, could
13132         share the code with mono_arch_create_jit_trampoline. 
13133
13134         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
13135         implemented.
13136         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
13137         implemented.  
13138
13139         * cpu-g4.md: Added length for jmp instruction, the worst case
13140         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
13141         for save_lmf).
13142
13143 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
13144
13145         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
13146
13147 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
13148
13149         * mini.c: Only set bblock->real_offset when adding a new bblock, and
13150         before each IL instruction.
13151
13152         * mini.c (CEE_BOX): Fix warnings.
13153
13154 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13155
13156         * mini.c: removed a few unused vars and extra whitespace.
13157
13158 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
13159
13160         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
13161         checks.
13162         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
13163         index.
13164         (OP_GETCHR): use the above
13165         (CEE_LDELEMA): use the above.
13166
13167         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
13168         version of the generic impl.
13169         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
13170         (CEE_LDELEMA): use the above.
13171
13172 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
13173
13174         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
13175         Fixes #56317.
13176
13177         * iltests.il: Added new regression test for #56317.
13178
13179 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
13180
13181         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
13182         under NetBSD. Fixes #56450.
13183
13184         * liveness.c (update_gen_kill_set): Fix previous patch.
13185
13186 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13187
13188         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
13189
13190 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
13191
13192         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
13193         ldsfld and ldsflda.
13194
13195         * inssel-sparc.brg: Add more optimizations.
13196
13197         * mini-sparc.c: Replace multiply/divide with shifts if possible.
13198
13199 2004-04-01  Martin Baulig  <martin@ximian.com>
13200
13201         * mini.c (handle_box): New static function; moved the
13202         implementation of CEE_BOX here.
13203         (mono_method_to_ir): Added `constrained_call' variable.
13204         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
13205         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
13206         mono_method_get_constrained() to get the method.
13207
13208 2004-04-01  Martin Baulig  <martin@ximian.com>
13209
13210         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
13211         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
13212         (mono_method_to_ir): We don't need these macros anymore since
13213         mono_class_get_full() already takes care of it. 
13214
13215 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13216
13217         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
13218         use @function (as doesn't accept #function here) and check the return
13219         value of system and stop if fails.
13220
13221 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13222
13223         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
13224
13225 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
13226
13227         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
13228
13229         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
13230
13231         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
13232         #56223.
13233
13234         * basic-long.cs: Add test for negation of Int64.MinValue.
13235
13236 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
13237
13238         * mini-sparc.c: Update status.
13239
13240         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
13241
13242         * exceptions-sparc.c: Fix return value in filters.
13243
13244         * inssel-sparc.brg: Fix register allocation in some rules.
13245
13246 2004-03-28  Martin Baulig  <martin@ximian.com>
13247
13248         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
13249         if neccessary.  
13250
13251 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
13252
13253         * mini-x86.c (mono_arch_patch_code): Fix warnings.
13254         
13255         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
13256         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
13257         remove unused conv_u4 opcode.
13258
13259         * mini-x86.c: Remove valgrind workaround since it slows down things
13260         even when mono is not run under valgrind.
13261
13262 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
13263
13264         * mini-sparc.c: Update status.
13265
13266         * inssel-sparc.brg: Add some optimizations.
13267
13268         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
13269         future delay slot filling. Add support for varargs, tail calls and JMP.
13270
13271         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
13272         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
13273
13274         * inssel.brg: Fix register allocation in OP_ARGLIST.
13275
13276         * inssel.brg: Fix warnings.
13277
13278 2004-03-25  Martin Baulig  <martin@ximian.com>
13279
13280         * mini.c (inflate_generic_field): Removed.
13281         (mini_get_method): Removed, use mono_get_method_full(),
13282         (mini_get_class): Removed, use mono_class_get_full().
13283         (mono_method_to_ir): Pass our generic context to
13284         mono_field_from_token().        
13285
13286 2004-03-25  Martin Baulig  <martin@ximian.com>
13287
13288         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
13289         of a `MonoMethod *'.
13290         (mini_get_method): Take a `MonoGenericContext *' instead
13291         of a `MonoMethod *'.
13292         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
13293         a new local variable called `generic_context' which holds the
13294         current `MonoGenericContext *'; use it to lookup things.
13295
13296 2004-03-24  Martin Baulig  <martin@ximian.com>
13297
13298         * mini.c (mini_get_class): New static method; if we're inside a
13299         generic instance, inflate the class if neccessary.
13300         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
13301
13302 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
13303
13304         * iltests.il: New regression test for #55976.
13305
13306         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
13307         #55976.
13308
13309 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
13310
13311         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
13312         output.
13313
13314 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
13315
13316         * liveness.c: Consider SSA stores as well as loads when making vars
13317         volatile.
13318
13319         * exceptions.cs: New regression tests for register allocation.
13320         
13321 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
13322
13323         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
13324         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
13325           domain lock only to protect puntual access to data structures.
13326           Added access lock for sighash, jit_icall_hash_name, 
13327           jit_icall_hash_addr and domain->code_mp.
13328
13329 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
13330
13331         * driver.c: Print SIGSEGV handling method.
13332
13333         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
13334
13335         * mini.c (setup_jit_tls_data): Handle case when this is called
13336         multiple times for a thread.
13337
13338         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
13339         is different from fbxx_un. Fixes #54303. Also use constants instead of
13340         magic numbers in a lot of places.
13341
13342 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
13343
13344         * exceptions.cs: Fix cctor test when --regression is used.
13345
13346 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
13347
13348         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
13349         for Linux/ppc.
13350
13351 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
13352
13353         * inssel-ppc.brg: fixed register assignments for some rules.
13354
13355 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
13356
13357         * exceptions.cs: Add test for exceptions in static constructors.
13358
13359         * mini.c (mono_jit_compile_method_with_out): Move the calling of
13360         static constructors outside the domain lock. Fixes #55720.
13361
13362 2004-03-17  Martin Baulig  <martin@ximian.com>
13363
13364         * mini.c (get_generic_field_inst): Removed, this'll never happen.
13365         (inflate_generic_field): Take the `MonoMethod *' instead of the
13366         `MonoClass *' and added support for generic method.
13367         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
13368         have a `field->parent->gen_params', only inflate the field if it's
13369         an open constructed type.
13370
13371 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
13372
13373         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
13374         exception object instead of the preconstructed ones.
13375
13376 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13377
13378         * mini.c: reverted changed to sigsegv_signal_handler commited
13379         accidentally in the previous patch.
13380
13381 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13382
13383         * mini.c:
13384         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
13385         running --aot with an old assembly.
13386
13387 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
13388
13389         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
13390         point values.
13391
13392         * mini-sparc.c: Add support for v9 branches with prediction.
13393
13394 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
13395
13396         * mini.c (mini_init): #warning is GNUC only
13397
13398         * mini-sparc.h: implement __builtin_frame_address
13399         and __builtin_return_address for Sun C compiler
13400
13401 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
13402
13403         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
13404
13405 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
13406
13407         * basic-calls.cs: Add test for unaligned byref long argument passing.
13408
13409         * mini-ops.h: Add sparcv9 compare and branch instructions.
13410
13411         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
13412         v9 instructions if we have a v9 cpu.
13413
13414         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
13415         registers for global allocation.
13416
13417         * exceptions-sparc.c: Fixes.
13418         
13419 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
13420
13421         * liveness.c (mono_analyze_liveness): Optimized version.
13422
13423         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
13424
13425         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
13426         sparc work.
13427
13428         * basic-float.cs basic-calls.cs: New regression tests.
13429
13430 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
13431
13432         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
13433         sigaltstack implementation.
13434
13435         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
13436         
13437         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
13438         stuff if SIGSEGV_ON_ALTSTACK is not defined.
13439
13440 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
13441
13442         * mini.c: Fix warnings.
13443         
13444         * mini.c (mono_resolve_patch_target): New function which contains the
13445         arch independent part of the patching process.
13446
13447         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
13448         patching code to a separate function.
13449
13450 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
13451
13452         * mini.c (add_signal_handler): ifdef out on Windows
13453
13454 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
13455
13456         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
13457         cpu-sparc.md: Add exception handling support + other fixes.
13458
13459         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
13460         typed GC detection in --version.
13461
13462         * basic.cs exceptions.cs: New regression tests.
13463
13464         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
13465         the arch specific code can store data during a compilation.
13466
13467         * mini-ops.h: Add OP_SETFRET.
13468
13469         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
13470         function, register a separate icall for each arity, so the icalls can
13471         get a wrapper.
13472         
13473         * mini.c (mono_print_tree): Print negative offsets in a more readable
13474         form.
13475         
13476         * mini.c: Make signal handling work on sparc.
13477         
13478         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
13479
13480         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
13481
13482         * jit-icalls.c: Emulate truncl by aintl on solaris.
13483
13484         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
13485
13486 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
13487
13488         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
13489
13490 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
13491
13492         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
13493         a MarshalByRef type, inline a method that performs the check, taking into
13494         account that the object can be a proxy. Also implemented tow new opcodes:
13495         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
13496         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
13497         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
13498
13499 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
13500
13501         * mini-ppc.c: if a relative branch displacement is too big
13502         but it points to and area reachable with an absolute branch, 
13503         avoid the thunks.
13504
13505 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
13506
13507         * mini.c: optimize small copies in cpblk.
13508
13509 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
13510
13511         * basic-calls.cs basic-float.cs: New regression tests.
13512
13513         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
13514         negative offsets from %fp. Implement localloc. Fix local register 
13515         allocation. Fix the case when the this argument needs to be saved to
13516         the stack. Implement some missing opcodes.
13517
13518 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
13519
13520         * mini.c (mini_method_compile): Reenable global regalloc in methods
13521         with exception handlers.
13522
13523         * linear-scan.c (mono_varlist_sort): Fix warning.
13524
13525         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
13526
13527         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
13528         regalloc costs.
13529
13530         * liveness.c: Make all variables uses in exception clauses volatile, to
13531         prevent them from being allocated to registers. Fixes #42136.
13532
13533 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
13534
13535         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
13536         causes regressions.
13537
13538         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
13539         argument to mono_arch_regalloc_cost.
13540
13541         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
13542         precisely.
13543
13544 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
13545
13546         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
13547         Make the cost of allocating a variable to a register arch dependent.
13548
13549         * basic-calls.cs: Fix compilation of tests.
13550         
13551         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
13552         helper function to cut back on the number of #ifdefs needed.
13553
13554         * mini-ppc.c: Fix compilation.
13555
13556         * basic-calls.cs: New regression tests.
13557
13558         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
13559
13560         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
13561         of l0 since that is callee saved.
13562
13563         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
13564         to virtual calls.
13565
13566         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
13567         of delay instruction.
13568
13569         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
13570
13571         * mini.h (MonoCallInst): Add 'virtual' flag.
13572
13573         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
13574
13575 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
13576
13577         * *.cs: New regression tests.
13578
13579         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
13580         work.
13581
13582         * mini.c (mono_runtime_install_handlers): Fix build.
13583
13584         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
13585         'signal_stack_size' members.
13586
13587         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
13588         alternate signal stack.
13589
13590         * exceptions-x86.c: Add stack overflow handling.
13591
13592         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
13593         functions to arch independent code.
13594
13595         * mini.c (mono_print_tree): Print more detailed info for load_membase
13596         opcodes.
13597         
13598 2004-02-23  Martin Baulig  <martin@ximian.com>
13599
13600         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
13601
13602 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
13603
13604         * mini-x86.c: fixed reg allocation for div/rem.
13605
13606 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
13607
13608         * driver.c (mono_main): Report some configuratio options on --version.
13609
13610 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
13611
13612         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
13613         low in the address space. Correctly flush memory in thunks where we
13614         output native code.
13615
13616 2004-02-20  Martin Baulig  <martin@ximian.com>
13617
13618         * mini.c (mini_get_method): New static method; inflate all generic
13619         methods and methods in open generic instances.
13620         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
13621         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
13622
13623 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
13624
13625         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
13626
13627         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
13628
13629 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
13630
13631         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
13632
13633         * mini-sparc.c (flushi mono_arch_output_basic_block): make
13634         it compile using Sun's compiler.
13635
13636 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
13637
13638         * 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.
13639
13640         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
13641
13642 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
13643
13644         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
13645         code.
13646         * mini-ppc.c: handle calls outside of the allowed range with thunks
13647         allocated using the code manager.
13648         * tramp-ppc.c: use the code manager to hold generated native code.
13649         Fixed the magic trampoline to just patch vtable entries.
13650
13651 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
13652
13653         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
13654         independent file.
13655
13656 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
13657
13658         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
13659         PPC.
13660
13661         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
13662         if we have a working __thread implementation.
13663
13664         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
13665         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
13666
13667 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
13668
13669         * mini-x86.c: Fix compilation under gcc 2.
13670         
13671 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
13672
13673         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
13674         contains a call to the wrapped function.
13675
13676         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
13677         OP_<CALL>_IMM opcodes, and use them under X86.
13678         
13679         * mini.c (mono_jit_find_compiled_method): Fix warning.
13680
13681         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
13682
13683         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
13684
13685         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
13686         functionality to mini.c.
13687
13688         * mini.c (mono_create_jump_trampoline): New function to create a jump
13689         trampoline. Return a compiled method instead of a trampoline if it
13690         exists. Add a cache for jump trampolines.
13691
13692         * mini.c (mono_jit_find_compiled_method): New function to return a
13693         compiled method if it exists.
13694
13695         * mini-x86.c: Call mono_create_jump_trampoline instead of 
13696         mono_arch_create_jit_trampoline.
13697
13698         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
13699         a jump trampoline. Fixes #52092.
13700         
13701 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
13702
13703         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
13704         which is not up-to-date. Add check_corlib_version () instead.
13705
13706         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
13707         have to call it.
13708         
13709         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
13710         since newer valgrind versions do not need it.
13711
13712         * mini.c (mono_jit_compile_method_with_opt): New helper function to
13713         compile a method with a given set of optimizations.
13714
13715         * mini.c: Compile icall wrappers on-demand instead of at startup.
13716
13717         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
13718         wrapper for an icall.
13719
13720 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
13721
13722         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
13723         #54063.
13724
13725         * iltests.il: Add test for non-empty stack before switch instruction.
13726
13727 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
13728
13729         * mini.c: Add support for new stringbuilder marshalling conventions.
13730
13731         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
13732
13733 2004-02-01  Martin Baulig  <martin@ximian.com>
13734
13735         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
13736         in `ginst->mtype_argv'.
13737
13738 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
13739
13740         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
13741         facilitate grepping.
13742
13743 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
13744
13745         * mini.c: fixed buglet in initobj generic implementation for references.
13746
13747 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
13748
13749         * Makefile.am: make the version script conditional.
13750         * jit-icalls.c: handle missing truncl().
13751
13752 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
13753
13754         * exceptions.cs: Add more tests for double->int conversion.
13755
13756         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
13757         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
13758
13759 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
13760
13761         * driver.c: make --verbose --version emit an error
13762         if the loaded corlib doesn't match the runtime version.
13763
13764 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
13765
13766         * mini-ppc.h: export ppc_patch().
13767         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
13768         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
13769         on par or better than on MacOSX.
13770
13771 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
13772
13773         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
13774         mono_lookup_pinvoke_call.
13775
13776         * mini-x86.c: Under windows, the default pinvoke calling convention is
13777         stdcall. Fixes #52834.
13778
13779         * mini.c (optimize_branches): Add an upper bound to the number of
13780         iterations to prevent infinite loops on strange loops. Fixes #53003.
13781
13782 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
13783
13784         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
13785         and ISINST. Fixes #52093.
13786
13787         * objects.cs (test_0_vector_array_cast): New tests.
13788         
13789 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
13790
13791         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
13792         checking in Array.Set ().
13793
13794         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
13795         #52590.
13796
13797         * object.cs (test_0_multi_array_cast): New regression test.
13798
13799 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
13800
13801         * exceptions-ppc.c: fix build on Linux/PPC.
13802
13803 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
13804
13805         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
13806         running under valgrind.
13807         (x86_magic_trampoline): Fix build bustage.
13808
13809         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
13810         negative values as well. This is needed for the encoding of the line number
13811         info, since sometimes the line numbers are not in increasing order.
13812
13813 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
13814
13815         * cpu-pentium.md (localloc): Increase the size of the localloc 
13816         instruction since it is a loop under Win32.
13817
13818         * debug-mini.c (record_line_number): Get rid of unneccesary memory
13819         allocation.
13820
13821 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
13822
13823         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
13824         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
13825         Max Horn (max@quendi.de). Fix file names in comments.
13826
13827 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
13828
13829         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
13830         avoid stack overflow.
13831         (replace_usage): Avoid uninitialized variable warnings.
13832
13833         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
13834         and taking the address of valuetype variables.
13835
13836 2004-01-03  Patrik Torstensson
13837
13838         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
13839         for other purposes than FP later on.
13840
13841 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
13842
13843         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
13844         of tail calls.
13845
13846 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
13847
13848         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
13849
13850 2003-12-30  Patrik Torstensson <p@rxc.se>
13851
13852         * mini-x86.h: Decreased number of availiable fp regs.
13853         Solves corner cases with FP spilling.
13854
13855 2003-12-23  Patrik Torstensson <p@rxc.se>
13856
13857         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
13858         for floating point stack tracking / spilling on x86. 
13859         Fixes bug #49012.
13860         
13861         * basic-float.cs: added float mul overflow test.
13862
13863 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
13864
13865         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
13866
13867 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
13868
13869         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
13870         supports for cond branches that overflow the immediate
13871         overflow offset. mcs can compile simple programs.
13872
13873 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
13874
13875         * exceptions-ppc.c: exception handling support wip:
13876         finally handlers get run on exception.
13877
13878 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
13879
13880         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
13881         profiling.
13882
13883 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
13884
13885         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
13886         initial support for stack walking and unwinding.
13887
13888 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
13889
13890         * driver.c (mono_main): Make corlib-out-of-sync message more 
13891         descriptive. Also remove verify_corlib call.
13892
13893 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
13894
13895         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
13896         not overlap with other call's arguments, too.
13897
13898 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
13899
13900         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
13901         move to arch-specific code the choice of arch-specific
13902         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
13903         * mini.c: ensure emulation calls will not interleave
13904         with other calls.
13905
13906 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
13907
13908         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
13909         the magic trampoline stack frame is dropped before executing
13910         the new method.
13911
13912 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
13913
13914         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
13915         and integer to fp conversions. Added support for overflowing
13916         arguments on the stack. Reserve a couple more registers as temps.
13917         Added support for aot compilation (as output still needs to be
13918         tweaked, though).
13919
13920 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
13921
13922         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
13923         Don't overwrite return register in some corner cases.
13924
13925 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
13926
13927         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
13928         static constructors when AOT compiling.
13929
13930         * driver.c (mono_main): Call mono_check_corlib_version.
13931
13932 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
13933
13934         * cpu-g4.md, basic.cs: fixed div target register.
13935
13936 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
13937
13938         * mini-ppc.c, basic.cs: shl_imm fix with test.
13939
13940 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
13941
13942         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
13943         structures by value. Misc fixes.
13944         * objects.cs: more tests.
13945
13946 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
13947
13948         * mini-ppc.c: lconv.ovf.i implemented.
13949
13950 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13951
13952         * mini.c:
13953         (mini_init): don't error out if someone already called g_thread_init.
13954
13955 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
13956
13957         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
13958         to be any type per the spec. Fix abnormal memory usage when
13959         the same object is repeatedly thrown.
13960
13961 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
13962
13963         * mini.c: check for overruns in IL code.
13964
13965 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
13966
13967         * TODO: Add/remove some todo entries.
13968
13969 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
13970
13971         * driver.c (mono_main): Call mono_verify_corlib.
13972
13973 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
13974
13975         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
13976         This has been moved to mini.c
13977         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
13978         type being casted is marshalbyref it could be a proxy, so instead of
13979         emitting the type check code, emit a call to a runtime method that will
13980         perform the check by calling CanCastTo if needed.
13981
13982 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
13983
13984         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
13985         methods with large stack frames under Win32.
13986
13987 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
13988
13989         * Makefile.am: Distribute regression tests.
13990
13991         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
13992         at the end instead of inserting each variable into the sorted list.
13993
13994         * linear-scan.c (mono_varlist_sort): New helper function.
13995         
13996 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
13997
13998         * mini.c: ensure arguments and locals are within bounds.
13999
14000 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14001
14002         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
14003         related fixes.
14004
14005 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
14006
14007         * mini.c (mono_cprop_copy_values): Fix crash.
14008
14009         * aot.c: Set verbosity back to 0.
14010         
14011 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14012
14013         * regalloc.c: complete memory leak fix by Laurent Morichetti
14014         (l_m@pacbell.net).
14015
14016 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
14017
14018         * driver.c (main_thread_handler): Revert the previous patch.
14019
14020         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
14021         under valgrind.
14022
14023         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
14024         memory from the memory pool.
14025
14026         * driver.c (main_thread_handler): Turn on all optimizations when
14027         --aot is used.
14028
14029         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
14030         an array for better performance.
14031
14032         * regalloc.c (mono_regstate_assign): Fix memory leak.
14033
14034         * debug-mini.c (mono_debug_serialize_debug_info): New function to
14035         serialize the debug info.
14036
14037         * debug-mini.c (mono_debug_add_aot_method): New function to load the
14038         debug info from the serialized representation.
14039
14040         * aot.c: Save debug info into the generated file and load it when 
14041         loading a method.
14042
14043         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
14044
14045 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
14046
14047         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
14048         More FP-related fixes.
14049
14050 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
14051
14052         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
14053         and register allocation buglet. Hello world now runs.
14054
14055 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
14056
14057         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
14058         * tramp-ppc.c: fixed class init trampoline.
14059         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
14060
14061 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
14062
14063         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
14064         mini.c: more ppc changes/fixes.
14065
14066 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
14067
14068         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
14069         Also optimize the case when the arguments are the same in the caller 
14070         and in the callee.
14071
14072         * iltests.il: Add tests for tail calls with valuetype arguments.
14073
14074 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
14075
14076         * mini-ppc.c: fixes for struct return type.
14077
14078 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
14079
14080         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
14081         mono_spillvar_offset() to arch-specific code.
14082
14083 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
14084
14085         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
14086
14087 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
14088
14089         * exceptions-x86.c: Fix stack space leaks.
14090         
14091         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
14092         registers from the lmf if the method has save_lmf set.
14093
14094 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
14095
14096         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
14097         of icall wrappers into InvokeInDomain, since these are now per-domain.
14098
14099 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
14100
14101         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
14102         make some opcode emulation and intrinsic ops enabled/disabled 
14103         according to the architecture. More fixes.
14104
14105 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
14106
14107         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
14108
14109 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
14110
14111         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
14112         arch-specific handling for 'this' and struct return type to
14113         arch-specific code.
14114
14115 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14116
14117         * aot.c: prevent divide by zero error when reporting (it happened with
14118         Accessibility.dll).
14119
14120 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
14121
14122         * mini.h (inst_switch): Remove unused macro.
14123
14124 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14125
14126         * aot.c:
14127         (load_aot_module): free 'info->methods' and 'info' properly. No more
14128         "free(): invalid pointer blah" messages when you have an old aot
14129         compiled assembly.
14130
14131 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
14132
14133         * jit-icalls.c, mini.c: Added support for context static fields.
14134
14135 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
14136
14137         * mini.c (mono_method_blittable): Methods which set LastError are not 
14138         blittable either. Fixes #51108.
14139         
14140 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
14141
14142         * mini.c: flush icache.
14143         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
14144
14145 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
14146
14147         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
14148
14149 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
14150
14151         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
14152         safe on IA32.
14153
14154         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
14155         vararg calls.
14156
14157         * inssel.brg (CEE_MKREFANY): Fix AOT case.
14158
14159 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
14160
14161         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
14162         instruction when the result is discarded.
14163
14164         * iltests.il (test_0_div_regalloc): New regression test.
14165
14166         * arrays.cs: Fix compilation error.
14167
14168 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
14169
14170         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
14171         float rules to inssel-x86.brg: sane architectures with FP registers
14172         don't need to implement these rules.
14173
14174 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
14175
14176         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
14177
14178 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14179
14180         * mini.h, inssel-long32.brg: fixed endianess issues in int64
14181         implementation of 32 bit systems.
14182
14183 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
14184
14185         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
14186         (Jeroen Zwartepoorte).
14187
14188 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
14189
14190         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
14191         the caller and the callee matches.
14192         
14193         * mini.c (mono_method_to_ir): Add comment.
14194
14195         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
14196         signbit is missing on some platforms.
14197
14198 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
14199
14200         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
14201
14202         * mini.c (setup_jit_tls_data): Call the new function.
14203         
14204         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
14205
14206         * mini-x86.c: Add experimental support for fast access to the lmf
14207         structure under NPTL/Linux 2.6.x.
14208
14209 2003-11-06  Martin Baulig  <martin@ximian.com>
14210
14211         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
14212         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
14213         the debugger.
14214
14215 2003-11-02  Martin Baulig  <martin@ximian.com>
14216
14217         * mini.c (inflate_generic_field): New static method.
14218         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
14219         generic instance and the field is declared in a generic type, call
14220         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
14221
14222 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
14223
14224         * mini.h mini.c (mono_method_same_domain): New function to return
14225         whenever the caller and the callee are in the same domain.
14226
14227         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
14228
14229 2003-10-30  Martin Baulig  <martin@ximian.com>
14230
14231         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
14232         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
14233         method parameters.
14234         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
14235         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
14236
14237 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
14238
14239         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
14240         propagation.
14241
14242         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
14243         object here, so it is in the correct appdomain etc.
14244
14245 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
14246
14247         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
14248         already done.
14249         (mono_method_to_ir): Avoid freeing the type created returned from
14250         mono_type_create_from_typespec, since it is put into an internal cache
14251         by the function. Fixes pointer.exe.
14252
14253         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
14254         trampolines for icalls and pinvokes as well. Fixes #33569.
14255
14256 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
14257
14258         * mini.c: Update after appdomain changes.
14259
14260         * mini.c (mono_jit_compile_method_inner): Allways compile native
14261         method wrappers in the root domain, since there can only be one
14262         instance of them, whose address is stored in method->info.
14263
14264 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
14265
14266         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
14267         environment variable. Instead detect automatically whenever running
14268         under valgrind using the magic macro RUNNING_ON_VALGRIND from
14269         valgrind.h.
14270
14271 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
14272
14273         * trace.c, trace.h: New files that implement the new trace option
14274         parsing. 
14275
14276         * driver.c: Document new --trace options.
14277
14278         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
14279         mini-x86.c: Apply:
14280
14281         -       if (mono_jit_trace_calls)
14282         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
14283
14284         * mini.h: prototypes.
14285         
14286 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
14287
14288         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
14289
14290         * mini.c inssel.brg: Implement typedefbyref opcodes.
14291
14292         * mini.c (mono_jit_compile_method): Remove unused local variable.
14293
14294         * mini.c (mono_jit_compile_method_inner): Ditto.
14295         
14296 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
14297
14298         * tramp-x86.c (x86_class_init_trampoline): Fix build.
14299         
14300         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
14301
14302 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
14303
14304         * mini.c (mono_no_aot): Remove unused global variable.
14305
14306         * mini.c: Thread safety fixes.
14307
14308 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
14309
14310         * mini.c (mono_create_class_init_trampoline): Add a lock around
14311         class_init_hash_addr.
14312
14313         * arrays.cs (test_0_newarr_emulation): Add new regression test for
14314         #30073.
14315
14316         * mini.c: Decompose the NEWARR instruction before decomposing its
14317         arguments. Fixes #30073.
14318
14319 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
14320
14321         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
14322         convention.
14323
14324 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
14325
14326         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
14327
14328         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
14329
14330         * driver.c: Add support for compiling icall wrappers to --compile.
14331
14332 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
14333
14334         * inssel.brg: The empty value in class->interface_offsets is -1, not
14335         0. Fixes #49287.
14336
14337 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
14338
14339         * objects.cs: New test for 'is' operator on an array of interfaces.
14340
14341 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
14342
14343         * tramp-ppc.c: update trampoline code to support jumps
14344         and class initialization.
14345
14346 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
14347
14348         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
14349
14350         * inssel.brg (OP_UNBOXCAST): Fix #46027.
14351
14352         * inssel.brg (OP_UNBOX): Remove unused rule.
14353
14354         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
14355         region instead of one for each method. Fixes #47813.
14356
14357 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
14358
14359         * exceptions.cs (test_0_nested_finally): New regression test for
14360         nested exception handlers.
14361
14362         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
14363
14364         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
14365
14366         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
14367         inlining.
14368
14369         * mini.c (mono_method_check_inlining): Make the inlining limit 
14370         configurable by an environment variable.
14371         
14372         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
14373
14374         * mini.h: Bump AOT file version.
14375
14376         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
14377         token, store the image along with the token, since the token might not 
14378         refer to the same image as the method containing the relocation, 
14379         because of inlining.
14380
14381 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
14382
14383         * mini.c (mono_precompile_assemblies): New function to compile
14384         all methods in all loaded assemblies.
14385
14386         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
14387
14388         * regalloc.h regalloc.c (MonoRegState): Change the type of 
14389         iassign and fassign to int*, since they can contain large negative
14390         values if the register is spilled. Also added some comments. Fixes
14391         #45817.
14392
14393         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
14394         under Win32. Fixes #42964.
14395
14396 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
14397
14398         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
14399
14400         * aot.c: Added support for AOT compiling methods which contain calls
14401         to wrappers. Currently, only remoting-invoke-with-check wrappers are
14402         handled.
14403         
14404         * driver.c (compile_all_methods): Run the compilation in a thread
14405         managed by mono. Fixes #44023.
14406
14407         * mini.c (mono_codegen): Print full method name in verbose output.
14408
14409         * mini-x86.c (mono_arch_patch_code): Fix warning.
14410         
14411         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
14412         jumps, since the method we are jumping to might be domain-specific.
14413
14414         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
14415
14416 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
14417
14418         * inssel.brg: string chars are unsigned.
14419
14420 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
14421
14422         * TODO: New todo item.
14423
14424         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
14425         which calls mono_runtime_class_init and patches the call site to
14426         avoid further calls.
14427         (mono_arch_create_class_init_trampoline): New arch specific function 
14428         to create a class init trampoline.
14429         (create_trampoline_code): Generalized so it can create
14430         class init trampolines as well.
14431
14432         * mini.c (helper_sig_class_init_trampoline): New helper variable.
14433         (mono_create_class_init_trampoline): New function to create and cache
14434         class init trampolines.
14435         (mono_find_class_init_trampoline_by_addr): New function to lookup the
14436         vtable given the address of a class init trampoline. Used by the
14437         patching process.
14438         (mono_codegen): Generate a call to a trampoline instead of
14439         mono_runtime_class_init in LDSFLD[A].
14440         (mono_codegen): Add relocations for the new trampoline.
14441         
14442         * mini.h mini-x86.c aot.c: Added a new relocation type: 
14443         MONO_PATCH_INFO_CLASS_INIT.
14444
14445         * mini.h: Bump AOT version number.
14446
14447         * aot.c: Create a copy of the loaded code instead of using the original
14448         so methods which call each other will be close in memory, improving
14449         cache behaviour.
14450         
14451         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
14452         patch since it breaks the regression tests.
14453         
14454         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
14455         for the register saving instruction sequence since the 
14456         frame_state_for function in glibc 2.3.2 don't seem to detect it.
14457
14458 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
14459
14460         * TODO: Fix todo item && remove another.
14461
14462 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
14463
14464         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
14465         previous checkin.
14466
14467         * aot.c: Moved the check for MONO_LASTAOT into the initialization
14468         function of the module.
14469
14470         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
14471         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
14472         --no-aot command line option.
14473
14474 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
14475
14476         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
14477         by Bernie Solomon (bernard@ugsolutions.com).
14478
14479         * inssel.brg: Refactor the interface offset table related code into
14480         its separate functions and add support for the AOT case.
14481
14482 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
14483
14484         * aot.c (mono_aot_get_method_inner): Fix memory leak.
14485         
14486         * aot.c: Added mono_aot_verbose variable and made all debugging
14487         output depend on the value of this variable.
14488
14489         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
14490         method_label and info_label.
14491
14492         * mini.h mini-x86.c aot.c: Added a new relocation type 
14493         MONO_PATCH_INFO_IID for klass->interface_id.
14494
14495         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
14496         the MonoJitInfo structure.
14497
14498         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
14499         a non-root appdomain in shared mode.
14500
14501 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
14502
14503         * aot.c: make aot loader less verbose. Remove free of unused variable.
14504
14505 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
14506
14507         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
14508
14509         * .cvsignore: Added *.dll.
14510
14511         * mini.c (mono_print_tree_nl): New function callable while debugging.
14512
14513         * mini.c (mono_print_code): Export this.
14514
14515         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
14516         patched code.
14517
14518 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
14519
14520         * mini.h (MonoCompile): Added 'jit_info' field.
14521
14522         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
14523         the cfg structure, since it is needed by the AOT compiler.
14524
14525         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
14526
14527         * aot.c: A major rewrite. Changes include:
14528         - save exception tables for methods which have them.
14529         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
14530         to g_module_symbol.
14531         - reworked the file format so it is now much smaller and needs
14532         fewer relocation entries.
14533         
14534 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
14535
14536         * aot.c (load_aot_module): Fix build bustage on platforms without
14537         Boehm GC.
14538
14539 2003-09-04  Martin Baulig  <martin@ximian.com>
14540
14541         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
14542
14543 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
14544
14545         * TODO: Some new optimization ideas.
14546
14547         * aot.c: Move AOT module loading logic here from mono_assembly_open.
14548
14549         * aot.c: Save the optimization flags used to compile the code into
14550         the AOT module.
14551
14552         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
14553         support emitting domain specific code.
14554         
14555         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
14556         no longer domain neutral. It can be made domain neutral by compiling 
14557         with --optimize=shared.
14558
14559         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
14560         between appdomains.
14561
14562         * driver.c mini.h mini.c: New --no-aot debugging option which disables
14563         loading of AOT code.
14564
14565         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
14566         
14567         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
14568         if there is no domain neutrality information.
14569
14570 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
14571
14572         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
14573         format version into the generated library.
14574
14575         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
14576         callee method into the caller since one of them could be shared.
14577
14578         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
14579         system exceptions from AOT code now works.
14580
14581         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
14582         method if it is domain neutral and the callee is not.
14583
14584         * graph.c (cfg_emit_one_loop_level): Fix warning.
14585
14586 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
14587
14588         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
14589         last checkin.
14590
14591 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
14592
14593         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
14594         is needed  by code which is executed before mono_runtime_init ().
14595         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
14596         
14597         * mini.c (mono_thread_abort): Fix warning.
14598         (mono_jit_compile_method): Call static constructor in the AOT case too.
14599
14600         * aot.c (mono_compile_assembly): Fix warning.
14601
14602 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14603
14604         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
14605
14606 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
14607
14608         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
14609
14610         * cpu-pentium.md: Fix the length of call opcodes so they include the
14611         ESP restoring instruction. Fixes #47968.
14612
14613 2003-08-28  Martin Baulig  <martin@ximian.com>
14614
14615         * mini-x86.c (mono_arch_call_opcode): Added support for
14616         MONO_TYPE_GENERICINST.
14617
14618         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
14619
14620 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
14621
14622         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
14623         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
14624
14625         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
14626         metadata_section.
14627
14628 2003-08-26  Martin Baulig  <martin@ximian.com>
14629
14630         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
14631         when reporting an error, set this to the actual error location.
14632         (mono_method_to_ir): Report the correct error location if
14633         get_basic_blocks() returned an error.
14634
14635 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
14636
14637         * mini.c (mono_type_blittable): OBJECT is not blittable.
14638         (mono_method_blittable): Methods which have marshalling descriptors
14639         are not blittable either. Fixes #47842.
14640
14641 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
14642
14643         * driver.c mini.c: Use an environment variable instead of a global 
14644         variable. Also fix the build.
14645
14646         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
14647         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
14648         reporting this. 
14649
14650         * driver.c mini.c: Added --with-valgrind option to turn off some
14651         code which prevents mono from running under valgrind.
14652
14653         * mini.c (mono_emit_call_args): Fixed warning.
14654
14655         * mini.c (mono_emulate_opcode): Fixed warning.
14656
14657 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14658
14659         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
14660         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
14661         regalloc.c, regalloc.h: specify available registers in arch-specific
14662         code and support floats in the regallocator (patch by Laurent Morichetti 
14663         <l_m@pacbell.net>)
14664
14665 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
14666
14667         * mini.c: mono_thread_current() can be called only after
14668         mono_runtime_init(): rearrange code to not call it early on.
14669
14670 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
14671
14672         * mini.c: allocate jump tables in the code mempools.
14673
14674 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14675
14676         * mini.c, mini.h: make sure per-thread data allocated by the jit is
14677         freed.
14678
14679 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
14680
14681         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
14682         12 to 16.  This fixes bug #47453.
14683
14684
14685 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
14686
14687         * mini-ppc.c: fixed indexed load and unsigned compares.
14688
14689 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
14690
14691         * mini.c: reenabled installation of handler for
14692           thread abort signal.
14693
14694 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14695
14696         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
14697         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
14698         until it's fixed and actually useful.
14699
14700 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
14701
14702         * inssel-long32.brg: couple more opcodes implemented.
14703
14704 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
14705         
14706         * mini-sparc.c: Even more opcodes implemeted.
14707
14708 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
14709
14710         * mini-sparc.c: More opcodes implemented.
14711
14712 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
14713
14714         * mini-sparc.c: More opcodes implemented.
14715
14716 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
14717
14718         * inssel-sparc.brg: Add some needed rules.  Direct
14719         copy from PPC.
14720         * Makefile.am: Use inssel-sparc.brg
14721         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
14722         an assert happy for now.
14723
14724 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
14725
14726         * mini-sparc.c: Fixed compile errors.
14727         * exceptions-sparc.c: Same.  We now produce a mono binary 
14728         on sparc-linux.  Yea.
14729
14730 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
14731
14732         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
14733         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
14734         They compile, but do not work.
14735
14736 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14737
14738         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
14739         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
14740         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
14741         (ct@gentoo.org).
14742
14743 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14744
14745         * mini.c: more opcodes implemented and better support for generics.
14746
14747 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
14748
14749         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
14750         * mini.c, mini.h: first cut at generics support: some new instructions 
14751         added and changed the behaviour of some of the existing ones.
14752
14753 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
14754
14755         * mini.c: Removed definition of metadata_shared mutex here.
14756
14757 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
14758
14759         * mini-x86.c: make vararg calls work for instance methods.
14760
14761 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
14762
14763         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
14764         returns the arguments in a separte list, now.
14765
14766 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
14767
14768         * aot.c, mini.c: updates for array type representation changes.
14769
14770 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
14771
14772         * mini.c: register function to perform jit shutdown.
14773
14774 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14775
14776         * mini.c: use a faster allocator if possible.
14777
14778 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
14779
14780         * aot.c: some cleanups and portability changes.
14781
14782 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
14783
14784         * mini.c: use faster allocation for CEE_BOX if possible.
14785
14786 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
14787
14788         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
14789         Moved inlined mempcy code to its own function so that is can be
14790         reused. Added an inline memset function as well (optimized initobj).
14791         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
14792
14793 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
14794
14795         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
14796
14797 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
14798
14799         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
14800         arch code can setup the cpu for CLR execution, if needed.
14801         We use it on x86 to set the precision of FP operations.
14802
14803 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
14804
14805         * mini.c: disable some optimizations if we can guess they'll cost too
14806         much for a given method.
14807
14808 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
14809
14810         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
14811         
14812 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
14813         * mini.h mini.c mini-x86.c: Added instruction level coverage 
14814         info collection support.
14815
14816 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
14817
14818         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
14819         is now implemented in the profiling API. Get rid of a couple of
14820         unnecessary global variables.
14821
14822 2003-06-15  Nick Drochak <ndrochak@gol.com>
14823
14824         * basic-long.cs: tests for negative values for bigmul, and unsigned.
14825         * cpu-g4.md: add op_bigmul and op_bigmul_un
14826         * cpu_pentium.md: add op_bigmul_un
14827         * inssel-long32.brg: add rule for unsigned bigmul
14828         * mini-ops.h: define OP_BIGMUL_UN
14829         * mini-x86.c: THE BUG: handle (un)signed properly
14830         * mini.c: choose unsigned opcode if needed.
14831         This set of patches fixes bug #44291
14832
14833 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
14834
14835         * mini.c (optimize_branches): improved to handle all kinds of
14836         conditional branches.
14837
14838 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
14839
14840         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
14841         don't raise exceptions.
14842
14843 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
14844
14845         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
14846         to arch-specific files.
14847
14848 2003-06-09  Martin Baulig  <martin@ximian.com>
14849
14850         * Makefile.am (libs): Added $(LIBGC_LIBS).
14851
14852 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
14853
14854         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
14855         and OP_ATAN (fixes bug#44293).
14856
14857 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
14858
14859         * Makefile.am, mini-x86.c: rename cpu description array to
14860         pentium_desc, since some compilers define the 'pentium' preprocessor
14861         symbol.
14862
14863 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
14864
14865         * mini.c (mini_select_instructions): add explicit branch if the
14866         following block is not the false target of a conditional branch -
14867         we need this with any optimization that reorder or remove bblocks
14868
14869         * mini.c (optimize_branches): bug fixes
14870
14871 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
14872
14873         * mini.c (mono_method_to_ir): inline static readonly fields
14874
14875         * ssa.c (fold_tree): start cfold support for long (very simple
14876         cases only)
14877
14878         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
14879
14880 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
14881
14882         * inssel.brg: fixed memcpy (bug #44219).
14883
14884 2003-06-05  Dick Porter  <dick@ximian.com>
14885
14886         * driver.c: Set the glib log levels to not abort if g_message
14887         recurses.
14888
14889         g_set_prgname() has to happen before mini_init() so that the
14890         process handle gets the info.
14891         
14892 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
14893
14894         * driver.c: add intrins to the default optimizations to get wider
14895         exposure.
14896
14897 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
14898
14899         * mini.h: some large basic blocks will overflow a 16-bit
14900         integers for symbolic registers.
14901
14902 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
14903
14904         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
14905         (mono_arch_output_basic_block): fix bug 43499 
14906
14907 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
14908
14909         * mini.c: kill duplicated definition of mono_debug_format.
14910
14911 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
14912
14913         * mini-x86.c, arrays.cs: fixed register allocation bug.
14914
14915 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
14916
14917         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
14918
14919         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
14920
14921 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14922
14923         * mini.c:
14924         (print_method_from_ip): also print source location information if
14925         available.
14926
14927 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
14928
14929         * mini.c (mono_find_block_region): bug fix in region code
14930         (mini_method_compile): enable removing unreachable code again, but
14931         only in methods without exception clauses.
14932
14933 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
14934
14935         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
14936         Implemented arglist opcode and handling of TypedReference type.
14937         Fixed x86 call convention when a structure is returned.
14938         Minimal support for calling static vararg methods.
14939
14940 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
14941
14942         * mini.c (mini_method_compile):  always remove unreachable code,
14943         because the code in them may be inconsistent  (access to dead
14944         variables for example).
14945
14946 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
14947
14948         * driver.c, debug-mini.c: warning fixes.
14949
14950 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
14951
14952         * Makefile.am, jit.h, mini.h: install header for embedding mono.
14953
14954 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
14955
14956         * mini.c: thread-static fields are registered in mono_class_vtable(),
14957         so ensure the function is called before checking for them.
14958
14959 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
14960
14961         * mini.c (optimize_branches): fix for bug 43586
14962
14963         * jit-icalls.c (mono_llmult_ovf): added an additional check for
14964         overflow (fixes Bug #43639)
14965
14966 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14967
14968         * mini.c, objects.cs: allow the use of stobj for primitive types.
14969
14970 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14971
14972         * mini.c: be less strict about argument checking until we support
14973         running the verifier.
14974
14975 2003-05-27  Nick Drochak <ndrochak@gol.com>
14976
14977         * basic-long.cs: tests for (ulong)int * (ulong)int also
14978         * mini.c: use the same trick for (ulong)int * (ulong)int
14979
14980 2003-05-27  Nick Drochak <ndrochak@gol.com>
14981
14982         * basic-long.cs: add regression test for (long)int * (long)int
14983         * cpu-pentium.md: add op_bigmul specification
14984         * inssel-long32.brg: add OP_BIGMUL rule
14985         * mini-ops.h: add OP_BIGMUL
14986         * mini-x86.c: register allocator: handle case where src1 needs to be
14987         in EAX.
14988         * mini.c: substitute special BIGMUL opcode in the tree for 
14989         (long)int * (long)int
14990
14991 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
14992
14993         * jit-icalls.c: call the type ctor on field access if needed.
14994
14995 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
14996
14997         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
14998         to a method (including results of ldelema, bug#43207).
14999
15000 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
15001
15002         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
15003         colors to show exception handler blocks.
15004
15005         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
15006         (fix for pinvoke7.cs).
15007
15008 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15009
15010         * mini.h, mini.c: ensure correct initialization order for types that
15011         require it. Prepare for lazy compilation of jit icall wrappers.
15012         Provide a name for opcode emulation to reduce unneeded mallocing.
15013
15014 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
15015
15016         * mini-x86.c: better register restoring code and profiling
15017         support for tail calls.
15018
15019 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15020
15021         * mini.h, driver.c: prepare for leaf methods optimization.
15022
15023 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
15024
15025         * mini.c: get targets of branches before converting a method.
15026
15027 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
15028
15029         * mini.c (optimize_branches): added some experimental code (disbaled) 
15030
15031 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
15032
15033         * mini.c (optimize_branches): fix branch to branch optimization 
15034
15035         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
15036
15037         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
15038
15039         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
15040
15041         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
15042         if needed.
15043
15044 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
15045
15046         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
15047         enable use of interface variables again.
15048
15049         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
15050         I1 to registers because there is no simply way to sign extend 8bit
15051         quantities in caller saved registers on x86.
15052
15053         * inssel-float.brg: set costs of some rules to 2 so
15054         that monobure always select the arch. specific ones if supplied,
15055         regardless of the order we pass the files to monoburg.
15056
15057 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
15058
15059         * mini.c, mini-x86.c: since the magic trampoline for jumps
15060         can't patch the code directly, we do it as soon as the
15061         method gets compiled.
15062
15063 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
15064
15065         * mini-x86.c, mini.h: introduce a new patching method
15066         to support CEE_JMP and tail calls.
15067         * mini.c: obey tail.call. Don't precompile methods target
15068         of CEE_JMP.
15069         * tramp-x86.c: new trampoline code to handle methods
15070         reached through a jump.
15071
15072 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
15073
15074         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
15075         bit values to registers
15076
15077 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
15078
15079         * mini.c (mono_compile_get_interface_var): share interface
15080         variables if possible.
15081
15082 2003-05-16  Martin Baulig  <martin@ximian.com>
15083
15084         * debug-mini.c (mono_init_debugger): New function to initialize
15085         the debugger.  This is not in the debugger since it needs to
15086         access some of mini's internals.
15087
15088 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
15089
15090         * mini.c (mono_method_to_ir): inlining fixes/cleanups
15091
15092 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
15093
15094         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
15095         for value type handling.
15096
15097 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
15098
15099         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
15100         (mono_method_check_inlining): enable inlining of all kinds of wrappers
15101
15102 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
15103
15104         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
15105           the constructor through a proxy.
15106
15107 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15108
15109         * jit-icalls.c, inssel.brg: fixes to array element address
15110         calculations.
15111
15112 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
15113
15114         * mini-x86.c (is_regsize_var): allocate pointer to registers
15115
15116 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15117
15118         * driver.c: fixed typo, added intrins to the set of optimizations
15119         tested with regressions.
15120
15121 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
15122
15123         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
15124         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
15125         test case.
15126
15127 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
15128
15129         * inssel.brg: remove some common pop instructions without side effects
15130
15131 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15132
15133         * inssel-x86.brg: fixed thinko in int to double conversions.
15134
15135 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
15136
15137         * mini.c, jit-icalls.c: added runtime thread-static variable support.
15138
15139 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
15140
15141         * inssel-long32.brg: two more missing instructions.
15142
15143 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
15144
15145         * mini.c (mono_emit_call_args): set the cil_code for all arguments
15146         if not already set.
15147
15148 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
15149
15150         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
15151         correctly.
15152
15153         * basic-float.cs: Added tests for negative zero.
15154
15155 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15156
15157         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
15158         a couple of missing operations for long casts, with test cases.
15159
15160 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15161
15162         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
15163
15164 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
15165
15166         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
15167         code size estimation.
15168
15169 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
15170
15171         * mini.c (mono_jit_create_remoting_trampoline): make it work with
15172         abstract methods (fix bug 42542)
15173
15174         * aot.c: add ability to handle array types
15175         
15176 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
15177
15178         * mini.c: Call the _specific versions of the object allocation
15179         functions if possible.
15180
15181 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
15182
15183         * driver.c: call setlocale ().
15184
15185 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
15186
15187         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
15188         windows build.
15189
15190 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
15191
15192         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
15193
15194         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
15195         wrappers (fix bug 42122)
15196
15197 2003-05-04  Martin Baulig  <martin@ximian.com>
15198
15199         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
15200
15201         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
15202         s/mini_set_defaults/mono_set_defaults/g.
15203
15204 2003-05-04  Martin Baulig  <martin@ximian.com>
15205
15206         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
15207
15208 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15209
15210         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
15211         (reported by Don Roberts).
15212
15213 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
15214
15215         * mini.c: temporarily work around two bugs for this release.
15216
15217 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15218
15219         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
15220         that contains -export-dynamic and it makes using the ld script
15221         useless.
15222         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
15223
15224 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
15225
15226         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
15227         specific cpu.
15228
15229 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
15230
15231         * mini.c: make sure leave calls all the needed finally blocks,
15232         even when the target jumps out of multiple exception clauses.
15233
15234 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15235
15236         * ldscript, Makefile.am: add linker script to reduce the number of
15237         exported symbols (should also fix the issues with libwine defining
15238         some of the same symbols in io-layer).
15239
15240 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
15241
15242         * driver.c (mini_main): Avoid assertion when no file name is given on 
15243         the command line.
15244
15245 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
15246
15247         * driver.c: added --version/-V command line option.
15248         Added the inline optimization in the regression tests.
15249
15250 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15251
15252         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
15253         to the type in the method signature (fixes bug#42134).
15254
15255 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
15256
15257         * mini.c: when inlining, check this is not null only when needed (bug #42135).
15258
15259 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
15260
15261         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
15262
15263 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15264
15265         * driver.c: fixed bug #42100.
15266
15267 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
15268
15269         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
15270
15271 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
15272
15273         * mini.c: moved most of the code required to do inlining to its own
15274         function so it can be reused. Inline also ctors if appropriate.
15275
15276 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
15277
15278         * Makefile.am: Link with -export-dynamic so shared libs loaded by
15279         the runtime can call mono API functions.
15280
15281 2003-04-27  Martin Baulig  <martin@ximian.com>
15282
15283         * debug-mini.c (mono_debug_init_method): Added
15284         `guint32 breakpoint_id' argument; if the method has a breakpoint,
15285         send a notification to the debugger.
15286
15287         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
15288         running in the Mono Debugger, just pass the breakpoint number to
15289         mono_debug_init_method().
15290
15291         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
15292
15293 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
15294
15295         * mini.c: allow some more unsafe compares.
15296
15297 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15298
15299         * mini-x86.c, Makefile.am: make distcheck works (partially from
15300         a patch by Richard Lee <r.h.lee@attbi.com>).
15301         * regset.c, regset.h: removed, they are unused.
15302
15303 2003-04-25  Dick Porter  <dick@ximian.com>
15304
15305         * driver.c: Usage reports the name as 'mono' not 'mini'
15306         * exceptions-x86.c: Build and run on freebsd
15307
15308 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
15309
15310         * Makefile.am: install the program with the 'mono' name and
15311         the library as libmono instead of mini and libmini.
15312
15313 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
15314
15315         * driver.c: provide the APIs for the embedding interface of the old jit.
15316
15317 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
15318
15319         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
15320
15321 2003-04-23  Martin Baulig  <martin@ximian.com>
15322
15323         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
15324
15325         * driver.c: Added `--debug' command line argument to enable
15326         debugging support.
15327
15328 2003-04-23  Martin Baulig  <martin@ximian.com>
15329
15330         * debug.[ch]: Removed.  The code is now in
15331         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
15332
15333         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
15334         last six months.
15335
15336 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
15337
15338         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
15339
15340 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15341
15342         * mini.c:
15343         (mini_cleanup): moved mono_runtime_cleanup call after the call to
15344         mono_domain_finalize.
15345         (mini_method_compile): use mono_method_profile* if the the option is
15346         enabled.
15347
15348 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
15349
15350         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
15351         methods with their wrapper.
15352
15353         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
15354         methods with their wrapper.
15355
15356         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
15357         their wrapper.
15358
15359         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
15360         wrapper.
15361
15362         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
15363         methods.
15364
15365 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
15366
15367         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
15368
15369 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
15370
15371         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
15372         of the mempool. This is slightly faster and uses less memory
15373
15374 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15375
15376         * mini.c: avoid O(n) allocation for variables.
15377
15378 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15379
15380         * mini.c: handle items on the stack after inlining methods.
15381
15382 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
15383
15384         * mini.c: make the method->opcode optimization dependent
15385         on MONO_OPT_INSTRINS and do it lazily.
15386
15387 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
15388
15389         * driver.c: print overall results at the end of regression run.
15390
15391 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
15392
15393         * inssel.brg: don't overwrite symbolic registers.
15394
15395 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
15396
15397         * inssel-x86.brg: fix conversion from long to float.
15398
15399 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
15400
15401         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
15402
15403 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
15404
15405         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
15406
15407         * driver.c: Added --print-vtable option as in the old JIT.
15408
15409 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
15410
15411         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
15412
15413 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
15414
15415         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
15416
15417 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
15418
15419         * mini.c regalloc.c regalloc.h: Fix memory leak.
15420
15421 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
15422
15423         * aot.c (mono_aot_get_method): register all used strings
15424
15425 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15426
15427         * mini.c: always intern strings references with ldstr at compile time.
15428
15429 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15430
15431         * Makefile.am: add BUILT_SOURCES.
15432
15433 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
15434
15435         * driver.c: give a better error message when the assembly to execute
15436         doesn't have an entry point.
15437
15438 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
15439
15440         * Makefile.am: added hack for automake
15441
15442         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
15443         correct sematics.
15444
15445         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
15446
15447 22003-04-07  Martin Baulig  <martin@ximian.com>
15448
15449         * Makefile.am: Added Makefile.am.
15450
15451         * debugger-main.c: Removed, this is now in the debugger where it
15452         belongs.
15453
15454         * mini.pc.in: Call this package `mini' for the moment.
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468