2008-09-24 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / ChangeLog
1 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
2
3         * ssapre.c: Disable this to save space since it is not yet ported to
4         linear IR.
5
6         * regalloc2.c: Disable this to save space.
7
8         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
9
10 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
11
12         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
13         the -v option useful again.
14
15 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
16
17         * mini-amd64.c (mono_arch_output_basic_block): Add support for
18         --break-at-bb.
19
20         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
21         arrays of arrays. Fixes #428406.
22
23         * method-to-ir.c (mini_emit_castclass): Ditto.
24
25         * objects.cs: Add new test.
26         
27 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
28
29         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
30         was wrong at it choked against target_type_is_incompatible for byref types.
31
32 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
33
34         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
35         places.
36
37 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
38
39         * mini-exceptions.c: update a few more exceptions-related counters.
40
41 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
42
43         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
44         new functions to allocate from persistent mempools.
45
46 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
47
48         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
49         multiple register banks in the future.
50
51         * mini-codegen.c (mono_local_regalloc): Fix a warning.
52
53 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
54
55         * mini.c (type_to_eval_stack_type): Remove duplicated function.
56
57         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
58
59         * mini.h: Export type_to_eval_stack_type.
60
61         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
62         is only ins->klass of byref types.
63
64 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
65
66         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
67         (mini_emit_memcpy2): Ditto.
68
69         * mini-amd64.c: Fix a warning.
70
71 2008-09-21  Mark Probst  <mark.probst@gmail.com>
72
73         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
74         linking.
75
76 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
77
78         * method-to-ir.c: Extract stloc micro-optimization to a
79         function and apply it to all cases.
80
81 2008-09-19  Mark Probst  <mark.probst@gmail.com>
82
83         * method-to-ir.c: Don't fail generic code sharing in cases we
84         already support.
85
86 2008-09-18  Mark Probst  <mark.probst@gmail.com>
87
88         * mini-ppc.c: Handle structs in tailcalls on Darwin.
89
90 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
91
92         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
93         implementation.
94
95 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
96
97         * trace.c: make tracing more useful and correct, with per-thread
98         id and indent info.
99
100 2008-09-15  Mark Probst  <mark.probst@gmail.com>
101
102         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
103         doing a method call and the argument is an R4.
104
105 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
106
107         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
108         generic methods.
109
110 2008-09-13  Mark Probst  <mark.probst@gmail.com>
111
112         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
113
114 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
115
116         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
117         (MONO_JUMP_TABLE_FROM_INS): Ditto.
118
119 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
120
121         * driver.c: Add a --agent argument (not supported yet) to load managed
122         agent assemblies before loading the main assembly, similarly to how the
123         Java VM handles agents.
124
125 2008-09-11  Mark Probst  <mark.probst@gmail.com>
126
127         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
128         function to do stack layout of local variables.
129
130 2008-09-11  Mark Probst  <mark.probst@gmail.com>
131
132         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
133         calculation.
134
135 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
136
137         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
138         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
139         JIT if DISABLE_JIT is defined.
140
141         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
142         defined.
143
144 2008-09-10  Mark Probst  <mark.probst@gmail.com>
145
146         * iltests.il.in: Disable the fconv test on PPC (the result is
147         undefined according to ECMA).
148
149 2008-09-10  Mark Probst  <mark.probst@gmail.com>
150
151         * iltests.il.in: Enable tail call tests for PPC.
152
153         * mini.h: Add variable for storing incoming valuetype argument
154         addresses for tail calls.
155
156         * mini-ppc.c: Implement valuetype arguments and return values for
157         tailcalls on Linux.
158
159 2008-09-09  Mark Probst  <mark.probst@gmail.com>
160
161         * mini-ppc.c: Partially implement tail calls (struct arguments and
162         return values not supported).
163
164         * method-to-ir.c: Enable tail calls on PPC.
165
166 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
167
168         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
169         runtime-invoke wrappers to work around the problem of them getting
170         assigned to a random class.
171
172         * aot-runtime.c (mono_aot_get_method): Ditto.
173         
174 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
175
176         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
177         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
178
179 2008-09-07  Mark Probst  <mark.probst@gmail.com>
180
181         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
182         until they're implemented properly.
183
184         * exceptions-ppc.c: Use arch-independent exception-handling code
185         instead of custom one.
186
187         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
188         for Linear IR.
189
190         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
191
192         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
193         applies when __powerpc__ is defined.
194
195 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
196
197         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
198         methods to their code to avoid computing the full name of wrappers and
199         doing a lookup in a string hash table.
200
201 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
202
203         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
204         we identify bblocks before method_to_ir () is ran.
205
206         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
207         Also avoid optimizing branches pointing to themselves.
208
209         * mini.c (mini_method_compile): Ditto. Fixes #422947.
210
211 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
212
213         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
214
215 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
216
217         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
218         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
219         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
220         'buf'.
221
222         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
223         jumped to the same entry in plt_jump_table.
224
225 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
226
227         * method-to-ir.c (initialize_array_data): Handle field with RVA from
228         dynamic images.
229
230 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
231
232         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
233         other assignment can be if converted. Saves 1.5% on corlib size and fixes
234         #421807.
235
236 2008-08-29  Geoff Norton  <gnorton@novell.com>
237
238         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
239         segment, and doesn't properly handle .space as .text.  Fixes
240         AOT Mach/ARM
241
242 2008-08-29  Geoff Norton  <gnorton@novell.com>
243
244         * mini.c: Disable the mach exception handler when running on 
245         ARM
246
247 2008-08-29  Geoff Norton  <gnorton@novell.com>
248
249         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
250         globals on Darwin/ARM
251
252 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
253
254         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
255         since too many things depend on it. Instead, call 
256         mono_runtime_set_no_exec ().
257         
258         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
259         the new JIT.
260
261         * aot-compiler.c: Add an 'asm-only' AOT option.
262
263         * mini.c: Avoid initializing the runtime when doing AOT compilation.
264                 
265         * aot-compiler.c (compile_method): Disable gshared support for now as it
266         doesn't yet work.
267
268 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
269
270         * mini-amd64.h : Fix a compiler warning.
271
272         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
273           Changed to use a callback function to retrieve the unwind info.
274           This avoids problems observed when code blocks were removed by
275           unloading an app domain.
276
277         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
278           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
279           to work properly.
280
281         Contributed under MIT/X11 license.
282
283 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
284
285         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
286           case to keep the stack aligned to 8.
287
288         Contributed under MIT/X11 license.
289
290 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
291
292         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
293         avoid repeated linear searches.
294
295 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
296
297         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
298         methods it can't handle.
299         
300         * aot-compiler.c (add_method): Avoid adding a method twice.
301         (add_wrappers): Add runtime invoke wrappers for all methods.
302
303         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
304         function to create an aot-compatible version of this trampoline.
305
306         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
307
308 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
309
310         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
311
312         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
313         with a generic sharing failure.
314
315         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
316
317         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
318         CEE_RETHROW. Fixes #419634.
319
320         * mini.c (mono_method_to_ir): Ditto.
321
322         * exceptions.cs: Add a new test.
323         
324         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
325         to mono_type_stack_size_internal () since some callers might not pass in
326         an rgctx.
327
328         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
329         instrument_prolog. Fixes #419878.
330
331         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
332         doubles in soft float mode volatile.
333
334 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
335
336         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
337
338         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
339         to handle soft float correctly.
340
341         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
342         the fast path.
343
344         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
345
346         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
347         to sp, since the generics catch code requires it.
348
349         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
350         copying.
351
352         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
353         mono_arch_emit_imt_argument ().
354
355         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
356
357         * mini-arm.c tramp-arm.c: Generic sharing updates.
358
359 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
360
361         * mini-arm.c: Fix the arm build.
362
363         * generic-sharing.c (mini_type_get_underlying_type): New helper function
364         handling enums, generic instances and generic sharing.
365         (mini_type_stack_size_full): Ditto.
366
367         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
368         
369         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
370
371         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
372
373         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
374         trampolines.
375
376         * mini-arm.c: Various small generic sharing changes.
377
378         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
379         this for x86.
380         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
381         custom code.
382
383         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
384         helper function to return a generic class init trampoline.
385
386         * method-to-ir.c mini.c: Use it.
387         
388         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
389         arch-specfic function to return a generic class init trampoline.
390
391         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
392         the GENERIC_CLASS_INIT custom code.
393
394         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
395         a fatal error, not a sharing failure.
396
397         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
398         needed.
399
400         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
401         trampoline argument from MONO_ARCH_VTABLE_REG.
402
403         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
404         order of the arguments to the C trampoline: pass 'slot' as the trampoline
405         argument, and pass the vtable in VTABLE_REG.
406
407         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
408         order of the arguments to the C trampoline: pass 'slot' as the trampoline
409         argument, and pass the vtable in VTABLE_REG.
410         (mono_arch_create_trampoline_code_full): Remove some special casing for
411         the rgctx fetch trampoline.
412
413         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
414         Fixes #419273.
415
416         * iltests.il: Add a test for it.
417
418 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
419
420         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
421
422         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
423         no longer needed.
424
425         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
426         use mono_jit_info_table_find () to avoid recursion.
427         (mono_delegate_trampoline): Add a sync wrapper here.
428
429         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
430         here.
431
432         * mini.c (mono_method_to_ir): Ditto.
433         
434         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
435         add_sync_wrapper argument. Don't add a sync wrapper here.
436         (mono_create_jump_trampoline): Don't add a sync wrapper here.
437
438         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
439         
440 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
441
442         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
443           of nonvolatile registers back from MonoContext to CONTEXT.
444
445         Contributed under MIT/X11 license.
446
447 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
448
449         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
450           arguments on Winx64 there are only 4 argument registers.  For this
451           logic to work the last argument must be pulled from the stack.  
452
453         Contributed under MIT/X11 license.
454
455 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
456
457         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
458
459         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
460         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
461         encode/decode_method_ref ().
462
463         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
464
465         * aot-runtime.c (decode_patch): Ditto.  
466
467         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
468         MONO_PATCH_INFO_METHOD.
469
470         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
471         MonoGenericJitInfo.
472
473         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
474         MonoGenericJitInfo.
475
476         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
477
478         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
479         one from the caller.
480
481         * aot-runtime.c (decode_generic_inst): New function to decode and
482         return a interned generic inst.
483         (decode_klass_ref): Use it.
484         (decode_method_ref): Ditto.
485
486         * aot-compiler.c (emit_exception_debug_info): Save 
487         jinfo->has_generic_jit_info too.
488
489 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
490
491         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
492
493         * iltests.il.in: Add a test for fconv_to_i.
494
495         * liveness.c: Disable the liveness2 pass for now to save space.
496
497         * regalloc2.c: Include mempool-internals.h to fix warnings.
498
499         * aot-compiler.c (encode_method_ref): Encode the context of generic
500         instance methods.
501
502         * aot-runtime.c (decode_method_ref): Inflate generic methods using
503         the context saved in the aot file.
504
505         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
506
507         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
508
509         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
510         volatile so they won't be optimized away.
511
512 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
513
514         * ssa.c:
515         * ssa2.c:
516         * mini.c:
517         * regalloc2.c:
518         * dominators.c: Remove duplicated functions that now are in
519         mempool-internals.h.
520
521 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
522
523         * aot-compiler.c: Fix warnings.
524
525         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
526
527         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
528
529         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
530         as the patch type.
531
532         * mini.c (mono_resolve_patch_target): Ditto.
533         
534         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
535         (encode_klass_ref): Add support for encoding VARs/MVARs.
536
537         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
538
539         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
540         the handling of the got entries into a separate 'decode_got_entry' function.
541         Add support for RGCTX_FETCH.
542
543         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
544         clobbered by the trampoline code.
545
546         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
547         not clobbered by the indirect calling code.
548
549 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
550
551         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
552         to fix the build.
553
554 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
555
556         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
557         signature using the compilation mempool otherwise we would leak it.
558
559 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
560
561         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
562         mono_emit_abs_call ().
563
564         * patch-info.h: Add GENERIC_CLASS_INIT.
565
566         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
567
568         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
569         as their target as a near call.
570
571         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
572         ABS handling code.
573         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
574
575         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
576         call to a runtime function described by a patch.
577
578         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
579         mono_emit_abs_call, this has the advantage that the ABS handling code in
580         mono_codegen () can handle them both, and can handle other stuff in the
581         future without additional code.
582
583         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
584         entry.
585         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
586         abs addresses.
587
588         * mini.h: Add missing bblock related prototypes.
589
590         * mini.h (MonoCompile): Remove unused reverse_inst_list and
591         reverse_inst_list_len fields.
592
593         * mini.c: Refactor this file a bit by moving branch optimizations to 
594         branch-opts.c.
595
596         * method-to-ir.c: Merge generic sharing changes missed earlier.
597
598         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
599
600         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
601         shared patches. Process METHODCONST as a shared patch.
602
603         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
604         as it crashes on the 2.0 mscorlib.
605
606         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
607         to cause crashes.
608         
609         * aot-compiler.c: Use is_plt_patch () in a few additional places.
610         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
611         by IMT.
612
613         * aot-compiler.c: Reorganize the got handling code to be a bit more
614         understandable.
615
616 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
617
618         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
619         mono_patch_info_equals/hash, and use it to massively simplify
620         get_plt_index ().
621
622         * mini.c (mono_patch_info_hash): Simplify this and add support for
623         more patch types.
624
625         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
626
627         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
628         handling code, since an offset is not enough to identify a trampoline.
629
630         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
631
632 2008-08-17  Mark Probst  <mark.probst@gmail.com>
633
634         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
635
636         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
637
638         * mini-ops.h: Argument and result types for OVF_CARRY ops.
639
640         * decompose.c: PPC decompositions for various ops.
641
642         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
643
644 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
645
646         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
647         call the generic trampoline code using a call, instead of a jump, to
648         remove some special casing from the generic trampoline code.
649
650         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
651         (mono_codegen): Ditto.
652
653         * aot-compiler.c aot-runtime.c: Ditto.
654
655         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
656
657         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
658         helper function to find the offset corresponding to a lazy fetch trampoline.
659
660         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
661         when doing generic sharing.
662
663         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
664         places.
665         
666         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
667         mini-trampolines.c to be with the other trampoline creation functions.
668
669         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
670         as it is equal to method->signature in most cases, add a 
671         mono_emit_method_call_full variant which takes a signature and an imt
672         argument as well.
673
674 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
675
676         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
677         to this function, since it could be computed easily from the method 
678         argument.
679         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
680         more.
681
682         * method-to-ir.c mini.c: Remove references to 
683         compile_generic_method_wo_context.
684
685         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
686         generic method calls.
687         
688         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
689         dimensional non-szarrays.
690
691         * mini.c (mini_init): Register mono_array_new_1.
692
693         * jit-icalls.c (mono_array_new_1): New jit icall.
694
695         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
696         pointing to the method.
697
698         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
699         method addresses belonging to METHOD_JUMP patches in the 
700         jump_target_got_slot_hash.
701         (mono_aot_load_method): Ditto.
702
703         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
704         METHOD_JUMP patches.
705
706         * mini.c (mini_create_jit_domain_info): New helper function which 
707         initializes/frees domain->runtime_info.
708         (mini_free_jit_domain_info): Ditto.
709         (mini_init): Install the domain hook functions with the runtime.
710
711         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
712         information maintained by the JIT.
713
714         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
715         insertion into jump_table_hash into mono_codegen (), also implement proper
716         locking.
717
718         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
719         tail calls, it is already done by the aot code.
720         
721         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
722         mechanism on amd64.
723
724         * iltests.il.in: Make the jmp test a bit more complex.
725
726         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
727         generic instances which doesn't have a token.
728
729         * aot-runtime.c (decode_method_ref): Ditto.
730         
731         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
732         can handle this case now.
733         (handle_box): Ditto.
734
735 2008-08-15  Geoff Norton  <gnorton@novell.com>
736
737         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
738         debugging check.
739
740 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
741
742         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
743         calling generic methods.
744
745         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
746
747         * aot-runtime.c (decode_patch_info): Ditto.
748
749         * mini.c (mono_resolve_patch_target): Ditto.
750         
751         * patch-info.h: Add METHOD_RGCTX.
752
753         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
754
755 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
756
757         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
758         arguments in registers.
759
760         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
761         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
762
763         * mini.c (mini_method_compile): Abort aot compilation for generic
764         methods if generic sharing is disabled.
765         
766         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
767         an mrgctx.
768
769         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
770         requiring an mrgctx.
771
772         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
773         store instructions when converting a vcall to a normal call.
774
775         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
776         mono_arch_find_jit_info.
777
778 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
779
780         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
781         avoid calling mono_method_full_name () for every method even if the
782         env var is not set.
783         (check_inline_caller_method_name_limit): Ditto.
784
785 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
786
787         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
788         assemblies in one run.
789
790         * aot-compiler.c (mono_compile_assembly): Only print out a count of
791         skipped methods if it is not 0.
792
793         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
794
795 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
796
797         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
798           MONO_ARCH_HAVE_UNWIND_TABLE.
799
800         Contributed under MIT/X11 license.
801
802 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
803
804         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
805           from default optimizaton list on Winx64.
806
807         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
808
809         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
810           the LMF from the MonoJitTlsData structure.
811
812         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
813
814         Contributed under MIT/X11 license.
815
816 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
817
818         * mini.c (sigsegv_signal_handler): Fix the build.
819
820         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
821         assembly->aot_module.
822
823         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
824         hash table. This simplifies and speeds up a lot of code, and fixes support
825         for .netmodules.
826
827         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
828         with the runtime.
829
830         * mini-exceptions.c: Ditto.
831         
832         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
833         'native_offset' argument, since these are computed in the 
834         mono_find_jit_info () function.
835
836         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
837         is used by exceptions-ppc.c.
838
839         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
840         mono_arch_find_jit_info ().
841         
842         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
843         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
844         generic code in mini-exceptions.c.
845
846 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
847
848         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
849
850         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
851         
852         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
853         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
854         called while holding the loader lock. Fixes #415608.
855         (mono_aot_get_method_from_token_inner): Ditto.
856
857 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
858
859         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
860         to reduce differences between this and the generic implementation in
861         mini-exceptions.c.
862         (ves_icall_get_frame_info): Ditto.
863
864         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
865
866         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
867         longer neccesarry.
868
869         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
870         mono_arch_get_call_filter () and make it non-static, for consistency with the
871         other architectures.
872
873 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
874
875         * mini.c:
876         * local-propagation.c:
877         * mini-x86.c: Correct the name of arch defines.
878
879 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
880
881         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
882         NO_EMULATE_LONG_SHIFT_OPS define.
883
884 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
885
886         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
887         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
888
889         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
890         MACH fixes. Merged from the 2.0 branch.
891
892         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
893
894         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
895         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
896
897         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
898
899         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
900         mono_marshal_get_native_wrapper () signature changes.
901
902 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
903
904         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
905         conversion bug under arm.
906
907 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
908
909         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
910
911         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
912         with overflow checking.
913
914 2008-08-05  Marek Habersack  <mhabersack@novell.com>
915
916         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
917         to the genmdesc.pl file
918
919 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
920
921         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
922         arg_array in the soft-float versions of the LOAD/STORE macros.
923
924         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
925         implementation.
926
927         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
928
929 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
930
931         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
932         a float HFA. Fixes #413621.
933
934 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
935
936         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
937         frame_size to args_size. Fixes build.
938
939 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
940
941         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
942         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
943
944         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
945         the stack are not unaligned. Fixes #413247.
946         
947 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
948
949         * mini.c: update jitted methods performance counters.
950
951 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
952
953         * mini-exceptions.c: increase the exceptions thrown performance
954         counter in mono_handle_exception ().
955
956 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
957
958         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
959         can work with netmodules.
960
961 2008-07-28  Geoff Norton  <gnorton@novell.com>
962
963         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
964         regression tests.
965
966 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
967
968         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
969         correct place.
970
971 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
972
973         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
974           The float param registers and other param registers must be the 
975           same index on Windows x64.
976
977         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
978           ArgValuetypeAddrInIReg argument case.  Setting the argument
979           op to OP_VTARG_ADDR (OP_REGOFFSET)).
980
981         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
982           variable computed above as the copy length for arguments of storage
983           type ArgValuetypeAddrInIReg.
984
985         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
986           ArgValuetypeAddrInIReg argument case.  This case will rely on
987           mono_arch_emit_outarg_vt to emit the correct code later in the process.
988
989         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
990           a 32 byte stack allocation for all calls.  We will omit the adjustment for
991           jump and tail call instructoins as they do not follow the typical call behavior.
992
993         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
994           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
995           local variable and pass the local variable by reference to the called method.
996
997         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
998           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
999           of a struct is passed in a register it must be saved with the other
1000           volatile argument on the stack.
1001
1002         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
1003           frame pointer the stack adjustment value must be saved to the unwind 
1004           info structure.
1005
1006         Contributed under MIT/X11 license.
1007
1008 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
1009
1010         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
1011         which got lost in the merge.
1012
1013 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
1014
1015         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
1016         build.
1017
1018         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
1019         
1020         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
1021         icalls, since they won't be patched.
1022
1023         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
1024         different code sequence when running under valgrind to prevent some valgrind
1025         errors.
1026
1027         * iltests.il.in: Add new regression test.
1028
1029         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
1030         end with a throw.
1031
1032         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
1033         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
1034
1035         * iltests.il.in: Add new test.
1036
1037         * aot-compiler.c: Fix some warnings.
1038
1039         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
1040         Fixes #412494.
1041
1042 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
1043
1044         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
1045         (mini_usage_jitdeveloper): Add a missing --wapi option.
1046
1047 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
1048
1049         * mini-codegen.c: Simplify the is_fp macros.
1050         (free_up_ireg): Remove, use free_up_reg instead.
1051         (free_up_reg): Fix the fp case.
1052
1053 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
1054
1055         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
1056         lowered earlier.
1057
1058         * exceptions-x86.c: Merge some changes which seemed to have got lost
1059         in the linear-ir merge.
1060
1061         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
1062
1063         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
1064         long vreg volatile even if the variable was already created.
1065
1066         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
1067         volatile variables.
1068
1069 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
1070
1071         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
1072
1073         * mini.c (mono_jit_compile_method_inner): Add support for 
1074         MONO_EXCEPTION_BAD_IMAGE.
1075
1076         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
1077         mini_method_get_context () returns NULL. Fixes #356531.
1078
1079         * mini.c (mono_method_to_ir): Ditto.
1080         
1081         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
1082         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
1083
1084 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
1085
1086         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
1087         in the LDFTN implementation.
1088
1089 2008-07-25  Mark Probst  <mark.probst@gmail.com>
1090
1091         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
1092         code, patch calls to icalls, too, even if they're not in the
1093         shared generic code hash.  Fixes #411962.
1094
1095 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
1096
1097         * cpu-x86.md: Increase the length of the fcall opcodes.
1098
1099         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
1100         calls returning floats.
1101
1102         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
1103         on NEWARR.
1104         
1105         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
1106         missed earlier.
1107
1108         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
1109         into the domain->method_code_hash.
1110
1111         * aot-compiler.c: Fix win32 build.
1112
1113         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
1114         
1115         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
1116         gshared NEWARR implementation.
1117
1118         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
1119
1120         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
1121         can be used outside of method_to_ir.
1122
1123         * mini.h (MonoCompile): Add arg_types field.
1124
1125         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
1126         
1127         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
1128         the values of the local arg_array and param_types array.
1129
1130 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
1131
1132         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
1133         got accesses might only get generated later when NEWOBJ is decomposed.
1134         
1135         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
1136         looking up the native code of the target method when a delegate is called
1137         for the first time.
1138
1139         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
1140         optimization.
1141
1142         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
1143
1144         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
1145         AOT work on platforms without a working dlsym implementation.
1146
1147         * mini.h: Bump AOT image format version.
1148         
1149 2008-07-24  Mark Probst  <mark.probst@gmail.com>
1150
1151         * mini-exceptions.c: Free a MonoType with
1152         mono_metadata_free_type() instead of g_free().
1153
1154         * aot-runtime.c: Free a MonoType.
1155
1156 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
1157
1158         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
1159         optimization.
1160
1161         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
1162         fp stack on x86.
1163
1164 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
1165         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
1166         profiler hook.
1167
1168 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
1169
1170         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
1171         NEWOBJ calls on valuetypes.
1172
1173         * iltests.il.in: Add new test.
1174
1175         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
1176
1177 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
1178
1179         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
1180         is no longer needed.
1181
1182         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
1183         non register sized integer arguments.
1184         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
1185         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
1186         emit_memcpy2 ().
1187
1188         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
1189         CEE_MONO_RETOBJ.
1190         
1191         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
1192         two a binop with different sized arguments is emitted.
1193
1194         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
1195         instruction in the ins==NULL case.
1196
1197 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
1198
1199         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
1200
1201         * mini-x86.c: Fix osx build.
1202
1203         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
1204         opcodes as well.
1205
1206         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
1207         instruction for non int sized variables.
1208
1209         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
1210         implementation.
1211
1212 2008-07-23  Robert Jordan  <robertj@gmx.net>
1213
1214         * method-to-ir.c: Fix MSVC build.
1215
1216 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
1217
1218         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
1219         a non int sized type, widen it to an int since newer versions of gcc seem to
1220         generate code which needs this.
1221
1222         * ssa2.c abcremoval2.c: Fix warnings.
1223
1224         * *: Merge the Linear IR branch.
1225
1226         The original branch is at trunk/branches/vargaz/mini-linear-il, and
1227         the ChangeLog file there describes all the changes done over the years. 
1228         Further documentation can be found at www.mono-project.com/Linear_IL.
1229
1230 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
1231
1232         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
1233           The float param registers and other param registers must be the 
1234           same index on Windows x64.
1235
1236         Contributed under MIT/X11 license.
1237
1238 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
1239
1240         * mini.c: Make the previous fix GC safe.
1241
1242 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
1243
1244         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
1245
1246 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
1247
1248         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
1249           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
1250           ArgValuetypeAddrInIReg instead.
1251
1252         Contributed under MIT/X11 license.
1253
1254 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
1255
1256         * mini-codegen.c (get_register_spilling): Fix a warning.
1257
1258 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
1259
1260         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
1261         for types which the initialization fails. Raises the provided exception
1262         at the right stop after cleanup.
1263
1264 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
1265
1266         * aot-compiler.c: Free most of the memory allocated during compilation.
1267
1268         * mini.c (mini_parse_debug_options): Fix a leak.
1269         
1270         * mini.c (mini_method_compile): Don't add the method to the jit info tables
1271         during aot compilation.
1272
1273 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
1274
1275         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
1276         it has too much register pressure.
1277
1278 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
1279
1280         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
1281
1282 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
1283
1284         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
1285         on x86.
1286
1287         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
1288         on amd64 similar to the way it is done on arm.
1289
1290         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
1291
1292         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
1293         consistency, normalize error messages, avoid loading aot-only modules in
1294         normal mode.
1295
1296         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
1297         for consistency.
1298
1299         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
1300
1301 2008-07-11  Martin Baulig  <martin@ximian.com>
1302
1303         * debug-debugger.h
1304         (MonoDebuggerInfo): Add `interruption_request'.
1305
1306 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
1307
1308         * aot-compiler.c (emit_plt): Remove some dead code.
1309
1310         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
1311
1312         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
1313         return the plt info offset belonging to a given plt entry.
1314
1315         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
1316         mono_aot_get_plt_info_offset.
1317         
1318         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
1319         similar to the amd64 code by makeing jumps through a separate jump table 
1320         instead of embedding the jump addresses into the code.
1321
1322 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
1323
1324         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
1325         method.
1326
1327 2008-07-10  Martin Baulig  <martin@ximian.com>
1328
1329         * mini.c (mini_method_compile): Disable generics sharing when
1330         running in the debugger.
1331
1332 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
1333
1334         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
1335
1336         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
1337         the local register allocator from running out of registers on x86 when 
1338         using aot.
1339
1340 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
1341
1342         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
1343         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
1344         C4146.
1345
1346         Contributed under MIT/X11 license.
1347
1348 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
1349
1350         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
1351         speed up the assembler.
1352
1353 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
1354
1355         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
1356         support.
1357
1358         * mini.c: Move the soft float handling macros a bit earlier, add 
1359         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
1360         place.
1361
1362         * mini.h: Add prototype for mono_arch_fixup_jinfo.
1363
1364         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
1365         read-only to help catch code allocation requests.
1366         
1367         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
1368         and turn it off when using --aot-only or when compiling with --aot=full.
1369
1370         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
1371         jump table for switches from the normal domain mempool, not the code
1372         manager.
1373
1374         * mini-trampolines.c (get_unbox_trampoline): New function to return an
1375         unbox trampoline which handles aot-only mode too.
1376
1377         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
1378         an AOTed unbox trampoline.
1379
1380         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
1381
1382 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
1383
1384         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
1385         ""
1386
1387         Contributed under MIT/X11 license.
1388
1389 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
1390
1391         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
1392           the unwind information for the method at the end of the allocated block.
1393           
1394         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
1395           MonoCompileArch to hold the unwind info for SEH on Winx64
1396         
1397         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
1398           frame pointer info for the method being compiled.
1399           
1400         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
1401           the call to mono_exception_from_token.
1402           
1403         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
1404           storing the method prolog information in a format that the Winx64 SEH can understand.  This
1405           information is stored a the end of the method block because it is all 32-bit offset based.
1406
1407         Contributed under MIT/X11 license.
1408
1409 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
1410
1411         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
1412
1413         * wapihandles.c: Fix warnings.
1414
1415         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
1416         mode.
1417
1418         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
1419         mono_jit_compile_method in aot-only mode since that calls the type 
1420         initializer.
1421         
1422         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
1423         get_delegate_invoke_impl in aot-only mode.
1424
1425         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
1426
1427 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
1428
1429         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
1430
1431         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
1432         is on by default.
1433
1434         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
1435
1436         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
1437         init trampoline from the AOT file as well.
1438
1439         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
1440         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
1441         code.
1442
1443         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
1444         mono_init.
1445
1446         * exceptions-amd64.c: Add _full variants for the remaining exception code
1447         creation functions as well, allow emission of relocatable code, remove
1448         caching since that is now done by the caller.
1449
1450         * mini-exceptions.c: Add _full variants for the remaining exception code
1451         creation functions as well, add aot-only support.
1452
1453         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
1454         if we can determine a proper token for them.
1455         (add_wrappers): Add a few more wrappers.
1456         (emit_method_code): Remove some dead code.
1457         (emit_trampolines): Emit exception code too.
1458
1459         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
1460
1461         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
1462         mono_array_new_va which avoids varargs.
1463
1464         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
1465
1466         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
1467         mono_arch_create_specific_trampoline () in all places.
1468
1469         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
1470         a bit so it can be used for other things as well.
1471         
1472         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
1473         on demand as well.
1474
1475         * exceptions-amd64.c: Rename the caching from the exception code creation
1476         functions, it is done by the caller instead.
1477         
1478         * exceptions-amd64.c: Change the signature of the exception code creation 
1479         functions to allow the creation of relocatable code later.
1480
1481         * mini-exceptions.c: Add a set of functions to query the various 
1482         runtime-generated exception functions.
1483
1484         * mini.c mini-exceptions.c: Use the newly added functions instead of the
1485         mono_arch_.. () functions.
1486         
1487 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
1488
1489         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
1490
1491         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
1492
1493         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
1494         (mini_get_vtable_trampoline): Ditto.
1495
1496         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
1497         code in the AOT case by returning the code size and a list of relocations to
1498         the caller.
1499
1500         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
1501
1502 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
1503
1504         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
1505           clean the stack.
1506
1507         Contributed under MIT/X11 license.
1508
1509 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
1510
1511         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
1512         so the buffer size can be computed correctly. Fixes #404735.
1513
1514         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
1515         normally as cfg->debug_info is already freed.
1516
1517 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
1518
1519         * mini-amd64.c: For calls returning vtypes in registers, don't store
1520         the return address on the stack, instead allocate a separate local for
1521         it. Fixes #404729.
1522
1523 2008-07-05  Mark Probst  <mark.probst@gmail.com>
1524
1525         * mini-trampolines.c, mini.h: Add an argument to
1526         mono_create_jit_trampoline_in_domain() for turning off the adding
1527         of the sync wrapper.
1528
1529         * mini.c: Use the JIT trampoline without sync instead of
1530         ldftn_nosync in static RGCTX invoke wrappers so that the call can
1531         be patched.
1532
1533 2008-07-04  Mark Probst  <mark.probst@gmail.com>
1534
1535         * driver.c: Turn on GSHARED optimization by default.
1536
1537 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
1538
1539         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
1540         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
1541
1542         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
1543         create a variant of the generic trampoline code callable from AOTed trampolines.
1544
1545         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
1546         trampoline code callable from AOTed trampolines.
1547
1548         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
1549
1550 2008-07-04  Mark Probst  <mark.probst@gmail.com>
1551
1552         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
1553         pass-through manner.
1554
1555         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
1556         and don't fail sharing for them anymore.
1557
1558         * mini-exceptions.c: Handle exceptions in shared generic methods.
1559
1560         * generic-sharing.c: When checking the context of a generic
1561         method, also check its class's context.  Don't treat wrappers as
1562         sharable.
1563
1564         * mini-trampolines.c: Some code factored out to
1565         metadata/generic-sharing.c.  Handle the MRGCTX case.
1566
1567         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
1568         we must deal with the method being of another instantiation of the
1569         class.  Add static rgctx invoke wrappers to generic methods.
1570
1571 2008-07-04  Mark Probst  <mark.probst@gmail.com>
1572
1573         * mini.c: Provide all jit infos of generic shared methods with a
1574         generic jit info.
1575
1576         * mini-exceptions.c: Handle the new situation that a generic info
1577         might be available, but not info about the this/vtable/mrgctx
1578         variable.
1579
1580 2008-07-03  Mark Probst  <mark.probst@gmail.com>
1581
1582         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
1583         generic methods.
1584
1585 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
1586
1587         * dominators.c (check_dominance_frontier): Fix a warning.
1588
1589         * mini.h: Add some missing prototypes.
1590
1591         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
1592
1593         * driver.c (mono_jit_init_version): Correct the comments since the first
1594         argument should be the name of the root domain, not a filename.
1595
1596         * aot-runtime.c (make_writable): Error out if this is called while running
1597         with --aot-only.
1598         (load_aot_module): Ditto.
1599
1600         * aot-compiler.c: Really fix the computation of method indexes.
1601
1602         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
1603         optimizations as this is no longer called frequently.
1604
1605         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
1606         method and the invoke impl code and pass it to the delegate trampoline instead of
1607         just the delegate class.
1608
1609 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
1610
1611         * aot-compiler.c: Fixup the computation of method indexes.
1612         (add_wrappers): Create the base methods of the runtime invoke wrappers using
1613         the method builder infrastructure.
1614
1615         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
1616         has no header.
1617
1618         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
1619         mode, load the method right away instead of creating a trampoline.
1620
1621         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
1622
1623         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
1624         some checks a bit.
1625
1626 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
1627
1628         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
1629         (mono_aot_load_method): Use method_index instead of method->token.
1630
1631         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
1632         can handle icalls etc. properly.
1633
1634         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
1635
1636         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
1637
1638         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
1639         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
1640         JIT_ICALL_ADDR patch type.
1641
1642         * patch-info.h: Add JIT_ICALL_ADDR patch type.
1643
1644         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
1645         request flag.
1646         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
1647
1648         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
1649
1650 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
1651
1652         * mini.c: Use domain->jit_code_hash_lock for controlling access to
1653         domain->jit_code_hash.
1654
1655 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
1656
1657         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
1658
1659 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
1660
1661         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
1662         get_this_arg_from_call, let it compute it when needed.
1663
1664         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
1665         gsctx from code only when needed.
1666
1667         * mini-trampolines.c (get_generic_context): Rename this to 
1668         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
1669         it can be called by the arch backends.
1670
1671         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
1672
1673 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
1674
1675         * driver.c (mono_main): Add experimental --aot-only command line option.
1676
1677         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
1678         set.
1679
1680 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
1681
1682         * driver.c (DllMain): Remove mono_module_handle.
1683
1684         Contributed under MIT/X11 license.
1685
1686 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
1687
1688         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
1689         for emitting methods which are not in the source assembly. Detect and report
1690         failure of assembling+linking.
1691         
1692         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
1693
1694         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
1695
1696 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
1697
1698         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
1699
1700 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
1701
1702         * mini.h: Remove some obsolete prototypes.
1703
1704         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
1705
1706 2008-06-24  Mark Probst  <mark.probst@gmail.com>
1707
1708         * mini.c (get_object_generic_inst): Variable-sized arrays are not
1709         supported by Visual Studio, so use alloca().
1710
1711 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
1712
1713         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
1714         Fixes #402585.
1715
1716 2008-06-23  Mark Probst  <mark.probst@gmail.com>
1717
1718         * mini.c: Fail sharing of a generic method if it contains an open
1719         catch clause (because we don't pass MRGCTXs yet).
1720
1721 2008-06-23  Mark Probst  <mark.probst@gmail.com>
1722
1723         * mini.c: When compiling a method with generic sharing, insert the
1724         method instantiated with an all-Object generic context into the
1725         jit info table, instead of the context of the first instantiation
1726         of the method we happen to compile.
1727
1728 2008-06-18  Martin Baulig  <martin@ximian.com>
1729
1730         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
1731         `major_version' and `minor_version'.
1732
1733 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1734
1735         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
1736         mono_method_is_generic_sharable_impl() takes an additional
1737         argument specifying whether to treat type variables as reference
1738         types.
1739
1740 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1741
1742         * mini.h: Removed obsolete prototypes.
1743
1744 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1745
1746         * mini.c: Don't fail generic sharing for initobj and sizeof - we
1747         already handle them.
1748
1749 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1750
1751         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
1752         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
1753         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
1754         tramp-x86.c: Added a MonoGenericContext* argument to
1755         mono_arch_get_unbox_trampoline() so that it can call other
1756         functions which require it.
1757
1758 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1759
1760         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
1761         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
1762         mono_arch_get_this_arg_from_call() takes a
1763         MonoGenericSharingContext* as well.
1764
1765 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1766
1767         * mini.c: Factor out code for emitting unbox into emit_unbox() and
1768         implement generic sharing of unbox.
1769
1770 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1771
1772         * mini.c: Don't compute the vtable to determine whether a field is
1773         special static, because it might not work for open types.
1774
1775 2008-06-17  Mark Probst  <mark.probst@gmail.com>
1776
1777         * mini.c: Removed the unused token_type and token_source arguments
1778         from get_runtime_generic_context_ptr().
1779
1780 2008-06-17  Marek Habersack  <mhabersack@novell.com>
1781
1782         * mini.c (ADD_BINOP): fix the build
1783
1784 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
1785
1786         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
1787         a widening op.
1788
1789 2008-06-16  Mark Probst  <mark.probst@gmail.com>
1790
1791         * mini.h: Removed class relations enum that's not used anymore.
1792
1793 2008-06-16  Mark Probst  <mark.probst@gmail.com>
1794
1795         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
1796
1797         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
1798         the lazy fetch trampoline access code.
1799
1800 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
1801
1802         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
1803
1804 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
1805
1806         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
1807
1808         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
1809
1810         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
1811
1812 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
1813
1814         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
1815         intrinsics.
1816
1817         * mini-ops.h: Add MIN/MAX_UN opcodes.
1818
1819         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
1820         intrinsics.
1821
1822         * basic-math.cs: Add more min/max tests.
1823
1824         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
1825
1826 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1827
1828         * mini.c: Small fix in the prologue of emit_castclass.
1829
1830 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
1831
1832         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
1833
1834         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
1835         do not work even for unsigned types. Fixes #400014.
1836
1837         * basic-math.cs: Add regression tests for unsigned Min/Max.
1838
1839 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1840
1841         * mini.c: Added additional context_used argument to several
1842         functions, which will be needed for sharing generic methods.  Use
1843         GET_RGCTX macro wherever appropriate.  Declare only one
1844         context_used in mono_method_to_ir().
1845
1846 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1847
1848         * mini.c, generic-sharing.c: Removed generic class relations.
1849
1850         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
1851         functions due to MRGCTX changes.
1852
1853 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1854
1855         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
1856         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
1857         with calculated IMT.
1858
1859         * mini.c: Generic sharing of calls via generic interfaces.
1860
1861         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
1862         generic method with non-constant MonoGenericContext*.  Instead,
1863         the context is taken out of the method itself.
1864
1865 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1866
1867         * mini.c: Generic sharing of ldvirtftn.
1868
1869 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1870
1871         * mini.c: Generic sharing of ldftn.
1872
1873 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1874
1875         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
1876
1877 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1878
1879         * mini.c: Generic sharing of the special case of ldtoken followed
1880         by a call to GetTypeFromHandle.
1881
1882 2008-06-13  Mark Probst  <mark.probst@gmail.com>
1883
1884         * mini.c: Generic sharing of box for nullable types.
1885
1886 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
1887
1888         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
1889         are passed on the stack. Fixes #324807.
1890
1891 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
1892
1893         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
1894         for the ArgValuetypeAddrInIReg case.
1895
1896         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
1897         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
1898
1899         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
1900         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
1901         local variable and pass the local variable by reference to the called method.
1902           
1903         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
1904         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
1905
1906         Contributed under MIT/X11 license.
1907
1908 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
1909
1910         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
1911
1912         * debug-mini.c (mono_debug_print_vars): Release memory after printing
1913         everything.
1914
1915 2008-06-10  Martin Baulig  <martin@ximian.com>
1916
1917         * debug-mini.c
1918         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
1919
1920 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
1921
1922         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
1923         possible error when no arguments are passed.
1924
1925         Contributed under MIT/X11 license.
1926
1927 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
1928
1929         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
1930         where the file name is NULL.
1931
1932 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
1933
1934         * mini.c: Fix s390 build.
1935
1936 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
1937
1938         * trace.c (mono_trace_parse_options): Fix warnings.
1939
1940         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
1941
1942 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
1943
1944         * mini.c (remove_block_if_useless): Avoid printing the method name.
1945         
1946         * mini.c: Remove needless setting of ins->cil_code which is now done by 
1947         MONO_INST_NEW.
1948
1949         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
1950         LMF. Not yet used.
1951
1952         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
1953         translated code after it has been patched.
1954
1955 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
1956
1957         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
1958         avoid problems during code patching on SMP systems.
1959         (emit_call): Avoid adding a patch info which is already added by 
1960         emit_call_body.
1961         (mono_arch_emit_exceptions): Ditto.
1962
1963 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
1964
1965         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
1966         MONO_TYPE_ISSTRUCT already checks for it.
1967
1968 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
1969
1970         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
1971           structs with floats on Winx64 the float registers are not used.  
1972           The integer registers are always used..
1973         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
1974           only one register will be used and only if the size of the struct 
1975           is 1,2,4, or 8 bytes.
1976
1977         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
1978           to work for Winx64.
1979
1980         Contributed under MIT/X11 license.
1981
1982 2008-06-05  Martin Baulig  <martin@ximian.com>
1983
1984         * debug-debugger.c (debugger_lookup_class): Also call
1985         mono_class_setup_methods() here; we're only called from RTI.
1986
1987 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
1988
1989         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
1990         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
1991         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
1992         Post-process object files and add dtrace-generated object, if necessary.
1993
1994         Contributed under MIT/X11 license.
1995
1996 2008-06-04  Mark Probst  <mark.probst@gmail.com>
1997
1998         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
1999         element class.
2000
2001         * mini.c: Generic sharing for unbox.any and castclass.
2002
2003 2008-06-04  Mark Probst  <mark.probst@gmail.com>
2004
2005         * mini.c: Ignore tailcall prefix in shared generic code and when
2006         doing calls which require a vtable/rgctx argument.
2007
2008 2008-06-04  Mark Probst  <mark.probst@gmail.com>
2009
2010         * mini.c: Don't free the JIT info.
2011
2012         * driver.c: Changes in the JIT info table testing code.
2013
2014 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
2015
2016         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
2017         interruption. Fix some warnings.
2018
2019         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
2020         interruption_checkpoint.
2021
2022 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
2023
2024         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
2025         from embedding applications.
2026
2027 2008-06-02  William Holmes  <billholmes54@gmail.com>
2028
2029         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
2030           reserving 32 bytes on the stack when making calls. 
2031
2032         Contributed under MIT/X11 license.
2033
2034 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
2035
2036         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
2037         the linear IL branch.
2038
2039         * driver.c: Print out more information for --version on arm.
2040
2041 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
2042
2043         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
2044         bb_exit instead, since out of line bblocks might not actually be emitted
2045         out-of-line.
2046         
2047         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
2048         maximum epilog size for out of line bblocks if tracing is enabled.
2049
2050         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
2051
2052 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
2053
2054         * arrays.cs: Regression tests for allocating arrays with negative sizes.
2055
2056 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
2057
2058         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
2059         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
2060         opcodes.
2061
2062 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
2063
2064         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
2065         the 'value' to store is a constant.
2066
2067         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
2068
2069         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
2070         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
2071
2072 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
2073
2074         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
2075         for accessing method->generic_container.
2076
2077 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
2078
2079         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
2080         
2081         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
2082
2083         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
2084
2085         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
2086         fails.
2087
2088 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
2089
2090         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
2091
2092         * mini.c: Handle the case when mono_class_vtable () fails.
2093
2094 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
2095         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
2096         the stat profiler.
2097
2098 2008-05-22  Mark Probst  <mark.probst@gmail.com>
2099
2100         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
2101         together with domain sharing.
2102
2103 2008-05-22  Mark Probst  <mark.probst@gmail.com>
2104
2105         * mini.c: Treat callvirts to final methods like non-virtual calls
2106         when doing generic sharing, i.e. look them up in the runtime
2107         generic context.
2108
2109 2008-05-22  Mark Probst  <mark.probst@gmail.com>
2110
2111         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
2112         with computed types (for generic sharing).
2113
2114         * mini.c: Generic sharing for mkrefany and refanyval.
2115
2116 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
2117
2118         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
2119         possible.
2120
2121         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
2122         the generic sharing code.
2123         
2124         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
2125         when needed.
2126
2127 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
2128
2129         * mini.h: Remove the declaration of mono_aot_init_vtable ().
2130
2131 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
2132
2133         * driver.c: updated copyright date
2134
2135 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
2136
2137         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
2138         needed.
2139
2140 2008-05-19  Martin Baulig  <martin@ximian.com>
2141
2142         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
2143         pointing to the new `_mono_debug_using_mono_debugger' variable.
2144
2145         * driver.c
2146         (mono_main): Check mono_debug_using_mono_debugger() rather than
2147         the `MONO_INSIDE_MDB' environment variable to check whether we're
2148         inside the debugger.
2149
2150 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
2151
2152         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
2153         argument.
2154
2155 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
2156
2157         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
2158
2159         * mini.c: Added mini_assembly_can_skip_verification. This
2160         function checks if the assembly requested to skip verification. 
2161         Fixes part of #387274.
2162
2163 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
2164
2165         * mini.c (mini_get_method): Disable the check for open generic classes when
2166         using generic sharing.
2167
2168         * generics.cs: Add a test #387034.
2169
2170         * mini.c (mini_get_method): Check whenever the method class is an open generic
2171         type, and return NULL in that case, causing a verification error. Fixes
2172         #384123.
2173
2174 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
2175
2176         * driver.c (mono_main): Revert r102623. The right
2177         thing to do is to enable the verifier under verifiable
2178         unless a --security flag was passed.
2179
2180         We need this non-trivial behavior for --verify-all otherwise
2181         mcs-compileall won't be able to use it. As it needs everything to
2182         be verified under validil.
2183
2184 2008-05-06  Martin Baulig  <martin@ximian.com>
2185
2186         Fix #383749.
2187
2188         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
2189         (mono_debugger_thread_cleanup): Likewise.
2190         (mono_debugger_extended_notification): Likewise.
2191
2192 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
2193
2194         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
2195         against both inflated and non-inflated methods. We need to check against the
2196         generic definition for cases where the instantiated method is not visible.
2197         We need to check against the inflated types for cases where the instantiation
2198         changes any super type. This fixes #382986.
2199
2200         Note that this doesn't need to be applied to other parts of mono_method_to_ir
2201         that check for visibiliy as generic params only appears as the type subject
2202         of tokens on call opcodes. Field manipulation and ldftn must always
2203         target an exact type.
2204
2205 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
2206
2207         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
2208         if no related --security flag is passed.
2209
2210 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
2211
2212         * mini-arch.h: Prepare support for ppc64.
2213
2214         Contributed under MIT/X11 license.
2215
2216 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
2217
2218         * aot-runtime.c: Prepare support for ppc64.
2219
2220         Contributed under MIT/X11 license.
2221
2222 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
2223
2224         * mini-ops.h: Prepare support for ppc64.
2225
2226         Contributed under MIT/X11 license.
2227
2228 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
2229
2230         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
2231
2232         Contributed under MIT/X11 license.
2233
2234 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
2235
2236         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
2237         assemblies, since aot_name is not a full path, causing us to load MS.NET 
2238         assemblies on windows.
2239
2240 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
2241
2242         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
2243         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
2244         * main.c: Use UTF-8 encoded command line instead of Windows default code
2245         page on Windows to support Unicode.
2246         * driver.c (DllMain): New function for mixed-mode assembly support.
2247         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
2248         export __stdcall functions without decoration.
2249
2250         Contributed under MIT/X11 license.
2251
2252 2008-04-28  Mark Probst  <mark.probst@gmail.com>
2253
2254         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
2255         saving it very early.
2256
2257 2008-04-28  Mark Probst  <mark.probst@gmail.com>
2258
2259         * mini.h, mini.c: Lots of code for accessing the old RGCTX
2260         deleted.  The only way to access the new RGCTX is via the
2261         trampline.
2262
2263         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
2264         vtable instead of the RGCTX to static methods.
2265
2266         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
2267         accessing the new RGCTX.
2268
2269         * generic-sharing.c: There is no separation between self, type
2270         arguments and other types in the RGCTX anymore.
2271
2272 2008-04-25  Jonathan Chambers <joncham@gmail.com>
2273
2274         * mini-amd64.c (add_general): Remove previous stack adjustment.
2275         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
2276         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
2277         for 32 bytes of stack space reserved for all calls.
2278         
2279         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
2280         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
2281         adjustment.
2282         
2283         Code contributed under MIT/X11 license.
2284
2285 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
2286
2287         * mini.c (mini_method_verify): Only verify non-inflated methods, check
2288         against the root definition, peeling out method and type instantiations.
2289         Cache verify success results, code that fails verification is still
2290         checked multiple times.
2291
2292 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
2293
2294         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
2295
2296 2008-04-23  Jonathan Chambers <joncham@gmail.com>
2297
2298         * mini-amd64.c (add_general): Always increment stack on Win64.
2299         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
2300         on Win64.
2301         
2302         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
2303         stack based argument handling on Win64.
2304         
2305         Code contributed under MIT/X11 license.
2306
2307 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
2308
2309         * Makefile.am (version.h): Add support for git-svn.
2310
2311 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
2312
2313         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
2314         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
2315         avoiding allocations and libc functions which might deadlock.
2316         
2317         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
2318         'no-gdb-backtrace' option is set.
2319
2320         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
2321
2322         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
2323
2324 2008-04-21  Martin Baulig  <martin@ximian.com>
2325
2326         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
2327         and `get_lmf_addr'; `notification_address' is no longer a pointer.
2328
2329 2008-04-21  Martin Baulig  <martin@ximian.com>
2330
2331         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
2332         `thread_vtable', `event_handler_ptr' and `event_handler'.
2333
2334 2008-04-21  Martin Baulig  <martin@ximian.com>
2335
2336         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
2337         allows delayed initialization of the `executable_code_buffer' when
2338         attaching.
2339
2340 2008-04-21  Martin Baulig  <martin@ximian.com>
2341
2342         * mini.h (mono_debugger_create_notification_function): Removed.
2343         * tramp-*.c (mono_debugger_create_notification_function): Removed.
2344
2345         * mdb-debug-info64.s
2346         (MONO_DEBUGGER__notification_function): Added this in the .text section.
2347
2348         * mdb-debug-info32.s
2349         (MONO_DEBUGGER__notification_function): Added this in the .text section.
2350
2351         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
2352         currently only works on x86 and x86_64, so don't create it on ppc.
2353
2354 2008-04-21  Martin Baulig  <martin@ximian.com>
2355
2356         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
2357
2358         * mini.c
2359         (mini_method_compile): In the fp elimination check, check
2360         `debug_options.mdb_optimizations' in addition to
2361         mono_debug_using_mono_debugger().       
2362
2363         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
2364         disable some JIT optimizations which are only disabled when
2365         running inside the debugger.
2366         Added `--help-debug' option to describe the debugging options.
2367         (parse_debug_options): New static function to parse the `--debug'
2368         options, so we can easily add more stuff in future.
2369
2370 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
2371
2372         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
2373         the method has no body.
2374
2375 2008-04-19  Jonathan Chambers <joncham@gmail.com>
2376
2377         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
2378         assembly is not allowed in MSVC 64-bit compiler. 
2379         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
2380         as we get floating point exceptions everywhere.
2381         
2382         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
2383         correctly align arguments for call to throw_exception.
2384         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
2385         
2386         Code contributed under MIT/X11 license.
2387
2388 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
2389
2390         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
2391
2392 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
2393
2394         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
2395
2396         * mini-amd64.c (NEW_INS): Set cil_code.
2397
2398         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
2399         from mini-amd64.c so all debugger related logic is in one place.
2400
2401         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
2402         later won't have a random ip assigned to them.
2403
2404 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
2405
2406         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
2407         the arch specific function initializes code_size.
2408         (mono_create_delegate_trampoline): Ditto.
2409
2410         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
2411         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
2412         platforms.
2413
2414         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
2415         running under the debugger.
2416
2417         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
2418         debugger.
2419
2420         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
2421         debugger. Also move the disabling of optimizations here from driver.c.
2422         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
2423         debugger.
2424
2425         * mini.h (MonoCompile): Add a few new flags.
2426
2427 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
2428
2429         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
2430         so the cil_code field of created MonoInst's is properly set.
2431         (mini_select_instructions): Ditto.
2432
2433         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
2434         (MONO_INST_NEW_CALL): Ditto.
2435
2436         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
2437         in many places so the ins->cil_code field is properly initialized.
2438
2439         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
2440         place.
2441
2442 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
2443
2444         * mini.c (mini_method_compile): Print a different message when compiling a 
2445         shared method.
2446         
2447         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
2448         > 1.
2449
2450 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
2451
2452         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
2453         SSE2 instructions.
2454
2455         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
2456         
2457 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
2458
2459         * mini.c (handle_stack_args): Make this return void since its return value was
2460         never used. Also set cfg->unverifiable for invalid IL instead of calling
2461         G_BREAKPOINT ().
2462
2463 2008-04-10  Mark Probst  <mark.probst@gmail.com>
2464
2465         * mini.c: Make sure "this" is live in catch clauses with type
2466         variables in shared generic code.
2467
2468 2008-04-08  Mark Probst  <mark.probst@gmail.com>
2469
2470         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
2471         generic_class_is_reference_type() to ensure the proper behaviour
2472         when sharing generic code and the type in question is a type
2473         argument.
2474
2475 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
2476
2477         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
2478         race conditions when printing thread dumps. Fixes #377738.
2479
2480 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
2481         
2482         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
2483         shows up when both MonoInst arguments can cause aliasig.
2484         There is likely no way in the current JIT to trigger this problem, but
2485         it showed up in the development of generics sharing, when in a new
2486         opcode both args of an OP_GROUP can be aliases (addresses of a local).
2487         When the generics sharing code will be committed, its tests will be
2488         valid also for this bug.
2489
2490 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
2491
2492         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
2493         PATCH_INFO_METHOD.
2494
2495         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
2496         NULL.
2497
2498 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
2499
2500         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
2501         use a more detailed exception message for InvalidCastException.
2502
2503         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
2504
2505         * driver.c (mono_main): Add --debug=casts option to turn on better 
2506         InvalidCastException message details.
2507
2508         * mini.c (mini_get_debug_options): New helper function to return the address of
2509         the debug_options variable.
2510
2511         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
2512         the jit_tls TLS variable.
2513
2514         * mini.c (mono_jit_tls): New TLS variable.
2515
2516         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
2517         option is used.
2518
2519 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
2520
2521         * mini.h: Removed verifer related stuff. This code was moved to verify.c
2522
2523         * mini.c: Removed verifer related stuff, code moved to verify.c.
2524
2525         * driver.c: Using code from verify.c instead of mini.c.
2526
2527 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
2528
2529         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
2530         longer valid.
2531
2532 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
2533
2534         * mini.c (check_for_method_verify): Enabling verification of
2535         corlib if mono_verify_all is set. Bugs in the verifier preventing that
2536         have been fixed.
2537
2538 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
2539
2540         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
2541         caller saved registers as well.
2542         
2543         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
2544         saved registers as well.
2545
2546 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
2547
2548         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
2549
2550         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
2551         code.
2552
2553 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
2554
2555         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
2556         to get_call_info.
2557         (get_call_info): Take a gsctx argument instead of 'cfg'.
2558
2559 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
2560
2561         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
2562         mono_verify_all is set.
2563
2564         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
2565
2566         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
2567
2568 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
2569
2570         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
2571         an exception.
2572
2573         * driver.c mini.c mini.h: Add a --verify-all development option to test the
2574         verifier and the code generated by the compiler.
2575
2576 2008-03-25  Mark Probst  <mark.probst@gmail.com>
2577
2578         * mini.c: Generic sharing of the non-nullable case of the box
2579         instruction.
2580
2581 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
2582
2583         * inssel.brg: Fix the build.
2584
2585         * iltests.il.in: Add a test for lconv.ovf.u8.un.
2586
2587 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
2588
2589         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
2590         Array:Address. Fixes #372410.
2591
2592         * iltests.il.in: New tests for readonly prefix.
2593
2594 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
2595
2596         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
2597         mini-trampolines.c.
2598
2599         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
2600         mini-exceptions.c.
2601
2602         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
2603         
2604         * mini.c (mono_decompose_op_imm): New helper function.
2605
2606         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
2607         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
2608         return value.
2609
2610         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
2611         mono_arch_output_basic_block. Fix warnings.
2612
2613         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
2614         for now.
2615
2616 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
2617
2618         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
2619         since the extra frame is now detected automatically inside the loop.
2620
2621         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
2622         opts which are now in mono_peephole_ins ().
2623         
2624         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
2625
2626         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
2627         frames and skip duplicate managed-to-native frames. Fixes #367665.
2628
2629         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
2630         opts which are now in mono_peephole_ins ().
2631         (mono_arch_peephole_pass_2): Ditto.
2632
2633         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
2634
2635         * mini-codegen.c (mono_peephole_ins): New helper function containing the
2636         arch independent peephole optimizations.
2637
2638         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
2639         opts which are now in mono_peephole_ins ().
2640
2641         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
2642         
2643         * mini-s390.c (mono_arch_output_basic_block): Fix build.
2644
2645         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
2646         pattern.
2647
2648         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
2649         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
2650         opcode. 
2651
2652 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
2653
2654         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
2655         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
2656         return value.
2657
2658         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
2659         mono_arch_output_basic_block. Fix warnings.
2660
2661 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
2662
2663         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
2664         conv.ovf.u.un.
2665
2666 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
2667
2668         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
2669         conv.ovf.u.un.
2670
2671         * iltests.il: Add new tests.
2672
2673 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
2674
2675         * mini.c: Removed Windows version macros.
2676
2677 2008-03-20  Mark Probst  <mark.probst@gmail.com>
2678
2679         * generic-sharing.c: Put reflection types in the extensible part
2680         of the runtime generic context.
2681
2682         * mini.c: Generic sharing of the GetTypeHandle special case of the
2683         ldtoken instruction.
2684
2685 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
2686
2687         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
2688
2689         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
2690         
2691         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
2692         consistency with the other version on the linear IR branch.
2693
2694         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
2695
2696         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
2697
2698         * iltests.il.in: Add new tests.
2699
2700 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
2701
2702         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
2703
2704         * iltests.il.in: Add new tests.
2705
2706 2008-03-19  Mark Probst  <mark.probst@gmail.com>
2707
2708         * mini.c: Two variables with the same name were declared in
2709         nesting contexts and one wasn't initialized.  Fixed.
2710
2711 2008-03-19  Mark Probst  <mark.probst@gmail.com>
2712
2713         * mini.c: Generic sharing of the initobj instruction.
2714
2715 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
2716
2717         * mini.c: make the test to optimize ldtoken from typeof() more
2718         precise.
2719
2720 2008-03-18  Mark Probst  <mark.probst@gmail.com>
2721
2722         * mini.c: Generic sharing of the initobj instruction for reference
2723         types.
2724
2725 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
2726
2727         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
2728         the mono_breakpoint_clean_code() code to perform bound checks.
2729
2730 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
2731
2732         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
2733         mono_arch_patch_callsite() to include the start of the managed method
2734         to be able to perform bound checks.
2735
2736 2008-03-17  Mark Probst  <mark.probst@gmail.com>
2737
2738         * mini.c: Generic sharing for the isinst instruction.
2739
2740 2008-03-17  Mark Probst  <mark.probst@gmail.com>
2741
2742         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
2743         inssel-long32-mips.brg: Added opcodes for doing indirect calls
2744         with the runtime generic context argument.
2745
2746         * mini.c: Share calls to several types of unsharable methods by
2747         putting the address of the method code in the runtime generic
2748         context and doing an indirect call.
2749
2750         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
2751         to switches.
2752
2753 2008-03-16  Mark Probst  <mark.probst@gmail.com>
2754
2755         * generic-sharing.c: Change due to a change in the runtime genric
2756         context API.
2757
2758 2008-03-15  Martin Baulig  <martin@ximian.com>
2759
2760         * tramp-x86.c
2761         (mono_arch_nullify_class_init_trampoline): Add call to
2762         mono_breakpoint_clean_code() to make things work when running
2763         inside the debugger.
2764
2765         * tramp-amd64.c
2766         (mono_arch_nullify_class_init_trampoline): Add call to
2767         mono_breakpoint_clean_code() to make things work when running
2768         inside the debugger.
2769
2770 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
2771
2772         * inssel-long.brg (reg): Fix 64 bit build.
2773
2774 2008-03-14  Mark Probst  <mark.probst@gmail.com>
2775
2776         * mini.c, mini.h: Share static generic code by passing it an
2777         implicit argument pointing to the runtime generic context.
2778
2779         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
2780         inssel-long32-mips.brg: New opcodes for calling shared static,
2781         which need to be passed the runtime generic context.
2782
2783         * mini-amd64.c, mini-x86.c: Save the runtime generic context
2784         argument on the stack in the prologue if needed.  New function for
2785         finding the runtime generic context argument from the registers
2786         saved by the trampoline.
2787
2788         * mini-amd64.h, mini-x86.h: Specify which register to use for the
2789         runtime generic context argument.
2790
2791         * tramp-amd64.c: Also restore the register used for the runtime
2792         generic context argument.
2793
2794         * mini-trampoline.c: Resolve shared static calls by consulting the
2795         runtime generic context via the new argument.
2796
2797         * generic-sharing.c: Add an argument to sharability-checking
2798         functions that specifies whether type variables should be treated
2799         as sharable type arguments.
2800
2801         * inssel-x86.brg: Removed a superfluous, buggy rule.
2802
2803         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
2804         to switches.
2805
2806 2008-03-14  Martin Baulig  <martin@ximian.com>
2807
2808         * debug-debugger.c (main_thread_handler): Call
2809         mono_runtime_run_main() without sending any notifications.
2810
2811         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
2812
2813 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
2814
2815         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
2816
2817 2008-03-14  Mark Probst  <mark.probst@gmail.com>
2818
2819         * tramp-x86.c: Fixed register restore offsets in the trampoline
2820         code for ECX and EDX.
2821
2822 2008-03-12  Geoff Norton  <gnorton@novell.com>
2823
2824         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
2825         different ucontext_t implementations.
2826         * exceptions-arm.c: Use the above defines to get exceptions working on 
2827         iPhone (based on a patch by Luke Howard lukeh@padl.com)
2828         * mini-arm.c: Implement iPhone icache support (based on a patch by
2829         Luke Howard lukeh@padl.com)
2830
2831 2008-03-12  Mark Probst  <mark.probst@gmail.com>
2832
2833         * mini.c: Enable generic sharing of calls to non-static
2834         non-interface non-generic non-value-type methods.
2835
2836         * mini-trampolines.c: Resolve calls from shared generic code.
2837
2838 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
2839
2840         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
2841
2842         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
2843
2844 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
2845
2846         * mini.c: some fixes for the AOT compiler.
2847
2848 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
2849
2850         * cpu-amd64.md: Add clob:1 to some float opcodes.
2851
2852 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
2853
2854         * mini.h: Added MiniVerifierMode enumeration.
2855
2856         * mini.c: Added mini_verifier_set_mode to control
2857         the usage of the new verifier.
2858
2859         * mini.c (mono_method): Integrated the new verifier.
2860
2861         * driver.c: Extended --security option with validil and
2862         verifiable options to activate the new verifier.
2863
2864 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
2865
2866         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
2867         optimization to ctors taking 0 or 2 arguments too.
2868
2869         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
2870         a bit.
2871
2872         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
2873
2874         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
2875
2876 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
2877
2878         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
2879         non-aot case as well.
2880
2881         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
2882
2883         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
2884         changes.
2885
2886         * aot-compiler.c (encode_patch): Ditto.
2887
2888         * mini.h (G_MININT32): Fix the definition of this.
2889
2890 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
2891
2892         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
2893
2894         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
2895
2896 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
2897
2898         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
2899         methods returning vtypes in registers.
2900         (mono_arch_allocate_vars): Ditto.
2901
2902         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
2903
2904         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
2905
2906         * generics.cs: Add a test from the linear IR branch.
2907
2908         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
2909
2910         * mini.c (inline_method): Cache failed inline attempts.
2911
2912 2008-03-04  Mark Probst  <mark.probst@gmail.com>
2913
2914         * mini.c: For shared methods of generic classes put the location
2915         of "this" into the MonoGenericJitInfo.
2916
2917         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
2918         register out of a MonoContext by register number.  Add the generic
2919         sharing context as an argument to mono_arch_find_this_argument().
2920
2921         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
2922         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
2923         for new arch function.
2924
2925         * mini-exception.c: Handle open exception clauses in shared
2926         generic code.
2927
2928         * mini-trampolines.c: Supply additional argument to
2929         mono_arch_find_this_argument().
2930
2931 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
2932
2933         * Makefile.am (regtests): Run the bench.exe tests last.
2934
2935 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
2936
2937         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
2938         a bit.
2939
2940 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
2941
2942         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
2943         with MS.
2944
2945         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
2946         
2947         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
2948
2949         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
2950         whose class has no cctor.
2951
2952         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
2953
2954 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
2955
2956         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
2957         unverified.
2958
2959 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
2960
2961         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
2962         to be in sync with the code on the linear IR branch.
2963
2964         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
2965
2966         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
2967
2968 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
2969
2970         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
2971
2972         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
2973
2974         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
2975
2976         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
2977
2978         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
2979         
2980         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
2981         body.
2982
2983 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
2984
2985         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
2986         OP_LOADR4_MEMBASE emission.
2987
2988         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
2989         (mono_spillvar_offset_float): Ditto.
2990
2991         * mini-mips.c (mono_arch_emit_prolog): Ditto.
2992
2993         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
2994         emission.
2995
2996         * basic-long.cs: Add regression tests for them.
2997
2998         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
2999         use.
3000         (mono_arch_allocate_vars): Fix representation of single-precision float
3001         argument.
3002         (mono_arch_output_basic_block): Ditto.
3003
3004         * inssel-mips.brg: Ditto, remove duplicate items.
3005
3006         * mini-mips.c (emit_load_volatile_arguments): New function to handle
3007         arguments of tail calls as on other platforms.
3008         (mono_arch_output_basic_block): Handle tail calls.
3009
3010         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
3011         register.
3012
3013         * objects.cs (test_5_pass_static_struct): Add test for it.
3014
3015         Contributed under MIT/X11 license.
3016
3017 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
3018
3019         * Makefile.am: Use gmcs for compiling the regression tests.
3020
3021         * *.2.cs *.2.il: Rename to *.cs and *.il.
3022
3023 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
3024
3025         * regalloc.h: Make the vassign array smaller.
3026
3027         * mini.c (mini_method_compile): Remove an unused field in cfg.
3028
3029         * mini-codegen.c: Add a bunch of micro optimizations.
3030
3031 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
3032
3033         * regalloc.h: Remove some unused fields.
3034
3035 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
3036
3037         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
3038
3039         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
3040
3041 2008-02-22  Mark Probst  <mark.probst@gmail.com>
3042
3043         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
3044
3045         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
3046         trampoline: Fetch an entry from the runtime generic context.  If
3047         it's NULL, jump to the actual trampoline to fill the runtime
3048         generic context.  Otherwise, return it.
3049
3050         * mini.c: Call the lazy fetch trampoline to get entries out of the
3051         runtime generic context.
3052
3053         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
3054         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
3055         tramp-sparc.c: Stubs for the lazy fetch trampoline.
3056
3057 2008-02-21  Mark Probst  <mark.probst@gmail.com>
3058
3059         * mini.c: Fetch data out of the extensible part of the runtime
3060         generic context instead of calling a helper function.
3061
3062         * generic-sharing.c: Some functions moved into
3063         metadata/generic-sharing.c.  Helper function for fetching other
3064         types now checks and asserts against extensible rgctx (just for
3065         debugging purposes - the helper function isn't called anymore
3066         unless for debugging).
3067
3068 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
3069
3070         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
3071         for tail calls up to the point that the tests in iltests.exe run. Also add a
3072         dummy CKFINITE implementation.
3073         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
3074         needed for trampoline LMF frames.
3075
3076         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
3077         trampoline LMF frames.
3078
3079 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
3080
3081         * mini.c (inline_method): clean any pending loader error when inlining fail.
3082         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
3083
3084 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
3085
3086         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
3087
3088         * aot-runtime.c (decode_patch_info): Ditto.
3089
3090         * mini.c (mono_resolve_patch_target): Ditto.
3091         
3092         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
3093         icall wrappers.
3094
3095         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
3096         
3097         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
3098         if it references an icall address.
3099
3100 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
3101
3102         * cpu-s390x.md: Remove some more unused opcodes.
3103         
3104         * cpu-s390x.md: Remove some unused opcodes.
3105
3106         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
3107         mono_op_imm_to_op ().
3108
3109         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
3110         instead of a switch statement.
3111         
3112         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
3113         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
3114
3115         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
3116         
3117         * mini-codegen.c: Remove unused mono_regstate2_... functions.
3118
3119         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
3120         -1.
3121
3122 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
3123
3124         * driver.c (mono_main): Improve error reporting when an assembly cannot be
3125         opened. Fixes #362607.
3126
3127         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
3128
3129         * iltests.il.in: Add a test for static methods in interfaces.
3130
3131 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
3132
3133         * genmdesc.c (build_table): Fix a crash on older glib versions.
3134
3135         * cpu-sparc.md: Remove some unused opcodes.
3136         
3137         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
3138         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
3139
3140         * cpu-amd64.md: Remove some unused opcodes.
3141
3142         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
3143         like the other opcodes.
3144
3145 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
3146
3147         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
3148
3149         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
3150
3151         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
3152         variables 'cfg' instead of 'm' for consistency.
3153
3154         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
3155
3156         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
3157         argument holding the vtype return address, to avoid the ambigious use of
3158         cfg->ret for this purpose.
3159
3160         * mini.c (NEW_RETLOADA): Use vret_addr if set.
3161
3162         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
3163         
3164         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
3165         new mono_print_ins () function which only takes one argument.
3166
3167 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
3168
3169         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
3170         macro arguments.
3171
3172 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
3173
3174         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
3175
3176         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
3177
3178         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
3179         opcodes and other small changes.
3180
3181         * mini-ops.h: Add some new opcodes from the linear IR branch.
3182
3183         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
3184
3185         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
3186         opcodes, use the REG_MEMBASE opcodes instead.
3187         
3188         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
3189         opcodes, use the REG_MEMBASE opcodes instead.
3190         
3191         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
3192         linear IR branch.
3193
3194         * mini.c (mono_op_imm_to_op): New helper function.
3195
3196         * mini-ops.h: Add some opcodes from linear IR branch.
3197
3198 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
3199
3200         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
3201         <tsv@solvo.ru>.
3202
3203 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
3204
3205         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
3206         OP_ICONV_TO_R4/R8.
3207
3208         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
3209
3210 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
3211
3212         * aot-compiler.c (emit_method_code): Add an assert.
3213
3214         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
3215         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
3216         methods.
3217
3218 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
3219
3220         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
3221         some load/store opcodes so they are consistent. 
3222         (mono_arch_emit_prolog): Simplify some code.
3223
3224         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
3225
3226         * objects.cs: Add tests for large argument offsets on ARM.
3227
3228         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
3229         stack offsets. Fixes #359651.
3230
3231         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
3232
3233         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
3234
3235         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
3236
3237         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
3238
3239         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
3240
3241         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
3242         rid of CEE_CONV_R_UN.
3243
3244         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
3245
3246 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
3247
3248         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
3249
3250         * mini.c (mono_normalize_opcodes): Add some more opcodes.
3251
3252         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
3253
3254         * cpu-amd64.md: Remove some unused opcodes.
3255
3256         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
3257
3258         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
3259
3260         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
3261         arch specific functions for its parts. Call the peephole pass after local
3262         regalloc so the prolog can compute a more accurate max_offset.
3263         
3264         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
3265         the corresponding OP_I/OP_L opcodes.
3266
3267         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
3268
3269         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
3270
3271 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
3272
3273         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
3274         as they are handled in mini.c.
3275
3276         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
3277         
3278         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
3279         case since it is handled in mini.c.
3280
3281         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
3282
3283         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
3284
3285         * *.c: Use the new opcodes in the IR and back end code.
3286
3287         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
3288
3289         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
3290
3291 2008-02-06  Mark Probst  <mark.probst@gmail.com>
3292
3293         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
3294         an assert because it has a race condition.
3295
3296 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
3297
3298         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
3299
3300         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
3301
3302         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
3303
3304         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
3305         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
3306
3307 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
3308
3309         * cpu-amd64.md (move): Correct the maximum size of move.
3310
3311 2008-02-05  Mark Probst  <mark.probst@gmail.com>
3312
3313         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
3314         the generic class init trampoline to return quickly if the class
3315         is already inited.
3316
3317 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
3318
3319         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
3320         issues where an 32 bit callsite cannot be patched by a 64 bit address.
3321
3322 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
3323
3324         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
3325         branch.
3326
3327 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
3328
3329         * objects.cs: Add some soft-float tests.
3330
3331         * mini.c: Fix a couple more soft-float issues.
3332
3333         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
3334
3335         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
3336         avoid a REX prefix.
3337
3338 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
3339
3340         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
3341         exception happens while compiling a virtual method.
3342
3343 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
3344
3345         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
3346         
3347         * mini-sparc.c: Fix build.
3348
3349         * mini-sparc.c (get_call_info): Add support for generic sharing.
3350
3351         * mini-exceptions.c: Add a FIXME.
3352
3353 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
3354
3355         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
3356         altstack handling code.
3357
3358         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
3359         
3360         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
3361
3362         * mini-s390.c: Add support for generic sharing.
3363
3364         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
3365         Fix CAS on s390.
3366         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
3367
3368         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
3369
3370         * mini-s390x.c: Add support for generic sharing.
3371         
3372         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
3373         Fix CAS on ia64.
3374         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
3375
3376         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
3377         can be used since it takes a 16 bit signed immediate.
3378
3379         * inssel-s390x.brg: Fix OP_SETRET.
3380
3381         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
3382
3383         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
3384
3385         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
3386
3387         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
3388
3389         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
3390         in one place.
3391
3392         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
3393         stuff.
3394
3395         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
3396         of the unused mono_arch_patch_delegate_trampoline stuff.
3397
3398 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
3399
3400         * basic-long.cs: Move the fp related tests to basic-float.cs.
3401
3402         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
3403
3404         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
3405
3406         * basic-calls.cs: Add a test for proper float argument passing.
3407
3408         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
3409         if the context corresponds to an exception received through a signal.
3410
3411         * exceptions.cs: Add a test for nullref handling at the start of a try
3412         clause.
3413
3414         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
3415
3416         * jit-icalls.c (mono_break): New JIT icall.
3417
3418         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
3419
3420         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
3421
3422 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
3423
3424         * cpu-*.md: Get rid of unused opcodes.
3425
3426         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
3427
3428         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
3429         by all platforms.
3430
3431         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
3432         define.
3433
3434         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
3435         the arch independent trampoline code in mini-trampolines.c.
3436
3437         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
3438
3439         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
3440
3441         * mini-s390.h: Remove an unused define.
3442         
3443         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
3444         the arch independent trampoline code in mini-trampolines.c.
3445
3446         * mini-arm.c (mono_arch_emit_prolog): Fix build.
3447
3448 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
3449
3450         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
3451
3452         * mini-s390.c (mono_arch_emit_prolog): Fix build.
3453
3454         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
3455
3456         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
3457
3458         * cpu-amd64.md: Use smaller sizes for int opcodes.
3459
3460         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
3461
3462         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
3463         objects.cs.
3464
3465         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
3466         debugging.
3467
3468         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
3469         instead of though a pointer to save an indirection when accessing elements of
3470         the array.
3471
3472         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
3473         some typos.
3474         (NOT_IMPLEMENTED): New helper macro.
3475         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
3476         of a bb.
3477
3478         * *.c: Use the new helper macro.
3479
3480 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
3481
3482         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
3483
3484 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
3485
3486         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
3487         stack slots.
3488
3489 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
3490
3491         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
3492         profiling is enabled.
3493         
3494         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
3495         the end.
3496         (mono_arch_emit_prolog): Add more first bblock optimizations.
3497
3498         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
3499         in order if possible.
3500         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
3501         bblock, since the arguments are still in their original registers.
3502
3503         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
3504
3505 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
3506
3507         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
3508         as well.
3509
3510         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
3511         offset 0.
3512
3513         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
3514
3515         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
3516         process async exceptions received while in unmanaged code.
3517
3518         * mini.c (mini_init): Install a callback with the runtime which will be called
3519         when a thread receives an async exception while in unmanaged code.
3520
3521         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
3522
3523         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
3524
3525 2008-01-16  Wade Berrier  <wberrier@novell.com>
3526
3527         * cpu-g4.md:
3528         * cpu-arm.md:
3529         * cpu-s390x.md:
3530         fix build
3531
3532 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
3533
3534         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
3535         compilation with sun cc.
3536
3537         * cpu-*.md: Fix the build.
3538
3539         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
3540
3541         * mini-amd64.h: Add some comments to the MonoLMF structure.
3542
3543         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
3544         
3545         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
3546         in the LMF structure if possible. This saves two instructions in the
3547         managed->native wrappers.
3548
3549         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
3550
3551 2008-01-16  Mark Probst  <mark.probst@gmail.com>
3552
3553         * generic-sharing.c: New type argument lookup code which uses the
3554         runtime generic context template.
3555
3556 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
3557
3558         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
3559
3560         * mini-arm.c (add_general): Fix arm eabi parameter passing.
3561         (mono_arch_output_basic_block): Fix localloc implementation.
3562
3563         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
3564
3565         * mini-ia64.c (peephole_pass): Fix ia64 build.
3566
3567         * mini-amd64.c (peephole_pass): Fix a warning.
3568         
3569         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
3570         at a constant offset from sp/fp.
3571
3572         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
3573         instead of obtaining it from *lmf in the managed method case.
3574
3575 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
3576
3577         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
3578
3579 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
3580
3581         * mini.h (MonoInstList): New type.
3582         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
3583         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
3584         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
3585         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
3586         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
3587         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
3588         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
3589         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
3590         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
3591         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
3592         MONO_INST_LIST_FOR_EACH_ENTRY,
3593         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
3594         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
3595         mono_inst_list_first, mono_inst_list_last,
3596         mono_inst_list_next, mono_inst_list_prev): New instruction
3597         list handling interfaces.
3598         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
3599         list head 'ins_list'.
3600         (MonoInst): Replace next pointer with list head 'node'.
3601         (MonoCallInst): Make 'out_args' a MonoInstList.
3602         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
3603         (MonoCompile): Delete reverse_inst_list and
3604         reverse_inst_list_len.
3605         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
3606         mono_arch_lowering_pass, mono_arch_local_regalloc,
3607         mono_arch_output_basic_block, mono_arch_emit_prolog):
3608         Convert to new instruction lists.
3609         (insert_after_ins): Delete.
3610         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
3611         instruction lists.
3612         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
3613         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
3614         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
3615         mono_emulate_opcode, mono_emit_load_got_addr,
3616         inline_method, mono_method_to_ir, mono_print_bb_code,
3617         print_dfn, decompose_pass, nullify_basic_block,
3618         replace_out_block_in_code, remove_block_if_useless,
3619         merge_basic_blocks, move_basic_block_to_end,
3620         try_unsigned_compare, optimize_branches, mono_print_code,
3621         mini_select_instructions, remove_critical_edges): Likewise.
3622         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
3623         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
3624         mono_arch_output_basic_block, mono_arch_emit_prolog):
3625         Likewise.
3626         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
3627         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
3628         mono_arch_output_basic_block): Likewise.
3629         (inst_list_prepend, insert_after_ins): Delete.
3630         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
3631         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
3632         instruction lists.
3633         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
3634         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
3635         mono_arch_emit_prolog): Likewise.
3636         * cfold.c (mono_constant_fold): Likewise.
3637         * liveness.c (visit_bb, mono_analyze_liveness,
3638         optimize_initlocals): Likewise.
3639         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
3640         * graph.c (mono_draw_code_cfg): Likewise.
3641         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
3642         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
3643         mono_ssa_cprop): Likewise.
3644         * abcremoval (get_relations_from_previous_bb, process_block):
3645         Likewise.
3646         * local-propagation (mono_cprop_invalidate_values,
3647         mono_local_cprop_bb): Likewise.
3648         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
3649         peephole_pass, mono_arch_output_basic_block,
3650         mono_arch_emit_prolog): Likewise.
3651         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
3652         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
3653         mono_arch_emit_prolog): Likewise.
3654         (insert_after_ins): Delete.
3655         * aliasing.c (print_code_with_aliasing_information,
3656         mono_build_aliasing_information, mono_aliasing_deadce):
3657         Convert to new instruction lists.
3658         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
3659         peephole_pass, NEW_INS, mono_arch_lowering_pass,
3660         mono_arch_local_regalloc, mono_arch_output_basic_block):
3661         Likewise.
3662         (insert_after_ins): Delete.
3663         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
3664         peephole_pass, mono_arch_output_basic_block): Convert to
3665         new instruction lists.
3666         * mini-codegen (InstList, inst_list_prepend,
3667         insert_after_ins): Delete.
3668         (insert_before_ins, get_register_force_spilling,
3669         get_register_spilling, free_up_ireg, free_up_reg,
3670         create_copy_ins, create_spilled_store, alloc_int_reg,
3671         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
3672         to new instruction lists.
3673         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
3674         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
3675         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
3676         (insert_after_ins): Delete.
3677         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
3678         mono_arch_local_regalloc, mono_arch_output_basic_block,
3679         mono_arch_call_opcode): Convert to new instruction lists.
3680         (insert_after_ins): Delete.
3681         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
3682         peephole_pass, mono_arch_output_basic_block,
3683         mono_arch_emit_prolog): Convert to new instruction lists.
3684
3685 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
3686
3687         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
3688
3689         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
3690         Fixes #353182.
3691
3692         * Makefile.am (version.h): Make this work with non-bash shells.
3693
3694 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
3695
3696         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
3697
3698 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
3699
3700         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
3701         the InitializeArray optimization.
3702
3703 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
3704
3705         * mini.c driver.c: Don't include os/gc_wrapper.h.
3706
3707 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
3708
3709         * mini.c (print_jit_stats): Print GC statistics if available.
3710
3711 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
3712
3713         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
3714
3715 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
3716
3717         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
3718
3719 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
3720
3721         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
3722         
3723         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
3724
3725         * driver.c (mono_main): Ditto.
3726
3727 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
3728
3729         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
3730
3731         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
3732         in the vtable can't be encoded.
3733         (compile_method): Ditto.
3734
3735 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
3736
3737         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
3738         defined.
3739
3740         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
3741         lmf->rbp.
3742
3743         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
3744         the top LMF entry belongs to the current method.
3745
3746         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
3747
3748 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
3749
3750         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
3751         
3752         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
3753
3754         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
3755
3756         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
3757
3758         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
3759
3760         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
3761         implementation.
3762
3763         * basic-float.cs: Add an ulong->double cast test.
3764
3765 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
3766
3767         * mini.c (mono_method_to_ir): Fix a warning.
3768
3769 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
3770
3771         * mini-ops.h: Add OP_SWITCH.
3772
3773         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
3774         CEE_SWITCH in back-end code, use OP_SWITCH instead.
3775
3776 2007-12-11  Geoff Norton  <gnorton@novell.com>
3777
3778         * mini-s390x.c: Minor change to the MAX() define to allow
3779         it to compile with other gcc versions.
3780
3781 2007-12-11  Geoff Norton  <gnorton@novell.com>
3782
3783         * cpu-s390x.md:
3784         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
3785
3786 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
3787
3788         exceptions-arm.c (mono_arch_get_restore_context): Restore
3789         the frame pointer.
3790
3791         exceptions-arm.c (throw_exception): Save the frame pointer.
3792         This is a partial fix for #323747. Only the client side is
3793         fixed.
3794
3795 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
3796
3797         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
3798         was using an unrelated variable to log the class which
3799         needed the cctor to be called. This was crashing on arm.
3800
3801 2007-12-09  Robert Jordan  <robertj@gmx.net>
3802
3803         * mini-x86.c (mono_arch_emit_epilog):
3804         Consider all kinds of 64-bit types. Fixes #323114.
3805
3806 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
3807
3808         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
3809
3810 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
3811
3812         * mini-amd64.c (peephole_pass): Add a missing instruction check.
3813
3814 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
3815
3816         * mini.c: run type ctor before allocating an object, not only
3817         when running it's constructor method (fixes at least part of bug #342507).
3818
3819 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
3820         
3821         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
3822         
3823         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
3824         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
3825         function.
3826
3827         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
3828         mono_generic_class_init_trampoline () the same as it is done with the other
3829         trampolines.
3830
3831         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
3832         aot-runtime.c aot-compiler.c: Implement AOT support.    
3833
3834 2007-12-07  Mark Probst  <mark.probst@gmail.com>
3835
3836         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
3837         build for archs which don't have the vtable trampoline defined
3838         yet.
3839
3840 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
3841
3842         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
3843
3844         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
3845
3846         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
3847
3848         * tramp-<ARCH>.c: Use the new helper function.
3849
3850 2007-12-07  Mark Probst  <mark.probst@gmail.com>
3851
3852         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
3853         trampoline call, which takes a vtable argument.
3854
3855         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
3856         OP_TRAMPCALL_VTABLEs like other calls.
3857
3858         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
3859         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
3860         call.  Implemented a support function which fetches the vtable
3861         from a register set.
3862
3863         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
3864         Implemented a generic class init trampoline, using the
3865         OP_TRAMPCALL_VTABLE opcode.
3866
3867         * mini.c: Implemented static field access when sharing generic
3868         code.  This implies initing the class using the new
3869         OP_TRAMPCALL_VTABLE call.
3870
3871 2007-12-07  Mark Probst  <mark.probst@gmail.com>
3872
3873         * mini.c: Don't compile methods with sharing enabled if their
3874         classes are disabled for sharing.
3875
3876 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
3877
3878         * inssel.brg: Add a missing sign extension to the GETCHR and array access
3879         opcodes. Fixes #346563.
3880
3881         * objects.cs: Add a new test.
3882
3883         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
3884
3885         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
3886         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
3887
3888 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
3889
3890         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
3891
3892 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
3893
3894         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
3895         code stream.
3896
3897 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
3898
3899         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
3900
3901         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
3902         optimization in the AOT case.
3903         
3904 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
3905
3906         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
3907         
3908         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
3909
3910         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
3911
3912         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
3913
3914         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
3915         is created by the inlined delegate ctor.
3916
3917         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
3918
3919         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
3920
3921 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
3922
3923         * cpu-x86.md: Fix the length of ckfinite.
3924
3925 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
3926
3927         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
3928         
3929         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
3930         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
3931
3932         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
3933
3934         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
3935         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
3936
3937 2007-11-28  Martin Baulig  <martin@ximian.com>
3938
3939         * mini-x86.c
3940         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
3941         after creating the trampoline.
3942
3943 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
3944
3945         * aot-runtime.c (load_aot_module): Check runtime version if needed.
3946
3947         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
3948         the same version.
3949
3950         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
3951         instead of the calling method to help AOT.
3952
3953         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
3954
3955 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
3956
3957         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
3958         is defined.
3959
3960 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
3961
3962         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
3963         
3964         * aot-compiler.c (compile_method): Correct check for generic method definitions.
3965         (encode_method_ref): No need to handle generic method definitions specially.
3966
3967         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
3968
3969         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
3970         decode_klass_info.
3971
3972         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
3973         encode_klass_info.
3974         (compile_method): Enable generic sharing.
3975
3976 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
3977
3978         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
3979         (mini_method_compile): Add preliminary support for AOTing shared generic code.
3980
3981         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
3982         generic code.
3983
3984         * mini-trampolines.c: Fix a warning.
3985
3986         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
3987         NEW_PCONST.
3988         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
3989         (generic_class_is_reference_type): Remove unused function.
3990
3991         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
3992         in the generic vtable trampoline case.
3993
3994         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
3995         
3996         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
3997         return an AOT method based on a vtable slot.
3998
3999         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
4000
4001         * mini.c (mini_get_vtable_trampoline): Export this.
4002
4003 2007-11-22  Martin Baulig  <martin@ximian.com>
4004
4005         * debug-debugger.h
4006         (MonoDebuggerInfo): Move `debugger_version' up.
4007
4008 2007-11-22  Martin Baulig  <martin@ximian.com>
4009
4010         * mini-amd64.c
4011         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
4012
4013         * mini-trampolines.c
4014         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
4015         after compiling the method.
4016
4017 2007-11-20  Martin Baulig  <martin@ximian.com>
4018
4019         * debug-mini.c
4020         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
4021         (mono_debugger_remove_breakpoint): Likewise.
4022         (mono_debugger_check_breakpoints): Likewise.
4023
4024         * debug-debugger.c: Implement the new breakpoint interface here.
4025
4026 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
4027
4028         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
4029         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
4030
4031         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
4032
4033 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
4034
4035         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
4036
4037         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
4038         mini.c.
4039
4040         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
4041         mini.c.
4042
4043         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
4044         returning a vtype in a register.
4045
4046         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
4047         here from the arch specific code.
4048
4049         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
4050         mini.c.
4051
4052         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
4053         (mono_arch_emit_prolog): Increment maximum prolog size.
4054
4055         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
4056         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
4057
4058         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
4059         MonoGenericSharingContext.
4060
4061         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
4062         MonoGenericSharingContext. Allocate memory from the cfg mempool.
4063
4064 2007-11-15  Mark Probst  <mark.probst@gmail.com>
4065
4066         * mini.c, mini.h, generic-sharing.c: Functions for producing code
4067         which extract fields out of the runtime generic context.  Full
4068         sharing of the NEWARR opcode.
4069
4070 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
4071
4072         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
4073         --enable-minimal=ssa.
4074
4075 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
4076
4077         * mini-trampolines.c (mono_delegate_trampoline): Update after 
4078         mono_marshal_get_delegate_invoke () signature change.
4079
4080 2007-11-13  Mark Probst  <mark.probst@gmail.com>
4081
4082         * mini.c: Removed the shared context in favor of the generic
4083         sharing context.  Allocate the MonoJitInfo structure with room for
4084         the generic sharing context if it's needed.
4085
4086         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
4087         domain-internals.h now.
4088
4089         * mini-x86.c: Pass the generic sharing context to get_call_info ().
4090
4091         * generic-sharing.c: Several changes for working without a shared
4092         context and instead operating on open types instead.
4093
4094 2007-11-12  David S. Miller  <davem@davemloft.net>
4095
4096        * inssel-sparc.brg: Fix double instruction emit.
4097
4098 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
4099
4100         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
4101         Get/Set/Address methods.
4102         
4103         * mini.c debug-debugger.c mini-trampolines.c: Update after 
4104         mono_marshal_get_delegate_invoke signature change.
4105
4106 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
4107
4108         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
4109         This can happens with dynamic methods. Fixes the other bug in #322722.
4110
4111 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
4112
4113         * tramp-arm.c (mono_arch_patch_callsite): Support patching
4114         BX call sequence.
4115
4116         * mini-arm.c (arm_patch): Implement patching of BX call
4117         sequence. Fixes one of the bugs in #322722.
4118
4119 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
4120
4121        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
4122        under Linux.  We only need to flush every 32-byte cache line.    
4123
4124 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
4125
4126         * mini.c:
4127         move_basic_block_to_end: Add branches when needed, eventually creating
4128         a new BB.
4129         optimize_branches: added a parameter that tells if it's ok to create
4130         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
4131         and avoid calling move_basic_block_to_end when it's not ok.
4132         Fixes bug 318677.
4133
4134 2007-11-07  Mark Probst  <mark.probst@gmail.com>
4135
4136         * mini.c: Abort inlining call to InitializeArray if something
4137         looks wrong.  Let the icall handle it, which now has proper safety
4138         checks.
4139
4140 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
4141
4142         * mini.c (mono_spill_call): add support for soft-float.
4143
4144         * mini.c (mono_method_to_ir): add support for soft-float
4145         to inlined functions that return float.
4146
4147         * mini.c (mono_method_to_ir): add support for soft-float
4148         to cee_stsfld opcode on float fields.
4149
4150 2007-11-05  Geoff Norton  <gnorton@novell.com>
4151
4152         * mini-x86.h: Fix the structure access for X86 Leopard.
4153
4154
4155 2007-11-05  Martin Baulig  <martin@ximian.com>
4156
4157         * mini-trampolines.c
4158         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
4159         after compiling the method to notify the debugger.
4160
4161 2007-11-05  Martin Baulig  <martin@ximian.com>
4162
4163         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
4164
4165 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
4166
4167         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
4168         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
4169
4170 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
4171
4172         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
4173         native-to-managed wrappers.
4174         
4175 2007-11-01  Geoff Norton  <gnorton@novell.com>
4176
4177         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
4178         members.
4179
4180 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
4181
4182         * mini.c, mini-x86.c: when getting back from unmanaged code
4183         to managed via a marshaled delegate we also need to set the
4184         right domain.
4185
4186 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
4187
4188         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
4189         for amd64.
4190
4191 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
4192
4193         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
4194         let the debugger or other external agents to tell the JIT when
4195         a sw breakpoint has been inserted in the code that the JIT needs
4196         to be able to inspect.
4197
4198 2007-10-31  Martin Baulig  <martin@ximian.com>
4199
4200         * debug-debugger.h
4201         (MonoDebuggerInfo): Remove `runtime_class_init'.
4202
4203 2007-10-30  Martin Baulig  <martin@ximian.com>
4204
4205         * debug-mini.h
4206         (mono_debugger_thread_created): Added `MonoThread *' argument.
4207         (mono_debugger_extended_notification): New public method.
4208         (mono_debugger_trampoline_compiled): New public method.
4209
4210         * debug-mini.c
4211         (MonoDebuggerThreadInfo): Added `thread' and
4212         `extended_notifications' fields.
4213
4214         * debug-debugger.c
4215         (debugger_executable_code_buffer): New static variable.
4216
4217         * debug-debugger.h
4218         (MonoDebuggerInfo): Added `executable_code_buffer',
4219         `executable_code_buffer_size', `breakpoint_info_area',
4220         `breakpoint_table' and `breakpoint_table_size'.
4221
4222 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
4223
4224         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
4225         that IP  either is an unused value or the vtable pointer. IMT 
4226         calls use vtable + offset now. Reduced by almost half the size
4227         of IMT entries.
4228
4229 2007-10-26  Jonathan Chambers <joncham@gmail.com>
4230
4231         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
4232         defines to access param registers. Replace long usage with
4233         gsize as sizeof(long) != sizeof(void*) on Win64.
4234
4235         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
4236         on Win64. Fix intrinsic, use _AddressOfReturnAddress
4237         instead of non-existant _GetAddressOfReturnAddress.
4238
4239         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
4240         param registers. Save/restore %rdi and %rsi in MonoLMF.
4241
4242         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
4243         param registers. Modify (throw_exception) signature to take 
4244         %rdi and %rsi on Win64. 
4245
4246         Code is contributed under MIT/X11 license.
4247
4248 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
4249
4250         * helpers.c: unlink debugging output files.
4251
4252 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
4253
4254         * mini.c: Move mono_create_ftnptr () to object.c.
4255
4256 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
4257
4258         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
4259         optional. This function can now be used to disassemble code generated
4260         outside the JIT such as trampolines and IMT thunks.
4261
4262         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
4263
4264         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
4265         vtable pointer from a ldr instruction.
4266
4267         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
4268         new IMT call sequence.
4269
4270         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
4271         call sequence for interface invocations.
4272
4273         * mini-arm.c (mono_arch_emit_imt_argument): added, required
4274         for imt support. This function is empty since IMT on ARM requires no
4275         special handling on the IR side.
4276
4277         * mini-arm.c (mono_arch_find_imt_method): added, required for
4278         imt support.
4279
4280         * mini-arm.c (mono_arch_find_this_argument): added, required
4281         for imt support.
4282
4283         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
4284         a ldr instruction to load a value stored in the code stream.
4285
4286         * mini-arm.c (mono_arch_build_imt_thunk):added, required
4287         for imt support.
4288
4289
4290 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
4291
4292         * mini.c (mini_init): Install the jump trampoline callback.
4293
4294 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4295
4296         * mini-trampolines.c: handle synchronized methods with the common
4297         vtable trampoline (bug #335601).
4298
4299 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
4300
4301         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
4302
4303         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
4304         64 bit platforms.
4305
4306         * mini-ia64.h mini-ia64.c: Add support for IMT.
4307
4308         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
4309         prolog. Fixes #331958.
4310
4311 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
4312
4313         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
4314
4315 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4316
4317         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
4318         trampoline.
4319
4320 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4321
4322         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
4323         trampoline.
4324
4325 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
4326
4327         * mini-x86.c, mini-x86.h: x86 support for the common vtable
4328         trampoline.
4329
4330 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
4331
4332         * mini-trampolines.c: changed the magic rampoline to understand
4333         the common vtable trampoline method: the method to invoke is
4334         determined by the vtable displacement of the call.
4335
4336 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
4337
4338         * mini.c, mini.h: register the common vtable trampoline if the
4339         architecture supports it.
4340
4341 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4342
4343         * cpu-amd64.md: use the correct max length for tls_get.
4344
4345 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
4346
4347         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
4348         CEE_STELEM_ANY. Fixes #333696.
4349
4350 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
4351
4352         * exceptions-x86.c: provide more graceful handling of the case where
4353         we followed a bogus function pointer from managed code (bug #332866).
4354
4355 2007-10-11  Mark Probst  <mark.probst@gmail.com>
4356
4357         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
4358         replaces the generic_shared flag and will carry more information
4359         in the future.
4360
4361         * generic-sharing.c: Added mini_type_stack_size() which allows
4362         allows open types if given a generic sharing context.
4363         mini_get_basic_type_from_generic() takes a
4364         MonoGenericSharingContext* instead of a MonoCompile* now.
4365
4366         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
4367         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
4368         mini-sparc.c, mini-x86.c: Trivial changes required by the two
4369         changes above.  Just passing arguments through to the right
4370         places.
4371
4372 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
4373
4374         * mini-arm.c: unify the call emission to emit_code_seq().
4375
4376 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
4377
4378         * tramp-arm.c: reduced the trampoline size.
4379
4380 2007-10-10  Mark Probst  <mark.probst@gmail.com>
4381
4382         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
4383         variable handling out of arch-specific code.
4384
4385 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
4386
4387         * mini-arm.c: implemented fast delegate dispatch.
4388
4389 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
4390
4391         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
4392         that fp elimination is turned off if the space required by locals is too
4393         big. Fixes #331958.
4394
4395 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
4396
4397         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
4398         ARM to the new style trampoline.
4399
4400 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
4401
4402         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
4403
4404         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
4405
4406 2007-10-09  Martin Baulig  <martin@ximian.com>
4407
4408         * debug-debugger.h
4409         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
4410         `field_info_offset_offset'.     
4411
4412 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
4413
4414         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
4415         removed more internal usage of the r11 register and made it available
4416         to the register allocator.
4417
4418 2007-10-08  Mark Probst  <mark.probst@gmail.com>
4419
4420         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
4421         when sharing generics and treat type variables as references.
4422
4423 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
4424
4425         * mini-ppc.c: started removing the internal uses of register r11
4426         to eventually allow the register allocator to manage it as an
4427         additional available register.
4428
4429 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
4430
4431         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
4432
4433 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
4434
4435         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
4436         specific trampolines as they are not performance critical as a jump
4437         target (maybe align as before only for AOT code?). This saves about
4438         200 KB of native code on x86 for monodevelop startup.
4439
4440 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
4441
4442         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
4443         monodevelop startup.
4444
4445 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
4446
4447         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
4448
4449         * mini-sparc.h mini-sparc.c: Implement IMT support.
4450
4451         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
4452         its smaller and doesn't clobber sparc_g1.
4453
4454         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
4455
4456 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
4457
4458         * mini-ppc.c: optimized the size of the IMT thunks a bit.
4459
4460 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
4461
4462         * mini-ppc.c: implemented fast delegate invocation.
4463
4464 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
4465
4466         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
4467
4468 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
4469
4470         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
4471         code to the new style trampoline in preparation for IMT support.
4472
4473 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
4474
4475         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
4476         systems already. This also reduces the specific trampiline sizes and
4477         prepares for the use of r12 as the IMT identifier register.
4478
4479 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4480
4481         * mini-mips.h: endianess fix (simplified from a patch by
4482         Thomas Kunze <thommy@tabao.de>, bug #323737).
4483
4484 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
4485
4486         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
4487         to access ucontext fields and enable netbsd support
4488         (partially from Magnus Henoch <mange@freemail.hu>).
4489
4490 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4491
4492         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
4493         use the preprocessor from the CPP env var if it is set.
4494
4495 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
4496
4497         * mini-trampolines.c: fixed an assertion and moved it earlier in the
4498         code, before interface_offset gets used.
4499
4500 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
4501
4502         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
4503         mono_class_setup_vtable () before accessing klass->vtable.
4504
4505 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
4506
4507         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
4508         hackish.
4509
4510 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4511
4512         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
4513         IMT slots (this saves hundreds of KB of memory in programs like
4514         IronPython and Monodevelop).
4515
4516 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
4517
4518         * mini.c: print the delegate counter.
4519
4520 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
4521
4522         * mini-x86.c: make it easier to enable the debugging code for IMT
4523         slots.
4524
4525 2007-09-28  Martin Baulig  <martin@ximian.com>
4526
4527         * debug-debugger.h
4528         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
4529         `mono_method_klass_offset' and `mono_method_token_offset'.
4530
4531 2007-09-20  Mark Probst  <mark.probst@gmail.com>
4532
4533         * mini.c: First generics sharing implementation.  Can only share
4534         in very simple cases.  If sharing doesn't work it falls back to
4535         dedicated compilation.
4536
4537         * mini.h: Flag in MonoCompile to specify whether generic
4538         compilation is shared.  Flags enum for marking which generic inst
4539         of a context is used.  Prototypes for helper functions.
4540
4541         * generic-sharing.c: Helper functions for generic method sharing.
4542
4543         * optflags-def.h: Optimization flag (gshared) for enabling generic
4544         method sharing added.
4545
4546         * Makefile.am: generic-sharing.c added.
4547
4548 2007-09-19 Daniel Nauck <dna@mono-project.de>
4549
4550         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
4551
4552 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
4553         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
4554         fixes bug 325507.
4555
4556 2007-09-19  Martin Baulig  <martin@ximian.com>
4557
4558         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
4559         mono_debug_cleanup() is now part of mono_cleanup().
4560
4561 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
4562
4563         * driver.c (mono_main): Fix a warning.
4564
4565 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
4566
4567         * aot-compiler.c: Optimize various parts when processing large assemblies.
4568         Fixes ##325568.
4569
4570         * mini.c (mono_patch_info_hash): Improve hash function.
4571
4572 2007-09-14  Jonathan Chambers <joncham@gmail.com>
4573
4574         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
4575         
4576         Code is contributed under MIT/X11 license.
4577
4578 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
4579
4580         * mini.c (mini_init): Fix a leak.
4581
4582         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
4583
4584 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
4585
4586         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
4587
4588 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
4589
4590         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
4591
4592 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
4593
4594         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
4595         variance tests.
4596
4597         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
4598
4599         * mini.c (handle_alloc): Enable managed allocators in AOT code.
4600
4601         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
4602
4603         * aot-runtime.c (decode_patch_info): Ditto.
4604
4605 2007-09-12  Jonathan Chambers <joncham@gmail.com>
4606
4607         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
4608         static case. Cache delegates in architecture specific code, 
4609         based on number of parameters.
4610         
4611         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
4612         in architecture specific code, based on number of parameters.
4613         
4614         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
4615         caching happen in architecture specific code now.
4616         
4617         Code is contributed under MIT/X11 license.
4618
4619 2007-09-12  Jonathan Chambers <joncham@gmail.com>
4620
4621         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
4622         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
4623         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
4624
4625         Code is contributed under MIT/X11 license.
4626
4627 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
4628         * mini.c: (mono_thread_abort) Fixed bug #82416.
4629
4630 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
4631
4632         * mini.: hook the new managed GC allocation feature into the JIT.
4633
4634 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
4635
4636         * mini.c: implementation for the new runtime tls opcode.
4637
4638 2007-09-11  Martin Baulig  <martin@ximian.com>
4639
4640         * debug-debugger.h
4641         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
4642         `mono_method_inflated_offset'.
4643
4644 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
4645
4646         * driver.c mini.h mini.c: Add a new devel command line option for injecting
4647         async exceptions into a method.
4648
4649         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
4650         purpose of testing whenever the unwinder works at every instruction.
4651
4652 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
4653
4654         * mini.c: check accessibility of method used in ldftn (fixes
4655         bug #82635).
4656
4657 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
4658
4659         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
4660
4661         * inssel.brg: Fix a warning.
4662
4663 2007-09-03  Martin Baulig  <martin@ximian.com>
4664
4665         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
4666         now takes the `main_method' as argument.
4667
4668 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
4669
4670         * cpu-sparc.md (endfilter): Add missing src1:i argument.
4671
4672 2007-08-30  Jonathan Chambers <joncham@gmail.com>
4673
4674         * driver.c: include the cil-coff.h header on Windows.
4675         
4676         Code is contributed under MIT/X11 license.
4677
4678 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
4679
4680         * mini.c, driver.c: don't include the cil-coff.h header.
4681
4682 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
4683
4684         * mini.c: flag places that needs fixes fo soft-float support.
4685
4686 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
4687
4688         * mini.h, inssel-float.brg: fix soft-float constant loads on big
4689         endian systems (partially from Dean Jenkins, bug #81924).
4690
4691 2007-08-28  Mark Probst  <mark.probst@gmail.com>
4692
4693         * mini.c (check_linkdemand): Remove embedded reference object in
4694         call to LinkDemandSecurityException.
4695         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
4696         with an IntPtr instead of a reference object.
4697
4698 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
4699
4700         * mini.c (handle_initobj): Handle alignment properly.
4701
4702         * inssel.brg (mini_emit_memset): Ditto. 
4703
4704         * inssel.brg (mini_emit_memcpy): Ditto. 
4705
4706         * inssel-sparc.brg: Ditto.              
4707
4708         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
4709
4710 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
4711
4712         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
4713         exceptions raised in unmanaged code. Fixes part of #82594.
4714
4715 2007-08-24  Mark Probst  <mark.probst@gmail.com>
4716
4717         * mini.c (mono_method_to_ir), declsec.c
4718         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
4719
4720 2007-08-22  Martin Baulig  <martin@ximian.com>
4721
4722         * debug-mini.h
4723         (MonoDebuggerThreadInfo): New typedef.
4724         (mono_debugger_thread_table): New global variable.
4725         (mono_debugger_thread_created): New public function.
4726         (mono_debugger_thread_cleanup): New public function.
4727
4728         * debug-debugger.h
4729         (MonoDebuggerInfo):
4730         - removed `get_current_thread' and `lookup_assembly'.
4731         - removed `data_table'.
4732         - added `thread_table'.
4733
4734         * mini.c
4735         (mono_thread_start_cb): Call mono_debugger_thread_created().
4736         (mono_thread_attach_cb): Likewise.
4737         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
4738         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
4739         initial domain.
4740
4741         * driver.c (mono_main): Move mono_debug_init() up, before calling
4742         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
4743
4744 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
4745
4746         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
4747         together when passing several arguments of type double (gives a small
4748         speedup and saves a few bytes of generated code).
4749
4750 2007-08-20  Jb Evain  <jbevain@novell.com>
4751
4752         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
4753
4754 2007-08-20  Jb Evain  <jbevain@novell.com>
4755
4756         * mini.c (mono_method_to_ir): throw MethodAccessException
4757         and FieldAccessException instead of InvalidProgramException.
4758
4759 2007-08-20  Mark Probst  <mark.probst@gmail.com>
4760
4761         * mini.c: CoreCLR security checks.
4762
4763         * mini.h: Removed MonoSecurityMode (moved to
4764         metadata/security-manager.h) and mono_security_mode global var
4765         (replaced by set/get functions in security-manager.h).
4766
4767         * driver.c: Added "core-clr-test" security mode for testing.  Used
4768         set-function for setting security mode.
4769
4770 2007-08-17  Mark Probst  <mark.probst@gmail.com>
4771
4772         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
4773         the new jit_info_table.
4774
4775         * driver.c: Test code for the new jit_info_table (enabled by the
4776         define MONO_JIT_INFO_TABLE_TEST).
4777
4778 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
4779
4780         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
4781         detection of call <REG> instruction sequence. Fixes build on freebsd.
4782
4783 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
4784
4785         * mini-exceptions.c: Fix a warning.
4786
4787 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
4788
4789         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
4790         stack overflow handling code on amd64 too.
4791
4792         * mini-exceptions.c (mono_setup_altstack): Make this use 
4793         mono_thread_get_stack_bounds ().
4794
4795         * mini-x86.h: Disable sigaltstack on solaris x86.
4796
4797 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
4798
4799         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
4800
4801 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
4802
4803         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
4804
4805 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
4806
4807         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
4808
4809         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
4810
4811 2007-08-03  Neale Ferguson <neale@sinenomine.net>
4812
4813         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
4814         due to alignment.
4815
4816 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
4817
4818         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
4819         to be emitted (bug #82281).
4820
4821 2007-08-01  Martin Baulig  <martin@ximian.com>
4822
4823         Merged the `debugger-dublin' branch.
4824
4825         * debug-debugger.h (MonoDebuggerInfo):
4826         Removed the `old_*' compatibility entries.
4827         Added `debugger_version' and `data_table'.
4828         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
4829         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
4830
4831         * debug-mini.c
4832         (MiniDebugMethodBreakpointInfo): Add `address_list'.
4833         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
4834         instead of a `gconstpointer'.
4835         (mono_debugger_insert_method_breakpoint): Return a
4836         `MonoDebugMethodAddressList *'.
4837
4838 2007-06-28  Martin Baulig  <martin@ximian.com>
4839
4840         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
4841
4842 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
4843
4844         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
4845         __builtin_frame_address () since it is broken on older gcc versions.
4846
4847 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
4848
4849         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
4850         on the stack overflow handling and made the managed stack overflows
4851         catchable in most cases using soft guard pages.
4852         * exceptions-x86.c: added code to restore the protection in the soft
4853         guard pages at the end of exception handling.
4854
4855 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
4856
4857         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
4858
4859 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
4860
4861         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
4862         exception handling.
4863
4864 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
4865
4866         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
4867         signal handling support until it has been ported to the new mechanism.
4868         * mini.c: fixed stack overflow detection and use the new
4869         architecture code  to handle signals on the altstack.
4870
4871 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
4872
4873         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
4874         stack overflows on the alt stack.
4875
4876 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
4877
4878         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
4879         stack overflows on the alt stack.
4880
4881 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
4882
4883         * exceptions-ppc.c: cleanup preparing for altstack support.
4884
4885 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
4886
4887         * exceptions-arm.c: cleanup preparing for altstack support.
4888
4889 2007-07-27  Mark Probst  <mark.probst@gmail.com>
4890
4891         * mini.c (print_jit_stats): Output hazard pointer stats.
4892
4893 2007-07-26  Mark Probst  <mark.probst@gmail.com>
4894
4895         * driver.c, mini.c: Replaced security mode flags with a single
4896         enum variable.
4897
4898 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
4899
4900         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
4901
4902 2007-07-25  Mark Probst  <mark.probst@gmail.com>
4903
4904         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
4905         (which doesn't do anything yet) for activating Core CLR
4906         (Silverlight) security.
4907
4908 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
4909
4910         * mini-codegen.c: work around a possible gcc bug on arm.
4911
4912 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
4913
4914         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
4915         message for platforms that don't support AOT compilation.
4916
4917 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
4918
4919         * mini.h, mini.c, driver.c: temporary smcs hack.
4920
4921 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
4922
4923         * mini-arm.h, mini-arm.c: arm EABI fixes.
4924
4925 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
4926
4927         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
4928         case.
4929
4930         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
4931         trampolines taking a method argument.
4932
4933         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
4934
4935         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
4936         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
4937
4938         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
4939         JIT compilation throws an exception. Fixes #82050.
4940
4941 2007-07-19  Mark Probst  <mark.probst@gmail.com>
4942
4943         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
4944         with the MONO_EXCEPTION_ defines.
4945
4946 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
4947
4948         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
4949         #82117.
4950         
4951         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
4952         the cause of an assertion.
4953
4954 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
4955
4956         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
4957         removed.
4958
4959 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
4960
4961         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
4962         assert. Should fix #82103.
4963
4964 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
4965
4966         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
4967         here too. Fixes #82095.
4968
4969         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
4970         addresses.
4971
4972         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
4973
4974         * mini-amd64.h: Enable IMT for amd64.
4975         
4976         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
4977
4978 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
4979
4980         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
4981
4982 2007-07-12  Mark Probst  <mark.probst@gmail.com>
4983
4984         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
4985         as soon as check_linkdemand sets an exception_type.
4986
4987 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
4988
4989         * mini-x86.c: fixed offsets for IMT call sequence.
4990         * mini-x86.h: enable IMT again.
4991
4992 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
4993
4994         * trace.c (mono_trace_enter_method): Decode MonoType too.
4995
4996         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
4997
4998         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
4999
5000         * mini-amd64.c: Add preliminary IMT implementation.
5001         
5002 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
5003
5004         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
5005         understand the new IMT-base interface invocation (thanks to
5006         Daniel Nauck for the report and the remote debugging session).
5007
5008 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
5009
5010         * mini-x86.c: size and speed optimizations for the IMT bsearch.
5011
5012 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
5013
5014         * Makefile.am (aotcheck): Make this actually use the AOTed code.
5015
5016 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
5017
5018         * mini-trampolines.c: implement AOT IMT support.
5019         * mini-x86.h: enable IMT support for wider testing.
5020
5021 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
5022
5023         * inssel.brg (emit_imt_argument): Add aot support here.
5024
5025         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
5026
5027 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
5028
5029         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
5030         of the IMT implementation, partially from massi, with my
5031         implementation of the bsearch sequence. Disabled by default until
5032         the AOT code is implemented.
5033
5034 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
5035
5036         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
5037
5038         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
5039
5040 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
5041
5042         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
5043         arch-independent IMT JIT code from Massimiliano
5044         Mantione (massi@ximian.com) with small cleanups from me.
5045
5046 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
5047
5048         * Makefile.am: fix svn invocation to get the svn revision to be
5049         independent of the local language (build fix).
5050
5051 2007-07-09  Mark Probst  <mark.probst@gmail.com>
5052
5053         * mini.c (inline_method): Reset cfg->exception_type if the
5054         inlining is aborted.  Fixes: 82049.
5055
5056 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
5057
5058         * mini.c: remove assert from exception handling code when exception_ptr
5059         is not set.
5060
5061 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
5062
5063         * mini.c (mono_codegen): Add an assert.
5064
5065         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
5066         enter and leave code.
5067         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
5068
5069 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5070
5071         * mini-ppc.c: fixed memory corruption for localloc(0)
5072         (bug #81852).
5073
5074 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
5075         
5076         * mini.c: Fix warnings.
5077
5078 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
5079
5080         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
5081         to emit better double->int conversions.
5082
5083 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
5084
5085         * mini.c: the provided Min/Max optimizations are valid for unisgned
5086         ints.
5087
5088 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
5089
5090         * 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
5091
5092 2007-06-28  Miguel de Icaza  <miguel@novell.com>
5093
5094         * mini.c (mono_running_on_valgrind): Add support for reporting the
5095         method and  its boundaries to valgrind.
5096
5097 2007-06-28  Martin Baulig  <martin@ximian.com>
5098
5099         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
5100
5101 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
5102
5103         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
5104
5105         * generic.2.cs: Add new test case.
5106
5107 2007-06-25  Martin Baulig  <martin@ximian.com>
5108
5109         Merged the `debugger-dublin' branch.
5110
5111         * debug-mini.c
5112         (mono_debugger_insert_method_breakpoint): New public method.
5113         (mono_debugger_remove_method_breakpoint): Likewise.
5114         (mono_debugger_check_breakpoints): New static method.
5115         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
5116
5117         * debug-debugger.h (MonoDebuggerInfo):
5118         Renamed (to keep backward compatibility in the vtable):
5119         `insert_breakpoint' -> `old_insert_breakpoint'.
5120         `remove_breakpoint' -> `old_remove_breakpoint'.
5121         `create_string' -> `old_create_string'.
5122         `lookup_class' -> `old_lookup_class'.
5123         `lookup_type' -> removed; changed into a dummy field.
5124         `lookup_assembly' -> `old_lookup_assembly'.
5125         Added (same functionality, but different signature):
5126         `create_string', `lookup_class', `lookup_assembly'
5127         Added new:
5128         `get_method_addr_or_bpt', `remove_method_breakpoint',
5129         `runtime_class_init'.
5130
5131         * debug-debugger.c: Merged the `debugger-dublin' branch.
5132
5133 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
5134
5135         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
5136         well.
5137         (peephole_pass): Likewise.
5138
5139 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
5140
5141         * driver.c: hopefully make setaffinity work also for ancient
5142         versions of linux.
5143
5144 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
5145
5146         * driver.c : win32 build fix.
5147
5148 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
5149
5150         * driver.c: check for the MONO_NO_SMP env var and bind to a single
5151         processor if it is set.
5152
5153 2007-06-21  Martin Baulig  <martin@ximian.com>
5154
5155         * debug-mini.h: New file.
5156
5157         * debug-mini.c
5158         (mono_debugger_insert_breakpoint_full): Moved here from
5159         ../metadata/mono-debug-debugger.c.
5160         (mono_debugger_remove_breakpoint): Likewise.
5161         (mono_debugger_breakpoint_callback): Likewise.
5162
5163 2007-06-15  Raja R Harinath  <rharinath@novell.com>
5164
5165         * jit-icalls.c (mono_helper_compile_generic_method): Update to
5166         changes in MonoGenericClass.
5167
5168 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
5169
5170         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
5171
5172 2007-06-14  Raja R Harinath  <rharinath@novell.com>
5173
5174         * jit-icalls.c (mono_helper_compile_generic_method): Update to
5175         removal of MonoGenericMethod.
5176
5177 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5178
5179         * mini-exceptions.c: hooks for the exception events profiling API.
5180
5181 2007-06-14  Randolph Chung  <tausq@debian.org>
5182
5183         * Makefile.ma: Add hppa target.
5184         * mini-arch.h: Include mini-hppa.h
5185         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
5186         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
5187         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5188
5189 2007-06-14  Randolph Chung  <tausq@debian.org>
5190
5191         * inssel.brg: Add rules for "chained" compare-branch operations so that
5192         a single compare op can affect multiple branches.  Adjust cost for
5193         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
5194         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
5195         cost for some rules so that they can more easily be overridden by
5196         per-arch rules (with fixes from lupus).
5197         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5198
5199 2007-06-13  Randolph Chung  <tausq@debian.org>
5200
5201         * mini-ops.h: Reorder branch ops so that they match the order of the
5202         corresponding CEE_* ops.  The code expects them this way.
5203         Add new ops for HPPA target.
5204         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5205
5206 2007-06-13  Randolph Chung  <tausq@debian.org>
5207
5208         * mini-exceptions.c: Handle cases where the stack grows towards
5209         larger addresses.
5210         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5211
5212 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
5213
5214         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
5215         counter.
5216         * driver.c: explain where a non-matching corlib is found.
5217
5218 2007-06-13  Mark Probst  <mark.probst@gmail.com>
5219
5220         * mini.c (print_jit_stats): Output dynamic code allocation stats.
5221
5222 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
5223
5224         * mini-exceptions.c: Generate a method profile leave event during
5225         an exception to ensure that the profiler gets notified.
5226
5227 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
5228
5229         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
5230         branch.
5231
5232         * cpu-amd64.md: Add long_and/or/xor opcodes.
5233
5234 2007-06-06  Wade Berrier  <wberrier@novell.com>
5235
5236         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
5237         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
5238         length of instruction shr_imm (expected 8, got 10)
5239
5240 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
5241
5242         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
5243
5244 2007-06-06  Mark Probst  <mark.probst@gmail.com>
5245
5246         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
5247         MonoInternalHashTable again (fixed bug in the internal hash table
5248         code).
5249
5250 2007-06-06  Mark Probst  <mark.probst@gmail.com>
5251
5252         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
5253         Have to figure out what makes it crash the SWF regression.
5254
5255 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
5256
5257         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
5258
5259 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5260
5261         * mini.c: optimize out the type check when storing null in a
5262         reference array.
5263
5264 2007-06-04  Mark Probst  <mark.probst@gmail.com>
5265
5266         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
5267         MonoInternalHashTable.
5268
5269 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
5270
5271         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
5272         signed integer methods.
5273
5274 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
5275
5276         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
5277         permanently since the current approach doesn't work.
5278
5279 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
5280
5281         * inssel.brg (stmt): Only call delegate->invoke_impl if 
5282         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
5283
5284 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
5285
5286         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
5287         the sreg2==rdx case.
5288         
5289         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
5290         account if it contains a rex prefix.
5291         (peephole_pass): Handle OP_FMOVE as well.
5292
5293 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
5294
5295         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
5296         as it causes regressions.
5297
5298 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
5299
5300         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
5301         static case as well.
5302
5303         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
5304
5305         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
5306         (mono_arch_get_this_arg_from_call): Ditto.
5307
5308         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
5309
5310         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
5311         invoke_impl field.
5312
5313         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
5314         (mono_arch_get_this_arg_from_call): Ditto.
5315
5316         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
5317         
5318         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
5319         try to create optimized invoke code and use that for further invocations. 
5320         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
5321
5322         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
5323
5324 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
5325
5326         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
5327         sealed classes or methods.
5328         *devirtualization.cs: tests for the new optimization
5329
5330 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
5331
5332         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
5333         by the update_volatile () function.
5334
5335 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
5336
5337         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
5338         require it.
5339
5340         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
5341
5342 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
5343
5344         * mini.c: Add configure checks for header files.
5345         * mini-x86.c: Add configure checks for header files.
5346         * trace.c: Add configure checks for header files.
5347         * aot-runtime.c: Add configure checks for header files.
5348         * aot-compiler.c: Add configure checks for header files.
5349         * driver.c: Add configure checks for header files.
5350         * mini-codegen.c: Add configure checks for header files.
5351         
5352         Code is contributed under MIT/X11 license.
5353
5354 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
5355
5356         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
5357         icompare_imm -128 + op_iclt. Fixes #81703.
5358
5359 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
5360
5361         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
5362
5363 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
5364
5365         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
5366         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
5367         so that all isinst checks now use "interface_bitmap".
5368
5369 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
5370
5371         * cpu-amd64.md (jmp): Fix a warning.
5372
5373         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
5374
5375         * basic.cs: Add new regression test.
5376
5377         * basic.cs: Remove test which is now in basic-long.cs.
5378
5379         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
5380
5381         * basic-long.cs: Add new test.
5382         
5383 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
5384
5385         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
5386
5387 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
5388
5389         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
5390
5391         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
5392         places.
5393         
5394         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
5395         throwing code a bit.
5396
5397         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
5398         the exception throwing code a bit.
5399
5400         * mini-x86.c (get_call_info): Allocate result from a mempool.
5401
5402 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
5403
5404         * aot-compiler.c (find_typespec_for_class): Fix the assert.
5405
5406         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
5407
5408         * mini.h (MonoCompile): Add 'token_info_hash' field.
5409
5410         * mini.c: Save token->method associations during compilation so the AOT 
5411         compiler can use it.
5412         
5413         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
5414         which reference generic classes and methods.
5415
5416 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
5417
5418         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
5419
5420         * aot-compiler.c (compile_method): Fix a typo in a comment.
5421
5422         * aot-runtime.c (decode_cached_class_info): Skip generic types.
5423
5424         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
5425         everything generic.
5426
5427         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
5428
5429 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
5430
5431         * mini.h (MonoCompile): Add 'args' field.
5432
5433         * mini.c (mono_compile_create_vars): Store variables representing the arguments
5434         into cfg->args.
5435
5436         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
5437
5438 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
5439
5440         * mini.c (mono_compile_get_interface_var): Remove this unused function.
5441
5442         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
5443
5444         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
5445         opcodes for some opcodes.
5446
5447         * mini.h *.brg *.c: Use the new opcodes.
5448
5449 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
5450
5451         * mini.h: Bumped aot revision.
5452
5453         * inssel.brg: modified code generation of type checks for interfaces
5454         to use the new "MonoClass.interface_bitmap" instead of the old
5455         "MonoClass.interface_offsets".
5456
5457 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
5458
5459         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
5460
5461 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
5462
5463         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
5464         64 bit platforms.
5465
5466 2007-04-27  Neale Ferguson <neale@sinenomine.net>
5467
5468         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
5469
5470 2007-04-27  Wade Berrier  <wberrier@novell.com>
5471
5472         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
5473         mini.h) to fix build.
5474
5475 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
5476
5477         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
5478         
5479         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
5480         causes the corlib unit tests to fail.
5481
5482 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
5483
5484         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
5485
5486         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
5487
5488         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
5489         opcodes to the comparison relations.
5490
5491         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
5492         opcodes to their types.
5493         
5494         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
5495
5496         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
5497         it in cfg->arch.cinfo.
5498
5499         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
5500
5501         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
5502         cfg->cil_offset_to_bb.
5503
5504 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
5505
5506         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
5507         created becase of initlocals.
5508
5509 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
5510
5511         * mini-alpha.c cpu-alpha.md: More alpha port work from 
5512         Sergey Tikhonov <tsv@solvo.ru>.
5513
5514 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
5515
5516         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
5517
5518 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
5519
5520         * cpu-s390.md (break): Correct the length of break instruction.
5521
5522 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5523
5524         * mini.c: fix a couple of soft-float issues and comments.
5525
5526 2007-04-15  Miguel de Icaza  <miguel@novell.com>
5527
5528         * trace.c (is_filenamechar): - is also a filename char.
5529
5530 2007-04-15  Neale Ferguson <neale@sinenomine.net>
5531
5532         * mini-s390.c: Correct checking for enum type in return value processing.
5533
5534 2007-04-14  Raja R Harinath  <rharinath@novell.com>
5535
5536         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
5537         (version.h): Makefile is in the build directory.
5538
5539 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
5540
5541         * mini-amd64.h: fix for assertion failure on Solaris/amd64
5542
5543 2007-04-11  Martin Baulig  <martin@ximian.com>
5544
5545         * mini.c (can_access_member): Fix handling of generic classes;
5546         fixes #81259.
5547
5548 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
5549
5550         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
5551
5552 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
5553
5554         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
5555
5556 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
5557
5558         * mini-codegen.c: make sure the right spill amount is
5559         used for fp or integer registers (fixes the float_sub_spill() on ppc).
5560
5561 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
5562
5563         * mini-ppc.c: fixes for the fp_branch_nan test.
5564
5565 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
5566
5567         * basic.cs: Comment out new test which still fails on ia64.
5568
5569 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
5570
5571         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
5572
5573 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
5574
5575         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
5576
5577 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
5578
5579         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
5580         on 64 bit machines. Fixes part of #80738.
5581
5582         * basic.cs: Add regression test.
5583
5584 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
5585
5586         * inssel.brg basic.cs: Revert previous change to fix build.
5587
5588         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
5589         platforms.
5590         
5591         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
5592
5593         * basic.cs: Add new regression test.
5594
5595 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
5596
5597         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
5598         many arguments.
5599
5600 2007-03-16  Neale Ferguson <neale@sinenomine.net>
5601
5602         * cpu-s390x.md: Correct length of break instruction.
5603
5604 2007-03-16  Neale Ferguson <neale@sinenomine.net>
5605
5606         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
5607         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
5608
5609 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
5610
5611         * *.c: Begin WIN64 port.
5612         * mini.c:  Use correct register in profiler.
5613         * mini-amd64.c: No inline assembly on Win64.
5614         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
5615         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
5616         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
5617         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
5618         mono_arch_ip_from_context for Win64.
5619         
5620         Contributed under MIT/X11 license.
5621
5622 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
5623
5624         * exceptions-amd64.c (seh_handler): Ditto.
5625
5626         * exceptions-x86.c (seh_handler): Fix a memory leak.
5627
5628 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
5629
5630         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
5631         mini-s390x.c: fixed peephole optimizations to deal
5632         correctly with 1 and 2 byte reload avoidance.
5633
5634 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
5635
5636         * cpu-s390.md, cpu-s390x.md: update localloc length.
5637
5638 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
5639
5640         * cpu-g4.md: added missing descriptions.
5641
5642 2007-03-14  Miguel de Icaza  <miguel@novell.com>
5643
5644         *  Makefile.am: Add support so the tail tests are not executed on
5645         PowerPC as that is a known limitation of the PowerPC port.
5646
5647 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
5648
5649         * runmdesc.bat:  Move to msvc directory.
5650         
5651 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
5652
5653         * runmdesc.bat:  Run executable that was produced by the current
5654         target and sent via an argument.
5655         
5656 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
5657
5658         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
5659         #81102.
5660
5661         * generics.2.cs: Add regression test.
5662
5663 2007-03-09  Wade berrier  <wberrier@novell.com>
5664
5665         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
5666
5667 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
5668
5669         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
5670         AOT code depends on this.
5671
5672 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
5673
5674         * mini.c: more precise tracking of types in the eval stack
5675         (part of fix for bug #81044).
5676
5677 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
5678
5679         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
5680
5681         * aot-compiler.c (encode_patch): Remove an obsolete comment.
5682
5683 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
5684
5685         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
5686
5687         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
5688
5689 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
5690
5691         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
5692         a pointer on 64 bit systems. Fixes #80190.
5693
5694         * iltests.il: Add new regression test.
5695
5696 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
5697
5698         * mini.c: inline a constant for Environment.IsRunningOnWindows.
5699
5700 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
5701
5702         * trace.c: Remove an erroneous alignemnt check when tracing.
5703           Fixes --trace on OSX86.
5704
5705 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
5706
5707         * mini-$(arch).h: initialize SP in context for all the archs.
5708
5709 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
5710
5711         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
5712         regressions in the thread tests.
5713
5714 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
5715
5716         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
5717         - fixed implementation of LOCALLOC opcode
5718         - implemented non-un compare for floats
5719         - code cleanup
5720         - implementation of FDIV and CKFINITE opcodes
5721         - fixes for latest mono updates
5722         - additional arch opcodes
5723
5724 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
5725
5726         * Makefile.am: simplify and merge rules for cross-compilation.
5727
5728 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
5729
5730         * local-propagation.c: Actually *apply* the fix for bug 80591...
5731
5732 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
5733
5734         * mini-exceptions.c: backuot part of the last change
5735         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
5736
5737 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
5738         * inssel.brg: Fix bug 59286.
5739
5740
5741 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
5742
5743         * mini-exceptions.c: patch from Zoltan to correctly check for
5744         stack boundaries (using the stack register, not the frame register),
5745         fixes bugs #80724, #79717.
5746
5747 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
5748
5749         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
5750         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
5751
5752         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
5753         presence of frame pointer elimination.
5754
5755 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
5756         
5757         * mini-x86.h: NetBSD UCONTEX_REG defines.
5758
5759 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
5760
5761         * inssel-amd64.brg: Fix amd64 build.
5762
5763 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
5764
5765         * mini.h: remove extern to workaround what looks likes gcc bug 26905
5766         on amd64.
5767
5768 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
5769
5770         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
5771         ends.
5772
5773         * mini-<ARCH>.c: Use mono_is_regsize_var ().
5774
5775 2007-01-30 Mark Mason <mason@broadcom.com>
5776
5777            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
5778            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
5779            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
5780            beginning support for CEE_JMP [not quite working yet]
5781            * tramp-mips.c: LMF handling now works
5782         
5783 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
5784
5785         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
5786
5787         * mini.h (NULLIFY_INS): New macro.
5788
5789 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
5790
5791         * mini.c: statistical profiler fix for windows, patch
5792         from Tor Lillqvist (tml@novell.com).
5793
5794 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
5795         * local-propagation.c: Fix bug 80591.
5796
5797 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
5798
5799         * Makefile.am: put back the --export-dynamic option as with
5800         the previous gmodule flags (thanks to Robert Jordan).
5801
5802 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
5803
5804         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
5805
5806         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
5807         simplify and speed up the local register allocator. Also rename some fields
5808         like iassign->vassign.
5809         
5810         * regalloc.c: Remove some functions which are no longer used since their
5811         inlined version is in mini-codegen.c.
5812         
5813         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
5814
5815         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
5816
5817 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
5818
5819         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
5820         narrowing. Fixes #80622.
5821
5822         * iltests.il: Add new regresssion test. 
5823
5824 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
5825
5826         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
5827         debug-debugger.c, debug-debugger.h: warning fixes.
5828         * driver.c: updated copyright year and made it fit in one line.
5829
5830 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
5831
5832         * aot-runtime.c: updated to use mono-dl instead of gmodule.
5833
5834 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
5835
5836         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
5837
5838         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
5839
5840         * iltests.il: Add new test for bug #80507.
5841
5842 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
5843
5844         * mini-arm.h: use soft-float also on vfp for now.
5845
5846 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
5847
5848         * mini.c: fix some more soft-float issues.
5849
5850 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
5851
5852         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
5853
5854 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
5855         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
5856         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
5857         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
5858
5859 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
5860
5861         * mini-arm.c: typo fix.
5862
5863 2007-01-23  Neale Ferguson <neale@sinenomine.net>
5864
5865         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
5866
5867 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
5868
5869         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
5870         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
5871
5872         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
5873
5874         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
5875
5876         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
5877         
5878         * inssel.brg: Fix a warning.
5879
5880         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
5881
5882         * abcremoval.c ssa.c ssapre.c: Update after this change.
5883         
5884         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
5885
5886         * dominators.c (df_set): Use mono_bitset_union_fast.    
5887
5888 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
5889
5890         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
5891         mini-codegen.c: reduce relocations and memory usage for the cpu
5892         description.
5893
5894 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
5895
5896         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
5897
5898         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
5899         to reduce their size.
5900
5901 2007-01-19 Mark Mason <mason@broadcom.com>
5902
5903         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
5904         * mini-mips.c: more configuration macros, support long conditional branches, additional
5905         asserts, fix epilog instrumentation.
5906         * mini-mips.h: use standard stack walk
5907         * cpu-mips.md: increase size of div, rem and conditional branches
5908         
5909 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
5910
5911         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
5912         to cpu spec data.
5913
5914 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
5915
5916         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
5917         (compile_method): Ditto.
5918
5919         * aot-runtime.c (decode_klass_info): Ditto.
5920
5921         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
5922         needed by the code generated by inssel.brg. Also fix a warning.
5923
5924 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
5925
5926         * mini.c: deal with enums that become genericinsts by
5927         being nested in a generic class (bug #79956).
5928
5929 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
5930
5931         * mini.c: match the generic definition to check for
5932         private access with generic types (bug #78431).
5933
5934 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
5935
5936         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
5937         to make life easier for people cross-compiling that insist on not
5938         using scratchbox.
5939
5940 2007-01-17 Mark Mason <mason@broadcom.com>
5941
5942         * inssel-long.brg: patch to deal with mips missing flags
5943         * inssel-long32-mips.brg: implement overflow checks
5944         * insset-mips.brg: implement overflow checks
5945         * mini-mips.h: implement conditional exception handling
5946         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
5947           Remove unused code, minor cleanups.
5948         * exceptions-mips.c: minor cleanups
5949         * mini-ops.h: add mips conditional exception ops
5950         * cpu-mips.md: add mips conditional exception ops
5951
5952         
5953 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
5954
5955         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
5956         to deal with mips missing of flags.
5957
5958 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
5959
5960         * exceptions-ppc.c: execute fault handlers.
5961
5962 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
5963
5964         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
5965
5966 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
5967
5968         * mini.c: handle also floating point values in initialize_array.
5969
5970 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
5971
5972         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
5973         array initialization and make it conditional on the intrins option.
5974
5975 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
5976
5977         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
5978         relocations and put the patch info names close to the enum definition.
5979
5980 2007-01-15 Mark Mason <mason@broadcom.com>
5981
5982         * basic.cs, exceptions.cs: break up large tests to increase debugability.
5983
5984 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
5985
5986         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
5987
5988 2007-01-12  Raja R Harinath  <rharinath@novell.com>
5989
5990         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
5991
5992 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
5993
5994         * Makefile.am: distribute the mips sources.
5995
5996 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
5997
5998         * mini-codegen.h: handle bug #80489 here, by excluding ecx
5999         directly.
6000
6001 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
6002
6003         * cpu-x86.md: back out for now as this triggers other regressions.
6004
6005 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
6006
6007         * cpu-x86.md: force src1 and dest regpair for long shift instructions
6008         to eax:edx, so ecx can't get allocated to them (bug #80489).
6009
6010 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
6011
6012         * mini.c, mini-exceptions.c: enabled running fault handlers
6013         (bug #80469).
6014
6015 2007-01-03  Miguel de Icaza  <miguel@novell.com>
6016
6017         * driver.c: If nothing fail, do not use the string "failed",
6018         because it makes it very annoying to view test result logs on the
6019         web. 
6020
6021 2006-12-30  Miguel de Icaza  <miguel@novell.com>
6022
6023         * debug-debugger.c (mono_debugger_main): Rename "main" to
6024         "main_method" to prevent a warning.
6025
6026         Remove a warning for unused field.
6027
6028 2006-12-28  Martin Baulig  <martin@ximian.com>
6029
6030         * debug-debugger.c
6031         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
6032
6033 2006-12-22  Martin Baulig  <martin@ximian.com>
6034
6035         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
6036         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
6037         seperate `.mdb_debug_info' section, so we can access it from the
6038         debugger even if the binary is stripped.
6039
6040         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
6041         from the `.mdb_debug_info' here to prevent the linker from
6042         removing that section.
6043
6044         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
6045         mdb-debug-info64.s.
6046
6047 2006-12-19  Robert Jordan  <robertj@gmx.net>
6048
6049         * mini-x86: enable the code to return small structures in
6050         registers for FreeBSD as well. Fixes bug #80278.
6051         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
6052
6053 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6054
6055         * mini-x86.c: align the stack when calling the profiler
6056         function instrumenting the prolog (on OSX).
6057
6058 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
6059
6060         * mini.c: emit a break opcode where Debugger.Break () is called.
6061
6062 2006-12-13  Miguel de Icaza  <miguel@novell.com>
6063
6064         * mini.c (mono_method_to_ir): Provide useful information on this
6065         assert, to prevent others from debugging like I did.
6066
6067 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
6068
6069         * mini.c: enable code which was incorrectly commented
6070         (bug #80235).
6071
6072 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
6073
6074         * mini-x86.c: enable on OSX, too, the code to return small
6075         structures in registers.
6076
6077 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
6078
6079         * mini-x86.c: remove the use of the dynamic code manager here, too.
6080
6081 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
6082
6083         * mini.h, debug-debugger.c, tramp-*.c: fixed 
6084         mono_debugger_create_notification_function() to use
6085         mono_global_codeman_reserve () instead of a dynamic code manager.
6086
6087 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
6088
6089         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
6090         ves_array_element_address() jit icall and use a generated
6091         managed method instead (which is about 4 times faster for a rank 3
6092         array access).
6093
6094 2006-11-29  Mark Mason  <mason@broadcom.com>
6095
6096         * basic-calls.cs: additional tests for passing
6097         structures as function arguments.
6098
6099 2006-11-29  Mark Mason  <mason@broadcom.com>
6100
6101         * mini-mips.h: disable custom exception handling
6102         * mini-mips.c: throw/rethrow should use jalr to call
6103         exception stubs.  Fixed bug with passing structures
6104         by value. More support for tracing floating point
6105         functions.
6106
6107 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6108
6109         * mini.c: fixed typo in the soft-float ldind.r4 handling
6110         (bug #80086).
6111
6112 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
6113
6114         * mini.c, mini.h, driver.c: added --runtime command line
6115         option to select a different runtime than the autodetected one.
6116         * jit.h: added API for embedders to initialize with a specific
6117         runtime version.
6118
6119 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
6120
6121         * mini.c: handle also boxing of r4 values (bug #80024).
6122
6123 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
6124
6125         * mini-ppc.c: force indirect calls until we reserve
6126         enough address space for all the generated code.
6127
6128 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
6129
6130         * exceptions-arm.c: workaround bugs in the libc definition
6131         of struct ucontext.
6132
6133 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
6134
6135         * inssel.brg: fixes from me and Mark Mason.
6136
6137 2006-11-23  Dick Porter  <dick@ximian.com>
6138
6139         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
6140         semaphore display now we've fixed the initial value
6141
6142 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6143
6144         * inssel.brg: partially revert the last change to fix the build.
6145
6146 2006-11-21  Mark Mason  <mason@broadcom.com>
6147
6148         * inssel.brg: Add and use compare-and-branch macros to support
6149         architectures that do not have condition code registers (ie. MIPS).
6150         * *-mips.{c,brg,md}: Fix copyright statements
6151
6152 2006-11-20  Mark Mason  <mason@broadcom.com>
6153
6154         * Makefile.am: remove mini-codegen.c from list of MIPS sources
6155         * mini.c: Allow GET_CONTEXT to be specified by the arch port
6156         * mini.h: Added declaration for mono_print_ins()
6157         * mini-codegen.c: added ins_spec initializer for MIPS
6158         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
6159         vreg to be virtual and hreg to be non-virtual.
6160         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
6161         is not yet working/implemented correctly.
6162         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
6163         non-static, fixup calls to print_ins() from other parts in the file.
6164
6165 2006-11-20  Mark Mason  <mason@broadcom.com>
6166
6167         * basic-calls.cs: added tests for passing structures as arguments
6168         to calls.
6169
6170 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
6171
6172         * inssel-long32.brg: optimize signed division by power of two.
6173
6174 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
6175
6176         * mini-arm.c: added support for interworking with thumb code
6177         (mono must be still be built using the ARM instruction encoding).
6178
6179 2006-11-19  Miguel de Icaza  <miguel@novell.com>
6180
6181         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
6182         verifier has different rules for it.   Fixes a few verifier issues
6183         in the test suite.
6184
6185         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
6186         at the end, so people know what happened.
6187
6188 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
6189
6190         * brach-opts.c: in optimize_exception_target() make sure we
6191         are in a catch clause (fixes bug #79871).
6192
6193 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6194
6195         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
6196         more soft-float support fixes.
6197
6198 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
6199
6200         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
6201         that are passed half on the stack and half in registers.
6202
6203 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
6204
6205         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
6206         more mips integration work from Mark E Mason 
6207         <mark.e.mason@broadcom.com>.
6208
6209 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
6210
6211         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
6212         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
6213         tramp-mips.c: added sources for the mips port, not
6214         integrated in the build yet. Contributed by
6215         Mark E Mason <mark.e.mason@broadcom.com>.
6216
6217 2006-11-14  Neale Ferguson <neale@sinenomine.net>
6218
6219         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
6220
6221 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6222
6223         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
6224         put the soft-float rules in its own file since it seems to
6225         break s390 compilation.
6226
6227 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
6228
6229         * mini-arm.c: fixed wrnings.
6230
6231 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
6232
6233         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
6234         inssel-arm.brg: ARM support for soft-float.
6235
6236 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
6237
6238         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
6239         loads and stores of 32 bit fp values.
6240
6241 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
6242
6243         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
6244
6245         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
6246         works. Fixes #79852 and #79463.
6247
6248 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6249
6250         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
6251         more soft-float support WIP and fixes.
6252
6253 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
6254
6255         * mini-arm.c: some VFP updates.
6256
6257 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
6258
6259         * mini-exceptions.c: 0 is a valid local var offset in some
6260         architectures, don't assert (bug #78508).
6261
6262 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
6263
6264         * exceptions-arm.c: fixed off by one error in stack walk code.
6265
6266 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
6267
6268         * mini.h, mini.c: more precise tracking of type load exceptions.
6269
6270 2006-11-03  Robert Jordan  <robertj@gmx.net>
6271
6272         * Makefile.am: [WIN32] Add monow.exe target.
6273         * driver.c: [WIN32] Don't detach the console when debugging.
6274         Fixes bug #79797.
6275         
6276 2006-10-30  Miguel de Icaza  <miguel@novell.com>
6277
6278         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
6279
6280 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
6281
6282         * aot-compiler.c (emit_method_info): Add a case missed earlier.
6283
6284         * driver.c (mini_regression): Fix --regression with AOT.
6285
6286         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
6287
6288 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
6289
6290         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
6291
6292         * mini-sparc.h: Don't use sigaction on sparc/linux.
6293
6294         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
6295
6296         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
6297
6298         * mini-exceptions.c: Add proper include files for getpid ().
6299
6300 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
6301
6302         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
6303         address instead of a MonoJitInfo* to avoid decoding the exception info for the
6304         method.
6305
6306         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
6307         name cache to reduce its size.
6308
6309         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
6310
6311 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
6312
6313         * mini-x86.c: Save/restore the current LMF structure more efficiently using
6314         the mono_lmf TLS variable.
6315
6316         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
6317         trampoline lmf frames.  
6318
6319         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
6320
6321 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
6322
6323         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
6324         the mono_lmf TLS variable.
6325
6326         * mini-exceptions.c: Access the LMF structure through accessors.
6327
6328         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
6329         variable instead of in jit_tls->lmf.
6330
6331         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
6332         
6333         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
6334         trampoline lmf frames.
6335
6336         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
6337
6338 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
6339
6340        * mini.c trace.c mini-x86.c: Revert these too.
6341         
6342        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
6343        signature change.
6344
6345 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
6346
6347         * genmdesc.c: removed now dead code.
6348
6349 2006-10-09  Robert Jordan <robertj@gmx.net>
6350
6351         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
6352
6353 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
6354
6355         * mini.h: do not leave gaps in the opcode values.
6356
6357 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
6358
6359         * jit-icalls.h: flag functions as internal here, too.
6360
6361 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
6362
6363         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
6364         functions with the internal attribute.
6365
6366 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
6367
6368         * aot-compiler.c: fclose the file descriptor in the profile read loop.
6369
6370 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
6371
6372         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
6373         for soft-float.
6374
6375 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
6376
6377         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
6378         tail calls as on other platforms.
6379
6380         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
6381
6382         * iltests.il: Add a few tailcall tests.
6383
6384 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
6385
6386         * driver.c: fix loop for old compilers (bug #79521).
6387
6388 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
6389
6390         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
6391
6392         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
6393
6394         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
6395         metadata without any code.
6396
6397         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
6398         more precise debugging information using gdb.
6399
6400 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
6401
6402         * inssel-ia64.brg: Make the helper methods static.
6403
6404 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
6405
6406         * inssel-x86.brg: make the helper methods static.
6407
6408 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
6409
6410         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
6411
6412 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
6413
6414         * mini.c: updates for monoburg changes.
6415         * inssel.brg: make a few helper functions static as they should.
6416
6417 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
6418
6419         * Makefile.am: Move mini-codegen.c to common_sources.
6420
6421 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
6422
6423         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
6424         instructions.
6425         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
6426         mini-ppc.h: port to use the common local register allocator.
6427
6428 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
6429
6430         * mini.h: Remove the comment too then.
6431
6432 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
6433
6434         * mini.h: put back backend.data which is to be used shortly and
6435         doesn't increase the size of MonoInst. If any 64 bit arch aligned
6436         pointers on 4 byte boundaries it'd have much bigger issues running
6437         and you can ifdef it out anyway.
6438
6439 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
6440
6441         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
6442         MonoInst size by 4 bytes on 64 bit machines.
6443
6444 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
6445
6446         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
6447         replacement with more meaningful field names. Arch maintainers, please
6448         check the assigned names are good enough for your arch.
6449
6450 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
6451
6452         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
6453         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
6454
6455 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
6456
6457         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
6458         relocations and memory requirements, put the optimization flags
6459         definitions in their own file.
6460
6461 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
6462
6463         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
6464
6465         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
6466
6467 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
6468
6469         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
6470
6471 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
6472
6473         * inssel.brg: use the correct function to get the size of an item
6474         in an array, given an element class.
6475         * aot-compiler.c: do not access class->class_size directly.
6476
6477 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
6478
6479         * mini.h, debug-mini.c: added a debugging function to print
6480         info about local variables and arguments in a jitted method.
6481
6482 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
6483
6484         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
6485
6486         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
6487
6488 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
6489
6490         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
6491         inner and outer loops when passing vtypes.
6492
6493 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
6494
6495         * mini-ppc.c: take into account the cpu errata for cache flushing
6496         which caused some random errors (bug #79381).
6497
6498 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
6499
6500         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
6501         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
6502
6503 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
6504
6505         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
6506         loaded.
6507
6508         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
6509         freebsd ports tree.
6510
6511         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
6512         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
6513
6514         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
6515         displacement.
6516
6517 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
6518
6519         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
6520
6521 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
6522
6523         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
6524         macro does not have to be changed during debugging.
6525
6526         * 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>.
6527
6528         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
6529
6530         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
6531         
6532         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
6533         MONO_ARCH_NO_EMULATE_MUL is defined.
6534
6535         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
6536
6537         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
6538
6539         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
6540
6541         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
6542         
6543 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
6544
6545         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
6546         stuff to mini-exceptions.c where it is used.
6547
6548         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
6549         setup code, the real one is in mini-exceptions.c.
6550
6551         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
6552         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
6553         some changes from the freebsd ports tree.
6554
6555         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
6556         constants.
6557         
6558         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
6559
6560 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
6561
6562         * mini.c: on Linux, check for /proc to be mounted
6563         (bug# 79351, novell bug#201204).
6564
6565 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
6566
6567         * mini.c: handle cases where pthread_attr_getstack() behaves
6568         incorrectly (bug #78096).
6569
6570 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
6571
6572         * mini-arm.c: support larger stack frames (bug #79272).
6573
6574 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
6575
6576         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
6577
6578         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
6579         tokens.
6580
6581         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
6582         mono_class_from_name () to find a class from its name.
6583
6584         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
6585
6586 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
6587
6588         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
6589
6590 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
6591
6592         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
6593
6594 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
6595
6596         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
6597         callinfo->trampoline.
6598
6599         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
6600         fixes #79271.
6601         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
6602         future.
6603
6604 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
6605
6606         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
6607
6608 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
6609
6610         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
6611         stats.method_trampolines, it is already done by the generic trampoline code.
6612
6613         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
6614         
6615 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
6616
6617         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
6618
6619         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
6620
6621         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
6622
6623         * mini.c (print_jit_stats): Print mscorlib mempool size too.
6624         
6625         * mini.c (print_jit_stats): Print new stats.
6626
6627         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
6628
6629 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
6630
6631         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
6632         Address on two dimensional arrays. Fixes #78729.
6633
6634         * mini.h (MonoCompile): Add a 'skip_visibility' field.
6635
6636         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
6637         a method.
6638
6639         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
6640
6641         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
6642         #79130.
6643         
6644         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
6645         a race condition.
6646         (mini_get_ldelema_ins): Ditto.
6647
6648 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
6649
6650         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
6651         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
6652         Fixes #79213.
6653
6654 2006-08-29 Neale Ferguson <neale@sinenomine.net>
6655
6656         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
6657         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
6658
6659         * exceptions-s390x.c: Cosmetic change.
6660
6661         * tramp-s390.c: Fix warning.
6662
6663         * cpu-s390.md: Correct length of mul_imm.
6664
6665 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
6666
6667         * aot-compiler.c: added binary writer with ELF backend
6668         implementation (only on Linux/x86 for now).
6669
6670 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
6671
6672         * Makefile.am: Don't run net 2.0 AOT tests.
6673
6674         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
6675         (mono_compile_assembly): Skip net 2.0 assemblies as well.
6676
6677         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
6678
6679 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
6680
6681         * aot-compiler.c: simplified and refactored the asm-writing code
6682         to allow different backends.
6683
6684 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
6685
6686         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
6687
6688         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
6689         little. Share patches of type TYPE_FROM_HANDLE as well.
6690
6691         * mini.c (mono_patch_info_equal): New helper function.
6692         (mono_patch_info_hash): Ditto.
6693
6694         * aot-compiler.c (emit_method_code): Fix s390 build.
6695
6696         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
6697         is not handled because it is stored as a flag and not as a type ctor. Fixes
6698         #79016.
6699
6700 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
6701
6702         * aot-compiler.c: Fix computation of GOT slot statistics.
6703         
6704         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
6705         Also remove support for not PIC AOT.
6706
6707         * mini.h: Bump AOT file format version.
6708
6709         * objects.cs: Add a test for #78990.
6710
6711         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
6712         (peter.dettman@iinet.net.au). Fixes #79087.
6713
6714         * basic-long.cs: Add a test for the above.
6715
6716 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
6717
6718         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
6719         
6720         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
6721         code somewhat.
6722
6723 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
6724
6725         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
6726         exceptions.
6727
6728 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
6729
6730         * mini.c: Don't verify COM proxy invoke calls
6731         
6732
6733 2006-08-10  Dick Porter  <dick@ximian.com>
6734
6735         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
6736         which process is holding semaphores locked.
6737
6738 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
6739
6740         * mini-ia64.c mini-amd64.c: Fix #79027.
6741
6742         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
6743
6744         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
6745
6746         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
6747         implicit arguments in a vararg call. Fixes #79027.
6748
6749 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
6750
6751         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
6752         (mono_get_array_new_va_signature): Ditto.
6753
6754 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
6755
6756         * aot-runtime.c: Call init_plt lazily.
6757
6758         * inssel-long.brg: Fix unsigned long->int conversion.
6759
6760         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
6761
6762         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
6763         that most data is now in the .rss/.data section.
6764
6765 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
6766
6767         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
6768
6769         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
6770
6771         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
6772
6773         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
6774
6775         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
6776         virtual call. Fixes #79010.
6777
6778         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
6779         and use the result as the this argument in the real call.
6780
6781         * generics.2.cs: Add a new test for #79010.
6782         
6783 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
6784
6785         * mini-x86.c: Fix a warning.
6786
6787         * aot-compiler.c: Add a bunch of statistics.
6788
6789         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
6790
6791 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
6792
6793         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
6794
6795 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
6796
6797         * 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>.
6798
6799 2006-07-13  Miguel de Icaza  <miguel@novell.com>
6800
6801         * mini.c (mono_method_to_ir): Obtain the original method in the
6802         CIL stream and use this to perform validation.
6803
6804         Fixed: #78816
6805
6806 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
6807
6808         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
6809         (mono_arch_call_opcode): Ditto.
6810
6811         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
6812         #78826.
6813
6814         * mini.c (mono_patch_info_dup_mp): New helper function.
6815         
6816         * aot-compiler.c (compile_method): Fix some of the memory allocated during
6817         compilation. Fixes #78827.
6818
6819 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
6820
6821         * declsec.c: Use original security informations for
6822           MONO_WRAPPER_MANAGED_TO_MANAGED.
6823
6824 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
6825
6826         * mini.c: Allow Com Interop methods/classes and
6827         don't verify COM wrapper calls
6828         
6829
6830 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
6831
6832         * inssel-long32.brg: Fix long->i4 checked conversion.
6833
6834         * exceptions.cs: Add a test for the above.
6835
6836 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
6837
6838         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
6839
6840         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
6841         leaks.
6842
6843         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
6844         #78775.
6845
6846 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
6847
6848         * mini.c: Fix solaris/x86 exception handling.
6849
6850         * Makefile.am: Get rid of $(ICU_LIBS).
6851
6852 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
6853
6854         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
6855         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
6856         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
6857
6858         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
6859
6860         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
6861         this function causes a SIGSEGV.
6862
6863 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
6864
6865         * mini.c: Remove unused solaris/x86 includes.
6866
6867 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
6868
6869         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
6870
6871 2006-06-20  Jb Evain  <jbevain@gmail.com>
6872
6873         * cpu-g4.md: fix max length of start_handler instruction.
6874
6875 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
6876         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
6877
6878 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
6879         * ssa.c: Fixed bug 78653 for SSA based deadce.
6880         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
6881         MonoInst.flags, used in SSA based deadce.
6882         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
6883         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
6884
6885 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
6886
6887         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
6888         it can end up using non executable memory on ppc64 systems
6889         running ppc32 userspace (fix from Johannes Berg).
6890
6891 2006-06-14  Dick Porter  <dick@ximian.com>
6892
6893         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
6894         4.1.1
6895
6896 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
6897         * mini.c: Made so that inline is locally disabled if it would
6898         trigger a .cctor, because too many apps depend on this behavior
6899         (which seems to be also the one of the MS CLR).
6900
6901 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
6902
6903         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
6904         No idea why this worked before.
6905
6906         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
6907         which branch to outer exception clauses since they could skip the
6908         inner finally clauses. Fixes #78633.
6909
6910         * exceptions.cs: Add a test for the above.
6911
6912         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
6913         Fixes #78629.
6914
6915         * iltests.il: Add a test for the above.
6916
6917 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
6918
6919         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
6920         after the end of a try bblock, to prevent asserts in mini_method_compile ().
6921
6922         * iltests.il: Add a test for the above.
6923
6924 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
6925
6926         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
6927         
6928         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
6929         methods as instrinsics.
6930
6931 2006-06-09  Wade Berrier <wberrier@novell.com>
6932
6933         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
6934         (simple-cee-ops.h ssapre-mini-ops.h)
6935
6936 2006-06-09  Neale Ferguson <neale@sinenomine.net>
6937
6938         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
6939         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
6940         instruction).
6941         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
6942         * cpu-s390x.md: Fix max. length values for a couple of instructions.
6943
6944 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
6945
6946         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
6947
6948 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
6949
6950         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
6951         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
6952         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
6953         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
6954         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
6955         of opcodes, so that bug 78549 should not happen again.
6956         * ssapre.c: Updated to use the renamed files.
6957
6958 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
6959
6960         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
6961         in OP_ATOMIC_EXCHANGE_I4.
6962
6963 2006-06-07  Wade Berrier <wberrier@novell.com>
6964
6965         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
6966         in mono_debugger_create_notification_function)
6967
6968 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
6969
6970         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
6971         
6972         * mini.c (type_from_stack_type): Disable some changes which do not
6973         seem to work.
6974
6975         * driver.c: Reenable opts.
6976
6977         * mini.h (MonoStackSlot): New structure to keep track of the verification state
6978         of the evaluation stack.
6979         
6980         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
6981         evaluation stack trace at entry to the bblock.
6982
6983         * mini.c (merge_stacks): New function to perform verification of stack merges.
6984         Turned off by default.
6985
6986         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
6987         STACK_MP.
6988         
6989 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
6990
6991         * local-propagation.c: Fixed bug 78549.
6992
6993 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
6994
6995         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
6996
6997 2006-06-02  Miguel de Icaza  <miguel@novell.com>
6998
6999         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
7000         tramp-arm.c, tramp-ia64.c
7001         (mono_debugger_create_notification_function): Update signature to
7002         new signature and use new protocol for creating the notification
7003         function.  
7004
7005         Should fix the build.
7006
7007 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
7008
7009         * exceptions-ppc.c (mono_jit_walk_stack)
7010         (ves_icall_get_frame_info): Fix the build
7011
7012 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
7013
7014         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
7015
7016 2006-05-31  Raja R Harinath  <rharinath@novell.com>
7017
7018         * il2tests.2.il: New file for generics CIL tests.  Add test for
7019         #78019.
7020         * Makefile.am: Update.
7021
7022         Fix #78019
7023         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
7024         to nullable types.
7025
7026 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
7027
7028         * aliasing.c: Fixed bug 78311.
7029
7030 2006-05-29  Martin Baulig  <martin@ximian.com>
7031
7032         * mini-exceptions.c (mono_find_jit_info): When computing the
7033         native offset, check whether we're actually inside the method's
7034         code; call mono_debug_print_stack_frame() to format the frame.
7035         (ves_icall_System_Exception_get_trace): Call
7036         mono_debug_print_stack_frame() to format the stack frame.
7037         (ves_icall_get_trace): Update to the new debugging API.
7038         (mono_jit_walk_stack_from_ctx): Likewise.
7039         (ves_icall_get_frame_info): Likewise.
7040
7041         * mini.c (get_method_from_ip): Use the new debugging API.
7042         (mono_print_method_from_ip): Likewise.
7043
7044         * exceptions-ppc.c
7045         (mono_jit_walk_stack): Use the new debugging API.
7046         (ves_icall_get_frame_info): Likewise.   
7047
7048 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
7049
7050         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
7051
7052 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
7053
7054         * mini.c: Added "limitator" to inline for debugging.
7055
7056 2006-05-24  Martin Baulig  <martin@ximian.com>
7057
7058         * debug-debugger.c (mono_debugger_init): Create a private,
7059         malloc()-based code manager for the notification function and
7060         intentionally leak it on exit.  This fixes the crash-on-exit race
7061         condition.
7062
7063         * tramp-amd64.c
7064         (mono_debugger_create_notification_function): Added
7065         `MonoCodeManager *' argument.
7066
7067         * tramp-x86.c
7068         (mono_debugger_create_notification_function): Added
7069         `MonoCodeManager *' argument.
7070
7071 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
7072
7073         * aliasing.c: Fixed 64 bit issue.
7074         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
7075         default since all known bugs are fixed (one more time!).
7076
7077 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
7078
7079         * mini.c: write barrier support.
7080
7081 2006-05-23  Martin Baulig  <martin@ximian.com>
7082
7083         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
7084         check at the top of the file.
7085
7086 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
7087
7088         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
7089         reverting changes without reason and without changelog entries.
7090
7091 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
7092
7093         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
7094         to a few opcodes. Fixes #78439.
7095
7096         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
7097         consistency with other archs.
7098
7099         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
7100
7101 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
7102
7103         * debug-debugger.c: fix the build.
7104
7105 2006-05-17  Martin Baulig  <martin@ximian.com>
7106
7107         * debug-debugger.c
7108         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
7109         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
7110         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
7111         (debugger_attach): Call GC_mono_debugger_add_all_threads().
7112
7113 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
7114
7115         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
7116
7117 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
7118
7119         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
7120         MONO_TYPE_GENERICINST.
7121         
7122         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
7123         MONO_TYPE_GENERICINST.
7124
7125 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
7126
7127         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
7128         #78325.
7129
7130 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
7131
7132         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
7133         mempool.
7134         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
7135
7136 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
7137
7138         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
7139         mono_trace_cleanup ().
7140
7141         * iltests.il: Fix problem with the newly added test.
7142
7143         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
7144         due to register constraints, free up the previous hreg. Fixes #78314.
7145
7146         * iltests.il: Add new test for #78314.  
7147
7148         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
7149         Interlocked.Add. Fixes #78312.
7150
7151         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
7152         
7153 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
7154
7155         * inssel.brg (mini_emit_virtual_call): Fix a warning.
7156
7157 2006-05-05  Martin Baulig  <martin@ximian.com>
7158
7159         * debug-mini.c (mono_debug_open_block): New method.
7160
7161         * mini-amd64.c
7162         (mono_arch_output_basic_block): Call mono_debug_open_block() at
7163         the beginning of each basic block.
7164
7165         * mini-x86.c
7166         (mono_arch_output_basic_block): Call mono_debug_open_block() at
7167         the beginning of each basic block.
7168
7169 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
7170
7171         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
7172         default until I understand why they break the build on amd64.
7173
7174 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
7175
7176         * mini.c (mini_cleanup): Call mono_cleanup ().
7177
7178         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
7179         errors.
7180
7181 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
7182
7183         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
7184         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
7185         default since all known bugs are fixed, and I cannot reproduce bug
7186         77944... I'm asking Matt Hargett to test again after this commit.
7187
7188 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
7189
7190         * mini-codegen.c: Fixed typo that thrashed inline.
7191
7192 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
7193
7194         * dominators.c (compute_dominators): Avoid using a worklist since
7195         it is not correct in some cases. Instead, iterate over all bblocks as
7196         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
7197
7198 2006-04-28  Miguel de Icaza  <miguel@novell.com>
7199
7200         * mini.c (mono_jit_compile_method_inner): Use
7201         mono_prepare_exception_from_error that resets the value
7202         internally.
7203
7204 2006-04-27  Miguel de Icaza  <miguel@novell.com>
7205
7206         * mini.c: Move the mini_loader_error_to_exception to metadata. 
7207         
7208 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
7209
7210         * aliasing.c: Fixed bug 78210.
7211
7212 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
7213
7214         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
7215         default until all their problems (or the ones they trigger) are fixed.
7216
7217 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
7218
7219         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
7220         
7221         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
7222         as loaded only after resolving patches since that could invoke the same method.
7223
7224         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
7225
7226         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
7227         functions.
7228
7229         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
7230         AOT loader.
7231
7232         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
7233         stack.
7234
7235         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
7236         made from AOT code through the PLT table.
7237
7238         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
7239         holding the plt offset when a call is made to the aot plt trampoline.
7240         
7241 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
7242
7243         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
7244         amd64 AOT support.
7245
7246         * Makefile.am (common_sources): Fix build breakage.
7247
7248         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
7249         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
7250         intra-assembly calls if possible.
7251         
7252         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
7253
7254         * mini-trampolines.c: Handle PLT entries.
7255
7256         * mini.c: Avoid creating a GOT var for calls.
7257
7258         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
7259         from mscorlib code.
7260
7261         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
7262         from mscorlib code.
7263
7264         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
7265         AOT code.       
7266
7267         * mini.h: Bump AOT file format version.
7268         
7269         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
7270         covers more cases.
7271
7272 2006-04-25  Martin Baulig  <martin@ximian.com>
7273
7274         * driver.c: Disable copyprop, consprop and inline when running
7275         inside the debugger.
7276
7277 2006-04-25  Martin Baulig  <martin@ximian.com>
7278
7279         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
7280         with `get_current_thread' and added `detach'.
7281         (MonoDebuggerMetadataInfo): Added `thread_size',
7282         `thread_tid_offset', `thread_stack_ptr_offset' and
7283         `thread_end_stack_offset'.
7284
7285 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
7286
7287         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
7288         aot-runtime.c.
7289
7290         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
7291         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
7292
7293         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
7294
7295         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
7296
7297         * aot.c: Add support for ADJUSTED_IID.  
7298
7299 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
7300
7301         * aot.c (emit_method_order): Don't align method_order_end.
7302
7303         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
7304         the interface ID changes.
7305
7306 2006-04-21  Dick Porter  <dick@ximian.com>
7307
7308         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
7309         cleaning up a thread.  Fixes the new part of bug 77470.
7310
7311 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
7312
7313         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
7314         to managed wrapper.
7315                      
7316 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
7317
7318         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
7319         
7320         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
7321         SIGSEGV. Fixes #78072.
7322
7323         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
7324         unregister our SIGABRT handler.
7325
7326 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
7327
7328         * mini.c: Disabled inline where it can alter the call stack in a
7329         way visible from managed code.
7330         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
7331         default.
7332
7333 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
7334
7335         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
7336         on other platforms. Fixes #78089.
7337
7338 2006-04-13  Martin Baulig  <martin@ximian.com>
7339
7340         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
7341         determine whether we're inside the debugger.
7342
7343         * debug-debugger.h
7344         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
7345
7346 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
7347
7348         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
7349         handler clauses. Fixes #78024.
7350
7351         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
7352         in the CALL_MEMBASE opcodes. Fixes #78088.
7353         (mono_arch_get_vcall_slot_addr): Ditto.
7354
7355 2006-04-10  Martin Baulig  <martin@ximian.com>
7356
7357         * debug-debugger.c: The thread handling code has now been moved
7358         into ../metadata/threads.c.
7359
7360 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
7361
7362         * driver.c (mono_main): Fix --with-gc=none build.
7363
7364         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
7365         (mono_spillvar_offset_float): Ditto.
7366         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
7367         hreg, not when its !global, since on ia64, there is a third category: stacked
7368         registers.      
7369
7370 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
7371
7372         * mini.c: set MonoInst->klass for load field address and a few other
7373         places.
7374
7375 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
7376
7377         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
7378
7379 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
7380
7381         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
7382         the branch opt changes.
7383
7384 2006-04-06  Dick Porter  <dick@ximian.com>
7385
7386         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
7387         
7388         * wapihandles.c (mini_wapi_seminfo): 
7389         * driver.c (mono_main): Add semaphore info option
7390
7391 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
7392
7393         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
7394         branch optimization changes. Fixes #78009.
7395
7396 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
7397
7398         * mini.c: ignore accessibility of methods in managed->native wrappers.
7399
7400 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
7401
7402         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
7403         
7404         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
7405
7406 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
7407
7408         * mini.c: Modify the branch optimizations to preserve the invariant that
7409         the entries inside the in_bb and out_bb arrays are unique.
7410         (mono_unlink_bblock): Avoid creation of new arrays.
7411
7412 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
7413
7414         * mini.c (mono_unlink_bblock): Fix regression caused by previous
7415         change (#77992).
7416
7417 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
7418
7419         * mini.c (optimize_branches): Remove the "optimizations" in
7420         the cbranch1/cbranch2 -> branch cases which were causing several
7421         problems in the past. Fixes #77986.
7422
7423 2006-03-31  Chris Toshok  <toshok@ximian.com>
7424
7425         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
7426         default optimizations :(
7427
7428 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
7429
7430         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
7431         branch.
7432
7433 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
7434
7435         * local-propagation.c: Added comments to structs and removed
7436         "Mono" prefixes from local tree mover types.
7437
7438 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
7439
7440         * Makefile.am (arch_sources): Define this for each architecture so 
7441         libmono_la_SOURCES is defined in one place.
7442
7443 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
7444
7445         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
7446         from handles/.
7447
7448 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
7449
7450         * driver.c: print the GC name supplied by configure.
7451
7452 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
7453
7454         * local-propagation.c: Added tree mover, and moved here all the
7455         local propagation code from mini.c
7456         * mini.c: Added support for treeprop, and moved all the local
7457         propagation code to local-propagation.c
7458         * mini.h: Added support for treeprop
7459         * driver.c: Added support for treeprop, enabled consprop, copyprop,
7460         treeprop, inline and deadce by default
7461         * Makefile.am: Added local-propagation.c
7462
7463 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
7464
7465         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
7466
7467 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
7468
7469         * debug-debugger.c: make it compile without the Boehm GC.
7470
7471 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
7472
7473         * mini.c: fixed issue with mismatch when an icall is registered
7474         with multiple names but same address.
7475
7476 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
7477
7478         * declsec.c, mini-exceptions.c: use write barrier to set reference
7479         fields of managed objects.
7480
7481 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
7482
7483         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
7484         (can_access_internals): Fix a warning.
7485
7486         * mini.c (print_method_from_ip): Rename this to 
7487         mono_print_method_from_ip so it gets exported.
7488
7489         * trace.c: Deal with strings inside StringBuilder's containing garbage
7490         and fix memory leaks. Fixes #77848.
7491
7492 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
7493
7494         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
7495         fixes #77787.
7496
7497 2006-03-16 Neale Ferguson <neale@sinenomine.net>
7498         
7499         * mini-s390.c: Remove OP_X86_TEST_NULL.
7500
7501 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
7502
7503         * mini.c: use the correct GetHashCode() for the moving collector.
7504
7505 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
7506
7507         * liveness.c: Regalloc spill cost tuning.
7508
7509 2006-03-15 Neale Ferguson <neale@sinenomine.net>
7510         
7511         * mini-s390x.h: Correct S390_LONG macro.
7512
7513         * mini-s390x.c: Cleanup unused code.
7514
7515 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
7516
7517         * jit-icalls.h: New file.
7518
7519         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
7520         icalls and include that instead of including jit-icalls.c.
7521
7522         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
7523         OP_X86 opcodes.
7524
7525 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
7526
7527         * mini.c: when checking for member accessibility, also check for
7528         friend assemblies and for explicit interface implementations.
7529
7530 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
7531
7532         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
7533
7534         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
7535
7536         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
7537         common cases are done first.    
7538
7539         * mini-ops.h: Only define platform specific opcodes on the given platform.
7540
7541         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
7542         branch.
7543         
7544 2006-03-14  Martin Baulig  <martin@ximian.com>
7545
7546         Revert Paolo's change from r57348:
7547
7548         * mini.h: don't use gboolean for bitfields.
7549         * mini.c: verifier changes for fields and methods accessibility.
7550
7551 2006-03-13  Neale Ferguson <neale@sinenomine.net>
7552
7553         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
7554
7555         * mini-s390x.c: Fix conv_r_un.
7556
7557         * cpu-s390, cpu-s390x.md: Fix lengths.
7558
7559 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
7560
7561         * mini.c: nested types have access to all the nesting
7562         levels, not just the enclosing types.
7563
7564 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
7565
7566         * mini.c: added a few more verification checks.
7567
7568 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
7569
7570         * liveness.c: Merge optimizations from the linear-il branch.
7571
7572 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
7573
7574         * mini-ia64.c (emit_call): Add a comment.
7575
7576         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
7577
7578         * tramp-ia64.c: Fix some warnings.
7579
7580 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
7581
7582         * mini.h: don't use gboolean for bitfields.
7583         * mini.c: verifier changes for fields and methods accessibility.
7584
7585 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
7586
7587         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
7588         lazy icall wrapper changes.
7589
7590         * dominators.c: Replace all the dominator algorithms with faster
7591         ones from the linear-il branch.
7592
7593         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
7594         the mempool.
7595
7596         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
7597         common cases are done first.
7598
7599         * mini-amd64.c: Fix some warnings.
7600
7601         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
7602         from the mempool.
7603
7604         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
7605         added code.
7606
7607         * mini.h: Add a missing prototype.
7608
7609 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
7610
7611         * mini.c: Compile icall wrappers lazily.
7612
7613         * mini-codegen.c: Use printf instead of g_print since its much faster.
7614
7615         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
7616         function.
7617
7618         * mini.c (optimize_branches): Cache the negative result from 
7619         remove_block_if_useless ().
7620
7621         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
7622         Also fix some bblock linking issues.
7623
7624         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
7625         assembly files.
7626
7627         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
7628
7629         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
7630         accessed fields first, for better cache behavior.
7631         
7632 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
7633
7634         * mini.c: speedup IList<T> array accesses.
7635
7636 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
7637
7638         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
7639         inline_costs counter. Fixes #77190.
7640
7641 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
7642
7643         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
7644         trace messages. Fixes #77706.
7645
7646 2006-03-04  Martin Baulig  <martin@ximian.com>
7647
7648         * tramp-amd64.c, tramp-x86.c
7649         (mono_debugger_create_notification_function): Use
7650         mono_global_codeman_reserve() to allocate a buffer at runtime and
7651         return it.
7652
7653         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
7654
7655         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
7656         notification function at runtime and then call `initialize' in the
7657         `MONO_DEBUGGER__debugger_info' vtable.
7658
7659 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
7660
7661         * iltests.il: Fix a visibility problem.
7662
7663 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
7664
7665         * driver.c, mini.c: add hooks for the counters API.
7666
7667 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
7668
7669         * driver.c: show disabled options.
7670
7671 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
7672
7673         * linear-scan.c: always use cost-driven selection.
7674
7675 2006-02-28  Raja R Harinath  <rharinath@novell.com>
7676
7677         * jit-icalls.c (helper_compile_generic_method): Revert change from
7678         2006-02-24.
7679
7680 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
7681
7682         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
7683
7684 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
7685
7686         * inssel.brg: style fixes, mostly to force the updated monoburg
7687         to run for people using svn.
7688
7689 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
7690
7691         * mini.c: match monoburg changes.
7692
7693 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
7694
7695         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
7696         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
7697         declaration in the header file.
7698
7699 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
7700
7701         * helpers.c: reduce relocations and mem usage.
7702
7703 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
7704
7705         * mini.h, mini-codegen.c: disable logging features if
7706         requested by configure.
7707
7708 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
7709
7710         * mini.c: tiny verifier changes.
7711
7712 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
7713
7714         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
7715         cpu-pentium.md: stack alignment changes for osx/x86,
7716         partially from Geoff Norton <gnorton@customerdna.com>.
7717
7718 2006-02-24  Raja R Harinath  <harinath@gmail.com>
7719
7720         * jit-icalls.c (helper_compile_generic_method): Update to changes
7721         in metadata/class.c.
7722
7723 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
7724         
7725         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
7726         
7727         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
7728         interface calls with large offsets.
7729
7730 2006-02-23  Raja R Harinath  <rharinath@novell.com>
7731
7732         * jit-icalls.c (helper_compile_generic_method): Document the
7733         special-case we depend on so that we can inflate the method twice
7734         with the same context with no bad side-effects.
7735
7736 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
7737
7738         * mini-x86.c, mini-amd64.c: fix for case when xen support
7739         is disabled.
7740
7741 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
7742
7743         * mini-x86.c, mini-amd64.c: generate code to access tls items
7744         in a faster way for Xen systems.
7745
7746 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
7747
7748         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
7749         updates and compilation fixes for the OSX/x86 port, mostly from
7750         Geoff Norton <gnorton@customerdna.com>.
7751
7752 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
7753
7754         * inssel.brg: faster interface call implementation
7755         to sync with the interface_offsets MonoVTable changes.
7756
7757 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
7758
7759         * mini.c: more verification checks.
7760
7761 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
7762
7763         * mini.c: added a few more verification checks.
7764
7765 2006-02-17      Neale Ferguson <neale@sinenomine.net>
7766
7767         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
7768         facility on the processor and use it if available.
7769
7770 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
7771
7772         * driver.c, aot.c, mini.c: throw exception if the IL code is
7773         invalid or unverifiable.
7774
7775 2006-02-17  Raja R Harinath  <rharinath@novell.com>
7776
7777         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
7778         m.StructField.
7779
7780 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
7781
7782         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
7783
7784 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
7785
7786         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
7787         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
7788         handling of instantiated generic valuetypes.
7789
7790 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
7791
7792         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
7793         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
7794         instead.
7795
7796         * generics.2.cs: Revert the nullable reftypes tests.
7797
7798 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
7799
7800         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
7801         using __builtin_frame_address (1) as it doesn't work in the presence
7802         of optimizations. Hopefully fixes #77273.
7803
7804         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
7805         -> generics.cs change as it doesn't work with some automake versions.
7806
7807 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
7808
7809         * mini.c: handle systems that sue a different way to
7810         retrieve the stack address of the current thread.
7811
7812 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
7813
7814         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
7815         it specially in the makefile.
7816
7817         * generics.2.cs: Add tests for nullable reference types.
7818
7819 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
7820
7821         * mini.c: always handle the case when mono_jit_init()
7822         is called in a thread different from the main thread,
7823         confusing libgc (bug #77309).
7824
7825 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
7826
7827         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
7828
7829 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
7830
7831         * mini.c: change optimize_branches () to use a single loop
7832         and introduce a new optimization to simplify some range checks.
7833
7834 2006-02-03  Martin Baulig  <martin@ximian.com>
7835
7836         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
7837         and merged with debugger_thread_manager_add_thread().
7838         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
7839         inform the debugger about the main thread.
7840
7841 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
7842
7843         * basic.cs: Add test for div.un/rem.un constant folding.
7844
7845 2006-02-03  Neale Ferguson <neale@sinenomine.net>
7846
7847         * cpu-s390x.md: correct int_xor_imm length
7848
7849 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
7850
7851         * generics.2.cs: New test for #77442.
7852
7853         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
7854         #77442.
7855
7856 2006-02-02  Martin Baulig  <martin@ximian.com>
7857
7858         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
7859         <mono/metadata/mono-debug-debugger.h>   
7860
7861         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
7862
7863 2006-02-02  Martin Baulig  <martin@ximian.com>
7864
7865         * debug-debugger.h: New header file for debug-debugger.c.
7866
7867         * debug-debugger.c: Big API cleanup; don't run the managed Main()
7868         function is a separate thread anymore; add support for attaching.
7869
7870 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
7871
7872         * tramp-x86.c: Fix a warning.
7873
7874 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
7875
7876         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
7877         on very large methods.
7878
7879         * aot.c (load_patch_info): Fix a warning.
7880
7881 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
7882
7883         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
7884         mini-ops.h: alu membase optimizations.
7885
7886 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
7887
7888         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
7889         to speedup StringBuilder.
7890
7891 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
7892
7893         * dominators.c (mono_compute_natural_loops): Fix detection of
7894         loop body start blocks.
7895
7896         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
7897
7898 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
7899
7900         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
7901         #75145.
7902
7903 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
7904
7905         * aliasing.c: Fixed aliasing issue on 64 bit archs.
7906
7907 2006-01-25  Martin Baulig  <martin@ximian.com>
7908
7909         * debug-debugger.c: Moved the `MonoDebuggerManager' and
7910         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
7911         started to cleanup this file a little bit.
7912
7913 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
7914
7915         * mini.c: optimize a codepath frequently happening in generics code.
7916
7917 2006-01-23  Martin Baulig  <martin@ximian.com>
7918
7919         * Makefile.am: Only compile debug-debugger.c on supported platforms.
7920
7921         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
7922         functions directly.
7923
7924         * driver.c: debug-debugger.c is only available if
7925         `MONO_DEBUGGER_SUPPORTED' is defined.   
7926
7927 2006-01-23  Martin Baulig  <martin@ximian.com>
7928
7929         * debug-debugger.c: Only enable this on platforms where the Mono
7930         Debugger is working (x86 and x86_64).
7931
7932 2006-01-21  Martin Baulig  <martin@ximian.com>
7933
7934         The Mono Debugger is now using the normal `mono' instead of the
7935         `mono-debugger-mini-wrapper' when executing managed code.
7936
7937         * debug-debugger.c: New file; previously known as
7938         debugger/wrapper/wrapper.c.
7939
7940         * debug-mini.c (mono_init_debugger): Removed.
7941
7942         * driver.c (mono_main): Added new `--inside-mdb' command line
7943         argument which is used when running inside the debugger.
7944
7945 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
7946
7947         * liveness.c (mono_analyze_liveness): Remove some unused data
7948         structures.
7949
7950 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
7951
7952         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
7953
7954 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
7955
7956         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
7957         depends on implementation details of monobitset.
7958
7959         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
7960         Fixes #77271.
7961
7962 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
7963
7964         * liveness.c: Update after monobitset changes.
7965
7966 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
7967
7968         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
7969
7970 2006-01-11 Neale Ferguson <neale@sinenomine.net>
7971
7972         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
7973
7974         * mini-s390x.c: Remove warning messages.
7975
7976 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
7977
7978         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
7979
7980 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
7981
7982         * generics.2.cs: Add ldelem/stelem_any test.
7983
7984 2006-01-10 Neale Ferguson <neale@sinenomine.net>
7985
7986         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
7987
7988 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
7989
7990         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
7991         
7992 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
7993
7994         * generics.2.cs: Reenable vtype tests.
7995
7996         * inssel-x86.brg: Remove an icorrect valuetype rule.
7997
7998 2006-01-06 Neale Ferguson <neale@sinenomine.net>
7999
8000         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
8001         initial support for OP_ABS.
8002
8003 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8004
8005         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
8006
8007 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8008
8009         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
8010         conversion and implement LADD/LSUB.
8011
8012         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
8013         architectures.
8014
8015 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8016
8017         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
8018
8019         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
8020         architectures.
8021
8022 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8023
8024         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
8025         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
8026         (stack walk problem).
8027
8028 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
8029
8030         * aot.c (mono_aot_load_method): Fix a warning.
8031
8032 2006-01-03  Neale Ferguson <neale@sinenomine.net>
8033
8034         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
8035
8036 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
8037
8038         * iltests.il: Add test for #77148.
8039
8040         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
8041         #77148.
8042
8043 2006-01-03  Neale Ferguson <neale@sinenomine.net>
8044
8045         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
8046
8047 2006-01-03  Neale Ferguson <neale@sinenomine.net>
8048
8049         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
8050         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
8051
8052         * basic-long.cs: Add lconv-to-r4/r8 tests.
8053
8054 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
8055
8056         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
8057
8058         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
8059         here as on other archs.
8060
8061 2005-12-29 Neale Ferguson <neale@sinenomine.net>
8062
8063         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
8064
8065 2005-12-29 Neale Ferguson <neale@sinenomine.net>
8066
8067         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
8068         
8069         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
8070
8071         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
8072         instrument_prolog; Add memory_barrier instruction.
8073
8074 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
8075
8076         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
8077
8078 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
8079
8080         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
8081
8082         * aliasing.c inssel.brg: Fix warnings.
8083
8084         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
8085         could skip initialization of some parts of memory.
8086
8087         * mini.c mini-ia64.c: Fix warnings.
8088
8089         * inssel-sparc.brg: Add an implementation of lneg which actually works.
8090
8091 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
8092
8093         * aliasing.c (mono_build_aliasing_information): Add a workaround for
8094         a crash seen on sparc.
8095
8096         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
8097         
8098         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
8099
8100 2005-12-21 Neale Ferguson <neale@sinenomine.net>
8101
8102         * mini-ops.h: Add s390_backchain instruction
8103
8104         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
8105
8106         * cpu-s390.md: Add s390_backchain instruction
8107
8108         * mini-s390.c: Significant ABI changes
8109
8110         * mini-s390.h: Cater for zero length structures
8111
8112 2005-12-20 Neale Ferguson <neale@sinenomine.net>
8113
8114         * mini-s390.c: ABI fixes
8115
8116         * inssel-s390.brg: Remove debug statements
8117
8118         * cpu-s390.md: Fix length of ATOMIC_xx operations
8119
8120 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
8121
8122         * basic-float.cs: Add float<->long conversion tests.
8123
8124 2005-12-16 Neale Ferguson <neale@sinenomine.net>
8125
8126         * mini-s390.c: Fix LOCALLOC processing.
8127
8128         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
8129
8130 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
8131
8132         * iltests.il: Add tests for some opcodes not covered by the other
8133         tests.
8134
8135 2005-12-15 Neale Ferguson <neale@sinenomine.net>
8136
8137         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
8138         register loading for Tail processing; Correct trace output.
8139
8140         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
8141
8142         * cpu-s390.md: Correct size of jmp instruction. 
8143
8144 2005-12-13 Neale Ferguson <neale@sinenomine.net>
8145
8146         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
8147
8148 2005-12-13 Neale Ferguson <neale@sinenomine.net>
8149
8150         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
8151           Bring s390 up to current level.
8152
8153 2005-12-12  Zltan Varga  <vargaz@gmail.com>
8154
8155         * generics.2.cs: Disable the newly added tests as they do not work yet.
8156         
8157         * generics.2.cs: Add valuetype tests.
8158
8159 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
8160
8161         * basic-long.cs: Add i4->u8 test.
8162
8163         * objects.cs: Add tests for JIT intrinsic.
8164
8165         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
8166         optimizations lost by a mistake.
8167
8168 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
8169
8170         * basic-long.cs: Remove a test moved to objects.cs.
8171
8172         * arrays.cs: Add more array tests.
8173
8174 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
8175
8176         * arrays.cs: Add new tests for multi-dimensional arrays.
8177
8178 2005-12-06  Raja R Harinath  <rharinath@novell.com>
8179
8180         * Makefile.am (test_sources2): Add generics.2.cs.
8181         (EXTRA_DIST): Add test_sources2.
8182
8183 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
8184
8185         Support for boxing and unboxing nullable types as well as the
8186         isinst operation on nullables, per the CLI ammendment.
8187
8188         * inssel.brg (CEE_ISINST): Special case for nullable
8189
8190         * mini.c (handle_unbox_nullable): new method
8191         (handle_box): Special case for nullable types
8192         (mono_method_to_ir): Call handle_unbox_nullable in correct
8193         places.
8194
8195         * generics.2.cs: New test suite
8196
8197         * Makefile.am: Support for regression tests with generics.
8198
8199 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
8200
8201         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
8202         allocated to registers. Fixes #76800.
8203
8204 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
8205
8206         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
8207
8208 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
8209
8210         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
8211         of platforms.
8212
8213 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
8214
8215         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
8216         objects.cs.
8217
8218         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
8219         
8220         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
8221 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
8222
8223         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
8224         single precision before storing to a single precision location.
8225
8226 2005-11-28  Raja R Harinath  <rharinath@novell.com>
8227
8228         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
8229
8230 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
8231
8232         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
8233         correct files.
8234
8235         * basic.cs: Remove test_0_byte_compares test which was moved to
8236         objects.cs a long time ago.
8237
8238 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
8239
8240         * aliasing.c: Fixed aliasing issue on 64 bit archs.
8241
8242 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
8243
8244         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
8245         handlers are called.
8246
8247         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
8248         throwing code.
8249
8250          * mini-ia64.c: Add support for the throw->branch exception 
8251         optimization.   
8252
8253         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
8254
8255 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
8256
8257         * mini.c: Enabled "fastpath" deadce :-)
8258         
8259 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
8260
8261         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
8262         alias analysis pass to support it.
8263         * mini.h: Likewise.
8264         * ssa.c: Likewise.
8265         * liveness.c: Likewise (liveness computation can use aliasing
8266         information to be more accurate).
8267         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
8268         moreover made so that "--compile-all" uses the given optimization
8269         flags and not the default ones.
8270         * aliasing.c: Alias analysis (new file).
8271         * aliasing.h: Likewise.
8272         * Makefile.am: added "aliasing.c" and "aliasing.h".
8273         
8274 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
8275
8276         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
8277         OP_L opcodes.
8278
8279 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
8280
8281         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
8282         fp >= end_of_stack exit condition, as it is not needed, and it might
8283         become true for fp eliminated frames.
8284
8285 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
8286
8287         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
8288         coded offsets.
8289
8290 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
8291
8292         * mini-arm.c: fixed alignment of doubles/longs to match
8293         the C ABI (bug #76635).
8294
8295 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
8296
8297         * aot.c: fix compilation with --enable-minimal=aot.
8298
8299 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
8300
8301         * mini-arm.c: fixed compatibility with the new
8302         floating point emulator package for compares.
8303
8304 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
8305
8306         * mini.c : reverted sig->pinvoke changes (r51396-51397).
8307
8308 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
8309
8310         * mini-exceptions.c (print_stack_frame): Output to stderr.
8311         (mono_handle_native_sigsegv): Ditto.
8312
8313 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
8314
8315         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
8316         OP_LCONV_TO_OVF_I implementation.
8317
8318         * mini-amd64.c: Add support for the throw->branch exception 
8319         optimization.
8320
8321         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
8322         when the catch clause catches a more general exception, i.e. Object.
8323
8324 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
8325
8326         * cpu-ia64.md: Remove unused opcodes.
8327
8328         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
8329         specific defines for architectures defining USE_SIGACTION.
8330
8331         * mini-ia64.c: Fix some warnings.
8332
8333         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
8334         version seemed to skip a frame.
8335
8336 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
8337
8338         * mini.c: Clean up the usage of sig->pinvoke flag. Now
8339         only calls which are made to native code use this flag.
8340
8341 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
8342
8343         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
8344         varargs methods as well.
8345         
8346         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
8347         which have save_lmf set. Reorganize methods prologs a bit.
8348
8349         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
8350         debugger to the proper place.
8351
8352 2005-10-29  Martin Baulig  <martin@ximian.com>
8353
8354         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
8355         when running inside the debugger until the debugger has support
8356         for it.
8357
8358 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
8359
8360         * mini.h: Fix a warning.
8361
8362 2005-10-24  Miguel de Icaza  <miguel@novell.com>
8363
8364         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
8365         we expose publicly, this returns the string.
8366
8367 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
8368
8369         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
8370         with fp elimination.
8371
8372 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
8373
8374         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
8375         native stacktrace using the glibc 'backtrace' function if available.
8376
8377 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
8378
8379         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
8380
8381         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
8382         handle SIGSEGVs received while in native code.
8383
8384         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
8385         code, call mono_handle_native_sigsegv which will abort the runtime
8386         after printing some diagnostics, instead of converting it into a
8387         confusing NullReferenceException.
8388
8389 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
8390
8391         * cpu-pentium.md: Remove unused opcodes.
8392
8393 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
8394
8395         * mini-amd64.h (MonoLMF): Add rsp field.
8396
8397         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
8398         the lmf too.
8399
8400 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
8401
8402         * mini-codegen.c (get_register_spilling): Fix some warnings.
8403
8404 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
8405
8406         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
8407         elimination during exception handling. Enable fp elimination by
8408         default.
8409
8410         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
8411         elimination.
8412
8413 2005-10-16  Martin Baulig  <martin@ximian.com>
8414
8415         * mini-exceptions.c
8416         (mono_debugger_run_finally): New public method for the debugger.
8417
8418 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
8419
8420         * debug-mini.c (mono_debug_init_method): Fix warning.
8421
8422         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
8423         the 'exname' parameter const to fix some warnings.
8424
8425 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
8426
8427         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
8428         introduced by the previous patch.
8429
8430 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
8431
8432         * basic-float.cs: Add test for precision of float arithmetic.
8433
8434         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
8435         when loading/storing single values from/to memory.
8436
8437         * mini.c (mono_jit_compile_method_with_opt): Create the function
8438         pointers in the correct domain.
8439
8440 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
8441
8442         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
8443         introduced by previous patch.
8444         
8445         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
8446         when out_filter_idx is NULL.
8447
8448         * mini-exceptions.c: Don't run filter clauses twice during exception
8449         handling. Fixes #75755.
8450
8451 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
8452
8453         * aot.c: Add support for ldflda wrappers.
8454
8455         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
8456         #75902.
8457
8458 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
8459
8460         * mini.c, mini.h: do not consider exception handlers blocks when
8461         setting up interface variables.
8462
8463 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
8464
8465         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
8466
8467 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
8468
8469         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
8470         causes a regression.
8471
8472         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
8473
8474 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
8475
8476         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
8477         of the OP_P definitions.
8478
8479         * TODO: Add a proposal for dealing with the CEE/OP mess.
8480
8481         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
8482         optimizations from the x86 port.
8483
8484         * cpu-amd64.md: Ditto.
8485
8486         * basic.cs basic-long.cs: Add tests.
8487
8488 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
8489
8490         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
8491         Patrik Torstensson's implementation of my exception-handling
8492         optimization idea, when the exception object is not used
8493         (bug #62150).
8494
8495 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
8496
8497         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
8498         of the mul_imm optimizations from the old jit.
8499
8500 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
8501
8502         * mini.c, liveness.c: patch by Patrik Torstensson and
8503         Zoltan Varga to improve performance in methods with
8504         exception clauses.
8505
8506 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
8507
8508         * driver.c: Remove 'Globalization' entry from --version.
8509
8510 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
8511
8512         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
8513         there is a profiler interested in JIT events.
8514
8515         * aot.c: Load profile files produced by the AOT profiling module, and
8516         reorder methods based on the profiling info. Add a 'method_order' table
8517         to the AOT file to make mono_aot_find_jit_info work with the reordered
8518         methods.
8519
8520         * mini.h: Bump AOT file version info.
8521
8522 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
8523
8524         * mini-arm.h: work around what looks like a gcc bug when optimizations
8525         are enabled.
8526
8527 2005-09-28  Raja R Harinath  <rharinath@novell.com>
8528
8529         * Makefile.am (AM_CFLAGS): Don't use += to append inside
8530         conditionals.  Use ...
8531         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
8532
8533 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
8534
8535         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
8536         to determine the amount of memory to copy when passing valuetypes.
8537
8538         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
8539         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
8540
8541 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
8542
8543         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
8544         information about aot.
8545
8546 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
8547
8548         * *.c: Replace the use of {Enter,Leave}CriticalSection with
8549         macros. This will allow a deadlock debugger to easily be plugged
8550         in.
8551
8552 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
8553
8554         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
8555
8556 2005-09-27  Raja R Harinath  <rharinath@novell.com>
8557
8558         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
8559         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
8560         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
8561         ($(arch_built)) [CROSS_COMPILING]: Error out.
8562
8563 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
8564
8565         * aot.c: Add support for the no_special_static flag for classes.
8566
8567 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
8568
8569         * Reapply reverted patches.
8570
8571         * *: Revert r50174 as well.
8572
8573         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
8574
8575 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
8576
8577         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
8578
8579 2005-09-23  Miguel de Icaza  <miguel@novell.com>
8580
8581         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
8582         part of the SIG_HANDLER_SIGNATURE.  
8583
8584 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
8585
8586         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
8587         statistics.
8588
8589         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
8590         introduced by previous patch.
8591
8592 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
8593
8594         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
8595         saved registers too.
8596
8597         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
8598         upon the information returned by get_call_info ().
8599         
8600         * mini-x86.c (add_float): Fix stack size calculation.
8601         (mono_arch_call_opcode): Rewrite this so it works based up the
8602         information returned by get_call_info ().
8603         (mono_arch_get_this_vret_args): Ditto.
8604
8605 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
8606
8607         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
8608         in cinfo to determine the registers which need to be used.
8609
8610 2005-09-20  Miguel de Icaza  <miguel@novell.com>
8611
8612         * driver.c (mono_main): Add --server and --desktop flags. 
8613
8614 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
8615
8616         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
8617         registers as global registers.
8618
8619         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
8620         longer needed with the new register allocator.
8621
8622         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
8623
8624         * cpu-ia64.md: Remove unused opcodes.
8625         
8626         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
8627         
8628 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
8629
8630         * cpu-amd64.md: Remove unused opcodes.
8631
8632         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
8633         needed with the new register allocator.
8634
8635         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
8636         reg-reg moves.
8637
8638 2005-09-16  Raja R Harinath  <rharinath@novell.com>
8639
8640         * Makefile.am (check-local): Don't invoke semdel-wrapper.
8641
8642 2005-09-16  Martin Baulig  <martin@ximian.com>
8643
8644         * exceptions-amd64.c
8645         (throw_exception): Don't call mono_debugger_throw_exception() if
8646         we're a rethrow - see the FIXME in the code.
8647
8648 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
8649
8650         * mini.c (mono_init_exceptions): This only works on some architectures.
8651         
8652 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
8653
8654         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
8655         on ia64.
8656
8657         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
8658
8659         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
8660         now in mini-exceptions.c.
8661
8662 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
8663
8664         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
8665         now in mini-exceptions.c.
8666
8667 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
8668
8669         * exceptions-x86.c: Applied patch from Patrik Torstensson 
8670         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
8671
8672         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
8673         code into mini-exceptions.c. Add some assertions to it.
8674
8675 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
8676
8677         * aot.c (emit_section_change): Applied patch from "The Software Team" 
8678         (<software@solmersa.com>). Fix as errors on windows.
8679
8680 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
8681
8682         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
8683         method info into the LMF.
8684
8685 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
8686         
8687         * mini-ia64.c: Add proper unwind info for method epilogs.
8688
8689         * exceptions-ia64.c: Add some code to help debugging.
8690         
8691         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
8692
8693         * mini-exceptions.c: Fix warning.
8694
8695 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
8696
8697         * mini.c: Really fix build.
8698
8699         * mini-x86.c mini-amd64.c: Fix build.
8700
8701 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
8702
8703         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
8704
8705         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
8706         some Interlocked methods as intrinsics.
8707
8708         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
8709         for Thread methods as well.
8710
8711         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
8712
8713         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
8714
8715         * mini-ia64.c mini-x86.c mini-amd64.c 
8716         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
8717         OP_MEMORY_BARRIER.
8718         
8719         * mini.c (mono_init_exceptions): Fix build breakage.
8720
8721 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
8722
8723         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
8724         of instructions. Use the new ia64_unw_op macros for emitting unwind
8725         info.
8726
8727         * mini.c (mono_init_exceptions): Initialize exception handling
8728         related trampolines at startup.
8729
8730 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
8731
8732         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
8733
8734 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
8735
8736         * mini.c: Handle type loading errors gracefully during compilation and
8737         throw the appropriate exception.
8738
8739 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
8740
8741         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
8742         for the mono binary.
8743
8744 2005-09-09  Martin Baulig  <martin@ximian.com>
8745
8746         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
8747         the release.
8748
8749 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
8750
8751         * mini-arm.h: use emulation for conv.r.un for the release.
8752
8753 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
8754
8755         * mini-arm.c, objects.cs: more fixes and tests for them.
8756
8757 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
8758
8759         * mini-arm.c: align structures to at least 4 bytes to be able
8760         to keep our current optimized memcpy.
8761
8762 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
8763
8764         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
8765
8766 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8767
8768         * mini.c: ignore SIGPIPE.
8769
8770 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
8771
8772         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
8773
8774         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
8775
8776 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
8777
8778         * mini.h: Add prototype for mono_allocate_stack_slots_full.
8779
8780 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
8781
8782         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
8783         exception handling support.
8784         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
8785         patch by Brian Koropoff <briank@marakicorp.com>).
8786
8787 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
8788
8789         * mini.c: revert another 'optimization' which breaks when
8790         items on the eval stack need to be saved at a basic block end
8791         (bug #75940).
8792
8793 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
8794
8795         * jit-icalls.c: for arrays, ensure we always provide
8796         lower bounds.
8797
8798 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
8799
8800         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
8801         
8802         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
8803
8804 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
8805
8806         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
8807         arguments in their original register.
8808
8809 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
8810
8811         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
8812         memset/memcpy.
8813
8814         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
8815         when ssapre is enabled.
8816
8817         * inssel-long.brg: Fix bug in previous patch.
8818
8819         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
8820         multiplication by a constant.
8821
8822 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
8823
8824         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
8825         icc.
8826
8827         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
8828         saving registers.
8829
8830 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
8831
8832         * inssel-arm.brg: apply changes tested by Brian Koropoff
8833         <briank@marakicorp.com>.
8834
8835 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
8836
8837         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
8838         
8839 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
8840
8841         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
8842         to the same register if dreg is just a base register.
8843         (print_ins): Improve printing of membase opcodes.
8844
8845         * inssel-x86.brg: Add optimized ldind(reg) rules.
8846
8847         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
8848
8849 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
8850
8851         * mini.c: when running under valgrind, set the stack bottom for
8852         the GC at the actual approximate stack for the app (fixes running
8853         mono with valgrind).
8854
8855 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
8856
8857         * mini.c: do no break at the first valuetype to init found
8858         (fixes bug #75791).
8859
8860 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
8861
8862         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
8863
8864 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
8865
8866         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
8867
8868 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
8869
8870         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
8871
8872 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
8873
8874         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
8875
8876         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
8877         code.
8878
8879         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
8880         code.
8881
8882         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
8883         methods.
8884
8885 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
8886
8887         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
8888
8889 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
8890
8891         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
8892         in the tail recursion optimization.
8893
8894         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
8895         debug info into the assembly file.
8896
8897         * iltests.il: Add test for filter regions.
8898
8899         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
8900         initial stack of filter regions. Fixes #75755.
8901
8902 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
8903
8904         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
8905         stack requirements.
8906
8907 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
8908
8909         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
8910         the check for an already compiled method on non-ia64 platforms.
8911         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
8912         proper domain.
8913
8914         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
8915
8916         * inssel-x86.brg: Add some optimized call rules.
8917
8918 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
8919
8920         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
8921         method here.
8922
8923         * mini.h mini-trampolines.c: Pass the trampoline argument to 
8924         mono_arch_patch_delegate_trampoline.
8925
8926         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
8927
8928         * mini-trampolines.c: Fix build.
8929
8930         * mini-amd64.h: Add delegate trampolines.
8931
8932         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
8933
8934         * inssel-amd64.brg: Add optimized call rules.
8935         
8936         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
8937
8938         * inssel-ia64.brg: Add optimized ldind(reg) rules.
8939
8940 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
8941
8942         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
8943         change.
8944
8945         * mini-ia64.c: Remove LMF fixmes.
8946
8947         * mini-ia64.h: Remove most fields from LMF.
8948
8949         * inssel-ia64.brg (stmt): Fix unaligned access errors.
8950
8951         * mini-trampolines.c: Add support for IA64 function descriptors.
8952
8953         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
8954         for IA64 function descriptors.
8955
8956 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
8957
8958         * tramp-arm.c: patch the vtable for virtual calls. Added
8959         support code to register/unregister the LMF.
8960         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
8961         more LMF work.
8962
8963 2005-08-19  Dick Porter  <dick@ximian.com>
8964
8965         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
8966         bit value if needed.
8967
8968 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
8969
8970         * mini.c (mini_get_method): Move handling of wrapper data here.
8971
8972         * mini.c (mono_method_to_ir): Add support for dynamic methods.
8973
8974         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
8975         virtual.
8976
8977         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
8978         bblock->code does not remain empty.
8979
8980 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
8981
8982         * arrays.cs: Add regression test for #75832.
8983
8984         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
8985         rules. Fixes #75832.
8986
8987         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
8988         instruction scheduling.
8989
8990 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
8991
8992         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
8993
8994 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
8995
8996         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
8997
8998         * mini-codegen.c: Fix VC build.
8999
9000         * cpu-pentium.md: Increase length of atomic_exhange_i4.
9001
9002 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9003
9004         * mini.h: fix signature for mono_register_opcode_emulation.
9005
9006 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
9007
9008         * mini.c: Get rid of most of the helper_sig_... constants using
9009         mono_create_icall_signature ().
9010
9011 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
9012
9013         * jit-icalls.c (helper_ldstr): New helper function.
9014
9015         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
9016
9017         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
9018         throw, load the string using a helper call instead of creating a string object.
9019
9020         * aot.c: Update after LDSTR changes.
9021
9022         * mini.h: Bump AOT file version.
9023         
9024         * aot.c: Save class size info into the AOT file. Print more statistics during
9025         compilation.
9026
9027         * mini.h: Bump AOT file version.
9028
9029         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
9030         ordering of disasm cases. Fixes #74957.
9031
9032 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
9033
9034         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
9035         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
9036         the generic code needed for the ARM port.
9037
9038 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
9039
9040         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
9041         inssel-arm.brg: more ARM features and fixes.
9042
9043 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
9044
9045         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
9046         ARM port work in progress.
9047
9048 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
9049
9050         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
9051
9052         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
9053
9054         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
9055
9056         * inssel.brg (mini_emit_memset): Add support for unaligned access.
9057
9058         * *-ia64.*: Ongoing IA64 work.
9059         
9060         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
9061
9062 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
9063
9064         * TODO: Remove out-of-data todo stuff.
9065
9066         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
9067         dead code.
9068
9069         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
9070
9071         * mini.h: Bump corlib version.
9072
9073 2005-07-27  Martin Baulig  <martin@ximian.com>
9074
9075         * mini-codegen.c
9076         (create_copy_ins): Added `const unsigned char *ip' argument; set
9077         `copy->cil_code' from it.
9078
9079 2005-07-27  Martin Baulig  <martin@ximian.com>
9080
9081         * mini-exceptions.c (mono_handle_exception): Don't call
9082         mono_debugger_handle_exception() for filters.
9083
9084 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
9085
9086         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
9087         as well.
9088
9089 2005-07-26  Martin Baulig  <martin@ximian.com>
9090
9091         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
9092
9093         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
9094         helper_compile_generic_method() if the method is actually virtual
9095         and non-final.
9096
9097 2005-07-26  Martin Baulig  <martin@ximian.com>
9098
9099         * mini.c
9100         (trampoline_code): Renamed to `mono_trampoline_code' and made it
9101         public; this is now accessed directly by the debugger.
9102         (mono_generic_trampoline_code): Removed.
9103
9104         * debug-mini.c
9105         (mono_debug_init_method): Also add interncalls and wrappers.
9106
9107 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
9108
9109         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
9110
9111 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
9112
9113         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
9114
9115 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
9116
9117         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
9118
9119 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
9120
9121         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
9122         getting TLS offsets on AMD64 too.
9123
9124 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
9125
9126         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
9127
9128 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
9129
9130         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
9131         inssel-arm.brg, mini-arm.h: ARM port work in progress.
9132
9133 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
9134
9135         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
9136
9137         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
9138         to mini.c.
9139
9140         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
9141         mono_sparc_is_virtual_call ().
9142         
9143         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
9144
9145         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
9146         trampoline parameters.
9147
9148         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
9149         
9150         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
9151         to mono_arch_get_vcall_slot_addr.
9152
9153         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
9154         trampoline code.
9155
9156         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
9157
9158 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
9159
9160         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
9161
9162 2005-07-19  Martin Baulig  <martin@ximian.com>
9163
9164         * exceptions-amd64.c (throw_exception): Call
9165         mono_debugger_throw_exception() here like we're doing it on i386.
9166
9167 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
9168
9169         * mini-ia64.c: Add optimized TLS access support.
9170
9171 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
9172
9173         * mini-exceptions.c: Ongoing IA64 work.
9174
9175         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
9176
9177         * mini.c: Use the default optimization set when embedding. Fixes
9178         #75194.
9179
9180 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
9181
9182         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
9183         of trampolines to a separate file.
9184
9185         * mini-trampolines.c: New file.
9186
9187         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
9188         separate file.
9189         
9190         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
9191         amd64/ia64 code.
9192
9193         * mini-codegen.c: Fix cygwin build.
9194
9195 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
9196
9197         * mini.c: Add some minor changes needed by the IA64 port.
9198
9199         * *-ia64.*: Ongoing IA64 work.
9200
9201 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
9202
9203         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
9204         trampolines into arch-independent and arch-dependent parts.
9205
9206         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
9207
9208 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
9209
9210         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
9211
9212         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
9213         the xp-regalloc-branch for amd64.
9214
9215         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
9216         xp-regalloc-branch for x86.
9217
9218 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
9219
9220         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
9221
9222 2005-07-06  Martin Baulig  <martin@ximian.com>
9223
9224         * mini.c
9225         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
9226         (mono_jit_runtime_invoke): Likewise.
9227
9228 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
9229
9230         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
9231         on x86 too.
9232         
9233         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
9234         without loading their metadata. Reorganize the file format so exception handling+
9235         debug info is kept separate from normal method info. Create MonoJitInfo 
9236         structures for methods lazily.
9237
9238         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
9239         loading metadata.
9240         (x86_class_init_trampoline): Patch AOT class init trampolines too.
9241
9242         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
9243
9244         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
9245         in AOT code.
9246
9247         * mini.h: Bump AOT file version.
9248
9249 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
9250
9251         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
9252
9253 2005-07-01  Raja R Harinath  <rharinath@novell.com>
9254
9255         * Makefile.am (check-local): Call semdel-wrapper.
9256
9257 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
9258
9259         * mini-x86.c: Revert the last change as it seems to break the build..
9260
9261 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
9262
9263         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
9264         
9265         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
9266
9267 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
9268
9269         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
9270         outside of the macro, so strange stuff doesn't happen with gcc4
9271         (NEW_AOTCONST_TOKEN): Likewise.
9272
9273 2005-06-28  Martin Baulig  <martin@ximian.com>
9274
9275         * mini.c (mini_class_is_system_array): New static method; use this
9276         instead of `klass->parent == mono_defaults.array_class' everywhere
9277         since this also works for the new generic array class.
9278
9279 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
9280
9281         * inssel.brg: Remove warnings.
9282
9283 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
9284
9285         * mini-ia64.c: Ongoing IA64 work.
9286
9287         * basic-float.cs: Add float->i1 conversion test.
9288
9289         * iltests.il: Add conv.u4 test.
9290
9291 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
9292
9293         * inssel-long.brg: Fix bug caused by last change.
9294
9295 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
9296
9297         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
9298         BSDs.  Allows the x86 JIT to work on OSX86
9299
9300 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
9301
9302         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
9303         u4->i8 conversion.
9304
9305         * mini-ia64.c: Ongoing IA64 work.
9306
9307 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
9308
9309         * mini-ia64.c: Ongoing IA64 work.
9310
9311         * driver.c: Clean up jit_code_hash as well when using --regression.
9312
9313         * inssel-long.brg: Fix long->i4/u4 conversion rules.
9314
9315         * basic-long.cs: Add tests for long->u4 conversion.
9316
9317 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
9318
9319         * mini.c: Take mono_get_domainvar out of macros. This makes sure
9320         that we do not depend on undefined C behavior: the order stuff
9321         gets evaluated within an expression. Fixes mono when compiled on
9322         GCC 4.
9323
9324 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
9325
9326         * *-ia64.*: Ongoing IA64 work.
9327
9328         * aot.c: Lower memory usage while loading AOT methods.
9329
9330         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
9331
9332         * mini.h: Bump AOT file format version.
9333
9334 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
9335
9336         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
9337
9338 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
9339
9340         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
9341         not on callee assembly). Fixed some comments.
9342
9343 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
9344
9345         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
9346         it gets proper disassembly.
9347         (emit_method_info): Remove some dead code.
9348
9349         * mini.c (mini_method_compile): Allways allocate the GOT var in
9350         mono_method_to_ir for emulating opcodes.
9351
9352 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
9353
9354         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
9355         before freeing the code memory. Fixes #74990.
9356
9357         * objects.cs: Add regression test for #74992.
9358
9359         * liveness.c: Extend live ranges of arguments to the beginning of the
9360         method. Fixes #74992.
9361
9362         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
9363         so it points into the faulting instruction.
9364
9365 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
9366
9367         * jit-icalls.c (mono_imul_ovf): Add exception handling.
9368
9369         * *-ia64.*: Ongoing IA64 work.
9370
9371         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
9372
9373 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
9374
9375         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
9376
9377         * *-ia64.*: Ongoing IA64 work.
9378
9379 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
9380
9381         * basic-long.cs: Add tests for add/sub.ovf.
9382
9383         * basic.cs: Add tests for sub.ovf.
9384
9385         * *-ia64.*: Ongoing IA64 work.
9386
9387 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
9388
9389         * *-ia64.*: Ongoing IA64 work.
9390
9391         * basic.cs: Add conv.ovf.i4.un test.
9392
9393 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
9394
9395         * mini.c: (remove_block_if_useless) Fixed bug 75061.
9396         
9397 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9398
9399         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
9400
9401 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
9402
9403         * *-ia64.*: Ongoing IA64 work.
9404
9405 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9406
9407         * trace.[ch]:
9408         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
9409
9410 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
9411
9412         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
9413
9414 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
9415
9416         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
9417
9418         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
9419         of a call is callable by a near call.
9420
9421 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
9422
9423         * mini-ia64.c: Ongoing IA64 work.
9424
9425 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
9426
9427         * genmdesc.c: Make the generated array non-static.
9428
9429         * inssel-long.brg: Fix LSHR_IMM rule.
9430
9431         * *-ia64.*: Ongoing IA64 work.
9432
9433         * *-ia64.*: Ongoing IA64 work.
9434
9435 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
9436
9437         * *-ia64.*: Ongoing IA64 work.
9438
9439         * *-ia64.*: Ongoing IA64 work.
9440         
9441         * mini-ia64.c: Ongoing IA64 work.
9442
9443         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
9444
9445 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
9446
9447         * objects.cs basic-calls.cs: Move some tests to objects.cs.
9448         
9449         * objects.cs basic-long.cs: Move some tests to objects.cs.
9450
9451 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
9452
9453         * *-ia64.*: Ongoing IA64 work.
9454
9455         * iltests.il: Add a new test.
9456
9457         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
9458         newobj. Fixes #75042.
9459
9460 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
9461
9462         * *-ia64.*: Ongoing IA64 work.
9463         
9464         * *-ia64.*: Ongoing IA64 work.
9465         
9466         * *-ia64.*: Ongoing IA64 work.
9467
9468         * basic.cs objects.cs: Move tests accessing static variables as well.
9469
9470         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
9471
9472 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
9473
9474         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
9475
9476         * driver.c: Always print failed tests.
9477
9478         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
9479         frame pointer.
9480
9481         * *ia64*: Ongoing IA64 work.
9482
9483 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
9484
9485         * basic.cs: Add tests for add.ovf. Fix warnings.
9486
9487 2005-05-18  Miguel de Icaza  <miguel@novell.com>
9488
9489         * driver.c (mono_main): Avoid crash if no argument is passed to
9490         --break;  Do not use g_error, but f_printf.   And fix all other
9491         ocurrences of the same crash.
9492
9493 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
9494
9495         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
9496         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
9497         Fixes #74742.
9498
9499 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
9500
9501         * *-ia64.*: Add beginnings of IA64 backend.
9502
9503         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
9504
9505 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
9506
9507         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
9508         Fixes #74925.
9509
9510         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
9511
9512         * mini-amd64.c: Fix a warning.
9513
9514 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
9515
9516         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
9517         in float_neg. Fixes #74897.
9518
9519         * mini-amd64.c (emit_call): Fix another near call bug.
9520
9521 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
9522
9523         * declsec.c: Keep the appdomain information in the structure. Added a 
9524         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
9525         value gets overwritten).
9526         * declsec.h: Set the default MonoArray for the the stack to 6. Added
9527         an MonoAppDomain member to MonoSecurityFrame.
9528         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
9529         used in the stack walk. Now use a MonoArray which grow (double) when
9530         it gets full.
9531
9532 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
9533
9534         * mini.c: Re-enabled runtime cleanup, since running threads should
9535         now properly stop when exiting.
9536
9537 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
9538
9539         * mini-codegen.c: New file contaning the arch-independent local
9540         register allocator. Not used by any architectures yet.
9541
9542         * mini.h linear-scan.c: Merge some changes from the 
9543         mini-xp-local-regalloc branch.
9544
9545 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
9546
9547         * mini-amd64.c (emit_call): Fix calls to native functions when the
9548         runtime is compiled as a shared library. Fixes #74756.
9549
9550         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
9551         on a literal field. Fixes #74751.
9552
9553 2005-04-25  Raja R Harinath  <rharinath@novell.com>
9554
9555         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
9556
9557 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
9558
9559         * objects.cs: Add missing null casting test.
9560
9561 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
9562
9563         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
9564         in wrapper methods. Also rename 'address' variable to 'offset'.
9565
9566 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
9567
9568         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
9569         warnings.
9570         
9571         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
9572
9573         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
9574         work on windows.
9575
9576 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
9577
9578         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
9579
9580 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
9581
9582         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
9583         just the last bytes.
9584
9585 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
9586
9587         * aot.c (mono_compile_assembly): Fix warning.
9588
9589         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
9590         by the _MSC_VER stuff.
9591
9592 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
9593
9594         * inssel-long.brg: Fix #74588.
9595
9596         * cpu-amd64.md: Fix #74591.
9597
9598         * iltests.il: Add new regression tests.
9599
9600 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
9601
9602         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
9603         valuetype.
9604
9605 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
9606
9607         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
9608
9609         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
9610         from Bill Middleton <flashdict@gmail.com>.
9611
9612 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
9613
9614         * arrays.cs: Add new regression test. Fix warnings.
9615
9616 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
9617
9618         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
9619         and leakage in CKFINITE.
9620
9621         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
9622         this to a null op since it is called on amd64 too.
9623
9624         * exceptions-amd64.c (get_throw_trampoline): Align stack.
9625
9626         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
9627         body since this is not used on amd64.
9628         
9629         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
9630
9631         * mini-amd64.c: Remove obsolete fixmes.
9632
9633         * mini.c (print_method_from_ip): Fix debugging support.
9634
9635 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
9636
9637         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
9638         so that expressions that don't give much gain are not reduced.
9639         * ssapre.h: Likewise.
9640
9641 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
9642
9643         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
9644
9645         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
9646
9647         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
9648
9649 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
9650
9651         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
9652
9653         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
9654
9655 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
9656
9657         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
9658         stack touching.
9659
9660         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
9661
9662         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
9663
9664         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
9665
9666         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
9667         MONO_ARCH_USE_SIGACTION. Fixes #74252.
9668
9669         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
9670
9671         * mini-x86.c: Fix up stack overflow handling.   
9672
9673         * exceptions.cs: Add new regression test.
9674
9675 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
9676
9677         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
9678         mono_jit_thread_attach.
9679
9680         * mini.c (mono_method_to_ir): Verify called method is not abstract.
9681
9682 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
9683
9684         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
9685         avoid calling constructors using callvirt.
9686
9687         * inssel.brg: Fix #74073.
9688
9689 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
9690
9691         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
9692         compilation with non-GCC compilers.
9693         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
9694         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
9695
9696 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
9697
9698         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
9699         klass->interface_offsets (will likely fix bug#74073).
9700
9701 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
9702
9703         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
9704
9705 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
9706
9707         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
9708         to amd64_div_reg_size ().
9709         
9710         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
9711
9712 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
9713
9714         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
9715
9716 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
9717
9718         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
9719
9720 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
9721
9722         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
9723         
9724         * mini.c (mono_precompile_assembly): Load and precompile referenced
9725         assemblies as well. Fixes #74015.
9726
9727 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
9728
9729         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
9730
9731 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
9732
9733         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
9734         a lot of checks and (anyway) permissions cannot work until corlib is 
9735         loaded.
9736
9737 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
9738
9739         * mini-ppc.c: fixed ABI issue on sysv/ppc.
9740
9741 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
9742
9743         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
9744         calls (fixes bug#72824).
9745
9746 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
9747
9748         * mini.c: fix tail recursion elimination (see test in bug#73936).
9749
9750 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
9751
9752         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
9753         some fp functions in sse2 mode.
9754
9755 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
9756
9757         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
9758
9759 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
9760
9761         * mini.h mini.c: Add mono_get_jit_tls_key ().
9762
9763         * mini-x86.c: Enable fast TLS support on windows.
9764
9765 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
9766
9767         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
9768         * mini.c: Check for p/invoke method when generating code. If a
9769         p/invoke method, or it's class, isn't decorated with [Suppress
9770         UnmanagedCodeSecurity] then generate code to call System.Security.
9771         UnmanagedDemand (only if the security manager is active).
9772
9773 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
9774
9775         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
9776         last change as it seems to cause strange crashes.
9777         
9778 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
9779
9780         * *.c: handle unsafe function pointers where needed.
9781
9782 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
9783
9784         * mini.c (mono_jit_free_method): Remove the fixme too.
9785
9786 2005-03-15  Miguel de Icaza  <miguel@novell.com>
9787
9788         * mini.c: As discussed, make the code actually free the delegate
9789         thunk now, to enable the debugging of delegate problems, use
9790         MONO_DEBUG=1 when running Mono. 
9791
9792         This takes also care of parts of the leaks as seen by Joe.
9793
9794 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
9795
9796         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
9797         thread_tls_offset calculation.
9798
9799 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
9800
9801         * declsec.c: Reworked linkdemand checks for icall. The previous code
9802         was using the declaration code (untrusted) and didn't work as expected
9803         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
9804         specific case.
9805
9806 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
9807
9808         * iltests.il: Add new localloc test.
9809
9810         * mini-amd64.c: Handle large stack allocations the same way as on
9811         windows if stack overflow handling is working.
9812         
9813         * mini-amd64.c: Allocate the signal stack using mmap.
9814
9815         * mini.c (sigsegv_signal_handler): Fix reading of context.
9816
9817         * mini-exceptions.c: Fix up stack overflow handling.
9818
9819         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
9820
9821         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
9822
9823         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
9824
9825         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
9826
9827         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
9828         tramp_init functions as they are no longer needed.
9829
9830 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
9831
9832         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
9833         
9834         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
9835
9836         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
9837         
9838         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
9839         support that now.
9840
9841         * mini-ops.h: Add OP_LMUL_IMM.
9842
9843         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
9844         long mul/div opcodes as intrinsic.
9845
9846         * mini-amd64.c (emit_call): Handle the case when the callee might be
9847         an AOT method.
9848
9849 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
9850
9851         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
9852         extra safe.
9853         
9854         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
9855
9856         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
9857
9858 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
9859
9860         * mini.c (mono_codegen): Don't leak here, to help people running
9861         monogrind.
9862
9863 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
9864
9865         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
9866         conversions in sse2 mode.
9867
9868         * basic-float.cs: Add regression test.
9869         
9870         * mini-amd64.c: Reenable sse2.
9871
9872 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
9873
9874         * mini-amd64.c: Disable sse2 until some regressions are fixed.
9875
9876 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
9877
9878         * driver.c: Copyright text should include 2005.
9879         
9880 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
9881
9882         * cpu-amd64.md (load_membase): Fix more max lengths.
9883
9884 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
9885
9886         * cpu-amd64.md (load_membase): Fix max length.
9887
9888         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
9889
9890         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
9891
9892         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
9893         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
9894
9895         * basic-float.cs: Add rounding regression test.
9896
9897         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
9898
9899 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
9900
9901         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
9902         structures in registers for pinvoke wrappers.
9903
9904 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
9905
9906         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
9907
9908 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
9909
9910         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
9911         wrapper to mono_jit_thread_attach.
9912
9913         * mini.c (mini_jit_thread_attach): New jit icall.
9914
9915         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
9916         native->managed wrappers.
9917
9918         * exceptions.cs: Add new regression test.
9919
9920         * mini.c (optimize_branches): Check regions in the cbranch to throw
9921         block case as well. Fixes #73242.
9922
9923 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
9924
9925         * mini.c: thread safety fixes.
9926
9927 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
9928
9929         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
9930         patching stuff, since delegates use jump trampolines so there is
9931         no caller.
9932
9933         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
9934         jump trampolines.
9935         
9936         * tramp-amd64.c: Fix build.
9937
9938         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
9939         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
9940
9941         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
9942         Rename this to mono_arch....
9943         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
9944
9945         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
9946
9947         * mini-amd64.c (emit_call): If both the caller and the callee is
9948         guaranteed to have 32 bit addresses, emit a normal call.
9949
9950         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
9951
9952         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
9953         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
9954         method_ptr inside delegates.
9955
9956 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
9957
9958         * mini.c (mono_jit_free_method): Free the method info even if the native code is
9959         invalidated. Fixes #73001.
9960
9961         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
9962
9963         * mini-x86.c: Only use stdcall for pinvokes on windows.
9964
9965 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
9966
9967         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
9968         * mini-x86.c: remove unreliable __thread var offset detection,
9969         use the correct accessors and enable by default.
9970
9971 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
9972
9973         * mini.c (mono_jit_free_method): Fix memory leak.
9974
9975 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
9976
9977         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
9978
9979 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
9980
9981         * cpu-amd64.md: Fix lengths of atomic opcodes.
9982
9983 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
9984
9985         * driver.c: try to not imply using ICU is any good.
9986
9987 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
9988
9989         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
9990         functions as inline ops.
9991
9992         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
9993         some Interlocked functions as inline ops.
9994
9995         * mini.c (move_basic_block_to_end): Fix bug in last patch.
9996
9997         * mini.h (MonoBasicBlock): Reorganize fields a bit.
9998
9999         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
10000
10001         * mini.c: Add support for OP_NOT_TAKEN.
10002
10003         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
10004         structures in registers for pinvoke wrappers.
10005
10006         * mini-amd64.c: Fix warnings.
10007
10008 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
10009
10010         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
10011
10012         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
10013
10014         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
10015         address instead of loading the address from it.
10016
10017         * mini-x86.c: Add support for returning small structs in registers
10018         on Win32. Fixes part of #70864.
10019         
10020 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
10021
10022         * trace.c (get_token): Improve error checking.
10023
10024 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
10025
10026         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
10027
10028 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
10029  
10030         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
10031         it can be reused for MonoClass.
10032         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
10033         _LINKDEMAND.
10034
10035 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
10036
10037         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
10038         instead of a MonoReflectionMethod. The method information wasn't used
10039         when displaying SecurityException details (but will be now).
10040
10041 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
10042
10043         * Makefile.am : windows build fix.
10044
10045 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
10046
10047         * iltests.il: Add new regression test.
10048
10049         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
10050         #72522.
10051
10052 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
10053  
10054         * mini.c: Moved linkdemand check into helper function check_linkdemand
10055         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
10056         LDFTN, LDVIRTFTN).
10057
10058 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
10059
10060         * declsec.c: Added statistics counter for different kinds of 
10061         LinkDemands.
10062         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
10063         (and commented) declaration.
10064         * mini.c: Added statistics counter for security Demand code 
10065         generation. Added display of security statistics.
10066
10067 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
10068
10069         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
10070         Fix compilation errors under gcc-2.95.
10071
10072 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
10073
10074         * mini.c, driver.c: Use the new jit trampoline hashtable
10075
10076 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10077
10078         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
10079
10080 2005-02-11  Martin Baulig  <martin@ximian.com>
10081
10082         * debug-mini.c (mono_debug_close_method): Free the line number array.
10083
10084 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
10085
10086         * aot.c: Break up large methods into smaller ones. Share GOT slots for
10087         icalls.
10088
10089         * mini.h: Bump AOT file format version. 
10090
10091 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
10092
10093         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
10094         APTC and P/Invoke.
10095         * declsec.h: Added macros to get/set lazyly initialized security 
10096         informations about assemblies. Added new enum for different type of
10097         possible LinkDemand violation. Added function to check LinkDemands.
10098         * mini.h: Added a field to MonoCompile to hold any security violation
10099         detected when JITting a method (so it can be thrown later).
10100         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
10101         and CEE_CALLVIRT. Added code to throw exception at the end of
10102         mini_method_compile (note: the exception is unhandled right now).
10103
10104 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
10105
10106         * mini.c, jit-icalls.c: use the managed implementation of
10107         memset for initobj and memset, to avoid managed <-> unmanaged
10108         transitions.
10109
10110 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
10111
10112         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
10113         optimization if it would need a GOT var.
10114
10115         * basic.cs: Add tests for constant propagation and switch statements.
10116
10117         * ssa.c: Fix out-of-range constant propagation and switch statements.
10118
10119 2005-02-09    <vargaz@freemail.hu>
10120
10121         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
10122
10123 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
10124
10125         * cpu-amd64.md (load_membase): Fix max length of load_membase.
10126
10127 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10128
10129         * mini.c: update to new signature of mono_class_get_allocation_ftn().
10130
10131 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
10132
10133         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
10134         arithmetic operations.
10135
10136 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
10137
10138         * mini-ppc.c: add a workaround for broken user code that
10139         DllImports vararg functions with non-vararg signatures.
10140
10141 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
10142
10143         * mini.c (mono_jit_compile_method_inner): Add detection and a 
10144         meaningfull error message for assemblies written in Managed C++.
10145
10146         * tramp-amd64.c mini-amd64.h: Add support for 
10147         create_trampoline_from_token ().
10148
10149         * aot.c mini-x86.c abcremoval.c: Applied patch from
10150         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
10151
10152 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
10153
10154         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
10155         which takes a MonoImage/token as parameter instead of a MonoMethod.
10156
10157         * aot.c: Use the new trampoline for initializing vtables.
10158
10159         * aot.c: Add support for ldfld/stfld_remote wrappers.
10160
10161         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
10162         rules for compare <MEM>, IMM.
10163
10164         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
10165
10166         * aot.c: Handle inherited finalizers correctly.
10167
10168 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
10169
10170         * inssel.brg (stmt): Add a missing _setup_... ().
10171
10172         * aot.c: Save some parts of the class state to the AOT file and use it
10173         to recompute that state when a class is initialized.
10174
10175         * mini.c: Install AOT hooks into the runtime.
10176
10177         * mini.h: Bump AOT file format version.
10178         
10179         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
10180         Fixes #72148.
10181
10182         * iltests.il: Add new test.
10183
10184 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
10185
10186         * mini.c: fix typo.
10187
10188 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
10189
10190         * mini.c: setup the statistical profiler in the thread attach
10191         callback to cope with the new single thread code.
10192
10193 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
10194
10195         * mini-ppc.c: ensure we have enough room for the profiler
10196         calls (fixed bug#72084).
10197
10198 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
10199
10200         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
10201         it.
10202
10203 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10204
10205         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
10206
10207 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10208
10209         * ssapre.c: Fixed an issue with down safety (this allows IronPython
10210         to succesfully execute parrotbench).
10211         * ssapre.h: Likewise.
10212
10213 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
10214
10215         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
10216         variable for stores to method arguments (fixes a SSAPRE issue).
10217
10218 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
10219
10220         * mini.c: handle value types in dup, fixes gen-112.cs.
10221
10222 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
10223
10224         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
10225         sequence for calls in dynamic methods to avoid thunks.
10226
10227 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
10228
10229         * mini.c: correctly remove dynamic methods from the hashtable.
10230
10231 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
10232
10233         * driver.c: Disabled SSAPRE until fix the bug that appears
10234         in IronPython's parrotbench.
10235
10236 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
10237
10238         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
10239
10240         * mini.c (mono_method_to_ir): Revert the previous change.
10241         
10242         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
10243         when AOT compiling.
10244
10245         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
10246         mono_jit_info_table_find () etc. when running under valgrind.
10247
10248         * inssel.brg: Fix warnings.
10249
10250         * mini-exceptions.c: Fix warnings.
10251
10252 2005-01-31  Martin Baulig  <martin@ximian.com>
10253
10254         * driver.c (compile_all_methods_thread_main): Don't try to compile
10255         generic methods or anything which has type parameters.
10256
10257 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
10258
10259         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
10260
10261         * TestDriver.cs: Add --verbose flags.
10262
10263         * graph.c ssa.c: Fix 64 bit warnings.
10264         
10265         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
10266         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
10267         Fix 64 bit warnings.
10268
10269         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
10270         variable not spotted by gcc.
10271         
10272         * mini-amd64.c inssel-amd64.brg: Applied patch from  
10273         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
10274         X86_COMPARE_MEMBASE opcodes.
10275
10276         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
10277
10278 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
10279
10280         * *: MonoMethod->signature might be NULL now. You *MUST* use
10281         mono_method_signature.
10282
10283 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
10284
10285         * driver.c (compile_all_methods_thread_main): Compile the methods
10286         without invoking cctors.
10287
10288 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
10289
10290         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
10291         * basic-calls.cs: test for the above.
10292
10293 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
10294
10295         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
10296         MonoJitInfo changes.
10297
10298 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
10299
10300         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
10301         eagerly if it contains dynamic methods.
10302         
10303         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
10304
10305         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
10306         trace, it is now computed by an icall from trace_ips.
10307         
10308         * mini-exceptions.c: Fix a warning.
10309
10310 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
10311
10312         * mini-exceptions.c: don't bother getting stack trace info if
10313         it's not going to be used.
10314
10315 2005-01-27  Raja R Harinath  <rharinath@novell.com>
10316
10317         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
10318         ssapre-mini-ops.h.
10319
10320 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
10321
10322         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
10323
10324         * aot.c: Avoid calling mono_method_get_header () if not needed.
10325
10326         * mini.h: Bump AOT file format version.
10327         
10328         * mini.c (mono_emit_native_call): Allocate a GOT var here.
10329
10330         * mini.c (mono_print_tree): Print more info for calls.
10331
10332 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
10333
10334         * declsec.h: Remove warning by adding missing include for marshal.h
10335
10336 2005-01-26  Martin Baulig  <martin@ximian.com>
10337
10338         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
10339         `ip' twice.
10340
10341 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
10342
10343         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
10344         flags.
10345
10346         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
10347
10348         * aot.c (mono_compile_assembly): Fix a warning.
10349
10350 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
10351
10352         * declsec.c: Look for security attributes on the original MonoMethod 
10353         (and not the wrapped one). This fix permissions on icalls.
10354
10355 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
10356
10357         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
10358
10359         * mini.c (mono_allocate_stack_slots): Add a fixme.
10360
10361         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
10362
10363 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
10364
10365         * inssel.brg: optimize casts of sealed types (more
10366         optimizations waiting for fixes in remoting).
10367
10368 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
10369
10370         * inssel.brg (stmt): Add another dummy rule.
10371
10372         * driver.c: Fix warnings.
10373
10374         * driver.c (mono_main): If running under valgrind, instruct glib to use
10375         the system allocation functions so valgrind can track the memory
10376         allocated by the g_... functions.
10377
10378         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
10379
10380         * mini-ops.h: Add OP_DUMMY_STORE opcode.
10381
10382         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
10383
10384         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
10385         variables in try regions.
10386
10387         * mini.c (mini_method_compile): Don't disable optimizations on large
10388         methods when AOT compiling.
10389
10390         * mini.c (mono_allocate_stack_slots): New arch independent method to 
10391         allocate stack slots. Not yet used.
10392
10393 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
10394
10395         * debug-mini.c (mono_debug_close_method): Plug some leaks.
10396
10397 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
10398
10399         * mini-ppc.c: make the branch info relative as the code
10400         buffer can be reallocated.
10401
10402 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
10403
10404         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
10405         * driver.c: Removed the AOT/security restriction. Now initialize the
10406         security manager (in metadata) if --security is used.
10407         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
10408         rather than the pointer to declarative security, when AOT is used.
10409
10410 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
10411
10412         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
10413         basic blocks, reduced intrinsic exception throwing code size.
10414
10415 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
10416
10417         * driver.c (mini_usage): Reorder the usage screen.
10418
10419 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
10420
10421         * mini.c (mono_resolve_patch_target): Fix warning.
10422
10423 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
10424
10425         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
10426         previous patch.
10427
10428         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
10429
10430         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
10431         breaks the amd64 build.
10432
10433         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
10434         register allocation. Fixes #71454.
10435
10436         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
10437
10438         * arrays.cs: Add new regression test.   
10439
10440 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
10441
10442         * ssapre.c: Turned usage of snprintf to GString.
10443         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
10444         (I left it on by mistake in my previous commit).
10445
10446 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
10447
10448         * mini.c, cfold.c, basic-calls.cs: preserve side effects
10449         on cond branch optimization (fixes bug# 71515).
10450
10451 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
10452
10453         * abcremoval.c: Fixed bug 71062.
10454         * abcremoval.h: Likewise.
10455
10456 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
10457
10458         * mini.c: Added a new functionality to optimize_branches, the removal
10459         of useless basic blocks, and fixed some problem in the removal of
10460         critical edges; some utility functions added for both purposes.
10461         * ssapre.c: Added complex expression support, and fixed bug 70637.
10462         * ssapre.h: Likewise.
10463         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
10464         enabled in SSAPRE.
10465         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
10466         * driver.c: Re-enabled SSAPRE.
10467
10468 2005-01-19  Martin Baulig  <martin@ximian.com>
10469
10470         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
10471         the result of mono_get_method_constrained().
10472
10473 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
10474
10475         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
10476         manager.
10477
10478 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
10479
10480         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
10481         be detected.  Fixes #59296.
10482
10483 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
10484
10485         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
10486         which can happen. Fixes #71361.
10487
10488 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
10489
10490         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
10491         manager.
10492
10493 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
10494
10495         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
10496         appdomain-unload.exe to fail.
10497         
10498         * mini.c: Fix some memory leaks.
10499
10500 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
10501
10502         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
10503         Fixed bug and sped up some codepaths.
10504
10505 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
10506
10507         * mini.c: Fix some memory leaks.
10508
10509         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
10510         conversion.
10511
10512         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
10513
10514         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
10515         #71320.
10516
10517         * iltests.il: Add regression test for #71320.
10518
10519 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
10520
10521         * mini.c (mono_codegen): Fix installation of profiler hooks.
10522
10523         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
10524
10525 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
10526
10527         * mini.h, mini.c, cfold.c: optimize access to enum
10528         readonly fields, too. Eval conditional branches if possible
10529         to perform unreachable code removal in more cases.
10530
10531 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
10532
10533         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
10534
10535         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
10536         code manager.
10537
10538         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
10539         WinXP DEP. Fixes #71244.
10540
10541 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
10542
10543         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
10544
10545 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
10546
10547         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
10548
10549 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
10550
10551         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
10552         changes.
10553
10554         * mini.h: Bump AOT version.
10555
10556         * mini.h (MonoCompile): Change exvar to a hash table.
10557
10558         * mini.c: Allocate a separate exvar for each handler block.
10559
10560         * mini.c: Get rid of the computation of filter_lengths, its not needed.
10561
10562         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
10563         ex var with the pending exception and only throw if the two are equal.
10564         Fixes #68552.
10565         
10566         * exceptions.cs: Add tests for rethrow and nested catch clauses.
10567
10568         * mini-x86.c: Fix warnings.
10569
10570         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
10571         used by all the ports now.
10572
10573         * aot.c: Add write-symbols and save-temps options.
10574
10575 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
10576
10577         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
10578
10579 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
10580
10581         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
10582         operations.
10583
10584         * tramp-s390.c: Check vtable slot belongs to the domain.
10585
10586         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
10587         as per other platforms.
10588
10589         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
10590
10591 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
10592
10593         * driver.c: we don't run the Main() code in a subthread anymore.
10594
10595 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
10596
10597         * mini.c: added experimental rtc support in the statistical
10598         profiler: if the user has the permission, more accurate statistics
10599         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
10600         The MONO_RTC value must be restricted to what the linux rtc allows:
10601         power of two from 64 to 8192 Hz.
10602
10603 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
10604
10605         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
10606
10607 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
10608
10609         * mini-ppc.c: better icache flush for smp.
10610
10611 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
10612
10613         * mini-amd64.c (emit_move_return_value): Fix memory leak.
10614
10615         * mini-x86.c (get_call_info): Add the get_call_info () code from the
10616         amd64 port, not yet used.
10617
10618 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
10619
10620         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
10621         a struct type.
10622
10623 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
10624
10625         * driver.c: Added --security option to activate the security manager.
10626         Right now this will allow code generation for declarative demands and
10627         is disabled when AOT is specified.
10628         * mini.c: Add code generation for declarative security demands.
10629         * mini.h: Add mono_use_security_manager as an extern gboolean.
10630
10631 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
10632
10633         * aot.c (mono_compile_assembly): Speed up compilation a bit by
10634         emitting more dense assembly code.
10635
10636         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
10637         exception throwing stuff.
10638
10639 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
10640
10641         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
10642         dead code.
10643
10644         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
10645         left in by mistake.
10646
10647         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
10648         fixed.
10649
10650         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
10651
10652         * tramp-*.c: Only patch vtable slots if the object is in the current
10653         domain. Fixes appdomain-unload.exe.
10654
10655         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
10656         
10657         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
10658         x86 branch.
10659
10660 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
10661
10662         * mini.c (reverse_branch_op): New helper function.
10663
10664         * mini.c (optimize_branches): Run the new optimization only on 
10665         platforms which support it. Also reverse all kinds of branches.
10666
10667         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
10668
10669         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
10670         a throw statement.
10671
10672         * mini.c (optimize_branches): Reverse not-equals branches if the false
10673         bblock is a throw. This happens a lot of time with argument checking in
10674         corlib.
10675
10676         * mini.c (mono_codegen): Add support for placing basic blocks after
10677         the function epilogue.
10678
10679         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
10680         function epilogue.
10681         
10682 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
10683
10684         * mini.c (setup_stat_profiler): Only set this up if the platform
10685         supports ITIMER_PROF.
10686
10687 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
10688
10689         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
10690         previous patch.
10691
10692         * inssel.brg: Fix a warning.
10693
10694 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
10695
10696         * mini.c: added support for statistical profiler 
10697         (run with: --profile=default:stat).
10698
10699 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
10700
10701         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
10702
10703         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
10704
10705         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
10706         related to global registers from the amd64 port.
10707
10708 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
10709
10710         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
10711
10712         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
10713         with global registers.
10714         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
10715
10716         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
10717
10718 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
10719
10720         * debug-mini.c (encode_value): Fix off-by-one.
10721
10722         * aot.c (encode_value): Likewise.
10723
10724         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
10725
10726 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
10727
10728         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
10729         AOT.
10730
10731         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
10732         
10733         * aot.c (emit_method_info): Increase size of temp buffer.
10734
10735         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
10736         the AOT case.
10737
10738 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
10739
10740         * aot.c (emit_method_info): Fix build.
10741         
10742         * aot.c: Further rework of the AOT file format to reduce the size of
10743         the method info data.
10744
10745         * mini.h: Bump AOT file format version.
10746
10747 2004-12-27  Martin Baulig  <martin@ximian.com>
10748
10749         * mini.c (mini_get_method): New static method; call
10750         mono_get_method_full() and mono_get_inflated_method().
10751         (mono_method_to_ir): Use mini_get_method() instead of
10752         mono_get_method_full(). 
10753
10754 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
10755
10756         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
10757
10758 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
10759
10760         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
10761
10762         * inssel-amd64.brg: Add some optimization rules.
10763
10764 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
10765
10766         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
10767         standard not GC'd stuff is fine.
10768
10769 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
10770
10771         * aot.c: Rework the AOT file format to get rid of most of the global
10772         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
10773
10774         * mini.h: Bump AOT file format version.
10775         
10776 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
10777
10778         * mini.h: Bump AOT file format version.
10779
10780         * aot.c (mono_aot_is_got_entry): New function to determine if an 
10781         address is inside a GOT.
10782
10783         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
10784
10785         * cpu-pentium.md: Increase the maximum size of some instructions which
10786         might involve a got access.
10787         
10788         * mini.c (get_method_from_ip): Another debug helper function.
10789
10790         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
10791         when got var accesses are created during the decompose phase.
10792
10793         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
10794
10795         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
10796         argument mini_compile_method and to MonoCompile, and use this to
10797         determine whenever a given method is compiled for AOT. This allows the
10798         other methods compiled during AOT compilation to be free of AOT stuff,
10799         so the backends does not need to add special support for them by
10800         creating a fake GOT etc.
10801
10802         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
10803         longer needed.
10804
10805 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
10806
10807         * mini.c (mono_method_to_ir): It turns out that some of the
10808         x-appdomain wrappers are lax with types, so just ignore this for
10809         all wrappers.
10810
10811         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
10812         at the vtable->klass. If it is non-shared code we can just use the
10813         vtable.
10814
10815 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
10816
10817         * mini-ppc.c: access MonoDomain from tls, too.
10818
10819 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
10820
10821         * declsec.c: Removed unused variable (and related warning ;-)
10822
10823 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
10824
10825         * iltests.il: New test for LDELEMA on an array of ref types.
10826
10827         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
10828         all ldelema's on reftypes.
10829         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
10830         it was the wrong place to put it.
10831
10832         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
10833         register to pop to make this cleaner, at the request of Paolo.
10834
10835 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
10836
10837         * mini-ops.h (OP_GETHASHCODE): New op.
10838
10839         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
10840
10841         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
10842         operation.
10843
10844         For a microbenchmark, this reduces the cost of Hashtable.get_Item
10845         by 25%.
10846         
10847         * mini-x86.c (mono_arch_output_basic_block): Rather than
10848
10849         add ebp, 4
10850
10851         Emit
10852
10853         pop edx
10854
10855         The first is 3 bytes while the second is 1. This saves 36 kb on
10856         mscorlib, quite a big saving. When bootstraping mcs, I was able to
10857         see a small boost because of icache locality.
10858
10859         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
10860
10861 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
10862
10863         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
10864         started code sharing with the generic code.
10865
10866 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
10867
10868         * mini-ppc.c, cpu-g4.md: added code for direct access to
10869         tls data slots.
10870
10871 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
10872
10873         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
10874          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
10875         to OP_TLS_GET.
10876
10877 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
10878
10879         * declsec.c|h: Added functions to cache the declarative stack modifiers
10880         in MonoJitInfo and to create a security frame from a MonoJitInfo 
10881         structure.
10882         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
10883         created. Register internal calls for System.Security.SecurityFrame::
10884         _GetSecurityFrame and _GetSecurityStack.
10885         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
10886         the definitions for the new stack walk/callback mechanism.
10887         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
10888         first security frame for LinkDemands and InheritanceDemands) and
10889         GetSecurityStack for Demands. Both use the new mono_walk_stack code
10890         from lupus.
10891         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
10892         walk initialization (lupus).
10893
10894 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
10895
10896         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
10897         idiom.
10898         (handle_loaded_temps): Do not create a temporary variable for
10899         things that we know are temps. They will never be modified.
10900         (mono_spill_call): Set MONO_INST_IS_TEMP
10901         (mono_emulate_opcode): ditto
10902         (emit_tree): ditto
10903         (mono_method_to_ir.CEE_DUP): ditto
10904
10905 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
10906
10907         * mini.c (type_to_eval_stack_type): Make this handle the void type
10908         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
10909         (emit_tree): use ip_in_bb to special case some common idioms
10910         Update all callers to pass in the IP.
10911         (mono_method_to_ir): Make CEE_CALL* do the above as well.
10912
10913         This gives us a nice 2% speedup in mcs bootstrap.
10914
10915         * mini-x86.c (peephole_pass): Peephole pass to make
10916         mov  [foo], eax
10917         push [foo]
10918
10919         into
10920
10921         mov [foo], eax
10922         push eax
10923
10924         * mini.c (ip_in_bb): new method.
10925         (mono_method_to_ir): use this method rather than doing the hash
10926         lookup ourselves.
10927
10928         * linear-scan.c (mono_linear_scan): When expiring actives, you
10929         don't need to keep around variables that expire on this
10930         instruction. This makes it so that:
10931              a = b + 1
10932         will turn into:
10933              store (ebx add (ebx, 1))
10934         which will become
10935              add ebx, 1
10936
10937 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
10938
10939         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
10940         combination to avoid doing two copies. Fix up problems with previous
10941         patch.
10942
10943         * mini.c: Fix 64 bit warnings.
10944
10945         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
10946
10947 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
10948
10949         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
10950         changes from the x86 code.
10951
10952         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
10953
10954 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
10955
10956         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
10957         throwing code to reduce its size, unify the AOT and non-aot code and 
10958         get rid of relocations in the AOT case.
10959
10960         * mini-x86.h mini.c exceptions-x86.c 
10961         (mono_arch_get_throw_corlib_exception): New arch specific function to 
10962         raise corlib exceptions which doesn't require relocations in the 
10963         caller.
10964
10965         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
10966
10967 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
10968
10969         * mini.c (mono_emit_method_call): Only allocate the got var when it is
10970         needed.
10971
10972         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
10973         in the AOT case.
10974
10975 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
10976
10977         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
10978         with add function when used from Inc/dec atomic 
10979         functions. Re-enabled optimization on x86.
10980         * mini-ops.h: renamed atomic_add functions to
10981         allow _add to match the Interlocked::Add and
10982         _add_next to match Interlocked::Inc/Dec.
10983
10984 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
10985
10986         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
10987         linking of BBs to the end BB, and enabled SSAPRE also with
10988         consprop and copyprop (which was prevented by that bug).
10989
10990 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
10991
10992         * mini-x86.c: disabling the Interlocked optimizing code. 
10993
10994 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
10995
10996         * aot.c (load_aot_module): Move reading of got_addr after the AOT
10997         file version check.
10998         
10999 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
11000
11001         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
11002         interlocked optimization due lack of support on x86, rewrote 
11003         exchange to take into account that base may be in eax.
11004         
11005         xsp works again; activated Interlocked optimizing code.
11006         
11007 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
11008
11009         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
11010
11011 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
11012
11013         * mini-ops.h: Add new opcodes.
11014
11015         * mini.h: Add new patch types. Add got_var to MonoCompile.
11016
11017         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
11018         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
11019         make it work with all kinds of patchable code.
11020
11021         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
11022         address of the GOT, and referencing entries in the GOT.
11023
11024         * mini.c: Add code to load the GOT address if needed by an opcode.
11025
11026         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
11027         independent AOT code on the x86 using an elf-style Global Offset Table.
11028
11029 2004-12-14  Raja R Harinath  <rharinath@novell.com>
11030
11031         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
11032
11033 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11034
11035         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
11036         when running xsp.
11037
11038 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
11039
11040         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
11041         of Interlocked:Increment/Decrement/Add as inline ops.
11042         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
11043
11044 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
11045
11046         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
11047         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
11048
11049 2004-12-12  Duncan Mak  <duncan@ximian.com>
11050
11051         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
11052         again. `patch_info->table_size' is no longer valid after Zoltan's
11053         commit #37636.
11054
11055 2004-12-12  Martin Baulig  <martin@ximian.com>
11056
11057         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
11058         if we are the "real" method, ie. not an inlined method inside it.
11059
11060 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
11061
11062         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
11063         before we look in the special fields table. This fixes
11064         ../tests/thread-static-init.cs.
11065
11066 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11067
11068         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
11069         for Array get_Rank and get_Length. Fixes bug #70465.
11070
11071 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
11072
11073         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
11074         separate structure to reduce the size of MonoJumpInfo.
11075
11076 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
11077
11078         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
11079
11080 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
11081
11082         * mini.c (mini_get_inst_for_method): Changed to allow ports
11083         to return a MonoInst instead of opcode 
11084         (renamed mini_get_opcode_for_method to better reflect the new functionality)
11085         
11086         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
11087         Allow ports to return a created MonoInst instead of op-code, will enable
11088         new optimizations.
11089         (renamed mini_get_opcode_for_method to better reflected the functionality)
11090
11091 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
11092
11093         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
11094
11095 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
11096
11097         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
11098         Fixes #69985.
11099
11100 2004-12-08  Martin Baulig  <martin@ximian.com>
11101
11102         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
11103         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
11104
11105 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
11106
11107         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
11108         correctly.
11109
11110         * exceptions.cs: Disable some tests which depend on properties of x86 fp
11111         arithmetic.
11112
11113 2004-12-08  Raja R Harinath  <rharinath@novell.com>
11114
11115         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
11116
11117 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
11118
11119         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
11120         bug introduced by the previous patch.
11121
11122 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
11123
11124         * mini-ppc.c, objectc.cs: handle large structs passed by value
11125         (fixes bug #69972).
11126
11127 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
11128
11129         * mini-ppc.c: OP_ARGLIST implementation from
11130         Geoff Norton  <gnorton@customerdna.com>.
11131
11132 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
11133
11134         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
11135         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
11136
11137 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
11138
11139         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
11140
11141 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11142
11143         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
11144         support.
11145
11146 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
11147
11148         * mini-sparc.c: Zero out localled-ed memory.
11149
11150         * iltests.il: Add tests for zeroing out localloc-ed memory.
11151
11152 2004-12-04  Martin Baulig  <martin@ximian.com>
11153
11154         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
11155         mono_method_get_signature_full().       
11156
11157 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
11158
11159         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
11160         and some utility functions (always for SSAPRE), integrated SSAPRE.
11161         * mini.h: Likewise.
11162         * driver.c: Added ssapre option.
11163         * ssa.c: Small fix on OP_ARG handling.
11164         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
11165         * Makefile.am: Likewise.
11166
11167 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
11168
11169         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
11170         now in the xp code.
11171
11172         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
11173         icall.
11174
11175 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11176
11177         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
11178         
11179         * cpu-s390.md : Increase instruction length of oparglist.
11180
11181         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
11182
11183 2004-11-30  Martin Baulig  <martin@ximian.com>
11184
11185         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
11186         virtual generic methods.  We call a special helper_compile_generic_method()
11187         icall to retrieve the method from the vtable, inflate and compile
11188         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
11189
11190         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
11191
11192 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
11193
11194         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
11195
11196 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
11197
11198         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
11199         Fixes #69929.
11200
11201 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
11202
11203         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
11204         platforms with PIC aot.
11205
11206 2004-11-28  Martin Baulig  <martin@ximian.com>
11207
11208         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
11209         Fixes gen-112.cs.
11210
11211 2004-11-28  Martin Baulig  <martin@ximian.com>
11212
11213         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
11214         the result of mono_type_get_underlying_type() to check whether
11215         we're byref.
11216
11217 2004-11-26  Martin Baulig  <martin@ximian.com>
11218
11219         * mini.c
11220         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
11221         in the g_assert().
11222
11223 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
11224
11225         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
11226         the same way as the other arguments so they won't get clobbered.
11227
11228         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
11229         calls through R11 since it is clobbered by the trampoline code.
11230
11231 2004-11-26  Raja R Harinath  <rharinath@novell.com>
11232
11233         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
11234         pick up in-tree mscorlib.dll.
11235
11236 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
11237
11238         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
11239
11240         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
11241         runtime data/code are now stored in a table similar to the GOT in ELF. 
11242         This allows the code itself to be position independent.
11243
11244         * aot.c: Fix loading of referenced assemblies after the lazy assembly
11245         loading changes.
11246
11247         * aot.c: Attach ELF type (object/function) directives to all global
11248         symbols.
11249
11250         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
11251
11252         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
11253
11254         * mini-amd64.h: Turn on PIC AOT code.
11255
11256         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
11257         returning the offset within an OP_AOTCONST instruction where the GOT
11258         offset needs to be added.
11259
11260         * mini.h: Bump AOT file format version.
11261
11262 2004-11-25  Martin Baulig  <martin@ximian.com>
11263
11264         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
11265         uninflated generic methods.
11266
11267 2004-11-25  Martin Baulig  <martin@ximian.com>
11268
11269         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
11270
11271 2004-11-24  Martin Baulig  <martin@ximian.com>
11272
11273         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
11274         original klass (this only applies for generic instances).
11275
11276 2004-11-24  Martin Baulig  <martin@ximian.com>
11277
11278         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
11279         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
11280         that array).
11281
11282 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
11283
11284         * mini.c (mono_method_to_ir): Disable inlining for methods containing
11285         localloc. Fixes #69678.
11286
11287         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
11288         
11289 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
11290
11291         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
11292         used SSE registers on pinvoke calls. Fixes #69774.
11293
11294 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
11295
11296         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
11297         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
11298
11299 2004-11-23  Raja R Harinath  <rharinath@novell.com>
11300
11301         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
11302         Refer directly to the mcs/ tree.
11303
11304 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11305
11306         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
11307         Check if a trampoline for a synchronized method is required. 
11308
11309 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
11310
11311         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
11312         with localloc if needed. Throe arithmetric exception in
11313         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
11314         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
11315
11316 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
11317
11318         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
11319         types before switching on type.  Fixes #69622.
11320
11321 2004-11-19  Raja R Harinath  <rharinath@novell.com>
11322
11323         * Makefile.am (check-local): New.  Integrate into 'make check'.
11324         (MCS,RUNTIME): Define using in-tree mono and mcs.
11325         (ILASM): New.
11326         (%.exe): Use $(ILASM).
11327
11328 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
11329
11330         * mini-ppc.c: adjust initial prolog size (bug #69691).
11331
11332 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
11333
11334         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
11335         #69664.
11336
11337 2004-11-17  Raja R Harinath  <rharinath@novell.com>
11338
11339         * Makefile.am (clean-local): Rename from 'clean'.
11340
11341 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11342
11343         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
11344         to mono_arch_is_int_overflow. 
11345         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
11346         SIGFPE events.
11347
11348 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
11349
11350         * declsec.c|h: New files to support declarative security attributes.
11351         Added function to check if a method has (applicable) security.
11352         * mini.c|h: Add check for declarative security attributes in
11353         mono_method_check_inlining.
11354         * Makefile.am: Added declsec.c and declsec.h to the build.
11355
11356 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
11357
11358         * mini.c, mini.h: update to keep dynamic code info per-domain.
11359
11360 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
11361
11362         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
11363         (mini_init): Get rid of it from here too.
11364
11365 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
11366
11367         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
11368         implemented OP_RETHROW (patch by Geoff Norton
11369         <gnorton@customerdna.com>).
11370
11371 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
11372
11373         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
11374         between appdomains.  Fixes appdomain-unload on PPC.
11375
11376 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
11377
11378         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
11379         mini-exceptions.c: handle the new wrapper types.
11380         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
11381         token value as a MonoClass* when compiling a wrapper.
11382         mono_jit_create_remoting_trampoline now takes an additional
11383         MonoRemotingTarget parameter.
11384         
11385 2004-11-10  Martin Baulig  <martin@localhost>
11386
11387         * mini.c (mono_method_to_ir): Use `generic_container->context'
11388         rather than creating a new one.
11389
11390 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11391
11392         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
11393
11394         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
11395
11396 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
11397
11398         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
11399         the experimental aot cache stuff.
11400
11401 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
11402
11403         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
11404         mini-exceptions.c: update to exception clause structure changes.
11405
11406 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
11407
11408         * exceptions-x86.c (throw_exception): Fix warnings.
11409
11410         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
11411         for OP_RETHROW.
11412
11413 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
11414
11415         * exceptions-sparc.c (get_throw_exception): Really fix this.
11416
11417 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
11418
11419         * tramp-*.c: we no longer support icalls without wrappers, so
11420         a bit of code can be removed here
11421
11422 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
11423
11424         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
11425         patch.
11426
11427         * cpu-sparc.md: Add op_rethrow.
11428
11429         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
11430
11431         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
11432
11433         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
11434         * mini-ops.h: Add OP_RETHROW.
11435
11436         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
11437
11438         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
11439
11440 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
11441         
11442         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
11443         Makes the output much easier to read
11444
11445 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
11446
11447         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
11448         prevents another huge leak when compiling with ssa. Secondly, the
11449         performance of doing this rather than freeing the lists is much
11450         better. GList does a lock every time you allocate a list link,
11451         so that it can use a memory pool. So, it is better to just use
11452         a memory pool of our own.
11453         
11454         * ssa.c, linear-scan.c: replace g_list_remove_link with
11455         g_list_delete.  The remove one does not free the GList, so we were
11456         leaking memory. On -O=all --compile-all with corlib, this cut down
11457         3 MB of allocations.
11458
11459 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
11460
11461         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
11462
11463         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
11464
11465         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
11466         into a new function mono_create_jit_trampoline ().
11467
11468 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
11469
11470         * trace.c (get_spec): Allow tracing of classes without a namespace.
11471
11472 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
11473
11474         * mini.c: Fix pointer overwrite in mini_method_compile.
11475
11476 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
11477
11478         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
11479         The darwin ABI needs some special handling for 1 and 2 byte structs
11480         Lets use lbz/lhz instead of lwz everywhere.
11481         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
11482         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
11483         Use stb/sth for the former, and put the latter always on stack instead of in
11484         argument registers.
11485
11486 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
11487
11488         * trace.c (is_filenamechar): Add '_'.
11489
11490 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
11491
11492         * mini-s390.c: Fix prolog length to allow for large trace requirements.
11493
11494         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
11495
11496 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
11497
11498         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
11499         depends on libmonogc. Fixes #68805.
11500
11501 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
11502
11503         * mini.c (mono_jit_free_method): Provide extra information for
11504         this error.  Currently this leaks, but will be turned into a
11505         developer option in the future.
11506
11507 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
11508
11509         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
11510
11511 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
11512
11513         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
11514         boundary. Fixes reading of PATCH_INFO_R4 and R8.
11515         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
11516
11517 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
11518
11519         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
11520         trampolines for AOT code.
11521
11522 2004-10-22    <vargaz@freemail.hu>
11523
11524         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
11525         constructed types. Fixes #68136.
11526
11527 2004-10-21  Martin Baulig  <martin@ximian.com>
11528
11529         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
11530         if it returns true, unwind the stack to the call instruction.
11531
11532 2004-10-21    <vargaz@freemail.hu>
11533
11534         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
11535
11536         * mini.h: Bump AOT version number.
11537
11538         * objects.cs: Add another test for unbox trampolines.
11539
11540         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
11541         valuetype methods.
11542
11543 2004-10-20    <vargaz@freemail.hu>
11544
11545         * driver.c: Add SHARED to the set of optimizations tested.
11546
11547         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
11548
11549         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
11550         used by CEE_NEWARR.
11551
11552         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
11553
11554 2004-10-20  Martin Baulig  <martin@ximian.com>
11555
11556         * mini-exceptions.c (mono_handle_exception): Call
11557         mono_debugger_handle_exception() to tell the debugger about
11558         catch/finally clauses.
11559
11560 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
11561
11562         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
11563
11564         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
11565         #68447.
11566
11567 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
11568
11569         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
11570         methods as their native size, fixed bug #57543, #57545.
11571         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
11572         This saves a temporary register and mullw call down into 1 (minor perf
11573         increase for cases like sum = sum * 5;  This use to translate into:
11574             li r11,5
11575             mullw r28,r28,r11
11576         It now translates to
11577             mulli r28,r28,5
11578
11579 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
11580
11581         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
11582         #68388.
11583
11584 2004-10-11  Martin Baulig  <martin@ximian.com>
11585
11586         * mini.c (mono_method_to_ir): If we're a generic method, get the
11587         MonoGenericContainer from our MonoMethodNormal and create a
11588         MonoGenericContext from it.
11589
11590 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
11591
11592         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
11593
11594         * basic-long.cs: Add test for checked i8->i2 cast.
11595
11596 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11597
11598         * inssel-ppc.brg: added a couple of speedup rules.
11599
11600 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
11601
11602         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
11603         to speed up rebuilds.
11604
11605 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11606
11607         * mini-s390.c: Minor fix to OP_OR_IMM.
11608
11609 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
11610
11611         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
11612         better. Fixes appdomain-unload.exe on sparc.
11613
11614 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
11615
11616         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
11617         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
11618         see bug 67324.
11619
11620 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
11621
11622         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
11623
11624 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
11625
11626         * mini.c: Always generate a field read/write wrapper for members
11627         of the class MarshalByRefObject since the actual instance could
11628         be a CBO.
11629
11630 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
11631
11632         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
11633
11634 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
11635
11636         * driver.c mini.h trace.c: Move the setting of the main assembly into
11637         a separate function called mono_trace_set_assembly () and call it after
11638         actually loading the main assembly. Fixes #66872.
11639
11640 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
11641
11642         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
11643         using the code manager.
11644
11645 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
11646
11647         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
11648
11649 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
11650
11651         * cpu-amd64.md: Fix bug in previous patch.
11652         
11653         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
11654         #66650.
11655
11656 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
11657
11658         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
11659         mini-exceptions.c: updates for changed stack walk interface.
11660
11661 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11662
11663         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
11664
11665 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
11666
11667         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
11668
11669 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
11670
11671         * driver.c (mini_regression_list): Do not call mono_assembly_close 
11672         since assemblies can't be unloaded.
11673         
11674 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
11675
11676         * cpu-amd64.md: Fix more instruction lengths.
11677
11678         * cpu-amd64.md: Fix lengths of some instructions.
11679
11680 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
11681
11682         * inssel.brg: Make the array ldelema check aot friendly.
11683
11684 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
11685
11686         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
11687
11688         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
11689
11690 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
11691
11692         * mini-x86.c: Fix build.
11693
11694         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
11695         mono_type_get_underlying_type () helper function to simplify code.
11696         
11697 2004-09-09  Martin Baulig  <martin@ximian.com>
11698
11699         * mini-amd64.c: Don't access `type->data.klass' directly, call
11700         mono_class_from_mono_type() instead since the type may be a
11701         generic instance.
11702
11703 2004-09-09  Martin Baulig  <martin@ximian.com>
11704
11705         * mini-amd64.c (get_call_info): Fix support for generic instances.
11706         (add_valuetype): Use mono_class_from_mono_type() to get the class
11707         since we can be a generic instance.
11708
11709 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
11710
11711         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
11712
11713 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
11714
11715         * liveness.c: reset spill costs on each scan: bug 62107
11716
11717 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
11718
11719         * exceptions-sparc.c (mono_arch_find_jit_info): remove
11720         unnecessary line that doesn't compile
11721
11722 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
11723
11724         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
11725         trampolines, make them call an error function so people can fix their
11726         code.
11727
11728 2004-09-06  Martin Baulig  <martin@ximian.com>
11729
11730         * mini.c (mono_method_to_ir): When initializing locals, handle a
11731         generic instances like a valuetype if it's a valuetype and like a
11732         class if it's a class.
11733
11734 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
11735
11736         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
11737         stack. Fixes #64674.
11738
11739         * exceptions.cs: Add test for unwinding of call arguments.
11740
11741 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
11742
11743         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
11744         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
11745         set the carry/borrow flag). The sparc and s390 implementations
11746         can now use optimized versions (and simplify the code). ppc bugfixes.
11747
11748 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
11749
11750         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
11751
11752 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
11753
11754         * inssel-amd64.brg: Remove leftover 32 bit rule.
11755
11756         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
11757
11758 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
11759
11760         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
11761         mono_arch_find_jit_info functions into a new function. Fix a memory
11762         leak.
11763
11764         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
11765         refactored code.
11766         
11767 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
11768
11769         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
11770         as well.
11771         
11772         * exceptions.cs: Add array size tests.
11773
11774         * mini.c: Allocate a separate icall wrapper for each arity of 
11775         mono_array_new_va. Fixes #59509.
11776
11777         * exceptions.cs: Add testcase for 64578.
11778
11779         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
11780
11781         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
11782         
11783 2004-09-02  Martin Baulig  <martin@ximian.com>
11784
11785         * mini.c (mono_method_to_ir): When initializing the locals, call
11786         handle_initobj() on the generic instance itself, not its
11787         underlying type.
11788
11789 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
11790
11791         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
11792         MonoJitInfo for dynamic methods.
11793
11794         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
11795
11796         * mini.c: Add support for freeing JIT data for dynamic methods.
11797         
11798 2004-09-01  Martin Baulig  <martin@ximian.com>
11799
11800         * mini-x86.c (is_regsize_var): Added support for generic
11801         instances.
11802         (mono_arch_emit_prolog): Make this compile again, use
11803         `x86_push_imm_template (code)'.
11804
11805 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
11806
11807         * mini-x86.c: make all push_imm instructions that get
11808         patched always emit the long form
11809
11810 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
11811
11812         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
11813         in a per-domain hash.
11814
11815         * mini-amd64.c (merge_argument_class_from_type): Handle generic
11816         types.
11817
11818 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
11819
11820         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
11821         work.
11822         
11823         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
11824         work.
11825
11826         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
11827         Beginnings of SSE2 support.
11828
11829         * exceptions.cs: Add more tests for checked int<->uint casts.
11830
11831 2004-08-28  Martin Baulig  <martin@ximian.com>
11832
11833         * mini-x86.c (mono_arch_instrument_epilog): Added support for
11834         generic instances.
11835
11836         * mini.c
11837         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
11838         Handle generic instances recursively.
11839
11840 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
11841
11842         * iltests.il: test for conv.u8 on a constant
11843
11844 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
11845
11846         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
11847         LCONV_x4 (shrun_32 (membase)).
11848
11849 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
11850
11851         * inssel-x86.brg: c&p rules for push/setret of long
11852
11853 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
11854
11855         * inssel-x86.brg: c&p rules for compare (base, regvar) and
11856         compare (regvar, base)
11857
11858         * inssel-x86.brg: more burg love
11859
11860         * inssel.brg: more cleanup
11861
11862         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
11863
11864 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
11865
11866         * basic-long.cs, basic-calls.cs: new tests for optimization.
11867
11868 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
11869
11870         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
11871         patch.
11872
11873 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
11874
11875         * mini-amd64.c (read_tls_offset_from_method): Add another case.
11876         
11877 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
11878
11879         * inssel.brg (mini_emit_memcpy): use 
11880         NO_UNALIGNED_ACCESS to disable memcpy optimization
11881
11882 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
11883
11884         * mini-amd64.c: Handle generic types in various places.
11885
11886         * mini.c (mono_method_to_ir): Handle generic types in init locals.
11887
11888 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
11889
11890         * mini.c (handle_box): Fix warning.
11891
11892         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
11893
11894         * mini-amd64.h: Enable the emit_state optimization.
11895
11896         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
11897
11898         * mini-amd64.c: Add some new 64 bit peephole opts.
11899
11900         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
11901
11902         * cpu-amd64.md: sreg1 of div instructions must be %rax.
11903
11904         * mini-amd64.c: Register allocator fixes.
11905
11906         * mini.c: Add an optimization to emit_state to avoid allocation of new
11907         registers on some platforms.
11908
11909 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
11910
11911         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
11912
11913         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
11914         allocation. Fixes #63085.
11915
11916         * basic-long.cs: Add new regression test.
11917
11918         * mini-amd64.c: Register allocator improvements.
11919
11920 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
11921
11922         * mini-amd64.c (read_tls_offset_from_method): Add another code
11923         sequence.
11924
11925         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
11926         instruction sequence for nullifying class init trampolines.
11927
11928         * objects.cs: Add new regalloc test.
11929
11930         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
11931
11932 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
11933
11934         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
11935         
11936         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
11937         arguments.
11938
11939         * driver.c: Fix profiling after TLS changes.
11940         
11941         * driver.c (mono_main): Set mono_stats.enabled if needed.
11942
11943         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
11944         CEE_BOX.
11945
11946 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
11947
11948         * mini-x86.c: use a 1 op rather than a 2 op tls access
11949         instruction -> faster.
11950
11951 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
11952
11953         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
11954         x86 backend.
11955
11956 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
11957
11958         * exceptions-sparc.c (throw_exception): fix typo
11959
11960 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
11961
11962         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
11963         set tree->dreg correctly with tls. Allow any
11964         register to be used.
11965
11966         * mini-x86.c (read_tls_offset_from_method): add new code
11967         generation pattern seen with GCC.
11968
11969
11970 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
11971
11972         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
11973         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
11974         exceptions-sparc.c: fix some performance issues in exception
11975         handling and setting of the stack trace for exceptions that were
11976         already thrown.
11977
11978 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
11979
11980         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
11981         x86 backend.
11982         
11983         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
11984         registers.
11985
11986 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
11987
11988         This patch inlines tls access, when possible.
11989         
11990         * mini.h: new arch functions for TLS intrinsics.
11991         All platforms updated with a stub.
11992
11993         * mini.c: use the new intrinsics
11994
11995         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
11996         arch specific intrinsic for tls variables
11997
11998 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
11999
12000         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
12001         under windows.
12002
12003 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
12004
12005         * mini.c: thread local allocation
12006
12007 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
12008
12009         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
12010
12011         * Makefile.am: Link against the static version of libmonogc.
12012         
12013         * Makefile.am: Link the static versions of the convenience libraries
12014         into the mono executable.
12015
12016         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
12017
12018 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
12019
12020         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
12021         on integer overflow.
12022
12023         * mini-amd64.c: Reorganize function call code.
12024
12025         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
12026
12027 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
12028
12029         * inssel-x86.brg: use xor eax,eax.
12030         
12031         * basic.cs: new tests
12032
12033 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
12034
12035         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
12036         in exception throwing code.
12037         
12038 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
12039
12040         * inssel-x86.brg: use xor esi,esi.
12041
12042 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
12043
12044         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
12045         can trace methods compiled during mini_init () too.
12046
12047         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
12048         CEE_CONV_U4.
12049
12050 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
12051
12052         * Makefile.am: static link on x86 (r=zoltan)
12053
12054 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
12055
12056         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
12057         code since it causes some programs to fail.
12058
12059 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
12060
12061         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
12062
12063 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
12064
12065         * mini.c: ovfops_op_map - add STACK_OBJ case for
12066         CONV_I 
12067         * basic.cs: add test_0_pin_string as test
12068         case for above.
12069
12070 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
12071
12072         * Makefile.am: build C# if srcdir != builddir
12073
12074 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
12075
12076         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
12077         fall-through blocks.
12078
12079 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
12080
12081         * driver.c: enable loop by default again and include abcrem in -O=all.
12082
12083 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
12084
12085         * iltests.il: Add some localloc tests.
12086
12087         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
12088
12089         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
12090         Fixes #62574.
12091
12092         * inssel-amd64.brg: Add some optimizations.
12093
12094         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
12095         for gcc-3.4.
12096
12097         * Makefile.am: Statically link mono against libmono on AMD64.
12098         
12099         * mini-amd64.c inssel-amd64.brg: Optimizations.
12100
12101 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
12102
12103         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
12104
12105         * tramp-amd64.c: Patch calling code in trampolines.
12106
12107 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
12108
12109         * mini-amd64.c: pinvoke struct passing fixes.
12110
12111 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
12112
12113         * mini-sparc.c: redo change, make mono_arch_cpu_init call
12114         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
12115
12116 2004-08-05  Duncan Mak  <duncan@ximian.com>
12117
12118         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
12119         CEE_LDELEM_ANY.
12120
12121 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
12122
12123         * mini-amd64.c (emit_move_return_value): Move return value for normal
12124         calls too.
12125
12126 2004-08-05  Martin Baulig  <martin@ximian.com>
12127
12128         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
12129         `type->type'; just modify `type' itself when dealing with enums
12130         and generic instances.
12131         (check_call_signature): Make `simple_type' a `MonoType *'.
12132
12133 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
12134
12135         * mini.c: Use OP_PADD to add offsets to addresses.
12136
12137         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
12138
12139 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
12140
12141         * mini-sparc.c (mono_arch_emit_epilog): fix check
12142         for folding last op into restore instruction
12143
12144 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
12145
12146         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
12147         helper methods using the code manager.
12148         
12149         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
12150
12151         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
12152
12153 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12154         
12155         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
12156           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
12157
12158         * mini-s390.c: fix tail processing
12159
12160 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
12161
12162         * mini-ppc.c: mul.ovf.un exception name fix.
12163
12164 2004-08-03  Martin Baulig  <martin@ximian.com>
12165
12166         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
12167         instances; before jumping to `handle_enum', also modify `ptype'.
12168
12169 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
12170
12171         * cpu-sparc.md: fcall maximal length too small.
12172
12173 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
12174
12175         * mini-amd64.c mini.h: Add initial support for passing/returning 
12176         structures to/from pinvoked methods.
12177
12178 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
12179
12180         * mini-ppc.c: reg allocator fix.
12181
12182 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
12183
12184         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
12185
12186         * inssel.brg: Optimize memset on 64 bit machines.
12187
12188         * mini-amd64.c: Fix some vararg cases.
12189
12190 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12191
12192         * mini-s390.c: Corrected macro in emit_float_to_int
12193
12194         * s390-abi.cs: Tests to exercise the s390 ABI
12195
12196 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
12197
12198         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
12199         caller saved regs.
12200
12201         * basic.cs: Add a test for add.ovf.un.
12202
12203 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
12204
12205         * mini-sparc.c: add case for OP_IDIV_UN
12206
12207 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
12208
12209         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
12210         
12211         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
12212
12213 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
12214
12215         * basic.cs: regression tests.
12216
12217         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
12218         regressions.
12219
12220 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
12221
12222         * basic.cs: Add a new test.
12223
12224         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
12225         and AOT. Various fixes and optimizations.
12226
12227         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
12228
12229 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
12230
12231         * mini-ppc.c: make sure temp regs are not used for global reg
12232         allocation.
12233
12234 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
12235
12236         * cpu-sparc.md: conv_i8 fix for 64bits
12237
12238         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
12239
12240 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
12241         
12242         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
12243         add opcode for cmp BYTE PTR [eax], imm.
12244
12245         * inssel.brg: Make memcpy and memset takes bases.
12246
12247 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
12248
12249         * *-amd64.*: More AMD64 work.
12250         
12251 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
12252
12253         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
12254         add a compare-not-equal opcode.
12255         
12256 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
12257
12258         * mini.c: Use mono_init_from_assembly instead of mono_init.
12259         
12260 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
12261
12262         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
12263
12264         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
12265
12266         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
12267
12268         * inssel.brg: 64 bit fixes.
12269
12270         * mini.h (MonoCallInst): Add some AMD64 specific data.
12271
12272         * mini.h: Add some OP_P opcodes.
12273
12274 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
12275
12276         * basic.cs: tests for 61797 and 61740
12277
12278 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
12279
12280         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
12281         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
12282
12283 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
12284
12285         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
12286
12287         * *-amd64*.*: Ongoing AMD64 work.
12288
12289 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
12290
12291         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
12292
12293         * *-amd64*: Ongoing AMD64 work.
12294
12295         * mini-arch.h: Add AMD64 support.
12296
12297         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
12298
12299         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
12300
12301         * mini-ops.h: Add new opcodes.
12302
12303         * Makefile.am: Add AMD64 support.
12304
12305         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
12306         rules into the inssel-long*.brg files.
12307
12308         * *-amd64.*: Add beginnings of AMD64 backend.
12309
12310 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
12311
12312         * mini.c (print_dfn): commenting out the code that prints
12313         the cil. With -O=deadce, this makes -v -v crash.
12314         
12315         * cpu-pentium.md: make checkthis have a length of 2
12316
12317 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
12318
12319         * mini-sparc.h: fix implementations of __builtin
12320         functions for Sun compiler for V9.
12321
12322 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
12323
12324         * mini.c: use the new stelem.ref wrapper
12325         * exceptions.cs, arrays.cs: new stelem.ref tests
12326
12327 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
12328
12329         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
12330         new XSP should work with these changes).
12331
12332 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
12333         
12334         * inssel-{long32,x86,}.brg: trivial optimizations.
12335         
12336 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
12337
12338         * mini.c: load value when emitting box operation in
12339         constrained calls.
12340
12341 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
12342
12343         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
12344         is one byte shorter than cmp DWORD PTR [eax], 0.
12345
12346 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
12347
12348         * inssel-ppc.brg: arguments on the stack are always
12349         relative to the stack pointer (spotted by Neale Ferguson).
12350
12351 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12352
12353         * exceptions-x86.c: delay appending the method name to the trace until
12354         after mono_jit_info_table_find is called, as this gets the real
12355         MonoMethod.
12356
12357 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
12358
12359         * aot.c: register roots
12360
12361 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
12362
12363         * aot.c : I could just use PLATFORM_WIN32 flag.
12364
12365 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
12366
12367         * aot.c : Reverting the previous fix. This time it broke linux build.
12368
12369 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
12370
12371         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
12372
12373 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
12374
12375         * mini.c (handle_stack_args): Remove some more debugging code.
12376         
12377         * mini.c (handle_stack_args): Remove debug output left in by mistake.
12378
12379         * driver.c mini.h aot.c: Allow additional options to be specified with
12380         --aot and pass them to mono_compile_assembly.
12381
12382         * aot.c: Add experimental code to AOT compile all loaded assemblies
12383         on demand and save the code into a cache in the filesystem.
12384
12385         * aot.c: Add support for more wrapper methods.
12386         
12387         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
12388         58863.
12389
12390         * cpu-*.md: Remove removed opcodes.
12391
12392         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
12393         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
12394         related icalls to marshal.c.
12395
12396 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
12397
12398         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
12399
12400         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
12401
12402         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
12403
12404 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
12405         * liveness.c: If liveness is recomputated we need to reset the information
12406         for each variable. This way, if the liveness range has been narrowed
12407         by optimizations that happened after the last computation, we can return
12408         a smaller range.
12409         
12410         For example, if you have
12411         
12412         {
12413                 int i = 0;
12414                 
12415                 // Tons of code that does not affect i
12416                 
12417                 i = foo ();
12418                 ...
12419         }
12420         
12421         i = 0 is dead code and will be removed by SSA. However, when
12422         linear scan gets to the code, i will still appear to be live
12423         throughout the entire block. This prevents good register allocation.
12424
12425 2004-07-06  Martin Baulig  <martin@ximian.com>
12426
12427         * debug-mini.c (mono_debug_init_method): Allow
12428         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
12429         (mono_debug_add_icall_wrapper): New method.
12430
12431         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
12432
12433 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
12434
12435         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
12436         optimization.
12437
12438 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
12439
12440         * aot.c (mono_aot_load_method): Fix loading of debug info.
12441
12442 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
12443
12444         * aot.c: Add logging support.
12445
12446 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
12447
12448         * mini.h: Add prototype for mono_print_method_from_ip.
12449
12450         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
12451
12452         * inssel.brg: 64 bit fixes.
12453
12454         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
12455         inssel-long32.brg.
12456
12457         * Makefile.am: Add SPARC64 support.
12458
12459 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
12460
12461         * aot.c: Fix alignment problems on 32 bit platforms.
12462
12463 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
12464
12465         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
12466         SPARC64.
12467
12468         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
12469         problems.
12470
12471         * mini.h: Bump AOT file version. Some 64 bit fixes.
12472
12473 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
12474
12475         * inssel-sparc.brg: Add new rule to avoid register moves.
12476
12477         * inssel.brg: Add ldind_to_load_membase helper function.
12478
12479 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
12480
12481         * mini.c: OffsetToStringData intrinsic.
12482         
12483 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
12484
12485         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
12486
12487         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
12488         regression tests.
12489
12490         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
12491 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
12492
12493         * mini.c: reinstated mono_compile_get_interface_var()
12494         on x86, too, since the change breaks the Gtk# build there as well.
12495
12496 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12497
12498         * driver.c: remove loop from the default optimizations: it seems to
12499         interact badly with some of the other options (see bug #60613).
12500
12501 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
12502
12503         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
12504         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
12505
12506 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
12507
12508         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
12509         vararg-using methods.
12510
12511 2004-06-21  Martin Baulig  <martin@ximian.com>
12512
12513         * mini/mini-exceptions.c
12514         (mono_handle_exception): Added `gpointer original_ip' argument.
12515         After calling mono_unhandled_exception(), call
12516         mono_debugger_unhandled_exception() and if that returns true,
12517         restore the context and return.
12518
12519 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
12520
12521         * mini-ppc.c: prefer the use of relative branches so
12522         they won't need to be patched in aot code (patch from Patrick Beard).
12523
12524 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
12525
12526         * aot.c: patch from Patrick Beard to make the output assembly
12527         more correct for the MacOSX assembler. Small tweak to
12528         generate sane images on Linux/PPC, too.
12529
12530 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12531
12532         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
12533         case until bug #59509 is fixed (shows up in #60332).
12534
12535 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12536
12537         * mini.c: make sure the needed wrappers are compiled, too, with
12538         precomp.
12539
12540 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
12541
12542         * driver.c: remove NPTL reference in --version output.
12543
12544 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12545
12546         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
12547         generate valid assembly for the Mach-O assembler.
12548
12549 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
12550
12551         * driver.c: don't include abcrem in the all optimization specifier
12552         since it slows down jit compilation too much for now.
12553
12554 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
12555
12556         * mini.c: use BIGMUL only if both operands have the same signage.
12557         * iltests.il: Test for bug 60056. (errors related to signage in
12558         BIGMUL).
12559
12560         r=lupus.
12561
12562 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
12563
12564         * mini.c, aot.c: memory leak fixes.
12565
12566 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
12567
12568         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
12569
12570 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
12571
12572         * Makefile.am: remove the -static hack completely, it links in
12573         statically glib as well.
12574
12575 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
12576
12577         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
12578         * exceptions.cs: make it compile with new mcs/csc.
12579
12580 2004-06-03 Massimiliano Mantione <massi@ximian.com>
12581         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
12582         and added relevant test case.
12583
12584 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
12585
12586         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
12587         regressions in gtk-sharp.
12588
12589 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
12590
12591         * exceptions.cs: New regression tests.
12592
12593         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
12594
12595 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
12596
12597         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
12598
12599 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
12600
12601         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
12602
12603         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
12604
12605 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
12606
12607         * mini.c (mono_jit_runtime_invoke): Init class in this
12608         method instead of trusting mono_jit_compile_method to
12609         do the work (because wrappers can be in object class)
12610
12611 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
12612
12613         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
12614
12615         * basic-long.cs: New regression test.
12616
12617 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
12618
12619         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
12620         and div/rem checks.
12621
12622 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
12623
12624         * Makefile.am: fix miguel's change to build mono statically against
12625         libmono (track build dependencies).
12626
12627 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
12628
12629         * cfold.c: Some glib versions do not have G_MININT32.
12630
12631 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
12632
12633         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
12634         with precision of tan, atan, sin and cos, and implemented related
12635         regressions tests (fixes bug 54467, but one new problem appeared and
12636         is not fixed yet).
12637
12638 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
12639
12640         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
12641
12642         * exceptions.cs: Add test for constant folding && division by zero.
12643
12644         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
12645         since driver.c is in libmono too, so the optimization was useless.
12646
12647         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
12648         variable to driver.c so the compiler can emit more efficient code to
12649         access them.
12650
12651 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12652
12653         * Makefile.am: don't distribute generated inssel.[ch] files.
12654
12655 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
12656
12657         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
12658         into the default appdomain. Fixes #58707.
12659
12660         * jit-icalls.c: Remove the broken approximation for truncl, doing
12661         no conversion is better.
12662
12663         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
12664         Fixes #58863.
12665
12666 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
12667
12668         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
12669         of the mcrxr instruction which is not available on some processors
12670         even if it's documented to be. Implement add and sub overflow correctly
12671         (still not complete for long unsigned). Speed up icalls a bit.
12672
12673 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
12674
12675         * mini.c (mono_jit_compile_method_with_opt): Make sure that
12676         we run .cctor in the current domain instead of target_domain.
12677         
12678         Fixes bug #58558, .cctor not being called in -O=shared.
12679
12680 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
12681
12682         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
12683
12684 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
12685
12686         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
12687         which can be done with an imm8, do it that way.
12688         (mono_arch_output_basic_block): ditto for a jmp
12689         (mono_arch_emit_prolog): Computate maximum offset of a label.
12690
12691 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
12692
12693         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
12694         now tries to allocate prefered physical reg's for virtual
12695         regs. This reduces the number of emited spills/loads with
12696         20-30% on our core assemblies.
12697
12698 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12699
12700         * jit-icalls.c: truncl() is not needed and trunc() is
12701         the correct thing to do anyway (bug #58287).
12702
12703 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
12704
12705         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
12706         if available.
12707
12708 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
12709
12710         * driver.c: enable loop optimizations by default.
12711
12712 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
12713
12714         * mini-x86.c: fix calc of max loop size when aligning loops start.
12715
12716 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
12717
12718         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
12719         the stack.
12720
12721 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
12722
12723         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
12724         should set carry.
12725
12726         * basic-long.cs: Add tests for add/subtract of immediates with carry.
12727
12728         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
12729         
12730         * mini.c (inline_method): Allways inline some wrappers even if the cost
12731         is too large. Fixes #58785.
12732
12733         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
12734         
12735 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
12736
12737         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
12738         (crichton@gimp.org). Beginning of support for sparc/linux.
12739
12740         * mini-sparc.c: Optimize retrieval of LMF address.
12741
12742 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
12743
12744         * exceptions-ppc.c:  handle alloca in methods with clauses.
12745
12746 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
12747
12748         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
12749
12750 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
12751
12752         * mini.c: Delegate most of the abort signal work to 
12753           mono_thread_request_interruption, which also handles Stop and Suspend
12754           states.
12755
12756 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
12757
12758         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
12759         supports the save/restore lmf opcodes.
12760
12761 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
12762
12763         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
12764         by gcc-3.4 as well.
12765
12766         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
12767
12768 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
12769
12770         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
12771         methods which contain array accesses.
12772
12773         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
12774         boundaries. Fixes #58537.
12775
12776         * iltests.il: Add regression test for #58537.
12777
12778 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
12779
12780         * mini-x86.c (mono_arch_local_regalloc): Last part of
12781         fix for bug #58633 (releasing register to early).
12782
12783 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
12784
12785         * basic-long.cs: Add new regression test.
12786
12787 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
12788
12789         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
12790         register too early on the chain.
12791
12792 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
12793
12794         * mini.c (create_helper_signature): Use a helper function to reduce
12795         the code which needs to be written. Also set the calling convention of
12796         icalls on windows. Fixes #57840.
12797
12798 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
12799
12800         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
12801         exceptions-ppc.c: added helper function to get the instruction address
12802         from a signal handler context.
12803
12804 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
12805
12806         * helpers.c: use g_get_tmp_dir. Invokes happyness 
12807         from gonzalo.
12808
12809 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
12810
12811         * helpers.c: Add new env variable to pass args to objdump.
12812         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
12813
12814 2004-05-17  Radek Doulik  <rodo@ximian.com>
12815
12816         * Makefile.am (common_sources): added abcremoval.h so it get
12817         disted and daily mono packages on go-mono.com will build again
12818
12819 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
12820
12821         * abcremoval.c: Fixed coding style, added copyright header.
12822
12823         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
12824
12825         * mini.h: Added prototype for abc removal main function.
12826
12827         * build_relations_propagation_table.pl: Added copyright header.
12828
12829 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
12830
12831         * basic-long.cs: reg test for complex ceq_long bug.
12832
12833 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
12834
12835         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
12836         reg in long and clob case (bug #58343). Fixed/added comments.
12837
12838 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
12839
12840         * mini.c (mono_jit_runtime_invoke): Follow new convention
12841         of calling the invoke method with an function pointer.
12842
12843 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
12844
12845         * ChangeLog: Fix author of memory leak patch.
12846
12847 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
12848
12849         * Makefile.am: fix make dist as well...
12850
12851
12852 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
12853
12854         * cfold.c: Made so that conversions from pointer to int4 are no-ops
12855         on archs where pointers are 4 bytes long.
12856
12857         * Makefile.am: Added abcremoval.c source file.
12858
12859         * abcremoval.c: Added abcremoval.c.
12860
12861         * abcremoval.h: Added abcremoval.h.
12862
12863         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
12864
12865         * inssel.brg: Enabled bounds check removal.
12866
12867         * mini.c: Added support for abcrem optimization.
12868
12869         * mini.h: Added abcrem optimization label.
12870
12871         * driver.c: Added support for abcrem optimization.
12872
12873         * propagated_relations_table.def: Added propagated_relations_table.def.
12874
12875 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
12876
12877         * mini.c, cfold.c: fix style.
12878
12879 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
12880
12881         * mini.c: handle issue with the low-level implementation of
12882         some long opcodes (bug #54209).
12883
12884 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
12885
12886         * basic.cs: test for my new cmov stuff.
12887
12888 2004-05-13      Patrik Torstensson
12889
12890         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
12891         opt and added peephole documentation.
12892
12893 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
12894
12895         * tramp-ppc.c: rewrote the generic trampoline code.
12896
12897 2004-05-11      Patrik Torstensson
12898
12899         * mini-x86.c: optimize long shl/shr asm code (one less branch)
12900
12901 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
12902
12903         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
12904
12905         * mini.h mini.c dominators.c: Applied patch from Derek Woo
12906         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
12907
12908         * mini.c: Add new icalls for AsAny marshalling.
12909
12910 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
12911
12912         * tramp-ppc.c, mini-ppc.c: more cleanups.
12913
12914 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
12915
12916         * mini.c: no warnings.
12917
12918 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12919
12920         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
12921
12922 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
12923
12924         * mini.c: In the thread abort signal handler, if the thread is in the
12925         process of being stoped, don't throw the Abort exception, just stop the
12926         thread.
12927
12928 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
12929
12930         * tramp-ppc.c: removed old code.
12931
12932 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12933
12934         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
12935         do some simple speed optimizations on ppc.
12936
12937 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
12938
12939         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
12940         and large offsets in load/store.
12941
12942 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
12943
12944         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
12945         it causes regressions.
12946
12947 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
12948
12949         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
12950         support.
12951
12952 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
12953
12954         * jit-icalls.c: remove warnings.
12955         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
12956         speedups for unsafe code.
12957
12958 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
12959
12960         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
12961
12962 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
12963
12964         * basic-calls.cs: Add new regression test.
12965
12966         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
12967         more portable.
12968
12969         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
12970
12971         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
12972         is no longer used.
12973
12974 2004-05-06      Patrik Torstensson
12975
12976         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
12977         long reg allocation in any reg (not only eax:edx) and implemented 
12978         long shl/shr ops in asm instead of helpers.
12979
12980 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
12981
12982         * mini-sparc.h: Fix warnings.
12983
12984         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
12985         stack.
12986
12987         * mini-exceptions.c (mono_handle_exception): Call the filter in a
12988         separate statement for clarity.
12989
12990         * mini-sparc.c: Update status.
12991
12992 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
12993
12994         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
12995         here.
12996
12997 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12998
12999         * inssel-ppc.brg: another small pre-release workaround:
13000         we don't do overflow detection for long_sub_un.
13001
13002 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13003
13004         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
13005         (also works around a weird ppc bug: 57957).
13006
13007 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
13008
13009         * tramp-ppc.c: trampoline fixes.
13010
13011 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
13012
13013         * mini-ppc.c: fixed typos.
13014
13015 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
13016
13017         * mini-ppc.c, exceptions-ppc.c: more code saves registers
13018         at the top of the stack. Fixed typos. Use a frame registers
13019         for all the methods with exception clauses.
13020
13021 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
13022
13023         * exceptions-ppc.c: restore fp registers.
13024
13025 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
13026
13027         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
13028         order from the stack top (moved the stack room to save the
13029         return value for trace after the param area). Fixed corruption
13030         in restoring registers on unwind.
13031
13032 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
13033
13034         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
13035
13036 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13037
13038         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
13039         and prolog/epilog for methods that use it. Allow
13040         enough param area room for varargs methods. Fix miguel's
13041         breakage in exception handling.
13042
13043 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13044
13045         * Makefile.am: run genmdesc only on current arch.
13046
13047 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13048
13049         * exceptions-x86.c:
13050         * mini-x86.h: fix the build on windows.
13051
13052 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
13053
13054         * 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.
13055
13056         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
13057
13058         * mini-exceptions.c: New file.
13059         
13060         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
13061         Move some parts of the x86 exception handling code to an 
13062         arch-independent file so it can be shared with other ports.
13063
13064 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
13065
13066         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
13067
13068 2004-04-26  David Waite  <mass@akuma.org>
13069
13070         * driver.c: remove comma from end of enumeration declaration
13071
13072 2004-04-26  Jackson Harper  <jackson@ximian.com>
13073
13074         * driver.c: parse config file before loading first assembly. This
13075         allows the user gac to be enabled/disabled. 
13076         
13077 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
13078
13079         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
13080         simpler mechanism: we do not care what is encoded initially
13081         (branch absolute or relative), we care about the code and its
13082         target.  I kept the old code for reference for now.
13083
13084         The new code tries first to determine if the jump is anywhere in
13085         the -/+32 absolute meg range, if it succeeds, it encodes using the
13086         absolute branch;  If not, it tried to find something in the
13087         relative range, if not, it uses the handle_thunk code. 
13088
13089 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
13090
13091         * exceptions-ppc.c: use the correct ip register on macosx.
13092
13093 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
13094
13095         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
13096
13097 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
13098
13099         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
13100         Raise exception on integer divide by zero by hand since the hw
13101         doesn't support it. Handle NaNs in FP compares.
13102
13103 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
13104
13105         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
13106         code reducing duplication between the platforms and enabled
13107         signal exception handling (on linux for now).
13108
13109 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
13110
13111         * exceptions-ppc.c: more macosx support.
13112
13113 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13114
13115         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
13116
13117 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
13118
13119         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
13120
13121 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
13122
13123         * iltests.il: more tests.
13124
13125 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
13126
13127         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
13128         vars as well.
13129
13130 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
13131
13132         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
13133
13134 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
13135
13136         * liveness.c: Mark variables as volatile in all basic blocks reachable
13137         from exception clauses.
13138
13139 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
13140
13141         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
13142         inlining.
13143
13144 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
13145
13146         * iltests.il, basic.cs: more tests for regalloc.
13147
13148 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13149
13150         * iltests.il: Some tests for register allocation modifications
13151         I have locally.
13152
13153 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
13154
13155         * exceptions.cs: Add regression test for bug #56782.
13156
13157         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
13158         original stack trace if an exception is rethrown. Fixes #56782. Oh,
13159         the beauty of fixing the same thing in 5 different files...
13160
13161 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
13162
13163         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
13164         methods.
13165
13166 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
13167
13168         * mini.c: Add support for STRWLPARRAY marshalling convention.
13169
13170 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
13171
13172         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
13173         to init the context to setup the regs pointer).
13174
13175 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
13176
13177         * exceptions-ppc.c: more exceptions work.
13178
13179 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13180
13181         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
13182         not allowed.
13183
13184 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
13185
13186         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
13187         can use the memory directly.
13188
13189         * cpu-pentium.md: Update documentation from a post from Zoltan. 
13190
13191         add x86_add_membase, x86_sub_membase, x86_mul_membase
13192
13193 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
13194
13195         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
13196         GENERAL_REGS they were also hardcoded for all PPC ports.
13197
13198         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
13199
13200         Remove hard-coded limit for floating point registers, use
13201         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
13202
13203         Notice that in MacOS X calling conventions you can fit a lot more
13204         floating point values in registers, so I should update the PInvoke
13205         test to excercise the passing of floating point values on the
13206         stack (currently broken).
13207         
13208 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
13209
13210         * tramp-ppc.c (create_trampoline_code): Added
13211         JUMP_TRAMPOLINE_SIZE. 
13212         (ppc_magic_trampoline): Follow the pattern from
13213         x86_magic_trampoline: if code is set to zero, return. 
13214         (create_trampoline_code): Always pass MonoMethod to the jump
13215         trampoline, before it was passing a null.
13216         (mono_arch_create_jump_trampoline): Implement the jump stub, could
13217         share the code with mono_arch_create_jit_trampoline. 
13218
13219         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
13220         implemented.
13221         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
13222         implemented.  
13223
13224         * cpu-g4.md: Added length for jmp instruction, the worst case
13225         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
13226         for save_lmf).
13227
13228 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
13229
13230         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
13231
13232 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
13233
13234         * mini.c: Only set bblock->real_offset when adding a new bblock, and
13235         before each IL instruction.
13236
13237         * mini.c (CEE_BOX): Fix warnings.
13238
13239 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13240
13241         * mini.c: removed a few unused vars and extra whitespace.
13242
13243 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
13244
13245         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
13246         checks.
13247         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
13248         index.
13249         (OP_GETCHR): use the above
13250         (CEE_LDELEMA): use the above.
13251
13252         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
13253         version of the generic impl.
13254         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
13255         (CEE_LDELEMA): use the above.
13256
13257 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
13258
13259         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
13260         Fixes #56317.
13261
13262         * iltests.il: Added new regression test for #56317.
13263
13264 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
13265
13266         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
13267         under NetBSD. Fixes #56450.
13268
13269         * liveness.c (update_gen_kill_set): Fix previous patch.
13270
13271 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13272
13273         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
13274
13275 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
13276
13277         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
13278         ldsfld and ldsflda.
13279
13280         * inssel-sparc.brg: Add more optimizations.
13281
13282         * mini-sparc.c: Replace multiply/divide with shifts if possible.
13283
13284 2004-04-01  Martin Baulig  <martin@ximian.com>
13285
13286         * mini.c (handle_box): New static function; moved the
13287         implementation of CEE_BOX here.
13288         (mono_method_to_ir): Added `constrained_call' variable.
13289         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
13290         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
13291         mono_method_get_constrained() to get the method.
13292
13293 2004-04-01  Martin Baulig  <martin@ximian.com>
13294
13295         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
13296         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
13297         (mono_method_to_ir): We don't need these macros anymore since
13298         mono_class_get_full() already takes care of it. 
13299
13300 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13301
13302         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
13303         use @function (as doesn't accept #function here) and check the return
13304         value of system and stop if fails.
13305
13306 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13307
13308         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
13309
13310 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
13311
13312         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
13313
13314         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
13315
13316         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
13317         #56223.
13318
13319         * basic-long.cs: Add test for negation of Int64.MinValue.
13320
13321 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
13322
13323         * mini-sparc.c: Update status.
13324
13325         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
13326
13327         * exceptions-sparc.c: Fix return value in filters.
13328
13329         * inssel-sparc.brg: Fix register allocation in some rules.
13330
13331 2004-03-28  Martin Baulig  <martin@ximian.com>
13332
13333         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
13334         if neccessary.  
13335
13336 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
13337
13338         * mini-x86.c (mono_arch_patch_code): Fix warnings.
13339         
13340         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
13341         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
13342         remove unused conv_u4 opcode.
13343
13344         * mini-x86.c: Remove valgrind workaround since it slows down things
13345         even when mono is not run under valgrind.
13346
13347 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
13348
13349         * mini-sparc.c: Update status.
13350
13351         * inssel-sparc.brg: Add some optimizations.
13352
13353         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
13354         future delay slot filling. Add support for varargs, tail calls and JMP.
13355
13356         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
13357         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
13358
13359         * inssel.brg: Fix register allocation in OP_ARGLIST.
13360
13361         * inssel.brg: Fix warnings.
13362
13363 2004-03-25  Martin Baulig  <martin@ximian.com>
13364
13365         * mini.c (inflate_generic_field): Removed.
13366         (mini_get_method): Removed, use mono_get_method_full(),
13367         (mini_get_class): Removed, use mono_class_get_full().
13368         (mono_method_to_ir): Pass our generic context to
13369         mono_field_from_token().        
13370
13371 2004-03-25  Martin Baulig  <martin@ximian.com>
13372
13373         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
13374         of a `MonoMethod *'.
13375         (mini_get_method): Take a `MonoGenericContext *' instead
13376         of a `MonoMethod *'.
13377         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
13378         a new local variable called `generic_context' which holds the
13379         current `MonoGenericContext *'; use it to lookup things.
13380
13381 2004-03-24  Martin Baulig  <martin@ximian.com>
13382
13383         * mini.c (mini_get_class): New static method; if we're inside a
13384         generic instance, inflate the class if neccessary.
13385         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
13386
13387 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
13388
13389         * iltests.il: New regression test for #55976.
13390
13391         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
13392         #55976.
13393
13394 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
13395
13396         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
13397         output.
13398
13399 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
13400
13401         * liveness.c: Consider SSA stores as well as loads when making vars
13402         volatile.
13403
13404         * exceptions.cs: New regression tests for register allocation.
13405         
13406 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
13407
13408         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
13409         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
13410           domain lock only to protect puntual access to data structures.
13411           Added access lock for sighash, jit_icall_hash_name, 
13412           jit_icall_hash_addr and domain->code_mp.
13413
13414 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
13415
13416         * driver.c: Print SIGSEGV handling method.
13417
13418         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
13419
13420         * mini.c (setup_jit_tls_data): Handle case when this is called
13421         multiple times for a thread.
13422
13423         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
13424         is different from fbxx_un. Fixes #54303. Also use constants instead of
13425         magic numbers in a lot of places.
13426
13427 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
13428
13429         * exceptions.cs: Fix cctor test when --regression is used.
13430
13431 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
13432
13433         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
13434         for Linux/ppc.
13435
13436 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
13437
13438         * inssel-ppc.brg: fixed register assignments for some rules.
13439
13440 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
13441
13442         * exceptions.cs: Add test for exceptions in static constructors.
13443
13444         * mini.c (mono_jit_compile_method_with_out): Move the calling of
13445         static constructors outside the domain lock. Fixes #55720.
13446
13447 2004-03-17  Martin Baulig  <martin@ximian.com>
13448
13449         * mini.c (get_generic_field_inst): Removed, this'll never happen.
13450         (inflate_generic_field): Take the `MonoMethod *' instead of the
13451         `MonoClass *' and added support for generic method.
13452         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
13453         have a `field->parent->gen_params', only inflate the field if it's
13454         an open constructed type.
13455
13456 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
13457
13458         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
13459         exception object instead of the preconstructed ones.
13460
13461 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13462
13463         * mini.c: reverted changed to sigsegv_signal_handler commited
13464         accidentally in the previous patch.
13465
13466 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
13467
13468         * mini.c:
13469         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
13470         running --aot with an old assembly.
13471
13472 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
13473
13474         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
13475         point values.
13476
13477         * mini-sparc.c: Add support for v9 branches with prediction.
13478
13479 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
13480
13481         * mini.c (mini_init): #warning is GNUC only
13482
13483         * mini-sparc.h: implement __builtin_frame_address
13484         and __builtin_return_address for Sun C compiler
13485
13486 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
13487
13488         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
13489
13490 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
13491
13492         * basic-calls.cs: Add test for unaligned byref long argument passing.
13493
13494         * mini-ops.h: Add sparcv9 compare and branch instructions.
13495
13496         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
13497         v9 instructions if we have a v9 cpu.
13498
13499         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
13500         registers for global allocation.
13501
13502         * exceptions-sparc.c: Fixes.
13503         
13504 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
13505
13506         * liveness.c (mono_analyze_liveness): Optimized version.
13507
13508         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
13509
13510         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
13511         sparc work.
13512
13513         * basic-float.cs basic-calls.cs: New regression tests.
13514
13515 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
13516
13517         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
13518         sigaltstack implementation.
13519
13520         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
13521         
13522         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
13523         stuff if SIGSEGV_ON_ALTSTACK is not defined.
13524
13525 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
13526
13527         * mini.c: Fix warnings.
13528         
13529         * mini.c (mono_resolve_patch_target): New function which contains the
13530         arch independent part of the patching process.
13531
13532         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
13533         patching code to a separate function.
13534
13535 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
13536
13537         * mini.c (add_signal_handler): ifdef out on Windows
13538
13539 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
13540
13541         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
13542         cpu-sparc.md: Add exception handling support + other fixes.
13543
13544         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
13545         typed GC detection in --version.
13546
13547         * basic.cs exceptions.cs: New regression tests.
13548
13549         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
13550         the arch specific code can store data during a compilation.
13551
13552         * mini-ops.h: Add OP_SETFRET.
13553
13554         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
13555         function, register a separate icall for each arity, so the icalls can
13556         get a wrapper.
13557         
13558         * mini.c (mono_print_tree): Print negative offsets in a more readable
13559         form.
13560         
13561         * mini.c: Make signal handling work on sparc.
13562         
13563         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
13564
13565         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
13566
13567         * jit-icalls.c: Emulate truncl by aintl on solaris.
13568
13569         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
13570
13571 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
13572
13573         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
13574
13575 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
13576
13577         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
13578         a MarshalByRef type, inline a method that performs the check, taking into
13579         account that the object can be a proxy. Also implemented tow new opcodes:
13580         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
13581         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
13582         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
13583
13584 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
13585
13586         * mini-ppc.c: if a relative branch displacement is too big
13587         but it points to and area reachable with an absolute branch, 
13588         avoid the thunks.
13589
13590 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
13591
13592         * mini.c: optimize small copies in cpblk.
13593
13594 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
13595
13596         * basic-calls.cs basic-float.cs: New regression tests.
13597
13598         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
13599         negative offsets from %fp. Implement localloc. Fix local register 
13600         allocation. Fix the case when the this argument needs to be saved to
13601         the stack. Implement some missing opcodes.
13602
13603 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
13604
13605         * mini.c (mini_method_compile): Reenable global regalloc in methods
13606         with exception handlers.
13607
13608         * linear-scan.c (mono_varlist_sort): Fix warning.
13609
13610         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
13611
13612         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
13613         regalloc costs.
13614
13615         * liveness.c: Make all variables uses in exception clauses volatile, to
13616         prevent them from being allocated to registers. Fixes #42136.
13617
13618 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
13619
13620         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
13621         causes regressions.
13622
13623         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
13624         argument to mono_arch_regalloc_cost.
13625
13626         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
13627         precisely.
13628
13629 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
13630
13631         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
13632         Make the cost of allocating a variable to a register arch dependent.
13633
13634         * basic-calls.cs: Fix compilation of tests.
13635         
13636         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
13637         helper function to cut back on the number of #ifdefs needed.
13638
13639         * mini-ppc.c: Fix compilation.
13640
13641         * basic-calls.cs: New regression tests.
13642
13643         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
13644
13645         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
13646         of l0 since that is callee saved.
13647
13648         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
13649         to virtual calls.
13650
13651         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
13652         of delay instruction.
13653
13654         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
13655
13656         * mini.h (MonoCallInst): Add 'virtual' flag.
13657
13658         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
13659
13660 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
13661
13662         * *.cs: New regression tests.
13663
13664         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
13665         work.
13666
13667         * mini.c (mono_runtime_install_handlers): Fix build.
13668
13669         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
13670         'signal_stack_size' members.
13671
13672         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
13673         alternate signal stack.
13674
13675         * exceptions-x86.c: Add stack overflow handling.
13676
13677         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
13678         functions to arch independent code.
13679
13680         * mini.c (mono_print_tree): Print more detailed info for load_membase
13681         opcodes.
13682         
13683 2004-02-23  Martin Baulig  <martin@ximian.com>
13684
13685         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
13686
13687 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
13688
13689         * mini-x86.c: fixed reg allocation for div/rem.
13690
13691 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
13692
13693         * driver.c (mono_main): Report some configuratio options on --version.
13694
13695 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
13696
13697         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
13698         low in the address space. Correctly flush memory in thunks where we
13699         output native code.
13700
13701 2004-02-20  Martin Baulig  <martin@ximian.com>
13702
13703         * mini.c (mini_get_method): New static method; inflate all generic
13704         methods and methods in open generic instances.
13705         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
13706         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
13707
13708 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
13709
13710         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
13711
13712         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
13713
13714 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
13715
13716         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
13717
13718         * mini-sparc.c (flushi mono_arch_output_basic_block): make
13719         it compile using Sun's compiler.
13720
13721 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
13722
13723         * 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.
13724
13725         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
13726
13727 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
13728
13729         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
13730         code.
13731         * mini-ppc.c: handle calls outside of the allowed range with thunks
13732         allocated using the code manager.
13733         * tramp-ppc.c: use the code manager to hold generated native code.
13734         Fixed the magic trampoline to just patch vtable entries.
13735
13736 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
13737
13738         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
13739         independent file.
13740
13741 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
13742
13743         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
13744         PPC.
13745
13746         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
13747         if we have a working __thread implementation.
13748
13749         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
13750         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
13751
13752 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
13753
13754         * mini-x86.c: Fix compilation under gcc 2.
13755         
13756 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
13757
13758         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
13759         contains a call to the wrapped function.
13760
13761         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
13762         OP_<CALL>_IMM opcodes, and use them under X86.
13763         
13764         * mini.c (mono_jit_find_compiled_method): Fix warning.
13765
13766         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
13767
13768         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
13769
13770         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
13771         functionality to mini.c.
13772
13773         * mini.c (mono_create_jump_trampoline): New function to create a jump
13774         trampoline. Return a compiled method instead of a trampoline if it
13775         exists. Add a cache for jump trampolines.
13776
13777         * mini.c (mono_jit_find_compiled_method): New function to return a
13778         compiled method if it exists.
13779
13780         * mini-x86.c: Call mono_create_jump_trampoline instead of 
13781         mono_arch_create_jit_trampoline.
13782
13783         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
13784         a jump trampoline. Fixes #52092.
13785         
13786 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
13787
13788         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
13789         which is not up-to-date. Add check_corlib_version () instead.
13790
13791         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
13792         have to call it.
13793         
13794         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
13795         since newer valgrind versions do not need it.
13796
13797         * mini.c (mono_jit_compile_method_with_opt): New helper function to
13798         compile a method with a given set of optimizations.
13799
13800         * mini.c: Compile icall wrappers on-demand instead of at startup.
13801
13802         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
13803         wrapper for an icall.
13804
13805 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
13806
13807         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
13808         #54063.
13809
13810         * iltests.il: Add test for non-empty stack before switch instruction.
13811
13812 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
13813
13814         * mini.c: Add support for new stringbuilder marshalling conventions.
13815
13816         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
13817
13818 2004-02-01  Martin Baulig  <martin@ximian.com>
13819
13820         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
13821         in `ginst->mtype_argv'.
13822
13823 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
13824
13825         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
13826         facilitate grepping.
13827
13828 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
13829
13830         * mini.c: fixed buglet in initobj generic implementation for references.
13831
13832 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
13833
13834         * Makefile.am: make the version script conditional.
13835         * jit-icalls.c: handle missing truncl().
13836
13837 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
13838
13839         * exceptions.cs: Add more tests for double->int conversion.
13840
13841         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
13842         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
13843
13844 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
13845
13846         * driver.c: make --verbose --version emit an error
13847         if the loaded corlib doesn't match the runtime version.
13848
13849 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
13850
13851         * mini-ppc.h: export ppc_patch().
13852         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
13853         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
13854         on par or better than on MacOSX.
13855
13856 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
13857
13858         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
13859         mono_lookup_pinvoke_call.
13860
13861         * mini-x86.c: Under windows, the default pinvoke calling convention is
13862         stdcall. Fixes #52834.
13863
13864         * mini.c (optimize_branches): Add an upper bound to the number of
13865         iterations to prevent infinite loops on strange loops. Fixes #53003.
13866
13867 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
13868
13869         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
13870         and ISINST. Fixes #52093.
13871
13872         * objects.cs (test_0_vector_array_cast): New tests.
13873         
13874 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
13875
13876         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
13877         checking in Array.Set ().
13878
13879         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
13880         #52590.
13881
13882         * object.cs (test_0_multi_array_cast): New regression test.
13883
13884 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
13885
13886         * exceptions-ppc.c: fix build on Linux/PPC.
13887
13888 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
13889
13890         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
13891         running under valgrind.
13892         (x86_magic_trampoline): Fix build bustage.
13893
13894         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
13895         negative values as well. This is needed for the encoding of the line number
13896         info, since sometimes the line numbers are not in increasing order.
13897
13898 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
13899
13900         * cpu-pentium.md (localloc): Increase the size of the localloc 
13901         instruction since it is a loop under Win32.
13902
13903         * debug-mini.c (record_line_number): Get rid of unneccesary memory
13904         allocation.
13905
13906 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
13907
13908         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
13909         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
13910         Max Horn (max@quendi.de). Fix file names in comments.
13911
13912 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
13913
13914         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
13915         avoid stack overflow.
13916         (replace_usage): Avoid uninitialized variable warnings.
13917
13918         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
13919         and taking the address of valuetype variables.
13920
13921 2004-01-03  Patrik Torstensson
13922
13923         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
13924         for other purposes than FP later on.
13925
13926 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
13927
13928         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
13929         of tail calls.
13930
13931 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
13932
13933         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
13934
13935 2003-12-30  Patrik Torstensson <p@rxc.se>
13936
13937         * mini-x86.h: Decreased number of availiable fp regs.
13938         Solves corner cases with FP spilling.
13939
13940 2003-12-23  Patrik Torstensson <p@rxc.se>
13941
13942         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
13943         for floating point stack tracking / spilling on x86. 
13944         Fixes bug #49012.
13945         
13946         * basic-float.cs: added float mul overflow test.
13947
13948 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
13949
13950         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
13951
13952 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
13953
13954         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
13955         supports for cond branches that overflow the immediate
13956         overflow offset. mcs can compile simple programs.
13957
13958 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
13959
13960         * exceptions-ppc.c: exception handling support wip:
13961         finally handlers get run on exception.
13962
13963 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
13964
13965         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
13966         profiling.
13967
13968 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
13969
13970         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
13971         initial support for stack walking and unwinding.
13972
13973 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
13974
13975         * driver.c (mono_main): Make corlib-out-of-sync message more 
13976         descriptive. Also remove verify_corlib call.
13977
13978 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
13979
13980         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
13981         not overlap with other call's arguments, too.
13982
13983 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
13984
13985         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
13986         move to arch-specific code the choice of arch-specific
13987         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
13988         * mini.c: ensure emulation calls will not interleave
13989         with other calls.
13990
13991 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
13992
13993         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
13994         the magic trampoline stack frame is dropped before executing
13995         the new method.
13996
13997 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
13998
13999         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
14000         and integer to fp conversions. Added support for overflowing
14001         arguments on the stack. Reserve a couple more registers as temps.
14002         Added support for aot compilation (as output still needs to be
14003         tweaked, though).
14004
14005 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14006
14007         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
14008         Don't overwrite return register in some corner cases.
14009
14010 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
14011
14012         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
14013         static constructors when AOT compiling.
14014
14015         * driver.c (mono_main): Call mono_check_corlib_version.
14016
14017 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
14018
14019         * cpu-g4.md, basic.cs: fixed div target register.
14020
14021 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
14022
14023         * mini-ppc.c, basic.cs: shl_imm fix with test.
14024
14025 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
14026
14027         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
14028         structures by value. Misc fixes.
14029         * objects.cs: more tests.
14030
14031 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
14032
14033         * mini-ppc.c: lconv.ovf.i implemented.
14034
14035 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14036
14037         * mini.c:
14038         (mini_init): don't error out if someone already called g_thread_init.
14039
14040 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
14041
14042         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
14043         to be any type per the spec. Fix abnormal memory usage when
14044         the same object is repeatedly thrown.
14045
14046 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
14047
14048         * mini.c: check for overruns in IL code.
14049
14050 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
14051
14052         * TODO: Add/remove some todo entries.
14053
14054 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
14055
14056         * driver.c (mono_main): Call mono_verify_corlib.
14057
14058 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
14059
14060         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
14061         This has been moved to mini.c
14062         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
14063         type being casted is marshalbyref it could be a proxy, so instead of
14064         emitting the type check code, emit a call to a runtime method that will
14065         perform the check by calling CanCastTo if needed.
14066
14067 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
14068
14069         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
14070         methods with large stack frames under Win32.
14071
14072 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
14073
14074         * Makefile.am: Distribute regression tests.
14075
14076         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
14077         at the end instead of inserting each variable into the sorted list.
14078
14079         * linear-scan.c (mono_varlist_sort): New helper function.
14080         
14081 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
14082
14083         * mini.c: ensure arguments and locals are within bounds.
14084
14085 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14086
14087         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
14088         related fixes.
14089
14090 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
14091
14092         * mini.c (mono_cprop_copy_values): Fix crash.
14093
14094         * aot.c: Set verbosity back to 0.
14095         
14096 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14097
14098         * regalloc.c: complete memory leak fix by Laurent Morichetti
14099         (l_m@pacbell.net).
14100
14101 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
14102
14103         * driver.c (main_thread_handler): Revert the previous patch.
14104
14105         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
14106         under valgrind.
14107
14108         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
14109         memory from the memory pool.
14110
14111         * driver.c (main_thread_handler): Turn on all optimizations when
14112         --aot is used.
14113
14114         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
14115         an array for better performance.
14116
14117         * regalloc.c (mono_regstate_assign): Fix memory leak.
14118
14119         * debug-mini.c (mono_debug_serialize_debug_info): New function to
14120         serialize the debug info.
14121
14122         * debug-mini.c (mono_debug_add_aot_method): New function to load the
14123         debug info from the serialized representation.
14124
14125         * aot.c: Save debug info into the generated file and load it when 
14126         loading a method.
14127
14128         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
14129
14130 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
14131
14132         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
14133         More FP-related fixes.
14134
14135 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
14136
14137         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
14138         and register allocation buglet. Hello world now runs.
14139
14140 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
14141
14142         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
14143         * tramp-ppc.c: fixed class init trampoline.
14144         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
14145
14146 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
14147
14148         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
14149         mini.c: more ppc changes/fixes.
14150
14151 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
14152
14153         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
14154         Also optimize the case when the arguments are the same in the caller 
14155         and in the callee.
14156
14157         * iltests.il: Add tests for tail calls with valuetype arguments.
14158
14159 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
14160
14161         * mini-ppc.c: fixes for struct return type.
14162
14163 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
14164
14165         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
14166         mono_spillvar_offset() to arch-specific code.
14167
14168 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
14169
14170         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
14171
14172 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
14173
14174         * exceptions-x86.c: Fix stack space leaks.
14175         
14176         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
14177         registers from the lmf if the method has save_lmf set.
14178
14179 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
14180
14181         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
14182         of icall wrappers into InvokeInDomain, since these are now per-domain.
14183
14184 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
14185
14186         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
14187         make some opcode emulation and intrinsic ops enabled/disabled 
14188         according to the architecture. More fixes.
14189
14190 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
14191
14192         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
14193
14194 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
14195
14196         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
14197         arch-specific handling for 'this' and struct return type to
14198         arch-specific code.
14199
14200 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14201
14202         * aot.c: prevent divide by zero error when reporting (it happened with
14203         Accessibility.dll).
14204
14205 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
14206
14207         * mini.h (inst_switch): Remove unused macro.
14208
14209 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14210
14211         * aot.c:
14212         (load_aot_module): free 'info->methods' and 'info' properly. No more
14213         "free(): invalid pointer blah" messages when you have an old aot
14214         compiled assembly.
14215
14216 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
14217
14218         * jit-icalls.c, mini.c: Added support for context static fields.
14219
14220 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
14221
14222         * mini.c (mono_method_blittable): Methods which set LastError are not 
14223         blittable either. Fixes #51108.
14224         
14225 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
14226
14227         * mini.c: flush icache.
14228         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
14229
14230 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
14231
14232         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
14233
14234 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
14235
14236         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
14237         safe on IA32.
14238
14239         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
14240         vararg calls.
14241
14242         * inssel.brg (CEE_MKREFANY): Fix AOT case.
14243
14244 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
14245
14246         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
14247         instruction when the result is discarded.
14248
14249         * iltests.il (test_0_div_regalloc): New regression test.
14250
14251         * arrays.cs: Fix compilation error.
14252
14253 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
14254
14255         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
14256         float rules to inssel-x86.brg: sane architectures with FP registers
14257         don't need to implement these rules.
14258
14259 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
14260
14261         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
14262
14263 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14264
14265         * mini.h, inssel-long32.brg: fixed endianess issues in int64
14266         implementation of 32 bit systems.
14267
14268 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
14269
14270         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
14271         (Jeroen Zwartepoorte).
14272
14273 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
14274
14275         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
14276         the caller and the callee matches.
14277         
14278         * mini.c (mono_method_to_ir): Add comment.
14279
14280         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
14281         signbit is missing on some platforms.
14282
14283 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
14284
14285         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
14286
14287         * mini.c (setup_jit_tls_data): Call the new function.
14288         
14289         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
14290
14291         * mini-x86.c: Add experimental support for fast access to the lmf
14292         structure under NPTL/Linux 2.6.x.
14293
14294 2003-11-06  Martin Baulig  <martin@ximian.com>
14295
14296         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
14297         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
14298         the debugger.
14299
14300 2003-11-02  Martin Baulig  <martin@ximian.com>
14301
14302         * mini.c (inflate_generic_field): New static method.
14303         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
14304         generic instance and the field is declared in a generic type, call
14305         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
14306
14307 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
14308
14309         * mini.h mini.c (mono_method_same_domain): New function to return
14310         whenever the caller and the callee are in the same domain.
14311
14312         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
14313
14314 2003-10-30  Martin Baulig  <martin@ximian.com>
14315
14316         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
14317         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
14318         method parameters.
14319         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
14320         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
14321
14322 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
14323
14324         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
14325         propagation.
14326
14327         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
14328         object here, so it is in the correct appdomain etc.
14329
14330 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
14331
14332         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
14333         already done.
14334         (mono_method_to_ir): Avoid freeing the type created returned from
14335         mono_type_create_from_typespec, since it is put into an internal cache
14336         by the function. Fixes pointer.exe.
14337
14338         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
14339         trampolines for icalls and pinvokes as well. Fixes #33569.
14340
14341 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
14342
14343         * mini.c: Update after appdomain changes.
14344
14345         * mini.c (mono_jit_compile_method_inner): Allways compile native
14346         method wrappers in the root domain, since there can only be one
14347         instance of them, whose address is stored in method->info.
14348
14349 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
14350
14351         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
14352         environment variable. Instead detect automatically whenever running
14353         under valgrind using the magic macro RUNNING_ON_VALGRIND from
14354         valgrind.h.
14355
14356 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
14357
14358         * trace.c, trace.h: New files that implement the new trace option
14359         parsing. 
14360
14361         * driver.c: Document new --trace options.
14362
14363         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
14364         mini-x86.c: Apply:
14365
14366         -       if (mono_jit_trace_calls)
14367         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
14368
14369         * mini.h: prototypes.
14370         
14371 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
14372
14373         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
14374
14375         * mini.c inssel.brg: Implement typedefbyref opcodes.
14376
14377         * mini.c (mono_jit_compile_method): Remove unused local variable.
14378
14379         * mini.c (mono_jit_compile_method_inner): Ditto.
14380         
14381 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
14382
14383         * tramp-x86.c (x86_class_init_trampoline): Fix build.
14384         
14385         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
14386
14387 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
14388
14389         * mini.c (mono_no_aot): Remove unused global variable.
14390
14391         * mini.c: Thread safety fixes.
14392
14393 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
14394
14395         * mini.c (mono_create_class_init_trampoline): Add a lock around
14396         class_init_hash_addr.
14397
14398         * arrays.cs (test_0_newarr_emulation): Add new regression test for
14399         #30073.
14400
14401         * mini.c: Decompose the NEWARR instruction before decomposing its
14402         arguments. Fixes #30073.
14403
14404 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
14405
14406         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
14407         convention.
14408
14409 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
14410
14411         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
14412
14413         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
14414
14415         * driver.c: Add support for compiling icall wrappers to --compile.
14416
14417 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
14418
14419         * inssel.brg: The empty value in class->interface_offsets is -1, not
14420         0. Fixes #49287.
14421
14422 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
14423
14424         * objects.cs: New test for 'is' operator on an array of interfaces.
14425
14426 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
14427
14428         * tramp-ppc.c: update trampoline code to support jumps
14429         and class initialization.
14430
14431 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
14432
14433         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
14434
14435         * inssel.brg (OP_UNBOXCAST): Fix #46027.
14436
14437         * inssel.brg (OP_UNBOX): Remove unused rule.
14438
14439         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
14440         region instead of one for each method. Fixes #47813.
14441
14442 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
14443
14444         * exceptions.cs (test_0_nested_finally): New regression test for
14445         nested exception handlers.
14446
14447         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
14448
14449         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
14450
14451         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
14452         inlining.
14453
14454         * mini.c (mono_method_check_inlining): Make the inlining limit 
14455         configurable by an environment variable.
14456         
14457         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
14458
14459         * mini.h: Bump AOT file version.
14460
14461         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
14462         token, store the image along with the token, since the token might not 
14463         refer to the same image as the method containing the relocation, 
14464         because of inlining.
14465
14466 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
14467
14468         * mini.c (mono_precompile_assemblies): New function to compile
14469         all methods in all loaded assemblies.
14470
14471         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
14472
14473         * regalloc.h regalloc.c (MonoRegState): Change the type of 
14474         iassign and fassign to int*, since they can contain large negative
14475         values if the register is spilled. Also added some comments. Fixes
14476         #45817.
14477
14478         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
14479         under Win32. Fixes #42964.
14480
14481 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
14482
14483         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
14484
14485         * aot.c: Added support for AOT compiling methods which contain calls
14486         to wrappers. Currently, only remoting-invoke-with-check wrappers are
14487         handled.
14488         
14489         * driver.c (compile_all_methods): Run the compilation in a thread
14490         managed by mono. Fixes #44023.
14491
14492         * mini.c (mono_codegen): Print full method name in verbose output.
14493
14494         * mini-x86.c (mono_arch_patch_code): Fix warning.
14495         
14496         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
14497         jumps, since the method we are jumping to might be domain-specific.
14498
14499         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
14500
14501 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
14502
14503         * inssel.brg: string chars are unsigned.
14504
14505 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
14506
14507         * TODO: New todo item.
14508
14509         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
14510         which calls mono_runtime_class_init and patches the call site to
14511         avoid further calls.
14512         (mono_arch_create_class_init_trampoline): New arch specific function 
14513         to create a class init trampoline.
14514         (create_trampoline_code): Generalized so it can create
14515         class init trampolines as well.
14516
14517         * mini.c (helper_sig_class_init_trampoline): New helper variable.
14518         (mono_create_class_init_trampoline): New function to create and cache
14519         class init trampolines.
14520         (mono_find_class_init_trampoline_by_addr): New function to lookup the
14521         vtable given the address of a class init trampoline. Used by the
14522         patching process.
14523         (mono_codegen): Generate a call to a trampoline instead of
14524         mono_runtime_class_init in LDSFLD[A].
14525         (mono_codegen): Add relocations for the new trampoline.
14526         
14527         * mini.h mini-x86.c aot.c: Added a new relocation type: 
14528         MONO_PATCH_INFO_CLASS_INIT.
14529
14530         * mini.h: Bump AOT version number.
14531
14532         * aot.c: Create a copy of the loaded code instead of using the original
14533         so methods which call each other will be close in memory, improving
14534         cache behaviour.
14535         
14536         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
14537         patch since it breaks the regression tests.
14538         
14539         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
14540         for the register saving instruction sequence since the 
14541         frame_state_for function in glibc 2.3.2 don't seem to detect it.
14542
14543 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
14544
14545         * TODO: Fix todo item && remove another.
14546
14547 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
14548
14549         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
14550         previous checkin.
14551
14552         * aot.c: Moved the check for MONO_LASTAOT into the initialization
14553         function of the module.
14554
14555         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
14556         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
14557         --no-aot command line option.
14558
14559 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
14560
14561         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
14562         by Bernie Solomon (bernard@ugsolutions.com).
14563
14564         * inssel.brg: Refactor the interface offset table related code into
14565         its separate functions and add support for the AOT case.
14566
14567 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
14568
14569         * aot.c (mono_aot_get_method_inner): Fix memory leak.
14570         
14571         * aot.c: Added mono_aot_verbose variable and made all debugging
14572         output depend on the value of this variable.
14573
14574         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
14575         method_label and info_label.
14576
14577         * mini.h mini-x86.c aot.c: Added a new relocation type 
14578         MONO_PATCH_INFO_IID for klass->interface_id.
14579
14580         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
14581         the MonoJitInfo structure.
14582
14583         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
14584         a non-root appdomain in shared mode.
14585
14586 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
14587
14588         * aot.c: make aot loader less verbose. Remove free of unused variable.
14589
14590 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
14591
14592         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
14593
14594         * .cvsignore: Added *.dll.
14595
14596         * mini.c (mono_print_tree_nl): New function callable while debugging.
14597
14598         * mini.c (mono_print_code): Export this.
14599
14600         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
14601         patched code.
14602
14603 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
14604
14605         * mini.h (MonoCompile): Added 'jit_info' field.
14606
14607         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
14608         the cfg structure, since it is needed by the AOT compiler.
14609
14610         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
14611
14612         * aot.c: A major rewrite. Changes include:
14613         - save exception tables for methods which have them.
14614         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
14615         to g_module_symbol.
14616         - reworked the file format so it is now much smaller and needs
14617         fewer relocation entries.
14618         
14619 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
14620
14621         * aot.c (load_aot_module): Fix build bustage on platforms without
14622         Boehm GC.
14623
14624 2003-09-04  Martin Baulig  <martin@ximian.com>
14625
14626         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
14627
14628 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
14629
14630         * TODO: Some new optimization ideas.
14631
14632         * aot.c: Move AOT module loading logic here from mono_assembly_open.
14633
14634         * aot.c: Save the optimization flags used to compile the code into
14635         the AOT module.
14636
14637         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
14638         support emitting domain specific code.
14639         
14640         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
14641         no longer domain neutral. It can be made domain neutral by compiling 
14642         with --optimize=shared.
14643
14644         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
14645         between appdomains.
14646
14647         * driver.c mini.h mini.c: New --no-aot debugging option which disables
14648         loading of AOT code.
14649
14650         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
14651         
14652         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
14653         if there is no domain neutrality information.
14654
14655 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
14656
14657         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
14658         format version into the generated library.
14659
14660         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
14661         callee method into the caller since one of them could be shared.
14662
14663         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
14664         system exceptions from AOT code now works.
14665
14666         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
14667         method if it is domain neutral and the callee is not.
14668
14669         * graph.c (cfg_emit_one_loop_level): Fix warning.
14670
14671 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
14672
14673         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
14674         last checkin.
14675
14676 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
14677
14678         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
14679         is needed  by code which is executed before mono_runtime_init ().
14680         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
14681         
14682         * mini.c (mono_thread_abort): Fix warning.
14683         (mono_jit_compile_method): Call static constructor in the AOT case too.
14684
14685         * aot.c (mono_compile_assembly): Fix warning.
14686
14687 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14688
14689         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
14690
14691 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
14692
14693         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
14694
14695         * cpu-pentium.md: Fix the length of call opcodes so they include the
14696         ESP restoring instruction. Fixes #47968.
14697
14698 2003-08-28  Martin Baulig  <martin@ximian.com>
14699
14700         * mini-x86.c (mono_arch_call_opcode): Added support for
14701         MONO_TYPE_GENERICINST.
14702
14703         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
14704
14705 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
14706
14707         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
14708         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
14709
14710         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
14711         metadata_section.
14712
14713 2003-08-26  Martin Baulig  <martin@ximian.com>
14714
14715         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
14716         when reporting an error, set this to the actual error location.
14717         (mono_method_to_ir): Report the correct error location if
14718         get_basic_blocks() returned an error.
14719
14720 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
14721
14722         * mini.c (mono_type_blittable): OBJECT is not blittable.
14723         (mono_method_blittable): Methods which have marshalling descriptors
14724         are not blittable either. Fixes #47842.
14725
14726 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
14727
14728         * driver.c mini.c: Use an environment variable instead of a global 
14729         variable. Also fix the build.
14730
14731         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
14732         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
14733         reporting this. 
14734
14735         * driver.c mini.c: Added --with-valgrind option to turn off some
14736         code which prevents mono from running under valgrind.
14737
14738         * mini.c (mono_emit_call_args): Fixed warning.
14739
14740         * mini.c (mono_emulate_opcode): Fixed warning.
14741
14742 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14743
14744         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
14745         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
14746         regalloc.c, regalloc.h: specify available registers in arch-specific
14747         code and support floats in the regallocator (patch by Laurent Morichetti 
14748         <l_m@pacbell.net>)
14749
14750 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
14751
14752         * mini.c: mono_thread_current() can be called only after
14753         mono_runtime_init(): rearrange code to not call it early on.
14754
14755 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
14756
14757         * mini.c: allocate jump tables in the code mempools.
14758
14759 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14760
14761         * mini.c, mini.h: make sure per-thread data allocated by the jit is
14762         freed.
14763
14764 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
14765
14766         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
14767         12 to 16.  This fixes bug #47453.
14768
14769
14770 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
14771
14772         * mini-ppc.c: fixed indexed load and unsigned compares.
14773
14774 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
14775
14776         * mini.c: reenabled installation of handler for
14777           thread abort signal.
14778
14779 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14780
14781         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
14782         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
14783         until it's fixed and actually useful.
14784
14785 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
14786
14787         * inssel-long32.brg: couple more opcodes implemented.
14788
14789 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
14790         
14791         * mini-sparc.c: Even more opcodes implemeted.
14792
14793 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
14794
14795         * mini-sparc.c: More opcodes implemented.
14796
14797 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
14798
14799         * mini-sparc.c: More opcodes implemented.
14800
14801 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
14802
14803         * inssel-sparc.brg: Add some needed rules.  Direct
14804         copy from PPC.
14805         * Makefile.am: Use inssel-sparc.brg
14806         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
14807         an assert happy for now.
14808
14809 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
14810
14811         * mini-sparc.c: Fixed compile errors.
14812         * exceptions-sparc.c: Same.  We now produce a mono binary 
14813         on sparc-linux.  Yea.
14814
14815 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
14816
14817         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
14818         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
14819         They compile, but do not work.
14820
14821 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14822
14823         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
14824         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
14825         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
14826         (ct@gentoo.org).
14827
14828 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14829
14830         * mini.c: more opcodes implemented and better support for generics.
14831
14832 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
14833
14834         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
14835         * mini.c, mini.h: first cut at generics support: some new instructions 
14836         added and changed the behaviour of some of the existing ones.
14837
14838 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
14839
14840         * mini.c: Removed definition of metadata_shared mutex here.
14841
14842 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
14843
14844         * mini-x86.c: make vararg calls work for instance methods.
14845
14846 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
14847
14848         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
14849         returns the arguments in a separte list, now.
14850
14851 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
14852
14853         * aot.c, mini.c: updates for array type representation changes.
14854
14855 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
14856
14857         * mini.c: register function to perform jit shutdown.
14858
14859 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14860
14861         * mini.c: use a faster allocator if possible.
14862
14863 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
14864
14865         * aot.c: some cleanups and portability changes.
14866
14867 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
14868
14869         * mini.c: use faster allocation for CEE_BOX if possible.
14870
14871 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
14872
14873         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
14874         Moved inlined mempcy code to its own function so that is can be
14875         reused. Added an inline memset function as well (optimized initobj).
14876         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
14877
14878 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
14879
14880         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
14881
14882 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
14883
14884         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
14885         arch code can setup the cpu for CLR execution, if needed.
14886         We use it on x86 to set the precision of FP operations.
14887
14888 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
14889
14890         * mini.c: disable some optimizations if we can guess they'll cost too
14891         much for a given method.
14892
14893 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
14894
14895         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
14896         
14897 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
14898         * mini.h mini.c mini-x86.c: Added instruction level coverage 
14899         info collection support.
14900
14901 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
14902
14903         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
14904         is now implemented in the profiling API. Get rid of a couple of
14905         unnecessary global variables.
14906
14907 2003-06-15  Nick Drochak <ndrochak@gol.com>
14908
14909         * basic-long.cs: tests for negative values for bigmul, and unsigned.
14910         * cpu-g4.md: add op_bigmul and op_bigmul_un
14911         * cpu_pentium.md: add op_bigmul_un
14912         * inssel-long32.brg: add rule for unsigned bigmul
14913         * mini-ops.h: define OP_BIGMUL_UN
14914         * mini-x86.c: THE BUG: handle (un)signed properly
14915         * mini.c: choose unsigned opcode if needed.
14916         This set of patches fixes bug #44291
14917
14918 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
14919
14920         * mini.c (optimize_branches): improved to handle all kinds of
14921         conditional branches.
14922
14923 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
14924
14925         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
14926         don't raise exceptions.
14927
14928 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
14929
14930         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
14931         to arch-specific files.
14932
14933 2003-06-09  Martin Baulig  <martin@ximian.com>
14934
14935         * Makefile.am (libs): Added $(LIBGC_LIBS).
14936
14937 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
14938
14939         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
14940         and OP_ATAN (fixes bug#44293).
14941
14942 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
14943
14944         * Makefile.am, mini-x86.c: rename cpu description array to
14945         pentium_desc, since some compilers define the 'pentium' preprocessor
14946         symbol.
14947
14948 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
14949
14950         * mini.c (mini_select_instructions): add explicit branch if the
14951         following block is not the false target of a conditional branch -
14952         we need this with any optimization that reorder or remove bblocks
14953
14954         * mini.c (optimize_branches): bug fixes
14955
14956 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
14957
14958         * mini.c (mono_method_to_ir): inline static readonly fields
14959
14960         * ssa.c (fold_tree): start cfold support for long (very simple
14961         cases only)
14962
14963         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
14964
14965 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
14966
14967         * inssel.brg: fixed memcpy (bug #44219).
14968
14969 2003-06-05  Dick Porter  <dick@ximian.com>
14970
14971         * driver.c: Set the glib log levels to not abort if g_message
14972         recurses.
14973
14974         g_set_prgname() has to happen before mini_init() so that the
14975         process handle gets the info.
14976         
14977 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
14978
14979         * driver.c: add intrins to the default optimizations to get wider
14980         exposure.
14981
14982 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
14983
14984         * mini.h: some large basic blocks will overflow a 16-bit
14985         integers for symbolic registers.
14986
14987 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
14988
14989         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
14990         (mono_arch_output_basic_block): fix bug 43499 
14991
14992 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
14993
14994         * mini.c: kill duplicated definition of mono_debug_format.
14995
14996 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
14997
14998         * mini-x86.c, arrays.cs: fixed register allocation bug.
14999
15000 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
15001
15002         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
15003
15004         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
15005
15006 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15007
15008         * mini.c:
15009         (print_method_from_ip): also print source location information if
15010         available.
15011
15012 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
15013
15014         * mini.c (mono_find_block_region): bug fix in region code
15015         (mini_method_compile): enable removing unreachable code again, but
15016         only in methods without exception clauses.
15017
15018 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
15019
15020         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
15021         Implemented arglist opcode and handling of TypedReference type.
15022         Fixed x86 call convention when a structure is returned.
15023         Minimal support for calling static vararg methods.
15024
15025 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
15026
15027         * mini.c (mini_method_compile):  always remove unreachable code,
15028         because the code in them may be inconsistent  (access to dead
15029         variables for example).
15030
15031 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
15032
15033         * driver.c, debug-mini.c: warning fixes.
15034
15035 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
15036
15037         * Makefile.am, jit.h, mini.h: install header for embedding mono.
15038
15039 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
15040
15041         * mini.c: thread-static fields are registered in mono_class_vtable(),
15042         so ensure the function is called before checking for them.
15043
15044 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
15045
15046         * mini.c (optimize_branches): fix for bug 43586
15047
15048         * jit-icalls.c (mono_llmult_ovf): added an additional check for
15049         overflow (fixes Bug #43639)
15050
15051 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15052
15053         * mini.c, objects.cs: allow the use of stobj for primitive types.
15054
15055 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15056
15057         * mini.c: be less strict about argument checking until we support
15058         running the verifier.
15059
15060 2003-05-27  Nick Drochak <ndrochak@gol.com>
15061
15062         * basic-long.cs: tests for (ulong)int * (ulong)int also
15063         * mini.c: use the same trick for (ulong)int * (ulong)int
15064
15065 2003-05-27  Nick Drochak <ndrochak@gol.com>
15066
15067         * basic-long.cs: add regression test for (long)int * (long)int
15068         * cpu-pentium.md: add op_bigmul specification
15069         * inssel-long32.brg: add OP_BIGMUL rule
15070         * mini-ops.h: add OP_BIGMUL
15071         * mini-x86.c: register allocator: handle case where src1 needs to be
15072         in EAX.
15073         * mini.c: substitute special BIGMUL opcode in the tree for 
15074         (long)int * (long)int
15075
15076 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
15077
15078         * jit-icalls.c: call the type ctor on field access if needed.
15079
15080 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
15081
15082         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
15083         to a method (including results of ldelema, bug#43207).
15084
15085 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
15086
15087         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
15088         colors to show exception handler blocks.
15089
15090         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
15091         (fix for pinvoke7.cs).
15092
15093 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15094
15095         * mini.h, mini.c: ensure correct initialization order for types that
15096         require it. Prepare for lazy compilation of jit icall wrappers.
15097         Provide a name for opcode emulation to reduce unneeded mallocing.
15098
15099 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
15100
15101         * mini-x86.c: better register restoring code and profiling
15102         support for tail calls.
15103
15104 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15105
15106         * mini.h, driver.c: prepare for leaf methods optimization.
15107
15108 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
15109
15110         * mini.c: get targets of branches before converting a method.
15111
15112 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
15113
15114         * mini.c (optimize_branches): added some experimental code (disbaled) 
15115
15116 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
15117
15118         * mini.c (optimize_branches): fix branch to branch optimization 
15119
15120         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
15121
15122         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
15123
15124         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
15125
15126         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
15127         if needed.
15128
15129 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
15130
15131         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
15132         enable use of interface variables again.
15133
15134         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
15135         I1 to registers because there is no simply way to sign extend 8bit
15136         quantities in caller saved registers on x86.
15137
15138         * inssel-float.brg: set costs of some rules to 2 so
15139         that monobure always select the arch. specific ones if supplied,
15140         regardless of the order we pass the files to monoburg.
15141
15142 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
15143
15144         * mini.c, mini-x86.c: since the magic trampoline for jumps
15145         can't patch the code directly, we do it as soon as the
15146         method gets compiled.
15147
15148 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
15149
15150         * mini-x86.c, mini.h: introduce a new patching method
15151         to support CEE_JMP and tail calls.
15152         * mini.c: obey tail.call. Don't precompile methods target
15153         of CEE_JMP.
15154         * tramp-x86.c: new trampoline code to handle methods
15155         reached through a jump.
15156
15157 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
15158
15159         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
15160         bit values to registers
15161
15162 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
15163
15164         * mini.c (mono_compile_get_interface_var): share interface
15165         variables if possible.
15166
15167 2003-05-16  Martin Baulig  <martin@ximian.com>
15168
15169         * debug-mini.c (mono_init_debugger): New function to initialize
15170         the debugger.  This is not in the debugger since it needs to
15171         access some of mini's internals.
15172
15173 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
15174
15175         * mini.c (mono_method_to_ir): inlining fixes/cleanups
15176
15177 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
15178
15179         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
15180         for value type handling.
15181
15182 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
15183
15184         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
15185         (mono_method_check_inlining): enable inlining of all kinds of wrappers
15186
15187 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
15188
15189         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
15190           the constructor through a proxy.
15191
15192 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15193
15194         * jit-icalls.c, inssel.brg: fixes to array element address
15195         calculations.
15196
15197 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
15198
15199         * mini-x86.c (is_regsize_var): allocate pointer to registers
15200
15201 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15202
15203         * driver.c: fixed typo, added intrins to the set of optimizations
15204         tested with regressions.
15205
15206 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
15207
15208         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
15209         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
15210         test case.
15211
15212 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
15213
15214         * inssel.brg: remove some common pop instructions without side effects
15215
15216 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15217
15218         * inssel-x86.brg: fixed thinko in int to double conversions.
15219
15220 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
15221
15222         * mini.c, jit-icalls.c: added runtime thread-static variable support.
15223
15224 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
15225
15226         * inssel-long32.brg: two more missing instructions.
15227
15228 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
15229
15230         * mini.c (mono_emit_call_args): set the cil_code for all arguments
15231         if not already set.
15232
15233 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
15234
15235         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
15236         correctly.
15237
15238         * basic-float.cs: Added tests for negative zero.
15239
15240 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15241
15242         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
15243         a couple of missing operations for long casts, with test cases.
15244
15245 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15246
15247         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
15248
15249 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
15250
15251         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
15252         code size estimation.
15253
15254 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
15255
15256         * mini.c (mono_jit_create_remoting_trampoline): make it work with
15257         abstract methods (fix bug 42542)
15258
15259         * aot.c: add ability to handle array types
15260         
15261 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
15262
15263         * mini.c: Call the _specific versions of the object allocation
15264         functions if possible.
15265
15266 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
15267
15268         * driver.c: call setlocale ().
15269
15270 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
15271
15272         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
15273         windows build.
15274
15275 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
15276
15277         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
15278
15279         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
15280         wrappers (fix bug 42122)
15281
15282 2003-05-04  Martin Baulig  <martin@ximian.com>
15283
15284         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
15285
15286         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
15287         s/mini_set_defaults/mono_set_defaults/g.
15288
15289 2003-05-04  Martin Baulig  <martin@ximian.com>
15290
15291         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
15292
15293 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15294
15295         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
15296         (reported by Don Roberts).
15297
15298 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
15299
15300         * mini.c: temporarily work around two bugs for this release.
15301
15302 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15303
15304         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
15305         that contains -export-dynamic and it makes using the ld script
15306         useless.
15307         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
15308
15309 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
15310
15311         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
15312         specific cpu.
15313
15314 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
15315
15316         * mini.c: make sure leave calls all the needed finally blocks,
15317         even when the target jumps out of multiple exception clauses.
15318
15319 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15320
15321         * ldscript, Makefile.am: add linker script to reduce the number of
15322         exported symbols (should also fix the issues with libwine defining
15323         some of the same symbols in io-layer).
15324
15325 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
15326
15327         * driver.c (mini_main): Avoid assertion when no file name is given on 
15328         the command line.
15329
15330 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
15331
15332         * driver.c: added --version/-V command line option.
15333         Added the inline optimization in the regression tests.
15334
15335 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15336
15337         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
15338         to the type in the method signature (fixes bug#42134).
15339
15340 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
15341
15342         * mini.c: when inlining, check this is not null only when needed (bug #42135).
15343
15344 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
15345
15346         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
15347
15348 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15349
15350         * driver.c: fixed bug #42100.
15351
15352 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
15353
15354         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
15355
15356 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
15357
15358         * mini.c: moved most of the code required to do inlining to its own
15359         function so it can be reused. Inline also ctors if appropriate.
15360
15361 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
15362
15363         * Makefile.am: Link with -export-dynamic so shared libs loaded by
15364         the runtime can call mono API functions.
15365
15366 2003-04-27  Martin Baulig  <martin@ximian.com>
15367
15368         * debug-mini.c (mono_debug_init_method): Added
15369         `guint32 breakpoint_id' argument; if the method has a breakpoint,
15370         send a notification to the debugger.
15371
15372         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
15373         running in the Mono Debugger, just pass the breakpoint number to
15374         mono_debug_init_method().
15375
15376         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
15377
15378 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
15379
15380         * mini.c: allow some more unsafe compares.
15381
15382 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15383
15384         * mini-x86.c, Makefile.am: make distcheck works (partially from
15385         a patch by Richard Lee <r.h.lee@attbi.com>).
15386         * regset.c, regset.h: removed, they are unused.
15387
15388 2003-04-25  Dick Porter  <dick@ximian.com>
15389
15390         * driver.c: Usage reports the name as 'mono' not 'mini'
15391         * exceptions-x86.c: Build and run on freebsd
15392
15393 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
15394
15395         * Makefile.am: install the program with the 'mono' name and
15396         the library as libmono instead of mini and libmini.
15397
15398 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
15399
15400         * driver.c: provide the APIs for the embedding interface of the old jit.
15401
15402 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
15403
15404         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
15405
15406 2003-04-23  Martin Baulig  <martin@ximian.com>
15407
15408         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
15409
15410         * driver.c: Added `--debug' command line argument to enable
15411         debugging support.
15412
15413 2003-04-23  Martin Baulig  <martin@ximian.com>
15414
15415         * debug.[ch]: Removed.  The code is now in
15416         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
15417
15418         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
15419         last six months.
15420
15421 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
15422
15423         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
15424
15425 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15426
15427         * mini.c:
15428         (mini_cleanup): moved mono_runtime_cleanup call after the call to
15429         mono_domain_finalize.
15430         (mini_method_compile): use mono_method_profile* if the the option is
15431         enabled.
15432
15433 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
15434
15435         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
15436         methods with their wrapper.
15437
15438         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
15439         methods with their wrapper.
15440
15441         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
15442         their wrapper.
15443
15444         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
15445         wrapper.
15446
15447         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
15448         methods.
15449
15450 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
15451
15452         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
15453
15454 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
15455
15456         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
15457         of the mempool. This is slightly faster and uses less memory
15458
15459 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15460
15461         * mini.c: avoid O(n) allocation for variables.
15462
15463 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15464
15465         * mini.c: handle items on the stack after inlining methods.
15466
15467 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
15468
15469         * mini.c: make the method->opcode optimization dependent
15470         on MONO_OPT_INSTRINS and do it lazily.
15471
15472 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
15473
15474         * driver.c: print overall results at the end of regression run.
15475
15476 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
15477
15478         * inssel.brg: don't overwrite symbolic registers.
15479
15480 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
15481
15482         * inssel-x86.brg: fix conversion from long to float.
15483
15484 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
15485
15486         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
15487
15488 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
15489
15490         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
15491
15492         * driver.c: Added --print-vtable option as in the old JIT.
15493
15494 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
15495
15496         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
15497
15498 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
15499
15500         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
15501
15502 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
15503
15504         * mini.c regalloc.c regalloc.h: Fix memory leak.
15505
15506 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
15507
15508         * aot.c (mono_aot_get_method): register all used strings
15509
15510 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15511
15512         * mini.c: always intern strings references with ldstr at compile time.
15513
15514 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15515
15516         * Makefile.am: add BUILT_SOURCES.
15517
15518 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
15519
15520         * driver.c: give a better error message when the assembly to execute
15521         doesn't have an entry point.
15522
15523 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
15524
15525         * Makefile.am: added hack for automake
15526
15527         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
15528         correct sematics.
15529
15530         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
15531
15532 22003-04-07  Martin Baulig  <martin@ximian.com>
15533
15534         * Makefile.am: Added Makefile.am.
15535
15536         * debugger-main.c: Removed, this is now in the debugger where it
15537         belongs.
15538
15539         * mini.pc.in: Call this package `mini' for the moment.
15540
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553