2008-09-11 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / ChangeLog
1 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
2
3         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
4         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
5         JIT if DISABLE_JIT is defined.
6
7         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
8         defined.
9
10 2008-09-10  Mark Probst  <mark.probst@gmail.com>
11
12         * iltests.il.in: Disable the fconv test on PPC (the result is
13         undefined according to ECMA).
14
15 2008-09-10  Mark Probst  <mark.probst@gmail.com>
16
17         * iltests.il.in: Enable tail call tests for PPC.
18
19         * mini.h: Add variable for storing incoming valuetype argument
20         addresses for tail calls.
21
22         * mini-ppc.c: Implement valuetype arguments and return values for
23         tailcalls on Linux.
24
25 2008-09-09  Mark Probst  <mark.probst@gmail.com>
26
27         * mini-ppc.c: Partially implement tail calls (struct arguments and
28         return values not supported).
29
30         * method-to-ir.c: Enable tail calls on PPC.
31
32 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
33
34         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
35         runtime-invoke wrappers to work around the problem of them getting
36         assigned to a random class.
37
38         * aot-runtime.c (mono_aot_get_method): Ditto.
39         
40 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
41
42         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
43         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
44
45 2008-09-07  Mark Probst  <mark.probst@gmail.com>
46
47         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
48         until they're implemented properly.
49
50         * exceptions-ppc.c: Use arch-independent exception-handling code
51         instead of custom one.
52
53         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
54         for Linear IR.
55
56         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
57
58         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
59         applies when __powerpc__ is defined.
60
61 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
62
63         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
64         methods to their code to avoid computing the full name of wrappers and
65         doing a lookup in a string hash table.
66
67 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
68
69         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
70         we identify bblocks before method_to_ir () is ran.
71
72         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
73         Also avoid optimizing branches pointing to themselves.
74
75         * mini.c (mini_method_compile): Ditto. Fixes #422947.
76
77 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
78
79         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
80
81 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
82
83         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
84         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
85         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
86         'buf'.
87
88         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
89         jumped to the same entry in plt_jump_table.
90
91 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
92
93         * method-to-ir.c (initialize_array_data): Handle field with RVA from
94         dynamic images.
95
96 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
97
98         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
99         other assignment can be if converted. Saves 1.5% on corlib size and fixes
100         #421807.
101
102 2008-08-29  Geoff Norton  <gnorton@novell.com>
103
104         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
105         segment, and doesn't properly handle .space as .text.  Fixes
106         AOT Mach/ARM
107
108 2008-08-29  Geoff Norton  <gnorton@novell.com>
109
110         * mini.c: Disable the mach exception handler when running on 
111         ARM
112
113 2008-08-29  Geoff Norton  <gnorton@novell.com>
114
115         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
116         globals on Darwin/ARM
117
118 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
119
120         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
121         since too many things depend on it. Instead, call 
122         mono_runtime_set_no_exec ().
123         
124         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
125         the new JIT.
126
127         * aot-compiler.c: Add an 'asm-only' AOT option.
128
129         * mini.c: Avoid initializing the runtime when doing AOT compilation.
130                 
131         * aot-compiler.c (compile_method): Disable gshared support for now as it
132         doesn't yet work.
133
134 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
135
136         * mini-amd64.h : Fix a compiler warning.
137
138         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
139           Changed to use a callback function to retrieve the unwind info.
140           This avoids problems observed when code blocks were removed by
141           unloading an app domain.
142
143         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
144           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
145           to work properly.
146
147         Contributed under MIT/X11 license.
148
149 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
150
151         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
152           case to keep the stack aligned to 8.
153
154         Contributed under MIT/X11 license.
155
156 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
157
158         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
159         avoid repeated linear searches.
160
161 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
162
163         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
164         methods it can't handle.
165         
166         * aot-compiler.c (add_method): Avoid adding a method twice.
167         (add_wrappers): Add runtime invoke wrappers for all methods.
168
169         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
170         function to create an aot-compatible version of this trampoline.
171
172         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
173
174 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
175
176         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
177
178         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
179         with a generic sharing failure.
180
181         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
182
183         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
184         CEE_RETHROW. Fixes #419634.
185
186         * mini.c (mono_method_to_ir): Ditto.
187
188         * exceptions.cs: Add a new test.
189         
190         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
191         to mono_type_stack_size_internal () since some callers might not pass in
192         an rgctx.
193
194         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
195         instrument_prolog. Fixes #419878.
196
197         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
198         doubles in soft float mode volatile.
199
200 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
201
202         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
203
204         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
205         to handle soft float correctly.
206
207         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
208         the fast path.
209
210         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
211
212         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
213         to sp, since the generics catch code requires it.
214
215         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
216         copying.
217
218         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
219         mono_arch_emit_imt_argument ().
220
221         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
222
223         * mini-arm.c tramp-arm.c: Generic sharing updates.
224
225 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
226
227         * mini-arm.c: Fix the arm build.
228
229         * generic-sharing.c (mini_type_get_underlying_type): New helper function
230         handling enums, generic instances and generic sharing.
231         (mini_type_stack_size_full): Ditto.
232
233         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
234         
235         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
236
237         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
238
239         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
240         trampolines.
241
242         * mini-arm.c: Various small generic sharing changes.
243
244         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
245         this for x86.
246         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
247         custom code.
248
249         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
250         helper function to return a generic class init trampoline.
251
252         * method-to-ir.c mini.c: Use it.
253         
254         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
255         arch-specfic function to return a generic class init trampoline.
256
257         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
258         the GENERIC_CLASS_INIT custom code.
259
260         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
261         a fatal error, not a sharing failure.
262
263         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
264         needed.
265
266         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
267         trampoline argument from MONO_ARCH_VTABLE_REG.
268
269         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
270         order of the arguments to the C trampoline: pass 'slot' as the trampoline
271         argument, and pass the vtable in VTABLE_REG.
272
273         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
274         order of the arguments to the C trampoline: pass 'slot' as the trampoline
275         argument, and pass the vtable in VTABLE_REG.
276         (mono_arch_create_trampoline_code_full): Remove some special casing for
277         the rgctx fetch trampoline.
278
279         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
280         Fixes #419273.
281
282         * iltests.il: Add a test for it.
283
284 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
285
286         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
287
288         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
289         no longer needed.
290
291         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
292         use mono_jit_info_table_find () to avoid recursion.
293         (mono_delegate_trampoline): Add a sync wrapper here.
294
295         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
296         here.
297
298         * mini.c (mono_method_to_ir): Ditto.
299         
300         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
301         add_sync_wrapper argument. Don't add a sync wrapper here.
302         (mono_create_jump_trampoline): Don't add a sync wrapper here.
303
304         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
305         
306 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
307
308         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
309           of nonvolatile registers back from MonoContext to CONTEXT.
310
311         Contributed under MIT/X11 license.
312
313 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
314
315         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
316           arguments on Winx64 there are only 4 argument registers.  For this
317           logic to work the last argument must be pulled from the stack.  
318
319         Contributed under MIT/X11 license.
320
321 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
322
323         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
324
325         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
326         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
327         encode/decode_method_ref ().
328
329         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
330
331         * aot-runtime.c (decode_patch): Ditto.  
332
333         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
334         MONO_PATCH_INFO_METHOD.
335
336         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
337         MonoGenericJitInfo.
338
339         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
340         MonoGenericJitInfo.
341
342         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
343
344         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
345         one from the caller.
346
347         * aot-runtime.c (decode_generic_inst): New function to decode and
348         return a interned generic inst.
349         (decode_klass_ref): Use it.
350         (decode_method_ref): Ditto.
351
352         * aot-compiler.c (emit_exception_debug_info): Save 
353         jinfo->has_generic_jit_info too.
354
355 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
356
357         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
358
359         * iltests.il.in: Add a test for fconv_to_i.
360
361         * liveness.c: Disable the liveness2 pass for now to save space.
362
363         * regalloc2.c: Include mempool-internals.h to fix warnings.
364
365         * aot-compiler.c (encode_method_ref): Encode the context of generic
366         instance methods.
367
368         * aot-runtime.c (decode_method_ref): Inflate generic methods using
369         the context saved in the aot file.
370
371         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
372
373         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
374
375         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
376         volatile so they won't be optimized away.
377
378 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
379
380         * ssa.c:
381         * ssa2.c:
382         * mini.c:
383         * regalloc2.c:
384         * dominators.c: Remove duplicated functions that now are in
385         mempool-internals.h.
386
387 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
388
389         * aot-compiler.c: Fix warnings.
390
391         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
392
393         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
394
395         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
396         as the patch type.
397
398         * mini.c (mono_resolve_patch_target): Ditto.
399         
400         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
401         (encode_klass_ref): Add support for encoding VARs/MVARs.
402
403         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
404
405         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
406         the handling of the got entries into a separate 'decode_got_entry' function.
407         Add support for RGCTX_FETCH.
408
409         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
410         clobbered by the trampoline code.
411
412         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
413         not clobbered by the indirect calling code.
414
415 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
416
417         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
418         to fix the build.
419
420 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
421
422         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
423         signature using the compilation mempool otherwise we would leak it.
424
425 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
426
427         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
428         mono_emit_abs_call ().
429
430         * patch-info.h: Add GENERIC_CLASS_INIT.
431
432         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
433
434         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
435         as their target as a near call.
436
437         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
438         ABS handling code.
439         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
440
441         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
442         call to a runtime function described by a patch.
443
444         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
445         mono_emit_abs_call, this has the advantage that the ABS handling code in
446         mono_codegen () can handle them both, and can handle other stuff in the
447         future without additional code.
448
449         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
450         entry.
451         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
452         abs addresses.
453
454         * mini.h: Add missing bblock related prototypes.
455
456         * mini.h (MonoCompile): Remove unused reverse_inst_list and
457         reverse_inst_list_len fields.
458
459         * mini.c: Refactor this file a bit by moving branch optimizations to 
460         branch-opts.c.
461
462         * method-to-ir.c: Merge generic sharing changes missed earlier.
463
464         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
465
466         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
467         shared patches. Process METHODCONST as a shared patch.
468
469         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
470         as it crashes on the 2.0 mscorlib.
471
472         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
473         to cause crashes.
474         
475         * aot-compiler.c: Use is_plt_patch () in a few additional places.
476         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
477         by IMT.
478
479         * aot-compiler.c: Reorganize the got handling code to be a bit more
480         understandable.
481
482 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
483
484         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
485         mono_patch_info_equals/hash, and use it to massively simplify
486         get_plt_index ().
487
488         * mini.c (mono_patch_info_hash): Simplify this and add support for
489         more patch types.
490
491         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
492
493         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
494         handling code, since an offset is not enough to identify a trampoline.
495
496         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
497
498 2008-08-17  Mark Probst  <mark.probst@gmail.com>
499
500         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
501
502         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
503
504         * mini-ops.h: Argument and result types for OVF_CARRY ops.
505
506         * decompose.c: PPC decompositions for various ops.
507
508         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
509
510 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
511
512         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
513         call the generic trampoline code using a call, instead of a jump, to
514         remove some special casing from the generic trampoline code.
515
516         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
517         (mono_codegen): Ditto.
518
519         * aot-compiler.c aot-runtime.c: Ditto.
520
521         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
522
523         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
524         helper function to find the offset corresponding to a lazy fetch trampoline.
525
526         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
527         when doing generic sharing.
528
529         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
530         places.
531         
532         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
533         mini-trampolines.c to be with the other trampoline creation functions.
534
535         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
536         as it is equal to method->signature in most cases, add a 
537         mono_emit_method_call_full variant which takes a signature and an imt
538         argument as well.
539
540 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
541
542         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
543         to this function, since it could be computed easily from the method 
544         argument.
545         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
546         more.
547
548         * method-to-ir.c mini.c: Remove references to 
549         compile_generic_method_wo_context.
550
551         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
552         generic method calls.
553         
554         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
555         dimensional non-szarrays.
556
557         * mini.c (mini_init): Register mono_array_new_1.
558
559         * jit-icalls.c (mono_array_new_1): New jit icall.
560
561         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
562         pointing to the method.
563
564         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
565         method addresses belonging to METHOD_JUMP patches in the 
566         jump_target_got_slot_hash.
567         (mono_aot_load_method): Ditto.
568
569         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
570         METHOD_JUMP patches.
571
572         * mini.c (mini_create_jit_domain_info): New helper function which 
573         initializes/frees domain->runtime_info.
574         (mini_free_jit_domain_info): Ditto.
575         (mini_init): Install the domain hook functions with the runtime.
576
577         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
578         information maintained by the JIT.
579
580         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
581         insertion into jump_table_hash into mono_codegen (), also implement proper
582         locking.
583
584         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
585         tail calls, it is already done by the aot code.
586         
587         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
588         mechanism on amd64.
589
590         * iltests.il.in: Make the jmp test a bit more complex.
591
592         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
593         generic instances which doesn't have a token.
594
595         * aot-runtime.c (decode_method_ref): Ditto.
596         
597         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
598         can handle this case now.
599         (handle_box): Ditto.
600
601 2008-08-15  Geoff Norton  <gnorton@novell.com>
602
603         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
604         debugging check.
605
606 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
607
608         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
609         calling generic methods.
610
611         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
612
613         * aot-runtime.c (decode_patch_info): Ditto.
614
615         * mini.c (mono_resolve_patch_target): Ditto.
616         
617         * patch-info.h: Add METHOD_RGCTX.
618
619         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
620
621 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
622
623         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
624         arguments in registers.
625
626         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
627         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
628
629         * mini.c (mini_method_compile): Abort aot compilation for generic
630         methods if generic sharing is disabled.
631         
632         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
633         an mrgctx.
634
635         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
636         requiring an mrgctx.
637
638         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
639         store instructions when converting a vcall to a normal call.
640
641         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
642         mono_arch_find_jit_info.
643
644 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
645
646         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
647         avoid calling mono_method_full_name () for every method even if the
648         env var is not set.
649         (check_inline_caller_method_name_limit): Ditto.
650
651 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
652
653         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
654         assemblies in one run.
655
656         * aot-compiler.c (mono_compile_assembly): Only print out a count of
657         skipped methods if it is not 0.
658
659         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
660
661 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
662
663         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
664           MONO_ARCH_HAVE_UNWIND_TABLE.
665
666         Contributed under MIT/X11 license.
667
668 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
669
670         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
671           from default optimizaton list on Winx64.
672
673         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
674
675         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
676           the LMF from the MonoJitTlsData structure.
677
678         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
679
680         Contributed under MIT/X11 license.
681
682 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
683
684         * mini.c (sigsegv_signal_handler): Fix the build.
685
686         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
687         assembly->aot_module.
688
689         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
690         hash table. This simplifies and speeds up a lot of code, and fixes support
691         for .netmodules.
692
693         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
694         with the runtime.
695
696         * mini-exceptions.c: Ditto.
697         
698         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
699         'native_offset' argument, since these are computed in the 
700         mono_find_jit_info () function.
701
702         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
703         is used by exceptions-ppc.c.
704
705         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
706         mono_arch_find_jit_info ().
707         
708         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
709         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
710         generic code in mini-exceptions.c.
711
712 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
713
714         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
715
716         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
717         
718         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
719         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
720         called while holding the loader lock. Fixes #415608.
721         (mono_aot_get_method_from_token_inner): Ditto.
722
723 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
724
725         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
726         to reduce differences between this and the generic implementation in
727         mini-exceptions.c.
728         (ves_icall_get_frame_info): Ditto.
729
730         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
731
732         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
733         longer neccesarry.
734
735         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
736         mono_arch_get_call_filter () and make it non-static, for consistency with the
737         other architectures.
738
739 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
740
741         * mini.c:
742         * local-propagation.c:
743         * mini-x86.c: Correct the name of arch defines.
744
745 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
746
747         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
748         NO_EMULATE_LONG_SHIFT_OPS define.
749
750 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
751
752         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
753         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
754
755         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
756         MACH fixes. Merged from the 2.0 branch.
757
758         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
759
760         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
761         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
762
763         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
764
765         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
766         mono_marshal_get_native_wrapper () signature changes.
767
768 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
769
770         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
771         conversion bug under arm.
772
773 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
774
775         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
776
777         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
778         with overflow checking.
779
780 2008-08-05  Marek Habersack  <mhabersack@novell.com>
781
782         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
783         to the genmdesc.pl file
784
785 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
786
787         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
788         arg_array in the soft-float versions of the LOAD/STORE macros.
789
790         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
791         implementation.
792
793         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
794
795 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
796
797         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
798         a float HFA. Fixes #413621.
799
800 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
801
802         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
803         frame_size to args_size. Fixes build.
804
805 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
806
807         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
808         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
809
810         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
811         the stack are not unaligned. Fixes #413247.
812         
813 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
814
815         * mini.c: update jitted methods performance counters.
816
817 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
818
819         * mini-exceptions.c: increase the exceptions thrown performance
820         counter in mono_handle_exception ().
821
822 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
823
824         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
825         can work with netmodules.
826
827 2008-07-28  Geoff Norton  <gnorton@novell.com>
828
829         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
830         regression tests.
831
832 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
833
834         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
835         correct place.
836
837 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
838
839         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
840           The float param registers and other param registers must be the 
841           same index on Windows x64.
842
843         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
844           ArgValuetypeAddrInIReg argument case.  Setting the argument
845           op to OP_VTARG_ADDR (OP_REGOFFSET)).
846
847         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
848           variable computed above as the copy length for arguments of storage
849           type ArgValuetypeAddrInIReg.
850
851         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
852           ArgValuetypeAddrInIReg argument case.  This case will rely on
853           mono_arch_emit_outarg_vt to emit the correct code later in the process.
854
855         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
856           a 32 byte stack allocation for all calls.  We will omit the adjustment for
857           jump and tail call instructoins as they do not follow the typical call behavior.
858
859         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
860           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
861           local variable and pass the local variable by reference to the called method.
862
863         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
864           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
865           of a struct is passed in a register it must be saved with the other
866           volatile argument on the stack.
867
868         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
869           frame pointer the stack adjustment value must be saved to the unwind 
870           info structure.
871
872         Contributed under MIT/X11 license.
873
874 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
875
876         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
877         which got lost in the merge.
878
879 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
880
881         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
882         build.
883
884         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
885         
886         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
887         icalls, since they won't be patched.
888
889         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
890         different code sequence when running under valgrind to prevent some valgrind
891         errors.
892
893         * iltests.il.in: Add new regression test.
894
895         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
896         end with a throw.
897
898         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
899         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
900
901         * iltests.il.in: Add new test.
902
903         * aot-compiler.c: Fix some warnings.
904
905         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
906         Fixes #412494.
907
908 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
909
910         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
911         (mini_usage_jitdeveloper): Add a missing --wapi option.
912
913 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
914
915         * mini-codegen.c: Simplify the is_fp macros.
916         (free_up_ireg): Remove, use free_up_reg instead.
917         (free_up_reg): Fix the fp case.
918
919 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
920
921         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
922         lowered earlier.
923
924         * exceptions-x86.c: Merge some changes which seemed to have got lost
925         in the linear-ir merge.
926
927         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
928
929         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
930         long vreg volatile even if the variable was already created.
931
932         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
933         volatile variables.
934
935 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
936
937         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
938
939         * mini.c (mono_jit_compile_method_inner): Add support for 
940         MONO_EXCEPTION_BAD_IMAGE.
941
942         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
943         mini_method_get_context () returns NULL. Fixes #356531.
944
945         * mini.c (mono_method_to_ir): Ditto.
946         
947         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
948         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
949
950 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
951
952         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
953         in the LDFTN implementation.
954
955 2008-07-25  Mark Probst  <mark.probst@gmail.com>
956
957         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
958         code, patch calls to icalls, too, even if they're not in the
959         shared generic code hash.  Fixes #411962.
960
961 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
962
963         * cpu-x86.md: Increase the length of the fcall opcodes.
964
965         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
966         calls returning floats.
967
968         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
969         on NEWARR.
970         
971         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
972         missed earlier.
973
974         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
975         into the domain->method_code_hash.
976
977         * aot-compiler.c: Fix win32 build.
978
979         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
980         
981         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
982         gshared NEWARR implementation.
983
984         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
985
986         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
987         can be used outside of method_to_ir.
988
989         * mini.h (MonoCompile): Add arg_types field.
990
991         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
992         
993         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
994         the values of the local arg_array and param_types array.
995
996 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
997
998         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
999         got accesses might only get generated later when NEWOBJ is decomposed.
1000         
1001         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
1002         looking up the native code of the target method when a delegate is called
1003         for the first time.
1004
1005         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
1006         optimization.
1007
1008         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
1009
1010         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
1011         AOT work on platforms without a working dlsym implementation.
1012
1013         * mini.h: Bump AOT image format version.
1014         
1015 2008-07-24  Mark Probst  <mark.probst@gmail.com>
1016
1017         * mini-exceptions.c: Free a MonoType with
1018         mono_metadata_free_type() instead of g_free().
1019
1020         * aot-runtime.c: Free a MonoType.
1021
1022 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
1023
1024         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
1025         optimization.
1026
1027         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
1028         fp stack on x86.
1029
1030 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
1031         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
1032         profiler hook.
1033
1034 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
1035
1036         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
1037         NEWOBJ calls on valuetypes.
1038
1039         * iltests.il.in: Add new test.
1040
1041         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
1042
1043 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
1044
1045         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
1046         is no longer needed.
1047
1048         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
1049         non register sized integer arguments.
1050         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
1051         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
1052         emit_memcpy2 ().
1053
1054         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
1055         CEE_MONO_RETOBJ.
1056         
1057         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
1058         two a binop with different sized arguments is emitted.
1059
1060         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
1061         instruction in the ins==NULL case.
1062
1063 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
1064
1065         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
1066
1067         * mini-x86.c: Fix osx build.
1068
1069         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
1070         opcodes as well.
1071
1072         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
1073         instruction for non int sized variables.
1074
1075         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
1076         implementation.
1077
1078 2008-07-23  Robert Jordan  <robertj@gmx.net>
1079
1080         * method-to-ir.c: Fix MSVC build.
1081
1082 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
1083
1084         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
1085         a non int sized type, widen it to an int since newer versions of gcc seem to
1086         generate code which needs this.
1087
1088         * ssa2.c abcremoval2.c: Fix warnings.
1089
1090         * *: Merge the Linear IR branch.
1091
1092         The original branch is at trunk/branches/vargaz/mini-linear-il, and
1093         the ChangeLog file there describes all the changes done over the years. 
1094         Further documentation can be found at www.mono-project.com/Linear_IL.
1095
1096 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
1097
1098         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
1099           The float param registers and other param registers must be the 
1100           same index on Windows x64.
1101
1102         Contributed under MIT/X11 license.
1103
1104 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
1105
1106         * mini.c: Make the previous fix GC safe.
1107
1108 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
1109
1110         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
1111
1112 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
1113
1114         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
1115           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
1116           ArgValuetypeAddrInIReg instead.
1117
1118         Contributed under MIT/X11 license.
1119
1120 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
1121
1122         * mini-codegen.c (get_register_spilling): Fix a warning.
1123
1124 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
1125
1126         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
1127         for types which the initialization fails. Raises the provided exception
1128         at the right stop after cleanup.
1129
1130 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
1131
1132         * aot-compiler.c: Free most of the memory allocated during compilation.
1133
1134         * mini.c (mini_parse_debug_options): Fix a leak.
1135         
1136         * mini.c (mini_method_compile): Don't add the method to the jit info tables
1137         during aot compilation.
1138
1139 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
1140
1141         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
1142         it has too much register pressure.
1143
1144 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
1145
1146         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
1147
1148 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
1149
1150         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
1151         on x86.
1152
1153         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
1154         on amd64 similar to the way it is done on arm.
1155
1156         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
1157
1158         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
1159         consistency, normalize error messages, avoid loading aot-only modules in
1160         normal mode.
1161
1162         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
1163         for consistency.
1164
1165         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
1166
1167 2008-07-11  Martin Baulig  <martin@ximian.com>
1168
1169         * debug-debugger.h
1170         (MonoDebuggerInfo): Add `interruption_request'.
1171
1172 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
1173
1174         * aot-compiler.c (emit_plt): Remove some dead code.
1175
1176         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
1177
1178         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
1179         return the plt info offset belonging to a given plt entry.
1180
1181         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
1182         mono_aot_get_plt_info_offset.
1183         
1184         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
1185         similar to the amd64 code by makeing jumps through a separate jump table 
1186         instead of embedding the jump addresses into the code.
1187
1188 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
1189
1190         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
1191         method.
1192
1193 2008-07-10  Martin Baulig  <martin@ximian.com>
1194
1195         * mini.c (mini_method_compile): Disable generics sharing when
1196         running in the debugger.
1197
1198 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
1199
1200         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
1201
1202         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
1203         the local register allocator from running out of registers on x86 when 
1204         using aot.
1205
1206 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
1207
1208         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
1209         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
1210         C4146.
1211
1212         Contributed under MIT/X11 license.
1213
1214 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
1215
1216         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
1217         speed up the assembler.
1218
1219 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
1220
1221         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
1222         support.
1223
1224         * mini.c: Move the soft float handling macros a bit earlier, add 
1225         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
1226         place.
1227
1228         * mini.h: Add prototype for mono_arch_fixup_jinfo.
1229
1230         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
1231         read-only to help catch code allocation requests.
1232         
1233         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
1234         and turn it off when using --aot-only or when compiling with --aot=full.
1235
1236         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
1237         jump table for switches from the normal domain mempool, not the code
1238         manager.
1239
1240         * mini-trampolines.c (get_unbox_trampoline): New function to return an
1241         unbox trampoline which handles aot-only mode too.
1242
1243         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
1244         an AOTed unbox trampoline.
1245
1246         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
1247
1248 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
1249
1250         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
1251         ""
1252
1253         Contributed under MIT/X11 license.
1254
1255 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
1256
1257         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
1258           the unwind information for the method at the end of the allocated block.
1259           
1260         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
1261           MonoCompileArch to hold the unwind info for SEH on Winx64
1262         
1263         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
1264           frame pointer info for the method being compiled.
1265           
1266         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
1267           the call to mono_exception_from_token.
1268           
1269         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
1270           storing the method prolog information in a format that the Winx64 SEH can understand.  This
1271           information is stored a the end of the method block because it is all 32-bit offset based.
1272
1273         Contributed under MIT/X11 license.
1274
1275 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
1276
1277         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
1278
1279         * wapihandles.c: Fix warnings.
1280
1281         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
1282         mode.
1283
1284         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
1285         mono_jit_compile_method in aot-only mode since that calls the type 
1286         initializer.
1287         
1288         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
1289         get_delegate_invoke_impl in aot-only mode.
1290
1291         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
1292
1293 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
1294
1295         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
1296
1297         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
1298         is on by default.
1299
1300         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
1301
1302         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
1303         init trampoline from the AOT file as well.
1304
1305         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
1306         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
1307         code.
1308
1309         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
1310         mono_init.
1311
1312         * exceptions-amd64.c: Add _full variants for the remaining exception code
1313         creation functions as well, allow emission of relocatable code, remove
1314         caching since that is now done by the caller.
1315
1316         * mini-exceptions.c: Add _full variants for the remaining exception code
1317         creation functions as well, add aot-only support.
1318
1319         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
1320         if we can determine a proper token for them.
1321         (add_wrappers): Add a few more wrappers.
1322         (emit_method_code): Remove some dead code.
1323         (emit_trampolines): Emit exception code too.
1324
1325         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
1326
1327         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
1328         mono_array_new_va which avoids varargs.
1329
1330         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
1331
1332         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
1333         mono_arch_create_specific_trampoline () in all places.
1334
1335         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
1336         a bit so it can be used for other things as well.
1337         
1338         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
1339         on demand as well.
1340
1341         * exceptions-amd64.c: Rename the caching from the exception code creation
1342         functions, it is done by the caller instead.
1343         
1344         * exceptions-amd64.c: Change the signature of the exception code creation 
1345         functions to allow the creation of relocatable code later.
1346
1347         * mini-exceptions.c: Add a set of functions to query the various 
1348         runtime-generated exception functions.
1349
1350         * mini.c mini-exceptions.c: Use the newly added functions instead of the
1351         mono_arch_.. () functions.
1352         
1353 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
1354
1355         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
1356
1357         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
1358
1359         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
1360         (mini_get_vtable_trampoline): Ditto.
1361
1362         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
1363         code in the AOT case by returning the code size and a list of relocations to
1364         the caller.
1365
1366         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
1367
1368 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
1369
1370         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
1371           clean the stack.
1372
1373         Contributed under MIT/X11 license.
1374
1375 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
1376
1377         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
1378         so the buffer size can be computed correctly. Fixes #404735.
1379
1380         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
1381         normally as cfg->debug_info is already freed.
1382
1383 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
1384
1385         * mini-amd64.c: For calls returning vtypes in registers, don't store
1386         the return address on the stack, instead allocate a separate local for
1387         it. Fixes #404729.
1388
1389 2008-07-05  Mark Probst  <mark.probst@gmail.com>
1390
1391         * mini-trampolines.c, mini.h: Add an argument to
1392         mono_create_jit_trampoline_in_domain() for turning off the adding
1393         of the sync wrapper.
1394
1395         * mini.c: Use the JIT trampoline without sync instead of
1396         ldftn_nosync in static RGCTX invoke wrappers so that the call can
1397         be patched.
1398
1399 2008-07-04  Mark Probst  <mark.probst@gmail.com>
1400
1401         * driver.c: Turn on GSHARED optimization by default.
1402
1403 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
1404
1405         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
1406         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
1407
1408         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
1409         create a variant of the generic trampoline code callable from AOTed trampolines.
1410
1411         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
1412         trampoline code callable from AOTed trampolines.
1413
1414         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
1415
1416 2008-07-04  Mark Probst  <mark.probst@gmail.com>
1417
1418         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
1419         pass-through manner.
1420
1421         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
1422         and don't fail sharing for them anymore.
1423
1424         * mini-exceptions.c: Handle exceptions in shared generic methods.
1425
1426         * generic-sharing.c: When checking the context of a generic
1427         method, also check its class's context.  Don't treat wrappers as
1428         sharable.
1429
1430         * mini-trampolines.c: Some code factored out to
1431         metadata/generic-sharing.c.  Handle the MRGCTX case.
1432
1433         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
1434         we must deal with the method being of another instantiation of the
1435         class.  Add static rgctx invoke wrappers to generic methods.
1436
1437 2008-07-04  Mark Probst  <mark.probst@gmail.com>
1438
1439         * mini.c: Provide all jit infos of generic shared methods with a
1440         generic jit info.
1441
1442         * mini-exceptions.c: Handle the new situation that a generic info
1443         might be available, but not info about the this/vtable/mrgctx
1444         variable.
1445
1446 2008-07-03  Mark Probst  <mark.probst@gmail.com>
1447
1448         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
1449         generic methods.
1450
1451 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
1452
1453         * dominators.c (check_dominance_frontier): Fix a warning.
1454
1455         * mini.h: Add some missing prototypes.
1456
1457         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
1458
1459         * driver.c (mono_jit_init_version): Correct the comments since the first
1460         argument should be the name of the root domain, not a filename.
1461
1462         * aot-runtime.c (make_writable): Error out if this is called while running
1463         with --aot-only.
1464         (load_aot_module): Ditto.
1465
1466         * aot-compiler.c: Really fix the computation of method indexes.
1467
1468         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
1469         optimizations as this is no longer called frequently.
1470
1471         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
1472         method and the invoke impl code and pass it to the delegate trampoline instead of
1473         just the delegate class.
1474
1475 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
1476
1477         * aot-compiler.c: Fixup the computation of method indexes.
1478         (add_wrappers): Create the base methods of the runtime invoke wrappers using
1479         the method builder infrastructure.
1480
1481         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
1482         has no header.
1483
1484         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
1485         mode, load the method right away instead of creating a trampoline.
1486
1487         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
1488
1489         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
1490         some checks a bit.
1491
1492 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
1493
1494         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
1495         (mono_aot_load_method): Use method_index instead of method->token.
1496
1497         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
1498         can handle icalls etc. properly.
1499
1500         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
1501
1502         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
1503
1504         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
1505         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
1506         JIT_ICALL_ADDR patch type.
1507
1508         * patch-info.h: Add JIT_ICALL_ADDR patch type.
1509
1510         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
1511         request flag.
1512         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
1513
1514         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
1515
1516 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
1517
1518         * mini.c: Use domain->jit_code_hash_lock for controlling access to
1519         domain->jit_code_hash.
1520
1521 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
1522
1523         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
1524
1525 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
1526
1527         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
1528         get_this_arg_from_call, let it compute it when needed.
1529
1530         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
1531         gsctx from code only when needed.
1532
1533         * mini-trampolines.c (get_generic_context): Rename this to 
1534         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
1535         it can be called by the arch backends.
1536
1537         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
1538
1539 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
1540
1541         * driver.c (mono_main): Add experimental --aot-only command line option.
1542
1543         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
1544         set.
1545
1546 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
1547
1548         * driver.c (DllMain): Remove mono_module_handle.
1549
1550         Contributed under MIT/X11 license.
1551
1552 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
1553
1554         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
1555         for emitting methods which are not in the source assembly. Detect and report
1556         failure of assembling+linking.
1557         
1558         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
1559
1560         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
1561
1562 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
1563
1564         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
1565
1566 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
1567
1568         * mini.h: Remove some obsolete prototypes.
1569
1570         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
1571
1572 2008-06-24  Mark Probst  <mark.probst@gmail.com>
1573
1574         * mini.c (get_object_generic_inst): Variable-sized arrays are not
1575         supported by Visual Studio, so use alloca().
1576
1577 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
1578
1579         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
1580         Fixes #402585.
1581
1582 2008-06-23  Mark Probst  <mark.probst@gmail.com>
1583
1584         * mini.c: Fail sharing of a generic method if it contains an open
1585         catch clause (because we don't pass MRGCTXs yet).
1586
1587 2008-06-23  Mark Probst  <mark.probst@gmail.com>
1588
1589         * mini.c: When compiling a method with generic sharing, insert the
1590         method instantiated with an all-Object generic context into the
1591         jit info table, instead of the context of the first instantiation
1592         of the method we happen to compile.
1593
1594 2008-06-18  Martin Baulig  <martin@ximian.com>
1595
1596         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
1597         `major_version' and `minor_version'.
1598
1599 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1600
1601         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
1602         mono_method_is_generic_sharable_impl() takes an additional
1603         argument specifying whether to treat type variables as reference
1604         types.
1605
1606 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1607
1608         * mini.h: Removed obsolete prototypes.
1609
1610 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1611
1612         * mini.c: Don't fail generic sharing for initobj and sizeof - we
1613         already handle them.
1614
1615 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1616
1617         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
1618         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
1619         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
1620         tramp-x86.c: Added a MonoGenericContext* argument to
1621         mono_arch_get_unbox_trampoline() so that it can call other
1622         functions which require it.
1623
1624 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1625
1626         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
1627         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
1628         mono_arch_get_this_arg_from_call() takes a
1629         MonoGenericSharingContext* as well.
1630
1631 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1632
1633         * mini.c: Factor out code for emitting unbox into emit_unbox() and
1634         implement generic sharing of unbox.
1635
1636 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1637
1638         * mini.c: Don't compute the vtable to determine whether a field is
1639         special static, because it might not work for open types.
1640
1641 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1642
1643         * mini.c: Removed the unused token_type and token_source arguments
1644         from get_runtime_generic_context_ptr().
1645
1646 2008-06-17  Marek Habersack  <mhabersack@novell.com>
1647
1648         * mini.c (ADD_BINOP): fix the build
1649
1650 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
1651
1652         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
1653         a widening op.
1654
1655 2008-06-16  Mark Probst  <mark.probst@gmail.com>
1656
1657         * mini.h: Removed class relations enum that's not used anymore.
1658
1659 2008-06-16  Mark Probst  <mark.probst@gmail.com>
1660
1661         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
1662
1663         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
1664         the lazy fetch trampoline access code.
1665
1666 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
1667
1668         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
1669
1670 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
1671
1672         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
1673
1674         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
1675
1676         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
1677
1678 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
1679
1680         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
1681         intrinsics.
1682
1683         * mini-ops.h: Add MIN/MAX_UN opcodes.
1684
1685         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
1686         intrinsics.
1687
1688         * basic-math.cs: Add more min/max tests.
1689
1690         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
1691
1692 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1693
1694         * mini.c: Small fix in the prologue of emit_castclass.
1695
1696 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
1697
1698         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
1699
1700         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
1701         do not work even for unsigned types. Fixes #400014.
1702
1703         * basic-math.cs: Add regression tests for unsigned Min/Max.
1704
1705 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1706
1707         * mini.c: Added additional context_used argument to several
1708         functions, which will be needed for sharing generic methods.  Use
1709         GET_RGCTX macro wherever appropriate.  Declare only one
1710         context_used in mono_method_to_ir().
1711
1712 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1713
1714         * mini.c, generic-sharing.c: Removed generic class relations.
1715
1716         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
1717         functions due to MRGCTX changes.
1718
1719 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1720
1721         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
1722         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
1723         with calculated IMT.
1724
1725         * mini.c: Generic sharing of calls via generic interfaces.
1726
1727         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
1728         generic method with non-constant MonoGenericContext*.  Instead,
1729         the context is taken out of the method itself.
1730
1731 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1732
1733         * mini.c: Generic sharing of ldvirtftn.
1734
1735 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1736
1737         * mini.c: Generic sharing of ldftn.
1738
1739 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1740
1741         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
1742
1743 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1744
1745         * mini.c: Generic sharing of the special case of ldtoken followed
1746         by a call to GetTypeFromHandle.
1747
1748 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1749
1750         * mini.c: Generic sharing of box for nullable types.
1751
1752 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
1753
1754         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
1755         are passed on the stack. Fixes #324807.
1756
1757 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
1758
1759         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
1760         for the ArgValuetypeAddrInIReg case.
1761
1762         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
1763         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
1764
1765         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
1766         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
1767         local variable and pass the local variable by reference to the called method.
1768           
1769         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
1770         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
1771
1772         Contributed under MIT/X11 license.
1773
1774 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
1775
1776         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
1777
1778         * debug-mini.c (mono_debug_print_vars): Release memory after printing
1779         everything.
1780
1781 2008-06-10  Martin Baulig  <martin@ximian.com>
1782
1783         * debug-mini.c
1784         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
1785
1786 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
1787
1788         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
1789         possible error when no arguments are passed.
1790
1791         Contributed under MIT/X11 license.
1792
1793 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
1794
1795         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
1796         where the file name is NULL.
1797
1798 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
1799
1800         * mini.c: Fix s390 build.
1801
1802 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
1803
1804         * trace.c (mono_trace_parse_options): Fix warnings.
1805
1806         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
1807
1808 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
1809
1810         * mini.c (remove_block_if_useless): Avoid printing the method name.
1811         
1812         * mini.c: Remove needless setting of ins->cil_code which is now done by 
1813         MONO_INST_NEW.
1814
1815         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
1816         LMF. Not yet used.
1817
1818         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
1819         translated code after it has been patched.
1820
1821 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
1822
1823         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
1824         avoid problems during code patching on SMP systems.
1825         (emit_call): Avoid adding a patch info which is already added by 
1826         emit_call_body.
1827         (mono_arch_emit_exceptions): Ditto.
1828
1829 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
1830
1831         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
1832         MONO_TYPE_ISSTRUCT already checks for it.
1833
1834 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
1835
1836         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
1837           structs with floats on Winx64 the float registers are not used.  
1838           The integer registers are always used..
1839         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
1840           only one register will be used and only if the size of the struct 
1841           is 1,2,4, or 8 bytes.
1842
1843         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
1844           to work for Winx64.
1845
1846         Contributed under MIT/X11 license.
1847
1848 2008-06-05  Martin Baulig  <martin@ximian.com>
1849
1850         * debug-debugger.c (debugger_lookup_class): Also call
1851         mono_class_setup_methods() here; we're only called from RTI.
1852
1853 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
1854
1855         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
1856         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
1857         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
1858         Post-process object files and add dtrace-generated object, if necessary.
1859
1860         Contributed under MIT/X11 license.
1861
1862 2008-06-04  Mark Probst  <mark.probst@gmail.com>
1863
1864         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
1865         element class.
1866
1867         * mini.c: Generic sharing for unbox.any and castclass.
1868
1869 2008-06-04  Mark Probst  <mark.probst@gmail.com>
1870
1871         * mini.c: Ignore tailcall prefix in shared generic code and when
1872         doing calls which require a vtable/rgctx argument.
1873
1874 2008-06-04  Mark Probst  <mark.probst@gmail.com>
1875
1876         * mini.c: Don't free the JIT info.
1877
1878         * driver.c: Changes in the JIT info table testing code.
1879
1880 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
1881
1882         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
1883         interruption. Fix some warnings.
1884
1885         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
1886         interruption_checkpoint.
1887
1888 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
1889
1890         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
1891         from embedding applications.
1892
1893 2008-06-02  William Holmes  <billholmes54@gmail.com>
1894
1895         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
1896           reserving 32 bytes on the stack when making calls. 
1897
1898         Contributed under MIT/X11 license.
1899
1900 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
1901
1902         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
1903         the linear IL branch.
1904
1905         * driver.c: Print out more information for --version on arm.
1906
1907 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
1908
1909         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
1910         bb_exit instead, since out of line bblocks might not actually be emitted
1911         out-of-line.
1912         
1913         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
1914         maximum epilog size for out of line bblocks if tracing is enabled.
1915
1916         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
1917
1918 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
1919
1920         * arrays.cs: Regression tests for allocating arrays with negative sizes.
1921
1922 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
1923
1924         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
1925         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
1926         opcodes.
1927
1928 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
1929
1930         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
1931         the 'value' to store is a constant.
1932
1933         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
1934
1935         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
1936         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
1937
1938 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
1939
1940         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
1941         for accessing method->generic_container.
1942
1943 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
1944
1945         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
1946         
1947         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
1948
1949         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
1950
1951         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
1952         fails.
1953
1954 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
1955
1956         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
1957
1958         * mini.c: Handle the case when mono_class_vtable () fails.
1959
1960 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
1961         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
1962         the stat profiler.
1963
1964 2008-05-22  Mark Probst  <mark.probst@gmail.com>
1965
1966         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
1967         together with domain sharing.
1968
1969 2008-05-22  Mark Probst  <mark.probst@gmail.com>
1970
1971         * mini.c: Treat callvirts to final methods like non-virtual calls
1972         when doing generic sharing, i.e. look them up in the runtime
1973         generic context.
1974
1975 2008-05-22  Mark Probst  <mark.probst@gmail.com>
1976
1977         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
1978         with computed types (for generic sharing).
1979
1980         * mini.c: Generic sharing for mkrefany and refanyval.
1981
1982 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
1983
1984         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
1985         possible.
1986
1987         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
1988         the generic sharing code.
1989         
1990         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
1991         when needed.
1992
1993 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
1994
1995         * mini.h: Remove the declaration of mono_aot_init_vtable ().
1996
1997 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
1998
1999         * driver.c: updated copyright date
2000
2001 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
2002
2003         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
2004         needed.
2005
2006 2008-05-19  Martin Baulig  <martin@ximian.com>
2007
2008         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
2009         pointing to the new `_mono_debug_using_mono_debugger' variable.
2010
2011         * driver.c
2012         (mono_main): Check mono_debug_using_mono_debugger() rather than
2013         the `MONO_INSIDE_MDB' environment variable to check whether we're
2014         inside the debugger.
2015
2016 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
2017
2018         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
2019         argument.
2020
2021 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
2022
2023         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
2024
2025         * mini.c: Added mini_assembly_can_skip_verification. This
2026         function checks if the assembly requested to skip verification. 
2027         Fixes part of #387274.
2028
2029 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
2030
2031         * mini.c (mini_get_method): Disable the check for open generic classes when
2032         using generic sharing.
2033
2034         * generics.cs: Add a test #387034.
2035
2036         * mini.c (mini_get_method): Check whenever the method class is an open generic
2037         type, and return NULL in that case, causing a verification error. Fixes
2038         #384123.
2039
2040 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
2041
2042         * driver.c (mono_main): Revert r102623. The right
2043         thing to do is to enable the verifier under verifiable
2044         unless a --security flag was passed.
2045
2046         We need this non-trivial behavior for --verify-all otherwise
2047         mcs-compileall won't be able to use it. As it needs everything to
2048         be verified under validil.
2049
2050 2008-05-06  Martin Baulig  <martin@ximian.com>
2051
2052         Fix #383749.
2053
2054         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
2055         (mono_debugger_thread_cleanup): Likewise.
2056         (mono_debugger_extended_notification): Likewise.
2057
2058 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
2059
2060         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
2061         against both inflated and non-inflated methods. We need to check against the
2062         generic definition for cases where the instantiated method is not visible.
2063         We need to check against the inflated types for cases where the instantiation
2064         changes any super type. This fixes #382986.
2065
2066         Note that this doesn't need to be applied to other parts of mono_method_to_ir
2067         that check for visibiliy as generic params only appears as the type subject
2068         of tokens on call opcodes. Field manipulation and ldftn must always
2069         target an exact type.
2070
2071 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
2072
2073         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
2074         if no related --security flag is passed.
2075
2076 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
2077
2078         * mini-arch.h: Prepare support for ppc64.
2079
2080         Contributed under MIT/X11 license.
2081
2082 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
2083
2084         * aot-runtime.c: Prepare support for ppc64.
2085
2086         Contributed under MIT/X11 license.
2087
2088 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
2089
2090         * mini-ops.h: Prepare support for ppc64.
2091
2092         Contributed under MIT/X11 license.
2093
2094 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
2095
2096         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
2097
2098         Contributed under MIT/X11 license.
2099
2100 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
2101
2102         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
2103         assemblies, since aot_name is not a full path, causing us to load MS.NET 
2104         assemblies on windows.
2105
2106 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
2107
2108         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
2109         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
2110         * main.c: Use UTF-8 encoded command line instead of Windows default code
2111         page on Windows to support Unicode.
2112         * driver.c (DllMain): New function for mixed-mode assembly support.
2113         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
2114         export __stdcall functions without decoration.
2115
2116         Contributed under MIT/X11 license.
2117
2118 2008-04-28  Mark Probst  <mark.probst@gmail.com>
2119
2120         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
2121         saving it very early.
2122
2123 2008-04-28  Mark Probst  <mark.probst@gmail.com>
2124
2125         * mini.h, mini.c: Lots of code for accessing the old RGCTX
2126         deleted.  The only way to access the new RGCTX is via the
2127         trampline.
2128
2129         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
2130         vtable instead of the RGCTX to static methods.
2131
2132         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
2133         accessing the new RGCTX.
2134
2135         * generic-sharing.c: There is no separation between self, type
2136         arguments and other types in the RGCTX anymore.
2137
2138 2008-04-25  Jonathan Chambers <joncham@gmail.com>
2139
2140         * mini-amd64.c (add_general): Remove previous stack adjustment.
2141         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
2142         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
2143         for 32 bytes of stack space reserved for all calls.
2144         
2145         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
2146         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
2147         adjustment.
2148         
2149         Code contributed under MIT/X11 license.
2150
2151 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
2152
2153         * mini.c (mini_method_verify): Only verify non-inflated methods, check
2154         against the root definition, peeling out method and type instantiations.
2155         Cache verify success results, code that fails verification is still
2156         checked multiple times.
2157
2158 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
2159
2160         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
2161
2162 2008-04-23  Jonathan Chambers <joncham@gmail.com>
2163
2164         * mini-amd64.c (add_general): Always increment stack on Win64.
2165         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
2166         on Win64.
2167         
2168         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
2169         stack based argument handling on Win64.
2170         
2171         Code contributed under MIT/X11 license.
2172
2173 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
2174
2175         * Makefile.am (version.h): Add support for git-svn.
2176
2177 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
2178
2179         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
2180         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
2181         avoiding allocations and libc functions which might deadlock.
2182         
2183         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
2184         'no-gdb-backtrace' option is set.
2185
2186         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
2187
2188         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
2189
2190 2008-04-21  Martin Baulig  <martin@ximian.com>
2191
2192         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
2193         and `get_lmf_addr'; `notification_address' is no longer a pointer.
2194
2195 2008-04-21  Martin Baulig  <martin@ximian.com>
2196
2197         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
2198         `thread_vtable', `event_handler_ptr' and `event_handler'.
2199
2200 2008-04-21  Martin Baulig  <martin@ximian.com>
2201
2202         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
2203         allows delayed initialization of the `executable_code_buffer' when
2204         attaching.
2205
2206 2008-04-21  Martin Baulig  <martin@ximian.com>
2207
2208         * mini.h (mono_debugger_create_notification_function): Removed.
2209         * tramp-*.c (mono_debugger_create_notification_function): Removed.
2210
2211         * mdb-debug-info64.s
2212         (MONO_DEBUGGER__notification_function): Added this in the .text section.
2213
2214         * mdb-debug-info32.s
2215         (MONO_DEBUGGER__notification_function): Added this in the .text section.
2216
2217         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
2218         currently only works on x86 and x86_64, so don't create it on ppc.
2219
2220 2008-04-21  Martin Baulig  <martin@ximian.com>
2221
2222         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
2223
2224         * mini.c
2225         (mini_method_compile): In the fp elimination check, check
2226         `debug_options.mdb_optimizations' in addition to
2227         mono_debug_using_mono_debugger().       
2228
2229         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
2230         disable some JIT optimizations which are only disabled when
2231         running inside the debugger.
2232         Added `--help-debug' option to describe the debugging options.
2233         (parse_debug_options): New static function to parse the `--debug'
2234         options, so we can easily add more stuff in future.
2235
2236 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
2237
2238         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
2239         the method has no body.
2240
2241 2008-04-19  Jonathan Chambers <joncham@gmail.com>
2242
2243         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
2244         assembly is not allowed in MSVC 64-bit compiler. 
2245         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
2246         as we get floating point exceptions everywhere.
2247         
2248         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
2249         correctly align arguments for call to throw_exception.
2250         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
2251         
2252         Code contributed under MIT/X11 license.
2253
2254 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
2255
2256         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
2257
2258 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
2259
2260         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
2261
2262         * mini-amd64.c (NEW_INS): Set cil_code.
2263
2264         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
2265         from mini-amd64.c so all debugger related logic is in one place.
2266
2267         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
2268         later won't have a random ip assigned to them.
2269
2270 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
2271
2272         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
2273         the arch specific function initializes code_size.
2274         (mono_create_delegate_trampoline): Ditto.
2275
2276         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
2277         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
2278         platforms.
2279
2280         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
2281         running under the debugger.
2282
2283         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
2284         debugger.
2285
2286         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
2287         debugger. Also move the disabling of optimizations here from driver.c.
2288         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
2289         debugger.
2290
2291         * mini.h (MonoCompile): Add a few new flags.
2292
2293 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
2294
2295         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
2296         so the cil_code field of created MonoInst's is properly set.
2297         (mini_select_instructions): Ditto.
2298
2299         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
2300         (MONO_INST_NEW_CALL): Ditto.
2301
2302         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
2303         in many places so the ins->cil_code field is properly initialized.
2304
2305         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
2306         place.
2307
2308 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
2309
2310         * mini.c (mini_method_compile): Print a different message when compiling a 
2311         shared method.
2312         
2313         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
2314         > 1.
2315
2316 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
2317
2318         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
2319         SSE2 instructions.
2320
2321         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
2322         
2323 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
2324
2325         * mini.c (handle_stack_args): Make this return void since its return value was
2326         never used. Also set cfg->unverifiable for invalid IL instead of calling
2327         G_BREAKPOINT ().
2328
2329 2008-04-10  Mark Probst  <mark.probst@gmail.com>
2330
2331         * mini.c: Make sure "this" is live in catch clauses with type
2332         variables in shared generic code.
2333
2334 2008-04-08  Mark Probst  <mark.probst@gmail.com>
2335
2336         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
2337         generic_class_is_reference_type() to ensure the proper behaviour
2338         when sharing generic code and the type in question is a type
2339         argument.
2340
2341 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
2342
2343         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
2344         race conditions when printing thread dumps. Fixes #377738.
2345
2346 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
2347         
2348         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
2349         shows up when both MonoInst arguments can cause aliasig.
2350         There is likely no way in the current JIT to trigger this problem, but
2351         it showed up in the development of generics sharing, when in a new
2352         opcode both args of an OP_GROUP can be aliases (addresses of a local).
2353         When the generics sharing code will be committed, its tests will be
2354         valid also for this bug.
2355
2356 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
2357
2358         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
2359         PATCH_INFO_METHOD.
2360
2361         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
2362         NULL.
2363
2364 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
2365
2366         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
2367         use a more detailed exception message for InvalidCastException.
2368
2369         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
2370
2371         * driver.c (mono_main): Add --debug=casts option to turn on better 
2372         InvalidCastException message details.
2373
2374         * mini.c (mini_get_debug_options): New helper function to return the address of
2375         the debug_options variable.
2376
2377         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
2378         the jit_tls TLS variable.
2379
2380         * mini.c (mono_jit_tls): New TLS variable.
2381
2382         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
2383         option is used.
2384
2385 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
2386
2387         * mini.h: Removed verifer related stuff. This code was moved to verify.c
2388
2389         * mini.c: Removed verifer related stuff, code moved to verify.c.
2390
2391         * driver.c: Using code from verify.c instead of mini.c.
2392
2393 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
2394
2395         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
2396         longer valid.
2397
2398 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
2399
2400         * mini.c (check_for_method_verify): Enabling verification of
2401         corlib if mono_verify_all is set. Bugs in the verifier preventing that
2402         have been fixed.
2403
2404 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
2405
2406         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
2407         caller saved registers as well.
2408         
2409         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
2410         saved registers as well.
2411
2412 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
2413
2414         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
2415
2416         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
2417         code.
2418
2419 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
2420
2421         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
2422         to get_call_info.
2423         (get_call_info): Take a gsctx argument instead of 'cfg'.
2424
2425 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
2426
2427         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
2428         mono_verify_all is set.
2429
2430         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
2431
2432         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
2433
2434 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
2435
2436         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
2437         an exception.
2438
2439         * driver.c mini.c mini.h: Add a --verify-all development option to test the
2440         verifier and the code generated by the compiler.
2441
2442 2008-03-25  Mark Probst  <mark.probst@gmail.com>
2443
2444         * mini.c: Generic sharing of the non-nullable case of the box
2445         instruction.
2446
2447 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
2448
2449         * inssel.brg: Fix the build.
2450
2451         * iltests.il.in: Add a test for lconv.ovf.u8.un.
2452
2453 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
2454
2455         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
2456         Array:Address. Fixes #372410.
2457
2458         * iltests.il.in: New tests for readonly prefix.
2459
2460 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
2461
2462         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
2463         mini-trampolines.c.
2464
2465         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
2466         mini-exceptions.c.
2467
2468         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
2469         
2470         * mini.c (mono_decompose_op_imm): New helper function.
2471
2472         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
2473         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
2474         return value.
2475
2476         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
2477         mono_arch_output_basic_block. Fix warnings.
2478
2479         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
2480         for now.
2481
2482 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
2483
2484         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
2485         since the extra frame is now detected automatically inside the loop.
2486
2487         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
2488         opts which are now in mono_peephole_ins ().
2489         
2490         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
2491
2492         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
2493         frames and skip duplicate managed-to-native frames. Fixes #367665.
2494
2495         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
2496         opts which are now in mono_peephole_ins ().
2497         (mono_arch_peephole_pass_2): Ditto.
2498
2499         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
2500
2501         * mini-codegen.c (mono_peephole_ins): New helper function containing the
2502         arch independent peephole optimizations.
2503
2504         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
2505         opts which are now in mono_peephole_ins ().
2506
2507         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
2508         
2509         * mini-s390.c (mono_arch_output_basic_block): Fix build.
2510
2511         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
2512         pattern.
2513
2514         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
2515         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
2516         opcode. 
2517
2518 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
2519
2520         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
2521         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
2522         return value.
2523
2524         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
2525         mono_arch_output_basic_block. Fix warnings.
2526
2527 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
2528
2529         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
2530         conv.ovf.u.un.
2531
2532 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
2533
2534         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
2535         conv.ovf.u.un.
2536
2537         * iltests.il: Add new tests.
2538
2539 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
2540
2541         * mini.c: Removed Windows version macros.
2542
2543 2008-03-20  Mark Probst  <mark.probst@gmail.com>
2544
2545         * generic-sharing.c: Put reflection types in the extensible part
2546         of the runtime generic context.
2547
2548         * mini.c: Generic sharing of the GetTypeHandle special case of the
2549         ldtoken instruction.
2550
2551 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
2552
2553         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
2554
2555         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
2556         
2557         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
2558         consistency with the other version on the linear IR branch.
2559
2560         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
2561
2562         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
2563
2564         * iltests.il.in: Add new tests.
2565
2566 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
2567
2568         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
2569
2570         * iltests.il.in: Add new tests.
2571
2572 2008-03-19  Mark Probst  <mark.probst@gmail.com>
2573
2574         * mini.c: Two variables with the same name were declared in
2575         nesting contexts and one wasn't initialized.  Fixed.
2576
2577 2008-03-19  Mark Probst  <mark.probst@gmail.com>
2578
2579         * mini.c: Generic sharing of the initobj instruction.
2580
2581 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
2582
2583         * mini.c: make the test to optimize ldtoken from typeof() more
2584         precise.
2585
2586 2008-03-18  Mark Probst  <mark.probst@gmail.com>
2587
2588         * mini.c: Generic sharing of the initobj instruction for reference
2589         types.
2590
2591 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
2592
2593         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
2594         the mono_breakpoint_clean_code() code to perform bound checks.
2595
2596 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
2597
2598         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
2599         mono_arch_patch_callsite() to include the start of the managed method
2600         to be able to perform bound checks.
2601
2602 2008-03-17  Mark Probst  <mark.probst@gmail.com>
2603
2604         * mini.c: Generic sharing for the isinst instruction.
2605
2606 2008-03-17  Mark Probst  <mark.probst@gmail.com>
2607
2608         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
2609         inssel-long32-mips.brg: Added opcodes for doing indirect calls
2610         with the runtime generic context argument.
2611
2612         * mini.c: Share calls to several types of unsharable methods by
2613         putting the address of the method code in the runtime generic
2614         context and doing an indirect call.
2615
2616         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
2617         to switches.
2618
2619 2008-03-16  Mark Probst  <mark.probst@gmail.com>
2620
2621         * generic-sharing.c: Change due to a change in the runtime genric
2622         context API.
2623
2624 2008-03-15  Martin Baulig  <martin@ximian.com>
2625
2626         * tramp-x86.c
2627         (mono_arch_nullify_class_init_trampoline): Add call to
2628         mono_breakpoint_clean_code() to make things work when running
2629         inside the debugger.
2630
2631         * tramp-amd64.c
2632         (mono_arch_nullify_class_init_trampoline): Add call to
2633         mono_breakpoint_clean_code() to make things work when running
2634         inside the debugger.
2635
2636 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
2637
2638         * inssel-long.brg (reg): Fix 64 bit build.
2639
2640 2008-03-14  Mark Probst  <mark.probst@gmail.com>
2641
2642         * mini.c, mini.h: Share static generic code by passing it an
2643         implicit argument pointing to the runtime generic context.
2644
2645         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
2646         inssel-long32-mips.brg: New opcodes for calling shared static,
2647         which need to be passed the runtime generic context.
2648
2649         * mini-amd64.c, mini-x86.c: Save the runtime generic context
2650         argument on the stack in the prologue if needed.  New function for
2651         finding the runtime generic context argument from the registers
2652         saved by the trampoline.
2653
2654         * mini-amd64.h, mini-x86.h: Specify which register to use for the
2655         runtime generic context argument.
2656
2657         * tramp-amd64.c: Also restore the register used for the runtime
2658         generic context argument.
2659
2660         * mini-trampoline.c: Resolve shared static calls by consulting the
2661         runtime generic context via the new argument.
2662
2663         * generic-sharing.c: Add an argument to sharability-checking
2664         functions that specifies whether type variables should be treated
2665         as sharable type arguments.
2666
2667         * inssel-x86.brg: Removed a superfluous, buggy rule.
2668
2669         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
2670         to switches.
2671
2672 2008-03-14  Martin Baulig  <martin@ximian.com>
2673
2674         * debug-debugger.c (main_thread_handler): Call
2675         mono_runtime_run_main() without sending any notifications.
2676
2677         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
2678
2679 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
2680
2681         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
2682
2683 2008-03-14  Mark Probst  <mark.probst@gmail.com>
2684
2685         * tramp-x86.c: Fixed register restore offsets in the trampoline
2686         code for ECX and EDX.
2687
2688 2008-03-12  Geoff Norton  <gnorton@novell.com>
2689
2690         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
2691         different ucontext_t implementations.
2692         * exceptions-arm.c: Use the above defines to get exceptions working on 
2693         iPhone (based on a patch by Luke Howard lukeh@padl.com)
2694         * mini-arm.c: Implement iPhone icache support (based on a patch by
2695         Luke Howard lukeh@padl.com)
2696
2697 2008-03-12  Mark Probst  <mark.probst@gmail.com>
2698
2699         * mini.c: Enable generic sharing of calls to non-static
2700         non-interface non-generic non-value-type methods.
2701
2702         * mini-trampolines.c: Resolve calls from shared generic code.
2703
2704 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
2705
2706         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
2707
2708         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
2709
2710 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
2711
2712         * mini.c: some fixes for the AOT compiler.
2713
2714 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
2715
2716         * cpu-amd64.md: Add clob:1 to some float opcodes.
2717
2718 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
2719
2720         * mini.h: Added MiniVerifierMode enumeration.
2721
2722         * mini.c: Added mini_verifier_set_mode to control
2723         the usage of the new verifier.
2724
2725         * mini.c (mono_method): Integrated the new verifier.
2726
2727         * driver.c: Extended --security option with validil and
2728         verifiable options to activate the new verifier.
2729
2730 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
2731
2732         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
2733         optimization to ctors taking 0 or 2 arguments too.
2734
2735         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
2736         a bit.
2737
2738         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
2739
2740         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
2741
2742 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
2743
2744         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
2745         non-aot case as well.
2746
2747         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
2748
2749         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
2750         changes.
2751
2752         * aot-compiler.c (encode_patch): Ditto.
2753
2754         * mini.h (G_MININT32): Fix the definition of this.
2755
2756 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
2757
2758         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
2759
2760         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
2761
2762 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
2763
2764         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
2765         methods returning vtypes in registers.
2766         (mono_arch_allocate_vars): Ditto.
2767
2768         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
2769
2770         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
2771
2772         * generics.cs: Add a test from the linear IR branch.
2773
2774         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
2775
2776         * mini.c (inline_method): Cache failed inline attempts.
2777
2778 2008-03-04  Mark Probst  <mark.probst@gmail.com>
2779
2780         * mini.c: For shared methods of generic classes put the location
2781         of "this" into the MonoGenericJitInfo.
2782
2783         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
2784         register out of a MonoContext by register number.  Add the generic
2785         sharing context as an argument to mono_arch_find_this_argument().
2786
2787         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
2788         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
2789         for new arch function.
2790
2791         * mini-exception.c: Handle open exception clauses in shared
2792         generic code.
2793
2794         * mini-trampolines.c: Supply additional argument to
2795         mono_arch_find_this_argument().
2796
2797 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
2798
2799         * Makefile.am (regtests): Run the bench.exe tests last.
2800
2801 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
2802
2803         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
2804         a bit.
2805
2806 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
2807
2808         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
2809         with MS.
2810
2811         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
2812         
2813         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
2814
2815         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
2816         whose class has no cctor.
2817
2818         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
2819
2820 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
2821
2822         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
2823         unverified.
2824
2825 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
2826
2827         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
2828         to be in sync with the code on the linear IR branch.
2829
2830         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
2831
2832         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
2833
2834 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
2835
2836         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
2837
2838         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
2839
2840         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
2841
2842         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
2843
2844         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
2845         
2846         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
2847         body.
2848
2849 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
2850
2851         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
2852         OP_LOADR4_MEMBASE emission.
2853
2854         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
2855         (mono_spillvar_offset_float): Ditto.
2856
2857         * mini-mips.c (mono_arch_emit_prolog): Ditto.
2858
2859         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
2860         emission.
2861
2862         * basic-long.cs: Add regression tests for them.
2863
2864         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
2865         use.
2866         (mono_arch_allocate_vars): Fix representation of single-precision float
2867         argument.
2868         (mono_arch_output_basic_block): Ditto.
2869
2870         * inssel-mips.brg: Ditto, remove duplicate items.
2871
2872         * mini-mips.c (emit_load_volatile_arguments): New function to handle
2873         arguments of tail calls as on other platforms.
2874         (mono_arch_output_basic_block): Handle tail calls.
2875
2876         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
2877         register.
2878
2879         * objects.cs (test_5_pass_static_struct): Add test for it.
2880
2881         Contributed under MIT/X11 license.
2882
2883 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
2884
2885         * Makefile.am: Use gmcs for compiling the regression tests.
2886
2887         * *.2.cs *.2.il: Rename to *.cs and *.il.
2888
2889 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
2890
2891         * regalloc.h: Make the vassign array smaller.
2892
2893         * mini.c (mini_method_compile): Remove an unused field in cfg.
2894
2895         * mini-codegen.c: Add a bunch of micro optimizations.
2896
2897 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
2898
2899         * regalloc.h: Remove some unused fields.
2900
2901 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
2902
2903         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
2904
2905         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
2906
2907 2008-02-22  Mark Probst  <mark.probst@gmail.com>
2908
2909         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
2910
2911         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
2912         trampoline: Fetch an entry from the runtime generic context.  If
2913         it's NULL, jump to the actual trampoline to fill the runtime
2914         generic context.  Otherwise, return it.
2915
2916         * mini.c: Call the lazy fetch trampoline to get entries out of the
2917         runtime generic context.
2918
2919         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
2920         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
2921         tramp-sparc.c: Stubs for the lazy fetch trampoline.
2922
2923 2008-02-21  Mark Probst  <mark.probst@gmail.com>
2924
2925         * mini.c: Fetch data out of the extensible part of the runtime
2926         generic context instead of calling a helper function.
2927
2928         * generic-sharing.c: Some functions moved into
2929         metadata/generic-sharing.c.  Helper function for fetching other
2930         types now checks and asserts against extensible rgctx (just for
2931         debugging purposes - the helper function isn't called anymore
2932         unless for debugging).
2933
2934 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
2935
2936         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
2937         for tail calls up to the point that the tests in iltests.exe run. Also add a
2938         dummy CKFINITE implementation.
2939         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
2940         needed for trampoline LMF frames.
2941
2942         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
2943         trampoline LMF frames.
2944
2945 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
2946
2947         * mini.c (inline_method): clean any pending loader error when inlining fail.
2948         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
2949
2950 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
2951
2952         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
2953
2954         * aot-runtime.c (decode_patch_info): Ditto.
2955
2956         * mini.c (mono_resolve_patch_target): Ditto.
2957         
2958         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
2959         icall wrappers.
2960
2961         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
2962         
2963         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
2964         if it references an icall address.
2965
2966 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
2967
2968         * cpu-s390x.md: Remove some more unused opcodes.
2969         
2970         * cpu-s390x.md: Remove some unused opcodes.
2971
2972         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
2973         mono_op_imm_to_op ().
2974
2975         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
2976         instead of a switch statement.
2977         
2978         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
2979         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
2980
2981         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
2982         
2983         * mini-codegen.c: Remove unused mono_regstate2_... functions.
2984
2985         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
2986         -1.
2987
2988 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
2989
2990         * driver.c (mono_main): Improve error reporting when an assembly cannot be
2991         opened. Fixes #362607.
2992
2993         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
2994
2995         * iltests.il.in: Add a test for static methods in interfaces.
2996
2997 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
2998
2999         * genmdesc.c (build_table): Fix a crash on older glib versions.
3000
3001         * cpu-sparc.md: Remove some unused opcodes.
3002         
3003         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
3004         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
3005
3006         * cpu-amd64.md: Remove some unused opcodes.
3007
3008         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
3009         like the other opcodes.
3010
3011 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
3012
3013         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
3014
3015         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
3016
3017         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
3018         variables 'cfg' instead of 'm' for consistency.
3019
3020         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
3021
3022         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
3023         argument holding the vtype return address, to avoid the ambigious use of
3024         cfg->ret for this purpose.
3025
3026         * mini.c (NEW_RETLOADA): Use vret_addr if set.
3027
3028         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
3029         
3030         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
3031         new mono_print_ins () function which only takes one argument.
3032
3033 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
3034
3035         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
3036         macro arguments.
3037
3038 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
3039
3040         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
3041
3042         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
3043
3044         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
3045         opcodes and other small changes.
3046
3047         * mini-ops.h: Add some new opcodes from the linear IR branch.
3048
3049         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
3050
3051         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
3052         opcodes, use the REG_MEMBASE opcodes instead.
3053         
3054         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
3055         opcodes, use the REG_MEMBASE opcodes instead.
3056         
3057         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
3058         linear IR branch.
3059
3060         * mini.c (mono_op_imm_to_op): New helper function.
3061
3062         * mini-ops.h: Add some opcodes from linear IR branch.
3063
3064 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
3065
3066         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
3067         <tsv@solvo.ru>.
3068
3069 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
3070
3071         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
3072         OP_ICONV_TO_R4/R8.
3073
3074         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
3075
3076 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
3077
3078         * aot-compiler.c (emit_method_code): Add an assert.
3079
3080         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
3081         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
3082         methods.
3083
3084 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
3085
3086         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
3087         some load/store opcodes so they are consistent. 
3088         (mono_arch_emit_prolog): Simplify some code.
3089
3090         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
3091
3092         * objects.cs: Add tests for large argument offsets on ARM.
3093
3094         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
3095         stack offsets. Fixes #359651.
3096
3097         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
3098
3099         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
3100
3101         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
3102
3103         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
3104
3105         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
3106
3107         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
3108         rid of CEE_CONV_R_UN.
3109
3110         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
3111
3112 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
3113
3114         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
3115
3116         * mini.c (mono_normalize_opcodes): Add some more opcodes.
3117
3118         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
3119
3120         * cpu-amd64.md: Remove some unused opcodes.
3121
3122         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
3123
3124         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
3125
3126         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
3127         arch specific functions for its parts. Call the peephole pass after local
3128         regalloc so the prolog can compute a more accurate max_offset.
3129         
3130         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
3131         the corresponding OP_I/OP_L opcodes.
3132
3133         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
3134
3135         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
3136
3137 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
3138
3139         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
3140         as they are handled in mini.c.
3141
3142         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
3143         
3144         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
3145         case since it is handled in mini.c.
3146
3147         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
3148
3149         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
3150
3151         * *.c: Use the new opcodes in the IR and back end code.
3152
3153         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
3154
3155         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
3156
3157 2008-02-06  Mark Probst  <mark.probst@gmail.com>
3158
3159         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
3160         an assert because it has a race condition.
3161
3162 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
3163
3164         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
3165
3166         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
3167
3168         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
3169
3170         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
3171         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
3172
3173 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
3174
3175         * cpu-amd64.md (move): Correct the maximum size of move.
3176
3177 2008-02-05  Mark Probst  <mark.probst@gmail.com>
3178
3179         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
3180         the generic class init trampoline to return quickly if the class
3181         is already inited.
3182
3183 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
3184
3185         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
3186         issues where an 32 bit callsite cannot be patched by a 64 bit address.
3187
3188 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
3189
3190         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
3191         branch.
3192
3193 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
3194
3195         * objects.cs: Add some soft-float tests.
3196
3197         * mini.c: Fix a couple more soft-float issues.
3198
3199         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
3200
3201         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
3202         avoid a REX prefix.
3203
3204 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
3205
3206         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
3207         exception happens while compiling a virtual method.
3208
3209 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
3210
3211         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
3212         
3213         * mini-sparc.c: Fix build.
3214
3215         * mini-sparc.c (get_call_info): Add support for generic sharing.
3216
3217         * mini-exceptions.c: Add a FIXME.
3218
3219 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
3220
3221         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
3222         altstack handling code.
3223
3224         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
3225         
3226         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
3227
3228         * mini-s390.c: Add support for generic sharing.
3229
3230         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
3231         Fix CAS on s390.
3232         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
3233
3234         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
3235
3236         * mini-s390x.c: Add support for generic sharing.
3237         
3238         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
3239         Fix CAS on ia64.
3240         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
3241
3242         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
3243         can be used since it takes a 16 bit signed immediate.
3244
3245         * inssel-s390x.brg: Fix OP_SETRET.
3246
3247         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
3248
3249         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
3250
3251         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
3252
3253         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
3254
3255         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
3256         in one place.
3257
3258         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
3259         stuff.
3260
3261         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
3262         of the unused mono_arch_patch_delegate_trampoline stuff.
3263
3264 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
3265
3266         * basic-long.cs: Move the fp related tests to basic-float.cs.
3267
3268         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
3269
3270         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
3271
3272         * basic-calls.cs: Add a test for proper float argument passing.
3273
3274         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
3275         if the context corresponds to an exception received through a signal.
3276
3277         * exceptions.cs: Add a test for nullref handling at the start of a try
3278         clause.
3279
3280         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
3281
3282         * jit-icalls.c (mono_break): New JIT icall.
3283
3284         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
3285
3286         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
3287
3288 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
3289
3290         * cpu-*.md: Get rid of unused opcodes.
3291
3292         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
3293
3294         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
3295         by all platforms.
3296
3297         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
3298         define.
3299
3300         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
3301         the arch independent trampoline code in mini-trampolines.c.
3302
3303         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
3304
3305         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
3306
3307         * mini-s390.h: Remove an unused define.
3308         
3309         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
3310         the arch independent trampoline code in mini-trampolines.c.
3311
3312         * mini-arm.c (mono_arch_emit_prolog): Fix build.
3313
3314 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
3315
3316         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
3317
3318         * mini-s390.c (mono_arch_emit_prolog): Fix build.
3319
3320         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
3321
3322         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
3323
3324         * cpu-amd64.md: Use smaller sizes for int opcodes.
3325
3326         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
3327
3328         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
3329         objects.cs.
3330
3331         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
3332         debugging.
3333
3334         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
3335         instead of though a pointer to save an indirection when accessing elements of
3336         the array.
3337
3338         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
3339         some typos.
3340         (NOT_IMPLEMENTED): New helper macro.
3341         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
3342         of a bb.
3343
3344         * *.c: Use the new helper macro.
3345
3346 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
3347
3348         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
3349
3350 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
3351
3352         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
3353         stack slots.
3354
3355 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
3356
3357         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
3358         profiling is enabled.
3359         
3360         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
3361         the end.
3362         (mono_arch_emit_prolog): Add more first bblock optimizations.
3363
3364         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
3365         in order if possible.
3366         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
3367         bblock, since the arguments are still in their original registers.
3368
3369         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
3370
3371 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
3372
3373         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
3374         as well.
3375
3376         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
3377         offset 0.
3378
3379         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
3380
3381         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
3382         process async exceptions received while in unmanaged code.
3383
3384         * mini.c (mini_init): Install a callback with the runtime which will be called
3385         when a thread receives an async exception while in unmanaged code.
3386
3387         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
3388
3389         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
3390
3391 2008-01-16  Wade Berrier  <wberrier@novell.com>
3392
3393         * cpu-g4.md:
3394         * cpu-arm.md:
3395         * cpu-s390x.md:
3396         fix build
3397
3398 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
3399
3400         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
3401         compilation with sun cc.
3402
3403         * cpu-*.md: Fix the build.
3404
3405         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
3406
3407         * mini-amd64.h: Add some comments to the MonoLMF structure.
3408
3409         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
3410         
3411         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
3412         in the LMF structure if possible. This saves two instructions in the
3413         managed->native wrappers.
3414
3415         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
3416
3417 2008-01-16  Mark Probst  <mark.probst@gmail.com>
3418
3419         * generic-sharing.c: New type argument lookup code which uses the
3420         runtime generic context template.
3421
3422 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
3423
3424         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
3425
3426         * mini-arm.c (add_general): Fix arm eabi parameter passing.
3427         (mono_arch_output_basic_block): Fix localloc implementation.
3428
3429         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
3430
3431         * mini-ia64.c (peephole_pass): Fix ia64 build.
3432
3433         * mini-amd64.c (peephole_pass): Fix a warning.
3434         
3435         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
3436         at a constant offset from sp/fp.
3437
3438         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
3439         instead of obtaining it from *lmf in the managed method case.
3440
3441 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
3442
3443         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
3444
3445 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
3446
3447         * mini.h (MonoInstList): New type.
3448         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
3449         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
3450         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
3451         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
3452         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
3453         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
3454         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
3455         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
3456         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
3457         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
3458         MONO_INST_LIST_FOR_EACH_ENTRY,
3459         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
3460         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
3461         mono_inst_list_first, mono_inst_list_last,
3462         mono_inst_list_next, mono_inst_list_prev): New instruction
3463         list handling interfaces.
3464         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
3465         list head 'ins_list'.
3466         (MonoInst): Replace next pointer with list head 'node'.
3467         (MonoCallInst): Make 'out_args' a MonoInstList.
3468         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
3469         (MonoCompile): Delete reverse_inst_list and
3470         reverse_inst_list_len.
3471         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
3472         mono_arch_lowering_pass, mono_arch_local_regalloc,
3473         mono_arch_output_basic_block, mono_arch_emit_prolog):
3474         Convert to new instruction lists.
3475         (insert_after_ins): Delete.
3476         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
3477         instruction lists.
3478         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
3479         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
3480         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
3481         mono_emulate_opcode, mono_emit_load_got_addr,
3482         inline_method, mono_method_to_ir, mono_print_bb_code,
3483         print_dfn, decompose_pass, nullify_basic_block,
3484         replace_out_block_in_code, remove_block_if_useless,
3485         merge_basic_blocks, move_basic_block_to_end,
3486         try_unsigned_compare, optimize_branches, mono_print_code,
3487         mini_select_instructions, remove_critical_edges): Likewise.
3488         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
3489         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
3490         mono_arch_output_basic_block, mono_arch_emit_prolog):
3491         Likewise.
3492         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
3493         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
3494         mono_arch_output_basic_block): Likewise.
3495         (inst_list_prepend, insert_after_ins): Delete.
3496         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
3497         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
3498         instruction lists.
3499         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
3500         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
3501         mono_arch_emit_prolog): Likewise.
3502         * cfold.c (mono_constant_fold): Likewise.
3503         * liveness.c (visit_bb, mono_analyze_liveness,
3504         optimize_initlocals): Likewise.
3505         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
3506         * graph.c (mono_draw_code_cfg): Likewise.
3507         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
3508         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
3509         mono_ssa_cprop): Likewise.
3510         * abcremoval (get_relations_from_previous_bb, process_block):
3511         Likewise.
3512         * local-propagation (mono_cprop_invalidate_values,
3513         mono_local_cprop_bb): Likewise.
3514         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
3515         peephole_pass, mono_arch_output_basic_block,
3516         mono_arch_emit_prolog): Likewise.
3517         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
3518         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
3519         mono_arch_emit_prolog): Likewise.
3520         (insert_after_ins): Delete.
3521         * aliasing.c (print_code_with_aliasing_information,
3522         mono_build_aliasing_information, mono_aliasing_deadce):
3523         Convert to new instruction lists.
3524         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
3525         peephole_pass, NEW_INS, mono_arch_lowering_pass,
3526         mono_arch_local_regalloc, mono_arch_output_basic_block):
3527         Likewise.
3528         (insert_after_ins): Delete.
3529         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
3530         peephole_pass, mono_arch_output_basic_block): Convert to
3531         new instruction lists.
3532         * mini-codegen (InstList, inst_list_prepend,
3533         insert_after_ins): Delete.
3534         (insert_before_ins, get_register_force_spilling,
3535         get_register_spilling, free_up_ireg, free_up_reg,
3536         create_copy_ins, create_spilled_store, alloc_int_reg,
3537         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
3538         to new instruction lists.
3539         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
3540         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
3541         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
3542         (insert_after_ins): Delete.
3543         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
3544         mono_arch_local_regalloc, mono_arch_output_basic_block,
3545         mono_arch_call_opcode): Convert to new instruction lists.
3546         (insert_after_ins): Delete.
3547         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
3548         peephole_pass, mono_arch_output_basic_block,
3549         mono_arch_emit_prolog): Convert to new instruction lists.
3550
3551 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
3552
3553         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
3554
3555         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
3556         Fixes #353182.
3557
3558         * Makefile.am (version.h): Make this work with non-bash shells.
3559
3560 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
3561
3562         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
3563
3564 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
3565
3566         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
3567         the InitializeArray optimization.
3568
3569 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
3570
3571         * mini.c driver.c: Don't include os/gc_wrapper.h.
3572
3573 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
3574
3575         * mini.c (print_jit_stats): Print GC statistics if available.
3576
3577 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
3578
3579         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
3580
3581 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
3582
3583         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
3584
3585 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
3586
3587         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
3588         
3589         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
3590
3591         * driver.c (mono_main): Ditto.
3592
3593 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
3594
3595         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
3596
3597         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
3598         in the vtable can't be encoded.
3599         (compile_method): Ditto.
3600
3601 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
3602
3603         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
3604         defined.
3605
3606         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
3607         lmf->rbp.
3608
3609         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
3610         the top LMF entry belongs to the current method.
3611
3612         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
3613
3614 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
3615
3616         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
3617         
3618         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
3619
3620         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
3621
3622         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
3623
3624         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
3625
3626         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
3627         implementation.
3628
3629         * basic-float.cs: Add an ulong->double cast test.
3630
3631 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
3632
3633         * mini.c (mono_method_to_ir): Fix a warning.
3634
3635 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
3636
3637         * mini-ops.h: Add OP_SWITCH.
3638
3639         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
3640         CEE_SWITCH in back-end code, use OP_SWITCH instead.
3641
3642 2007-12-11  Geoff Norton  <gnorton@novell.com>
3643
3644         * mini-s390x.c: Minor change to the MAX() define to allow
3645         it to compile with other gcc versions.
3646
3647 2007-12-11  Geoff Norton  <gnorton@novell.com>
3648
3649         * cpu-s390x.md:
3650         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
3651
3652 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
3653
3654         exceptions-arm.c (mono_arch_get_restore_context): Restore
3655         the frame pointer.
3656
3657         exceptions-arm.c (throw_exception): Save the frame pointer.
3658         This is a partial fix for #323747. Only the client side is
3659         fixed.
3660
3661 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
3662
3663         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
3664         was using an unrelated variable to log the class which
3665         needed the cctor to be called. This was crashing on arm.
3666
3667 2007-12-09  Robert Jordan  <robertj@gmx.net>
3668
3669         * mini-x86.c (mono_arch_emit_epilog):
3670         Consider all kinds of 64-bit types. Fixes #323114.
3671
3672 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
3673
3674         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
3675
3676 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
3677
3678         * mini-amd64.c (peephole_pass): Add a missing instruction check.
3679
3680 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
3681
3682         * mini.c: run type ctor before allocating an object, not only
3683         when running it's constructor method (fixes at least part of bug #342507).
3684
3685 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
3686         
3687         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
3688         
3689         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
3690         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
3691         function.
3692
3693         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
3694         mono_generic_class_init_trampoline () the same as it is done with the other
3695         trampolines.
3696
3697         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
3698         aot-runtime.c aot-compiler.c: Implement AOT support.    
3699
3700 2007-12-07  Mark Probst  <mark.probst@gmail.com>
3701
3702         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
3703         build for archs which don't have the vtable trampoline defined
3704         yet.
3705
3706 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
3707
3708         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
3709
3710         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
3711
3712         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
3713
3714         * tramp-<ARCH>.c: Use the new helper function.
3715
3716 2007-12-07  Mark Probst  <mark.probst@gmail.com>
3717
3718         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
3719         trampoline call, which takes a vtable argument.
3720
3721         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
3722         OP_TRAMPCALL_VTABLEs like other calls.
3723
3724         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
3725         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
3726         call.  Implemented a support function which fetches the vtable
3727         from a register set.
3728
3729         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
3730         Implemented a generic class init trampoline, using the
3731         OP_TRAMPCALL_VTABLE opcode.
3732
3733         * mini.c: Implemented static field access when sharing generic
3734         code.  This implies initing the class using the new
3735         OP_TRAMPCALL_VTABLE call.
3736
3737 2007-12-07  Mark Probst  <mark.probst@gmail.com>
3738
3739         * mini.c: Don't compile methods with sharing enabled if their
3740         classes are disabled for sharing.
3741
3742 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
3743
3744         * inssel.brg: Add a missing sign extension to the GETCHR and array access
3745         opcodes. Fixes #346563.
3746
3747         * objects.cs: Add a new test.
3748
3749         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
3750
3751         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
3752         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
3753
3754 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
3755
3756         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
3757
3758 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
3759
3760         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
3761         code stream.
3762
3763 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
3764
3765         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
3766
3767         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
3768         optimization in the AOT case.
3769         
3770 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
3771
3772         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
3773         
3774         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
3775
3776         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
3777
3778         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
3779
3780         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
3781         is created by the inlined delegate ctor.
3782
3783         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
3784
3785         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
3786
3787 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
3788
3789         * cpu-x86.md: Fix the length of ckfinite.
3790
3791 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
3792
3793         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
3794         
3795         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
3796         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
3797
3798         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
3799
3800         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
3801         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
3802
3803 2007-11-28  Martin Baulig  <martin@ximian.com>
3804
3805         * mini-x86.c
3806         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
3807         after creating the trampoline.
3808
3809 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
3810
3811         * aot-runtime.c (load_aot_module): Check runtime version if needed.
3812
3813         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
3814         the same version.
3815
3816         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
3817         instead of the calling method to help AOT.
3818
3819         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
3820
3821 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
3822
3823         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
3824         is defined.
3825
3826 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
3827
3828         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
3829         
3830         * aot-compiler.c (compile_method): Correct check for generic method definitions.
3831         (encode_method_ref): No need to handle generic method definitions specially.
3832
3833         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
3834
3835         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
3836         decode_klass_info.
3837
3838         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
3839         encode_klass_info.
3840         (compile_method): Enable generic sharing.
3841
3842 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
3843
3844         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
3845         (mini_method_compile): Add preliminary support for AOTing shared generic code.
3846
3847         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
3848         generic code.
3849
3850         * mini-trampolines.c: Fix a warning.
3851
3852         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
3853         NEW_PCONST.
3854         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
3855         (generic_class_is_reference_type): Remove unused function.
3856
3857         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
3858         in the generic vtable trampoline case.
3859
3860         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
3861         
3862         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
3863         return an AOT method based on a vtable slot.
3864
3865         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
3866
3867         * mini.c (mini_get_vtable_trampoline): Export this.
3868
3869 2007-11-22  Martin Baulig  <martin@ximian.com>
3870
3871         * debug-debugger.h
3872         (MonoDebuggerInfo): Move `debugger_version' up.
3873
3874 2007-11-22  Martin Baulig  <martin@ximian.com>
3875
3876         * mini-amd64.c
3877         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
3878
3879         * mini-trampolines.c
3880         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
3881         after compiling the method.
3882
3883 2007-11-20  Martin Baulig  <martin@ximian.com>
3884
3885         * debug-mini.c
3886         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
3887         (mono_debugger_remove_breakpoint): Likewise.
3888         (mono_debugger_check_breakpoints): Likewise.
3889
3890         * debug-debugger.c: Implement the new breakpoint interface here.
3891
3892 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
3893
3894         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
3895         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
3896
3897         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
3898
3899 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
3900
3901         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
3902
3903         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
3904         mini.c.
3905
3906         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
3907         mini.c.
3908
3909         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
3910         returning a vtype in a register.
3911
3912         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
3913         here from the arch specific code.
3914
3915         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
3916         mini.c.
3917
3918         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
3919         (mono_arch_emit_prolog): Increment maximum prolog size.
3920
3921         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
3922         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
3923
3924         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
3925         MonoGenericSharingContext.
3926
3927         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
3928         MonoGenericSharingContext. Allocate memory from the cfg mempool.
3929
3930 2007-11-15  Mark Probst  <mark.probst@gmail.com>
3931
3932         * mini.c, mini.h, generic-sharing.c: Functions for producing code
3933         which extract fields out of the runtime generic context.  Full
3934         sharing of the NEWARR opcode.
3935
3936 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
3937
3938         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
3939         --enable-minimal=ssa.
3940
3941 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
3942
3943         * mini-trampolines.c (mono_delegate_trampoline): Update after 
3944         mono_marshal_get_delegate_invoke () signature change.
3945
3946 2007-11-13  Mark Probst  <mark.probst@gmail.com>
3947
3948         * mini.c: Removed the shared context in favor of the generic
3949         sharing context.  Allocate the MonoJitInfo structure with room for
3950         the generic sharing context if it's needed.
3951
3952         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
3953         domain-internals.h now.
3954
3955         * mini-x86.c: Pass the generic sharing context to get_call_info ().
3956
3957         * generic-sharing.c: Several changes for working without a shared
3958         context and instead operating on open types instead.
3959
3960 2007-11-12  David S. Miller  <davem@davemloft.net>
3961
3962        * inssel-sparc.brg: Fix double instruction emit.
3963
3964 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
3965
3966         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
3967         Get/Set/Address methods.
3968         
3969         * mini.c debug-debugger.c mini-trampolines.c: Update after 
3970         mono_marshal_get_delegate_invoke signature change.
3971
3972 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
3973
3974         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
3975         This can happens with dynamic methods. Fixes the other bug in #322722.
3976
3977 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
3978
3979         * tramp-arm.c (mono_arch_patch_callsite): Support patching
3980         BX call sequence.
3981
3982         * mini-arm.c (arm_patch): Implement patching of BX call
3983         sequence. Fixes one of the bugs in #322722.
3984
3985 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
3986
3987        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
3988        under Linux.  We only need to flush every 32-byte cache line.    
3989
3990 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
3991
3992         * mini.c:
3993         move_basic_block_to_end: Add branches when needed, eventually creating
3994         a new BB.
3995         optimize_branches: added a parameter that tells if it's ok to create
3996         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
3997         and avoid calling move_basic_block_to_end when it's not ok.
3998         Fixes bug 318677.
3999
4000 2007-11-07  Mark Probst  <mark.probst@gmail.com>
4001
4002         * mini.c: Abort inlining call to InitializeArray if something
4003         looks wrong.  Let the icall handle it, which now has proper safety
4004         checks.
4005
4006 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
4007
4008         * mini.c (mono_spill_call): add support for soft-float.
4009
4010         * mini.c (mono_method_to_ir): add support for soft-float
4011         to inlined functions that return float.
4012
4013         * mini.c (mono_method_to_ir): add support for soft-float
4014         to cee_stsfld opcode on float fields.
4015
4016 2007-11-05  Geoff Norton  <gnorton@novell.com>
4017
4018         * mini-x86.h: Fix the structure access for X86 Leopard.
4019
4020
4021 2007-11-05  Martin Baulig  <martin@ximian.com>
4022
4023         * mini-trampolines.c
4024         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
4025         after compiling the method to notify the debugger.
4026
4027 2007-11-05  Martin Baulig  <martin@ximian.com>
4028
4029         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
4030
4031 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
4032
4033         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
4034         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
4035
4036 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
4037
4038         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
4039         native-to-managed wrappers.
4040         
4041 2007-11-01  Geoff Norton  <gnorton@novell.com>
4042
4043         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
4044         members.
4045
4046 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
4047
4048         * mini.c, mini-x86.c: when getting back from unmanaged code
4049         to managed via a marshaled delegate we also need to set the
4050         right domain.
4051
4052 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
4053
4054         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
4055         for amd64.
4056
4057 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
4058
4059         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
4060         let the debugger or other external agents to tell the JIT when
4061         a sw breakpoint has been inserted in the code that the JIT needs
4062         to be able to inspect.
4063
4064 2007-10-31  Martin Baulig  <martin@ximian.com>
4065
4066         * debug-debugger.h
4067         (MonoDebuggerInfo): Remove `runtime_class_init'.
4068
4069 2007-10-30  Martin Baulig  <martin@ximian.com>
4070
4071         * debug-mini.h
4072         (mono_debugger_thread_created): Added `MonoThread *' argument.
4073         (mono_debugger_extended_notification): New public method.
4074         (mono_debugger_trampoline_compiled): New public method.
4075
4076         * debug-mini.c
4077         (MonoDebuggerThreadInfo): Added `thread' and
4078         `extended_notifications' fields.
4079
4080         * debug-debugger.c
4081         (debugger_executable_code_buffer): New static variable.
4082
4083         * debug-debugger.h
4084         (MonoDebuggerInfo): Added `executable_code_buffer',
4085         `executable_code_buffer_size', `breakpoint_info_area',
4086         `breakpoint_table' and `breakpoint_table_size'.
4087
4088 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
4089
4090         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
4091         that IP  either is an unused value or the vtable pointer. IMT 
4092         calls use vtable + offset now. Reduced by almost half the size
4093         of IMT entries.
4094
4095 2007-10-26  Jonathan Chambers <joncham@gmail.com>
4096
4097         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
4098         defines to access param registers. Replace long usage with
4099         gsize as sizeof(long) != sizeof(void*) on Win64.
4100
4101         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
4102         on Win64. Fix intrinsic, use _AddressOfReturnAddress
4103         instead of non-existant _GetAddressOfReturnAddress.
4104
4105         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
4106         param registers. Save/restore %rdi and %rsi in MonoLMF.
4107
4108         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
4109         param registers. Modify (throw_exception) signature to take 
4110         %rdi and %rsi on Win64. 
4111
4112         Code is contributed under MIT/X11 license.
4113
4114 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
4115
4116         * helpers.c: unlink debugging output files.
4117
4118 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
4119
4120         * mini.c: Move mono_create_ftnptr () to object.c.
4121
4122 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
4123
4124         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
4125         optional. This function can now be used to disassemble code generated
4126         outside the JIT such as trampolines and IMT thunks.
4127
4128         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
4129
4130         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
4131         vtable pointer from a ldr instruction.
4132
4133         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
4134         new IMT call sequence.
4135
4136         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
4137         call sequence for interface invocations.
4138
4139         * mini-arm.c (mono_arch_emit_imt_argument): added, required
4140         for imt support. This function is empty since IMT on ARM requires no
4141         special handling on the IR side.
4142
4143         * mini-arm.c (mono_arch_find_imt_method): added, required for
4144         imt support.
4145
4146         * mini-arm.c (mono_arch_find_this_argument): added, required
4147         for imt support.
4148
4149         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
4150         a ldr instruction to load a value stored in the code stream.
4151
4152         * mini-arm.c (mono_arch_build_imt_thunk):added, required
4153         for imt support.
4154
4155
4156 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
4157
4158         * mini.c (mini_init): Install the jump trampoline callback.
4159
4160 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4161
4162         * mini-trampolines.c: handle synchronized methods with the common
4163         vtable trampoline (bug #335601).
4164
4165 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
4166
4167         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
4168
4169         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
4170         64 bit platforms.
4171
4172         * mini-ia64.h mini-ia64.c: Add support for IMT.
4173
4174         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
4175         prolog. Fixes #331958.
4176
4177 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
4178
4179         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
4180
4181 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4182
4183         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
4184         trampoline.
4185
4186 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4187
4188         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
4189         trampoline.
4190
4191 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
4192
4193         * mini-x86.c, mini-x86.h: x86 support for the common vtable
4194         trampoline.
4195
4196 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
4197
4198         * mini-trampolines.c: changed the magic rampoline to understand
4199         the common vtable trampoline method: the method to invoke is
4200         determined by the vtable displacement of the call.
4201
4202 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
4203
4204         * mini.c, mini.h: register the common vtable trampoline if the
4205         architecture supports it.
4206
4207 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4208
4209         * cpu-amd64.md: use the correct max length for tls_get.
4210
4211 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
4212
4213         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
4214         CEE_STELEM_ANY. Fixes #333696.
4215
4216 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
4217
4218         * exceptions-x86.c: provide more graceful handling of the case where
4219         we followed a bogus function pointer from managed code (bug #332866).
4220
4221 2007-10-11  Mark Probst  <mark.probst@gmail.com>
4222
4223         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
4224         replaces the generic_shared flag and will carry more information
4225         in the future.
4226
4227         * generic-sharing.c: Added mini_type_stack_size() which allows
4228         allows open types if given a generic sharing context.
4229         mini_get_basic_type_from_generic() takes a
4230         MonoGenericSharingContext* instead of a MonoCompile* now.
4231
4232         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
4233         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
4234         mini-sparc.c, mini-x86.c: Trivial changes required by the two
4235         changes above.  Just passing arguments through to the right
4236         places.
4237
4238 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
4239
4240         * mini-arm.c: unify the call emission to emit_code_seq().
4241
4242 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
4243
4244         * tramp-arm.c: reduced the trampoline size.
4245
4246 2007-10-10  Mark Probst  <mark.probst@gmail.com>
4247
4248         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
4249         variable handling out of arch-specific code.
4250
4251 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
4252
4253         * mini-arm.c: implemented fast delegate dispatch.
4254
4255 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
4256
4257         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
4258         that fp elimination is turned off if the space required by locals is too
4259         big. Fixes #331958.
4260
4261 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
4262
4263         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
4264         ARM to the new style trampoline.
4265
4266 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
4267
4268         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
4269
4270         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
4271
4272 2007-10-09  Martin Baulig  <martin@ximian.com>
4273
4274         * debug-debugger.h
4275         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
4276         `field_info_offset_offset'.     
4277
4278 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
4279
4280         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
4281         removed more internal usage of the r11 register and made it available
4282         to the register allocator.
4283
4284 2007-10-08  Mark Probst  <mark.probst@gmail.com>
4285
4286         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
4287         when sharing generics and treat type variables as references.
4288
4289 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
4290
4291         * mini-ppc.c: started removing the internal uses of register r11
4292         to eventually allow the register allocator to manage it as an
4293         additional available register.
4294
4295 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
4296
4297         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
4298
4299 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
4300
4301         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
4302         specific trampolines as they are not performance critical as a jump
4303         target (maybe align as before only for AOT code?). This saves about
4304         200 KB of native code on x86 for monodevelop startup.
4305
4306 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
4307
4308         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
4309         monodevelop startup.
4310
4311 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
4312
4313         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
4314
4315         * mini-sparc.h mini-sparc.c: Implement IMT support.
4316
4317         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
4318         its smaller and doesn't clobber sparc_g1.
4319
4320         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
4321
4322 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
4323
4324         * mini-ppc.c: optimized the size of the IMT thunks a bit.
4325
4326 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
4327
4328         * mini-ppc.c: implemented fast delegate invocation.
4329
4330 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
4331
4332         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
4333
4334 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
4335
4336         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
4337         code to the new style trampoline in preparation for IMT support.
4338
4339 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
4340
4341         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
4342         systems already. This also reduces the specific trampiline sizes and
4343         prepares for the use of r12 as the IMT identifier register.
4344
4345 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4346
4347         * mini-mips.h: endianess fix (simplified from a patch by
4348         Thomas Kunze <thommy@tabao.de>, bug #323737).
4349
4350 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
4351
4352         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
4353         to access ucontext fields and enable netbsd support
4354         (partially from Magnus Henoch <mange@freemail.hu>).
4355
4356 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4357
4358         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
4359         use the preprocessor from the CPP env var if it is set.
4360
4361 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
4362
4363         * mini-trampolines.c: fixed an assertion and moved it earlier in the
4364         code, before interface_offset gets used.
4365
4366 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
4367
4368         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
4369         mono_class_setup_vtable () before accessing klass->vtable.
4370
4371 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
4372
4373         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
4374         hackish.
4375
4376 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4377
4378         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
4379         IMT slots (this saves hundreds of KB of memory in programs like
4380         IronPython and Monodevelop).
4381
4382 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
4383
4384         * mini.c: print the delegate counter.
4385
4386 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
4387
4388         * mini-x86.c: make it easier to enable the debugging code for IMT
4389         slots.
4390
4391 2007-09-28  Martin Baulig  <martin@ximian.com>
4392
4393         * debug-debugger.h
4394         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
4395         `mono_method_klass_offset' and `mono_method_token_offset'.
4396
4397 2007-09-20  Mark Probst  <mark.probst@gmail.com>
4398
4399         * mini.c: First generics sharing implementation.  Can only share
4400         in very simple cases.  If sharing doesn't work it falls back to
4401         dedicated compilation.
4402
4403         * mini.h: Flag in MonoCompile to specify whether generic
4404         compilation is shared.  Flags enum for marking which generic inst
4405         of a context is used.  Prototypes for helper functions.
4406
4407         * generic-sharing.c: Helper functions for generic method sharing.
4408
4409         * optflags-def.h: Optimization flag (gshared) for enabling generic
4410         method sharing added.
4411
4412         * Makefile.am: generic-sharing.c added.
4413
4414 2007-09-19 Daniel Nauck <dna@mono-project.de>
4415
4416         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
4417
4418 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
4419         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
4420         fixes bug 325507.
4421
4422 2007-09-19  Martin Baulig  <martin@ximian.com>
4423
4424         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
4425         mono_debug_cleanup() is now part of mono_cleanup().
4426
4427 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
4428
4429         * driver.c (mono_main): Fix a warning.
4430
4431 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
4432
4433         * aot-compiler.c: Optimize various parts when processing large assemblies.
4434         Fixes ##325568.
4435
4436         * mini.c (mono_patch_info_hash): Improve hash function.
4437
4438 2007-09-14  Jonathan Chambers <joncham@gmail.com>
4439
4440         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
4441         
4442         Code is contributed under MIT/X11 license.
4443
4444 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
4445
4446         * mini.c (mini_init): Fix a leak.
4447
4448         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
4449
4450 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
4451
4452         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
4453
4454 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
4455
4456         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
4457
4458 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
4459
4460         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
4461         variance tests.
4462
4463         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
4464
4465         * mini.c (handle_alloc): Enable managed allocators in AOT code.
4466
4467         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
4468
4469         * aot-runtime.c (decode_patch_info): Ditto.
4470
4471 2007-09-12  Jonathan Chambers <joncham@gmail.com>
4472
4473         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
4474         static case. Cache delegates in architecture specific code, 
4475         based on number of parameters.
4476         
4477         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
4478         in architecture specific code, based on number of parameters.
4479         
4480         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
4481         caching happen in architecture specific code now.
4482         
4483         Code is contributed under MIT/X11 license.
4484
4485 2007-09-12  Jonathan Chambers <joncham@gmail.com>
4486
4487         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
4488         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
4489         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
4490
4491         Code is contributed under MIT/X11 license.
4492
4493 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
4494         * mini.c: (mono_thread_abort) Fixed bug #82416.
4495
4496 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
4497
4498         * mini.: hook the new managed GC allocation feature into the JIT.
4499
4500 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
4501
4502         * mini.c: implementation for the new runtime tls opcode.
4503
4504 2007-09-11  Martin Baulig  <martin@ximian.com>
4505
4506         * debug-debugger.h
4507         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
4508         `mono_method_inflated_offset'.
4509
4510 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
4511
4512         * driver.c mini.h mini.c: Add a new devel command line option for injecting
4513         async exceptions into a method.
4514
4515         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
4516         purpose of testing whenever the unwinder works at every instruction.
4517
4518 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
4519
4520         * mini.c: check accessibility of method used in ldftn (fixes
4521         bug #82635).
4522
4523 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
4524
4525         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
4526
4527         * inssel.brg: Fix a warning.
4528
4529 2007-09-03  Martin Baulig  <martin@ximian.com>
4530
4531         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
4532         now takes the `main_method' as argument.
4533
4534 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
4535
4536         * cpu-sparc.md (endfilter): Add missing src1:i argument.
4537
4538 2007-08-30  Jonathan Chambers <joncham@gmail.com>
4539
4540         * driver.c: include the cil-coff.h header on Windows.
4541         
4542         Code is contributed under MIT/X11 license.
4543
4544 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
4545
4546         * mini.c, driver.c: don't include the cil-coff.h header.
4547
4548 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
4549
4550         * mini.c: flag places that needs fixes fo soft-float support.
4551
4552 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
4553
4554         * mini.h, inssel-float.brg: fix soft-float constant loads on big
4555         endian systems (partially from Dean Jenkins, bug #81924).
4556
4557 2007-08-28  Mark Probst  <mark.probst@gmail.com>
4558
4559         * mini.c (check_linkdemand): Remove embedded reference object in
4560         call to LinkDemandSecurityException.
4561         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
4562         with an IntPtr instead of a reference object.
4563
4564 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
4565
4566         * mini.c (handle_initobj): Handle alignment properly.
4567
4568         * inssel.brg (mini_emit_memset): Ditto. 
4569
4570         * inssel.brg (mini_emit_memcpy): Ditto. 
4571
4572         * inssel-sparc.brg: Ditto.              
4573
4574         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
4575
4576 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
4577
4578         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
4579         exceptions raised in unmanaged code. Fixes part of #82594.
4580
4581 2007-08-24  Mark Probst  <mark.probst@gmail.com>
4582
4583         * mini.c (mono_method_to_ir), declsec.c
4584         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
4585
4586 2007-08-22  Martin Baulig  <martin@ximian.com>
4587
4588         * debug-mini.h
4589         (MonoDebuggerThreadInfo): New typedef.
4590         (mono_debugger_thread_table): New global variable.
4591         (mono_debugger_thread_created): New public function.
4592         (mono_debugger_thread_cleanup): New public function.
4593
4594         * debug-debugger.h
4595         (MonoDebuggerInfo):
4596         - removed `get_current_thread' and `lookup_assembly'.
4597         - removed `data_table'.
4598         - added `thread_table'.
4599
4600         * mini.c
4601         (mono_thread_start_cb): Call mono_debugger_thread_created().
4602         (mono_thread_attach_cb): Likewise.
4603         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
4604         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
4605         initial domain.
4606
4607         * driver.c (mono_main): Move mono_debug_init() up, before calling
4608         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
4609
4610 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
4611
4612         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
4613         together when passing several arguments of type double (gives a small
4614         speedup and saves a few bytes of generated code).
4615
4616 2007-08-20  Jb Evain  <jbevain@novell.com>
4617
4618         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
4619
4620 2007-08-20  Jb Evain  <jbevain@novell.com>
4621
4622         * mini.c (mono_method_to_ir): throw MethodAccessException
4623         and FieldAccessException instead of InvalidProgramException.
4624
4625 2007-08-20  Mark Probst  <mark.probst@gmail.com>
4626
4627         * mini.c: CoreCLR security checks.
4628
4629         * mini.h: Removed MonoSecurityMode (moved to
4630         metadata/security-manager.h) and mono_security_mode global var
4631         (replaced by set/get functions in security-manager.h).
4632
4633         * driver.c: Added "core-clr-test" security mode for testing.  Used
4634         set-function for setting security mode.
4635
4636 2007-08-17  Mark Probst  <mark.probst@gmail.com>
4637
4638         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
4639         the new jit_info_table.
4640
4641         * driver.c: Test code for the new jit_info_table (enabled by the
4642         define MONO_JIT_INFO_TABLE_TEST).
4643
4644 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
4645
4646         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
4647         detection of call <REG> instruction sequence. Fixes build on freebsd.
4648
4649 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
4650
4651         * mini-exceptions.c: Fix a warning.
4652
4653 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
4654
4655         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
4656         stack overflow handling code on amd64 too.
4657
4658         * mini-exceptions.c (mono_setup_altstack): Make this use 
4659         mono_thread_get_stack_bounds ().
4660
4661         * mini-x86.h: Disable sigaltstack on solaris x86.
4662
4663 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
4664
4665         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
4666
4667 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
4668
4669         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
4670
4671 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
4672
4673         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
4674
4675         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
4676
4677 2007-08-03  Neale Ferguson <neale@sinenomine.net>
4678
4679         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
4680         due to alignment.
4681
4682 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
4683
4684         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
4685         to be emitted (bug #82281).
4686
4687 2007-08-01  Martin Baulig  <martin@ximian.com>
4688
4689         Merged the `debugger-dublin' branch.
4690
4691         * debug-debugger.h (MonoDebuggerInfo):
4692         Removed the `old_*' compatibility entries.
4693         Added `debugger_version' and `data_table'.
4694         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
4695         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
4696
4697         * debug-mini.c
4698         (MiniDebugMethodBreakpointInfo): Add `address_list'.
4699         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
4700         instead of a `gconstpointer'.
4701         (mono_debugger_insert_method_breakpoint): Return a
4702         `MonoDebugMethodAddressList *'.
4703
4704 2007-06-28  Martin Baulig  <martin@ximian.com>
4705
4706         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
4707
4708 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
4709
4710         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
4711         __builtin_frame_address () since it is broken on older gcc versions.
4712
4713 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
4714
4715         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
4716         on the stack overflow handling and made the managed stack overflows
4717         catchable in most cases using soft guard pages.
4718         * exceptions-x86.c: added code to restore the protection in the soft
4719         guard pages at the end of exception handling.
4720
4721 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
4722
4723         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
4724
4725 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
4726
4727         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
4728         exception handling.
4729
4730 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
4731
4732         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
4733         signal handling support until it has been ported to the new mechanism.
4734         * mini.c: fixed stack overflow detection and use the new
4735         architecture code  to handle signals on the altstack.
4736
4737 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
4738
4739         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
4740         stack overflows on the alt stack.
4741
4742 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
4743
4744         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
4745         stack overflows on the alt stack.
4746
4747 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
4748
4749         * exceptions-ppc.c: cleanup preparing for altstack support.
4750
4751 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
4752
4753         * exceptions-arm.c: cleanup preparing for altstack support.
4754
4755 2007-07-27  Mark Probst  <mark.probst@gmail.com>
4756
4757         * mini.c (print_jit_stats): Output hazard pointer stats.
4758
4759 2007-07-26  Mark Probst  <mark.probst@gmail.com>
4760
4761         * driver.c, mini.c: Replaced security mode flags with a single
4762         enum variable.
4763
4764 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
4765
4766         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
4767
4768 2007-07-25  Mark Probst  <mark.probst@gmail.com>
4769
4770         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
4771         (which doesn't do anything yet) for activating Core CLR
4772         (Silverlight) security.
4773
4774 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
4775
4776         * mini-codegen.c: work around a possible gcc bug on arm.
4777
4778 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
4779
4780         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
4781         message for platforms that don't support AOT compilation.
4782
4783 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
4784
4785         * mini.h, mini.c, driver.c: temporary smcs hack.
4786
4787 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
4788
4789         * mini-arm.h, mini-arm.c: arm EABI fixes.
4790
4791 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
4792
4793         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
4794         case.
4795
4796         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
4797         trampolines taking a method argument.
4798
4799         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
4800
4801         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
4802         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
4803
4804         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
4805         JIT compilation throws an exception. Fixes #82050.
4806
4807 2007-07-19  Mark Probst  <mark.probst@gmail.com>
4808
4809         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
4810         with the MONO_EXCEPTION_ defines.
4811
4812 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
4813
4814         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
4815         #82117.
4816         
4817         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
4818         the cause of an assertion.
4819
4820 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
4821
4822         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
4823         removed.
4824
4825 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
4826
4827         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
4828         assert. Should fix #82103.
4829
4830 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
4831
4832         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
4833         here too. Fixes #82095.
4834
4835         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
4836         addresses.
4837
4838         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
4839
4840         * mini-amd64.h: Enable IMT for amd64.
4841         
4842         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
4843
4844 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
4845
4846         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
4847
4848 2007-07-12  Mark Probst  <mark.probst@gmail.com>
4849
4850         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
4851         as soon as check_linkdemand sets an exception_type.
4852
4853 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
4854
4855         * mini-x86.c: fixed offsets for IMT call sequence.
4856         * mini-x86.h: enable IMT again.
4857
4858 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
4859
4860         * trace.c (mono_trace_enter_method): Decode MonoType too.
4861
4862         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
4863
4864         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
4865
4866         * mini-amd64.c: Add preliminary IMT implementation.
4867         
4868 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
4869
4870         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
4871         understand the new IMT-base interface invocation (thanks to
4872         Daniel Nauck for the report and the remote debugging session).
4873
4874 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
4875
4876         * mini-x86.c: size and speed optimizations for the IMT bsearch.
4877
4878 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
4879
4880         * Makefile.am (aotcheck): Make this actually use the AOTed code.
4881
4882 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
4883
4884         * mini-trampolines.c: implement AOT IMT support.
4885         * mini-x86.h: enable IMT support for wider testing.
4886
4887 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
4888
4889         * inssel.brg (emit_imt_argument): Add aot support here.
4890
4891         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
4892
4893 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
4894
4895         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
4896         of the IMT implementation, partially from massi, with my
4897         implementation of the bsearch sequence. Disabled by default until
4898         the AOT code is implemented.
4899
4900 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
4901
4902         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
4903
4904         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
4905
4906 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
4907
4908         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
4909         arch-independent IMT JIT code from Massimiliano
4910         Mantione (massi@ximian.com) with small cleanups from me.
4911
4912 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
4913
4914         * Makefile.am: fix svn invocation to get the svn revision to be
4915         independent of the local language (build fix).
4916
4917 2007-07-09  Mark Probst  <mark.probst@gmail.com>
4918
4919         * mini.c (inline_method): Reset cfg->exception_type if the
4920         inlining is aborted.  Fixes: 82049.
4921
4922 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
4923
4924         * mini.c: remove assert from exception handling code when exception_ptr
4925         is not set.
4926
4927 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
4928
4929         * mini.c (mono_codegen): Add an assert.
4930
4931         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
4932         enter and leave code.
4933         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
4934
4935 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4936
4937         * mini-ppc.c: fixed memory corruption for localloc(0)
4938         (bug #81852).
4939
4940 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
4941         
4942         * mini.c: Fix warnings.
4943
4944 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
4945
4946         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
4947         to emit better double->int conversions.
4948
4949 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
4950
4951         * mini.c: the provided Min/Max optimizations are valid for unisgned
4952         ints.
4953
4954 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
4955
4956         * 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
4957
4958 2007-06-28  Miguel de Icaza  <miguel@novell.com>
4959
4960         * mini.c (mono_running_on_valgrind): Add support for reporting the
4961         method and  its boundaries to valgrind.
4962
4963 2007-06-28  Martin Baulig  <martin@ximian.com>
4964
4965         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
4966
4967 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
4968
4969         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
4970
4971         * generic.2.cs: Add new test case.
4972
4973 2007-06-25  Martin Baulig  <martin@ximian.com>
4974
4975         Merged the `debugger-dublin' branch.
4976
4977         * debug-mini.c
4978         (mono_debugger_insert_method_breakpoint): New public method.
4979         (mono_debugger_remove_method_breakpoint): Likewise.
4980         (mono_debugger_check_breakpoints): New static method.
4981         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
4982
4983         * debug-debugger.h (MonoDebuggerInfo):
4984         Renamed (to keep backward compatibility in the vtable):
4985         `insert_breakpoint' -> `old_insert_breakpoint'.
4986         `remove_breakpoint' -> `old_remove_breakpoint'.
4987         `create_string' -> `old_create_string'.
4988         `lookup_class' -> `old_lookup_class'.
4989         `lookup_type' -> removed; changed into a dummy field.
4990         `lookup_assembly' -> `old_lookup_assembly'.
4991         Added (same functionality, but different signature):
4992         `create_string', `lookup_class', `lookup_assembly'
4993         Added new:
4994         `get_method_addr_or_bpt', `remove_method_breakpoint',
4995         `runtime_class_init'.
4996
4997         * debug-debugger.c: Merged the `debugger-dublin' branch.
4998
4999 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
5000
5001         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
5002         well.
5003         (peephole_pass): Likewise.
5004
5005 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
5006
5007         * driver.c: hopefully make setaffinity work also for ancient
5008         versions of linux.
5009
5010 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
5011
5012         * driver.c : win32 build fix.
5013
5014 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
5015
5016         * driver.c: check for the MONO_NO_SMP env var and bind to a single
5017         processor if it is set.
5018
5019 2007-06-21  Martin Baulig  <martin@ximian.com>
5020
5021         * debug-mini.h: New file.
5022
5023         * debug-mini.c
5024         (mono_debugger_insert_breakpoint_full): Moved here from
5025         ../metadata/mono-debug-debugger.c.
5026         (mono_debugger_remove_breakpoint): Likewise.
5027         (mono_debugger_breakpoint_callback): Likewise.
5028
5029 2007-06-15  Raja R Harinath  <rharinath@novell.com>
5030
5031         * jit-icalls.c (mono_helper_compile_generic_method): Update to
5032         changes in MonoGenericClass.
5033
5034 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
5035
5036         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
5037
5038 2007-06-14  Raja R Harinath  <rharinath@novell.com>
5039
5040         * jit-icalls.c (mono_helper_compile_generic_method): Update to
5041         removal of MonoGenericMethod.
5042
5043 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5044
5045         * mini-exceptions.c: hooks for the exception events profiling API.
5046
5047 2007-06-14  Randolph Chung  <tausq@debian.org>
5048
5049         * Makefile.ma: Add hppa target.
5050         * mini-arch.h: Include mini-hppa.h
5051         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
5052         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
5053         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5054
5055 2007-06-14  Randolph Chung  <tausq@debian.org>
5056
5057         * inssel.brg: Add rules for "chained" compare-branch operations so that
5058         a single compare op can affect multiple branches.  Adjust cost for
5059         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
5060         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
5061         cost for some rules so that they can more easily be overridden by
5062         per-arch rules (with fixes from lupus).
5063         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5064
5065 2007-06-13  Randolph Chung  <tausq@debian.org>
5066
5067         * mini-ops.h: Reorder branch ops so that they match the order of the
5068         corresponding CEE_* ops.  The code expects them this way.
5069         Add new ops for HPPA target.
5070         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5071
5072 2007-06-13  Randolph Chung  <tausq@debian.org>
5073
5074         * mini-exceptions.c: Handle cases where the stack grows towards
5075         larger addresses.
5076         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5077
5078 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
5079
5080         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
5081         counter.
5082         * driver.c: explain where a non-matching corlib is found.
5083
5084 2007-06-13  Mark Probst  <mark.probst@gmail.com>
5085
5086         * mini.c (print_jit_stats): Output dynamic code allocation stats.
5087
5088 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
5089
5090         * mini-exceptions.c: Generate a method profile leave event during
5091         an exception to ensure that the profiler gets notified.
5092
5093 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
5094
5095         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
5096         branch.
5097
5098         * cpu-amd64.md: Add long_and/or/xor opcodes.
5099
5100 2007-06-06  Wade Berrier  <wberrier@novell.com>
5101
5102         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
5103         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
5104         length of instruction shr_imm (expected 8, got 10)
5105
5106 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
5107
5108         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
5109
5110 2007-06-06  Mark Probst  <mark.probst@gmail.com>
5111
5112         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
5113         MonoInternalHashTable again (fixed bug in the internal hash table
5114         code).
5115
5116 2007-06-06  Mark Probst  <mark.probst@gmail.com>
5117
5118         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
5119         Have to figure out what makes it crash the SWF regression.
5120
5121 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
5122
5123         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
5124
5125 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5126
5127         * mini.c: optimize out the type check when storing null in a
5128         reference array.
5129
5130 2007-06-04  Mark Probst  <mark.probst@gmail.com>
5131
5132         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
5133         MonoInternalHashTable.
5134
5135 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
5136
5137         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
5138         signed integer methods.
5139
5140 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
5141
5142         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
5143         permanently since the current approach doesn't work.
5144
5145 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
5146
5147         * inssel.brg (stmt): Only call delegate->invoke_impl if 
5148         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
5149
5150 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
5151
5152         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
5153         the sreg2==rdx case.
5154         
5155         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
5156         account if it contains a rex prefix.
5157         (peephole_pass): Handle OP_FMOVE as well.
5158
5159 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
5160
5161         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
5162         as it causes regressions.
5163
5164 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
5165
5166         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
5167         static case as well.
5168
5169         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
5170
5171         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
5172         (mono_arch_get_this_arg_from_call): Ditto.
5173
5174         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
5175
5176         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
5177         invoke_impl field.
5178
5179         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
5180         (mono_arch_get_this_arg_from_call): Ditto.
5181
5182         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
5183         
5184         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
5185         try to create optimized invoke code and use that for further invocations. 
5186         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
5187
5188         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
5189
5190 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
5191
5192         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
5193         sealed classes or methods.
5194         *devirtualization.cs: tests for the new optimization
5195
5196 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
5197
5198         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
5199         by the update_volatile () function.
5200
5201 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
5202
5203         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
5204         require it.
5205
5206         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
5207
5208 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
5209
5210         * mini.c: Add configure checks for header files.
5211         * mini-x86.c: Add configure checks for header files.
5212         * trace.c: Add configure checks for header files.
5213         * aot-runtime.c: Add configure checks for header files.
5214         * aot-compiler.c: Add configure checks for header files.
5215         * driver.c: Add configure checks for header files.
5216         * mini-codegen.c: Add configure checks for header files.
5217         
5218         Code is contributed under MIT/X11 license.
5219
5220 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
5221
5222         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
5223         icompare_imm -128 + op_iclt. Fixes #81703.
5224
5225 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
5226
5227         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
5228
5229 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
5230
5231         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
5232         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
5233         so that all isinst checks now use "interface_bitmap".
5234
5235 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
5236
5237         * cpu-amd64.md (jmp): Fix a warning.
5238
5239         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
5240
5241         * basic.cs: Add new regression test.
5242
5243         * basic.cs: Remove test which is now in basic-long.cs.
5244
5245         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
5246
5247         * basic-long.cs: Add new test.
5248         
5249 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
5250
5251         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
5252
5253 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
5254
5255         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
5256
5257         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
5258         places.
5259         
5260         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
5261         throwing code a bit.
5262
5263         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
5264         the exception throwing code a bit.
5265
5266         * mini-x86.c (get_call_info): Allocate result from a mempool.
5267
5268 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
5269
5270         * aot-compiler.c (find_typespec_for_class): Fix the assert.
5271
5272         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
5273
5274         * mini.h (MonoCompile): Add 'token_info_hash' field.
5275
5276         * mini.c: Save token->method associations during compilation so the AOT 
5277         compiler can use it.
5278         
5279         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
5280         which reference generic classes and methods.
5281
5282 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
5283
5284         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
5285
5286         * aot-compiler.c (compile_method): Fix a typo in a comment.
5287
5288         * aot-runtime.c (decode_cached_class_info): Skip generic types.
5289
5290         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
5291         everything generic.
5292
5293         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
5294
5295 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
5296
5297         * mini.h (MonoCompile): Add 'args' field.
5298
5299         * mini.c (mono_compile_create_vars): Store variables representing the arguments
5300         into cfg->args.
5301
5302         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
5303
5304 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
5305
5306         * mini.c (mono_compile_get_interface_var): Remove this unused function.
5307
5308         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
5309
5310         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
5311         opcodes for some opcodes.
5312
5313         * mini.h *.brg *.c: Use the new opcodes.
5314
5315 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
5316
5317         * mini.h: Bumped aot revision.
5318
5319         * inssel.brg: modified code generation of type checks for interfaces
5320         to use the new "MonoClass.interface_bitmap" instead of the old
5321         "MonoClass.interface_offsets".
5322
5323 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
5324
5325         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
5326
5327 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
5328
5329         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
5330         64 bit platforms.
5331
5332 2007-04-27  Neale Ferguson <neale@sinenomine.net>
5333
5334         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
5335
5336 2007-04-27  Wade Berrier  <wberrier@novell.com>
5337
5338         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
5339         mini.h) to fix build.
5340
5341 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
5342
5343         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
5344         
5345         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
5346         causes the corlib unit tests to fail.
5347
5348 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
5349
5350         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
5351
5352         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
5353
5354         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
5355         opcodes to the comparison relations.
5356
5357         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
5358         opcodes to their types.
5359         
5360         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
5361
5362         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
5363         it in cfg->arch.cinfo.
5364
5365         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
5366
5367         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
5368         cfg->cil_offset_to_bb.
5369
5370 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
5371
5372         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
5373         created becase of initlocals.
5374
5375 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
5376
5377         * mini-alpha.c cpu-alpha.md: More alpha port work from 
5378         Sergey Tikhonov <tsv@solvo.ru>.
5379
5380 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
5381
5382         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
5383
5384 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
5385
5386         * cpu-s390.md (break): Correct the length of break instruction.
5387
5388 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5389
5390         * mini.c: fix a couple of soft-float issues and comments.
5391
5392 2007-04-15  Miguel de Icaza  <miguel@novell.com>
5393
5394         * trace.c (is_filenamechar): - is also a filename char.
5395
5396 2007-04-15  Neale Ferguson <neale@sinenomine.net>
5397
5398         * mini-s390.c: Correct checking for enum type in return value processing.
5399
5400 2007-04-14  Raja R Harinath  <rharinath@novell.com>
5401
5402         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
5403         (version.h): Makefile is in the build directory.
5404
5405 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
5406
5407         * mini-amd64.h: fix for assertion failure on Solaris/amd64
5408
5409 2007-04-11  Martin Baulig  <martin@ximian.com>
5410
5411         * mini.c (can_access_member): Fix handling of generic classes;
5412         fixes #81259.
5413
5414 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
5415
5416         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
5417
5418 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
5419
5420         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
5421
5422 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
5423
5424         * mini-codegen.c: make sure the right spill amount is
5425         used for fp or integer registers (fixes the float_sub_spill() on ppc).
5426
5427 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
5428
5429         * mini-ppc.c: fixes for the fp_branch_nan test.
5430
5431 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
5432
5433         * basic.cs: Comment out new test which still fails on ia64.
5434
5435 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
5436
5437         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
5438
5439 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
5440
5441         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
5442
5443 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
5444
5445         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
5446         on 64 bit machines. Fixes part of #80738.
5447
5448         * basic.cs: Add regression test.
5449
5450 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
5451
5452         * inssel.brg basic.cs: Revert previous change to fix build.
5453
5454         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
5455         platforms.
5456         
5457         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
5458
5459         * basic.cs: Add new regression test.
5460
5461 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
5462
5463         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
5464         many arguments.
5465
5466 2007-03-16  Neale Ferguson <neale@sinenomine.net>
5467
5468         * cpu-s390x.md: Correct length of break instruction.
5469
5470 2007-03-16  Neale Ferguson <neale@sinenomine.net>
5471
5472         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
5473         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
5474
5475 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
5476
5477         * *.c: Begin WIN64 port.
5478         * mini.c:  Use correct register in profiler.
5479         * mini-amd64.c: No inline assembly on Win64.
5480         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
5481         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
5482         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
5483         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
5484         mono_arch_ip_from_context for Win64.
5485         
5486         Contributed under MIT/X11 license.
5487
5488 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
5489
5490         * exceptions-amd64.c (seh_handler): Ditto.
5491
5492         * exceptions-x86.c (seh_handler): Fix a memory leak.
5493
5494 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
5495
5496         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
5497         mini-s390x.c: fixed peephole optimizations to deal
5498         correctly with 1 and 2 byte reload avoidance.
5499
5500 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
5501
5502         * cpu-s390.md, cpu-s390x.md: update localloc length.
5503
5504 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
5505
5506         * cpu-g4.md: added missing descriptions.
5507
5508 2007-03-14  Miguel de Icaza  <miguel@novell.com>
5509
5510         *  Makefile.am: Add support so the tail tests are not executed on
5511         PowerPC as that is a known limitation of the PowerPC port.
5512
5513 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
5514
5515         * runmdesc.bat:  Move to msvc directory.
5516         
5517 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
5518
5519         * runmdesc.bat:  Run executable that was produced by the current
5520         target and sent via an argument.
5521         
5522 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
5523
5524         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
5525         #81102.
5526
5527         * generics.2.cs: Add regression test.
5528
5529 2007-03-09  Wade berrier  <wberrier@novell.com>
5530
5531         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
5532
5533 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
5534
5535         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
5536         AOT code depends on this.
5537
5538 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
5539
5540         * mini.c: more precise tracking of types in the eval stack
5541         (part of fix for bug #81044).
5542
5543 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
5544
5545         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
5546
5547         * aot-compiler.c (encode_patch): Remove an obsolete comment.
5548
5549 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
5550
5551         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
5552
5553         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
5554
5555 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
5556
5557         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
5558         a pointer on 64 bit systems. Fixes #80190.
5559
5560         * iltests.il: Add new regression test.
5561
5562 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
5563
5564         * mini.c: inline a constant for Environment.IsRunningOnWindows.
5565
5566 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
5567
5568         * trace.c: Remove an erroneous alignemnt check when tracing.
5569           Fixes --trace on OSX86.
5570
5571 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
5572
5573         * mini-$(arch).h: initialize SP in context for all the archs.
5574
5575 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
5576
5577         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
5578         regressions in the thread tests.
5579
5580 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
5581
5582         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
5583         - fixed implementation of LOCALLOC opcode
5584         - implemented non-un compare for floats
5585         - code cleanup
5586         - implementation of FDIV and CKFINITE opcodes
5587         - fixes for latest mono updates
5588         - additional arch opcodes
5589
5590 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
5591
5592         * Makefile.am: simplify and merge rules for cross-compilation.
5593
5594 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
5595
5596         * local-propagation.c: Actually *apply* the fix for bug 80591...
5597
5598 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
5599
5600         * mini-exceptions.c: backuot part of the last change
5601         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
5602
5603 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
5604         * inssel.brg: Fix bug 59286.
5605
5606
5607 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
5608
5609         * mini-exceptions.c: patch from Zoltan to correctly check for
5610         stack boundaries (using the stack register, not the frame register),
5611         fixes bugs #80724, #79717.
5612
5613 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
5614
5615         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
5616         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
5617
5618         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
5619         presence of frame pointer elimination.
5620
5621 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
5622         
5623         * mini-x86.h: NetBSD UCONTEX_REG defines.
5624
5625 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
5626
5627         * inssel-amd64.brg: Fix amd64 build.
5628
5629 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
5630
5631         * mini.h: remove extern to workaround what looks likes gcc bug 26905
5632         on amd64.
5633
5634 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
5635
5636         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
5637         ends.
5638
5639         * mini-<ARCH>.c: Use mono_is_regsize_var ().
5640
5641 2007-01-30 Mark Mason <mason@broadcom.com>
5642
5643            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
5644            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
5645            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
5646            beginning support for CEE_JMP [not quite working yet]
5647            * tramp-mips.c: LMF handling now works
5648         
5649 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
5650
5651         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
5652
5653         * mini.h (NULLIFY_INS): New macro.
5654
5655 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
5656
5657         * mini.c: statistical profiler fix for windows, patch
5658         from Tor Lillqvist (tml@novell.com).
5659
5660 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
5661         * local-propagation.c: Fix bug 80591.
5662
5663 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
5664
5665         * Makefile.am: put back the --export-dynamic option as with
5666         the previous gmodule flags (thanks to Robert Jordan).
5667
5668 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
5669
5670         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
5671
5672         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
5673         simplify and speed up the local register allocator. Also rename some fields
5674         like iassign->vassign.
5675         
5676         * regalloc.c: Remove some functions which are no longer used since their
5677         inlined version is in mini-codegen.c.
5678         
5679         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
5680
5681         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
5682
5683 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
5684
5685         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
5686         narrowing. Fixes #80622.
5687
5688         * iltests.il: Add new regresssion test. 
5689
5690 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
5691
5692         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
5693         debug-debugger.c, debug-debugger.h: warning fixes.
5694         * driver.c: updated copyright year and made it fit in one line.
5695
5696 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
5697
5698         * aot-runtime.c: updated to use mono-dl instead of gmodule.
5699
5700 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
5701
5702         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
5703
5704         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
5705
5706         * iltests.il: Add new test for bug #80507.
5707
5708 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
5709
5710         * mini-arm.h: use soft-float also on vfp for now.
5711
5712 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
5713
5714         * mini.c: fix some more soft-float issues.
5715
5716 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
5717
5718         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
5719
5720 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
5721         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
5722         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
5723         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
5724
5725 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
5726
5727         * mini-arm.c: typo fix.
5728
5729 2007-01-23  Neale Ferguson <neale@sinenomine.net>
5730
5731         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
5732
5733 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
5734
5735         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
5736         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
5737
5738         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
5739
5740         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
5741
5742         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
5743         
5744         * inssel.brg: Fix a warning.
5745
5746         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
5747
5748         * abcremoval.c ssa.c ssapre.c: Update after this change.
5749         
5750         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
5751
5752         * dominators.c (df_set): Use mono_bitset_union_fast.    
5753
5754 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
5755
5756         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
5757         mini-codegen.c: reduce relocations and memory usage for the cpu
5758         description.
5759
5760 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
5761
5762         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
5763
5764         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
5765         to reduce their size.
5766
5767 2007-01-19 Mark Mason <mason@broadcom.com>
5768
5769         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
5770         * mini-mips.c: more configuration macros, support long conditional branches, additional
5771         asserts, fix epilog instrumentation.
5772         * mini-mips.h: use standard stack walk
5773         * cpu-mips.md: increase size of div, rem and conditional branches
5774         
5775 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
5776
5777         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
5778         to cpu spec data.
5779
5780 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
5781
5782         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
5783         (compile_method): Ditto.
5784
5785         * aot-runtime.c (decode_klass_info): Ditto.
5786
5787         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
5788         needed by the code generated by inssel.brg. Also fix a warning.
5789
5790 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
5791
5792         * mini.c: deal with enums that become genericinsts by
5793         being nested in a generic class (bug #79956).
5794
5795 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
5796
5797         * mini.c: match the generic definition to check for
5798         private access with generic types (bug #78431).
5799
5800 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
5801
5802         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
5803         to make life easier for people cross-compiling that insist on not
5804         using scratchbox.
5805
5806 2007-01-17 Mark Mason <mason@broadcom.com>
5807
5808         * inssel-long.brg: patch to deal with mips missing flags
5809         * inssel-long32-mips.brg: implement overflow checks
5810         * insset-mips.brg: implement overflow checks
5811         * mini-mips.h: implement conditional exception handling
5812         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
5813           Remove unused code, minor cleanups.
5814         * exceptions-mips.c: minor cleanups
5815         * mini-ops.h: add mips conditional exception ops
5816         * cpu-mips.md: add mips conditional exception ops
5817
5818         
5819 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
5820
5821         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
5822         to deal with mips missing of flags.
5823
5824 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
5825
5826         * exceptions-ppc.c: execute fault handlers.
5827
5828 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
5829
5830         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
5831
5832 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
5833
5834         * mini.c: handle also floating point values in initialize_array.
5835
5836 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
5837
5838         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
5839         array initialization and make it conditional on the intrins option.
5840
5841 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
5842
5843         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
5844         relocations and put the patch info names close to the enum definition.
5845
5846 2007-01-15 Mark Mason <mason@broadcom.com>
5847
5848         * basic.cs, exceptions.cs: break up large tests to increase debugability.
5849
5850 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
5851
5852         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
5853
5854 2007-01-12  Raja R Harinath  <rharinath@novell.com>
5855
5856         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
5857
5858 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
5859
5860         * Makefile.am: distribute the mips sources.
5861
5862 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
5863
5864         * mini-codegen.h: handle bug #80489 here, by excluding ecx
5865         directly.
5866
5867 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
5868
5869         * cpu-x86.md: back out for now as this triggers other regressions.
5870
5871 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
5872
5873         * cpu-x86.md: force src1 and dest regpair for long shift instructions
5874         to eax:edx, so ecx can't get allocated to them (bug #80489).
5875
5876 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
5877
5878         * mini.c, mini-exceptions.c: enabled running fault handlers
5879         (bug #80469).
5880
5881 2007-01-03  Miguel de Icaza  <miguel@novell.com>
5882
5883         * driver.c: If nothing fail, do not use the string "failed",
5884         because it makes it very annoying to view test result logs on the
5885         web. 
5886
5887 2006-12-30  Miguel de Icaza  <miguel@novell.com>
5888
5889         * debug-debugger.c (mono_debugger_main): Rename "main" to
5890         "main_method" to prevent a warning.
5891
5892         Remove a warning for unused field.
5893
5894 2006-12-28  Martin Baulig  <martin@ximian.com>
5895
5896         * debug-debugger.c
5897         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
5898
5899 2006-12-22  Martin Baulig  <martin@ximian.com>
5900
5901         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
5902         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
5903         seperate `.mdb_debug_info' section, so we can access it from the
5904         debugger even if the binary is stripped.
5905
5906         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
5907         from the `.mdb_debug_info' here to prevent the linker from
5908         removing that section.
5909
5910         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
5911         mdb-debug-info64.s.
5912
5913 2006-12-19  Robert Jordan  <robertj@gmx.net>
5914
5915         * mini-x86: enable the code to return small structures in
5916         registers for FreeBSD as well. Fixes bug #80278.
5917         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
5918
5919 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
5920
5921         * mini-x86.c: align the stack when calling the profiler
5922         function instrumenting the prolog (on OSX).
5923
5924 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
5925
5926         * mini.c: emit a break opcode where Debugger.Break () is called.
5927
5928 2006-12-13  Miguel de Icaza  <miguel@novell.com>
5929
5930         * mini.c (mono_method_to_ir): Provide useful information on this
5931         assert, to prevent others from debugging like I did.
5932
5933 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
5934
5935         * mini.c: enable code which was incorrectly commented
5936         (bug #80235).
5937
5938 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
5939
5940         * mini-x86.c: enable on OSX, too, the code to return small
5941         structures in registers.
5942
5943 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
5944
5945         * mini-x86.c: remove the use of the dynamic code manager here, too.
5946
5947 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
5948
5949         * mini.h, debug-debugger.c, tramp-*.c: fixed 
5950         mono_debugger_create_notification_function() to use
5951         mono_global_codeman_reserve () instead of a dynamic code manager.
5952
5953 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
5954
5955         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
5956         ves_array_element_address() jit icall and use a generated
5957         managed method instead (which is about 4 times faster for a rank 3
5958         array access).
5959
5960 2006-11-29  Mark Mason  <mason@broadcom.com>
5961
5962         * basic-calls.cs: additional tests for passing
5963         structures as function arguments.
5964
5965 2006-11-29  Mark Mason  <mason@broadcom.com>
5966
5967         * mini-mips.h: disable custom exception handling
5968         * mini-mips.c: throw/rethrow should use jalr to call
5969         exception stubs.  Fixed bug with passing structures
5970         by value. More support for tracing floating point
5971         functions.
5972
5973 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
5974
5975         * mini.c: fixed typo in the soft-float ldind.r4 handling
5976         (bug #80086).
5977
5978 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
5979
5980         * mini.c, mini.h, driver.c: added --runtime command line
5981         option to select a different runtime than the autodetected one.
5982         * jit.h: added API for embedders to initialize with a specific
5983         runtime version.
5984
5985 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
5986
5987         * mini.c: handle also boxing of r4 values (bug #80024).
5988
5989 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
5990
5991         * mini-ppc.c: force indirect calls until we reserve
5992         enough address space for all the generated code.
5993
5994 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
5995
5996         * exceptions-arm.c: workaround bugs in the libc definition
5997         of struct ucontext.
5998
5999 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
6000
6001         * inssel.brg: fixes from me and Mark Mason.
6002
6003 2006-11-23  Dick Porter  <dick@ximian.com>
6004
6005         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
6006         semaphore display now we've fixed the initial value
6007
6008 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6009
6010         * inssel.brg: partially revert the last change to fix the build.
6011
6012 2006-11-21  Mark Mason  <mason@broadcom.com>
6013
6014         * inssel.brg: Add and use compare-and-branch macros to support
6015         architectures that do not have condition code registers (ie. MIPS).
6016         * *-mips.{c,brg,md}: Fix copyright statements
6017
6018 2006-11-20  Mark Mason  <mason@broadcom.com>
6019
6020         * Makefile.am: remove mini-codegen.c from list of MIPS sources
6021         * mini.c: Allow GET_CONTEXT to be specified by the arch port
6022         * mini.h: Added declaration for mono_print_ins()
6023         * mini-codegen.c: added ins_spec initializer for MIPS
6024         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
6025         vreg to be virtual and hreg to be non-virtual.
6026         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
6027         is not yet working/implemented correctly.
6028         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
6029         non-static, fixup calls to print_ins() from other parts in the file.
6030
6031 2006-11-20  Mark Mason  <mason@broadcom.com>
6032
6033         * basic-calls.cs: added tests for passing structures as arguments
6034         to calls.
6035
6036 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
6037
6038         * inssel-long32.brg: optimize signed division by power of two.
6039
6040 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
6041
6042         * mini-arm.c: added support for interworking with thumb code
6043         (mono must be still be built using the ARM instruction encoding).
6044
6045 2006-11-19  Miguel de Icaza  <miguel@novell.com>
6046
6047         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
6048         verifier has different rules for it.   Fixes a few verifier issues
6049         in the test suite.
6050
6051         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
6052         at the end, so people know what happened.
6053
6054 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
6055
6056         * brach-opts.c: in optimize_exception_target() make sure we
6057         are in a catch clause (fixes bug #79871).
6058
6059 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6060
6061         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
6062         more soft-float support fixes.
6063
6064 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
6065
6066         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
6067         that are passed half on the stack and half in registers.
6068
6069 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
6070
6071         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
6072         more mips integration work from Mark E Mason 
6073         <mark.e.mason@broadcom.com>.
6074
6075 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
6076
6077         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
6078         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
6079         tramp-mips.c: added sources for the mips port, not
6080         integrated in the build yet. Contributed by
6081         Mark E Mason <mark.e.mason@broadcom.com>.
6082
6083 2006-11-14  Neale Ferguson <neale@sinenomine.net>
6084
6085         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
6086
6087 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6088
6089         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
6090         put the soft-float rules in its own file since it seems to
6091         break s390 compilation.
6092
6093 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
6094
6095         * mini-arm.c: fixed wrnings.
6096
6097 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
6098
6099         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
6100         inssel-arm.brg: ARM support for soft-float.
6101
6102 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
6103
6104         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
6105         loads and stores of 32 bit fp values.
6106
6107 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
6108
6109         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
6110
6111         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
6112         works. Fixes #79852 and #79463.
6113
6114 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6115
6116         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
6117         more soft-float support WIP and fixes.
6118
6119 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
6120
6121         * mini-arm.c: some VFP updates.
6122
6123 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
6124
6125         * mini-exceptions.c: 0 is a valid local var offset in some
6126         architectures, don't assert (bug #78508).
6127
6128 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
6129
6130         * exceptions-arm.c: fixed off by one error in stack walk code.
6131
6132 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
6133
6134         * mini.h, mini.c: more precise tracking of type load exceptions.
6135
6136 2006-11-03  Robert Jordan  <robertj@gmx.net>
6137
6138         * Makefile.am: [WIN32] Add monow.exe target.
6139         * driver.c: [WIN32] Don't detach the console when debugging.
6140         Fixes bug #79797.
6141         
6142 2006-10-30  Miguel de Icaza  <miguel@novell.com>
6143
6144         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
6145
6146 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
6147
6148         * aot-compiler.c (emit_method_info): Add a case missed earlier.
6149
6150         * driver.c (mini_regression): Fix --regression with AOT.
6151
6152         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
6153
6154 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
6155
6156         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
6157
6158         * mini-sparc.h: Don't use sigaction on sparc/linux.
6159
6160         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
6161
6162         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
6163
6164         * mini-exceptions.c: Add proper include files for getpid ().
6165
6166 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
6167
6168         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
6169         address instead of a MonoJitInfo* to avoid decoding the exception info for the
6170         method.
6171
6172         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
6173         name cache to reduce its size.
6174
6175         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
6176
6177 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
6178
6179         * mini-x86.c: Save/restore the current LMF structure more efficiently using
6180         the mono_lmf TLS variable.
6181
6182         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
6183         trampoline lmf frames.  
6184
6185         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
6186
6187 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
6188
6189         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
6190         the mono_lmf TLS variable.
6191
6192         * mini-exceptions.c: Access the LMF structure through accessors.
6193
6194         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
6195         variable instead of in jit_tls->lmf.
6196
6197         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
6198         
6199         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
6200         trampoline lmf frames.
6201
6202         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
6203
6204 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
6205
6206        * mini.c trace.c mini-x86.c: Revert these too.
6207         
6208        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
6209        signature change.
6210
6211 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
6212
6213         * genmdesc.c: removed now dead code.
6214
6215 2006-10-09  Robert Jordan <robertj@gmx.net>
6216
6217         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
6218
6219 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
6220
6221         * mini.h: do not leave gaps in the opcode values.
6222
6223 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
6224
6225         * jit-icalls.h: flag functions as internal here, too.
6226
6227 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
6228
6229         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
6230         functions with the internal attribute.
6231
6232 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
6233
6234         * aot-compiler.c: fclose the file descriptor in the profile read loop.
6235
6236 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
6237
6238         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
6239         for soft-float.
6240
6241 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
6242
6243         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
6244         tail calls as on other platforms.
6245
6246         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
6247
6248         * iltests.il: Add a few tailcall tests.
6249
6250 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
6251
6252         * driver.c: fix loop for old compilers (bug #79521).
6253
6254 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
6255
6256         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
6257
6258         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
6259
6260         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
6261         metadata without any code.
6262
6263         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
6264         more precise debugging information using gdb.
6265
6266 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
6267
6268         * inssel-ia64.brg: Make the helper methods static.
6269
6270 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
6271
6272         * inssel-x86.brg: make the helper methods static.
6273
6274 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
6275
6276         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
6277
6278 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
6279
6280         * mini.c: updates for monoburg changes.
6281         * inssel.brg: make a few helper functions static as they should.
6282
6283 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
6284
6285         * Makefile.am: Move mini-codegen.c to common_sources.
6286
6287 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
6288
6289         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
6290         instructions.
6291         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
6292         mini-ppc.h: port to use the common local register allocator.
6293
6294 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
6295
6296         * mini.h: Remove the comment too then.
6297
6298 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
6299
6300         * mini.h: put back backend.data which is to be used shortly and
6301         doesn't increase the size of MonoInst. If any 64 bit arch aligned
6302         pointers on 4 byte boundaries it'd have much bigger issues running
6303         and you can ifdef it out anyway.
6304
6305 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
6306
6307         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
6308         MonoInst size by 4 bytes on 64 bit machines.
6309
6310 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
6311
6312         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
6313         replacement with more meaningful field names. Arch maintainers, please
6314         check the assigned names are good enough for your arch.
6315
6316 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
6317
6318         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
6319         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
6320
6321 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
6322
6323         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
6324         relocations and memory requirements, put the optimization flags
6325         definitions in their own file.
6326
6327 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
6328
6329         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
6330
6331         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
6332
6333 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
6334
6335         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
6336
6337 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
6338
6339         * inssel.brg: use the correct function to get the size of an item
6340         in an array, given an element class.
6341         * aot-compiler.c: do not access class->class_size directly.
6342
6343 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
6344
6345         * mini.h, debug-mini.c: added a debugging function to print
6346         info about local variables and arguments in a jitted method.
6347
6348 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
6349
6350         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
6351
6352         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
6353
6354 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
6355
6356         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
6357         inner and outer loops when passing vtypes.
6358
6359 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
6360
6361         * mini-ppc.c: take into account the cpu errata for cache flushing
6362         which caused some random errors (bug #79381).
6363
6364 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
6365
6366         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
6367         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
6368
6369 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
6370
6371         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
6372         loaded.
6373
6374         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
6375         freebsd ports tree.
6376
6377         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
6378         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
6379
6380         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
6381         displacement.
6382
6383 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
6384
6385         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
6386
6387 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
6388
6389         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
6390         macro does not have to be changed during debugging.
6391
6392         * 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>.
6393
6394         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
6395
6396         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
6397         
6398         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
6399         MONO_ARCH_NO_EMULATE_MUL is defined.
6400
6401         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
6402
6403         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
6404
6405         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
6406
6407         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
6408         
6409 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
6410
6411         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
6412         stuff to mini-exceptions.c where it is used.
6413
6414         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
6415         setup code, the real one is in mini-exceptions.c.
6416
6417         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
6418         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
6419         some changes from the freebsd ports tree.
6420
6421         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
6422         constants.
6423         
6424         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
6425
6426 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
6427
6428         * mini.c: on Linux, check for /proc to be mounted
6429         (bug# 79351, novell bug#201204).
6430
6431 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
6432
6433         * mini.c: handle cases where pthread_attr_getstack() behaves
6434         incorrectly (bug #78096).
6435
6436 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
6437
6438         * mini-arm.c: support larger stack frames (bug #79272).
6439
6440 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
6441
6442         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
6443
6444         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
6445         tokens.
6446
6447         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
6448         mono_class_from_name () to find a class from its name.
6449
6450         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
6451
6452 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
6453
6454         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
6455
6456 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
6457
6458         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
6459
6460 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
6461
6462         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
6463         callinfo->trampoline.
6464
6465         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
6466         fixes #79271.
6467         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
6468         future.
6469
6470 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
6471
6472         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
6473
6474 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
6475
6476         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
6477         stats.method_trampolines, it is already done by the generic trampoline code.
6478
6479         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
6480         
6481 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
6482
6483         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
6484
6485         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
6486
6487         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
6488
6489         * mini.c (print_jit_stats): Print mscorlib mempool size too.
6490         
6491         * mini.c (print_jit_stats): Print new stats.
6492
6493         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
6494
6495 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
6496
6497         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
6498         Address on two dimensional arrays. Fixes #78729.
6499
6500         * mini.h (MonoCompile): Add a 'skip_visibility' field.
6501
6502         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
6503         a method.
6504
6505         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
6506
6507         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
6508         #79130.
6509         
6510         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
6511         a race condition.
6512         (mini_get_ldelema_ins): Ditto.
6513
6514 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
6515
6516         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
6517         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
6518         Fixes #79213.
6519
6520 2006-08-29 Neale Ferguson <neale@sinenomine.net>
6521
6522         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
6523         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
6524
6525         * exceptions-s390x.c: Cosmetic change.
6526
6527         * tramp-s390.c: Fix warning.
6528
6529         * cpu-s390.md: Correct length of mul_imm.
6530
6531 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
6532
6533         * aot-compiler.c: added binary writer with ELF backend
6534         implementation (only on Linux/x86 for now).
6535
6536 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
6537
6538         * Makefile.am: Don't run net 2.0 AOT tests.
6539
6540         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
6541         (mono_compile_assembly): Skip net 2.0 assemblies as well.
6542
6543         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
6544
6545 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
6546
6547         * aot-compiler.c: simplified and refactored the asm-writing code
6548         to allow different backends.
6549
6550 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
6551
6552         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
6553
6554         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
6555         little. Share patches of type TYPE_FROM_HANDLE as well.
6556
6557         * mini.c (mono_patch_info_equal): New helper function.
6558         (mono_patch_info_hash): Ditto.
6559
6560         * aot-compiler.c (emit_method_code): Fix s390 build.
6561
6562         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
6563         is not handled because it is stored as a flag and not as a type ctor. Fixes
6564         #79016.
6565
6566 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
6567
6568         * aot-compiler.c: Fix computation of GOT slot statistics.
6569         
6570         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
6571         Also remove support for not PIC AOT.
6572
6573         * mini.h: Bump AOT file format version.
6574
6575         * objects.cs: Add a test for #78990.
6576
6577         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
6578         (peter.dettman@iinet.net.au). Fixes #79087.
6579
6580         * basic-long.cs: Add a test for the above.
6581
6582 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
6583
6584         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
6585         
6586         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
6587         code somewhat.
6588
6589 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
6590
6591         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
6592         exceptions.
6593
6594 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
6595
6596         * mini.c: Don't verify COM proxy invoke calls
6597         
6598
6599 2006-08-10  Dick Porter  <dick@ximian.com>
6600
6601         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
6602         which process is holding semaphores locked.
6603
6604 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
6605
6606         * mini-ia64.c mini-amd64.c: Fix #79027.
6607
6608         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
6609
6610         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
6611
6612         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
6613         implicit arguments in a vararg call. Fixes #79027.
6614
6615 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
6616
6617         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
6618         (mono_get_array_new_va_signature): Ditto.
6619
6620 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
6621
6622         * aot-runtime.c: Call init_plt lazily.
6623
6624         * inssel-long.brg: Fix unsigned long->int conversion.
6625
6626         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
6627
6628         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
6629         that most data is now in the .rss/.data section.
6630
6631 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
6632
6633         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
6634
6635         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
6636
6637         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
6638
6639         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
6640
6641         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
6642         virtual call. Fixes #79010.
6643
6644         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
6645         and use the result as the this argument in the real call.
6646
6647         * generics.2.cs: Add a new test for #79010.
6648         
6649 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
6650
6651         * mini-x86.c: Fix a warning.
6652
6653         * aot-compiler.c: Add a bunch of statistics.
6654
6655         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
6656
6657 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
6658
6659         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
6660
6661 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
6662
6663         * 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>.
6664
6665 2006-07-13  Miguel de Icaza  <miguel@novell.com>
6666
6667         * mini.c (mono_method_to_ir): Obtain the original method in the
6668         CIL stream and use this to perform validation.
6669
6670         Fixed: #78816
6671
6672 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
6673
6674         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
6675         (mono_arch_call_opcode): Ditto.
6676
6677         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
6678         #78826.
6679
6680         * mini.c (mono_patch_info_dup_mp): New helper function.
6681         
6682         * aot-compiler.c (compile_method): Fix some of the memory allocated during
6683         compilation. Fixes #78827.
6684
6685 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
6686
6687         * declsec.c: Use original security informations for
6688           MONO_WRAPPER_MANAGED_TO_MANAGED.
6689
6690 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
6691
6692         * mini.c: Allow Com Interop methods/classes and
6693         don't verify COM wrapper calls
6694         
6695
6696 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
6697
6698         * inssel-long32.brg: Fix long->i4 checked conversion.
6699
6700         * exceptions.cs: Add a test for the above.
6701
6702 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
6703
6704         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
6705
6706         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
6707         leaks.
6708
6709         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
6710         #78775.
6711
6712 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
6713
6714         * mini.c: Fix solaris/x86 exception handling.
6715
6716         * Makefile.am: Get rid of $(ICU_LIBS).
6717
6718 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
6719
6720         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
6721         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
6722         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
6723
6724         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
6725
6726         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
6727         this function causes a SIGSEGV.
6728
6729 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
6730
6731         * mini.c: Remove unused solaris/x86 includes.
6732
6733 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
6734
6735         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
6736
6737 2006-06-20  Jb Evain  <jbevain@gmail.com>
6738
6739         * cpu-g4.md: fix max length of start_handler instruction.
6740
6741 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
6742         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
6743
6744 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
6745         * ssa.c: Fixed bug 78653 for SSA based deadce.
6746         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
6747         MonoInst.flags, used in SSA based deadce.
6748         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
6749         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
6750
6751 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
6752
6753         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
6754         it can end up using non executable memory on ppc64 systems
6755         running ppc32 userspace (fix from Johannes Berg).
6756
6757 2006-06-14  Dick Porter  <dick@ximian.com>
6758
6759         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
6760         4.1.1
6761
6762 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
6763         * mini.c: Made so that inline is locally disabled if it would
6764         trigger a .cctor, because too many apps depend on this behavior
6765         (which seems to be also the one of the MS CLR).
6766
6767 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
6768
6769         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
6770         No idea why this worked before.
6771
6772         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
6773         which branch to outer exception clauses since they could skip the
6774         inner finally clauses. Fixes #78633.
6775
6776         * exceptions.cs: Add a test for the above.
6777
6778         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
6779         Fixes #78629.
6780
6781         * iltests.il: Add a test for the above.
6782
6783 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
6784
6785         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
6786         after the end of a try bblock, to prevent asserts in mini_method_compile ().
6787
6788         * iltests.il: Add a test for the above.
6789
6790 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
6791
6792         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
6793         
6794         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
6795         methods as instrinsics.
6796
6797 2006-06-09  Wade Berrier <wberrier@novell.com>
6798
6799         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
6800         (simple-cee-ops.h ssapre-mini-ops.h)
6801
6802 2006-06-09  Neale Ferguson <neale@sinenomine.net>
6803
6804         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
6805         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
6806         instruction).
6807         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
6808         * cpu-s390x.md: Fix max. length values for a couple of instructions.
6809
6810 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
6811
6812         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
6813
6814 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
6815
6816         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
6817         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
6818         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
6819         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
6820         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
6821         of opcodes, so that bug 78549 should not happen again.
6822         * ssapre.c: Updated to use the renamed files.
6823
6824 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
6825
6826         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
6827         in OP_ATOMIC_EXCHANGE_I4.
6828
6829 2006-06-07  Wade Berrier <wberrier@novell.com>
6830
6831         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
6832         in mono_debugger_create_notification_function)
6833
6834 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
6835
6836         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
6837         
6838         * mini.c (type_from_stack_type): Disable some changes which do not
6839         seem to work.
6840
6841         * driver.c: Reenable opts.
6842
6843         * mini.h (MonoStackSlot): New structure to keep track of the verification state
6844         of the evaluation stack.
6845         
6846         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
6847         evaluation stack trace at entry to the bblock.
6848
6849         * mini.c (merge_stacks): New function to perform verification of stack merges.
6850         Turned off by default.
6851
6852         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
6853         STACK_MP.
6854         
6855 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
6856
6857         * local-propagation.c: Fixed bug 78549.
6858
6859 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
6860
6861         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
6862
6863 2006-06-02  Miguel de Icaza  <miguel@novell.com>
6864
6865         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
6866         tramp-arm.c, tramp-ia64.c
6867         (mono_debugger_create_notification_function): Update signature to
6868         new signature and use new protocol for creating the notification
6869         function.  
6870
6871         Should fix the build.
6872
6873 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
6874
6875         * exceptions-ppc.c (mono_jit_walk_stack)
6876         (ves_icall_get_frame_info): Fix the build
6877
6878 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
6879
6880         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
6881
6882 2006-05-31  Raja R Harinath  <rharinath@novell.com>
6883
6884         * il2tests.2.il: New file for generics CIL tests.  Add test for
6885         #78019.
6886         * Makefile.am: Update.
6887
6888         Fix #78019
6889         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
6890         to nullable types.
6891
6892 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
6893
6894         * aliasing.c: Fixed bug 78311.
6895
6896 2006-05-29  Martin Baulig  <martin@ximian.com>
6897
6898         * mini-exceptions.c (mono_find_jit_info): When computing the
6899         native offset, check whether we're actually inside the method's
6900         code; call mono_debug_print_stack_frame() to format the frame.
6901         (ves_icall_System_Exception_get_trace): Call
6902         mono_debug_print_stack_frame() to format the stack frame.
6903         (ves_icall_get_trace): Update to the new debugging API.
6904         (mono_jit_walk_stack_from_ctx): Likewise.
6905         (ves_icall_get_frame_info): Likewise.
6906
6907         * mini.c (get_method_from_ip): Use the new debugging API.
6908         (mono_print_method_from_ip): Likewise.
6909
6910         * exceptions-ppc.c
6911         (mono_jit_walk_stack): Use the new debugging API.
6912         (ves_icall_get_frame_info): Likewise.   
6913
6914 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
6915
6916         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
6917
6918 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
6919
6920         * mini.c: Added "limitator" to inline for debugging.
6921
6922 2006-05-24  Martin Baulig  <martin@ximian.com>
6923
6924         * debug-debugger.c (mono_debugger_init): Create a private,
6925         malloc()-based code manager for the notification function and
6926         intentionally leak it on exit.  This fixes the crash-on-exit race
6927         condition.
6928
6929         * tramp-amd64.c
6930         (mono_debugger_create_notification_function): Added
6931         `MonoCodeManager *' argument.
6932
6933         * tramp-x86.c
6934         (mono_debugger_create_notification_function): Added
6935         `MonoCodeManager *' argument.
6936
6937 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
6938
6939         * aliasing.c: Fixed 64 bit issue.
6940         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
6941         default since all known bugs are fixed (one more time!).
6942
6943 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
6944
6945         * mini.c: write barrier support.
6946
6947 2006-05-23  Martin Baulig  <martin@ximian.com>
6948
6949         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
6950         check at the top of the file.
6951
6952 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
6953
6954         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
6955         reverting changes without reason and without changelog entries.
6956
6957 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
6958
6959         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
6960         to a few opcodes. Fixes #78439.
6961
6962         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
6963         consistency with other archs.
6964
6965         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
6966
6967 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
6968
6969         * debug-debugger.c: fix the build.
6970
6971 2006-05-17  Martin Baulig  <martin@ximian.com>
6972
6973         * debug-debugger.c
6974         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
6975         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
6976         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
6977         (debugger_attach): Call GC_mono_debugger_add_all_threads().
6978
6979 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
6980
6981         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
6982
6983 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
6984
6985         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
6986         MONO_TYPE_GENERICINST.
6987         
6988         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
6989         MONO_TYPE_GENERICINST.
6990
6991 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
6992
6993         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
6994         #78325.
6995
6996 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
6997
6998         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
6999         mempool.
7000         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
7001
7002 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
7003
7004         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
7005         mono_trace_cleanup ().
7006
7007         * iltests.il: Fix problem with the newly added test.
7008
7009         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
7010         due to register constraints, free up the previous hreg. Fixes #78314.
7011
7012         * iltests.il: Add new test for #78314.  
7013
7014         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
7015         Interlocked.Add. Fixes #78312.
7016
7017         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
7018         
7019 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
7020
7021         * inssel.brg (mini_emit_virtual_call): Fix a warning.
7022
7023 2006-05-05  Martin Baulig  <martin@ximian.com>
7024
7025         * debug-mini.c (mono_debug_open_block): New method.
7026
7027         * mini-amd64.c
7028         (mono_arch_output_basic_block): Call mono_debug_open_block() at
7029         the beginning of each basic block.
7030
7031         * mini-x86.c
7032         (mono_arch_output_basic_block): Call mono_debug_open_block() at
7033         the beginning of each basic block.
7034
7035 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
7036
7037         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
7038         default until I understand why they break the build on amd64.
7039
7040 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
7041
7042         * mini.c (mini_cleanup): Call mono_cleanup ().
7043
7044         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
7045         errors.
7046
7047 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
7048
7049         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
7050         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
7051         default since all known bugs are fixed, and I cannot reproduce bug
7052         77944... I'm asking Matt Hargett to test again after this commit.
7053
7054 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
7055
7056         * mini-codegen.c: Fixed typo that thrashed inline.
7057
7058 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
7059
7060         * dominators.c (compute_dominators): Avoid using a worklist since
7061         it is not correct in some cases. Instead, iterate over all bblocks as
7062         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
7063
7064 2006-04-28  Miguel de Icaza  <miguel@novell.com>
7065
7066         * mini.c (mono_jit_compile_method_inner): Use
7067         mono_prepare_exception_from_error that resets the value
7068         internally.
7069
7070 2006-04-27  Miguel de Icaza  <miguel@novell.com>
7071
7072         * mini.c: Move the mini_loader_error_to_exception to metadata. 
7073         
7074 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
7075
7076         * aliasing.c: Fixed bug 78210.
7077
7078 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
7079
7080         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
7081         default until all their problems (or the ones they trigger) are fixed.
7082
7083 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
7084
7085         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
7086         
7087         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
7088         as loaded only after resolving patches since that could invoke the same method.
7089
7090         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
7091
7092         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
7093         functions.
7094
7095         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
7096         AOT loader.
7097
7098         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
7099         stack.
7100
7101         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
7102         made from AOT code through the PLT table.
7103
7104         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
7105         holding the plt offset when a call is made to the aot plt trampoline.
7106         
7107 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
7108
7109         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
7110         amd64 AOT support.
7111
7112         * Makefile.am (common_sources): Fix build breakage.
7113
7114         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
7115         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
7116         intra-assembly calls if possible.
7117         
7118         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
7119
7120         * mini-trampolines.c: Handle PLT entries.
7121
7122         * mini.c: Avoid creating a GOT var for calls.
7123
7124         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
7125         from mscorlib code.
7126
7127         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
7128         from mscorlib code.
7129
7130         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
7131         AOT code.       
7132
7133         * mini.h: Bump AOT file format version.
7134         
7135         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
7136         covers more cases.
7137
7138 2006-04-25  Martin Baulig  <martin@ximian.com>
7139
7140         * driver.c: Disable copyprop, consprop and inline when running
7141         inside the debugger.
7142
7143 2006-04-25  Martin Baulig  <martin@ximian.com>
7144
7145         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
7146         with `get_current_thread' and added `detach'.
7147         (MonoDebuggerMetadataInfo): Added `thread_size',
7148         `thread_tid_offset', `thread_stack_ptr_offset' and
7149         `thread_end_stack_offset'.
7150
7151 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
7152
7153         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
7154         aot-runtime.c.
7155
7156         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
7157         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
7158
7159         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
7160
7161         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
7162
7163         * aot.c: Add support for ADJUSTED_IID.  
7164
7165 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
7166
7167         * aot.c (emit_method_order): Don't align method_order_end.
7168
7169         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
7170         the interface ID changes.
7171
7172 2006-04-21  Dick Porter  <dick@ximian.com>
7173
7174         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
7175         cleaning up a thread.  Fixes the new part of bug 77470.
7176
7177 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
7178
7179         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
7180         to managed wrapper.
7181                      
7182 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
7183
7184         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
7185         
7186         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
7187         SIGSEGV. Fixes #78072.
7188
7189         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
7190         unregister our SIGABRT handler.
7191
7192 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
7193
7194         * mini.c: Disabled inline where it can alter the call stack in a
7195         way visible from managed code.
7196         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
7197         default.
7198
7199 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
7200
7201         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
7202         on other platforms. Fixes #78089.
7203
7204 2006-04-13  Martin Baulig  <martin@ximian.com>
7205
7206         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
7207         determine whether we're inside the debugger.
7208
7209         * debug-debugger.h
7210         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
7211
7212 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
7213
7214         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
7215         handler clauses. Fixes #78024.
7216
7217         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
7218         in the CALL_MEMBASE opcodes. Fixes #78088.
7219         (mono_arch_get_vcall_slot_addr): Ditto.
7220
7221 2006-04-10  Martin Baulig  <martin@ximian.com>
7222
7223         * debug-debugger.c: The thread handling code has now been moved
7224         into ../metadata/threads.c.
7225
7226 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
7227
7228         * driver.c (mono_main): Fix --with-gc=none build.
7229
7230         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
7231         (mono_spillvar_offset_float): Ditto.
7232         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
7233         hreg, not when its !global, since on ia64, there is a third category: stacked
7234         registers.      
7235
7236 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
7237
7238         * mini.c: set MonoInst->klass for load field address and a few other
7239         places.
7240
7241 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
7242
7243         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
7244
7245 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
7246
7247         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
7248         the branch opt changes.
7249
7250 2006-04-06  Dick Porter  <dick@ximian.com>
7251
7252         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
7253         
7254         * wapihandles.c (mini_wapi_seminfo): 
7255         * driver.c (mono_main): Add semaphore info option
7256
7257 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
7258
7259         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
7260         branch optimization changes. Fixes #78009.
7261
7262 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
7263
7264         * mini.c: ignore accessibility of methods in managed->native wrappers.
7265
7266 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
7267
7268         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
7269         
7270         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
7271
7272 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
7273
7274         * mini.c: Modify the branch optimizations to preserve the invariant that
7275         the entries inside the in_bb and out_bb arrays are unique.
7276         (mono_unlink_bblock): Avoid creation of new arrays.
7277
7278 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
7279
7280         * mini.c (mono_unlink_bblock): Fix regression caused by previous
7281         change (#77992).
7282
7283 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
7284
7285         * mini.c (optimize_branches): Remove the "optimizations" in
7286         the cbranch1/cbranch2 -> branch cases which were causing several
7287         problems in the past. Fixes #77986.
7288
7289 2006-03-31  Chris Toshok  <toshok@ximian.com>
7290
7291         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
7292         default optimizations :(
7293
7294 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
7295
7296         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
7297         branch.
7298
7299 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
7300
7301         * local-propagation.c: Added comments to structs and removed
7302         "Mono" prefixes from local tree mover types.
7303
7304 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
7305
7306         * Makefile.am (arch_sources): Define this for each architecture so 
7307         libmono_la_SOURCES is defined in one place.
7308
7309 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
7310
7311         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
7312         from handles/.
7313
7314 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
7315
7316         * driver.c: print the GC name supplied by configure.
7317
7318 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
7319
7320         * local-propagation.c: Added tree mover, and moved here all the
7321         local propagation code from mini.c
7322         * mini.c: Added support for treeprop, and moved all the local
7323         propagation code to local-propagation.c
7324         * mini.h: Added support for treeprop
7325         * driver.c: Added support for treeprop, enabled consprop, copyprop,
7326         treeprop, inline and deadce by default
7327         * Makefile.am: Added local-propagation.c
7328
7329 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
7330
7331         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
7332
7333 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
7334
7335         * debug-debugger.c: make it compile without the Boehm GC.
7336
7337 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
7338
7339         * mini.c: fixed issue with mismatch when an icall is registered
7340         with multiple names but same address.
7341
7342 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
7343
7344         * declsec.c, mini-exceptions.c: use write barrier to set reference
7345         fields of managed objects.
7346
7347 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
7348
7349         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
7350         (can_access_internals): Fix a warning.
7351
7352         * mini.c (print_method_from_ip): Rename this to 
7353         mono_print_method_from_ip so it gets exported.
7354
7355         * trace.c: Deal with strings inside StringBuilder's containing garbage
7356         and fix memory leaks. Fixes #77848.
7357
7358 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
7359
7360         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
7361         fixes #77787.
7362
7363 2006-03-16 Neale Ferguson <neale@sinenomine.net>
7364         
7365         * mini-s390.c: Remove OP_X86_TEST_NULL.
7366
7367 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
7368
7369         * mini.c: use the correct GetHashCode() for the moving collector.
7370
7371 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
7372
7373         * liveness.c: Regalloc spill cost tuning.
7374
7375 2006-03-15 Neale Ferguson <neale@sinenomine.net>
7376         
7377         * mini-s390x.h: Correct S390_LONG macro.
7378
7379         * mini-s390x.c: Cleanup unused code.
7380
7381 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
7382
7383         * jit-icalls.h: New file.
7384
7385         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
7386         icalls and include that instead of including jit-icalls.c.
7387
7388         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
7389         OP_X86 opcodes.
7390
7391 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
7392
7393         * mini.c: when checking for member accessibility, also check for
7394         friend assemblies and for explicit interface implementations.
7395
7396 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
7397
7398         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
7399
7400         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
7401
7402         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
7403         common cases are done first.    
7404
7405         * mini-ops.h: Only define platform specific opcodes on the given platform.
7406
7407         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
7408         branch.
7409         
7410 2006-03-14  Martin Baulig  <martin@ximian.com>
7411
7412         Revert Paolo's change from r57348:
7413
7414         * mini.h: don't use gboolean for bitfields.
7415         * mini.c: verifier changes for fields and methods accessibility.
7416
7417 2006-03-13  Neale Ferguson <neale@sinenomine.net>
7418
7419         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
7420
7421         * mini-s390x.c: Fix conv_r_un.
7422
7423         * cpu-s390, cpu-s390x.md: Fix lengths.
7424
7425 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
7426
7427         * mini.c: nested types have access to all the nesting
7428         levels, not just the enclosing types.
7429
7430 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
7431
7432         * mini.c: added a few more verification checks.
7433
7434 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
7435
7436         * liveness.c: Merge optimizations from the linear-il branch.
7437
7438 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
7439
7440         * mini-ia64.c (emit_call): Add a comment.
7441
7442         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
7443
7444         * tramp-ia64.c: Fix some warnings.
7445
7446 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
7447
7448         * mini.h: don't use gboolean for bitfields.
7449         * mini.c: verifier changes for fields and methods accessibility.
7450
7451 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
7452
7453         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
7454         lazy icall wrapper changes.
7455
7456         * dominators.c: Replace all the dominator algorithms with faster
7457         ones from the linear-il branch.
7458
7459         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
7460         the mempool.
7461
7462         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
7463         common cases are done first.
7464
7465         * mini-amd64.c: Fix some warnings.
7466
7467         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
7468         from the mempool.
7469
7470         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
7471         added code.
7472
7473         * mini.h: Add a missing prototype.
7474
7475 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
7476
7477         * mini.c: Compile icall wrappers lazily.
7478
7479         * mini-codegen.c: Use printf instead of g_print since its much faster.
7480
7481         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
7482         function.
7483
7484         * mini.c (optimize_branches): Cache the negative result from 
7485         remove_block_if_useless ().
7486
7487         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
7488         Also fix some bblock linking issues.
7489
7490         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
7491         assembly files.
7492
7493         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
7494
7495         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
7496         accessed fields first, for better cache behavior.
7497         
7498 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
7499
7500         * mini.c: speedup IList<T> array accesses.
7501
7502 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
7503
7504         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
7505         inline_costs counter. Fixes #77190.
7506
7507 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
7508
7509         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
7510         trace messages. Fixes #77706.
7511
7512 2006-03-04  Martin Baulig  <martin@ximian.com>
7513
7514         * tramp-amd64.c, tramp-x86.c
7515         (mono_debugger_create_notification_function): Use
7516         mono_global_codeman_reserve() to allocate a buffer at runtime and
7517         return it.
7518
7519         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
7520
7521         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
7522         notification function at runtime and then call `initialize' in the
7523         `MONO_DEBUGGER__debugger_info' vtable.
7524
7525 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
7526
7527         * iltests.il: Fix a visibility problem.
7528
7529 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
7530
7531         * driver.c, mini.c: add hooks for the counters API.
7532
7533 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
7534
7535         * driver.c: show disabled options.
7536
7537 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
7538
7539         * linear-scan.c: always use cost-driven selection.
7540
7541 2006-02-28  Raja R Harinath  <rharinath@novell.com>
7542
7543         * jit-icalls.c (helper_compile_generic_method): Revert change from
7544         2006-02-24.
7545
7546 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
7547
7548         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
7549
7550 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
7551
7552         * inssel.brg: style fixes, mostly to force the updated monoburg
7553         to run for people using svn.
7554
7555 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
7556
7557         * mini.c: match monoburg changes.
7558
7559 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
7560
7561         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
7562         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
7563         declaration in the header file.
7564
7565 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
7566
7567         * helpers.c: reduce relocations and mem usage.
7568
7569 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
7570
7571         * mini.h, mini-codegen.c: disable logging features if
7572         requested by configure.
7573
7574 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
7575
7576         * mini.c: tiny verifier changes.
7577
7578 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
7579
7580         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
7581         cpu-pentium.md: stack alignment changes for osx/x86,
7582         partially from Geoff Norton <gnorton@customerdna.com>.
7583
7584 2006-02-24  Raja R Harinath  <harinath@gmail.com>
7585
7586         * jit-icalls.c (helper_compile_generic_method): Update to changes
7587         in metadata/class.c.
7588
7589 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
7590         
7591         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
7592         
7593         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
7594         interface calls with large offsets.
7595
7596 2006-02-23  Raja R Harinath  <rharinath@novell.com>
7597
7598         * jit-icalls.c (helper_compile_generic_method): Document the
7599         special-case we depend on so that we can inflate the method twice
7600         with the same context with no bad side-effects.
7601
7602 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
7603
7604         * mini-x86.c, mini-amd64.c: fix for case when xen support
7605         is disabled.
7606
7607 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
7608
7609         * mini-x86.c, mini-amd64.c: generate code to access tls items
7610         in a faster way for Xen systems.
7611
7612 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
7613
7614         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
7615         updates and compilation fixes for the OSX/x86 port, mostly from
7616         Geoff Norton <gnorton@customerdna.com>.
7617
7618 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
7619
7620         * inssel.brg: faster interface call implementation
7621         to sync with the interface_offsets MonoVTable changes.
7622
7623 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
7624
7625         * mini.c: more verification checks.
7626
7627 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
7628
7629         * mini.c: added a few more verification checks.
7630
7631 2006-02-17      Neale Ferguson <neale@sinenomine.net>
7632
7633         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
7634         facility on the processor and use it if available.
7635
7636 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
7637
7638         * driver.c, aot.c, mini.c: throw exception if the IL code is
7639         invalid or unverifiable.
7640
7641 2006-02-17  Raja R Harinath  <rharinath@novell.com>
7642
7643         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
7644         m.StructField.
7645
7646 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
7647
7648         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
7649
7650 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
7651
7652         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
7653         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
7654         handling of instantiated generic valuetypes.
7655
7656 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
7657
7658         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
7659         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
7660         instead.
7661
7662         * generics.2.cs: Revert the nullable reftypes tests.
7663
7664 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
7665
7666         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
7667         using __builtin_frame_address (1) as it doesn't work in the presence
7668         of optimizations. Hopefully fixes #77273.
7669
7670         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
7671         -> generics.cs change as it doesn't work with some automake versions.
7672
7673 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
7674
7675         * mini.c: handle systems that sue a different way to
7676         retrieve the stack address of the current thread.
7677
7678 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
7679
7680         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
7681         it specially in the makefile.
7682
7683         * generics.2.cs: Add tests for nullable reference types.
7684
7685 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
7686
7687         * mini.c: always handle the case when mono_jit_init()
7688         is called in a thread different from the main thread,
7689         confusing libgc (bug #77309).
7690
7691 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
7692
7693         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
7694
7695 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
7696
7697         * mini.c: change optimize_branches () to use a single loop
7698         and introduce a new optimization to simplify some range checks.
7699
7700 2006-02-03  Martin Baulig  <martin@ximian.com>
7701
7702         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
7703         and merged with debugger_thread_manager_add_thread().
7704         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
7705         inform the debugger about the main thread.
7706
7707 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
7708
7709         * basic.cs: Add test for div.un/rem.un constant folding.
7710
7711 2006-02-03  Neale Ferguson <neale@sinenomine.net>
7712
7713         * cpu-s390x.md: correct int_xor_imm length
7714
7715 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
7716
7717         * generics.2.cs: New test for #77442.
7718
7719         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
7720         #77442.
7721
7722 2006-02-02  Martin Baulig  <martin@ximian.com>
7723
7724         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
7725         <mono/metadata/mono-debug-debugger.h>   
7726
7727         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
7728
7729 2006-02-02  Martin Baulig  <martin@ximian.com>
7730
7731         * debug-debugger.h: New header file for debug-debugger.c.
7732
7733         * debug-debugger.c: Big API cleanup; don't run the managed Main()
7734         function is a separate thread anymore; add support for attaching.
7735
7736 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
7737
7738         * tramp-x86.c: Fix a warning.
7739
7740 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
7741
7742         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
7743         on very large methods.
7744
7745         * aot.c (load_patch_info): Fix a warning.
7746
7747 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
7748
7749         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
7750         mini-ops.h: alu membase optimizations.
7751
7752 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
7753
7754         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
7755         to speedup StringBuilder.
7756
7757 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
7758
7759         * dominators.c (mono_compute_natural_loops): Fix detection of
7760         loop body start blocks.
7761
7762         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
7763
7764 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
7765
7766         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
7767         #75145.
7768
7769 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
7770
7771         * aliasing.c: Fixed aliasing issue on 64 bit archs.
7772
7773 2006-01-25  Martin Baulig  <martin@ximian.com>
7774
7775         * debug-debugger.c: Moved the `MonoDebuggerManager' and
7776         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
7777         started to cleanup this file a little bit.
7778
7779 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
7780
7781         * mini.c: optimize a codepath frequently happening in generics code.
7782
7783 2006-01-23  Martin Baulig  <martin@ximian.com>
7784
7785         * Makefile.am: Only compile debug-debugger.c on supported platforms.
7786
7787         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
7788         functions directly.
7789
7790         * driver.c: debug-debugger.c is only available if
7791         `MONO_DEBUGGER_SUPPORTED' is defined.   
7792
7793 2006-01-23  Martin Baulig  <martin@ximian.com>
7794
7795         * debug-debugger.c: Only enable this on platforms where the Mono
7796         Debugger is working (x86 and x86_64).
7797
7798 2006-01-21  Martin Baulig  <martin@ximian.com>
7799
7800         The Mono Debugger is now using the normal `mono' instead of the
7801         `mono-debugger-mini-wrapper' when executing managed code.
7802
7803         * debug-debugger.c: New file; previously known as
7804         debugger/wrapper/wrapper.c.
7805
7806         * debug-mini.c (mono_init_debugger): Removed.
7807
7808         * driver.c (mono_main): Added new `--inside-mdb' command line
7809         argument which is used when running inside the debugger.
7810
7811 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
7812
7813         * liveness.c (mono_analyze_liveness): Remove some unused data
7814         structures.
7815
7816 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
7817
7818         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
7819
7820 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
7821
7822         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
7823         depends on implementation details of monobitset.
7824
7825         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
7826         Fixes #77271.
7827
7828 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
7829
7830         * liveness.c: Update after monobitset changes.
7831
7832 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
7833
7834         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
7835
7836 2006-01-11 Neale Ferguson <neale@sinenomine.net>
7837
7838         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
7839
7840         * mini-s390x.c: Remove warning messages.
7841
7842 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
7843
7844         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
7845
7846 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
7847
7848         * generics.2.cs: Add ldelem/stelem_any test.
7849
7850 2006-01-10 Neale Ferguson <neale@sinenomine.net>
7851
7852         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
7853
7854 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
7855
7856         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
7857         
7858 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
7859
7860         * generics.2.cs: Reenable vtype tests.
7861
7862         * inssel-x86.brg: Remove an icorrect valuetype rule.
7863
7864 2006-01-06 Neale Ferguson <neale@sinenomine.net>
7865
7866         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
7867         initial support for OP_ABS.
7868
7869 2006-01-05 Neale Ferguson <neale@sinenomine.net>
7870
7871         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
7872
7873 2006-01-05 Neale Ferguson <neale@sinenomine.net>
7874
7875         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
7876         conversion and implement LADD/LSUB.
7877
7878         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
7879         architectures.
7880
7881 2006-01-05 Neale Ferguson <neale@sinenomine.net>
7882
7883         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
7884
7885         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
7886         architectures.
7887
7888 2006-01-05 Neale Ferguson <neale@sinenomine.net>
7889
7890         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
7891         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
7892         (stack walk problem).
7893
7894 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
7895
7896         * aot.c (mono_aot_load_method): Fix a warning.
7897
7898 2006-01-03  Neale Ferguson <neale@sinenomine.net>
7899
7900         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
7901
7902 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
7903
7904         * iltests.il: Add test for #77148.
7905
7906         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
7907         #77148.
7908
7909 2006-01-03  Neale Ferguson <neale@sinenomine.net>
7910
7911         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
7912
7913 2006-01-03  Neale Ferguson <neale@sinenomine.net>
7914
7915         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
7916         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
7917
7918         * basic-long.cs: Add lconv-to-r4/r8 tests.
7919
7920 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
7921
7922         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
7923
7924         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
7925         here as on other archs.
7926
7927 2005-12-29 Neale Ferguson <neale@sinenomine.net>
7928
7929         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
7930
7931 2005-12-29 Neale Ferguson <neale@sinenomine.net>
7932
7933         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
7934         
7935         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
7936
7937         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
7938         instrument_prolog; Add memory_barrier instruction.
7939
7940 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
7941
7942         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
7943
7944 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
7945
7946         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
7947
7948         * aliasing.c inssel.brg: Fix warnings.
7949
7950         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
7951         could skip initialization of some parts of memory.
7952
7953         * mini.c mini-ia64.c: Fix warnings.
7954
7955         * inssel-sparc.brg: Add an implementation of lneg which actually works.
7956
7957 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
7958
7959         * aliasing.c (mono_build_aliasing_information): Add a workaround for
7960         a crash seen on sparc.
7961
7962         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
7963         
7964         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
7965
7966 2005-12-21 Neale Ferguson <neale@sinenomine.net>
7967
7968         * mini-ops.h: Add s390_backchain instruction
7969
7970         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
7971
7972         * cpu-s390.md: Add s390_backchain instruction
7973
7974         * mini-s390.c: Significant ABI changes
7975
7976         * mini-s390.h: Cater for zero length structures
7977
7978 2005-12-20 Neale Ferguson <neale@sinenomine.net>
7979
7980         * mini-s390.c: ABI fixes
7981
7982         * inssel-s390.brg: Remove debug statements
7983
7984         * cpu-s390.md: Fix length of ATOMIC_xx operations
7985
7986 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
7987
7988         * basic-float.cs: Add float<->long conversion tests.
7989
7990 2005-12-16 Neale Ferguson <neale@sinenomine.net>
7991
7992         * mini-s390.c: Fix LOCALLOC processing.
7993
7994         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
7995
7996 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
7997
7998         * iltests.il: Add tests for some opcodes not covered by the other
7999         tests.
8000
8001 2005-12-15 Neale Ferguson <neale@sinenomine.net>
8002
8003         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
8004         register loading for Tail processing; Correct trace output.
8005
8006         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
8007
8008         * cpu-s390.md: Correct size of jmp instruction. 
8009
8010 2005-12-13 Neale Ferguson <neale@sinenomine.net>
8011
8012         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
8013
8014 2005-12-13 Neale Ferguson <neale@sinenomine.net>
8015
8016         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
8017           Bring s390 up to current level.
8018
8019 2005-12-12  Zltan Varga  <vargaz@gmail.com>
8020
8021         * generics.2.cs: Disable the newly added tests as they do not work yet.
8022         
8023         * generics.2.cs: Add valuetype tests.
8024
8025 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
8026
8027         * basic-long.cs: Add i4->u8 test.
8028
8029         * objects.cs: Add tests for JIT intrinsic.
8030
8031         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
8032         optimizations lost by a mistake.
8033
8034 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
8035
8036         * basic-long.cs: Remove a test moved to objects.cs.
8037
8038         * arrays.cs: Add more array tests.
8039
8040 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
8041
8042         * arrays.cs: Add new tests for multi-dimensional arrays.
8043
8044 2005-12-06  Raja R Harinath  <rharinath@novell.com>
8045
8046         * Makefile.am (test_sources2): Add generics.2.cs.
8047         (EXTRA_DIST): Add test_sources2.
8048
8049 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
8050
8051         Support for boxing and unboxing nullable types as well as the
8052         isinst operation on nullables, per the CLI ammendment.
8053
8054         * inssel.brg (CEE_ISINST): Special case for nullable
8055
8056         * mini.c (handle_unbox_nullable): new method
8057         (handle_box): Special case for nullable types
8058         (mono_method_to_ir): Call handle_unbox_nullable in correct
8059         places.
8060
8061         * generics.2.cs: New test suite
8062
8063         * Makefile.am: Support for regression tests with generics.
8064
8065 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
8066
8067         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
8068         allocated to registers. Fixes #76800.
8069
8070 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
8071
8072         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
8073
8074 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
8075
8076         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
8077         of platforms.
8078
8079 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
8080
8081         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
8082         objects.cs.
8083
8084         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
8085         
8086         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
8087 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
8088
8089         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
8090         single precision before storing to a single precision location.
8091
8092 2005-11-28  Raja R Harinath  <rharinath@novell.com>
8093
8094         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
8095
8096 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
8097
8098         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
8099         correct files.
8100
8101         * basic.cs: Remove test_0_byte_compares test which was moved to
8102         objects.cs a long time ago.
8103
8104 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
8105
8106         * aliasing.c: Fixed aliasing issue on 64 bit archs.
8107
8108 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
8109
8110         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
8111         handlers are called.
8112
8113         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
8114         throwing code.
8115
8116          * mini-ia64.c: Add support for the throw->branch exception 
8117         optimization.   
8118
8119         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
8120
8121 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
8122
8123         * mini.c: Enabled "fastpath" deadce :-)
8124         
8125 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
8126
8127         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
8128         alias analysis pass to support it.
8129         * mini.h: Likewise.
8130         * ssa.c: Likewise.
8131         * liveness.c: Likewise (liveness computation can use aliasing
8132         information to be more accurate).
8133         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
8134         moreover made so that "--compile-all" uses the given optimization
8135         flags and not the default ones.
8136         * aliasing.c: Alias analysis (new file).
8137         * aliasing.h: Likewise.
8138         * Makefile.am: added "aliasing.c" and "aliasing.h".
8139         
8140 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
8141
8142         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
8143         OP_L opcodes.
8144
8145 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
8146
8147         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
8148         fp >= end_of_stack exit condition, as it is not needed, and it might
8149         become true for fp eliminated frames.
8150
8151 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
8152
8153         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
8154         coded offsets.
8155
8156 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
8157
8158         * mini-arm.c: fixed alignment of doubles/longs to match
8159         the C ABI (bug #76635).
8160
8161 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
8162
8163         * aot.c: fix compilation with --enable-minimal=aot.
8164
8165 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
8166
8167         * mini-arm.c: fixed compatibility with the new
8168         floating point emulator package for compares.
8169
8170 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
8171
8172         * mini.c : reverted sig->pinvoke changes (r51396-51397).
8173
8174 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
8175
8176         * mini-exceptions.c (print_stack_frame): Output to stderr.
8177         (mono_handle_native_sigsegv): Ditto.
8178
8179 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
8180
8181         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
8182         OP_LCONV_TO_OVF_I implementation.
8183
8184         * mini-amd64.c: Add support for the throw->branch exception 
8185         optimization.
8186
8187         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
8188         when the catch clause catches a more general exception, i.e. Object.
8189
8190 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
8191
8192         * cpu-ia64.md: Remove unused opcodes.
8193
8194         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
8195         specific defines for architectures defining USE_SIGACTION.
8196
8197         * mini-ia64.c: Fix some warnings.
8198
8199         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
8200         version seemed to skip a frame.
8201
8202 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
8203
8204         * mini.c: Clean up the usage of sig->pinvoke flag. Now
8205         only calls which are made to native code use this flag.
8206
8207 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
8208
8209         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
8210         varargs methods as well.
8211         
8212         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
8213         which have save_lmf set. Reorganize methods prologs a bit.
8214
8215         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
8216         debugger to the proper place.
8217
8218 2005-10-29  Martin Baulig  <martin@ximian.com>
8219
8220         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
8221         when running inside the debugger until the debugger has support
8222         for it.
8223
8224 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
8225
8226         * mini.h: Fix a warning.
8227
8228 2005-10-24  Miguel de Icaza  <miguel@novell.com>
8229
8230         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
8231         we expose publicly, this returns the string.
8232
8233 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
8234
8235         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
8236         with fp elimination.
8237
8238 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
8239
8240         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
8241         native stacktrace using the glibc 'backtrace' function if available.
8242
8243 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
8244
8245         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
8246
8247         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
8248         handle SIGSEGVs received while in native code.
8249
8250         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
8251         code, call mono_handle_native_sigsegv which will abort the runtime
8252         after printing some diagnostics, instead of converting it into a
8253         confusing NullReferenceException.
8254
8255 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
8256
8257         * cpu-pentium.md: Remove unused opcodes.
8258
8259 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
8260
8261         * mini-amd64.h (MonoLMF): Add rsp field.
8262
8263         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
8264         the lmf too.
8265
8266 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
8267
8268         * mini-codegen.c (get_register_spilling): Fix some warnings.
8269
8270 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
8271
8272         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
8273         elimination during exception handling. Enable fp elimination by
8274         default.
8275
8276         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
8277         elimination.
8278
8279 2005-10-16  Martin Baulig  <martin@ximian.com>
8280
8281         * mini-exceptions.c
8282         (mono_debugger_run_finally): New public method for the debugger.
8283
8284 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
8285
8286         * debug-mini.c (mono_debug_init_method): Fix warning.
8287
8288         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
8289         the 'exname' parameter const to fix some warnings.
8290
8291 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
8292
8293         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
8294         introduced by the previous patch.
8295
8296 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
8297
8298         * basic-float.cs: Add test for precision of float arithmetic.
8299
8300         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
8301         when loading/storing single values from/to memory.
8302
8303         * mini.c (mono_jit_compile_method_with_opt): Create the function
8304         pointers in the correct domain.
8305
8306 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
8307
8308         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
8309         introduced by previous patch.
8310         
8311         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
8312         when out_filter_idx is NULL.
8313
8314         * mini-exceptions.c: Don't run filter clauses twice during exception
8315         handling. Fixes #75755.
8316
8317 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
8318
8319         * aot.c: Add support for ldflda wrappers.
8320
8321         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
8322         #75902.
8323
8324 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
8325
8326         * mini.c, mini.h: do not consider exception handlers blocks when
8327         setting up interface variables.
8328
8329 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
8330
8331         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
8332
8333 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
8334
8335         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
8336         causes a regression.
8337
8338         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
8339
8340 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
8341
8342         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
8343         of the OP_P definitions.
8344
8345         * TODO: Add a proposal for dealing with the CEE/OP mess.
8346
8347         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
8348         optimizations from the x86 port.
8349
8350         * cpu-amd64.md: Ditto.
8351
8352         * basic.cs basic-long.cs: Add tests.
8353
8354 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
8355
8356         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
8357         Patrik Torstensson's implementation of my exception-handling
8358         optimization idea, when the exception object is not used
8359         (bug #62150).
8360
8361 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
8362
8363         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
8364         of the mul_imm optimizations from the old jit.
8365
8366 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
8367
8368         * mini.c, liveness.c: patch by Patrik Torstensson and
8369         Zoltan Varga to improve performance in methods with
8370         exception clauses.
8371
8372 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
8373
8374         * driver.c: Remove 'Globalization' entry from --version.
8375
8376 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
8377
8378         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
8379         there is a profiler interested in JIT events.
8380
8381         * aot.c: Load profile files produced by the AOT profiling module, and
8382         reorder methods based on the profiling info. Add a 'method_order' table
8383         to the AOT file to make mono_aot_find_jit_info work with the reordered
8384         methods.
8385
8386         * mini.h: Bump AOT file version info.
8387
8388 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
8389
8390         * mini-arm.h: work around what looks like a gcc bug when optimizations
8391         are enabled.
8392
8393 2005-09-28  Raja R Harinath  <rharinath@novell.com>
8394
8395         * Makefile.am (AM_CFLAGS): Don't use += to append inside
8396         conditionals.  Use ...
8397         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
8398
8399 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
8400
8401         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
8402         to determine the amount of memory to copy when passing valuetypes.
8403
8404         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
8405         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
8406
8407 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
8408
8409         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
8410         information about aot.
8411
8412 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
8413
8414         * *.c: Replace the use of {Enter,Leave}CriticalSection with
8415         macros. This will allow a deadlock debugger to easily be plugged
8416         in.
8417
8418 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
8419
8420         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
8421
8422 2005-09-27  Raja R Harinath  <rharinath@novell.com>
8423
8424         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
8425         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
8426         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
8427         ($(arch_built)) [CROSS_COMPILING]: Error out.
8428
8429 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
8430
8431         * aot.c: Add support for the no_special_static flag for classes.
8432
8433 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
8434
8435         * Reapply reverted patches.
8436
8437         * *: Revert r50174 as well.
8438
8439         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
8440
8441 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
8442
8443         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
8444
8445 2005-09-23  Miguel de Icaza  <miguel@novell.com>
8446
8447         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
8448         part of the SIG_HANDLER_SIGNATURE.  
8449
8450 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
8451
8452         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
8453         statistics.
8454
8455         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
8456         introduced by previous patch.
8457
8458 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
8459
8460         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
8461         saved registers too.
8462
8463         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
8464         upon the information returned by get_call_info ().
8465         
8466         * mini-x86.c (add_float): Fix stack size calculation.
8467         (mono_arch_call_opcode): Rewrite this so it works based up the
8468         information returned by get_call_info ().
8469         (mono_arch_get_this_vret_args): Ditto.
8470
8471 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
8472
8473         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
8474         in cinfo to determine the registers which need to be used.
8475
8476 2005-09-20  Miguel de Icaza  <miguel@novell.com>
8477
8478         * driver.c (mono_main): Add --server and --desktop flags. 
8479
8480 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
8481
8482         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
8483         registers as global registers.
8484
8485         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
8486         longer needed with the new register allocator.
8487
8488         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
8489
8490         * cpu-ia64.md: Remove unused opcodes.
8491         
8492         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
8493         
8494 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
8495
8496         * cpu-amd64.md: Remove unused opcodes.
8497
8498         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
8499         needed with the new register allocator.
8500
8501         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
8502         reg-reg moves.
8503
8504 2005-09-16  Raja R Harinath  <rharinath@novell.com>
8505
8506         * Makefile.am (check-local): Don't invoke semdel-wrapper.
8507
8508 2005-09-16  Martin Baulig  <martin@ximian.com>
8509
8510         * exceptions-amd64.c
8511         (throw_exception): Don't call mono_debugger_throw_exception() if
8512         we're a rethrow - see the FIXME in the code.
8513
8514 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
8515
8516         * mini.c (mono_init_exceptions): This only works on some architectures.
8517         
8518 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
8519
8520         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
8521         on ia64.
8522
8523         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
8524
8525         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
8526         now in mini-exceptions.c.
8527
8528 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
8529
8530         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
8531         now in mini-exceptions.c.
8532
8533 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
8534
8535         * exceptions-x86.c: Applied patch from Patrik Torstensson 
8536         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
8537
8538         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
8539         code into mini-exceptions.c. Add some assertions to it.
8540
8541 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
8542
8543         * aot.c (emit_section_change): Applied patch from "The Software Team" 
8544         (<software@solmersa.com>). Fix as errors on windows.
8545
8546 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
8547
8548         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
8549         method info into the LMF.
8550
8551 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
8552         
8553         * mini-ia64.c: Add proper unwind info for method epilogs.
8554
8555         * exceptions-ia64.c: Add some code to help debugging.
8556         
8557         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
8558
8559         * mini-exceptions.c: Fix warning.
8560
8561 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
8562
8563         * mini.c: Really fix build.
8564
8565         * mini-x86.c mini-amd64.c: Fix build.
8566
8567 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
8568
8569         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
8570
8571         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
8572         some Interlocked methods as intrinsics.
8573
8574         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
8575         for Thread methods as well.
8576
8577         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
8578
8579         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
8580
8581         * mini-ia64.c mini-x86.c mini-amd64.c 
8582         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
8583         OP_MEMORY_BARRIER.
8584         
8585         * mini.c (mono_init_exceptions): Fix build breakage.
8586
8587 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
8588
8589         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
8590         of instructions. Use the new ia64_unw_op macros for emitting unwind
8591         info.
8592
8593         * mini.c (mono_init_exceptions): Initialize exception handling
8594         related trampolines at startup.
8595
8596 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
8597
8598         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
8599
8600 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
8601
8602         * mini.c: Handle type loading errors gracefully during compilation and
8603         throw the appropriate exception.
8604
8605 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
8606
8607         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
8608         for the mono binary.
8609
8610 2005-09-09  Martin Baulig  <martin@ximian.com>
8611
8612         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
8613         the release.
8614
8615 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
8616
8617         * mini-arm.h: use emulation for conv.r.un for the release.
8618
8619 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
8620
8621         * mini-arm.c, objects.cs: more fixes and tests for them.
8622
8623 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
8624
8625         * mini-arm.c: align structures to at least 4 bytes to be able
8626         to keep our current optimized memcpy.
8627
8628 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
8629
8630         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
8631
8632 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8633
8634         * mini.c: ignore SIGPIPE.
8635
8636 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
8637
8638         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
8639
8640         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
8641
8642 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
8643
8644         * mini.h: Add prototype for mono_allocate_stack_slots_full.
8645
8646 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
8647
8648         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
8649         exception handling support.
8650         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
8651         patch by Brian Koropoff <briank@marakicorp.com>).
8652
8653 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
8654
8655         * mini.c: revert another 'optimization' which breaks when
8656         items on the eval stack need to be saved at a basic block end
8657         (bug #75940).
8658
8659 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
8660
8661         * jit-icalls.c: for arrays, ensure we always provide
8662         lower bounds.
8663
8664 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
8665
8666         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
8667         
8668         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
8669
8670 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
8671
8672         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
8673         arguments in their original register.
8674
8675 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
8676
8677         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
8678         memset/memcpy.
8679
8680         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
8681         when ssapre is enabled.
8682
8683         * inssel-long.brg: Fix bug in previous patch.
8684
8685         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
8686         multiplication by a constant.
8687
8688 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
8689
8690         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
8691         icc.
8692
8693         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
8694         saving registers.
8695
8696 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
8697
8698         * inssel-arm.brg: apply changes tested by Brian Koropoff
8699         <briank@marakicorp.com>.
8700
8701 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
8702
8703         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
8704         
8705 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
8706
8707         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
8708         to the same register if dreg is just a base register.
8709         (print_ins): Improve printing of membase opcodes.
8710
8711         * inssel-x86.brg: Add optimized ldind(reg) rules.
8712
8713         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
8714
8715 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
8716
8717         * mini.c: when running under valgrind, set the stack bottom for
8718         the GC at the actual approximate stack for the app (fixes running
8719         mono with valgrind).
8720
8721 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
8722
8723         * mini.c: do no break at the first valuetype to init found
8724         (fixes bug #75791).
8725
8726 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
8727
8728         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
8729
8730 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
8731
8732         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
8733
8734 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
8735
8736         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
8737
8738 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
8739
8740         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
8741
8742         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
8743         code.
8744
8745         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
8746         code.
8747
8748         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
8749         methods.
8750
8751 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
8752
8753         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
8754
8755 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
8756
8757         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
8758         in the tail recursion optimization.
8759
8760         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
8761         debug info into the assembly file.
8762
8763         * iltests.il: Add test for filter regions.
8764
8765         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
8766         initial stack of filter regions. Fixes #75755.
8767
8768 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
8769
8770         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
8771         stack requirements.
8772
8773 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
8774
8775         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
8776         the check for an already compiled method on non-ia64 platforms.
8777         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
8778         proper domain.
8779
8780         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
8781
8782         * inssel-x86.brg: Add some optimized call rules.
8783
8784 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
8785
8786         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
8787         method here.
8788
8789         * mini.h mini-trampolines.c: Pass the trampoline argument to 
8790         mono_arch_patch_delegate_trampoline.
8791
8792         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
8793
8794         * mini-trampolines.c: Fix build.
8795
8796         * mini-amd64.h: Add delegate trampolines.
8797
8798         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
8799
8800         * inssel-amd64.brg: Add optimized call rules.
8801         
8802         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
8803
8804         * inssel-ia64.brg: Add optimized ldind(reg) rules.
8805
8806 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
8807
8808         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
8809         change.
8810
8811         * mini-ia64.c: Remove LMF fixmes.
8812
8813         * mini-ia64.h: Remove most fields from LMF.
8814
8815         * inssel-ia64.brg (stmt): Fix unaligned access errors.
8816
8817         * mini-trampolines.c: Add support for IA64 function descriptors.
8818
8819         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
8820         for IA64 function descriptors.
8821
8822 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
8823
8824         * tramp-arm.c: patch the vtable for virtual calls. Added
8825         support code to register/unregister the LMF.
8826         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
8827         more LMF work.
8828
8829 2005-08-19  Dick Porter  <dick@ximian.com>
8830
8831         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
8832         bit value if needed.
8833
8834 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
8835
8836         * mini.c (mini_get_method): Move handling of wrapper data here.
8837
8838         * mini.c (mono_method_to_ir): Add support for dynamic methods.
8839
8840         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
8841         virtual.
8842
8843         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
8844         bblock->code does not remain empty.
8845
8846 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
8847
8848         * arrays.cs: Add regression test for #75832.
8849
8850         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
8851         rules. Fixes #75832.
8852
8853         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
8854         instruction scheduling.
8855
8856 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
8857
8858         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
8859
8860 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
8861
8862         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
8863
8864         * mini-codegen.c: Fix VC build.
8865
8866         * cpu-pentium.md: Increase length of atomic_exhange_i4.
8867
8868 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8869
8870         * mini.h: fix signature for mono_register_opcode_emulation.
8871
8872 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
8873
8874         * mini.c: Get rid of most of the helper_sig_... constants using
8875         mono_create_icall_signature ().
8876
8877 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
8878
8879         * jit-icalls.c (helper_ldstr): New helper function.
8880
8881         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
8882
8883         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
8884         throw, load the string using a helper call instead of creating a string object.
8885
8886         * aot.c: Update after LDSTR changes.
8887
8888         * mini.h: Bump AOT file version.
8889         
8890         * aot.c: Save class size info into the AOT file. Print more statistics during
8891         compilation.
8892
8893         * mini.h: Bump AOT file version.
8894
8895         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
8896         ordering of disasm cases. Fixes #74957.
8897
8898 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
8899
8900         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
8901         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
8902         the generic code needed for the ARM port.
8903
8904 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
8905
8906         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
8907         inssel-arm.brg: more ARM features and fixes.
8908
8909 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
8910
8911         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
8912         ARM port work in progress.
8913
8914 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
8915
8916         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
8917
8918         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
8919
8920         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
8921
8922         * inssel.brg (mini_emit_memset): Add support for unaligned access.
8923
8924         * *-ia64.*: Ongoing IA64 work.
8925         
8926         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
8927
8928 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
8929
8930         * TODO: Remove out-of-data todo stuff.
8931
8932         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
8933         dead code.
8934
8935         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
8936
8937         * mini.h: Bump corlib version.
8938
8939 2005-07-27  Martin Baulig  <martin@ximian.com>
8940
8941         * mini-codegen.c
8942         (create_copy_ins): Added `const unsigned char *ip' argument; set
8943         `copy->cil_code' from it.
8944
8945 2005-07-27  Martin Baulig  <martin@ximian.com>
8946
8947         * mini-exceptions.c (mono_handle_exception): Don't call
8948         mono_debugger_handle_exception() for filters.
8949
8950 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
8951
8952         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
8953         as well.
8954
8955 2005-07-26  Martin Baulig  <martin@ximian.com>
8956
8957         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
8958
8959         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
8960         helper_compile_generic_method() if the method is actually virtual
8961         and non-final.
8962
8963 2005-07-26  Martin Baulig  <martin@ximian.com>
8964
8965         * mini.c
8966         (trampoline_code): Renamed to `mono_trampoline_code' and made it
8967         public; this is now accessed directly by the debugger.
8968         (mono_generic_trampoline_code): Removed.
8969
8970         * debug-mini.c
8971         (mono_debug_init_method): Also add interncalls and wrappers.
8972
8973 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
8974
8975         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
8976
8977 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
8978
8979         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
8980
8981 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
8982
8983         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
8984
8985 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
8986
8987         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
8988         getting TLS offsets on AMD64 too.
8989
8990 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
8991
8992         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
8993
8994 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
8995
8996         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
8997         inssel-arm.brg, mini-arm.h: ARM port work in progress.
8998
8999 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
9000
9001         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
9002
9003         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
9004         to mini.c.
9005
9006         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
9007         mono_sparc_is_virtual_call ().
9008         
9009         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
9010
9011         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
9012         trampoline parameters.
9013
9014         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
9015         
9016         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
9017         to mono_arch_get_vcall_slot_addr.
9018
9019         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
9020         trampoline code.
9021
9022         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
9023
9024 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
9025
9026         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
9027
9028 2005-07-19  Martin Baulig  <martin@ximian.com>
9029
9030         * exceptions-amd64.c (throw_exception): Call
9031         mono_debugger_throw_exception() here like we're doing it on i386.
9032
9033 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
9034
9035         * mini-ia64.c: Add optimized TLS access support.
9036
9037 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
9038
9039         * mini-exceptions.c: Ongoing IA64 work.
9040
9041         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
9042
9043         * mini.c: Use the default optimization set when embedding. Fixes
9044         #75194.
9045
9046 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
9047
9048         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
9049         of trampolines to a separate file.
9050
9051         * mini-trampolines.c: New file.
9052
9053         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
9054         separate file.
9055         
9056         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
9057         amd64/ia64 code.
9058
9059         * mini-codegen.c: Fix cygwin build.
9060
9061 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
9062
9063         * mini.c: Add some minor changes needed by the IA64 port.
9064
9065         * *-ia64.*: Ongoing IA64 work.
9066
9067 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
9068
9069         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
9070         trampolines into arch-independent and arch-dependent parts.
9071
9072         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
9073
9074 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
9075
9076         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
9077
9078         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
9079         the xp-regalloc-branch for amd64.
9080
9081         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
9082         xp-regalloc-branch for x86.
9083
9084 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
9085
9086         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
9087
9088 2005-07-06  Martin Baulig  <martin@ximian.com>
9089
9090         * mini.c
9091         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
9092         (mono_jit_runtime_invoke): Likewise.
9093
9094 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
9095
9096         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
9097         on x86 too.
9098         
9099         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
9100         without loading their metadata. Reorganize the file format so exception handling+
9101         debug info is kept separate from normal method info. Create MonoJitInfo 
9102         structures for methods lazily.
9103
9104         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
9105         loading metadata.
9106         (x86_class_init_trampoline): Patch AOT class init trampolines too.
9107
9108         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
9109
9110         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
9111         in AOT code.
9112
9113         * mini.h: Bump AOT file version.
9114
9115 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
9116
9117         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
9118
9119 2005-07-01  Raja R Harinath  <rharinath@novell.com>
9120
9121         * Makefile.am (check-local): Call semdel-wrapper.
9122
9123 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
9124
9125         * mini-x86.c: Revert the last change as it seems to break the build..
9126
9127 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
9128
9129         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
9130         
9131         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
9132
9133 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
9134
9135         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
9136         outside of the macro, so strange stuff doesn't happen with gcc4
9137         (NEW_AOTCONST_TOKEN): Likewise.
9138
9139 2005-06-28  Martin Baulig  <martin@ximian.com>
9140
9141         * mini.c (mini_class_is_system_array): New static method; use this
9142         instead of `klass->parent == mono_defaults.array_class' everywhere
9143         since this also works for the new generic array class.
9144
9145 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
9146
9147         * inssel.brg: Remove warnings.
9148
9149 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
9150
9151         * mini-ia64.c: Ongoing IA64 work.
9152
9153         * basic-float.cs: Add float->i1 conversion test.
9154
9155         * iltests.il: Add conv.u4 test.
9156
9157 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
9158
9159         * inssel-long.brg: Fix bug caused by last change.
9160
9161 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
9162
9163         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
9164         BSDs.  Allows the x86 JIT to work on OSX86
9165
9166 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
9167
9168         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
9169         u4->i8 conversion.
9170
9171         * mini-ia64.c: Ongoing IA64 work.
9172
9173 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
9174
9175         * mini-ia64.c: Ongoing IA64 work.
9176
9177         * driver.c: Clean up jit_code_hash as well when using --regression.
9178
9179         * inssel-long.brg: Fix long->i4/u4 conversion rules.
9180
9181         * basic-long.cs: Add tests for long->u4 conversion.
9182
9183 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
9184
9185         * mini.c: Take mono_get_domainvar out of macros. This makes sure
9186         that we do not depend on undefined C behavior: the order stuff
9187         gets evaluated within an expression. Fixes mono when compiled on
9188         GCC 4.
9189
9190 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
9191
9192         * *-ia64.*: Ongoing IA64 work.
9193
9194         * aot.c: Lower memory usage while loading AOT methods.
9195
9196         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
9197
9198         * mini.h: Bump AOT file format version.
9199
9200 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
9201
9202         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
9203
9204 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
9205
9206         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
9207         not on callee assembly). Fixed some comments.
9208
9209 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
9210
9211         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
9212         it gets proper disassembly.
9213         (emit_method_info): Remove some dead code.
9214
9215         * mini.c (mini_method_compile): Allways allocate the GOT var in
9216         mono_method_to_ir for emulating opcodes.
9217
9218 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
9219
9220         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
9221         before freeing the code memory. Fixes #74990.
9222
9223         * objects.cs: Add regression test for #74992.
9224
9225         * liveness.c: Extend live ranges of arguments to the beginning of the
9226         method. Fixes #74992.
9227
9228         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
9229         so it points into the faulting instruction.
9230
9231 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
9232
9233         * jit-icalls.c (mono_imul_ovf): Add exception handling.
9234
9235         * *-ia64.*: Ongoing IA64 work.
9236
9237         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
9238
9239 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
9240
9241         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
9242
9243         * *-ia64.*: Ongoing IA64 work.
9244
9245 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
9246
9247         * basic-long.cs: Add tests for add/sub.ovf.
9248
9249         * basic.cs: Add tests for sub.ovf.
9250
9251         * *-ia64.*: Ongoing IA64 work.
9252
9253 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
9254
9255         * *-ia64.*: Ongoing IA64 work.
9256
9257         * basic.cs: Add conv.ovf.i4.un test.
9258
9259 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
9260
9261         * mini.c: (remove_block_if_useless) Fixed bug 75061.
9262         
9263 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9264
9265         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
9266
9267 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
9268
9269         * *-ia64.*: Ongoing IA64 work.
9270
9271 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9272
9273         * trace.[ch]:
9274         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
9275
9276 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
9277
9278         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
9279
9280 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
9281
9282         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
9283
9284         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
9285         of a call is callable by a near call.
9286
9287 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
9288
9289         * mini-ia64.c: Ongoing IA64 work.
9290
9291 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
9292
9293         * genmdesc.c: Make the generated array non-static.
9294
9295         * inssel-long.brg: Fix LSHR_IMM rule.
9296
9297         * *-ia64.*: Ongoing IA64 work.
9298
9299         * *-ia64.*: Ongoing IA64 work.
9300
9301 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
9302
9303         * *-ia64.*: Ongoing IA64 work.
9304
9305         * *-ia64.*: Ongoing IA64 work.
9306         
9307         * mini-ia64.c: Ongoing IA64 work.
9308
9309         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
9310
9311 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
9312
9313         * objects.cs basic-calls.cs: Move some tests to objects.cs.
9314         
9315         * objects.cs basic-long.cs: Move some tests to objects.cs.
9316
9317 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
9318
9319         * *-ia64.*: Ongoing IA64 work.
9320
9321         * iltests.il: Add a new test.
9322
9323         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
9324         newobj. Fixes #75042.
9325
9326 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
9327
9328         * *-ia64.*: Ongoing IA64 work.
9329         
9330         * *-ia64.*: Ongoing IA64 work.
9331         
9332         * *-ia64.*: Ongoing IA64 work.
9333
9334         * basic.cs objects.cs: Move tests accessing static variables as well.
9335
9336         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
9337
9338 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
9339
9340         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
9341
9342         * driver.c: Always print failed tests.
9343
9344         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
9345         frame pointer.
9346
9347         * *ia64*: Ongoing IA64 work.
9348
9349 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
9350
9351         * basic.cs: Add tests for add.ovf. Fix warnings.
9352
9353 2005-05-18  Miguel de Icaza  <miguel@novell.com>
9354
9355         * driver.c (mono_main): Avoid crash if no argument is passed to
9356         --break;  Do not use g_error, but f_printf.   And fix all other
9357         ocurrences of the same crash.
9358
9359 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
9360
9361         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
9362         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
9363         Fixes #74742.
9364
9365 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
9366
9367         * *-ia64.*: Add beginnings of IA64 backend.
9368
9369         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
9370
9371 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
9372
9373         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
9374         Fixes #74925.
9375
9376         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
9377
9378         * mini-amd64.c: Fix a warning.
9379
9380 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
9381
9382         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
9383         in float_neg. Fixes #74897.
9384
9385         * mini-amd64.c (emit_call): Fix another near call bug.
9386
9387 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
9388
9389         * declsec.c: Keep the appdomain information in the structure. Added a 
9390         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
9391         value gets overwritten).
9392         * declsec.h: Set the default MonoArray for the the stack to 6. Added
9393         an MonoAppDomain member to MonoSecurityFrame.
9394         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
9395         used in the stack walk. Now use a MonoArray which grow (double) when
9396         it gets full.
9397
9398 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
9399
9400         * mini.c: Re-enabled runtime cleanup, since running threads should
9401         now properly stop when exiting.
9402
9403 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
9404
9405         * mini-codegen.c: New file contaning the arch-independent local
9406         register allocator. Not used by any architectures yet.
9407
9408         * mini.h linear-scan.c: Merge some changes from the 
9409         mini-xp-local-regalloc branch.
9410
9411 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
9412
9413         * mini-amd64.c (emit_call): Fix calls to native functions when the
9414         runtime is compiled as a shared library. Fixes #74756.
9415
9416         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
9417         on a literal field. Fixes #74751.
9418
9419 2005-04-25  Raja R Harinath  <rharinath@novell.com>
9420
9421         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
9422
9423 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
9424
9425         * objects.cs: Add missing null casting test.
9426
9427 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
9428
9429         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
9430         in wrapper methods. Also rename 'address' variable to 'offset'.
9431
9432 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
9433
9434         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
9435         warnings.
9436         
9437         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
9438
9439         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
9440         work on windows.
9441
9442 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
9443
9444         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
9445
9446 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
9447
9448         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
9449         just the last bytes.
9450
9451 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
9452
9453         * aot.c (mono_compile_assembly): Fix warning.
9454
9455         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
9456         by the _MSC_VER stuff.
9457
9458 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
9459
9460         * inssel-long.brg: Fix #74588.
9461
9462         * cpu-amd64.md: Fix #74591.
9463
9464         * iltests.il: Add new regression tests.
9465
9466 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
9467
9468         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
9469         valuetype.
9470
9471 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
9472
9473         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
9474
9475         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
9476         from Bill Middleton <flashdict@gmail.com>.
9477
9478 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
9479
9480         * arrays.cs: Add new regression test. Fix warnings.
9481
9482 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
9483
9484         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
9485         and leakage in CKFINITE.
9486
9487         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
9488         this to a null op since it is called on amd64 too.
9489
9490         * exceptions-amd64.c (get_throw_trampoline): Align stack.
9491
9492         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
9493         body since this is not used on amd64.
9494         
9495         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
9496
9497         * mini-amd64.c: Remove obsolete fixmes.
9498
9499         * mini.c (print_method_from_ip): Fix debugging support.
9500
9501 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
9502
9503         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
9504         so that expressions that don't give much gain are not reduced.
9505         * ssapre.h: Likewise.
9506
9507 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
9508
9509         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
9510
9511         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
9512
9513         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
9514
9515 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
9516
9517         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
9518
9519         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
9520
9521 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
9522
9523         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
9524         stack touching.
9525
9526         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
9527
9528         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
9529
9530         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
9531
9532         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
9533         MONO_ARCH_USE_SIGACTION. Fixes #74252.
9534
9535         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
9536
9537         * mini-x86.c: Fix up stack overflow handling.   
9538
9539         * exceptions.cs: Add new regression test.
9540
9541 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
9542
9543         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
9544         mono_jit_thread_attach.
9545
9546         * mini.c (mono_method_to_ir): Verify called method is not abstract.
9547
9548 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
9549
9550         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
9551         avoid calling constructors using callvirt.
9552
9553         * inssel.brg: Fix #74073.
9554
9555 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
9556
9557         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
9558         compilation with non-GCC compilers.
9559         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
9560         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
9561
9562 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
9563
9564         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
9565         klass->interface_offsets (will likely fix bug#74073).
9566
9567 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
9568
9569         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
9570
9571 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
9572
9573         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
9574         to amd64_div_reg_size ().
9575         
9576         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
9577
9578 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
9579
9580         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
9581
9582 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
9583
9584         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
9585
9586 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
9587
9588         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
9589         
9590         * mini.c (mono_precompile_assembly): Load and precompile referenced
9591         assemblies as well. Fixes #74015.
9592
9593 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
9594
9595         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
9596
9597 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
9598
9599         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
9600         a lot of checks and (anyway) permissions cannot work until corlib is 
9601         loaded.
9602
9603 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
9604
9605         * mini-ppc.c: fixed ABI issue on sysv/ppc.
9606
9607 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
9608
9609         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
9610         calls (fixes bug#72824).
9611
9612 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
9613
9614         * mini.c: fix tail recursion elimination (see test in bug#73936).
9615
9616 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
9617
9618         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
9619         some fp functions in sse2 mode.
9620
9621 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
9622
9623         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
9624
9625 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
9626
9627         * mini.h mini.c: Add mono_get_jit_tls_key ().
9628
9629         * mini-x86.c: Enable fast TLS support on windows.
9630
9631 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
9632
9633         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
9634         * mini.c: Check for p/invoke method when generating code. If a
9635         p/invoke method, or it's class, isn't decorated with [Suppress
9636         UnmanagedCodeSecurity] then generate code to call System.Security.
9637         UnmanagedDemand (only if the security manager is active).
9638
9639 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
9640
9641         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
9642         last change as it seems to cause strange crashes.
9643         
9644 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
9645
9646         * *.c: handle unsafe function pointers where needed.
9647
9648 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
9649
9650         * mini.c (mono_jit_free_method): Remove the fixme too.
9651
9652 2005-03-15  Miguel de Icaza  <miguel@novell.com>
9653
9654         * mini.c: As discussed, make the code actually free the delegate
9655         thunk now, to enable the debugging of delegate problems, use
9656         MONO_DEBUG=1 when running Mono. 
9657
9658         This takes also care of parts of the leaks as seen by Joe.
9659
9660 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
9661
9662         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
9663         thread_tls_offset calculation.
9664
9665 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
9666
9667         * declsec.c: Reworked linkdemand checks for icall. The previous code
9668         was using the declaration code (untrusted) and didn't work as expected
9669         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
9670         specific case.
9671
9672 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
9673
9674         * iltests.il: Add new localloc test.
9675
9676         * mini-amd64.c: Handle large stack allocations the same way as on
9677         windows if stack overflow handling is working.
9678         
9679         * mini-amd64.c: Allocate the signal stack using mmap.
9680
9681         * mini.c (sigsegv_signal_handler): Fix reading of context.
9682
9683         * mini-exceptions.c: Fix up stack overflow handling.
9684
9685         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
9686
9687         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
9688
9689         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
9690
9691         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
9692
9693         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
9694         tramp_init functions as they are no longer needed.
9695
9696 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
9697
9698         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
9699         
9700         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
9701
9702         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
9703         
9704         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
9705         support that now.
9706
9707         * mini-ops.h: Add OP_LMUL_IMM.
9708
9709         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
9710         long mul/div opcodes as intrinsic.
9711
9712         * mini-amd64.c (emit_call): Handle the case when the callee might be
9713         an AOT method.
9714
9715 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
9716
9717         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
9718         extra safe.
9719         
9720         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
9721
9722         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
9723
9724 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
9725
9726         * mini.c (mono_codegen): Don't leak here, to help people running
9727         monogrind.
9728
9729 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
9730
9731         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
9732         conversions in sse2 mode.
9733
9734         * basic-float.cs: Add regression test.
9735         
9736         * mini-amd64.c: Reenable sse2.
9737
9738 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
9739
9740         * mini-amd64.c: Disable sse2 until some regressions are fixed.
9741
9742 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
9743
9744         * driver.c: Copyright text should include 2005.
9745         
9746 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
9747
9748         * cpu-amd64.md (load_membase): Fix more max lengths.
9749
9750 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
9751
9752         * cpu-amd64.md (load_membase): Fix max length.
9753
9754         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
9755
9756         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
9757
9758         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
9759         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
9760
9761         * basic-float.cs: Add rounding regression test.
9762
9763         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
9764
9765 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
9766
9767         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
9768         structures in registers for pinvoke wrappers.
9769
9770 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
9771
9772         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
9773
9774 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
9775
9776         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
9777         wrapper to mono_jit_thread_attach.
9778
9779         * mini.c (mini_jit_thread_attach): New jit icall.
9780
9781         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
9782         native->managed wrappers.
9783
9784         * exceptions.cs: Add new regression test.
9785
9786         * mini.c (optimize_branches): Check regions in the cbranch to throw
9787         block case as well. Fixes #73242.
9788
9789 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
9790
9791         * mini.c: thread safety fixes.
9792
9793 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
9794
9795         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
9796         patching stuff, since delegates use jump trampolines so there is
9797         no caller.
9798
9799         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
9800         jump trampolines.
9801         
9802         * tramp-amd64.c: Fix build.
9803
9804         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
9805         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
9806
9807         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
9808         Rename this to mono_arch....
9809         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
9810
9811         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
9812
9813         * mini-amd64.c (emit_call): If both the caller and the callee is
9814         guaranteed to have 32 bit addresses, emit a normal call.
9815
9816         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
9817
9818         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
9819         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
9820         method_ptr inside delegates.
9821
9822 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
9823
9824         * mini.c (mono_jit_free_method): Free the method info even if the native code is
9825         invalidated. Fixes #73001.
9826
9827         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
9828
9829         * mini-x86.c: Only use stdcall for pinvokes on windows.
9830
9831 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
9832
9833         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
9834         * mini-x86.c: remove unreliable __thread var offset detection,
9835         use the correct accessors and enable by default.
9836
9837 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
9838
9839         * mini.c (mono_jit_free_method): Fix memory leak.
9840
9841 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
9842
9843         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
9844
9845 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
9846
9847         * cpu-amd64.md: Fix lengths of atomic opcodes.
9848
9849 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
9850
9851         * driver.c: try to not imply using ICU is any good.
9852
9853 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
9854
9855         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
9856         functions as inline ops.
9857
9858         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
9859         some Interlocked functions as inline ops.
9860
9861         * mini.c (move_basic_block_to_end): Fix bug in last patch.
9862
9863         * mini.h (MonoBasicBlock): Reorganize fields a bit.
9864
9865         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
9866
9867         * mini.c: Add support for OP_NOT_TAKEN.
9868
9869         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
9870         structures in registers for pinvoke wrappers.
9871
9872         * mini-amd64.c: Fix warnings.
9873
9874 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
9875
9876         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
9877
9878         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
9879
9880         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
9881         address instead of loading the address from it.
9882
9883         * mini-x86.c: Add support for returning small structs in registers
9884         on Win32. Fixes part of #70864.
9885         
9886 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
9887
9888         * trace.c (get_token): Improve error checking.
9889
9890 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
9891
9892         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
9893
9894 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
9895  
9896         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
9897         it can be reused for MonoClass.
9898         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
9899         _LINKDEMAND.
9900
9901 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
9902
9903         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
9904         instead of a MonoReflectionMethod. The method information wasn't used
9905         when displaying SecurityException details (but will be now).
9906
9907 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
9908
9909         * Makefile.am : windows build fix.
9910
9911 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
9912
9913         * iltests.il: Add new regression test.
9914
9915         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
9916         #72522.
9917
9918 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
9919  
9920         * mini.c: Moved linkdemand check into helper function check_linkdemand
9921         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
9922         LDFTN, LDVIRTFTN).
9923
9924 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
9925
9926         * declsec.c: Added statistics counter for different kinds of 
9927         LinkDemands.
9928         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
9929         (and commented) declaration.
9930         * mini.c: Added statistics counter for security Demand code 
9931         generation. Added display of security statistics.
9932
9933 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
9934
9935         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
9936         Fix compilation errors under gcc-2.95.
9937
9938 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
9939
9940         * mini.c, driver.c: Use the new jit trampoline hashtable
9941
9942 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
9943
9944         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
9945
9946 2005-02-11  Martin Baulig  <martin@ximian.com>
9947
9948         * debug-mini.c (mono_debug_close_method): Free the line number array.
9949
9950 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
9951
9952         * aot.c: Break up large methods into smaller ones. Share GOT slots for
9953         icalls.
9954
9955         * mini.h: Bump AOT file format version. 
9956
9957 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
9958
9959         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
9960         APTC and P/Invoke.
9961         * declsec.h: Added macros to get/set lazyly initialized security 
9962         informations about assemblies. Added new enum for different type of
9963         possible LinkDemand violation. Added function to check LinkDemands.
9964         * mini.h: Added a field to MonoCompile to hold any security violation
9965         detected when JITting a method (so it can be thrown later).
9966         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
9967         and CEE_CALLVIRT. Added code to throw exception at the end of
9968         mini_method_compile (note: the exception is unhandled right now).
9969
9970 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
9971
9972         * mini.c, jit-icalls.c: use the managed implementation of
9973         memset for initobj and memset, to avoid managed <-> unmanaged
9974         transitions.
9975
9976 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
9977
9978         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
9979         optimization if it would need a GOT var.
9980
9981         * basic.cs: Add tests for constant propagation and switch statements.
9982
9983         * ssa.c: Fix out-of-range constant propagation and switch statements.
9984
9985 2005-02-09    <vargaz@freemail.hu>
9986
9987         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
9988
9989 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
9990
9991         * cpu-amd64.md (load_membase): Fix max length of load_membase.
9992
9993 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
9994
9995         * mini.c: update to new signature of mono_class_get_allocation_ftn().
9996
9997 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
9998
9999         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
10000         arithmetic operations.
10001
10002 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
10003
10004         * mini-ppc.c: add a workaround for broken user code that
10005         DllImports vararg functions with non-vararg signatures.
10006
10007 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
10008
10009         * mini.c (mono_jit_compile_method_inner): Add detection and a 
10010         meaningfull error message for assemblies written in Managed C++.
10011
10012         * tramp-amd64.c mini-amd64.h: Add support for 
10013         create_trampoline_from_token ().
10014
10015         * aot.c mini-x86.c abcremoval.c: Applied patch from
10016         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
10017
10018 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
10019
10020         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
10021         which takes a MonoImage/token as parameter instead of a MonoMethod.
10022
10023         * aot.c: Use the new trampoline for initializing vtables.
10024
10025         * aot.c: Add support for ldfld/stfld_remote wrappers.
10026
10027         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
10028         rules for compare <MEM>, IMM.
10029
10030         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
10031
10032         * aot.c: Handle inherited finalizers correctly.
10033
10034 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
10035
10036         * inssel.brg (stmt): Add a missing _setup_... ().
10037
10038         * aot.c: Save some parts of the class state to the AOT file and use it
10039         to recompute that state when a class is initialized.
10040
10041         * mini.c: Install AOT hooks into the runtime.
10042
10043         * mini.h: Bump AOT file format version.
10044         
10045         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
10046         Fixes #72148.
10047
10048         * iltests.il: Add new test.
10049
10050 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
10051
10052         * mini.c: fix typo.
10053
10054 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
10055
10056         * mini.c: setup the statistical profiler in the thread attach
10057         callback to cope with the new single thread code.
10058
10059 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
10060
10061         * mini-ppc.c: ensure we have enough room for the profiler
10062         calls (fixed bug#72084).
10063
10064 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
10065
10066         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
10067         it.
10068
10069 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10070
10071         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
10072
10073 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10074
10075         * ssapre.c: Fixed an issue with down safety (this allows IronPython
10076         to succesfully execute parrotbench).
10077         * ssapre.h: Likewise.
10078
10079 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10080
10081         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
10082         variable for stores to method arguments (fixes a SSAPRE issue).
10083
10084 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
10085
10086         * mini.c: handle value types in dup, fixes gen-112.cs.
10087
10088 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
10089
10090         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
10091         sequence for calls in dynamic methods to avoid thunks.
10092
10093 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
10094
10095         * mini.c: correctly remove dynamic methods from the hashtable.
10096
10097 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
10098
10099         * driver.c: Disabled SSAPRE until fix the bug that appears
10100         in IronPython's parrotbench.
10101
10102 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
10103
10104         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
10105
10106         * mini.c (mono_method_to_ir): Revert the previous change.
10107         
10108         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
10109         when AOT compiling.
10110
10111         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
10112         mono_jit_info_table_find () etc. when running under valgrind.
10113
10114         * inssel.brg: Fix warnings.
10115
10116         * mini-exceptions.c: Fix warnings.
10117
10118 2005-01-31  Martin Baulig  <martin@ximian.com>
10119
10120         * driver.c (compile_all_methods_thread_main): Don't try to compile
10121         generic methods or anything which has type parameters.
10122
10123 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
10124
10125         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
10126
10127         * TestDriver.cs: Add --verbose flags.
10128
10129         * graph.c ssa.c: Fix 64 bit warnings.
10130         
10131         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
10132         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
10133         Fix 64 bit warnings.
10134
10135         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
10136         variable not spotted by gcc.
10137         
10138         * mini-amd64.c inssel-amd64.brg: Applied patch from  
10139         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
10140         X86_COMPARE_MEMBASE opcodes.
10141
10142         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
10143
10144 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
10145
10146         * *: MonoMethod->signature might be NULL now. You *MUST* use
10147         mono_method_signature.
10148
10149 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
10150
10151         * driver.c (compile_all_methods_thread_main): Compile the methods
10152         without invoking cctors.
10153
10154 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
10155
10156         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
10157         * basic-calls.cs: test for the above.
10158
10159 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
10160
10161         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
10162         MonoJitInfo changes.
10163
10164 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
10165
10166         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
10167         eagerly if it contains dynamic methods.
10168         
10169         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
10170
10171         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
10172         trace, it is now computed by an icall from trace_ips.
10173         
10174         * mini-exceptions.c: Fix a warning.
10175
10176 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
10177
10178         * mini-exceptions.c: don't bother getting stack trace info if
10179         it's not going to be used.
10180
10181 2005-01-27  Raja R Harinath  <rharinath@novell.com>
10182
10183         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
10184         ssapre-mini-ops.h.
10185
10186 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
10187
10188         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
10189
10190         * aot.c: Avoid calling mono_method_get_header () if not needed.
10191
10192         * mini.h: Bump AOT file format version.
10193         
10194         * mini.c (mono_emit_native_call): Allocate a GOT var here.
10195
10196         * mini.c (mono_print_tree): Print more info for calls.
10197
10198 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
10199
10200         * declsec.h: Remove warning by adding missing include for marshal.h
10201
10202 2005-01-26  Martin Baulig  <martin@ximian.com>
10203
10204         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
10205         `ip' twice.
10206
10207 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
10208
10209         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
10210         flags.
10211
10212         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
10213
10214         * aot.c (mono_compile_assembly): Fix a warning.
10215
10216 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
10217
10218         * declsec.c: Look for security attributes on the original MonoMethod 
10219         (and not the wrapped one). This fix permissions on icalls.
10220
10221 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
10222
10223         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
10224
10225         * mini.c (mono_allocate_stack_slots): Add a fixme.
10226
10227         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
10228
10229 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
10230
10231         * inssel.brg: optimize casts of sealed types (more
10232         optimizations waiting for fixes in remoting).
10233
10234 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
10235
10236         * inssel.brg (stmt): Add another dummy rule.
10237
10238         * driver.c: Fix warnings.
10239
10240         * driver.c (mono_main): If running under valgrind, instruct glib to use
10241         the system allocation functions so valgrind can track the memory
10242         allocated by the g_... functions.
10243
10244         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
10245
10246         * mini-ops.h: Add OP_DUMMY_STORE opcode.
10247
10248         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
10249
10250         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
10251         variables in try regions.
10252
10253         * mini.c (mini_method_compile): Don't disable optimizations on large
10254         methods when AOT compiling.
10255
10256         * mini.c (mono_allocate_stack_slots): New arch independent method to 
10257         allocate stack slots. Not yet used.
10258
10259 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
10260
10261         * debug-mini.c (mono_debug_close_method): Plug some leaks.
10262
10263 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
10264
10265         * mini-ppc.c: make the branch info relative as the code
10266         buffer can be reallocated.
10267
10268 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
10269
10270         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
10271         * driver.c: Removed the AOT/security restriction. Now initialize the
10272         security manager (in metadata) if --security is used.
10273         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
10274         rather than the pointer to declarative security, when AOT is used.
10275
10276 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
10277
10278         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
10279         basic blocks, reduced intrinsic exception throwing code size.
10280
10281 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
10282
10283         * driver.c (mini_usage): Reorder the usage screen.
10284
10285 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
10286
10287         * mini.c (mono_resolve_patch_target): Fix warning.
10288
10289 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
10290
10291         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
10292         previous patch.
10293
10294         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
10295
10296         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
10297         breaks the amd64 build.
10298
10299         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
10300         register allocation. Fixes #71454.
10301
10302         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
10303
10304         * arrays.cs: Add new regression test.   
10305
10306 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
10307
10308         * ssapre.c: Turned usage of snprintf to GString.
10309         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
10310         (I left it on by mistake in my previous commit).
10311
10312 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
10313
10314         * mini.c, cfold.c, basic-calls.cs: preserve side effects
10315         on cond branch optimization (fixes bug# 71515).
10316
10317 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
10318
10319         * abcremoval.c: Fixed bug 71062.
10320         * abcremoval.h: Likewise.
10321
10322 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
10323
10324         * mini.c: Added a new functionality to optimize_branches, the removal
10325         of useless basic blocks, and fixed some problem in the removal of
10326         critical edges; some utility functions added for both purposes.
10327         * ssapre.c: Added complex expression support, and fixed bug 70637.
10328         * ssapre.h: Likewise.
10329         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
10330         enabled in SSAPRE.
10331         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
10332         * driver.c: Re-enabled SSAPRE.
10333
10334 2005-01-19  Martin Baulig  <martin@ximian.com>
10335
10336         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
10337         the result of mono_get_method_constrained().
10338
10339 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
10340
10341         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
10342         manager.
10343
10344 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
10345
10346         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
10347         be detected.  Fixes #59296.
10348
10349 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
10350
10351         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
10352         which can happen. Fixes #71361.
10353
10354 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
10355
10356         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
10357         manager.
10358
10359 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
10360
10361         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
10362         appdomain-unload.exe to fail.
10363         
10364         * mini.c: Fix some memory leaks.
10365
10366 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
10367
10368         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
10369         Fixed bug and sped up some codepaths.
10370
10371 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
10372
10373         * mini.c: Fix some memory leaks.
10374
10375         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
10376         conversion.
10377
10378         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
10379
10380         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
10381         #71320.
10382
10383         * iltests.il: Add regression test for #71320.
10384
10385 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
10386
10387         * mini.c (mono_codegen): Fix installation of profiler hooks.
10388
10389         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
10390
10391 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
10392
10393         * mini.h, mini.c, cfold.c: optimize access to enum
10394         readonly fields, too. Eval conditional branches if possible
10395         to perform unreachable code removal in more cases.
10396
10397 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
10398
10399         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
10400
10401         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
10402         code manager.
10403
10404         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
10405         WinXP DEP. Fixes #71244.
10406
10407 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
10408
10409         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
10410
10411 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
10412
10413         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
10414
10415 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
10416
10417         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
10418         changes.
10419
10420         * mini.h: Bump AOT version.
10421
10422         * mini.h (MonoCompile): Change exvar to a hash table.
10423
10424         * mini.c: Allocate a separate exvar for each handler block.
10425
10426         * mini.c: Get rid of the computation of filter_lengths, its not needed.
10427
10428         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
10429         ex var with the pending exception and only throw if the two are equal.
10430         Fixes #68552.
10431         
10432         * exceptions.cs: Add tests for rethrow and nested catch clauses.
10433
10434         * mini-x86.c: Fix warnings.
10435
10436         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
10437         used by all the ports now.
10438
10439         * aot.c: Add write-symbols and save-temps options.
10440
10441 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
10442
10443         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
10444
10445 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
10446
10447         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
10448         operations.
10449
10450         * tramp-s390.c: Check vtable slot belongs to the domain.
10451
10452         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
10453         as per other platforms.
10454
10455         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
10456
10457 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
10458
10459         * driver.c: we don't run the Main() code in a subthread anymore.
10460
10461 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
10462
10463         * mini.c: added experimental rtc support in the statistical
10464         profiler: if the user has the permission, more accurate statistics
10465         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
10466         The MONO_RTC value must be restricted to what the linux rtc allows:
10467         power of two from 64 to 8192 Hz.
10468
10469 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
10470
10471         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
10472
10473 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
10474
10475         * mini-ppc.c: better icache flush for smp.
10476
10477 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
10478
10479         * mini-amd64.c (emit_move_return_value): Fix memory leak.
10480
10481         * mini-x86.c (get_call_info): Add the get_call_info () code from the
10482         amd64 port, not yet used.
10483
10484 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
10485
10486         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
10487         a struct type.
10488
10489 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
10490
10491         * driver.c: Added --security option to activate the security manager.
10492         Right now this will allow code generation for declarative demands and
10493         is disabled when AOT is specified.
10494         * mini.c: Add code generation for declarative security demands.
10495         * mini.h: Add mono_use_security_manager as an extern gboolean.
10496
10497 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
10498
10499         * aot.c (mono_compile_assembly): Speed up compilation a bit by
10500         emitting more dense assembly code.
10501
10502         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
10503         exception throwing stuff.
10504
10505 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
10506
10507         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
10508         dead code.
10509
10510         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
10511         left in by mistake.
10512
10513         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
10514         fixed.
10515
10516         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
10517
10518         * tramp-*.c: Only patch vtable slots if the object is in the current
10519         domain. Fixes appdomain-unload.exe.
10520
10521         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
10522         
10523         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
10524         x86 branch.
10525
10526 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
10527
10528         * mini.c (reverse_branch_op): New helper function.
10529
10530         * mini.c (optimize_branches): Run the new optimization only on 
10531         platforms which support it. Also reverse all kinds of branches.
10532
10533         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
10534
10535         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
10536         a throw statement.
10537
10538         * mini.c (optimize_branches): Reverse not-equals branches if the false
10539         bblock is a throw. This happens a lot of time with argument checking in
10540         corlib.
10541
10542         * mini.c (mono_codegen): Add support for placing basic blocks after
10543         the function epilogue.
10544
10545         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
10546         function epilogue.
10547         
10548 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
10549
10550         * mini.c (setup_stat_profiler): Only set this up if the platform
10551         supports ITIMER_PROF.
10552
10553 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
10554
10555         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
10556         previous patch.
10557
10558         * inssel.brg: Fix a warning.
10559
10560 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
10561
10562         * mini.c: added support for statistical profiler 
10563         (run with: --profile=default:stat).
10564
10565 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
10566
10567         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
10568
10569         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
10570
10571         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
10572         related to global registers from the amd64 port.
10573
10574 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
10575
10576         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
10577
10578         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
10579         with global registers.
10580         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
10581
10582         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
10583
10584 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
10585
10586         * debug-mini.c (encode_value): Fix off-by-one.
10587
10588         * aot.c (encode_value): Likewise.
10589
10590         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
10591
10592 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
10593
10594         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
10595         AOT.
10596
10597         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
10598         
10599         * aot.c (emit_method_info): Increase size of temp buffer.
10600
10601         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
10602         the AOT case.
10603
10604 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
10605
10606         * aot.c (emit_method_info): Fix build.
10607         
10608         * aot.c: Further rework of the AOT file format to reduce the size of
10609         the method info data.
10610
10611         * mini.h: Bump AOT file format version.
10612
10613 2004-12-27  Martin Baulig  <martin@ximian.com>
10614
10615         * mini.c (mini_get_method): New static method; call
10616         mono_get_method_full() and mono_get_inflated_method().
10617         (mono_method_to_ir): Use mini_get_method() instead of
10618         mono_get_method_full(). 
10619
10620 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
10621
10622         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
10623
10624 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
10625
10626         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
10627
10628         * inssel-amd64.brg: Add some optimization rules.
10629
10630 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
10631
10632         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
10633         standard not GC'd stuff is fine.
10634
10635 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
10636
10637         * aot.c: Rework the AOT file format to get rid of most of the global
10638         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
10639
10640         * mini.h: Bump AOT file format version.
10641         
10642 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
10643
10644         * mini.h: Bump AOT file format version.
10645
10646         * aot.c (mono_aot_is_got_entry): New function to determine if an 
10647         address is inside a GOT.
10648
10649         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
10650
10651         * cpu-pentium.md: Increase the maximum size of some instructions which
10652         might involve a got access.
10653         
10654         * mini.c (get_method_from_ip): Another debug helper function.
10655
10656         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
10657         when got var accesses are created during the decompose phase.
10658
10659         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
10660
10661         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
10662         argument mini_compile_method and to MonoCompile, and use this to
10663         determine whenever a given method is compiled for AOT. This allows the
10664         other methods compiled during AOT compilation to be free of AOT stuff,
10665         so the backends does not need to add special support for them by
10666         creating a fake GOT etc.
10667
10668         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
10669         longer needed.
10670
10671 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
10672
10673         * mini.c (mono_method_to_ir): It turns out that some of the
10674         x-appdomain wrappers are lax with types, so just ignore this for
10675         all wrappers.
10676
10677         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
10678         at the vtable->klass. If it is non-shared code we can just use the
10679         vtable.
10680
10681 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
10682
10683         * mini-ppc.c: access MonoDomain from tls, too.
10684
10685 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
10686
10687         * declsec.c: Removed unused variable (and related warning ;-)
10688
10689 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
10690
10691         * iltests.il: New test for LDELEMA on an array of ref types.
10692
10693         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
10694         all ldelema's on reftypes.
10695         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
10696         it was the wrong place to put it.
10697
10698         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
10699         register to pop to make this cleaner, at the request of Paolo.
10700
10701 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
10702
10703         * mini-ops.h (OP_GETHASHCODE): New op.
10704
10705         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
10706
10707         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
10708         operation.
10709
10710         For a microbenchmark, this reduces the cost of Hashtable.get_Item
10711         by 25%.
10712         
10713         * mini-x86.c (mono_arch_output_basic_block): Rather than
10714
10715         add ebp, 4
10716
10717         Emit
10718
10719         pop edx
10720
10721         The first is 3 bytes while the second is 1. This saves 36 kb on
10722         mscorlib, quite a big saving. When bootstraping mcs, I was able to
10723         see a small boost because of icache locality.
10724
10725         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
10726
10727 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
10728
10729         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
10730         started code sharing with the generic code.
10731
10732 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
10733
10734         * mini-ppc.c, cpu-g4.md: added code for direct access to
10735         tls data slots.
10736
10737 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
10738
10739         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
10740          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
10741         to OP_TLS_GET.
10742
10743 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
10744
10745         * declsec.c|h: Added functions to cache the declarative stack modifiers
10746         in MonoJitInfo and to create a security frame from a MonoJitInfo 
10747         structure.
10748         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
10749         created. Register internal calls for System.Security.SecurityFrame::
10750         _GetSecurityFrame and _GetSecurityStack.
10751         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
10752         the definitions for the new stack walk/callback mechanism.
10753         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
10754         first security frame for LinkDemands and InheritanceDemands) and
10755         GetSecurityStack for Demands. Both use the new mono_walk_stack code
10756         from lupus.
10757         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
10758         walk initialization (lupus).
10759
10760 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
10761
10762         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
10763         idiom.
10764         (handle_loaded_temps): Do not create a temporary variable for
10765         things that we know are temps. They will never be modified.
10766         (mono_spill_call): Set MONO_INST_IS_TEMP
10767         (mono_emulate_opcode): ditto
10768         (emit_tree): ditto
10769         (mono_method_to_ir.CEE_DUP): ditto
10770
10771 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
10772
10773         * mini.c (type_to_eval_stack_type): Make this handle the void type
10774         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
10775         (emit_tree): use ip_in_bb to special case some common idioms
10776         Update all callers to pass in the IP.
10777         (mono_method_to_ir): Make CEE_CALL* do the above as well.
10778
10779         This gives us a nice 2% speedup in mcs bootstrap.
10780
10781         * mini-x86.c (peephole_pass): Peephole pass to make
10782         mov  [foo], eax
10783         push [foo]
10784
10785         into
10786
10787         mov [foo], eax
10788         push eax
10789
10790         * mini.c (ip_in_bb): new method.
10791         (mono_method_to_ir): use this method rather than doing the hash
10792         lookup ourselves.
10793
10794         * linear-scan.c (mono_linear_scan): When expiring actives, you
10795         don't need to keep around variables that expire on this
10796         instruction. This makes it so that:
10797              a = b + 1
10798         will turn into:
10799              store (ebx add (ebx, 1))
10800         which will become
10801              add ebx, 1
10802
10803 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
10804
10805         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
10806         combination to avoid doing two copies. Fix up problems with previous
10807         patch.
10808
10809         * mini.c: Fix 64 bit warnings.
10810
10811         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
10812
10813 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
10814
10815         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
10816         changes from the x86 code.
10817
10818         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
10819
10820 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
10821
10822         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
10823         throwing code to reduce its size, unify the AOT and non-aot code and 
10824         get rid of relocations in the AOT case.
10825
10826         * mini-x86.h mini.c exceptions-x86.c 
10827         (mono_arch_get_throw_corlib_exception): New arch specific function to 
10828         raise corlib exceptions which doesn't require relocations in the 
10829         caller.
10830
10831         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
10832
10833 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
10834
10835         * mini.c (mono_emit_method_call): Only allocate the got var when it is
10836         needed.
10837
10838         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
10839         in the AOT case.
10840
10841 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
10842
10843         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
10844         with add function when used from Inc/dec atomic 
10845         functions. Re-enabled optimization on x86.
10846         * mini-ops.h: renamed atomic_add functions to
10847         allow _add to match the Interlocked::Add and
10848         _add_next to match Interlocked::Inc/Dec.
10849
10850 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
10851
10852         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
10853         linking of BBs to the end BB, and enabled SSAPRE also with
10854         consprop and copyprop (which was prevented by that bug).
10855
10856 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
10857
10858         * mini-x86.c: disabling the Interlocked optimizing code. 
10859
10860 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
10861
10862         * aot.c (load_aot_module): Move reading of got_addr after the AOT
10863         file version check.
10864         
10865 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
10866
10867         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
10868         interlocked optimization due lack of support on x86, rewrote 
10869         exchange to take into account that base may be in eax.
10870         
10871         xsp works again; activated Interlocked optimizing code.
10872         
10873 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
10874
10875         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
10876
10877 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
10878
10879         * mini-ops.h: Add new opcodes.
10880
10881         * mini.h: Add new patch types. Add got_var to MonoCompile.
10882
10883         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
10884         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
10885         make it work with all kinds of patchable code.
10886
10887         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
10888         address of the GOT, and referencing entries in the GOT.
10889
10890         * mini.c: Add code to load the GOT address if needed by an opcode.
10891
10892         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
10893         independent AOT code on the x86 using an elf-style Global Offset Table.
10894
10895 2004-12-14  Raja R Harinath  <rharinath@novell.com>
10896
10897         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
10898
10899 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10900
10901         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
10902         when running xsp.
10903
10904 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
10905
10906         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
10907         of Interlocked:Increment/Decrement/Add as inline ops.
10908         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
10909
10910 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
10911
10912         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
10913         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
10914
10915 2004-12-12  Duncan Mak  <duncan@ximian.com>
10916
10917         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
10918         again. `patch_info->table_size' is no longer valid after Zoltan's
10919         commit #37636.
10920
10921 2004-12-12  Martin Baulig  <martin@ximian.com>
10922
10923         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
10924         if we are the "real" method, ie. not an inlined method inside it.
10925
10926 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
10927
10928         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
10929         before we look in the special fields table. This fixes
10930         ../tests/thread-static-init.cs.
10931
10932 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10933
10934         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
10935         for Array get_Rank and get_Length. Fixes bug #70465.
10936
10937 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
10938
10939         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
10940         separate structure to reduce the size of MonoJumpInfo.
10941
10942 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
10943
10944         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
10945
10946 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
10947
10948         * mini.c (mini_get_inst_for_method): Changed to allow ports
10949         to return a MonoInst instead of opcode 
10950         (renamed mini_get_opcode_for_method to better reflect the new functionality)
10951         
10952         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
10953         Allow ports to return a created MonoInst instead of op-code, will enable
10954         new optimizations.
10955         (renamed mini_get_opcode_for_method to better reflected the functionality)
10956
10957 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
10958
10959         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
10960
10961 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
10962
10963         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
10964         Fixes #69985.
10965
10966 2004-12-08  Martin Baulig  <martin@ximian.com>
10967
10968         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
10969         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
10970
10971 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
10972
10973         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
10974         correctly.
10975
10976         * exceptions.cs: Disable some tests which depend on properties of x86 fp
10977         arithmetic.
10978
10979 2004-12-08  Raja R Harinath  <rharinath@novell.com>
10980
10981         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
10982
10983 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
10984
10985         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
10986         bug introduced by the previous patch.
10987
10988 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
10989
10990         * mini-ppc.c, objectc.cs: handle large structs passed by value
10991         (fixes bug #69972).
10992
10993 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
10994
10995         * mini-ppc.c: OP_ARGLIST implementation from
10996         Geoff Norton  <gnorton@customerdna.com>.
10997
10998 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
10999
11000         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
11001         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
11002
11003 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
11004
11005         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
11006
11007 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11008
11009         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
11010         support.
11011
11012 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
11013
11014         * mini-sparc.c: Zero out localled-ed memory.
11015
11016         * iltests.il: Add tests for zeroing out localloc-ed memory.
11017
11018 2004-12-04  Martin Baulig  <martin@ximian.com>
11019
11020         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
11021         mono_method_get_signature_full().       
11022
11023 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
11024
11025         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
11026         and some utility functions (always for SSAPRE), integrated SSAPRE.
11027         * mini.h: Likewise.
11028         * driver.c: Added ssapre option.
11029         * ssa.c: Small fix on OP_ARG handling.
11030         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
11031         * Makefile.am: Likewise.
11032
11033 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
11034
11035         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
11036         now in the xp code.
11037
11038         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
11039         icall.
11040
11041 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11042
11043         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
11044         
11045         * cpu-s390.md : Increase instruction length of oparglist.
11046
11047         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
11048
11049 2004-11-30  Martin Baulig  <martin@ximian.com>
11050
11051         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
11052         virtual generic methods.  We call a special helper_compile_generic_method()
11053         icall to retrieve the method from the vtable, inflate and compile
11054         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
11055
11056         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
11057
11058 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
11059
11060         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
11061
11062 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
11063
11064         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
11065         Fixes #69929.
11066
11067 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
11068
11069         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
11070         platforms with PIC aot.
11071
11072 2004-11-28  Martin Baulig  <martin@ximian.com>
11073
11074         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
11075         Fixes gen-112.cs.
11076
11077 2004-11-28  Martin Baulig  <martin@ximian.com>
11078
11079         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
11080         the result of mono_type_get_underlying_type() to check whether
11081         we're byref.
11082
11083 2004-11-26  Martin Baulig  <martin@ximian.com>
11084
11085         * mini.c
11086         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
11087         in the g_assert().
11088
11089 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
11090
11091         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
11092         the same way as the other arguments so they won't get clobbered.
11093
11094         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
11095         calls through R11 since it is clobbered by the trampoline code.
11096
11097 2004-11-26  Raja R Harinath  <rharinath@novell.com>
11098
11099         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
11100         pick up in-tree mscorlib.dll.
11101
11102 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
11103
11104         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
11105
11106         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
11107         runtime data/code are now stored in a table similar to the GOT in ELF. 
11108         This allows the code itself to be position independent.
11109
11110         * aot.c: Fix loading of referenced assemblies after the lazy assembly
11111         loading changes.
11112
11113         * aot.c: Attach ELF type (object/function) directives to all global
11114         symbols.
11115
11116         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
11117
11118         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
11119
11120         * mini-amd64.h: Turn on PIC AOT code.
11121
11122         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
11123         returning the offset within an OP_AOTCONST instruction where the GOT
11124         offset needs to be added.
11125
11126         * mini.h: Bump AOT file format version.
11127
11128 2004-11-25  Martin Baulig  <martin@ximian.com>
11129
11130         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
11131         uninflated generic methods.
11132
11133 2004-11-25  Martin Baulig  <martin@ximian.com>
11134
11135         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
11136
11137 2004-11-24  Martin Baulig  <martin@ximian.com>
11138
11139         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
11140         original klass (this only applies for generic instances).
11141
11142 2004-11-24  Martin Baulig  <martin@ximian.com>
11143
11144         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
11145         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
11146         that array).
11147
11148 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
11149
11150         * mini.c (mono_method_to_ir): Disable inlining for methods containing
11151         localloc. Fixes #69678.
11152
11153         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
11154         
11155 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
11156
11157         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
11158         used SSE registers on pinvoke calls. Fixes #69774.
11159
11160 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
11161
11162         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
11163         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
11164
11165 2004-11-23  Raja R Harinath  <rharinath@novell.com>
11166
11167         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
11168         Refer directly to the mcs/ tree.
11169
11170 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11171
11172         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
11173         Check if a trampoline for a synchronized method is required. 
11174
11175 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
11176
11177         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
11178         with localloc if needed. Throe arithmetric exception in
11179         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
11180         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
11181
11182 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
11183
11184         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
11185         types before switching on type.  Fixes #69622.
11186
11187 2004-11-19  Raja R Harinath  <rharinath@novell.com>
11188
11189         * Makefile.am (check-local): New.  Integrate into 'make check'.
11190         (MCS,RUNTIME): Define using in-tree mono and mcs.
11191         (ILASM): New.
11192         (%.exe): Use $(ILASM).
11193
11194 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
11195
11196         * mini-ppc.c: adjust initial prolog size (bug #69691).
11197
11198 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
11199
11200         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
11201         #69664.
11202
11203 2004-11-17  Raja R Harinath  <rharinath@novell.com>
11204
11205         * Makefile.am (clean-local): Rename from 'clean'.
11206
11207 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11208
11209         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
11210         to mono_arch_is_int_overflow. 
11211         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
11212         SIGFPE events.
11213
11214 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
11215
11216         * declsec.c|h: New files to support declarative security attributes.
11217         Added function to check if a method has (applicable) security.
11218         * mini.c|h: Add check for declarative security attributes in
11219         mono_method_check_inlining.
11220         * Makefile.am: Added declsec.c and declsec.h to the build.
11221
11222 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
11223
11224         * mini.c, mini.h: update to keep dynamic code info per-domain.
11225
11226 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
11227
11228         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
11229         (mini_init): Get rid of it from here too.
11230
11231 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
11232
11233         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
11234         implemented OP_RETHROW (patch by Geoff Norton
11235         <gnorton@customerdna.com>).
11236
11237 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
11238
11239         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
11240         between appdomains.  Fixes appdomain-unload on PPC.
11241
11242 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
11243
11244         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
11245         mini-exceptions.c: handle the new wrapper types.
11246         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
11247         token value as a MonoClass* when compiling a wrapper.
11248         mono_jit_create_remoting_trampoline now takes an additional
11249         MonoRemotingTarget parameter.
11250         
11251 2004-11-10  Martin Baulig  <martin@localhost>
11252
11253         * mini.c (mono_method_to_ir): Use `generic_container->context'
11254         rather than creating a new one.
11255
11256 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11257
11258         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
11259
11260         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
11261
11262 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
11263
11264         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
11265         the experimental aot cache stuff.
11266
11267 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
11268
11269         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
11270         mini-exceptions.c: update to exception clause structure changes.
11271
11272 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
11273
11274         * exceptions-x86.c (throw_exception): Fix warnings.
11275
11276         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
11277         for OP_RETHROW.
11278
11279 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
11280
11281         * exceptions-sparc.c (get_throw_exception): Really fix this.
11282
11283 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
11284
11285         * tramp-*.c: we no longer support icalls without wrappers, so
11286         a bit of code can be removed here
11287
11288 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
11289
11290         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
11291         patch.
11292
11293         * cpu-sparc.md: Add op_rethrow.
11294
11295         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
11296
11297         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
11298
11299         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
11300         * mini-ops.h: Add OP_RETHROW.
11301
11302         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
11303
11304         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
11305
11306 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
11307         
11308         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
11309         Makes the output much easier to read
11310
11311 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
11312
11313         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
11314         prevents another huge leak when compiling with ssa. Secondly, the
11315         performance of doing this rather than freeing the lists is much
11316         better. GList does a lock every time you allocate a list link,
11317         so that it can use a memory pool. So, it is better to just use
11318         a memory pool of our own.
11319         
11320         * ssa.c, linear-scan.c: replace g_list_remove_link with
11321         g_list_delete.  The remove one does not free the GList, so we were
11322         leaking memory. On -O=all --compile-all with corlib, this cut down
11323         3 MB of allocations.
11324
11325 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
11326
11327         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
11328
11329         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
11330
11331         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
11332         into a new function mono_create_jit_trampoline ().
11333
11334 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
11335
11336         * trace.c (get_spec): Allow tracing of classes without a namespace.
11337
11338 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
11339
11340         * mini.c: Fix pointer overwrite in mini_method_compile.
11341
11342 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
11343
11344         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
11345         The darwin ABI needs some special handling for 1 and 2 byte structs
11346         Lets use lbz/lhz instead of lwz everywhere.
11347         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
11348         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
11349         Use stb/sth for the former, and put the latter always on stack instead of in
11350         argument registers.
11351
11352 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
11353
11354         * trace.c (is_filenamechar): Add '_'.
11355
11356 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
11357
11358         * mini-s390.c: Fix prolog length to allow for large trace requirements.
11359
11360         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
11361
11362 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
11363
11364         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
11365         depends on libmonogc. Fixes #68805.
11366
11367 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
11368
11369         * mini.c (mono_jit_free_method): Provide extra information for
11370         this error.  Currently this leaks, but will be turned into a
11371         developer option in the future.
11372
11373 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
11374
11375         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
11376
11377 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
11378
11379         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
11380         boundary. Fixes reading of PATCH_INFO_R4 and R8.
11381         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
11382
11383 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
11384
11385         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
11386         trampolines for AOT code.
11387
11388 2004-10-22    <vargaz@freemail.hu>
11389
11390         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
11391         constructed types. Fixes #68136.
11392
11393 2004-10-21  Martin Baulig  <martin@ximian.com>
11394
11395         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
11396         if it returns true, unwind the stack to the call instruction.
11397
11398 2004-10-21    <vargaz@freemail.hu>
11399
11400         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
11401
11402         * mini.h: Bump AOT version number.
11403
11404         * objects.cs: Add another test for unbox trampolines.
11405
11406         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
11407         valuetype methods.
11408
11409 2004-10-20    <vargaz@freemail.hu>
11410
11411         * driver.c: Add SHARED to the set of optimizations tested.
11412
11413         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
11414
11415         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
11416         used by CEE_NEWARR.
11417
11418         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
11419
11420 2004-10-20  Martin Baulig  <martin@ximian.com>
11421
11422         * mini-exceptions.c (mono_handle_exception): Call
11423         mono_debugger_handle_exception() to tell the debugger about
11424         catch/finally clauses.
11425
11426 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
11427
11428         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
11429
11430         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
11431         #68447.
11432
11433 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
11434
11435         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
11436         methods as their native size, fixed bug #57543, #57545.
11437         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
11438         This saves a temporary register and mullw call down into 1 (minor perf
11439         increase for cases like sum = sum * 5;  This use to translate into:
11440             li r11,5
11441             mullw r28,r28,r11
11442         It now translates to
11443             mulli r28,r28,5
11444
11445 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
11446
11447         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
11448         #68388.
11449
11450 2004-10-11  Martin Baulig  <martin@ximian.com>
11451
11452         * mini.c (mono_method_to_ir): If we're a generic method, get the
11453         MonoGenericContainer from our MonoMethodNormal and create a
11454         MonoGenericContext from it.
11455
11456 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
11457
11458         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
11459
11460         * basic-long.cs: Add test for checked i8->i2 cast.
11461
11462 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11463
11464         * inssel-ppc.brg: added a couple of speedup rules.
11465
11466 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
11467
11468         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
11469         to speed up rebuilds.
11470
11471 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11472
11473         * mini-s390.c: Minor fix to OP_OR_IMM.
11474
11475 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
11476
11477         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
11478         better. Fixes appdomain-unload.exe on sparc.
11479
11480 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
11481
11482         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
11483         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
11484         see bug 67324.
11485
11486 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
11487
11488         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
11489
11490 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
11491
11492         * mini.c: Always generate a field read/write wrapper for members
11493         of the class MarshalByRefObject since the actual instance could
11494         be a CBO.
11495
11496 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
11497
11498         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
11499
11500 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
11501
11502         * driver.c mini.h trace.c: Move the setting of the main assembly into
11503         a separate function called mono_trace_set_assembly () and call it after
11504         actually loading the main assembly. Fixes #66872.
11505
11506 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
11507
11508         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
11509         using the code manager.
11510
11511 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
11512
11513         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
11514
11515 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
11516
11517         * cpu-amd64.md: Fix bug in previous patch.
11518         
11519         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
11520         #66650.
11521
11522 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
11523
11524         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
11525         mini-exceptions.c: updates for changed stack walk interface.
11526
11527 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11528
11529         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
11530
11531 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
11532
11533         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
11534
11535 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
11536
11537         * driver.c (mini_regression_list): Do not call mono_assembly_close 
11538         since assemblies can't be unloaded.
11539         
11540 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
11541
11542         * cpu-amd64.md: Fix more instruction lengths.
11543
11544         * cpu-amd64.md: Fix lengths of some instructions.
11545
11546 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
11547
11548         * inssel.brg: Make the array ldelema check aot friendly.
11549
11550 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
11551
11552         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
11553
11554         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
11555
11556 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
11557
11558         * mini-x86.c: Fix build.
11559
11560         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
11561         mono_type_get_underlying_type () helper function to simplify code.
11562         
11563 2004-09-09  Martin Baulig  <martin@ximian.com>
11564
11565         * mini-amd64.c: Don't access `type->data.klass' directly, call
11566         mono_class_from_mono_type() instead since the type may be a
11567         generic instance.
11568
11569 2004-09-09  Martin Baulig  <martin@ximian.com>
11570
11571         * mini-amd64.c (get_call_info): Fix support for generic instances.
11572         (add_valuetype): Use mono_class_from_mono_type() to get the class
11573         since we can be a generic instance.
11574
11575 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
11576
11577         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
11578
11579 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
11580
11581         * liveness.c: reset spill costs on each scan: bug 62107
11582
11583 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
11584
11585         * exceptions-sparc.c (mono_arch_find_jit_info): remove
11586         unnecessary line that doesn't compile
11587
11588 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
11589
11590         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
11591         trampolines, make them call an error function so people can fix their
11592         code.
11593
11594 2004-09-06  Martin Baulig  <martin@ximian.com>
11595
11596         * mini.c (mono_method_to_ir): When initializing locals, handle a
11597         generic instances like a valuetype if it's a valuetype and like a
11598         class if it's a class.
11599
11600 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
11601
11602         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
11603         stack. Fixes #64674.
11604
11605         * exceptions.cs: Add test for unwinding of call arguments.
11606
11607 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
11608
11609         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
11610         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
11611         set the carry/borrow flag). The sparc and s390 implementations
11612         can now use optimized versions (and simplify the code). ppc bugfixes.
11613
11614 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
11615
11616         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
11617
11618 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
11619
11620         * inssel-amd64.brg: Remove leftover 32 bit rule.
11621
11622         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
11623
11624 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
11625
11626         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
11627         mono_arch_find_jit_info functions into a new function. Fix a memory
11628         leak.
11629
11630         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
11631         refactored code.
11632         
11633 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
11634
11635         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
11636         as well.
11637         
11638         * exceptions.cs: Add array size tests.
11639
11640         * mini.c: Allocate a separate icall wrapper for each arity of 
11641         mono_array_new_va. Fixes #59509.
11642
11643         * exceptions.cs: Add testcase for 64578.
11644
11645         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
11646
11647         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
11648         
11649 2004-09-02  Martin Baulig  <martin@ximian.com>
11650
11651         * mini.c (mono_method_to_ir): When initializing the locals, call
11652         handle_initobj() on the generic instance itself, not its
11653         underlying type.
11654
11655 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
11656
11657         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
11658         MonoJitInfo for dynamic methods.
11659
11660         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
11661
11662         * mini.c: Add support for freeing JIT data for dynamic methods.
11663         
11664 2004-09-01  Martin Baulig  <martin@ximian.com>
11665
11666         * mini-x86.c (is_regsize_var): Added support for generic
11667         instances.
11668         (mono_arch_emit_prolog): Make this compile again, use
11669         `x86_push_imm_template (code)'.
11670
11671 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
11672
11673         * mini-x86.c: make all push_imm instructions that get
11674         patched always emit the long form
11675
11676 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
11677
11678         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
11679         in a per-domain hash.
11680
11681         * mini-amd64.c (merge_argument_class_from_type): Handle generic
11682         types.
11683
11684 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
11685
11686         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
11687         work.
11688         
11689         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
11690         work.
11691
11692         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
11693         Beginnings of SSE2 support.
11694
11695         * exceptions.cs: Add more tests for checked int<->uint casts.
11696
11697 2004-08-28  Martin Baulig  <martin@ximian.com>
11698
11699         * mini-x86.c (mono_arch_instrument_epilog): Added support for
11700         generic instances.
11701
11702         * mini.c
11703         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
11704         Handle generic instances recursively.
11705
11706 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
11707
11708         * iltests.il: test for conv.u8 on a constant
11709
11710 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
11711
11712         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
11713         LCONV_x4 (shrun_32 (membase)).
11714
11715 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
11716
11717         * inssel-x86.brg: c&p rules for push/setret of long
11718
11719 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
11720
11721         * inssel-x86.brg: c&p rules for compare (base, regvar) and
11722         compare (regvar, base)
11723
11724         * inssel-x86.brg: more burg love
11725
11726         * inssel.brg: more cleanup
11727
11728         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
11729
11730 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
11731
11732         * basic-long.cs, basic-calls.cs: new tests for optimization.
11733
11734 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
11735
11736         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
11737         patch.
11738
11739 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
11740
11741         * mini-amd64.c (read_tls_offset_from_method): Add another case.
11742         
11743 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
11744
11745         * inssel.brg (mini_emit_memcpy): use 
11746         NO_UNALIGNED_ACCESS to disable memcpy optimization
11747
11748 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
11749
11750         * mini-amd64.c: Handle generic types in various places.
11751
11752         * mini.c (mono_method_to_ir): Handle generic types in init locals.
11753
11754 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
11755
11756         * mini.c (handle_box): Fix warning.
11757
11758         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
11759
11760         * mini-amd64.h: Enable the emit_state optimization.
11761
11762         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
11763
11764         * mini-amd64.c: Add some new 64 bit peephole opts.
11765
11766         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
11767
11768         * cpu-amd64.md: sreg1 of div instructions must be %rax.
11769
11770         * mini-amd64.c: Register allocator fixes.
11771
11772         * mini.c: Add an optimization to emit_state to avoid allocation of new
11773         registers on some platforms.
11774
11775 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
11776
11777         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
11778
11779         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
11780         allocation. Fixes #63085.
11781
11782         * basic-long.cs: Add new regression test.
11783
11784         * mini-amd64.c: Register allocator improvements.
11785
11786 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
11787
11788         * mini-amd64.c (read_tls_offset_from_method): Add another code
11789         sequence.
11790
11791         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
11792         instruction sequence for nullifying class init trampolines.
11793
11794         * objects.cs: Add new regalloc test.
11795
11796         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
11797
11798 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
11799
11800         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
11801         
11802         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
11803         arguments.
11804
11805         * driver.c: Fix profiling after TLS changes.
11806         
11807         * driver.c (mono_main): Set mono_stats.enabled if needed.
11808
11809         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
11810         CEE_BOX.
11811
11812 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
11813
11814         * mini-x86.c: use a 1 op rather than a 2 op tls access
11815         instruction -> faster.
11816
11817 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
11818
11819         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
11820         x86 backend.
11821
11822 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
11823
11824         * exceptions-sparc.c (throw_exception): fix typo
11825
11826 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
11827
11828         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
11829         set tree->dreg correctly with tls. Allow any
11830         register to be used.
11831
11832         * mini-x86.c (read_tls_offset_from_method): add new code
11833         generation pattern seen with GCC.
11834
11835
11836 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
11837
11838         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
11839         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
11840         exceptions-sparc.c: fix some performance issues in exception
11841         handling and setting of the stack trace for exceptions that were
11842         already thrown.
11843
11844 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
11845
11846         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
11847         x86 backend.
11848         
11849         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
11850         registers.
11851
11852 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
11853
11854         This patch inlines tls access, when possible.
11855         
11856         * mini.h: new arch functions for TLS intrinsics.
11857         All platforms updated with a stub.
11858
11859         * mini.c: use the new intrinsics
11860
11861         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
11862         arch specific intrinsic for tls variables
11863
11864 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
11865
11866         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
11867         under windows.
11868
11869 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
11870
11871         * mini.c: thread local allocation
11872
11873 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
11874
11875         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
11876
11877         * Makefile.am: Link against the static version of libmonogc.
11878         
11879         * Makefile.am: Link the static versions of the convenience libraries
11880         into the mono executable.
11881
11882         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
11883
11884 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
11885
11886         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
11887         on integer overflow.
11888
11889         * mini-amd64.c: Reorganize function call code.
11890
11891         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
11892
11893 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
11894
11895         * inssel-x86.brg: use xor eax,eax.
11896         
11897         * basic.cs: new tests
11898
11899 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
11900
11901         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
11902         in exception throwing code.
11903         
11904 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
11905
11906         * inssel-x86.brg: use xor esi,esi.
11907
11908 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
11909
11910         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
11911         can trace methods compiled during mini_init () too.
11912
11913         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
11914         CEE_CONV_U4.
11915
11916 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
11917
11918         * Makefile.am: static link on x86 (r=zoltan)
11919
11920 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
11921
11922         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
11923         code since it causes some programs to fail.
11924
11925 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
11926
11927         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
11928
11929 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
11930
11931         * mini.c: ovfops_op_map - add STACK_OBJ case for
11932         CONV_I 
11933         * basic.cs: add test_0_pin_string as test
11934         case for above.
11935
11936 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
11937
11938         * Makefile.am: build C# if srcdir != builddir
11939
11940 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
11941
11942         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
11943         fall-through blocks.
11944
11945 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
11946
11947         * driver.c: enable loop by default again and include abcrem in -O=all.
11948
11949 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
11950
11951         * iltests.il: Add some localloc tests.
11952
11953         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
11954
11955         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
11956         Fixes #62574.
11957
11958         * inssel-amd64.brg: Add some optimizations.
11959
11960         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
11961         for gcc-3.4.
11962
11963         * Makefile.am: Statically link mono against libmono on AMD64.
11964         
11965         * mini-amd64.c inssel-amd64.brg: Optimizations.
11966
11967 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
11968
11969         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
11970
11971         * tramp-amd64.c: Patch calling code in trampolines.
11972
11973 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
11974
11975         * mini-amd64.c: pinvoke struct passing fixes.
11976
11977 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
11978
11979         * mini-sparc.c: redo change, make mono_arch_cpu_init call
11980         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
11981
11982 2004-08-05  Duncan Mak  <duncan@ximian.com>
11983
11984         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
11985         CEE_LDELEM_ANY.
11986
11987 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
11988
11989         * mini-amd64.c (emit_move_return_value): Move return value for normal
11990         calls too.
11991
11992 2004-08-05  Martin Baulig  <martin@ximian.com>
11993
11994         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
11995         `type->type'; just modify `type' itself when dealing with enums
11996         and generic instances.
11997         (check_call_signature): Make `simple_type' a `MonoType *'.
11998
11999 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
12000
12001         * mini.c: Use OP_PADD to add offsets to addresses.
12002
12003         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
12004
12005 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
12006
12007         * mini-sparc.c (mono_arch_emit_epilog): fix check
12008         for folding last op into restore instruction
12009
12010 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
12011
12012         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
12013         helper methods using the code manager.
12014         
12015         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
12016
12017         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
12018
12019 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12020         
12021         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
12022           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
12023
12024         * mini-s390.c: fix tail processing
12025
12026 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
12027
12028         * mini-ppc.c: mul.ovf.un exception name fix.
12029
12030 2004-08-03  Martin Baulig  <martin@ximian.com>
12031
12032         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
12033         instances; before jumping to `handle_enum', also modify `ptype'.
12034
12035 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
12036
12037         * cpu-sparc.md: fcall maximal length too small.
12038
12039 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
12040
12041         * mini-amd64.c mini.h: Add initial support for passing/returning 
12042         structures to/from pinvoked methods.
12043
12044 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
12045
12046         * mini-ppc.c: reg allocator fix.
12047
12048 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
12049
12050         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
12051
12052         * inssel.brg: Optimize memset on 64 bit machines.
12053
12054         * mini-amd64.c: Fix some vararg cases.
12055
12056 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12057
12058         * mini-s390.c: Corrected macro in emit_float_to_int
12059
12060         * s390-abi.cs: Tests to exercise the s390 ABI
12061
12062 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
12063
12064         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
12065         caller saved regs.
12066
12067         * basic.cs: Add a test for add.ovf.un.
12068
12069 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
12070
12071         * mini-sparc.c: add case for OP_IDIV_UN
12072
12073 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
12074
12075         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
12076         
12077         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
12078
12079 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
12080
12081         * basic.cs: regression tests.
12082
12083         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
12084         regressions.
12085
12086 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
12087
12088         * basic.cs: Add a new test.
12089
12090         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
12091         and AOT. Various fixes and optimizations.
12092
12093         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
12094
12095 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
12096
12097         * mini-ppc.c: make sure temp regs are not used for global reg
12098         allocation.
12099
12100 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
12101
12102         * cpu-sparc.md: conv_i8 fix for 64bits
12103
12104         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
12105
12106 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
12107         
12108         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
12109         add opcode for cmp BYTE PTR [eax], imm.
12110
12111         * inssel.brg: Make memcpy and memset takes bases.
12112
12113 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
12114
12115         * *-amd64.*: More AMD64 work.
12116         
12117 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
12118
12119         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
12120         add a compare-not-equal opcode.
12121         
12122 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
12123
12124         * mini.c: Use mono_init_from_assembly instead of mono_init.
12125         
12126 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
12127
12128         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
12129
12130         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
12131
12132         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
12133
12134         * inssel.brg: 64 bit fixes.
12135
12136         * mini.h (MonoCallInst): Add some AMD64 specific data.
12137
12138         * mini.h: Add some OP_P opcodes.
12139
12140 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
12141
12142         * basic.cs: tests for 61797 and 61740
12143
12144 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
12145
12146         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
12147         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
12148
12149 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
12150
12151         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
12152
12153         * *-amd64*.*: Ongoing AMD64 work.
12154
12155 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
12156
12157         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
12158
12159         * *-amd64*: Ongoing AMD64 work.
12160
12161         * mini-arch.h: Add AMD64 support.
12162
12163         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
12164
12165         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
12166
12167         * mini-ops.h: Add new opcodes.
12168
12169         * Makefile.am: Add AMD64 support.
12170
12171         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
12172         rules into the inssel-long*.brg files.
12173
12174         * *-amd64.*: Add beginnings of AMD64 backend.
12175
12176 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
12177
12178         * mini.c (print_dfn): commenting out the code that prints
12179         the cil. With -O=deadce, this makes -v -v crash.
12180         
12181         * cpu-pentium.md: make checkthis have a length of 2
12182
12183 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
12184
12185         * mini-sparc.h: fix implementations of __builtin
12186         functions for Sun compiler for V9.
12187
12188 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
12189
12190         * mini.c: use the new stelem.ref wrapper
12191         * exceptions.cs, arrays.cs: new stelem.ref tests
12192
12193 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
12194
12195         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
12196         new XSP should work with these changes).
12197
12198 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
12199         
12200         * inssel-{long32,x86,}.brg: trivial optimizations.
12201         
12202 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
12203
12204         * mini.c: load value when emitting box operation in
12205         constrained calls.
12206
12207 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
12208
12209         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
12210         is one byte shorter than cmp DWORD PTR [eax], 0.
12211
12212 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
12213
12214         * inssel-ppc.brg: arguments on the stack are always
12215         relative to the stack pointer (spotted by Neale Ferguson).
12216
12217 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12218
12219         * exceptions-x86.c: delay appending the method name to the trace until
12220         after mono_jit_info_table_find is called, as this gets the real
12221         MonoMethod.
12222
12223 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
12224
12225         * aot.c: register roots
12226
12227 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
12228
12229         * aot.c : I could just use PLATFORM_WIN32 flag.
12230
12231 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
12232
12233         * aot.c : Reverting the previous fix. This time it broke linux build.
12234
12235 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
12236
12237         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
12238
12239 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
12240
12241         * mini.c (handle_stack_args): Remove some more debugging code.
12242         
12243         * mini.c (handle_stack_args): Remove debug output left in by mistake.
12244
12245         * driver.c mini.h aot.c: Allow additional options to be specified with
12246         --aot and pass them to mono_compile_assembly.
12247
12248         * aot.c: Add experimental code to AOT compile all loaded assemblies
12249         on demand and save the code into a cache in the filesystem.
12250
12251         * aot.c: Add support for more wrapper methods.
12252         
12253         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
12254         58863.
12255
12256         * cpu-*.md: Remove removed opcodes.
12257
12258         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
12259         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
12260         related icalls to marshal.c.
12261
12262 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
12263
12264         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
12265
12266         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
12267
12268         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
12269
12270 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
12271         * liveness.c: If liveness is recomputated we need to reset the information
12272         for each variable. This way, if the liveness range has been narrowed
12273         by optimizations that happened after the last computation, we can return
12274         a smaller range.
12275         
12276         For example, if you have
12277         
12278         {
12279                 int i = 0;
12280                 
12281                 // Tons of code that does not affect i
12282                 
12283                 i = foo ();
12284                 ...
12285         }
12286         
12287         i = 0 is dead code and will be removed by SSA. However, when
12288         linear scan gets to the code, i will still appear to be live
12289         throughout the entire block. This prevents good register allocation.
12290
12291 2004-07-06  Martin Baulig  <martin@ximian.com>
12292
12293         * debug-mini.c (mono_debug_init_method): Allow
12294         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
12295         (mono_debug_add_icall_wrapper): New method.
12296
12297         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
12298
12299 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
12300
12301         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
12302         optimization.
12303
12304 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
12305
12306         * aot.c (mono_aot_load_method): Fix loading of debug info.
12307
12308 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
12309
12310         * aot.c: Add logging support.
12311
12312 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
12313
12314         * mini.h: Add prototype for mono_print_method_from_ip.
12315
12316         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
12317
12318         * inssel.brg: 64 bit fixes.
12319
12320         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
12321         inssel-long32.brg.
12322
12323         * Makefile.am: Add SPARC64 support.
12324
12325 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
12326
12327         * aot.c: Fix alignment problems on 32 bit platforms.
12328
12329 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
12330
12331         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
12332         SPARC64.
12333
12334         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
12335         problems.
12336
12337         * mini.h: Bump AOT file version. Some 64 bit fixes.
12338
12339 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
12340
12341         * inssel-sparc.brg: Add new rule to avoid register moves.
12342
12343         * inssel.brg: Add ldind_to_load_membase helper function.
12344
12345 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
12346
12347         * mini.c: OffsetToStringData intrinsic.
12348         
12349 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
12350
12351         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
12352
12353         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
12354         regression tests.
12355
12356         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
12357 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
12358
12359         * mini.c: reinstated mono_compile_get_interface_var()
12360         on x86, too, since the change breaks the Gtk# build there as well.
12361
12362 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12363
12364         * driver.c: remove loop from the default optimizations: it seems to
12365         interact badly with some of the other options (see bug #60613).
12366
12367 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
12368
12369         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
12370         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
12371
12372 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
12373
12374         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
12375         vararg-using methods.
12376
12377 2004-06-21  Martin Baulig  <martin@ximian.com>
12378
12379         * mini/mini-exceptions.c
12380         (mono_handle_exception): Added `gpointer original_ip' argument.
12381         After calling mono_unhandled_exception(), call
12382         mono_debugger_unhandled_exception() and if that returns true,
12383         restore the context and return.
12384
12385 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
12386
12387         * mini-ppc.c: prefer the use of relative branches so
12388         they won't need to be patched in aot code (patch from Patrick Beard).
12389
12390 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
12391
12392         * aot.c: patch from Patrick Beard to make the output assembly
12393         more correct for the MacOSX assembler. Small tweak to
12394         generate sane images on Linux/PPC, too.
12395
12396 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12397
12398         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
12399         case until bug #59509 is fixed (shows up in #60332).
12400
12401 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12402
12403         * mini.c: make sure the needed wrappers are compiled, too, with
12404         precomp.
12405
12406 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
12407
12408         * driver.c: remove NPTL reference in --version output.
12409
12410 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12411
12412         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
12413         generate valid assembly for the Mach-O assembler.
12414
12415 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
12416
12417         * driver.c: don't include abcrem in the all optimization specifier
12418         since it slows down jit compilation too much for now.
12419
12420 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
12421
12422         * mini.c: use BIGMUL only if both operands have the same signage.
12423         * iltests.il: Test for bug 60056. (errors related to signage in
12424         BIGMUL).
12425
12426         r=lupus.
12427
12428 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
12429
12430         * mini.c, aot.c: memory leak fixes.
12431
12432 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
12433
12434         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
12435
12436 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
12437
12438         * Makefile.am: remove the -static hack completely, it links in
12439         statically glib as well.
12440
12441 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
12442
12443         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
12444         * exceptions.cs: make it compile with new mcs/csc.
12445
12446 2004-06-03 Massimiliano Mantione <massi@ximian.com>
12447         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
12448         and added relevant test case.
12449
12450 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
12451
12452         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
12453         regressions in gtk-sharp.
12454
12455 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
12456
12457         * exceptions.cs: New regression tests.
12458
12459         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
12460
12461 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
12462
12463         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
12464
12465 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
12466
12467         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
12468
12469         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
12470
12471 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
12472
12473         * mini.c (mono_jit_runtime_invoke): Init class in this
12474         method instead of trusting mono_jit_compile_method to
12475         do the work (because wrappers can be in object class)
12476
12477 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
12478
12479         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
12480
12481         * basic-long.cs: New regression test.
12482
12483 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
12484
12485         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
12486         and div/rem checks.
12487
12488 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
12489
12490         * Makefile.am: fix miguel's change to build mono statically against
12491         libmono (track build dependencies).
12492
12493 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
12494
12495         * cfold.c: Some glib versions do not have G_MININT32.
12496
12497 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
12498
12499         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
12500         with precision of tan, atan, sin and cos, and implemented related
12501         regressions tests (fixes bug 54467, but one new problem appeared and
12502         is not fixed yet).
12503
12504 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
12505
12506         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
12507
12508         * exceptions.cs: Add test for constant folding && division by zero.
12509
12510         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
12511         since driver.c is in libmono too, so the optimization was useless.
12512
12513         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
12514         variable to driver.c so the compiler can emit more efficient code to
12515         access them.
12516
12517 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12518
12519         * Makefile.am: don't distribute generated inssel.[ch] files.
12520
12521 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
12522
12523         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
12524         into the default appdomain. Fixes #58707.
12525
12526         * jit-icalls.c: Remove the broken approximation for truncl, doing
12527         no conversion is better.
12528
12529         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
12530         Fixes #58863.
12531
12532 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
12533
12534         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
12535         of the mcrxr instruction which is not available on some processors
12536         even if it's documented to be. Implement add and sub overflow correctly
12537         (still not complete for long unsigned). Speed up icalls a bit.
12538
12539 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
12540
12541         * mini.c (mono_jit_compile_method_with_opt): Make sure that
12542         we run .cctor in the current domain instead of target_domain.
12543         
12544         Fixes bug #58558, .cctor not being called in -O=shared.
12545
12546 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
12547
12548         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
12549
12550 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
12551
12552         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
12553         which can be done with an imm8, do it that way.
12554         (mono_arch_output_basic_block): ditto for a jmp
12555         (mono_arch_emit_prolog): Computate maximum offset of a label.
12556
12557 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
12558
12559         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
12560         now tries to allocate prefered physical reg's for virtual
12561         regs. This reduces the number of emited spills/loads with
12562         20-30% on our core assemblies.
12563
12564 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12565
12566         * jit-icalls.c: truncl() is not needed and trunc() is
12567         the correct thing to do anyway (bug #58287).
12568
12569 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
12570
12571         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
12572         if available.
12573
12574 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
12575
12576         * driver.c: enable loop optimizations by default.
12577
12578 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
12579
12580         * mini-x86.c: fix calc of max loop size when aligning loops start.
12581
12582 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
12583
12584         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
12585         the stack.
12586
12587 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
12588
12589         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
12590         should set carry.
12591
12592         * basic-long.cs: Add tests for add/subtract of immediates with carry.
12593
12594         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
12595         
12596         * mini.c (inline_method): Allways inline some wrappers even if the cost
12597         is too large. Fixes #58785.
12598
12599         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
12600         
12601 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
12602
12603         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
12604         (crichton@gimp.org). Beginning of support for sparc/linux.
12605
12606         * mini-sparc.c: Optimize retrieval of LMF address.
12607
12608 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
12609
12610         * exceptions-ppc.c:  handle alloca in methods with clauses.
12611
12612 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
12613
12614         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
12615
12616 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
12617
12618         * mini.c: Delegate most of the abort signal work to 
12619           mono_thread_request_interruption, which also handles Stop and Suspend
12620           states.
12621
12622 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
12623
12624         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
12625         supports the save/restore lmf opcodes.
12626
12627 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
12628
12629         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
12630         by gcc-3.4 as well.
12631
12632         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
12633
12634 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
12635
12636         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
12637         methods which contain array accesses.
12638
12639         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
12640         boundaries. Fixes #58537.
12641
12642         * iltests.il: Add regression test for #58537.
12643
12644 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
12645
12646         * mini-x86.c (mono_arch_local_regalloc): Last part of
12647         fix for bug #58633 (releasing register to early).
12648
12649 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
12650
12651         * basic-long.cs: Add new regression test.
12652
12653 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
12654
12655         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
12656         register too early on the chain.
12657
12658 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
12659
12660         * mini.c (create_helper_signature): Use a helper function to reduce
12661         the code which needs to be written. Also set the calling convention of
12662         icalls on windows. Fixes #57840.
12663
12664 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
12665
12666         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
12667         exceptions-ppc.c: added helper function to get the instruction address
12668         from a signal handler context.
12669
12670 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
12671
12672         * helpers.c: use g_get_tmp_dir. Invokes happyness 
12673         from gonzalo.
12674
12675 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
12676
12677         * helpers.c: Add new env variable to pass args to objdump.
12678         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
12679
12680 2004-05-17  Radek Doulik  <rodo@ximian.com>
12681
12682         * Makefile.am (common_sources): added abcremoval.h so it get
12683         disted and daily mono packages on go-mono.com will build again
12684
12685 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
12686
12687         * abcremoval.c: Fixed coding style, added copyright header.
12688
12689         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
12690
12691         * mini.h: Added prototype for abc removal main function.
12692
12693         * build_relations_propagation_table.pl: Added copyright header.
12694
12695 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
12696
12697         * basic-long.cs: reg test for complex ceq_long bug.
12698
12699 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
12700
12701         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
12702         reg in long and clob case (bug #58343). Fixed/added comments.
12703
12704 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
12705
12706         * mini.c (mono_jit_runtime_invoke): Follow new convention
12707         of calling the invoke method with an function pointer.
12708
12709 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
12710
12711         * ChangeLog: Fix author of memory leak patch.
12712
12713 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
12714
12715         * Makefile.am: fix make dist as well...
12716
12717
12718 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
12719
12720         * cfold.c: Made so that conversions from pointer to int4 are no-ops
12721         on archs where pointers are 4 bytes long.
12722
12723         * Makefile.am: Added abcremoval.c source file.
12724
12725         * abcremoval.c: Added abcremoval.c.
12726
12727         * abcremoval.h: Added abcremoval.h.
12728
12729         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
12730
12731         * inssel.brg: Enabled bounds check removal.
12732
12733         * mini.c: Added support for abcrem optimization.
12734
12735         * mini.h: Added abcrem optimization label.
12736
12737         * driver.c: Added support for abcrem optimization.
12738
12739         * propagated_relations_table.def: Added propagated_relations_table.def.
12740
12741 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
12742
12743         * mini.c, cfold.c: fix style.
12744
12745 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
12746
12747         * mini.c: handle issue with the low-level implementation of
12748         some long opcodes (bug #54209).
12749
12750 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
12751
12752         * basic.cs: test for my new cmov stuff.
12753
12754 2004-05-13      Patrik Torstensson
12755
12756         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
12757         opt and added peephole documentation.
12758
12759 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
12760
12761         * tramp-ppc.c: rewrote the generic trampoline code.
12762
12763 2004-05-11      Patrik Torstensson
12764
12765         * mini-x86.c: optimize long shl/shr asm code (one less branch)
12766
12767 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
12768
12769         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
12770
12771         * mini.h mini.c dominators.c: Applied patch from Derek Woo
12772         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
12773
12774         * mini.c: Add new icalls for AsAny marshalling.
12775
12776 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
12777
12778         * tramp-ppc.c, mini-ppc.c: more cleanups.
12779
12780 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12781
12782         * mini.c: no warnings.
12783
12784 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12785
12786         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
12787
12788 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
12789
12790         * mini.c: In the thread abort signal handler, if the thread is in the
12791         process of being stoped, don't throw the Abort exception, just stop the
12792         thread.
12793
12794 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
12795
12796         * tramp-ppc.c: removed old code.
12797
12798 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12799
12800         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
12801         do some simple speed optimizations on ppc.
12802
12803 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
12804
12805         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
12806         and large offsets in load/store.
12807
12808 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
12809
12810         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
12811         it causes regressions.
12812
12813 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
12814
12815         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
12816         support.
12817
12818 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
12819
12820         * jit-icalls.c: remove warnings.
12821         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
12822         speedups for unsafe code.
12823
12824 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
12825
12826         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
12827
12828 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
12829
12830         * basic-calls.cs: Add new regression test.
12831
12832         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
12833         more portable.
12834
12835         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
12836
12837         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
12838         is no longer used.
12839
12840 2004-05-06      Patrik Torstensson
12841
12842         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
12843         long reg allocation in any reg (not only eax:edx) and implemented 
12844         long shl/shr ops in asm instead of helpers.
12845
12846 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
12847
12848         * mini-sparc.h: Fix warnings.
12849
12850         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
12851         stack.
12852
12853         * mini-exceptions.c (mono_handle_exception): Call the filter in a
12854         separate statement for clarity.
12855
12856         * mini-sparc.c: Update status.
12857
12858 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
12859
12860         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
12861         here.
12862
12863 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12864
12865         * inssel-ppc.brg: another small pre-release workaround:
12866         we don't do overflow detection for long_sub_un.
12867
12868 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
12869
12870         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
12871         (also works around a weird ppc bug: 57957).
12872
12873 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
12874
12875         * tramp-ppc.c: trampoline fixes.
12876
12877 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
12878
12879         * mini-ppc.c: fixed typos.
12880
12881 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
12882
12883         * mini-ppc.c, exceptions-ppc.c: more code saves registers
12884         at the top of the stack. Fixed typos. Use a frame registers
12885         for all the methods with exception clauses.
12886
12887 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
12888
12889         * exceptions-ppc.c: restore fp registers.
12890
12891 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
12892
12893         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
12894         order from the stack top (moved the stack room to save the
12895         return value for trace after the param area). Fixed corruption
12896         in restoring registers on unwind.
12897
12898 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
12899
12900         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
12901
12902 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12903
12904         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
12905         and prolog/epilog for methods that use it. Allow
12906         enough param area room for varargs methods. Fix miguel's
12907         breakage in exception handling.
12908
12909 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12910
12911         * Makefile.am: run genmdesc only on current arch.
12912
12913 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12914
12915         * exceptions-x86.c:
12916         * mini-x86.h: fix the build on windows.
12917
12918 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
12919
12920         * 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.
12921
12922         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
12923
12924         * mini-exceptions.c: New file.
12925         
12926         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
12927         Move some parts of the x86 exception handling code to an 
12928         arch-independent file so it can be shared with other ports.
12929
12930 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
12931
12932         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
12933
12934 2004-04-26  David Waite  <mass@akuma.org>
12935
12936         * driver.c: remove comma from end of enumeration declaration
12937
12938 2004-04-26  Jackson Harper  <jackson@ximian.com>
12939
12940         * driver.c: parse config file before loading first assembly. This
12941         allows the user gac to be enabled/disabled. 
12942         
12943 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
12944
12945         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
12946         simpler mechanism: we do not care what is encoded initially
12947         (branch absolute or relative), we care about the code and its
12948         target.  I kept the old code for reference for now.
12949
12950         The new code tries first to determine if the jump is anywhere in
12951         the -/+32 absolute meg range, if it succeeds, it encodes using the
12952         absolute branch;  If not, it tried to find something in the
12953         relative range, if not, it uses the handle_thunk code. 
12954
12955 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
12956
12957         * exceptions-ppc.c: use the correct ip register on macosx.
12958
12959 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
12960
12961         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
12962
12963 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
12964
12965         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
12966         Raise exception on integer divide by zero by hand since the hw
12967         doesn't support it. Handle NaNs in FP compares.
12968
12969 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
12970
12971         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
12972         code reducing duplication between the platforms and enabled
12973         signal exception handling (on linux for now).
12974
12975 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
12976
12977         * exceptions-ppc.c: more macosx support.
12978
12979 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12980
12981         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
12982
12983 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
12984
12985         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
12986
12987 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
12988
12989         * iltests.il: more tests.
12990
12991 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
12992
12993         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
12994         vars as well.
12995
12996 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
12997
12998         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
12999
13000 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
13001
13002         * liveness.c: Mark variables as volatile in all basic blocks reachable
13003         from exception clauses.
13004
13005 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
13006
13007         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
13008         inlining.
13009
13010 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
13011
13012         * iltests.il, basic.cs: more tests for regalloc.
13013
13014 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13015
13016         * iltests.il: Some tests for register allocation modifications
13017         I have locally.
13018
13019 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
13020
13021         * exceptions.cs: Add regression test for bug #56782.
13022
13023         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
13024         original stack trace if an exception is rethrown. Fixes #56782. Oh,
13025         the beauty of fixing the same thing in 5 different files...
13026
13027 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
13028
13029         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
13030         methods.
13031
13032 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
13033
13034         * mini.c: Add support for STRWLPARRAY marshalling convention.
13035
13036 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
13037
13038         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
13039         to init the context to setup the regs pointer).
13040
13041 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
13042
13043         * exceptions-ppc.c: more exceptions work.
13044
13045 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13046
13047         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
13048         not allowed.
13049
13050 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
13051
13052         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
13053         can use the memory directly.
13054
13055         * cpu-pentium.md: Update documentation from a post from Zoltan. 
13056
13057         add x86_add_membase, x86_sub_membase, x86_mul_membase
13058
13059 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
13060
13061         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
13062         GENERAL_REGS they were also hardcoded for all PPC ports.
13063
13064         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
13065
13066         Remove hard-coded limit for floating point registers, use
13067         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
13068
13069         Notice that in MacOS X calling conventions you can fit a lot more
13070         floating point values in registers, so I should update the PInvoke
13071         test to excercise the passing of floating point values on the
13072         stack (currently broken).
13073         
13074 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
13075
13076         * tramp-ppc.c (create_trampoline_code): Added
13077         JUMP_TRAMPOLINE_SIZE. 
13078         (ppc_magic_trampoline): Follow the pattern from
13079         x86_magic_trampoline: if code is set to zero, return. 
13080         (create_trampoline_code): Always pass MonoMethod to the jump
13081         trampoline, before it was passing a null.
13082         (mono_arch_create_jump_trampoline): Implement the jump stub, could
13083         share the code with mono_arch_create_jit_trampoline. 
13084
13085         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
13086         implemented.
13087         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
13088         implemented.  
13089
13090         * cpu-g4.md: Added length for jmp instruction, the worst case
13091         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
13092         for save_lmf).
13093
13094 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
13095
13096         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
13097
13098 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
13099
13100         * mini.c: Only set bblock->real_offset when adding a new bblock, and
13101         before each IL instruction.
13102
13103         * mini.c (CEE_BOX): Fix warnings.
13104
13105 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13106
13107         * mini.c: removed a few unused vars and extra whitespace.
13108
13109 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
13110
13111         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
13112         checks.
13113         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
13114         index.
13115         (OP_GETCHR): use the above
13116         (CEE_LDELEMA): use the above.
13117
13118         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
13119         version of the generic impl.
13120         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
13121         (CEE_LDELEMA): use the above.
13122
13123 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
13124
13125         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
13126         Fixes #56317.
13127
13128         * iltests.il: Added new regression test for #56317.
13129
13130 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
13131
13132         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
13133         under NetBSD. Fixes #56450.
13134
13135         * liveness.c (update_gen_kill_set): Fix previous patch.
13136
13137 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13138
13139         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
13140
13141 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
13142
13143         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
13144         ldsfld and ldsflda.
13145
13146         * inssel-sparc.brg: Add more optimizations.
13147
13148         * mini-sparc.c: Replace multiply/divide with shifts if possible.
13149
13150 2004-04-01  Martin Baulig  <martin@ximian.com>
13151
13152         * mini.c (handle_box): New static function; moved the
13153         implementation of CEE_BOX here.
13154         (mono_method_to_ir): Added `constrained_call' variable.
13155         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
13156         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
13157         mono_method_get_constrained() to get the method.
13158
13159 2004-04-01  Martin Baulig  <martin@ximian.com>
13160
13161         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
13162         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
13163         (mono_method_to_ir): We don't need these macros anymore since
13164         mono_class_get_full() already takes care of it. 
13165
13166 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13167
13168         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
13169         use @function (as doesn't accept #function here) and check the return
13170         value of system and stop if fails.
13171
13172 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13173
13174         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
13175
13176 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
13177
13178         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
13179
13180         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
13181
13182         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
13183         #56223.
13184
13185         * basic-long.cs: Add test for negation of Int64.MinValue.
13186
13187 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
13188
13189         * mini-sparc.c: Update status.
13190
13191         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
13192
13193         * exceptions-sparc.c: Fix return value in filters.
13194
13195         * inssel-sparc.brg: Fix register allocation in some rules.
13196
13197 2004-03-28  Martin Baulig  <martin@ximian.com>
13198
13199         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
13200         if neccessary.  
13201
13202 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
13203
13204         * mini-x86.c (mono_arch_patch_code): Fix warnings.
13205         
13206         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
13207         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
13208         remove unused conv_u4 opcode.
13209
13210         * mini-x86.c: Remove valgrind workaround since it slows down things
13211         even when mono is not run under valgrind.
13212
13213 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
13214
13215         * mini-sparc.c: Update status.
13216
13217         * inssel-sparc.brg: Add some optimizations.
13218
13219         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
13220         future delay slot filling. Add support for varargs, tail calls and JMP.
13221
13222         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
13223         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
13224
13225         * inssel.brg: Fix register allocation in OP_ARGLIST.
13226
13227         * inssel.brg: Fix warnings.
13228
13229 2004-03-25  Martin Baulig  <martin@ximian.com>
13230
13231         * mini.c (inflate_generic_field): Removed.
13232         (mini_get_method): Removed, use mono_get_method_full(),
13233         (mini_get_class): Removed, use mono_class_get_full().
13234         (mono_method_to_ir): Pass our generic context to
13235         mono_field_from_token().        
13236
13237 2004-03-25  Martin Baulig  <martin@ximian.com>
13238
13239         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
13240         of a `MonoMethod *'.
13241         (mini_get_method): Take a `MonoGenericContext *' instead
13242         of a `MonoMethod *'.
13243         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
13244         a new local variable called `generic_context' which holds the
13245         current `MonoGenericContext *'; use it to lookup things.
13246
13247 2004-03-24  Martin Baulig  <martin@ximian.com>
13248
13249         * mini.c (mini_get_class): New static method; if we're inside a
13250         generic instance, inflate the class if neccessary.
13251         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
13252
13253 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
13254
13255         * iltests.il: New regression test for #55976.
13256
13257         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
13258         #55976.
13259
13260 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
13261
13262         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
13263         output.
13264
13265 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
13266
13267         * liveness.c: Consider SSA stores as well as loads when making vars
13268         volatile.
13269
13270         * exceptions.cs: New regression tests for register allocation.
13271         
13272 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
13273
13274         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
13275         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
13276           domain lock only to protect puntual access to data structures.
13277           Added access lock for sighash, jit_icall_hash_name, 
13278           jit_icall_hash_addr and domain->code_mp.
13279
13280 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
13281
13282         * driver.c: Print SIGSEGV handling method.
13283
13284         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
13285
13286         * mini.c (setup_jit_tls_data): Handle case when this is called
13287         multiple times for a thread.
13288
13289         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
13290         is different from fbxx_un. Fixes #54303. Also use constants instead of
13291         magic numbers in a lot of places.
13292
13293 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
13294
13295         * exceptions.cs: Fix cctor test when --regression is used.
13296
13297 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
13298
13299         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
13300         for Linux/ppc.
13301
13302 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
13303
13304         * inssel-ppc.brg: fixed register assignments for some rules.
13305
13306 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
13307
13308         * exceptions.cs: Add test for exceptions in static constructors.
13309
13310         * mini.c (mono_jit_compile_method_with_out): Move the calling of
13311         static constructors outside the domain lock. Fixes #55720.
13312
13313 2004-03-17  Martin Baulig  <martin@ximian.com>
13314
13315         * mini.c (get_generic_field_inst): Removed, this'll never happen.
13316         (inflate_generic_field): Take the `MonoMethod *' instead of the
13317         `MonoClass *' and added support for generic method.
13318         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
13319         have a `field->parent->gen_params', only inflate the field if it's
13320         an open constructed type.
13321
13322 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
13323
13324         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
13325         exception object instead of the preconstructed ones.
13326
13327 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13328
13329         * mini.c: reverted changed to sigsegv_signal_handler commited
13330         accidentally in the previous patch.
13331
13332 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13333
13334         * mini.c:
13335         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
13336         running --aot with an old assembly.
13337
13338 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
13339
13340         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
13341         point values.
13342
13343         * mini-sparc.c: Add support for v9 branches with prediction.
13344
13345 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
13346
13347         * mini.c (mini_init): #warning is GNUC only
13348
13349         * mini-sparc.h: implement __builtin_frame_address
13350         and __builtin_return_address for Sun C compiler
13351
13352 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
13353
13354         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
13355
13356 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
13357
13358         * basic-calls.cs: Add test for unaligned byref long argument passing.
13359
13360         * mini-ops.h: Add sparcv9 compare and branch instructions.
13361
13362         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
13363         v9 instructions if we have a v9 cpu.
13364
13365         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
13366         registers for global allocation.
13367
13368         * exceptions-sparc.c: Fixes.
13369         
13370 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
13371
13372         * liveness.c (mono_analyze_liveness): Optimized version.
13373
13374         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
13375
13376         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
13377         sparc work.
13378
13379         * basic-float.cs basic-calls.cs: New regression tests.
13380
13381 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
13382
13383         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
13384         sigaltstack implementation.
13385
13386         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
13387         
13388         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
13389         stuff if SIGSEGV_ON_ALTSTACK is not defined.
13390
13391 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
13392
13393         * mini.c: Fix warnings.
13394         
13395         * mini.c (mono_resolve_patch_target): New function which contains the
13396         arch independent part of the patching process.
13397
13398         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
13399         patching code to a separate function.
13400
13401 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
13402
13403         * mini.c (add_signal_handler): ifdef out on Windows
13404
13405 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
13406
13407         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
13408         cpu-sparc.md: Add exception handling support + other fixes.
13409
13410         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
13411         typed GC detection in --version.
13412
13413         * basic.cs exceptions.cs: New regression tests.
13414
13415         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
13416         the arch specific code can store data during a compilation.
13417
13418         * mini-ops.h: Add OP_SETFRET.
13419
13420         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
13421         function, register a separate icall for each arity, so the icalls can
13422         get a wrapper.
13423         
13424         * mini.c (mono_print_tree): Print negative offsets in a more readable
13425         form.
13426         
13427         * mini.c: Make signal handling work on sparc.
13428         
13429         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
13430
13431         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
13432
13433         * jit-icalls.c: Emulate truncl by aintl on solaris.
13434
13435         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
13436
13437 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
13438
13439         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
13440
13441 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
13442
13443         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
13444         a MarshalByRef type, inline a method that performs the check, taking into
13445         account that the object can be a proxy. Also implemented tow new opcodes:
13446         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
13447         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
13448         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
13449
13450 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
13451
13452         * mini-ppc.c: if a relative branch displacement is too big
13453         but it points to and area reachable with an absolute branch, 
13454         avoid the thunks.
13455
13456 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
13457
13458         * mini.c: optimize small copies in cpblk.
13459
13460 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
13461
13462         * basic-calls.cs basic-float.cs: New regression tests.
13463
13464         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
13465         negative offsets from %fp. Implement localloc. Fix local register 
13466         allocation. Fix the case when the this argument needs to be saved to
13467         the stack. Implement some missing opcodes.
13468
13469 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
13470
13471         * mini.c (mini_method_compile): Reenable global regalloc in methods
13472         with exception handlers.
13473
13474         * linear-scan.c (mono_varlist_sort): Fix warning.
13475
13476         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
13477
13478         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
13479         regalloc costs.
13480
13481         * liveness.c: Make all variables uses in exception clauses volatile, to
13482         prevent them from being allocated to registers. Fixes #42136.
13483
13484 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
13485
13486         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
13487         causes regressions.
13488
13489         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
13490         argument to mono_arch_regalloc_cost.
13491
13492         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
13493         precisely.
13494
13495 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
13496
13497         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
13498         Make the cost of allocating a variable to a register arch dependent.
13499
13500         * basic-calls.cs: Fix compilation of tests.
13501         
13502         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
13503         helper function to cut back on the number of #ifdefs needed.
13504
13505         * mini-ppc.c: Fix compilation.
13506
13507         * basic-calls.cs: New regression tests.
13508
13509         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
13510
13511         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
13512         of l0 since that is callee saved.
13513
13514         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
13515         to virtual calls.
13516
13517         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
13518         of delay instruction.
13519
13520         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
13521
13522         * mini.h (MonoCallInst): Add 'virtual' flag.
13523
13524         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
13525
13526 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
13527
13528         * *.cs: New regression tests.
13529
13530         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
13531         work.
13532
13533         * mini.c (mono_runtime_install_handlers): Fix build.
13534
13535         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
13536         'signal_stack_size' members.
13537
13538         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
13539         alternate signal stack.
13540
13541         * exceptions-x86.c: Add stack overflow handling.
13542
13543         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
13544         functions to arch independent code.
13545
13546         * mini.c (mono_print_tree): Print more detailed info for load_membase
13547         opcodes.
13548         
13549 2004-02-23  Martin Baulig  <martin@ximian.com>
13550
13551         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
13552
13553 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
13554
13555         * mini-x86.c: fixed reg allocation for div/rem.
13556
13557 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
13558
13559         * driver.c (mono_main): Report some configuratio options on --version.
13560
13561 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
13562
13563         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
13564         low in the address space. Correctly flush memory in thunks where we
13565         output native code.
13566
13567 2004-02-20  Martin Baulig  <martin@ximian.com>
13568
13569         * mini.c (mini_get_method): New static method; inflate all generic
13570         methods and methods in open generic instances.
13571         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
13572         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
13573
13574 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
13575
13576         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
13577
13578         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
13579
13580 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
13581
13582         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
13583
13584         * mini-sparc.c (flushi mono_arch_output_basic_block): make
13585         it compile using Sun's compiler.
13586
13587 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
13588
13589         * 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.
13590
13591         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
13592
13593 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
13594
13595         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
13596         code.
13597         * mini-ppc.c: handle calls outside of the allowed range with thunks
13598         allocated using the code manager.
13599         * tramp-ppc.c: use the code manager to hold generated native code.
13600         Fixed the magic trampoline to just patch vtable entries.
13601
13602 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
13603
13604         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
13605         independent file.
13606
13607 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
13608
13609         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
13610         PPC.
13611
13612         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
13613         if we have a working __thread implementation.
13614
13615         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
13616         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
13617
13618 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
13619
13620         * mini-x86.c: Fix compilation under gcc 2.
13621         
13622 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
13623
13624         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
13625         contains a call to the wrapped function.
13626
13627         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
13628         OP_<CALL>_IMM opcodes, and use them under X86.
13629         
13630         * mini.c (mono_jit_find_compiled_method): Fix warning.
13631
13632         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
13633
13634         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
13635
13636         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
13637         functionality to mini.c.
13638
13639         * mini.c (mono_create_jump_trampoline): New function to create a jump
13640         trampoline. Return a compiled method instead of a trampoline if it
13641         exists. Add a cache for jump trampolines.
13642
13643         * mini.c (mono_jit_find_compiled_method): New function to return a
13644         compiled method if it exists.
13645
13646         * mini-x86.c: Call mono_create_jump_trampoline instead of 
13647         mono_arch_create_jit_trampoline.
13648
13649         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
13650         a jump trampoline. Fixes #52092.
13651         
13652 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
13653
13654         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
13655         which is not up-to-date. Add check_corlib_version () instead.
13656
13657         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
13658         have to call it.
13659         
13660         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
13661         since newer valgrind versions do not need it.
13662
13663         * mini.c (mono_jit_compile_method_with_opt): New helper function to
13664         compile a method with a given set of optimizations.
13665
13666         * mini.c: Compile icall wrappers on-demand instead of at startup.
13667
13668         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
13669         wrapper for an icall.
13670
13671 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
13672
13673         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
13674         #54063.
13675
13676         * iltests.il: Add test for non-empty stack before switch instruction.
13677
13678 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
13679
13680         * mini.c: Add support for new stringbuilder marshalling conventions.
13681
13682         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
13683
13684 2004-02-01  Martin Baulig  <martin@ximian.com>
13685
13686         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
13687         in `ginst->mtype_argv'.
13688
13689 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
13690
13691         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
13692         facilitate grepping.
13693
13694 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
13695
13696         * mini.c: fixed buglet in initobj generic implementation for references.
13697
13698 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
13699
13700         * Makefile.am: make the version script conditional.
13701         * jit-icalls.c: handle missing truncl().
13702
13703 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
13704
13705         * exceptions.cs: Add more tests for double->int conversion.
13706
13707         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
13708         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
13709
13710 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
13711
13712         * driver.c: make --verbose --version emit an error
13713         if the loaded corlib doesn't match the runtime version.
13714
13715 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
13716
13717         * mini-ppc.h: export ppc_patch().
13718         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
13719         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
13720         on par or better than on MacOSX.
13721
13722 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
13723
13724         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
13725         mono_lookup_pinvoke_call.
13726
13727         * mini-x86.c: Under windows, the default pinvoke calling convention is
13728         stdcall. Fixes #52834.
13729
13730         * mini.c (optimize_branches): Add an upper bound to the number of
13731         iterations to prevent infinite loops on strange loops. Fixes #53003.
13732
13733 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
13734
13735         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
13736         and ISINST. Fixes #52093.
13737
13738         * objects.cs (test_0_vector_array_cast): New tests.
13739         
13740 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
13741
13742         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
13743         checking in Array.Set ().
13744
13745         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
13746         #52590.
13747
13748         * object.cs (test_0_multi_array_cast): New regression test.
13749
13750 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
13751
13752         * exceptions-ppc.c: fix build on Linux/PPC.
13753
13754 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
13755
13756         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
13757         running under valgrind.
13758         (x86_magic_trampoline): Fix build bustage.
13759
13760         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
13761         negative values as well. This is needed for the encoding of the line number
13762         info, since sometimes the line numbers are not in increasing order.
13763
13764 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
13765
13766         * cpu-pentium.md (localloc): Increase the size of the localloc 
13767         instruction since it is a loop under Win32.
13768
13769         * debug-mini.c (record_line_number): Get rid of unneccesary memory
13770         allocation.
13771
13772 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
13773
13774         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
13775         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
13776         Max Horn (max@quendi.de). Fix file names in comments.
13777
13778 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
13779
13780         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
13781         avoid stack overflow.
13782         (replace_usage): Avoid uninitialized variable warnings.
13783
13784         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
13785         and taking the address of valuetype variables.
13786
13787 2004-01-03  Patrik Torstensson
13788
13789         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
13790         for other purposes than FP later on.
13791
13792 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
13793
13794         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
13795         of tail calls.
13796
13797 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
13798
13799         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
13800
13801 2003-12-30  Patrik Torstensson <p@rxc.se>
13802
13803         * mini-x86.h: Decreased number of availiable fp regs.
13804         Solves corner cases with FP spilling.
13805
13806 2003-12-23  Patrik Torstensson <p@rxc.se>
13807
13808         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
13809         for floating point stack tracking / spilling on x86. 
13810         Fixes bug #49012.
13811         
13812         * basic-float.cs: added float mul overflow test.
13813
13814 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
13815
13816         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
13817
13818 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
13819
13820         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
13821         supports for cond branches that overflow the immediate
13822         overflow offset. mcs can compile simple programs.
13823
13824 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
13825
13826         * exceptions-ppc.c: exception handling support wip:
13827         finally handlers get run on exception.
13828
13829 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
13830
13831         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
13832         profiling.
13833
13834 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
13835
13836         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
13837         initial support for stack walking and unwinding.
13838
13839 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
13840
13841         * driver.c (mono_main): Make corlib-out-of-sync message more 
13842         descriptive. Also remove verify_corlib call.
13843
13844 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
13845
13846         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
13847         not overlap with other call's arguments, too.
13848
13849 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
13850
13851         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
13852         move to arch-specific code the choice of arch-specific
13853         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
13854         * mini.c: ensure emulation calls will not interleave
13855         with other calls.
13856
13857 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
13858
13859         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
13860         the magic trampoline stack frame is dropped before executing
13861         the new method.
13862
13863 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
13864
13865         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
13866         and integer to fp conversions. Added support for overflowing
13867         arguments on the stack. Reserve a couple more registers as temps.
13868         Added support for aot compilation (as output still needs to be
13869         tweaked, though).
13870
13871 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
13872
13873         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
13874         Don't overwrite return register in some corner cases.
13875
13876 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
13877
13878         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
13879         static constructors when AOT compiling.
13880
13881         * driver.c (mono_main): Call mono_check_corlib_version.
13882
13883 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
13884
13885         * cpu-g4.md, basic.cs: fixed div target register.
13886
13887 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
13888
13889         * mini-ppc.c, basic.cs: shl_imm fix with test.
13890
13891 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
13892
13893         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
13894         structures by value. Misc fixes.
13895         * objects.cs: more tests.
13896
13897 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
13898
13899         * mini-ppc.c: lconv.ovf.i implemented.
13900
13901 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13902
13903         * mini.c:
13904         (mini_init): don't error out if someone already called g_thread_init.
13905
13906 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
13907
13908         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
13909         to be any type per the spec. Fix abnormal memory usage when
13910         the same object is repeatedly thrown.
13911
13912 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
13913
13914         * mini.c: check for overruns in IL code.
13915
13916 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
13917
13918         * TODO: Add/remove some todo entries.
13919
13920 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
13921
13922         * driver.c (mono_main): Call mono_verify_corlib.
13923
13924 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
13925
13926         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
13927         This has been moved to mini.c
13928         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
13929         type being casted is marshalbyref it could be a proxy, so instead of
13930         emitting the type check code, emit a call to a runtime method that will
13931         perform the check by calling CanCastTo if needed.
13932
13933 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
13934
13935         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
13936         methods with large stack frames under Win32.
13937
13938 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
13939
13940         * Makefile.am: Distribute regression tests.
13941
13942         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
13943         at the end instead of inserting each variable into the sorted list.
13944
13945         * linear-scan.c (mono_varlist_sort): New helper function.
13946         
13947 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
13948
13949         * mini.c: ensure arguments and locals are within bounds.
13950
13951 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
13952
13953         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
13954         related fixes.
13955
13956 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
13957
13958         * mini.c (mono_cprop_copy_values): Fix crash.
13959
13960         * aot.c: Set verbosity back to 0.
13961         
13962 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
13963
13964         * regalloc.c: complete memory leak fix by Laurent Morichetti
13965         (l_m@pacbell.net).
13966
13967 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
13968
13969         * driver.c (main_thread_handler): Revert the previous patch.
13970
13971         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
13972         under valgrind.
13973
13974         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
13975         memory from the memory pool.
13976
13977         * driver.c (main_thread_handler): Turn on all optimizations when
13978         --aot is used.
13979
13980         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
13981         an array for better performance.
13982
13983         * regalloc.c (mono_regstate_assign): Fix memory leak.
13984
13985         * debug-mini.c (mono_debug_serialize_debug_info): New function to
13986         serialize the debug info.
13987
13988         * debug-mini.c (mono_debug_add_aot_method): New function to load the
13989         debug info from the serialized representation.
13990
13991         * aot.c: Save debug info into the generated file and load it when 
13992         loading a method.
13993
13994         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
13995
13996 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
13997
13998         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
13999         More FP-related fixes.
14000
14001 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
14002
14003         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
14004         and register allocation buglet. Hello world now runs.
14005
14006 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
14007
14008         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
14009         * tramp-ppc.c: fixed class init trampoline.
14010         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
14011
14012 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
14013
14014         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
14015         mini.c: more ppc changes/fixes.
14016
14017 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
14018
14019         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
14020         Also optimize the case when the arguments are the same in the caller 
14021         and in the callee.
14022
14023         * iltests.il: Add tests for tail calls with valuetype arguments.
14024
14025 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
14026
14027         * mini-ppc.c: fixes for struct return type.
14028
14029 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
14030
14031         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
14032         mono_spillvar_offset() to arch-specific code.
14033
14034 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
14035
14036         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
14037
14038 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
14039
14040         * exceptions-x86.c: Fix stack space leaks.
14041         
14042         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
14043         registers from the lmf if the method has save_lmf set.
14044
14045 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
14046
14047         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
14048         of icall wrappers into InvokeInDomain, since these are now per-domain.
14049
14050 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
14051
14052         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
14053         make some opcode emulation and intrinsic ops enabled/disabled 
14054         according to the architecture. More fixes.
14055
14056 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
14057
14058         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
14059
14060 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
14061
14062         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
14063         arch-specific handling for 'this' and struct return type to
14064         arch-specific code.
14065
14066 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14067
14068         * aot.c: prevent divide by zero error when reporting (it happened with
14069         Accessibility.dll).
14070
14071 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
14072
14073         * mini.h (inst_switch): Remove unused macro.
14074
14075 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14076
14077         * aot.c:
14078         (load_aot_module): free 'info->methods' and 'info' properly. No more
14079         "free(): invalid pointer blah" messages when you have an old aot
14080         compiled assembly.
14081
14082 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
14083
14084         * jit-icalls.c, mini.c: Added support for context static fields.
14085
14086 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
14087
14088         * mini.c (mono_method_blittable): Methods which set LastError are not 
14089         blittable either. Fixes #51108.
14090         
14091 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
14092
14093         * mini.c: flush icache.
14094         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
14095
14096 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
14097
14098         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
14099
14100 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
14101
14102         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
14103         safe on IA32.
14104
14105         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
14106         vararg calls.
14107
14108         * inssel.brg (CEE_MKREFANY): Fix AOT case.
14109
14110 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
14111
14112         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
14113         instruction when the result is discarded.
14114
14115         * iltests.il (test_0_div_regalloc): New regression test.
14116
14117         * arrays.cs: Fix compilation error.
14118
14119 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
14120
14121         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
14122         float rules to inssel-x86.brg: sane architectures with FP registers
14123         don't need to implement these rules.
14124
14125 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
14126
14127         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
14128
14129 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14130
14131         * mini.h, inssel-long32.brg: fixed endianess issues in int64
14132         implementation of 32 bit systems.
14133
14134 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
14135
14136         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
14137         (Jeroen Zwartepoorte).
14138
14139 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
14140
14141         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
14142         the caller and the callee matches.
14143         
14144         * mini.c (mono_method_to_ir): Add comment.
14145
14146         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
14147         signbit is missing on some platforms.
14148
14149 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
14150
14151         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
14152
14153         * mini.c (setup_jit_tls_data): Call the new function.
14154         
14155         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
14156
14157         * mini-x86.c: Add experimental support for fast access to the lmf
14158         structure under NPTL/Linux 2.6.x.
14159
14160 2003-11-06  Martin Baulig  <martin@ximian.com>
14161
14162         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
14163         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
14164         the debugger.
14165
14166 2003-11-02  Martin Baulig  <martin@ximian.com>
14167
14168         * mini.c (inflate_generic_field): New static method.
14169         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
14170         generic instance and the field is declared in a generic type, call
14171         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
14172
14173 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
14174
14175         * mini.h mini.c (mono_method_same_domain): New function to return
14176         whenever the caller and the callee are in the same domain.
14177
14178         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
14179
14180 2003-10-30  Martin Baulig  <martin@ximian.com>
14181
14182         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
14183         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
14184         method parameters.
14185         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
14186         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
14187
14188 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
14189
14190         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
14191         propagation.
14192
14193         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
14194         object here, so it is in the correct appdomain etc.
14195
14196 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
14197
14198         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
14199         already done.
14200         (mono_method_to_ir): Avoid freeing the type created returned from
14201         mono_type_create_from_typespec, since it is put into an internal cache
14202         by the function. Fixes pointer.exe.
14203
14204         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
14205         trampolines for icalls and pinvokes as well. Fixes #33569.
14206
14207 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
14208
14209         * mini.c: Update after appdomain changes.
14210
14211         * mini.c (mono_jit_compile_method_inner): Allways compile native
14212         method wrappers in the root domain, since there can only be one
14213         instance of them, whose address is stored in method->info.
14214
14215 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
14216
14217         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
14218         environment variable. Instead detect automatically whenever running
14219         under valgrind using the magic macro RUNNING_ON_VALGRIND from
14220         valgrind.h.
14221
14222 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
14223
14224         * trace.c, trace.h: New files that implement the new trace option
14225         parsing. 
14226
14227         * driver.c: Document new --trace options.
14228
14229         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
14230         mini-x86.c: Apply:
14231
14232         -       if (mono_jit_trace_calls)
14233         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
14234
14235         * mini.h: prototypes.
14236         
14237 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
14238
14239         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
14240
14241         * mini.c inssel.brg: Implement typedefbyref opcodes.
14242
14243         * mini.c (mono_jit_compile_method): Remove unused local variable.
14244
14245         * mini.c (mono_jit_compile_method_inner): Ditto.
14246         
14247 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
14248
14249         * tramp-x86.c (x86_class_init_trampoline): Fix build.
14250         
14251         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
14252
14253 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
14254
14255         * mini.c (mono_no_aot): Remove unused global variable.
14256
14257         * mini.c: Thread safety fixes.
14258
14259 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
14260
14261         * mini.c (mono_create_class_init_trampoline): Add a lock around
14262         class_init_hash_addr.
14263
14264         * arrays.cs (test_0_newarr_emulation): Add new regression test for
14265         #30073.
14266
14267         * mini.c: Decompose the NEWARR instruction before decomposing its
14268         arguments. Fixes #30073.
14269
14270 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
14271
14272         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
14273         convention.
14274
14275 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
14276
14277         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
14278
14279         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
14280
14281         * driver.c: Add support for compiling icall wrappers to --compile.
14282
14283 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
14284
14285         * inssel.brg: The empty value in class->interface_offsets is -1, not
14286         0. Fixes #49287.
14287
14288 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
14289
14290         * objects.cs: New test for 'is' operator on an array of interfaces.
14291
14292 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
14293
14294         * tramp-ppc.c: update trampoline code to support jumps
14295         and class initialization.
14296
14297 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
14298
14299         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
14300
14301         * inssel.brg (OP_UNBOXCAST): Fix #46027.
14302
14303         * inssel.brg (OP_UNBOX): Remove unused rule.
14304
14305         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
14306         region instead of one for each method. Fixes #47813.
14307
14308 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
14309
14310         * exceptions.cs (test_0_nested_finally): New regression test for
14311         nested exception handlers.
14312
14313         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
14314
14315         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
14316
14317         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
14318         inlining.
14319
14320         * mini.c (mono_method_check_inlining): Make the inlining limit 
14321         configurable by an environment variable.
14322         
14323         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
14324
14325         * mini.h: Bump AOT file version.
14326
14327         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
14328         token, store the image along with the token, since the token might not 
14329         refer to the same image as the method containing the relocation, 
14330         because of inlining.
14331
14332 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
14333
14334         * mini.c (mono_precompile_assemblies): New function to compile
14335         all methods in all loaded assemblies.
14336
14337         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
14338
14339         * regalloc.h regalloc.c (MonoRegState): Change the type of 
14340         iassign and fassign to int*, since they can contain large negative
14341         values if the register is spilled. Also added some comments. Fixes
14342         #45817.
14343
14344         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
14345         under Win32. Fixes #42964.
14346
14347 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
14348
14349         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
14350
14351         * aot.c: Added support for AOT compiling methods which contain calls
14352         to wrappers. Currently, only remoting-invoke-with-check wrappers are
14353         handled.
14354         
14355         * driver.c (compile_all_methods): Run the compilation in a thread
14356         managed by mono. Fixes #44023.
14357
14358         * mini.c (mono_codegen): Print full method name in verbose output.
14359
14360         * mini-x86.c (mono_arch_patch_code): Fix warning.
14361         
14362         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
14363         jumps, since the method we are jumping to might be domain-specific.
14364
14365         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
14366
14367 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
14368
14369         * inssel.brg: string chars are unsigned.
14370
14371 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
14372
14373         * TODO: New todo item.
14374
14375         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
14376         which calls mono_runtime_class_init and patches the call site to
14377         avoid further calls.
14378         (mono_arch_create_class_init_trampoline): New arch specific function 
14379         to create a class init trampoline.
14380         (create_trampoline_code): Generalized so it can create
14381         class init trampolines as well.
14382
14383         * mini.c (helper_sig_class_init_trampoline): New helper variable.
14384         (mono_create_class_init_trampoline): New function to create and cache
14385         class init trampolines.
14386         (mono_find_class_init_trampoline_by_addr): New function to lookup the
14387         vtable given the address of a class init trampoline. Used by the
14388         patching process.
14389         (mono_codegen): Generate a call to a trampoline instead of
14390         mono_runtime_class_init in LDSFLD[A].
14391         (mono_codegen): Add relocations for the new trampoline.
14392         
14393         * mini.h mini-x86.c aot.c: Added a new relocation type: 
14394         MONO_PATCH_INFO_CLASS_INIT.
14395
14396         * mini.h: Bump AOT version number.
14397
14398         * aot.c: Create a copy of the loaded code instead of using the original
14399         so methods which call each other will be close in memory, improving
14400         cache behaviour.
14401         
14402         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
14403         patch since it breaks the regression tests.
14404         
14405         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
14406         for the register saving instruction sequence since the 
14407         frame_state_for function in glibc 2.3.2 don't seem to detect it.
14408
14409 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
14410
14411         * TODO: Fix todo item && remove another.
14412
14413 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
14414
14415         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
14416         previous checkin.
14417
14418         * aot.c: Moved the check for MONO_LASTAOT into the initialization
14419         function of the module.
14420
14421         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
14422         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
14423         --no-aot command line option.
14424
14425 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
14426
14427         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
14428         by Bernie Solomon (bernard@ugsolutions.com).
14429
14430         * inssel.brg: Refactor the interface offset table related code into
14431         its separate functions and add support for the AOT case.
14432
14433 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
14434
14435         * aot.c (mono_aot_get_method_inner): Fix memory leak.
14436         
14437         * aot.c: Added mono_aot_verbose variable and made all debugging
14438         output depend on the value of this variable.
14439
14440         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
14441         method_label and info_label.
14442
14443         * mini.h mini-x86.c aot.c: Added a new relocation type 
14444         MONO_PATCH_INFO_IID for klass->interface_id.
14445
14446         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
14447         the MonoJitInfo structure.
14448
14449         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
14450         a non-root appdomain in shared mode.
14451
14452 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
14453
14454         * aot.c: make aot loader less verbose. Remove free of unused variable.
14455
14456 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
14457
14458         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
14459
14460         * .cvsignore: Added *.dll.
14461
14462         * mini.c (mono_print_tree_nl): New function callable while debugging.
14463
14464         * mini.c (mono_print_code): Export this.
14465
14466         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
14467         patched code.
14468
14469 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
14470
14471         * mini.h (MonoCompile): Added 'jit_info' field.
14472
14473         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
14474         the cfg structure, since it is needed by the AOT compiler.
14475
14476         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
14477
14478         * aot.c: A major rewrite. Changes include:
14479         - save exception tables for methods which have them.
14480         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
14481         to g_module_symbol.
14482         - reworked the file format so it is now much smaller and needs
14483         fewer relocation entries.
14484         
14485 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
14486
14487         * aot.c (load_aot_module): Fix build bustage on platforms without
14488         Boehm GC.
14489
14490 2003-09-04  Martin Baulig  <martin@ximian.com>
14491
14492         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
14493
14494 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
14495
14496         * TODO: Some new optimization ideas.
14497
14498         * aot.c: Move AOT module loading logic here from mono_assembly_open.
14499
14500         * aot.c: Save the optimization flags used to compile the code into
14501         the AOT module.
14502
14503         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
14504         support emitting domain specific code.
14505         
14506         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
14507         no longer domain neutral. It can be made domain neutral by compiling 
14508         with --optimize=shared.
14509
14510         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
14511         between appdomains.
14512
14513         * driver.c mini.h mini.c: New --no-aot debugging option which disables
14514         loading of AOT code.
14515
14516         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
14517         
14518         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
14519         if there is no domain neutrality information.
14520
14521 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
14522
14523         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
14524         format version into the generated library.
14525
14526         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
14527         callee method into the caller since one of them could be shared.
14528
14529         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
14530         system exceptions from AOT code now works.
14531
14532         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
14533         method if it is domain neutral and the callee is not.
14534
14535         * graph.c (cfg_emit_one_loop_level): Fix warning.
14536
14537 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
14538
14539         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
14540         last checkin.
14541
14542 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
14543
14544         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
14545         is needed  by code which is executed before mono_runtime_init ().
14546         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
14547         
14548         * mini.c (mono_thread_abort): Fix warning.
14549         (mono_jit_compile_method): Call static constructor in the AOT case too.
14550
14551         * aot.c (mono_compile_assembly): Fix warning.
14552
14553 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14554
14555         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
14556
14557 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
14558
14559         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
14560
14561         * cpu-pentium.md: Fix the length of call opcodes so they include the
14562         ESP restoring instruction. Fixes #47968.
14563
14564 2003-08-28  Martin Baulig  <martin@ximian.com>
14565
14566         * mini-x86.c (mono_arch_call_opcode): Added support for
14567         MONO_TYPE_GENERICINST.
14568
14569         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
14570
14571 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
14572
14573         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
14574         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
14575
14576         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
14577         metadata_section.
14578
14579 2003-08-26  Martin Baulig  <martin@ximian.com>
14580
14581         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
14582         when reporting an error, set this to the actual error location.
14583         (mono_method_to_ir): Report the correct error location if
14584         get_basic_blocks() returned an error.
14585
14586 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
14587
14588         * mini.c (mono_type_blittable): OBJECT is not blittable.
14589         (mono_method_blittable): Methods which have marshalling descriptors
14590         are not blittable either. Fixes #47842.
14591
14592 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
14593
14594         * driver.c mini.c: Use an environment variable instead of a global 
14595         variable. Also fix the build.
14596
14597         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
14598         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
14599         reporting this. 
14600
14601         * driver.c mini.c: Added --with-valgrind option to turn off some
14602         code which prevents mono from running under valgrind.
14603
14604         * mini.c (mono_emit_call_args): Fixed warning.
14605
14606         * mini.c (mono_emulate_opcode): Fixed warning.
14607
14608 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14609
14610         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
14611         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
14612         regalloc.c, regalloc.h: specify available registers in arch-specific
14613         code and support floats in the regallocator (patch by Laurent Morichetti 
14614         <l_m@pacbell.net>)
14615
14616 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
14617
14618         * mini.c: mono_thread_current() can be called only after
14619         mono_runtime_init(): rearrange code to not call it early on.
14620
14621 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
14622
14623         * mini.c: allocate jump tables in the code mempools.
14624
14625 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14626
14627         * mini.c, mini.h: make sure per-thread data allocated by the jit is
14628         freed.
14629
14630 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
14631
14632         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
14633         12 to 16.  This fixes bug #47453.
14634
14635
14636 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
14637
14638         * mini-ppc.c: fixed indexed load and unsigned compares.
14639
14640 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
14641
14642         * mini.c: reenabled installation of handler for
14643           thread abort signal.
14644
14645 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14646
14647         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
14648         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
14649         until it's fixed and actually useful.
14650
14651 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
14652
14653         * inssel-long32.brg: couple more opcodes implemented.
14654
14655 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
14656         
14657         * mini-sparc.c: Even more opcodes implemeted.
14658
14659 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
14660
14661         * mini-sparc.c: More opcodes implemented.
14662
14663 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
14664
14665         * mini-sparc.c: More opcodes implemented.
14666
14667 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
14668
14669         * inssel-sparc.brg: Add some needed rules.  Direct
14670         copy from PPC.
14671         * Makefile.am: Use inssel-sparc.brg
14672         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
14673         an assert happy for now.
14674
14675 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
14676
14677         * mini-sparc.c: Fixed compile errors.
14678         * exceptions-sparc.c: Same.  We now produce a mono binary 
14679         on sparc-linux.  Yea.
14680
14681 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
14682
14683         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
14684         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
14685         They compile, but do not work.
14686
14687 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14688
14689         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
14690         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
14691         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
14692         (ct@gentoo.org).
14693
14694 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14695
14696         * mini.c: more opcodes implemented and better support for generics.
14697
14698 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
14699
14700         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
14701         * mini.c, mini.h: first cut at generics support: some new instructions 
14702         added and changed the behaviour of some of the existing ones.
14703
14704 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
14705
14706         * mini.c: Removed definition of metadata_shared mutex here.
14707
14708 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
14709
14710         * mini-x86.c: make vararg calls work for instance methods.
14711
14712 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
14713
14714         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
14715         returns the arguments in a separte list, now.
14716
14717 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
14718
14719         * aot.c, mini.c: updates for array type representation changes.
14720
14721 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
14722
14723         * mini.c: register function to perform jit shutdown.
14724
14725 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14726
14727         * mini.c: use a faster allocator if possible.
14728
14729 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
14730
14731         * aot.c: some cleanups and portability changes.
14732
14733 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
14734
14735         * mini.c: use faster allocation for CEE_BOX if possible.
14736
14737 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
14738
14739         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
14740         Moved inlined mempcy code to its own function so that is can be
14741         reused. Added an inline memset function as well (optimized initobj).
14742         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
14743
14744 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
14745
14746         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
14747
14748 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
14749
14750         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
14751         arch code can setup the cpu for CLR execution, if needed.
14752         We use it on x86 to set the precision of FP operations.
14753
14754 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
14755
14756         * mini.c: disable some optimizations if we can guess they'll cost too
14757         much for a given method.
14758
14759 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
14760
14761         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
14762         
14763 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
14764         * mini.h mini.c mini-x86.c: Added instruction level coverage 
14765         info collection support.
14766
14767 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
14768
14769         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
14770         is now implemented in the profiling API. Get rid of a couple of
14771         unnecessary global variables.
14772
14773 2003-06-15  Nick Drochak <ndrochak@gol.com>
14774
14775         * basic-long.cs: tests for negative values for bigmul, and unsigned.
14776         * cpu-g4.md: add op_bigmul and op_bigmul_un
14777         * cpu_pentium.md: add op_bigmul_un
14778         * inssel-long32.brg: add rule for unsigned bigmul
14779         * mini-ops.h: define OP_BIGMUL_UN
14780         * mini-x86.c: THE BUG: handle (un)signed properly
14781         * mini.c: choose unsigned opcode if needed.
14782         This set of patches fixes bug #44291
14783
14784 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
14785
14786         * mini.c (optimize_branches): improved to handle all kinds of
14787         conditional branches.
14788
14789 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
14790
14791         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
14792         don't raise exceptions.
14793
14794 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
14795
14796         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
14797         to arch-specific files.
14798
14799 2003-06-09  Martin Baulig  <martin@ximian.com>
14800
14801         * Makefile.am (libs): Added $(LIBGC_LIBS).
14802
14803 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
14804
14805         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
14806         and OP_ATAN (fixes bug#44293).
14807
14808 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
14809
14810         * Makefile.am, mini-x86.c: rename cpu description array to
14811         pentium_desc, since some compilers define the 'pentium' preprocessor
14812         symbol.
14813
14814 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
14815
14816         * mini.c (mini_select_instructions): add explicit branch if the
14817         following block is not the false target of a conditional branch -
14818         we need this with any optimization that reorder or remove bblocks
14819
14820         * mini.c (optimize_branches): bug fixes
14821
14822 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
14823
14824         * mini.c (mono_method_to_ir): inline static readonly fields
14825
14826         * ssa.c (fold_tree): start cfold support for long (very simple
14827         cases only)
14828
14829         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
14830
14831 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
14832
14833         * inssel.brg: fixed memcpy (bug #44219).
14834
14835 2003-06-05  Dick Porter  <dick@ximian.com>
14836
14837         * driver.c: Set the glib log levels to not abort if g_message
14838         recurses.
14839
14840         g_set_prgname() has to happen before mini_init() so that the
14841         process handle gets the info.
14842         
14843 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
14844
14845         * driver.c: add intrins to the default optimizations to get wider
14846         exposure.
14847
14848 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
14849
14850         * mini.h: some large basic blocks will overflow a 16-bit
14851         integers for symbolic registers.
14852
14853 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
14854
14855         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
14856         (mono_arch_output_basic_block): fix bug 43499 
14857
14858 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
14859
14860         * mini.c: kill duplicated definition of mono_debug_format.
14861
14862 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
14863
14864         * mini-x86.c, arrays.cs: fixed register allocation bug.
14865
14866 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
14867
14868         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
14869
14870         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
14871
14872 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14873
14874         * mini.c:
14875         (print_method_from_ip): also print source location information if
14876         available.
14877
14878 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
14879
14880         * mini.c (mono_find_block_region): bug fix in region code
14881         (mini_method_compile): enable removing unreachable code again, but
14882         only in methods without exception clauses.
14883
14884 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
14885
14886         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
14887         Implemented arglist opcode and handling of TypedReference type.
14888         Fixed x86 call convention when a structure is returned.
14889         Minimal support for calling static vararg methods.
14890
14891 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
14892
14893         * mini.c (mini_method_compile):  always remove unreachable code,
14894         because the code in them may be inconsistent  (access to dead
14895         variables for example).
14896
14897 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
14898
14899         * driver.c, debug-mini.c: warning fixes.
14900
14901 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
14902
14903         * Makefile.am, jit.h, mini.h: install header for embedding mono.
14904
14905 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
14906
14907         * mini.c: thread-static fields are registered in mono_class_vtable(),
14908         so ensure the function is called before checking for them.
14909
14910 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
14911
14912         * mini.c (optimize_branches): fix for bug 43586
14913
14914         * jit-icalls.c (mono_llmult_ovf): added an additional check for
14915         overflow (fixes Bug #43639)
14916
14917 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14918
14919         * mini.c, objects.cs: allow the use of stobj for primitive types.
14920
14921 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14922
14923         * mini.c: be less strict about argument checking until we support
14924         running the verifier.
14925
14926 2003-05-27  Nick Drochak <ndrochak@gol.com>
14927
14928         * basic-long.cs: tests for (ulong)int * (ulong)int also
14929         * mini.c: use the same trick for (ulong)int * (ulong)int
14930
14931 2003-05-27  Nick Drochak <ndrochak@gol.com>
14932
14933         * basic-long.cs: add regression test for (long)int * (long)int
14934         * cpu-pentium.md: add op_bigmul specification
14935         * inssel-long32.brg: add OP_BIGMUL rule
14936         * mini-ops.h: add OP_BIGMUL
14937         * mini-x86.c: register allocator: handle case where src1 needs to be
14938         in EAX.
14939         * mini.c: substitute special BIGMUL opcode in the tree for 
14940         (long)int * (long)int
14941
14942 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
14943
14944         * jit-icalls.c: call the type ctor on field access if needed.
14945
14946 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
14947
14948         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
14949         to a method (including results of ldelema, bug#43207).
14950
14951 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
14952
14953         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
14954         colors to show exception handler blocks.
14955
14956         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
14957         (fix for pinvoke7.cs).
14958
14959 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14960
14961         * mini.h, mini.c: ensure correct initialization order for types that
14962         require it. Prepare for lazy compilation of jit icall wrappers.
14963         Provide a name for opcode emulation to reduce unneeded mallocing.
14964
14965 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
14966
14967         * mini-x86.c: better register restoring code and profiling
14968         support for tail calls.
14969
14970 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14971
14972         * mini.h, driver.c: prepare for leaf methods optimization.
14973
14974 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
14975
14976         * mini.c: get targets of branches before converting a method.
14977
14978 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
14979
14980         * mini.c (optimize_branches): added some experimental code (disbaled) 
14981
14982 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
14983
14984         * mini.c (optimize_branches): fix branch to branch optimization 
14985
14986         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
14987
14988         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
14989
14990         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
14991
14992         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
14993         if needed.
14994
14995 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
14996
14997         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
14998         enable use of interface variables again.
14999
15000         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
15001         I1 to registers because there is no simply way to sign extend 8bit
15002         quantities in caller saved registers on x86.
15003
15004         * inssel-float.brg: set costs of some rules to 2 so
15005         that monobure always select the arch. specific ones if supplied,
15006         regardless of the order we pass the files to monoburg.
15007
15008 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
15009
15010         * mini.c, mini-x86.c: since the magic trampoline for jumps
15011         can't patch the code directly, we do it as soon as the
15012         method gets compiled.
15013
15014 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
15015
15016         * mini-x86.c, mini.h: introduce a new patching method
15017         to support CEE_JMP and tail calls.
15018         * mini.c: obey tail.call. Don't precompile methods target
15019         of CEE_JMP.
15020         * tramp-x86.c: new trampoline code to handle methods
15021         reached through a jump.
15022
15023 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
15024
15025         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
15026         bit values to registers
15027
15028 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
15029
15030         * mini.c (mono_compile_get_interface_var): share interface
15031         variables if possible.
15032
15033 2003-05-16  Martin Baulig  <martin@ximian.com>
15034
15035         * debug-mini.c (mono_init_debugger): New function to initialize
15036         the debugger.  This is not in the debugger since it needs to
15037         access some of mini's internals.
15038
15039 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
15040
15041         * mini.c (mono_method_to_ir): inlining fixes/cleanups
15042
15043 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
15044
15045         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
15046         for value type handling.
15047
15048 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
15049
15050         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
15051         (mono_method_check_inlining): enable inlining of all kinds of wrappers
15052
15053 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
15054
15055         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
15056           the constructor through a proxy.
15057
15058 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15059
15060         * jit-icalls.c, inssel.brg: fixes to array element address
15061         calculations.
15062
15063 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
15064
15065         * mini-x86.c (is_regsize_var): allocate pointer to registers
15066
15067 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15068
15069         * driver.c: fixed typo, added intrins to the set of optimizations
15070         tested with regressions.
15071
15072 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
15073
15074         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
15075         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
15076         test case.
15077
15078 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
15079
15080         * inssel.brg: remove some common pop instructions without side effects
15081
15082 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15083
15084         * inssel-x86.brg: fixed thinko in int to double conversions.
15085
15086 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
15087
15088         * mini.c, jit-icalls.c: added runtime thread-static variable support.
15089
15090 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
15091
15092         * inssel-long32.brg: two more missing instructions.
15093
15094 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
15095
15096         * mini.c (mono_emit_call_args): set the cil_code for all arguments
15097         if not already set.
15098
15099 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
15100
15101         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
15102         correctly.
15103
15104         * basic-float.cs: Added tests for negative zero.
15105
15106 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15107
15108         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
15109         a couple of missing operations for long casts, with test cases.
15110
15111 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15112
15113         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
15114
15115 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
15116
15117         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
15118         code size estimation.
15119
15120 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
15121
15122         * mini.c (mono_jit_create_remoting_trampoline): make it work with
15123         abstract methods (fix bug 42542)
15124
15125         * aot.c: add ability to handle array types
15126         
15127 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
15128
15129         * mini.c: Call the _specific versions of the object allocation
15130         functions if possible.
15131
15132 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
15133
15134         * driver.c: call setlocale ().
15135
15136 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
15137
15138         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
15139         windows build.
15140
15141 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
15142
15143         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
15144
15145         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
15146         wrappers (fix bug 42122)
15147
15148 2003-05-04  Martin Baulig  <martin@ximian.com>
15149
15150         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
15151
15152         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
15153         s/mini_set_defaults/mono_set_defaults/g.
15154
15155 2003-05-04  Martin Baulig  <martin@ximian.com>
15156
15157         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
15158
15159 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15160
15161         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
15162         (reported by Don Roberts).
15163
15164 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
15165
15166         * mini.c: temporarily work around two bugs for this release.
15167
15168 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15169
15170         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
15171         that contains -export-dynamic and it makes using the ld script
15172         useless.
15173         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
15174
15175 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
15176
15177         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
15178         specific cpu.
15179
15180 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
15181
15182         * mini.c: make sure leave calls all the needed finally blocks,
15183         even when the target jumps out of multiple exception clauses.
15184
15185 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15186
15187         * ldscript, Makefile.am: add linker script to reduce the number of
15188         exported symbols (should also fix the issues with libwine defining
15189         some of the same symbols in io-layer).
15190
15191 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
15192
15193         * driver.c (mini_main): Avoid assertion when no file name is given on 
15194         the command line.
15195
15196 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
15197
15198         * driver.c: added --version/-V command line option.
15199         Added the inline optimization in the regression tests.
15200
15201 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15202
15203         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
15204         to the type in the method signature (fixes bug#42134).
15205
15206 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
15207
15208         * mini.c: when inlining, check this is not null only when needed (bug #42135).
15209
15210 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
15211
15212         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
15213
15214 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15215
15216         * driver.c: fixed bug #42100.
15217
15218 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
15219
15220         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
15221
15222 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
15223
15224         * mini.c: moved most of the code required to do inlining to its own
15225         function so it can be reused. Inline also ctors if appropriate.
15226
15227 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
15228
15229         * Makefile.am: Link with -export-dynamic so shared libs loaded by
15230         the runtime can call mono API functions.
15231
15232 2003-04-27  Martin Baulig  <martin@ximian.com>
15233
15234         * debug-mini.c (mono_debug_init_method): Added
15235         `guint32 breakpoint_id' argument; if the method has a breakpoint,
15236         send a notification to the debugger.
15237
15238         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
15239         running in the Mono Debugger, just pass the breakpoint number to
15240         mono_debug_init_method().
15241
15242         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
15243
15244 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
15245
15246         * mini.c: allow some more unsafe compares.
15247
15248 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15249
15250         * mini-x86.c, Makefile.am: make distcheck works (partially from
15251         a patch by Richard Lee <r.h.lee@attbi.com>).
15252         * regset.c, regset.h: removed, they are unused.
15253
15254 2003-04-25  Dick Porter  <dick@ximian.com>
15255
15256         * driver.c: Usage reports the name as 'mono' not 'mini'
15257         * exceptions-x86.c: Build and run on freebsd
15258
15259 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
15260
15261         * Makefile.am: install the program with the 'mono' name and
15262         the library as libmono instead of mini and libmini.
15263
15264 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
15265
15266         * driver.c: provide the APIs for the embedding interface of the old jit.
15267
15268 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
15269
15270         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
15271
15272 2003-04-23  Martin Baulig  <martin@ximian.com>
15273
15274         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
15275
15276         * driver.c: Added `--debug' command line argument to enable
15277         debugging support.
15278
15279 2003-04-23  Martin Baulig  <martin@ximian.com>
15280
15281         * debug.[ch]: Removed.  The code is now in
15282         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
15283
15284         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
15285         last six months.
15286
15287 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
15288
15289         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
15290
15291 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15292
15293         * mini.c:
15294         (mini_cleanup): moved mono_runtime_cleanup call after the call to
15295         mono_domain_finalize.
15296         (mini_method_compile): use mono_method_profile* if the the option is
15297         enabled.
15298
15299 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
15300
15301         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
15302         methods with their wrapper.
15303
15304         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
15305         methods with their wrapper.
15306
15307         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
15308         their wrapper.
15309
15310         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
15311         wrapper.
15312
15313         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
15314         methods.
15315
15316 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
15317
15318         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
15319
15320 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
15321
15322         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
15323         of the mempool. This is slightly faster and uses less memory
15324
15325 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15326
15327         * mini.c: avoid O(n) allocation for variables.
15328
15329 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15330
15331         * mini.c: handle items on the stack after inlining methods.
15332
15333 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
15334
15335         * mini.c: make the method->opcode optimization dependent
15336         on MONO_OPT_INSTRINS and do it lazily.
15337
15338 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
15339
15340         * driver.c: print overall results at the end of regression run.
15341
15342 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
15343
15344         * inssel.brg: don't overwrite symbolic registers.
15345
15346 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
15347
15348         * inssel-x86.brg: fix conversion from long to float.
15349
15350 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
15351
15352         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
15353
15354 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
15355
15356         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
15357
15358         * driver.c: Added --print-vtable option as in the old JIT.
15359
15360 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
15361
15362         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
15363
15364 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
15365
15366         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
15367
15368 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
15369
15370         * mini.c regalloc.c regalloc.h: Fix memory leak.
15371
15372 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
15373
15374         * aot.c (mono_aot_get_method): register all used strings
15375
15376 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15377
15378         * mini.c: always intern strings references with ldstr at compile time.
15379
15380 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15381
15382         * Makefile.am: add BUILT_SOURCES.
15383
15384 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
15385
15386         * driver.c: give a better error message when the assembly to execute
15387         doesn't have an entry point.
15388
15389 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
15390
15391         * Makefile.am: added hack for automake
15392
15393         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
15394         correct sematics.
15395
15396         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
15397
15398 22003-04-07  Martin Baulig  <martin@ximian.com>
15399
15400         * Makefile.am: Added Makefile.am.
15401
15402         * debugger-main.c: Removed, this is now in the debugger where it
15403         belongs.
15404
15405         * mini.pc.in: Call this package `mini' for the moment.
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419