2009-09-22 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / ChangeLog
1 2009-09-22  Zoltan Varga  <vargaz@gmail.com>
2
3         * mini-exceptions.c (mini_jit_info_table_find): New helper function which
4         searches all the domains of the current thread.
5
6         * exceptions-<ARCH>.c: Use it. Fixes #539394.
7
8 2009-09-21  Zoltan Varga  <vargaz@gmail.com>
9
10         * exceptions-arm.c (mono_arm_throw_exception): Set ctx->ebp to fp instead of sp
11         so catching exceptions thrown in the same method works. Fixes exception17.exe.
12
13         * tramp-arm.c (mono_arch_create_trampoline_code_full): Store NULL into lmf->method
14         for non-jit trampolines.
15
16         * mini.c (mono_jit_runtime_invoke): Allow string ctors with dyn runtime invoke.
17
18         * aot-compiler.c (add_wrappers): Ditto.
19
20         * mini-arm.c: Implement support for passing vtypes and floats, and increase
21         the size of the param area used by dyn_call to 6 which covers the majority of
22         methods.
23
24         * mini.c aot-compiler.c: Allow dyn_call for string methods except ctors.
25
26         * mini-arm.c: Implement support for passing/receiving
27         longs and receiving floats in the dyn_call code.
28
29         * mini-amd64.c: Implement support for receiving vtypes in registers in
30         the dyn_call code.
31
32         * mini.c mini-amd64.c: Implement partial support for passing vtypes in
33         the dyn_call code.
34
35 2009-09-20  Zoltan Varga  <vargaz@gmail.com>
36
37         * mini-arm.c (get_call_info): Return more precise information in
38         ArgInfo->regtype.
39         (dyn_call_supported): Use the information in CallInfo.
40
41         * mini-arm.c: Enable support for returning vtypes in the dyn_call code.
42
43         * mini.c mini-amd64.c: Enable support for returning vtypes in the dyn_call
44         code.
45
46         * mini-arm.c: Update after the dyn_call api changes.
47
48         * mini.c (mini_create_jit_domain_info): Register a destructor function
49         for the runtime_invoke_hash.
50
51         * mini-amd64.c (mono_arch_get_dyn_call_args): Rename this to
52         'mono_arch_dyn_call_start'. Pass the pointer to the return value buffer to
53         this function.
54         (mono_arch_get_dyn_call_ret): Rename this to 'mono_arch_dyn_call_finish'.
55         (dyn_call_supported): Simplify this by using get_call_info ().
56         (mono_arch_dyn_call_free): New destructor function.
57
58         * generics.cs: Remove a printf.
59
60         * method-to-ir.c (mono_method_to_ir): Allocate some param area for DYN_CALL.
61
62         * mini-arm.c: Add support for enum return values and passing a few arguments
63         on the stack.
64         
65         * mini.c (mono_jit_runtime_invoke): Add support for enum return values to
66         dyn invoke.
67
68         * mini-amd64.c (mono_arch_get_dyn_call_ret): Ditto.
69
70         * aot-compiler.c (add_wrappers): Add a few restrictions for the use of
71         the dynamic invoke wrappers.
72
73         * mini-arm.c: Implement OP_DYN_CALL for arm.
74
75         * aot-compiler.c (add_wrappers): Avoid aot-ing runtime invoke wrappers
76         supported by the dynamic runtime invoke wrapper.
77
78         * aot-compiler.c aot-runtime.c: Add support for encoding the dynamic
79         runtime invoke wrapper.
80
81         * mini.c (mono_jit_runtime_invoke): Use the dynamic runtime invoke wrappers
82         if possible when running with full-aot.
83
84         * mini-ops.h: Add OP_DYN_CALL opcode.
85
86         * mini-amd64.c method-to-ir.c: Add infrastructure for making method calls
87         with dynamic arguments lists similar to libffi.
88
89 2009-09-19  Zoltan Varga  <vargaz@gmail.com>
90
91         * method-to-ir.c: Fix the previous change on 64 bit platforms.
92         
93         * method-to-ir.c: Applied patch from Rodrigo Kumpera. Allow an i8 argument
94         to NEWARR.
95
96         * iltests.il.in: Add a new test.
97         
98 2009-09-18  Zoltan Varga  <vargaz@gmail.com>
99
100         * aot-compiler.c (add_generic_instances): Add more instances of
101         GenericEqualityComparer.
102
103 2009-09-18  Rodrigo Kumpera  <rkumpera@novell.com>
104
105         * mini.c: Add asserts for mono_class_vtable calls that are not meant to fail.
106
107 2009-09-18  Rodrigo Kumpera  <rkumpera@novell.com>
108
109         * method-to-ir.c: Handle failures from mono_class_vtable. Added some
110         comments on some functions that now can fail.
111
112 2009-09-17  Andrew Jorgensen  <ajorgensen@novell.com>
113
114         * Makefile.am: Add Info.plist to EXTRA_DIST
115
116 2009-09-16  Zoltan Varga  <vargaz@gmail.com>
117
118         * method-to-ir.c (mono_method_to_ir): Allow AOT for CEE_LDTOKEN in
119         static synchronized wrappers. Fixes #539500.
120
121 2009-09-14  Rodrigo Kumpera  <rkumpera@novell.com>
122
123         * jit-icalls.c (mono_class_static_field_address): handle vtable failure
124         properly.
125
126 2009-09-16  Zoltan Varga  <vargaz@gmail.com>
127
128         * mini-exceptions.c (mono_handle_exception_internal): Store the computed
129         lmf before calling filter clauses as well. Fixes #539550.
130
131         * exceptions.cs: Add a test.
132         
133 2009-09-14  Zoltan Varga  <vargaz@gmail.com>
134
135         * aot-compiler.c (add_generic_class): Add instances of
136         Array.GetGenericValueImpl as well.
137
138         * Makefile.am (fullaotcheck): Copy and aot more assemblies so linq
139         can be tested too.
140
141         * generics.cs: Add a fullaot linq test.
142
143 2009-09-10  Zoltan Varga  <vargaz@gmail.com>
144
145         * aot-compiler.c (arch_emit_static_rgctx_trampoline): Don't clobber argument
146         reg r1 on arm.
147
148 2009-09-10  Bill Holmes  <billholmes54@gmail.com>
149
150         * mini-trampolines.c (mono_delegate_trampoline) : Call
151           mono_cominterop_get_invoke if the delegate target object
152           is a COM object.
153
154         Code is contributed under MIT/X11 license.
155
156 2009-09-09  Sebastien Pouliot  <sebastien@ximian.com>
157
158         * method-to-ir.c: For CoreCLR throw a SecurityException if an 
159         internal call is defined outside platform code. Reduce code 
160         duplication with existing [Method|Field]AccessException
161
162 2009-09-08  Rodrigo Kumpera  <rkumpera@novell.com>
163
164         * mini-x86.c (mono_arch_emit_call): Don't reduce stack usage by 4
165         if the return value is a small struct passed on regs.
166
167 2009-09-09  Zoltan Varga  <vargaz@gmail.com>
168
169         * cpu-arm.md mini-arm.c: Remove unused opcodes.
170
171         * mini-codegen.c: Enable the cpu description validation for arm.
172
173 2009-09-08  Zoltan Varga  <vargaz@gmail.com>
174
175         * basic-calls.cs: Move the test_0_float_load_and_store_with_big_offset ()
176         test which depends on structs to objects.cs.
177         
178         * basic-calls.cs: Remove calls to Console.WriteLine and throws, since those
179         require object model related stuff working.
180
181         * cpu-x86.md mini-x86.c: Remove more unused opcodes.
182
183         * mini-ops.h: Fix OP_BIGMUL instruction descriptions.
184
185         * mini-codegen.c (mono_local_regalloc): Validate the cpu description 
186         against the instruction metadata in mini-ops.h. amd64 only for now.
187
188         * mini-ops.h: Fix some instruction descriptions.
189
190         * mini-ops.h mini-x86.c mini-amd64.c cpu-<ARCH>.md: Remove some
191         unused instructions.
192
193 2009-09-06  Zoltan Varga  <vargaz@gmail.com>
194
195         * exceptions.cs: Add a new test.
196
197 2009-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
198
199         * mini-x86.c (needs_stack_frame): OSX requires full frames to keep proper alignment.
200
201 2009-09-06  Zoltan Varga  <vargaz@gmail.com>
202
203         * mini-llvm.c (mono_llvm_emit_method): Add a few more missing casts,
204         skip empty phi opcodes.
205         
206         * mini-llvm.c (mono_llvm_emit_method): Handle unsigned volatile variables
207         correctly by zero extending after loads. Skip methods containing calls
208         to the monitor enter/exit trampolines.
209
210         * tramp-x86.c (mono_arch_create_trampoline_code): Align the stack
211         when calling mono_thread_force_interruption_checkpoint ().
212
213         * mini.c (mini_method_compile): Disable llvm when AOT compiling.
214
215         * tramp-amd64.c (mono_arch_patch_callsite): Add support for 32 bit ->
216         64 bit thunks.
217         (mono_arch_nullify_class_init_trampoline): Read 'buf' instead of 'code'.
218
219         * mini-llvm.c (mono_llvm_emit_method): Add a few missing conversions so a 
220         bootstrap could run.
221
222 2009-09-04  Zoltan Varga  <vargaz@gmail.com>
223
224         * mini.c (mini_init): Set callbacks.get_runtime_build_info ().
225
226 2009-09-03  Zoltan Varga  <vargaz@gmail.com>
227
228         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass the start
229         of the method to
230         mono_breakpoint_clean_code () when using LLVM as the prologues generated by
231         LLVM might be very short.
232
233         * mini-x86.c (mono_arch_output_basic_block): Maintain stack alignment
234         in OP_THROW/RETHROW.
235
236         * exceptions-x86.c: Rewrite the throw trampolines so they maintain stack
237         alignment on osx.
238
239 2009-09-03  Zoltan Varga  <vargaz@gmail.com>
240
241         * mini-amd64.c (mono_arch_get_vcall_slot): Pass the start of the method to
242         mono_breakpoint_clean_code () when using LLVM as the prologues generated by
243         LLVM might be very short.
244
245 2009-09-01  Zoltan Varga  <vargaz@gmail.com>
246
247         * exceptions-x86.c (throw_exception): Fix the previous change by substracting
248         the alignment for the value of sp.
249
250 2009-09-01  Geoff Norton  <gnorton@novell.com>
251
252         * mini.c (mono_get_lmf_addr): Fix jit_thread_attach for native to 
253         managed wrappers in full aot.
254
255 2009-08-31  Zoltan Varga  <vargaz@gmail.com>
256
257         * exceptions-x86.c (get_throw_exception): Align the stack on osx.
258
259 2009-08-28  Zoltan Varga  <vargaz@gmail.com>
260
261         * mini-llvm-cpp.cpp mini-llvm.c: Update to latest llvm api.
262
263 2009-08-25  Zoltan Varga  <vargaz@gmail.com>
264
265         * aot-compiler.c (emit_exception_debug_info): Emit ei->flags too.
266
267         * aot-runtime.c (decode_exception_debug_info): Decode ei->flags from the
268         saved info.
269
270         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
271
272         * aot-runtime.c aot-compiler.c: Emit exception causes fully so we don't
273         depend on the info MonoMethodHeader which could be missing in IL stripped
274         assemblies.
275
276 2009-08-25  Zoltan Varga  <vargaz@gmail.com>
277
278         * mini-arm.c (add_general): Fix the passing of 64 bit values on darwin, where
279         they are only 4 byte aligned.
280
281 2009-08-21  Zoltan Varga  <vargaz@gmail.com>
282
283         * mini-arm.c (mono_arch_allocate_vars): Use FP as the frame pointer as
284         was done previously, since using SP causes too many problems.
285
286         * exceptions-arm.c: Fix the handling of sp/fp so unwinding through
287         frames without a frame pointer works.
288
289         * mini-arm.c (mono_arch_get_global_int_regs): Avoid using V5 as a
290         global register in methods with calls, since the calls can go through
291         a static rgctx trampoline which doesn't save it.
292
293 2009-08-19  Zoltan Varga  <vargaz@gmail.com>
294
295         * mini-arm.c (mono_arch_context_get_int_reg): Handle SP as well.
296
297 2009-08-18  Zoltan Varga  <vargaz@gmail.com>
298
299         * aot-compiler.c (add_generic_instances): Fix the net 1.1 build.
300
301 2009-08-18  Christian Hergert  <chris@dronelabs.com>
302
303         * method-to-ir.c: Fix warnings for uninitialized variables.
304
305 2009-08-18  Christian Hergert  <chris@dronelabs.com>
306
307         * mini-exceptions.c:
308         * aot-compiler.c: Fix printf warnings.
309
310 2009-08-18  Zoltan Varga  <vargaz@gmail.com>
311
312         * aot-compiler.c (add_generic_instances): Add string[] wrapper methods.
313         Add GetGenericValueImpl<string>.
314         
315         * aot-compiler.c (add_generic_instances): Add instances of
316         GenericEqualityComparer<T> for primitive types. Only emit the array
317         wrappers into the mscorlib image.
318
319 2009-08-15  Zoltan Varga  <vargaz@gmail.com>
320
321         * aot-runtime.c (load_method): Rename 'aot_module' -> 'amodule'. Allocate
322         the methods_loaded array using amodule->info->nmethods.
323
324         * mini.h (MonoAotFileInfo): Add an 'nmethods' field.
325         (MONO_AOT_FILE_VERSION): Bump this.
326
327         * aot-compiler.c: Emit more generic instances allowing some parts of linq
328         to work.
329
330         * aot-runtime.c (mono_aot_get_unwind_info): Handle the case when the
331         MonoJitInfo doesn't belong to its methods aot image.
332
333 2009-08-14  Zoltan Varga  <vargaz@gmail.com>
334
335         * mini-arm.c (mono_arch_allocate_vars): Use SP as the default frame reg.
336
337         * mini-arm.c: Fix warnings.
338         
339         * mini-arm.c (mono_arm_emit_load_imm): Only emit a movt if needed.
340
341         * mini-arm.c (mono_arm_emit_load_imm): Use movt/movw if the cpu
342         supports it.
343
344 2009-08-12  Zoltan Varga  <vargaz@gmail.com>
345
346         * aot-compiler.c (arch_emit_imt_thunk): Rework the arm code to
347         avoid clobbering IP.
348
349         * mini-trampolines.c (mono_magic_trampoline): Allocate a local to
350         hold the trampoline argument, so its initial value is available during
351         debugging.
352
353 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
354
355         * exceptions-arm.c:
356         * exceptions-hppa.c:
357         * mini.c:
358         * exceptions-s390x.c:
359         * exceptions-mips.c:
360         * exceptions-ppc.c:
361         * exceptions-sparc.c:
362         * exceptions-alpha.c:
363         * aot-runtime.c:
364         * mini-trampolines.c:
365         * exceptions-x86.c:
366         * exceptions-s390.c: add and use #define's instead of sizeof()
367         for MonoJitInfo and MonoJitInfoTable.
368
369 2009-08-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
370
371         * tramp-arm.c:
372         * tramp-amd64.c:
373         * tramp-ppc.c:
374         * tramp-x86.c: use a #define instead of sizeof() for a few
375         structures that use a zero-length array.
376
377 2009-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
378
379         * method-to-ir.c (mono_method_to_ir/CEE_CONSTRAINED_): Handle the
380         case when the method is dynamic. Fixes #529238.
381
382 2009-08-06  Zoltan Varga  <vargaz@gmail.com>
383
384         * mini.c (mono_jit_compile_method_inner): Throw an exception instead
385         of asserting when a method is JIT compiled in full-aot mode.
386
387 2009-08-03  Jerry Maine  <crashfourit@gmail.com>
388         
389         Contributed under the terms of the MIT/X11 license by
390         Jerry Maine <crashfourit@gail.com>.
391         
392         * fixed wrong dates in changelog.
393
394 2009-08-03  Jerry Maine  <crashfourit@gmail.com>
395         
396         Contributed under the terms of the MIT/X11 license by
397         Jerry Maine <crashfourit@gail.com>.
398
399         * basic-simd.cs: added test for packed double square root.
400         * cpu-amd64.md: added opcode info for packed double square root.
401         * cpu-x86.md: added opcode info for packed double square root.
402         * mini-ops.h: added IR opcode for packed double square root.
403         * mini-x86.c: added IR to native translation code for packed double square root.
404         * mini-amd64.c: removed todo for packed double square root.
405         * simd-intrinsics.c: added method to IR opcode converstion for
406         packed double square root.
407
408 2009-08-03 Jerry Maine <crashfourit@gmail.com>
409
410         Contributed under the terms of the MIT/X11 license by
411         Jerry Maine <crashfourit@gail.com>.
412
413         * mini-amd64.c: Added a change to help tell the difference as 
414         to what perpose the xmm register is being used--mainly to help
415         with debuging.
416         * mini-amd64.h: Changed callee regs to use 15 out of 16 
417         (one used for special cases) xmm registers for both fp
418         and simd ops. Added define to turn on new feature in the regalloc
419         that allows fp and simd ops to share the xmm regs happily.
420         * codegen.c: Added code to detect for which perpose an xmm reg is
421         being used (fp or simd) and to translate back and forth to the
422         correct logical reg bank (fp or simd) for 'spill load's.
423
424 2009-08-03 Jerry Maine <crashfourit@gmail.com>
425
426         Contributed under the terms of the MIT/X11 license by
427         Jerry Maine <crashfourit@gail.com>.
428
429         * basic-simd.cs: Added tests for stressing the regalloc when running with
430         16 simd regs and when simd and fp ops share the same reg bank.
431
432 2009-08-01  Mark Probst  <mark.probst@gmail.com>
433
434         * method-to-ir.c (mini_emit_stobj): If we call mono_value_copy()
435         in shared generic code, we might have to look up the class in the
436         RGCTX.  If we use the class directly, compute its GC descriptor.
437
438 2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>
439
440         * mini.c (mono_jit_runtime_invoke): Fix a warning.
441
442 2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>
443
444         * mini.c (mono_jit_runtime_invoke): Initialize the class and
445         check for errors. Fixed the case when the class with the Main
446         method is broken.
447
448 2009-07-31 Jerry Maine <crashfourit@gmail.com>
449
450         Contributed under the terms of the MIT/X11 license by
451         Jerry Maine <crashfourit@gail.com>.
452
453         * cpu-amd64.md: Fixed simple bug in machine discrition file.
454
455 2009-07-31  Zoltan Varga  <vargaz@gmail.com>
456
457         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_IREM_UN_IMM.
458
459 2009-08-30  Rodrigo Kumpera  <rkumpera@novell.com>
460
461         * method-to-ir.c: Fix naming of stelem and ldelem.
462
463 2009-07-30  Zoltan Varga  <vargaz@gmail.com>
464
465         * driver.c (main_thread_handler): Check that the assembly loaded
466         matches the filename when doing AOT.
467
468 2009-07-30  Mark Probst  <mark.probst@gmail.com>
469
470         * mini.c: get_ip_from_sigctx installer has been removed, so don't
471         call it anymore.
472
473         * mini-x86.h, mini-amd64.h, mini-ppc.h: UCONTEXT macros moved (to
474         utils/mono-sigcontext.h).
475
476         * exceptions-amd64.c: Use the UCONTEXT_GREGS macro instead of an
477         #ifdef.
478
479 2009-07-29  Massimiliano Mantione  <massi@ximian.com>
480
481         * mini.c (mono_codegen):
482         Call profiler hook to keep track of method code buffers.
483
484 2009-07-27  Mark Probst  <mark.probst@gmail.com>
485
486         * method-to-ir.c: Invoke write barriers for the
487         Interlocked.(Compare)Exchange JIT intrinsics.
488
489 2009-07-26  Raja R Harinath  <harinath@hurrynot.org>
490
491         * Makefile.am (version.h): Fix issues when built out of tree.
492         Remove some redundant 'grep's piped through 'sed's.
493
494 Fri Jul 24 17:28:37 CEST 2009 Steven Munroe  <munroesj@us.ibm.com>
495
496         This patch is contributed under the terms of the MIT/X11 license
497
498         * mini-ppc.c (mono_arch_output_basic_block):
499         (OP_STOREI1_MEMBASE_REG): Handle 32-bit offsets combining addis
500         for bits 32-47 with signed load/store diplacements for bits
501         48-63.  Use prefered base/offset order for indexed form.
502         (OP_STOREI2_MEMBASE_REG, OP_STORE_MEMBASE_REG): Same.
503         (OP_LOAD_MEMBASE, OP_LOADI4_MEMBASE, OP_LOADU4_MEMBASE,
504         OP_LOADI1_MEMBASE, OP_LOADU1_MEMBASE, OP_LOADU2_MEMBASE,
505         OP_LOADI2_MEMBASE): Same.
506         (OP_STORER8_MEMBASE_REG, OP_LOADR8_MEMBASE,
507         OP_STORER4_MEMBASE_REG, OP_LOADR4_MEMBASE): Same.
508         (OP_STOREI1_MEMINDEX): Use prefered base/offset order for
509         indexed form.
510         (OP_STOREI2_MEMINDEX, OP_STORE_MEMINDEX): Same.
511         (OP_LOAD_MEMINDEX, OP_LOADI4_MEMINDEX, OP_LOADU4_MEMINDEX,
512         OP_LOADU2_MEMINDEX, OP_LOADI2_MEMINDEX, OP_LOADU1_MEMINDEX,
513         OP_LOADI1_MEMINDEX): Same
514         (OP_LOADR4_MEMINDEX, OP_LOADR8_MEMINDEX, OP_STORER4_MEMINDEX,
515         OP_STORER8_MEMINDEX): Same
516         (OP_JMP): Use addis/addi sequence for int cfg->stack_usage
517         computations.
518         (mono_arch_emit_prolog): Handle 32-bit offsets combining addis
519         for bits 32-47 with signed load/store diplacements for bits
520         48-63.  Use prefered base/offset order for indexed form.
521
522 Fri Jul 24 16:57:12 CEST 2009 Steven Munroe  <munroesj@us.ibm.com>
523
524 This patch is contributed under the terms of the MIT/X11 license
525
526         * mini-ppc.c: Define PPC_MOVE_FPR_GPR and PPC_ISA_64.
527         (mono_arch_get_vcall_slot): Fx pointer to int cast warning.
528         (mono_arch_decompose_opts): Make OP_ICONV_TO_R4 and
529         OP_ICONV_TO_R8 decompose conditional on !PPC_ISA_64.
530         (mono_arch_output_basic_block) [OP_JMP]: Use ppc_load32 for
531         cfg->stack_usage to avoid size warnings.
532         (mono_arch_output_basic_block) [__mono_ppc64__]: Replace
533         store/load sequence with mffgpr if PPC_MOVE_FPR_GPR is true.
534         (mono_arch_output_basic_block) [!__mono_ppc64__]: For
535         OP_ICONV_TO_R4 or OP_ICONV_TO_R8 and PPC_ISA_64 use fcfid
536         to convert.
537         (mono_arch_emit_prolog): Move mono_emit_unwind_op_def_cfa 
538         after code varible is initialized.
539         Add g_assert ppc_is_imm16 for ainfo->offset. Handle
540         ainfo->size == 8 when ainfo->offset !ppc_is_imm16.
541         (mono_arch_emit_epilog): 
542         Move Use ppc_load32 for cfg->stack_usage to avoid size
543         warnings.
544
545 2009-07-24  Mark Probst  <mark.probst@gmail.com>
546
547         * method-to-ir.c: The write barrier doesn't do the store anymore,
548         so we have always to emit it.  Also, emit the wbarrier after the
549         store.
550
551 2009-07-24  Zoltan Varga  <vargaz@gmail.com>
552
553         * mini-arm.c (mono_arch_get_delegate_invoke_impls): Add a trampoline
554         for argument count 3 too.
555
556 2009-07-23  Zoltan Varga  <vargaz@gmail.com>
557
558         * mini.c (mono_jit_compile_method_with_opt): Add an 'ex' argument to let
559         the caller handle the exceptions.
560         (mono_jit_runtime_invoke): Handle exceptions thrown while compiling the
561         method. Fixes #524498.
562
563 2009-07-22  Geoff Norton  <gnorton@novell.com>
564
565         * mini-exceptions.c: Fix build on ia64.
566
567 2009-07-22  Mark Probst  <mark.probst@gmail.com>
568
569         * mini-exceptions.c (ves_icall_get_frame_info): Use write
570         barriers.
571
572 2009-07-21  Zoltan Varga  <vargaz@gmail.com>
573
574         * mini-arm.c (mono_arch_emit_prolog): Fix thread attaching in aot
575         code.
576
577 2009-07-20  Zoltan Varga  <vargaz@gmail.com>
578
579         * basic-simd.cs (Main): Pass args to the test driver.
580
581 2009-07-20  Geoff Norton  <gnorton@novell.com>
582
583         * mini-x86.h: Fix the x86 version guards to use Apple's
584         properly defined macros.
585
586 2009-07-20  Geoff Norton  <gnorton@novell.com>
587
588         * mini-x86.c: Fix --trace on darwin-x86 and other systems which require
589         aligned access.
590
591 2009-07-20  Zoltan Varga  <vargaz@gmail.com>
592
593         * mini.c (mono_jit_runtime_invoke): Speed this up by adding a hash to
594         MonoJitDomainInfo which maps MonoMethod's to a structure containing all
595         the information which is needed for invokes, so only one locking+hash table
596         lookup is needed.
597
598         * aot-compiler.c: Add a 'tool-prefix' option to be used when cross-compiling.
599         
600         * aot-compiler.c (add_generic_instances): Emit instances of 
601         GenericComparer<T> for primitive types.
602
603 2009-07-19 Rodrigo Kumpera  <rkumpera@novell.com>
604
605         * mini-posix.c: Fix linux build.
606
607 2009-07-19  Geoff Norton  <gnorton@novell.com>
608
609         * mini.h: Add prototypes for mono_runtime_syscall_fork and
610         mono_gdb_render_native_backtraces
611         * mini-darwin.c: Apple's syscall(SYS_fork) is very weird on x86,
612         so we implement the sane semantics to the runtime here
613         (mono_gdb_render_native_backtraces).  Apple also uses an ancient gdb
614         so we need to call it differently (mono_gdb_render_native_backtraces)
615         * mini-posix.c: Move the old semantics from mini.c to the prototypes
616         here for default implementations.
617         * mini.c: Refactor mono_handle_native_sigsegv so that we can properly
618         support Apple's weird syscall (SYS_fork) implementation and not busy
619         loop in abort() on native crashes on OSX anymore.
620
621 2009-07-18  Zoltan Varga  <vargaz@gmail.com>
622
623         * aot-runtime.c (load_method): Change the handling of the
624         MONO_LASTAOT env variable so MONO_LASTAOT=0 means that no aot methods
625         are used.
626
627         * mini.c (mono_patch_info_equal): Really fix the handling of RGCTX_FETCH.
628
629 2009-07-17  Zoltan Varga  <vargaz@gmail.com>
630
631         * mini.c (mono_patch_info_equal): Revert the last change for now as it
632         seems to break the aot tests.
633         
634         * mini.c (mono_patch_info_equal): Fix the handling of 
635         MONO_PATCH_INFO_RGCTX_FETCH.
636
637 2009-07-16  Zoltan Varga  <vargaz@gmail.com>
638
639         * unwind.c: Use TARGET_AMD64 instead of __x86_64__.
640
641         * mini.c (mono_patch_info_hash): Fix the handling of 
642         MONO_PATCH_INFO_INTERNAL_METHOD.
643         (mono_patch_info_equal): Ditto.
644
645 2009-07-16  Zoltan Varga  <vargaz@gmail.com>
646
647         * mini-llvm.c (mono_llvm_emit_method): Use module instead of ctx->module
648         in a few places.
649         
650         * mini-llvm.c: Add some infrastructure for AOT support.
651
652 2009-07-15  Zoltan Varga  <vargaz@gmail.com>
653
654         * mini-llvm-cpp.c: Update to the latest llvm api.
655         
656         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Set the EnablePrettyStackTrace
657         option to false to prevent llvm from installing signal handlers which
658         trip up the gc.
659         
660 2009-07-15 Rodrigo Kumpera  <rkumpera@novell.com>
661
662         * cpu-x86.md:
663         * cpu-amd64.md: Revert previous change as those instructions
664         take 2 separate arguments. Remember to read the arch docs more
665         carefully next time.
666
667 2009-07-15  Zoltan Varga  <vargaz@gmail.com>
668
669         * mini-llvm-cpp.cpp (mono_llvm_build_alloca): Update to latest llvm api.
670
671 Wed Jul 15 17:20:27 CEST 2009 Paolo Molaro <lupus@ximian.com>
672
673         * mini-ppc.c: exploit multiple load/store units if available (rest of
674         the change from Steven Munroe (<munroesj@us.ibm.com>) first patch at 
675         http://bugzilla.novell.com/show_bug.cgi?id=487846).
676
677 Wed Jul 15 16:24:57 CEST 2009 Paolo Molaro <lupus@ximian.com>
678
679         * mini-ppc.c: integrate most of Steven Munroe (<munroesj@us.ibm.com>)
680         first patch at http://bugzilla.novell.com/show_bug.cgi?id=487846.
681
682 2009-07-14 Rodrigo Kumpera  <rkumpera@novell.com>
683
684         * cpu-x86.md: Fix missing clobbering from trancendental simd
685         ops.
686
687         * cpu-amd64.md: Same.
688
689 2009-07-14 Jerry Maine <crashfourit@gmail.com>
690
691         Contributed under the terms of the MIT/X11 license by
692         Jerry Maine <crashfourit@gail.com>.
693
694         * basic-simd.cs: Added tests for single and doulble indexers.
695
696         * cpu-amd64.md: Added simd opcode information.
697
698         * mini-amd64.c: Added IR to native simd generation code.
699         Added simd register names and function that returns them.
700
701         * mini-amd64.h: Added marcos to turn on simd code compilation in
702         amd64. Added max simd register count marco. Added caller/callee
703         register mask marcos. Added marcos to use simd register bank.
704
705         * mini.h: Added helper marco for shufling dwords and simple
706         floats.
707
708 2009-07-14  Zoltan Varga  <vargaz@gmail.com>
709
710         * mini-llvm-cpp.cpp: Update to latest llvm SVN api.
711
712         * Makefile.am (mono_LDADD): Pass LLVM_LDFLAGS to the linked.
713
714         * unwind.c (mono_unwind_get_ops_from_fde): Make this return
715         the length of the native code as well.
716
717         * basic-simd.cs: Add a test for #521662.
718
719 Mon Jul 13 17:58:50 CEST 2009 Paolo Molaro <lupus@ximian.com>
720
721         * mini-ppc.c: fixed bug introduced by Steven's TLS changes.
722
723 2009-07-13  Mark Probst  <mark.probst@gmail.com>
724
725         * mini.c: Register function for getting the IP from a signal
726         context with metadata.
727
728 2009-07-13  Zoltan Varga  <vargaz@gmail.com>
729
730         * method-to-ir.c (mono_method_to_ir): When calling a gshared method,
731         call a generic class init trampoline if needed. Fixes #519336.
732
733         * generics.cs: Add a test.
734         
735 2009-07-09  Mark Probst  <mark.probst@gmail.com>
736
737         * method-to-ir.c: When doing a call which might be remote from
738         shared generic code to other shared code with open type arguments,
739         get the remoting invoke wrapper from the RGCTX and do an indirect
740         call to it.
741
742 2009-07-03  Zoltan Varga  <vargaz@gmail.com>
743
744         * mini-trampolines.c (get_unbox_trampoline): Add an rgctx trampoline
745         after the unbox trampoline in the full-aot case.
746
747 2009-07-02  jonas echterhoff <jonas@unity3d.com>
748         
749         * mini.c: Move initialization of jit_mutex before debugger initialization
750         
751         to avoid crashes.
752         
753         
754         * Info.plist: added Info.plist and link flag to enable the mono executable
755         to access other processes. Requires codesigning of the executable to work.
756         
757         * mdb-debug-info32-darwin.s: The same as mdb-debug-info32.s, changed to 
758         
759         compile on OS X.
760         
761
762 2009-06-30  Zoltan Varga  <vargaz@gmail.com>
763
764         * driver.c (mini_regression): Handle loading errors. Fixes #508869.
765
766 2009-06-29  Zoltan Varga  <vargaz@gmail.com>
767
768         * mini-exceptions.c (get_generic_context_from_stack_frame): Fix the case
769         when the generic instance is an instantiation of a subclass of the
770         methods class. Fixes #517166.
771
772 2009-06-26  Zoltan Varga  <vargaz@gmail.com>
773
774         * mini-amd64.c (mono_arch_emit_prolog): Fix thread attaching in AOTed
775         code.
776
777         * mini.c (mono_jit_thread_attach): Allow domain to be NULL for calls from
778         AOTed code.
779
780         * CMakeLists.txt: Add minimal support for installation.
781
782 2009-06-25  Zoltan Varga  <vargaz@gmail.com>
783
784         * aot-compiler.c (emit_and_reloc_code): Factor out the code to
785         determine whenever a method is directly callable to a separate function.
786
787         * mini-<ARCH>.c tramp-<ARCH>.c: Remove needless casts and add new
788         needed ones as a result of the previous change.
789
790         * mini-<ARCH>.c tramp-<ARCH>.c: Use mgreg_t* as the
791         type of register arrays.
792
793         * mini-trampolines.c tramp-<ARCH>.c aot-runtime.c: Use mgreg_t* as the
794         type of register arrays.
795
796 2009-06-24  Jerry Maine  <crashfourit@gmail.com>
797         
798         Contributed under the terms of the MIT/X11 license by
799         Jerry Maine <crashfourit@gail.com>.
800
801         * mini-amd64.c: Added code to convert simd IR to native amd64 sse.
802
803 2009-06-24  Zoltan Varga  <vargaz@gmail.com>
804
805         * aot-compiler.c (emit_plt): Define debug labels for most plt entries.
806
807 2009-06-24  Neale Ferguson <neale@sinenomine.net>
808
809         * mini-s390x.c: Correct LCONV_TO_Ix and ICONV_TO_Ix routines. Fix leave_method
810         dump of structure return value. Fix some formatting.
811         * cpu-s390x.md: Fix lengths of instruction sequences.
812         * mini-s390.c: Minor formatting changes.
813
814 2009-06-24  Zoltan Varga  <vargaz@gmail.com>
815
816         * mini-x86.h: Applied patch from Romain Tartiere (romain@blogreen.org).
817         Use sigaction on freebsd as well.
818
819 2009-06-23  Zoltan Varga  <vargaz@gmail.com>
820
821         * mini.h: Don't define MONO_ARCH_HAVE_TLS_GET to 0, as some code
822         uses #ifdef on it.
823         
824         * mini.c (mini_init): Revert a change which breaks cross-compilation.
825
826 2009-06-22  Mark Probst  <mark.probst@gmail.com>
827
828         * mini-ppc.c, cpu-ppc.md: Enable TLS on Darwin/G4.
829
830 2009-06-22  Mark Probst  <mark.probst@gmail.com>
831
832         * mini.c, mini.h: Tell the runtime whether we support MONO_TLS.
833
834 2009-06-20  Martin Baulig  <martin@ximian.com>
835
836         * debug-mini.c
837         (MonoDebuggerThreadFlags): New enum typedef.
838         (MonoDebuggerThreadInfo): Added `guint32 thread_flags'.
839         (mono_debugger_thread_created): Added `gpointer func' argument;
840         initialize the new `thread_flags' field.
841
842 2009-06-18  Martin Baulig  <martin@ximian.com>
843
844         * debug-debugger.h (MonoDebuggerRuntimeFlags): New enum typedef.
845         (MonoDebuggerInfo): Renamed the `dummy' field info `runtime_info'.
846
847         * debug-debugger.c
848         (mini_debugger_set_attach_ok): New function; sets the attach-ok
849         flag in `MONO_DEBUGGER__info.runtime_info'.
850
851         * driver.c
852         (mono_main): Call mini_debugger_set_attach_ok() if generics
853         sharing is disabled.
854
855 2009-06-22  Zoltan Varga  <vargaz@gmail.com>
856
857         * aot-compiler.c (add_wrappers): Fix a warning.
858
859         * mini-ppc.c tramp-ppc.c exceptions-ppc.c aot-compiler.c: Update after
860         the ppc load/store macro changes.
861
862 2009-06-21  Zoltan Varga  <vargaz@gmail.com>
863
864         * tramp-ppc.c (mono_arch_patch_plt_entry): Implement this.
865
866         * aot-compiler.c (mono_compile_assembly): Sanitize the plt symbol too,
867         not just the got symbol.
868
869         * mini-ppc.c aot-compiler.c unwind.c: Implement generation of unwind info
870         on ppc.
871
872         * aot-compiler.c unwind.c: Add infrastructure for unwind support on
873         ppc.
874         
875         * aot-compiler.c: Remove some fixmes.
876
877         * driver.c (mono_main): Print a helpful message when cross-compiling.
878
879         * mini.c (mini_init): Disable signal handlers when cross-compiling.
880
881         * method-to-ir.c (initialize_array_data): Do the optimization if the
882         target byte order is little endian, instead of the host byte order.
883
884         * aot-compiler.c: Emit sizes for most symbols, only emit runtime-invoke
885         wrappers into the mscorlib image, Emit a unique plt symbol for each
886         image, emit symbols for plt entries.
887
888         * image-writer.c (img_writer_emit_symbol_size): New function to emit
889         a .size directive.
890         
891 2009-06-20  Zoltan Varga  <vargaz@gmail.com>
892
893         * aot-compiler.c (add_wrappers): Avoid calling 
894         mono_marshal_get_type_info () since it can assert for some types.
895
896         * method-to-ir.c (mono_method_to_ir): Disable aot when some forms of 
897         ldtoken are used inside wrappers.
898
899         * helpers.c: Add support for prefixing tools with the arch name.
900
901         * mini.h (OP_LOADR_MEMBASE): New opcodes to load/store pointer sized
902         quantities when using ilp32.
903
904         * mini-codegen.c: Use OP_LOADR_MEMBASE/OP_STORER_MEMBASE for loading/storing
905         spill slots. Use sizeof(mgreg_t) for the spill slot size.
906
907         * image-writer.c: Use .long on ilp32.
908
909         * aot-compiler.c: Use 32 bit loads on ilp32.
910         
911 2009-06-19  Zoltan Varga  <vargaz@gmail.com>
912
913         * tramp-ppc.c (mono_arch_create_trampoline_code): Fix the ppc build.
914
915         * mini-ops.h: Use TARGET_POWERPC define for consistency.
916
917         * patch-info.h: Add 'MSCORLIB_GOT_ADDR' patch type.
918
919         * aot-compiler.c aot-runtime.c: Put the mscorlib got address into the 
920         second got slot of every aot image.
921         
922         * aot-compiler.c aot-runtime.c mini-trampolines.c: Add support for
923         aot on platforms with function pointers.
924
925         * mini-ppc.h mini-ppp.c cpu-ppc.md exceptions-ppc.c tramp-ppc.c: Add
926         support for aot/full aot on ppc/ppc64.
927         
928         * tramp-<ARCH>.c (mono_arch_patch_plt_entry): Add 'got' and 'regs'
929         arguments which are needed on ppc.
930
931         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Add 'regs'
932         argument.
933
934         * mini-trampolines.c aot-runtime.c: Update after the above changes.
935         
936         * liveness.c (BITS_PER_CHUNK): Use MONO_BITSET_BITS_PER_CHUNK.
937
938         * regalloc2.c (BITS_PER_CHUNK): Ditto.  
939
940         * aot-compiler.c (emit_got_info): Fix reading unused memory.
941
942         * ir-emit.h (alloc_dreg): Add a 'return -1' to quiet some compilers.
943
944 2009-06-17  Geoff Norton  <gnorton@novell.com>
945
946         * aot-compiler.c: Ensure we dont try to close a null dwarf writer.
947
948 2009-06-17  Zoltan Varga  <vargaz@gmail.com>
949
950         * dwarfwriter.c (mono_dwarf_writer_create): Add an 'appending' parameter
951         to control whenever the dwarf writer is in xdebug or aot mode.
952         (emit_class_dwarf_info): Use a separate abbrev for structures without
953         children.
954
955         * aot-compiler.c: Pass the appending parameter to 
956         mono_dwarf_writer_create ().
957
958         * branch-opts.c (mono_merge_basic_blocks): Fix the case when bbn
959         falls through to its next bblock. Fixes #513931.
960
961         * iltests.il: Add a test.
962
963         * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Emit some line number
964         infor even if emit_line is FALSE, as the apple linker seems to require it.
965
966         * image-writer.c (asm_writer_emit_symbol_diff): Call get_label ().
967
968         * dwarfwriter.c (emit_cie): Emit a separate symbol for the cie start, as
969         gcc does.
970         (emit_fde): Ditto.
971
972 2009-06-15  Zoltan Varga  <vargaz@gmail.com>
973
974         * exceptions-mips.c (mono_arch_get_throw_exception_by_name): Fix the
975         mips build.
976
977 2009-06-13  Zoltan Varga  <vargaz@gmail.com>
978
979         * mini.h (struct MonoBasicBlock): Add 'has_jump_table' and 
980         'has_call_handler' fields.
981
982         * method-to-ir.c (mono_method_to_ir): Set them if needed.
983
984         * branch-opts.c (mono_merge_basic_blocks): Avoid iterating through the
985         first bblock if not needed. Fixes #512790.
986         
987 2009-06-11  Zoltan Varga  <vargaz@gmail.com>
988
989         * aot-compiler.c (mono_compile_assembly): Fix a warning.
990         
991         * aot-compiler.c (add_wrappers): Don't emit remoting-invoke-with-check
992         wrappers.
993
994         * aot-runtime.c (mono_aot_get_method): Use the original method's code for
995         remoting-invoke-with-check wrappers, which are not needed when running with
996         full-aot, since it doesn't support remoting.
997         
998 2009-06-10  Zoltan Varga  <vargaz@gmail.com>
999
1000         * aot-compiler.c (emit_got_info): Don't emit offsets for the plt got entries.
1001
1002         * aot-compiler.c aot-runtime.c: Don't emit the first got offset in the
1003         method info, it is not used anymore.
1004
1005         * mini.h: Bump AOT file format version.
1006         
1007         * aot-compiler.c (arch_emit_plt_entry): Make the arm plt entries one
1008         word smaller.
1009
1010         * aot-runtime.c (mono_aot_get_plt_info_offset): Update after the
1011         change above.
1012         
1013         * tramp-arm.c (mono_arch_patch_plt_entry): Ditto.
1014
1015         * mini.h: Bump AOT file format version.
1016         
1017 2009-06-10  Zoltan Varga  <vargaz@gmail.com>
1018
1019         * image-writer.c (asm_writer_emit_symbol_diff): Disable the 
1020         TARGET_ASM_APPLE stuff for now, as it doesn't seem to work on the
1021         iphone.
1022
1023         * mini-arm.c (mono_arch_output_basic_block): Fix the implementation
1024         of CKFINITE and FBGE for VFP.
1025
1026 2009-06-09  Zoltan Varga  <vargaz@gmail.com>
1027
1028         * aot-compiler.c: Don't align code to 16 bytes on arm.
1029         
1030         * aot-compiler.c (emit_method_code): Emit the unbox trampolines right
1031         before the methods they belong to.
1032
1033         * aot-runtime.c (mono_aot_plt_resolve): Avoid creating trampolines in
1034         the full-aot case if possible, since the trampoline will be called right 
1035         away.
1036
1037         * aot-compiler.c (mono_compile_assembly): Decrease the number of full aot
1038         trampolines to 1024 after the change above.
1039
1040         * aot-compiler.c (arch_emit_specific_trampoline): Rework the arm
1041         trampoline to save 8 bytes per trampoline.
1042
1043         * tramp-arm.c (mono_arch_create_trampoline_code_full): Update after the
1044         change above.
1045
1046 2009-06-08  Zoltan Varga  <vargaz@gmail.com>
1047
1048         * aot-compiler.c: Use acfg->temp_prefix instead of .L to prefix labels.
1049
1050 2009-06-08  Martin Baulig  <martin@ximian.com>
1051
1052         * debug-mini.c
1053         (MonoDebuggerExceptionAction): Moved into debug-mini.h.
1054         (_mono_debugger_throw_exception): Don't make this static.
1055         (_mono_debugger_unhandled_exception): Likewise.
1056         (mono_debugger_handle_exception): Moved to mini-exceptions.c
1057
1058         * debug-mini.c
1059         (MonoDebuggerExceptionAction): Moved here from debug-mini.c.
1060         (_mono_debugger_throw_exception): Add function prototype.
1061         (_mono_debugger_unhandled_exception): Likewise.
1062
1063         * mini-exceptions.c
1064         (mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
1065         arg; return the first exception handler if the exception is caught
1066         and we're running inside the debugger.
1067         (mono_debugger_handle_exception): Moved here from debug-mini.c;
1068         improve exception handle inside runtime-invoke, check whether the
1069         exception is actually caught in the method being invoked and not
1070         by the runtime-invoke-wrapper.
1071
1072 2009-06-08  Zoltan Varga  <vargaz@gmail.com>
1073
1074         * image-writer.c: Improve support for the osx assembler.
1075
1076         * dwarfwriter.c: Avoid the usage of subsections if the assembler doesn't
1077         support them.
1078
1079 2009-06-08  Martin Baulig  <martin@ximian.com>
1080
1081         * debug-mini.c
1082         (MonoDebuggerExceptionAction): Moved into debug-mini.h.
1083         (_mono_debugger_throw_exception): Don't make this static.
1084         (_mono_debugger_unhandled_exception): Likewise.
1085         (mono_debugger_handle_exception): Moved to mini-exceptions.c
1086
1087         * debug-mini.c
1088         (MonoDebuggerExceptionAction): Moved here from debug-mini.c.
1089         (_mono_debugger_throw_exception): Add function prototype.
1090         (_mono_debugger_unhandled_exception): Likewise.
1091
1092         * mini-exceptions.c
1093         (mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
1094         arg; return the first exception handler if the exception is caught
1095         and we're running inside the debugger.
1096         (mono_debugger_handle_exception): Moved here from debug-mini.c;
1097         improve exception handle inside runtime-invoke, check whether the
1098         exception is actually caught in the method being invoked and not
1099         by the runtime-invoke-wrapper.
1100
1101 2009-06-07  Zoltan Varga  <vargaz@gmail.com>
1102
1103         * image-writer.c (append_subsection): Don't align subsections of the
1104         debug_line section as a workaround.
1105
1106         * dwarfwriter.c: Emit line number info in the AOT case as well.
1107
1108 2009-06-06  Steven Munroe  <munroesj@us.ibm.com>
1109
1110         This patch is contributed under the terms of the MIT/X11 license
1111
1112        * mini-ppc.c (mono_arch_emit_exceptions): Change assert to
1113        code_len <= code_size
1114
1115 2009-06-06  Zoltan Varga  <vargaz@gmail.com>
1116
1117         * mini-mips.c (mips_emit_exc_by_name): Fix the mips build.
1118
1119 2009-06-04  Zoltan Varga  <vargaz@gmail.com>
1120
1121         * aot-compiler.c aot-runtime.c: Delete references to static rgctx
1122         invoke wrappers, we now use trampolines instead.
1123
1124 2009-06-04  Mark Probst  <mark.probst@gmail.com>
1125
1126         * mini-darwin.c: The exception thread must not be registered with
1127         the GC.
1128
1129 2009-06-04  Mark Probst  <mark.probst@gmail.com>
1130
1131         * mini-gc.c: Disable the code because it makes SGen crash.
1132
1133 2009-06-03  Zoltan Varga  <vargaz@gmail.com>
1134
1135         * aot-compiler.c (mono_compile_assembly): Handle file open errors gracefully
1136         instead of asserting.
1137
1138 2009-05-31  Zoltan Varga  <vargaz@gmail.com>
1139
1140         * aot-compiler.c (mono_compile_assembly): Move the creation of the
1141         output file after the code has been compiled.
1142
1143 2009-05-30  Zoltan Varga  <vargaz@gmail.com>
1144
1145         * tramp-ppc.c (mono_arch_get_static_rgctx_trampoline): Fix 64 bit support.
1146
1147 2009-05-31  Zoltan Varga  <vargaz@gmail.com>
1148
1149         * aot-compiler.c aot-runtime.c: Get rid of the shared/non-shared got
1150         entries distinction to simplify the code.
1151
1152         * mini.h: Bump AOT file format version.
1153         
1154 2009-05-28  Zoltan Varga  <vargaz@gmail.com>
1155
1156         * objects.cs: Fix the signature of one of the tests.
1157
1158         * mini.c (mini_create_ftnptr): New helper function, moved here from
1159         object.c.
1160         (mini_get_addr_from_ftnptr): Ditto.
1161         (mini_init): Install the new helpers.
1162
1163 2009-05-28  Martin Baulig  <martin@ximian.com>
1164
1165         Correctly initialize the debugger when embedding Mono.
1166
1167         * mdb-debug-info32.s, mdb-debug-info64.s: Add a global variable
1168         `MONO_DEBUGGER__using_debugger' to the `.mdb_debug_info' section;
1169         see documentation in mini_debug_running_inside_mdb().
1170
1171         * debug-debugger.c
1172         (mini_debug_running_inside_mdb): New function to check whether
1173         we're running inside mdb.
1174
1175         * mini.c (mini_init): Call mini_debugger_init() if we're running
1176         inside the debugger.
1177
1178         * driver.c (mono_main): Moved the call to mini_debugger_init()
1179         into mini_init() to make this work when embedding Mono.
1180
1181         * debug-debugger.c (mini_debugger_init): Warn about duplicate
1182         calls to mini_debugger_init().
1183
1184         * mini.h: Rename mono_debugger_init() -> mini_debugger_init(),
1185         mono_debugger_main() -> mini_debugger_main() and put them inside a
1186         `MONO_DEBUGGER_SUPPORTED' conditional.
1187
1188 2009-05-26 Rodrigo Kumpera  <rkumpera@novell.com>
1189
1190         * mini-trampolines.c: Kill mono_find_delegate_trampoline_by_addr as
1191         this is no longer in use.
1192         * mini.h: Same.
1193
1194 2009-05-26  Zoltan Varga  <vargaz@gmail.com>
1195
1196         * mini-sparc.c (add_outarg_load): Fix the sparc build.
1197
1198         * aot-compiler.c (emit_method_code): Always write out C style symbols for
1199         methods.
1200
1201 2009-05-27  Martin Baulig  <martin@ximian.com>
1202
1203 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
1204
1205         * mini-x86.c (mono_arch_output_basic_block): Fix the precision of
1206         long_conv_to_r_un to 64 bits.
1207
1208         * cpu-x86.md: Increase the instruction size due to the changes.
1209
1210         * iltests.il.in: Add regression test.
1211
1212         Fixes #467201.
1213
1214 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
1215
1216         * objects.cs: Move the previous test from basic.cs to here.
1217
1218 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
1219
1220         * basic.cs: Add regression test for #506915.
1221
1222 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
1223
1224         * method-to-ir.c (mono_method_to_ir): When doing the ldobj+stobj
1225         optimization we must check the bb of the first byte of stobj as
1226         it's the only one set in cil_offset_to_bb.
1227
1228         Fixes #506915.  
1229
1230 2009-05-25  Zoltan Varga  <vargaz@gmail.com>
1231
1232         * image-writer.c: Fix pointer directive on ppc64.
1233
1234 2009-05-24  Zoltan Varga  <vargaz@gmail.com>
1235
1236         * image-writer.c (asm_writer_emit_section_change): Avoid using
1237         .bss subsections on ppc too.
1238
1239 2009-05-23  Zoltan Varga  <vargaz@gmail.com>
1240
1241         * image-writer.c: Fix the definition of TARGET_ASM_....
1242         
1243         * image-writer.c: Fix the emission of assembler directives in the last
1244         change.
1245
1246         * mini-ppc.c (mono_arch_emit_exceptions): Increase the size of the
1247         exception throwing code to accomodate ppc64.
1248
1249         * tramp-ppc.c (mono_arch_get_nullified_class_init_trampoline): Increase the
1250         size to work on ppc64 too.
1251
1252         * mini-ppc.h (MonoCompileArch): Enable static rgctx trampolines on ppc64
1253         too.
1254
1255         * image-writer.c: Clean up the #ifdef hell a bit by adding defines for
1256         the assembler dialect instead of using platform specific defines.
1257
1258 2009-05-22  Geoff Norton  <gnorton@novell.com>
1259
1260         * mini-arm.c (get_call_info): If a structure is split between the stack
1261         and argument registers, we should not advance the stack pointer by the entire
1262         native size, but just by the amount that spilled.
1263
1264 2009-05-22  Zoltan Varga  <vargaz@gmail.com>
1265
1266         * mini-arm.c (get_call_info): Handle structures with alignment requirements
1267         correctly.
1268
1269 2009-05-21  Zoltan Varga  <vargaz@gmail.com>
1270
1271         * aot-compiler.c (emit_extra_methods): Encode direct runtime invoke
1272         wrappers normally.
1273         
1274         * aot-compiler.c (add_extra_method): Fix up the collection of extra
1275         methods so wrapper don't get added twice.
1276         (add_generic_instances): Don't add methods of arrays.
1277
1278         * generics.cs: Mark one test as !FULLAOT.
1279
1280 2009-05-21 Rodrigo Kumpera  <rkumpera@novell.com>
1281
1282         * mini-x86.c (emit_move_return_value): Remove unused vars.
1283
1284 2009-05-21 Rodrigo Kumpera  <rkumpera@novell.com>
1285
1286         * mini-x86.c (mono_arch_emit_call): The decompose code now supports
1287         decomposing 8 bytes structs into a LCALL.
1288
1289         * mini-x86.c (emit_move_return_value): We no longer push the vtype
1290         pointer for where to store the returned regs.
1291
1292         * decompose.c (mono_decompose_vtype_opts): Fix the comment to properly
1293         state the concern.
1294
1295         Fixes #471747, #471751 and #4734530 (in fact, it's a bunch of dups).
1296
1297 2009-05-20  Miguel de Icaza  <miguel@novell.com>
1298
1299         * aot-runtime.c (mono_aot_init): Use g_getenv to work on systems
1300         without getenv.
1301
1302 2009-05-21  Zoltan Varga  <vargaz@gmail.com>
1303
1304         * aot-compiler.c (add_wrappers): Add StructureToPtr/PtrToStructure wrappers.
1305
1306         * basic.cs: Move the test_2_cprop_bug () test to generics.cs as it involves
1307         generics.
1308
1309 2009-05-20 Rodrigo Kumpera  <rkumpera@novell.com>
1310
1311         * local-propagation.c (mono_local_cprop): Avoid local propagation
1312         across paired add/sub if the first instruction dest reg is it's
1313         source reg. For example:
1314
1315         int_add_imm R12 <- R12 [1] clobbers: 1
1316         int_sub_imm R42 <- R12 [1] clobbers: 1
1317
1318         The cprop pass would wrongly const prop + 1 to int_sub_imm which doesn't
1319         maintain the math identify.
1320
1321         Fixes #505375.
1322
1323 2009-05-20  Andreia Gaita  <avidigal@novell.com>
1324
1325         * Makefile.am: avoid going on the network just to get the revision,
1326         use git log instead
1327
1328 2009-05-19  Massimiliano Mantione  <massi@ximian.com>
1329
1330         Fixed estimate for short branches on amd64 (they were off mark, and
1331         enabling call prolog-epilog instrumentations caused assertions).
1332         * mini.h (struct MonoBasicBlock): added max_length field to hold the
1333         estimate for the maximum length of this basic block.
1334         * mini-amd64.c:
1335         - mono_arch_emit_prolog: compute max_length for each basic block
1336           (instead of max_offset), and inflate size estimate also for entry bb
1337           in case of code instrumentation.
1338         - mono_arch_output_basic_block: get rid of "cpos" (the current
1339           estimated "position" in the code), and always use "offset" instead,
1340           which is accurate; at the beginning of the function quickly recompute
1341           max_offset for all the remaining blocks, starting from the current
1342           cfg->code_len (which is correct, and not estimated) and using the
1343           estimated block lengths computed previously.
1344
1345 2009-05-17  Zoltan Varga  <vargaz@gmail.com>
1346
1347         * exceptions-ppc.c: Remove the caching from the trampoline creation 
1348         functions, it is already done in the caller.
1349
1350         * mini-trampolines.c (mono_llvm_vcall_trampoline): Fix the llvm build.
1351
1352         * mini-ppc.h mini-arm.h mini-x86.h mini-amd64.h: Add 
1353         MONO_ARCH_GSHARED_SUPPORTED define.
1354
1355         * mini.c (mini_init): Use the MONO_ARCH_GSHARED_SUPPORTED define.
1356
1357         * mini-arm.c mini.c: Get rid of the unused mono_arch_fixup_jinfo ()
1358         function.
1359
1360 2009-05-16  Zoltan Varga  <vargaz@gmail.com>
1361
1362         * jit-icalls.c (mono_helper_compile_generic_method): Get rid of the 
1363         call to mono_marshal_get_rgctx_invoke ().
1364
1365         * mini.c method-to-ir.c mini-trampolines.c: Get rid of the usage of
1366         mono_marshal_get_static_rgctx_invoke (), all platforms which support
1367         gshared use the static rgctx trampolines now.
1368         
1369         * mini.c (mini_init): Call mono_set_generic_sharing_supported () if the
1370         platform supports it.
1371
1372 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
1373
1374         * mini-arm.c (mono_arch_allocate_vars): Correctly save R5 when using AOT.
1375
1376         * aot-compiler.c (emit_method_code): Avoid duplicate labels for methods.
1377
1378 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
1379
1380         * mini-ppc.c (mono_arch_emit_exceptions): Nullify the processed patches.
1381
1382         * tramp-ppc.c (mono_arch_nullify_class_init_trampoline): Implement this
1383         for ppc.
1384
1385 2009-05-15  Massimiliano Mantione  <massi@ximian.com>
1386
1387         Made it possible for mono_arch_instrument_epilog to preserve
1388         argument registers, otherwise instrumenting the "epilogue" before
1389         a tail call would clobber them.
1390         * mini.h: Added "mono_arch_instrument_epilog_full" prototype, which
1391         if like mono_arch_instrument_epilog but with an additional parameter
1392         that states if argument registers must be preserved.
1393         * mini.c: implemented mono_arch_instrument_epilog as a call to
1394         mono_arch_instrument_epilog_full without asking to preserve argument
1395         registers (this makes the existing code work as usual).
1396         * mini-amd64.c:
1397         - mono_arch_instrument_epilog: add parameter to transform it into
1398         mono_arch_instrument_epilog_full, and preserve argument registers
1399         when required.
1400         - mono_arch_output_basic_block, OP_TAILCALL case: call
1401         mono_arch_instrument_epilog_full.
1402         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
1403         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c, mini-x86.c:
1404         only transformed mono_arch_instrument_epilog into
1405         mono_arch_instrument_epilog_full.
1406
1407 2009-05-15  Geoff Norton  <gnorton@novell.com>
1408
1409         * mini-darwin.c: This works on arm now.
1410
1411 2009-05-14  Geoff Norton  <gnorton@novell.com>
1412
1413         * jit.h, driver.c: Allow full-aot to be decided programatically by the
1414         embedding api.
1415
1416 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
1417
1418         * aot-compiler.c (emit_method_code): Skip a few more characters in the debug
1419         label names.
1420
1421         * mini-trampolines.c (mono_magic_trampoline): Handle static rgctx invoke
1422         wrappers during full aot mode correctly.
1423
1424         * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle shared generic
1425         methods correctly.
1426
1427         * aot-compiler.c (mono_aot_method_hash): Use our internal version of
1428         mono_metadata_type_hash ().
1429
1430 2009-05-14  Massimiliano Mantione  <massi@ximian.com>
1431
1432         * mini.h, mini-codegen.c, mini-alpha.c, mini-amd64.c, mini-arm.c,
1433         mini-hppa.h, mini-hppa.c, mini-ia64.c, mini-mips.h, mini-mips.c,
1434         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c, mini-886.c:
1435         Removed MONO_INST_BRLABEL from the instruction flags, and the
1436         remaining code that used it, because we do not support branches inside
1437         basic blocks (and branch target labels) anymore.
1438         * Makefile.am: As part of the above cleanup, remove reference to
1439         BURG files which don't exist anymore.
1440
1441 2009-05-14  Zoltan Varga  <vargaz@gmail.com>
1442
1443         * image-writer.c (asm_writer_emit_local_symbol): Make this a nop on
1444         osx.
1445
1446         * mini-mips.c mini-mips.h exceptions-mips.c: Transition the mips backend
1447         to use mono_arch_throw_corlib_exception.
1448
1449         * mini-ppc.c mini-ppc.h exceptions-ppc.c: Use 
1450         mono_arch_throw_corlib_exception for throwing corlib exceptions.
1451
1452         * aot-runtime.c (decode_patch): Allocate the data for R4/R8 from the
1453         domain mempool.
1454
1455         * mini.c (mono_patch_info_dup_mp): Copy the table of switch targets too.
1456
1457         * aot-compiler.c: Emit a local symbol prefixed with the assembly name 
1458         for the got to make debugging easier and to avoid confusing it with the
1459         system got.
1460         
1461         * aot-compiler.c (emit_method_code): Emit a C style symbol for each
1462         method so a breakpoint can be set when using gdb.
1463
1464 2009-05-13  Zoltan Varga  <vargaz@gmail.com>
1465
1466         * aot-compiler.c (mono_aot_method_hash): Implement this properly based
1467         on mono_method_get_imt_slot ().
1468
1469         * aot-runtime.c (find_extra_method_in_amodule): Get rid of the
1470         num_decodes variables.
1471
1472         * aot-compiler.c (mono_aot_method_hash): Revert part of the last
1473         change as it doesn't seem to work.
1474         
1475         * aot-compiler.c (mono_aot_method_hash): Improve the hashing of
1476         wrappers.
1477
1478 2009-05-12  Zoltan Varga  <vargaz@gmail.com>
1479
1480         * aot-compiler.c mini.c mini-amd64.h mini-arm.h: Kill 
1481         MONO_ARCH_FULL_AOT_IMT_SUPPORTED define, both platforms now support imt.
1482
1483         * mini.c (mini_init): Install mono_aot_get_imt_thunk as the IMT thunk
1484         builder when using full aot.
1485
1486         * mini-amd64.c (mono_arch_build_imt_thunk): Don't handle the full-aot case
1487         here, it is already handled.
1488         
1489         * mini-arm.c (mono_arch_emit_imt_argument): Pass the dynamic imt arg
1490         correctly for IMT.
1491
1492         * aot-compiler.c (arch_emit_imt_thunk): Implement this for ARM.
1493
1494         * mini-arm.h: Enable IMT for full aot.
1495         
1496         * aot-compiler.c (mono_compile_assembly): Don't emit imt thunk if the
1497         arch doesn't support it.
1498
1499         * mini.c (mini_init): Don't disable IMT for full aot if the
1500         architecture supports it.
1501
1502         * mini.h (MonoAotTrampoline): New enum containing the different types
1503         of 'numerous' trampolines.
1504         (MONO_AOT_FILE_VERSION): Bump this.
1505
1506         * aot-compiler.c aot-runtime.c: Unify the handling of specific and
1507         static rgctx trampolines. Add support for full-aot IMT thunks.
1508
1509         * mini-amd64.h: Enable IMT for full aot.
1510
1511         * TestDriver.cs: Add a CategoryAttribute class and an --exclude option
1512         to exclude tests belonging to a category.
1513
1514         * generics.cs: Mark some tests with a !FULLAOT category.
1515
1516         * Makefile.am (fullaotcheck): Run tests with --exclude !FULLAOT. Include
1517         generics tests.
1518
1519 2009-05-11  Zoltan Varga  <vargaz@gmail.com>
1520
1521         * aot-compiler.c (emit_and_reloc_code): Move the implementation of
1522         MONO_PATCH_INFO_GOT_OFFSET to a separate arch-specific function.
1523         (emit_plt): Fix a warning.
1524
1525 2009-05-10  Zoltan Varga  <vargaz@gmail.com>
1526
1527         * aot-compiler.c aot-runtime.c: Fix the build by moving is_shared_got_patch
1528         back into aot-compiler.c to a place where the other functions shared by
1529         the runtime and aot compiler are.
1530         
1531         * aot-compiler.c aot-runtime.c: Emit the got addr using a separate symbol,
1532         as done previously, instead of in MonoAotFileInfo, since pointers might have
1533         alignment requirements.
1534
1535         * mini.h: Bump AOT file format version.
1536
1537 2009-05-10  Miguel de Icaza  <miguel@novell.com>
1538
1539         * aot-runtime.c (mono_aot_is_shared_got_patch): Move this routine
1540         that is used at runtime from the aot-compiler.c, this makes it
1541         work on setups that remove the AOT compiler from the output
1542         image. 
1543
1544 2009-05-09  Zoltan Varga  <vargaz@gmail.com>
1545
1546         * tramp-ppc.c (mono_arch_get_static_rgctx_trampoline): Implement this for
1547         PPC.
1548
1549         * mini-ppc.h: Enable static rgctx trampolines for ppc.
1550
1551         * mini-<ARCH>.h: Kill the MONO_ARCH_ENABLE_EMIT_STATE_OPT define.
1552
1553         * decompose.c (mono_decompose_long_opts): Move the ppc/sparc specific 
1554         stuff to mono_arch_decompose_long_opts ().
1555         (mono_decompose_opcode): Remove some dead code.
1556
1557 2009-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
1558
1559         * method-to-ir.c (mono_method_to_ir): Fix boostrap of non amd64 builds
1560         cmethod can be null for quite a some reasons.
1561
1562 2009-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
1563
1564         * method-to-ir.c (mono_method_to_ir): Fix non amd64 builds.
1565
1566 2009-05-08  Zoltan Varga  <vargaz@gmail.com>
1567
1568         * aot-compiler.c (arch_emit_got_access): Fix the aot-not-supported build.
1569
1570 2009-05-08  Zoltan Varga  <vargaz@gmail.com>
1571
1572         * method-to-ir.c (mono_emit_call_args): Add a 'tail' flag argument.
1573         (mono_method_to_ir): Use MONO_ARCH_USE_OP_TAIL_CALL macro to determine
1574         whenever to make tail calls using OP_TAIL_CALL. Enable support for tail
1575         calls returning structures by addr on amd64.
1576
1577         * mini-amd64.h (MONO_ARCH_USE_OP_TAIL_CALL): New arch-specific macro.
1578
1579         * iltests.il.in: Restructure the tail call tests a bit.
1580         
1581 2009-05-07  Zoltan Varga  <vargaz@gmail.com>
1582
1583         * aot-compiler.c (add_wrappers): Add remoting-invoke-with-check wrappers
1584         for virtual methods too.
1585
1586 2009-05-06  Raja R Harinath  <harinath@hurrynot.org>
1587
1588         * method-to-ir.c (mono_method_to_ir): Revert change of 2009-05-02
1589         due to regression in verifying System.dll.
1590
1591 2009-05-06  Zoltan Varga  <vargaz@gmail.com>
1592
1593         * debug-mini.c (mono_debugger_method_has_breakpoint): Allow breakpoints
1594         in dynamic methods.
1595
1596         * dwarfwriter.c (emit_class_dwarf_info): Add support for generic
1597         instances.
1598
1599         * aot-compiler.c aot-runtime.c: Use our own hash function instead of
1600         g_str_hash () which can change.
1601
1602         * driver.c (mini_regression): Disable optimizations not supported by
1603         the cpu. Fixes #500019.
1604
1605         * aot-runtime.c (mono_aot_get_unwind_info): Fix the --enable-minimal=aot
1606         build.
1607
1608 2009-05-06  Zoltan Varga  <vargaz@gmail.com>
1609
1610         * mini-llvm.c (mono_llvm_emit_method): Update the OP_TLS_GET implementation
1611         to the latest LLVM code.
1612
1613 2009-05-05  Zoltan Varga  <vargaz@gmail.com>
1614
1615         * genmdesc.pl (load_opcodes): Fix this after the TARGET_... changes.
1616
1617 2009-05-04  Zoltan Varga  <vargaz@gmail.com>
1618
1619         * mini-llvm.c (mono_llvm_emit_method): Implement TLS support on 
1620         x86/amd64.
1621
1622         * aot-compiler.c (encode_patch_list): Simplify this considerably as we are
1623         no longer saving offsets, so just save the patch types along with the other
1624         info.
1625         * aot-runtime.c (load_patch_info): Update after the changes to 
1626         encode_patch_list ().
1627         (decode_got_entry): Removed, merged into load_patch_info ().
1628         (is_shared_got_patch): Removed, call the same function from
1629         aot-compiler.c.
1630
1631         * mini.h: Bump aot file format version.
1632         
1633         * aot-compiler.c aot-runtime.c: Resurrect static linking support. Kill the
1634         half-finished no-dlsym code.
1635
1636         * aot-runtime.c (load_method): Kill the old and bit-rotten use_loaded_code
1637         option.
1638
1639         * mini-<ARCH>.h mini-trampolines.c aot-runtime.c: Kill the 
1640         MONO_ARCH_HAVE_CREATE_TRAMPOLINE_FROM_TOKEN define.
1641
1642 2009-05-02  Zoltan Varga  <vargaz@gmail.com>
1643
1644         * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Increase the
1645         buffer length to work with AOT code.
1646
1647         * method-to-ir.c (mono_method_to_ir): Handle loading errors in the
1648         ldfld/stfld opcodes.
1649
1650         * exceptions-x86.c (mono_arch_get_throw_exception_by_name): Simplify this
1651         as it is not used.
1652
1653         * mini-llvm.c mini-x86.c: Implement 32 bit and x86 support.
1654
1655         * ssa.c (mono_ssa_compute): Don't skip I8 values when using LLVM.
1656
1657         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Update to the latest
1658         LLVM API.
1659
1660         * mini.c (mini_method_compile): Set the from_llvm flag in MonoJitInfo
1661         if needed. Don't decompose long operations when using llvm.
1662
1663 2009-05-01  Zoltan Varga  <vargaz@gmail.com>
1664
1665         * aot-compiler.c aot-runtime.c: Use mono_pagesize () instead of the
1666         PAGESIZE constant.
1667
1668         * aot-runtime.c (load_aot_module): Get rid of another mprotect call.
1669
1670 2009-05-03  Martin Baulig  <martin@ximian.com>
1671
1672         * debug-debugger.c (debugger_insert_source_breakpoint): Don't call
1673         mono_debugger_insert_method_breakpoint() since the class init
1674         handler we're inserting at the top of the method already gives us
1675         a notification.
1676
1677 2009-04-30  Zoltan Varga  <vargaz@gmail.com>
1678
1679         * decompose.c (mono_decompose_long_opts): Move the implementation of LNEG
1680         to mono_arch_decompose_long_opts () for x86 and arm.
1681
1682 2009-04-29  Zoltan Varga  <vargaz@gmail.com>
1683
1684         * mini-codegen.c (mono_regstate_alloc_int): Use __x86_64__ instead of
1685         TARGET_AMD64 here.
1686
1687 2009-04-28  Zoltan Varga  <vargaz@gmail.com>
1688
1689         * *.h *.c: Use TARGET_<ARCH> defines instead of __<arch>__ defines in the
1690         JIT code.
1691
1692 2009-04-26  Zoltan Varga  <vargaz@gmail.com>
1693
1694         * aot-runtime.c (mono_aot_create_specific_trampoline): Add a stat for the
1695         number of trampolines used in full-aot mode.
1696
1697         * aot-compiler.c: Add an ntrampolines option to set the number of 
1698         trampolines emitted in full-aot mode.
1699
1700 2009-04-27  Zoltan Varga  <vargaz@gmail.com>
1701
1702         * mini-llvm.c (mono_llvm_emit_method): Implement OP_CHECK_THIS using
1703         a volatile load. Get rid of get_tempname (), llvm assigns names
1704         automatically.
1705
1706         * mini-llvm-cpp.cpp (mono_llvm_build_volatile_load): New instruction
1707         builder function.
1708
1709         * mini-llvm.c (mono_llvm_emit_method): Don't call LLVMGetParam on
1710         a value.
1711
1712         * abcremoval.c (REPORT_ABC_REMOVAL): Don't output messages at verbose
1713         level 1.
1714
1715         * mini-codegen.c (mono_local_regalloc): Prevent sreg1/dreg to be allocated
1716         to the same register as a fixed sreg2. Fixes #497271.
1717
1718         * iltests.il.in: Add a new test.
1719
1720 2009-04-26  Zoltan Varga  <vargaz@gmail.com>
1721
1722         * mini-amd64.c: Use moves instead of pushes for passing arguments on the
1723         stack, since pushes complicate exception handling.
1724
1725         * exceptions-amd64.c (mono_arch_find_jit_info): Don't pop the arguments of
1726         the stack if they are passed using moves.
1727
1728         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add an assert.
1729
1730         * method-to-ir.c (mono_method_to_ir): Disable fast virtual generic methods
1731         when using llvm.
1732
1733         * mini-llvm.c (mono_llvm_emit_method): Call jit icall wrappers, not the 
1734         icalls themselves. Convert arguments of FCOMPARE. Convert the destination
1735         of FMOVE if it is an R4.
1736
1737 2009-04-25  Zoltan Varga  <vargaz@gmail.com>
1738
1739         * mini-ops.h: Add OP_LLVM_OUTARG_VT opcode.
1740
1741         * mini.h (LLVMCallInfo): New structure to store calling convention 
1742         information for the LLVM back end similar to the CallInfo structures in 
1743         the back-ends.
1744
1745         * mini-amd64.c (mono_arch_get_llvm_call_info): New arch function to return
1746         call information in a format usable by LLVM.
1747         (mono_arch_emit_call): Move the LLVM handling code to mono_llvm_emit_call ().
1748
1749         * method-to-ir.c (mono_emit_call_args): Emit calls using 
1750         mono_llvm_emit_call () when compiling using LLVM.
1751
1752         * mini-llvm.c: Implement support for passing/receiving valuetypes. Add
1753         comments to all functions. Fix memory leaks. Add a public init/cleanup
1754         function.
1755
1756         * mini.c: Call the llvm init/cleanup functions in mini_init()/cleanup().
1757
1758         * method-to-ir.c (handle_array_new): Disable llvm when calling the vararg
1759         mono_array_new_va () jit icall.
1760         
1761 Fri Apr 24 16:44:08 CEST 2009 Paolo Molaro <lupus@ximian.com>
1762
1763         * Makefile.am, genmdesc.c, genmdesc.pl: tiny refactor to allow
1764         multiple machine description files to be specified.
1765         * mini-ops.h: fixes for cross-compilation.
1766
1767 2009-04-22  Miguel de Icaza  <miguel@novell.com>
1768
1769         * aot-runtime.c (make_writable): Use mono_mprotect to simplify
1770         some porting work.
1771
1772 2009-04-22  Zoltan Varga  <vargaz@gmail.com>
1773
1774         * method-to-ir.c (mono_method_to_ir): Force init_locals to be TRUE
1775         to prevent asserts in various passes. Fixes #497220.
1776
1777 2009-04-21  Zoltan Varga  <vargaz@gmail.com>
1778
1779         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove
1780         a racy assert.
1781
1782         * aot-compiler.c aot-runtime.c: Emit the unwind info into a separate
1783         table to avoid duplicates.
1784
1785         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
1786         
1787         * aot-compiler.c (emit_method_code): Avoid writing symbols if the nodebug
1788         option is used.
1789
1790 2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>
1791
1792         * mini.c (mini_method_verify): Fail fulltrust code if the exception
1793         is for method or field access.
1794
1795 2009-04-20  Zoltan Varga  <vargaz@gmail.com>
1796
1797         * mini-llvm-cpp.cpp (mono_llvm_dump_value): New helper function to print
1798         a Value to stdout.
1799
1800         * mini-llvm.c (mono_llvm_emit_method): Use it.
1801         
1802         * mini-llvm.c (type_to_llvm_type): Fix the mapping of enums.
1803         (mono_llvm_emit_method): Add support for CAS. Fix handling of CSET opcodes
1804         on volatile values.
1805
1806         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add support for 
1807         synchronized methods.
1808
1809         * mini.c (mini_method_compile): Disable LLVM for dynamic methods.
1810
1811         * mini.c (mini_method_compile): Enable ABCREM when running with LLVM.
1812
1813         * mini-llvm.c (mono_llvm_emit_method): Add support for OP_LOADI4_MEM/
1814         OP_LOADI8_MEM.
1815
1816         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Add a MONO_LLVM env variable
1817         allowing some options to be set dynamically.
1818
1819 2009-04-19  Zoltan Varga  <vargaz@gmail.com>
1820
1821         * mini-llvm.c (mono_llvm_emit_method): Handle compares followed by an
1822         unconditional branch.
1823
1824         * mini.h (MonoTrampolineType): Add new trampoline type 
1825         'MONO_TRAMPOLINE_LLVM_VCALL' which handles virtual calls made from LLVM
1826         compiled code.
1827
1828         * mini-trampolines.c (mono_llvm_vcall_trampoline): New C trampoline 
1829         function.
1830
1831         * mini-trampolines.c (mono_create_llvm_vcall_trampoline): New trampoline
1832         creation function.
1833
1834         * mini.c (mini_init): Avoid using the common vtable trampoline when LLVM
1835         is enabled. Instead, use the llvm vcall trampoline.
1836         
1837         * mini-trampolines.c (mono_get_vcall_slot_addr): New helper function.
1838
1839         * mini-trampolines.c tramp-amd64.c tramp-x86.c: Use it.
1840         
1841         * mini-<ARCH>.c: Get rid of the identical mono_arch_get_vcall_slot_addr ()
1842         functions.
1843
1844         * mini-<ARCH>.h mini-trampolines.c mini.c: Get rid of 
1845         MONO_ARCH_COMMON_VTABLE_TRAMPOLINE, it is supported by all archs.
1846
1847         * mini-ia64.c (mono_arch_lowering_pass): Null out the sregs of the
1848         OP_IA64_CSET opcode.
1849
1850         * mini.c: Fix a warning.
1851
1852         * mini-llvm.c (mono_llvm_emit_method): Convert arguments of SWITCH and
1853         THROW to the appropriate llvm type.
1854
1855 2009-04-18  Zoltan Varga  <vargaz@gmail.com>
1856
1857         * mini.c (mini_method_compile): Add statistics for methods JITted
1858         with/without LLVM.
1859
1860 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
1861
1862         * method-to-ir.c: Fix the computation of ins_sreg_counts for ia64
1863         OP_IA64_CMP_<cond>_IMM opcodes.
1864
1865 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
1866
1867         * mini-llvm.c (emit_cond_system_exception): Implement throwing of
1868         corlib exceptions.
1869
1870         * dwarfwriter.c (mono_dwarf_writer_emit_method): Handle --regression
1871         correctly.
1872
1873         * mini-llvm.c (type_to_llvm_type): Avoid accessing t->data.klass for
1874         GENERICINST.
1875
1876 2009-04-17  Atsushi Enomoto  <atsushi@ximian.com>
1877
1878         * mini-exceptions.c : add thread id to EXCEPTION trace message.
1879
1880 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
1881
1882         * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Fix AOT
1883         support.
1884
1885         * tramp-x86.c (mono_arch_get_unbox_trampoline): Implement static
1886         rgctx invoke trampolines for x86.
1887
1888         * mini-x86.c (mono_arch_output_basic_block): Add a few nops before
1889         indirect calls to simplify get_vcall_slot_addr (). Fixes #494567.
1890         (mono_arch_get_vcall_slot): Simplify this.
1891
1892 2009-04-16  Zoltan Varga  <vargaz@gmail.com>
1893
1894         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Move the calls to
1895         mono_debug_add_delegate_trampoline () to get_delegate_invoke_impl ().
1896
1897 2009-04-14  Zoltan Varga  <vargaz@gmail.com>
1898
1899         * aot-compiler.c tramp-arm.c mini-arm.c: Implement static rgctx 
1900         trampolines for ARM. Add full-aot support for delegate invokes for ARM.
1901
1902         * mini-trampolines.c (mono_magic_trampoline): Fix the build.
1903
1904         * liveness.c (visit_bb): Remove a needless assert.
1905
1906 2009-04-13  Zoltan Varga  <vargaz@gmail.com>
1907
1908         * mini-trampolines.c (mono_create_delegate_trampoline): Delegate the
1909         full aot support to the arch specific code.
1910
1911         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Add full-aot support.
1912
1913         * aot-compiler.c (emit_trampolines): Emit delegate invoke impl trampolines.
1914
1915         * aot-compiler.c (emit_named_code): Rename this to 'emit_trampoline'.
1916         
1917         * mini-amd64.c (mono_arch_get_delegate_invoke_impls): New function to
1918         collect information about the delegate invoke impl trampolines.
1919
1920         * mini.h (MonoAotTrampInfo): New structure collecting the information needed
1921         to save trampolines during full-aot mode.
1922
1923         * mini-trampolines.c (mono_create_static_rgctx_trampoline): New trampoline
1924         creation function which returns a trampoline which sets the rgctx
1925         argument.
1926         (mono_magic_trampoline): Use the rgctx trampoline instead of an rgctx
1927         wrapper if possible.
1928         (mono_delegate_trampoline): Ditto.
1929
1930         * mini.c (mono_jit_runtime_invoke): Ditto.
1931
1932         * tramp-amd64.c: Add an implemention of static rgctx trampolines for AMD64.
1933         
1934         * aot-compiler.c aot-runtime.c: Add support for static rgctx trampolines.
1935
1936         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
1937         
1938 2009-04-12  Zoltan Varga  <vargaz@gmail.com>
1939
1940         * mini-ia64.c (mono_arch_lowering_pass): Use NULLIFY_INS instead of
1941         just setting the opcode to OP_NOP.
1942
1943 2009-04-11  Zoltan Varga  <vargaz@gmail.com>
1944
1945         * mini.c (mini_method_compile): Put the last change inside an 
1946         #ifdef MONO_ARCH_HAVE_LIVERANGE_OPS.
1947         
1948         * mini.c (mini_method_compile): Disable sharing of stack slots/registers
1949         and extend live ranges to cover the whole method when using xdb.
1950
1951         * jit-icalls.c (ldvirtfn_internal): Avoid creating rgctx wrappers here,
1952         do it in the trampolines.
1953
1954         * mini-trampolines.c (mono_magic_trampoline): Add an rgctx wrapper if
1955         needed.
1956
1957         * mini-trampolines.c (mono_delegate_trampoline): Ditto.
1958         
1959         * method-to-ir.c (mono_method_to_ir): Avoid using the fast virtual method
1960         call code in full-aot mode since IMT is disabled there.
1961         (mono_method_to_ir): Inline ldfld wrappers which return structures too, the
1962         new JIT no longer has that restriction.
1963
1964         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
1965
1966         * aot-compiler.c (emit_extra_methods): Emit the wrapper method names in
1967         a more compact format.
1968         (mono_aot_wrapper_name): New function to return a unique name for a
1969         wrapper method, also used by the AOT runtime.
1970
1971         * aot-runtime.c (find_extra_method_in_amodule): Update after the changes to
1972         aot-compiler.c.
1973
1974         * aot-compiler.c (add_generic_class): Add the helper methods from T[]
1975         when a ICollection<T> etc is encountered.
1976         (add_generic_instances): Process method arguments/locals too.
1977         (emit_trampolines): Emit unbox trampolines for extra methods too. Shorten
1978         trampoline names.
1979
1980         * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle extra methods too.
1981         
1982 2009-04-10  Zoltan Varga  <vargaz@gmail.com>
1983
1984         * aot-compiler.c: Disable the AOT compiler if the JIT is disabled.
1985
1986         * dwarfwriter.c (emit_type): Emit byref to reference types as 'int' for now.
1987
1988         * decompose.c (mono_decompose_opcode): Make this return a MonoInst*
1989         representing the result of the decomposition. Nullify instructions
1990         instead of setting them to OP_NOP since nops can't have registers
1991         set.
1992
1993 2009-04-09  Zoltan Varga  <vargaz@gmail.com>
1994
1995         * aot-compiler.c (mono_compile_assembly): Split this huge function into
1996         smaller parts. Add 'nodebug' option to prevent generation of DWARF debug
1997         info. Strip 'mapping symbols' on ARM.
1998
1999         * iltests.il.in (test_0_fconv_to_i): Disable this on ARM too.
2000         
2001         * genmdesc.pl: Applied patch by Martin Fuzzey (mfuzzey@parkeon.com). Sync
2002         this with the native genmdesc.
2003
2004 2009-04-08  Bill Holmes  <billholmes54@gmail.com>
2005
2006         * aot-runtime.c:  Fixing the MSVC build.
2007
2008         Code is contributed under MIT/X11 license.
2009
2010 2009-04-08  Zoltan Varga  <vargaz@gmail.com>
2011
2012         * mini-llvm.c (mono_llvm_emit_method): Pass i1/i2 arguments as i4 since 
2013         JITted code depends on it.
2014
2015 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
2016
2017         * aot-compiler.c: Use new MonoGenericParam accessors.
2018
2019 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
2020
2021         Reduce memory usage and improve correctness wrt MonoGenericParam
2022         * aot-runtime.c (decode_klass_ref): Simplify generic parameter
2023         handing.  Avoid allocating MonoGenericParams, but use the ones in
2024         the container itself.
2025
2026 2009-04-07  Miguel de Icaza  <miguel@novell.com>
2027
2028         * tasklets.c: Return exceptions in the out argument.
2029
2030 2009-04-08  Zoltan Varga  <vargaz@gmail.com>
2031
2032         * mini-llvm.c (mono_llvm_emit_method): Fix alignment in the LOCALLOC_IMM
2033         opcode. Use pointer types in more places instead of casting them to 
2034         integers.
2035
2036         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Create a pass manager to run
2037         optimizations.
2038         (mono_llvm_optimize_method): New helper function to optimize a method.
2039
2040         * method-to-ir.c (mono_emit_widen_call_res): Extract the call result 
2041         widening code so it could be called from more places.
2042         (mono_method_to_ir): Call mono_emit_widne_call_res () in several more
2043         code paths in the call opcodes.
2044
2045 Mon Apr 6 14:19:54 CEST 2009 Paolo Molaro <lupus@ximian.com>
2046
2047         * exceptions-amd64.c, mini-amd64.h: amd64 support code for continuations.
2048
2049 2009-04-06  Zoltan Varga  <vargaz@gmail.com>
2050
2051         * dwarfwriter.c: Use _ to separate class name 
2052         components as gdb can't handle '.'. Represent reference variables
2053         as 'class <NAME>&'.
2054         
2055         * mini.h (MonoCompile): Add locals_min_stack_offset/locals_max_stack_offset.
2056
2057         * mini-amd64.c (mono_arch_allocate_vars): Save min/max stack offset.
2058         
2059         * mini-gc.c: New file, contains the SGEN GC related parts of the JIT.
2060
2061         * gc-test.cs: New file with GC stack marking tests.
2062         
2063         * mini-arm.c (mono_arch_output_basic_block): Fix int->float conversion of
2064         negative numbers for vfp.
2065
2066         * basic-float.cs: Add a test.
2067         
2068 Mon Apr 6 14:12:10 CEST 2009 Paolo Molaro <lupus@ximian.com>
2069
2070         * exceptions-x86.c, mini-x86.h: x86 support code for continuations.
2071
2072 Mon Apr 6 14:09:53 CEST 2009 Paolo Molaro <lupus@ximian.com>
2073
2074         * tasklets.h, tasklets.c, mini.h, mini.c, Makefile.am: arch-indep
2075         part of tasklet/continuation support.
2076
2077 2009-04-05  Zoltan Varga  <vargaz@gmail.com>
2078
2079         * mini-llvm.c (mono_llvm_emit_method): Move the handling of
2080         amd64 opcodes inside an ifdef.
2081
2082         * dwarfwriter.c: Emit inheritance information for classes, emit fields
2083         of complex types.
2084         
2085         * dwarfwriter.c (emit_type): Emit the class info for classes.
2086
2087 2009-04-04  Zoltan Varga  <vargaz@gmail.com>
2088
2089         * Makefile.am (AM_CXXFLAGS): Add GLIB_CFLAGS to this.
2090
2091         * mini-llvm-cpp.h: New header file for mini-llvm-cpp.cpp.
2092
2093         * mini-llvm.c: Remove unused fields from EmitContext, fix memory leaks.
2094
2095         * ssa.c (mono_ssa_compute): Fix some memory leaks.
2096
2097 2009-04-03  Zoltan Varga  <vargaz@gmail.com>
2098
2099         * mini.c mini-amd64.c method-to-ir.c: Use COMPILE_LLVM in a few more places.
2100
2101         * mini-llvm.c: Update comments.
2102
2103         * mini.h (COMPILE_LLVM): New macro.
2104
2105         * decompose.c (mono_decompose_opcode): Use the COMPILE_LLVM macro.
2106
2107         * ssa.c (mono_ssa_compute): Ditto.
2108         
2109         * unwind.c (mono_unwind_get_ops_from_fde): New helper function to extract
2110         the unwind ops from a DWARF FDE.
2111
2112         * mini-llvm.c: Implement generation of unwind info for LLVM compiled
2113         methods by extracting the dwarf unwind ops from the unwind info generated
2114         by LLVM.
2115         
2116         * mini-llvm.c (mono_llvm_emit_method): Enable support for non-IMT virtual
2117         calls.
2118
2119         * mini-amd64.c (mono_arch_get_vcall_slot): Handle more kinds of the SIB
2120         addressing modes.
2121
2122 2009-04-02  Zoltan Varga  <vargaz@gmail.com>
2123
2124         * Makefile.am (llvm_sources): Enable this.
2125
2126         * mini.c (mini_method_compile): Add support for compiling with LLVM, 
2127         failing back to the JIT if something cannot be handled.
2128
2129         * mini-amd64.c (mono_arch_emit_call): Emit the arguments more simple when
2130         compiling with LLVM.
2131
2132         * decompose.c (mono_decompose_opcode): Avoid decomposing some opcodes when
2133         compiling with LLVM.
2134
2135         * method-to-ir.c (mono_method_to_ir): Avoid decomposing SWITCH when 
2136         compiling with LLVM.
2137
2138         * mini-ops.h: Add a few opcodes needed by LLVM.
2139
2140         * dwarfwriter.c (mono_dwarf_writer_emit_method): Avoid crashes if the method
2141         has no unwind info.
2142
2143         * mini-llvm.c mini-llvm-cpp.cpp: New files containing the experimental llvm
2144         backend.
2145
2146         * mini-arm.c (mono_arch_output_basic_block): Fix the ARM_FPU_NONE build.
2147
2148         * mini-arm.h mini-arm.c cpu-arm.md: Finish VFP support.
2149
2150 2009-04-01  Mark Probst  <mark.probst@gmail.com>
2151
2152         * regalloc.h, mini-codegen.c: Make vassign members gint32 to fix
2153         ridiculously large methods.
2154
2155 2009-03-31  Martin Baulig  <martin@ximian.com>
2156
2157         * debug-debugger.c (debugger_remove_breakpoint): Call
2158         mono_debugger_remove_class_init_callback ().
2159
2160 2009-03-31  Zoltan Varga  <vargaz@gmail.com>
2161
2162         * aot-compiler.c (mono_compile_assembly): Call img_writer_emit_start ()
2163         right before emitting code, not at the start.
2164
2165         * mini.c (mono_postprocess_patches): Extract this into a separate function
2166         from mono_codegen ().
2167
2168         * ssa.c (mono_ssa_compute): Set ins->klass for every PHI node, handle
2169         byref types correctly.
2170
2171 2009-03-30  Zoltan Varga  <vargaz@gmail.com>
2172
2173         * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix a crash introduced
2174         by the last change.
2175
2176 2009-03-29  Zoltan Varga  <vargaz@gmail.com>
2177
2178         * mini-amd64.c (mono_arch_output_basic_block): Emit a few nops before 
2179         indirect calls, this avoids problems where get_vcall_slot () would get
2180         confused by the native code for the instruction preceeding the call.
2181         (mono_arch_get_vcall_slot): Simplify this.
2182         (mono_arch_emit_imt_argument): Remove this, it is no longer needed.
2183
2184         * mini-ops.h: Fix the definitions of the OP_IA64 opcodes, since the local
2185         register allocator now seems to depend on them instead of the data in
2186         cpu-<ARCH>.md.
2187
2188         * mini.c (mini_method_compile): Throw the correct type of exception if
2189         mono_method_get_header () fails because of a loading error.
2190
2191 2009-03-28  Zoltan Varga  <vargaz@gmail.com>
2192
2193         * mini.c (mini_method_compile): Clear the loader error if the method
2194         header cannot be decoded.
2195
2196         * mini-trampolines.c (mono_magic_trampoline): Handle generic virtual 
2197         interface methods on proxies correctly.
2198
2199         * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix handling of the
2200         this argument for vtype methods. Add precise liveness info for arguments.
2201
2202         * mini-codegen.c (mono_print_ins_index): Print the vreg of the
2203         LIVERANGE_START/END opcodes.
2204
2205         * method-to-ir.c (mono_spill_global_vars): Fix liverange calculation
2206         for arguments and values in registers.
2207
2208 2009-03-27  Zoltan Varga  <vargaz@gmail.com>
2209
2210         * method-to-ir.c (mono_method_to_ir): Disable tail calls for calls which
2211         return a valuetype. Fixes #487518.
2212
2213         * iltests.il: Add a test.
2214         
2215         * aot-compiler.c: Use mono_thread_create () to create helper threads.
2216
2217         * mini-trampolines.c (mono_delegate_trampoline): Handle static delegates
2218         closed over a null reference correctly.
2219
2220 2009-03-26  Zoltan Varga  <vargaz@gmail.com>
2221
2222         * method-to-ir.c (mono_handle_global_vregs): Fix support for ternary ops.
2223
2224 2009-03-25  Mark Probst  <mark.probst@gmail.com>
2225
2226         * mini-codegen.c (mono_local_regalloc): Don't let sregs get
2227         allocated to the same registers as fixed sregs.
2228
2229 2009-03-24  Mark Probst  <mark.probst@gmail.com>
2230
2231         * mini-ops.h: New ternary ATOMIC_CAS ops replace the old
2232         ATOMIC_CAS_IMM ops.
2233
2234         * method-to-ir.c: Handle more cases for
2235         Interlocked.CompareExchange.
2236
2237         * cpu-x86.md, mini-x86.c, mini-x86.h, cpu-amd64.md, mini-amd64.c,
2238         mini-amd64.h, cpu-ppc.md, cpu-ppc64.md, mini-ppc.c, mini-ppc.h:
2239         ATOMIC_CAS implementations for x86, AMD64, PPC and PPC64.
2240
2241 2009-03-23  Zoltan Varga  <vargaz@gmail.com>
2242
2243         * aot-runtime.c (decode_method_ref): Fix a warning.
2244
2245         * unwind.c (mono_unwind_frame): Ditto.  
2246
2247 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
2248
2249         * aot-compiler.c (arch_emit_unbox_trampoline): Fix the binary writer support.
2250         (mono_compile_assembly): Enable the binary writer for full-aot as well.
2251
2252         * image-writer.c (do_reloc): Add support for the JUMP24 relocation,
2253         fix the handling of large values in the ALU_PC_G0_NC relocation.
2254
2255 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
2256
2257         * local-propagation.c method-to-ir.c local-propagation.c: Fix warnings.
2258
2259 2009-03-22  Mark Probst  <mark.probst@gmail.com>
2260
2261         * method-to-ir.c (mono_spill_global_vars): Support for ternary
2262         ops.
2263
2264 2009-03-22  Mark Probst  <mark.probst@gmail.com>
2265
2266         * method-to-ir.c: MINI_OP3 needs a comma.
2267
2268         * method-to-ir.c, mini.h, mini.c: Remove
2269         mono_init_op_sreg_counts ().
2270
2271 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
2272
2273         * mini-arm.c (mono_arch_output_basic_block): Fix aot support in
2274         OP_JMP.
2275         
2276         * mini-arm.c (mono_arch_build_imt_thunk): Disable the !fail_tramp
2277         assertion.
2278
2279         * mini-ops.h: Fix arguments of the MEMINDEX opcodes.
2280
2281         * mini-amd64.c (mono_arch_build_imt_thunk): Simplify the fail handling
2282         code somewhat.
2283
2284 2009-03-21  Mark Probst  <mark.probst@gmail.com>
2285
2286         * cfold.c, cprop.c, decompose.c, genmdesc.c, helpers.c, ir-emit.h,
2287         liveness.c, local-propagation.c, method-to-ir.c, mini-codegen.c,
2288         mini.c, mini.h, simd-intrinsics.c, ssa.c: Support for ternary IR
2289         operations.
2290
2291 2009-03-20  Zoltan Varga  <vargaz@gmail.com>
2292
2293         * driver.c: Change location of gc_wrapper.h.
2294
2295         * method-to-ir.c (mono_find_block_region): Handle try clauses nested
2296         inside finally clauses correctly. Fixes #485721.
2297
2298         * mini.c (mono_find_spvar_for_region): This needs to handle try regions
2299         after the change above.
2300
2301         * exceptions.cs: Add a test.
2302         
2303 2009-03-19  Zoltan Varga  <vargaz@gmail.com>
2304
2305         * unwind.c (mono_unwind_ops_encode): Increase the size of the encode buffer.
2306
2307         * mini-amd64.c (mono_arch_emit_epilog): Remove the encoding of stack size
2308         into cfg->used_int_regs, it is not needed with the dwarf unwinder.
2309         (mono_arch_compute_omit_fp): Remove the emit_epilog () workaround.
2310
2311         * mini-amd64.c (mono_arch_compute_omit_fp): Add another check to avoid hitting
2312         the stack_alloc_size < (1 << 16) assertion in emit_prolog ().
2313
2314 2009-03-19  Sebastien Pouliot  <sebastien@ximian.com>
2315
2316         * method-to-ir.c: Allow CoreCLR to throw FieldAccessException. 
2317         Simplify logic for ensure_method_is_allowed_to_call_method. 
2318         Handle wrappers on callers.
2319
2320 2009-03-19  Zoltan Varga  <vargaz@gmail.com>
2321
2322         * Makefile.am (fullaotcheck): Don't run the generics tests, some of
2323         them don't run yet.
2324
2325         * basic-simd.cs: Fix the names of some test methods.
2326
2327 2009-03-18  Geoff Norton  <gnorton@novell.com>
2328
2329         * mini.c: Only chain sigfpe if it wasn't generated in mangaed code.
2330
2331 2009-03-18  Zoltan Varga  <vargaz@gmail.com>
2332
2333         * dwarfwriter.c (token_handler): Fix a crash caused by the last change.
2334
2335 2009-03-17  Jb Evain  <jbevain@novell.com>
2336
2337         * driver.c: remove now uneeded call to mono_gc_base_init before
2338         mono_profiler_load.
2339
2340 2009-03-17  Jb Evain  <jbevain@novell.com>
2341
2342         * dwarfwriter.c (token_handler): handle more cases.
2343
2344 2009-03-17  Sebastien Pouliot  <sebastien@ximian.com> 
2345
2346         * method-to-ir.c: Remove more dead code (that was required only
2347         because of method_is_safe). Fix compiler warnings.
2348
2349 2009-03-17  Sebastien Pouliot  <sebastien@ximian.com>
2350
2351         * method-to-ir.c: Remove unneeded/useless method_is_safe
2352         http://lists.ximian.com/archives/public/mono-devel-list/2009-March/031404.html
2353
2354 2009-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
2355
2356         * mini.c (mini_method_compile): Print the method been compiled with
2357         verbose level 1 instead of 3 as this helps a lot debugging JIT crashes
2358         for people not familiar with the runtime.
2359
2360 2009-03-17  Zoltan Varga  <vargaz@gmail.com>
2361
2362         * mini-exceptions.c (get_generic_info_from_stack_frame): Avoid returning
2363         a managed object which is later put into a GList. Return its class instead.
2364
2365         * mini.c (mono_allocate_stack_slots_full): Avoid sharing ref and non-ref
2366         stack slots when using sgen.
2367
2368 2009-03-16  Zoltan Varga  <vargaz@gmail.com>
2369
2370         * dwarfwriter.c (emit_line_number_info): Really fix the eglib build.
2371
2372 2009-03-14  Zoltan Varga  <vargaz@gmail.com>
2373
2374         * local-propagation.c (reg_is_softreg_no_fpstack): Use >= instead of
2375         > so it works on the first vreg as well.
2376
2377 2009-03-13  Zoltan Varga  <vargaz@gmail.com>
2378
2379         * dwarfwriter.c (emit_line_number_info): Disable an assert which seems to
2380         trigger randomly.
2381
2382         * aot-compiler.c: Get rid of xdebug_lock (), use the loader lock instead.
2383         
2384         * dwarfwriter.c (emit_line_number_info): Fix eglib build as eglib doesn't
2385         implement GArray.
2386
2387 2009-03-12  Zoltan Varga  <vargaz@gmail.com>
2388
2389         * dwarfwriter.c (emit_line_number_info): Optimize the computation of the
2390         native->IL offset mapping.
2391
2392 2009-03-11  Zoltan Varga  <vargaz@gmail.com>
2393
2394         * mini-amd64.c (mono_arch_output_basic_block): Fix % 1. Fixes #484323.
2395
2396         * basic.cs: Add a test.
2397
2398 2009-03-11  Mark Probst  <mark.probst@gmail.com>
2399
2400         * mini-x86.c (mono_arch_output_basic_block): Use different
2401         registers in case the ones we want to overwrite are used by the
2402         other operand.  Fixes regression in #480807.
2403
2404 2009-03-10  Zoltan Varga  <vargaz@gmail.com>
2405
2406         * aot-compiler.c (mono_compile_assembly): Make the output less verbose.
2407
2408         * dwarfwriter.c (emit_line_number_info): The line number info for
2409         IL code was off by one. Fix that.
2410
2411         * mini-s390x.c: Fix support for vtypes whose addresses are passed on the
2412         stack.
2413
2414 2009-03-09  Mark Probst  <mark.probst@gmail.com>
2415
2416         Contributed under the terms of the MIT/X11 license by Steven
2417         Munroe <munroesj@us.ibm.com>.
2418
2419         * mini-ppc.c: Correct handling of OP_LOADI4_MEMINDEX for ppc64.
2420         Fixes #483462.
2421
2422 2009-03-08  Zoltan Varga  <vargaz@gmail.com>
2423
2424         * dwarfwriter.c (token_handler): Decode method references in non-wrappers
2425         as well.
2426
2427 2009-03-06  Zoltan Varga  <vargaz@gmail.com>
2428
2429         * method-to-ir.c (mono_method_to_ir): Check for type load exceptions in
2430         the delegate ctor handling code. Fixes #482638.
2431         
2432         * method-to-ir.c (mini_emit_memset): Fix the handling of size '3'. Fixes
2433         #481458.
2434
2435         * iltests.il.in: Add a test.
2436         
2437         * mini-darwin.c (mono_chain_signal): Remove this, it is already in
2438         mini-posix.c.
2439
2440 2009-03-05  Mark Probst  <mark.probst@gmail.com>
2441
2442         * mini-trampolines.c (mono_create_jump_trampoline): If the method
2443         is shared generic code, return the trampoline, even if the method
2444         has already been compiled.  Fixes #479763.
2445
2446         * mini.c, mini.h: New function
2447         mono_jit_find_compiled_method_with_jit_info() which is the same as
2448         mono_jit_find_compiled_method() but also returns the jit info.
2449
2450 2009-03-05  Mark Probst  <mark.probst@gmail.com>
2451
2452         * method-to-ir.c (mono_method_to_ir): Only force the vtable var
2453         for methods which actually have one.  For all other methods, make
2454         sure the this argument var is live the whole method.
2455
2456         * mini.c (mini_method_compile): Every shared method has a
2457         this/vtable/mrgctx info.  Fixes #480807.
2458
2459 2009-03-05  Mark Probst  <mark.probst@gmail.com>
2460
2461         * mini-ppc.c (mono_arch_build_imt_thunk): Add support for mixed
2462         generic/imt thunks where some entries branch through the vtable,
2463         while other entries branch directly.
2464
2465 2009-03-05  Zoltan Varga  <vargaz@gmail.com>
2466
2467         * mini-darwin.c (mono_chain_signal): Define this to fix the build.
2468
2469         * mini-windows.c: Ditto.
2470         
2471         * mini.c (mono_jit_runtime_invoke): Speed up the invoking of parameterless
2472         ctors.
2473
2474 2009-03-04  Zoltan Varga  <vargaz@gmail.com>
2475
2476         * dwarfwriter.c (emit_line_number_info): Add some debug code to help track
2477         down an assert.
2478
2479 2009-03-04  Mark Probst  <mark.probst@gmail.com>
2480
2481         * method-to-ir.c: Don't inline methods that use JMP.  Fixes
2482         #481403.
2483
2484 2009-03-04  Mark Probst  <mark.probst@gmail.com>
2485
2486         * exceptions-x86.c: Include debug-mini.h - fixes build.
2487
2488 2009-03-04  Martin Baulig  <martin@ximian.com>
2489
2490         * debug-mini.c: Clean up the exception API and add documentation.
2491         (mono_debugger_handle_exception): New public method; this is
2492         called when throwing an exception or encountering an unhandled one.
2493         (mono_debugger_call_exception_handler): Formerly known as
2494         mono_debugger_handle_exception(); this is used to tell the
2495         debugger that we're about to invoke an exception handler.
2496
2497 2009-03-04  Martin Baulig  <martin@ximian.com>
2498
2499         * debug-mini.c (mono_debugger_runtime_invoke): Moved here from
2500         ../metadata/mono-debug-debugger.c; save and reset exception state.
2501
2502 2009-03-02  Martin Baulig  <martin@ximian.com>
2503
2504         * debug-mini.c: Moved the debugger exception handling here from
2505         ../metadata/mono-debug-debugger.c.
2506
2507         * debug-mini.h
2508         (MonoDebuggerExceptionAction): New exception typedef.
2509
2510         * debug-mini.c
2511         (MonoDebuggerThreadInfo): Added `MonoObject *last_exception'.
2512
2513         * exceptions-amd64.c
2514         (mono_amd64_throw_exception): Use the new debugger exception
2515         handling code.
2516
2517         * mini-exceptions.c
2518         (mono_handle_exception_internal): Don't call
2519         mono_debugger_unhandled_exception() here.
2520
2521 2009-03-03  Zoltan Varga  <vargaz@gmail.com>
2522
2523         * mini.c aot-compiler.c: Update after the changes to 
2524         mono_marshal_get_runtime_invoke ().
2525
2526         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): 
2527         Virtual generic methods might not have method->slot set, work around
2528         that.
2529
2530         * generics.cs: Add a test.
2531
2532 2009-03-02  Geoff Norton  <gnorton@novell.com>
2533
2534         * mini.c:
2535         * driver.c: Allow signal chaining of SIGFPE as well.
2536
2537 2009-03-02  Zoltan Varga  <vargaz@gmail.com>
2538
2539         * mini-trampolines.c (mono_generic_virtual_remoting_trampoline): Update
2540         this since it now receives the method not its generic context in the
2541         IMT reg.
2542
2543         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for mixed
2544         generic/imt thunks where some entries branch through the vtable, while
2545         other entries branch directly.
2546
2547         * mini-x86.c (mono_arch_build_imt_thunk): Ditto.
2548
2549         * method-to-ir.c (mono_method_to_ir): Enable fast virtual generic call 
2550         support for interface methods as well.
2551
2552         * mini-trampolines.c: Add support for virtual generic methods in interfaces
2553         using the normal IMT thunks.
2554
2555         generics.cs: Add new tests.
2556         
2557         * method-to-ir.c (mono_method_to_ir): Pass the method instead of
2558         the generic inst to the generic imt thunks. This fixes AOT support, 
2559         improves consistency with the normal IMT thunks, and makes it easier to
2560         add support for interface generic virtual methods later.
2561
2562         * mini-trampolines.c (mono_magic_trampoline): Ditto.    
2563         
2564 2009-02-28  Zoltan Varga  <vargaz@gmail.com>
2565
2566         * driver.c (mono_set_signal_chaining): New public API function to enable
2567         signal chaining on POSIX platforms.
2568
2569         * mini-posix.c mini.c: Applied a variant of a patch by Simon Rowland 
2570         (si@lindenlab.com) to implement signal chaining. The original patch was
2571         contributed under the MIT X/11 license:
2572         https://bugzilla.novell.com/show_bug.cgi?id=318894
2573
2574 2009-02-27  Zoltan Varga  <vargaz@gmail.com>
2575
2576         * iltests.il.in (test_0_implicit_float_to_double_conversion): Disable this
2577         too until it can be made to run on amd64.
2578
2579 2009-02-26  Zoltan Varga  <vargaz@gmail.com>
2580
2581         * mini-x86.c (mono_arch_get_this_arg_from_call): Avoid expensive calls
2582         to  get_generic_context_from_code () + get_call_info () if possible.
2583
2584 2009-02-25  Zoltan Varga  <vargaz@gmail.com>
2585
2586         * mini-exceptions.c (mono_handle_native_sigsegv): Implement the
2587         suspend-on-sigsegv functionality.
2588
2589         * mini.c (mini_parse_debug_options): Add a new 'suspend-on-sigsegv' option
2590         to suspend when a native SIGSEGV is received. This is useful for debugging
2591         crashes which don't happen under gdb, since a live process contains more
2592         information than a core file.
2593
2594         * mini-exceptions.c (mono_print_thread_dump): Use 
2595         MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX instead of platform defines.
2596
2597         * mini-x86.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): New define.
2598
2599         * mini-amd64.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): Ditto.
2600         
2601         * basic-float.cs: Disable the tests which currently fail on amd64.
2602
2603         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass a non-null 
2604         value to mono_arch_patch_callsite () to fix crashes.
2605         
2606         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix a warning.
2607
2608 2009-02-23  Zoltan Varga  <vargaz@gmail.com>
2609
2610         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Replace the
2611         nop code by patching the call address to point to the nullified class init
2612         trampoline, as the former does not seem to be safe on SMP machines.
2613
2614 2009-02-23  Mark Probst  <mark.probst@gmail.com>
2615
2616         * mini-ops.h: Fix the argument types for a few x86 opcodes where
2617         they were wrong.
2618
2619 2009-02-23  Zoltan Varga  <vargaz@gmail.com>
2620
2621         * basic-float.cs basic-calls.cs: Fix warnings.
2622
2623 2009-02-22  Mark Probst  <mark.probst@gmail.com>
2624
2625         * tramp-ppc.c (mono_arch_create_trampoline_code): Store the
2626         correct frame pointer in the LMF.  Should fix #478394.
2627
2628 2009-02-22  Zoltan Varga  <vargaz@gmail.com>
2629
2630         * Makefile.am (fullaotcheck): Copy Mono.Simd.dll as well.
2631
2632         * image-writer.c: Make the binary writer less verbose.
2633
2634 2009-02-21  Zoltan Varga  <vargaz@gmail.com>
2635
2636         * method-to-ir.c (mono_method_to_ir): Don't assert if string ctors
2637         are called from runtime invoke wrappers.
2638
2639 2009-02-20  Zoltan Varga  <vargaz@gmail.com>
2640
2641         * cpu-ppc.md (store_memindex): Increase the size of this.
2642
2643 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
2644
2645         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
2646
2647         * cpu-x86.md: Fix the sizes for long_conv_to_r_un and long_conv_to_r_un_2.
2648
2649         * mini-x86.c (mono_arch_output_basic_block): Use only 64bits of precision for
2650         OP_LCONV_TO_R_UN.
2651
2652         Last fix for of #467201.
2653
2654
2655 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
2656
2657         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
2658
2659         * cpu-x86.md: Fix the sizes for fcall(_reg,_membase), long_conv_to_r4_2
2660         and long_conv_to_r8_2:
2661
2662         Fixed part of #467201.
2663
2664 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
2665
2666         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
2667
2668         * mini-x86.c (mono_arch_output_basic_block): Adjust precision of int to float
2669         conversion to 32 bits.
2670
2671         * cpu-x86.md: Increase the size of int_conv_to_r4.
2672
2673         * basic-float.cs: Add a test for this.
2674
2675         Fixed part of #467201.
2676
2677 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
2678
2679         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
2680
2681         * mini-x86.c (mono_arch_output_basic_block): Adjust precision of long to double
2682         conversion to 64 bits.
2683
2684         * basic-float.cs: Add a test for this.
2685
2686         Fixed part of #467201.
2687
2688 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
2689
2690         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
2691
2692         * mini-x86.c (emit_move_return_value): Don't reduce precision of functions returning float.
2693         This behavior is compatible with MS.
2694
2695         * iltest.il.in: Add a test for this.
2696
2697         Fixed part of #467201.
2698
2699 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
2700
2701         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
2702
2703         * mini-x86.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_R4, it must
2704         change the precision of the value.
2705
2706         * cpu-x86.md: Define len for float_conv_to_r4.
2707
2708         * basic-float.cs: Add a test for this.
2709
2710         Fixed part of #467201.
2711
2712 2009-02-19 Rodrigo Kumpera  <rkumpera@novell.com>
2713
2714         * mini.c: Adjust locking order to the new semantics where the loader lock
2715         comes first.
2716
2717 2009-02-18  Rodrigo Kumpera  <rkumpera@novell.com>
2718
2719         * aot-runtime.c:
2720         * mini-amd64.c:
2721         * mini-arm.c:
2722         * mini-ia64.c:
2723         * mini-mips.c:
2724         * mini-ppc.c:
2725         * mini-sparc.c:
2726         * mini-trampolines.c:
2727         * mini-x86.c:
2728         * mini.c:
2729         * tramp-alpha.c:
2730         * tramp-amd64.c:
2731         * tramp-arm.c:
2732         * tramp-hppa.c:
2733         * tramp-ia64.c:
2734         * tramp-mips.c:
2735         * tramp-ppc.c:
2736         * tramp-s390.c:
2737         * tramp-s390x.c:
2738         * tramp-sparc.c:
2739         * tramp-x86.c: Use mono_domain_code_* functions instead of using MonoDomain::code_mp directly.
2740
2741 2009-02-18  Zoltan Varga  <vargaz@gmail.com>
2742
2743         * mini-codegen.c (mono_local_regalloc): Remove a ! from if (!dest_sreg1)
2744         as it is incorrect.
2745
2746 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
2747
2748         * aot-compiler.c (add_generic_class): Only add rgctx invoke wrappers
2749         for cctors if needed.
2750
2751 2009-02-17  Mark Probst  <mark.probst@gmail.com>
2752
2753         * mini-ppc.c: Fix build on Darwin.
2754
2755 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
2756
2757         * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Use 2 as the DWARF
2758         version instead of 3 as valgrind doesn't like version 3.
2759
2760         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
2761
2762         * aot-compiler.c (mono_aot_method_hash): New function to return a hash
2763         usable for hashing methods.
2764         (emit_extra_methods): Use the new hash to avoid putting every method in the
2765         same hash bucket.
2766
2767         * aot-runtime.c (find_extra_method_in_amodule): Use the new hash.
2768
2769         * aot-runtime.c (can_method_ref_match_method): New function to quickly check
2770         whenever a method ref could match a method.
2771         
2772         * aot-runtime.c (load_image): Revert the previous change, it causes an AOT
2773         test to fail.
2774         
2775         * aot-runtime.c (find_extra_method_in_amodule): Add a cache for decoded 
2776         methods refs.
2777
2778         * aot-runtime.c (load_image): Pass our basedir to mono_assembly_load.
2779
2780         * aot-compiler.c (emit_exception_debug_info): Bump the maximum size of
2781         the encoding buffer.
2782
2783         * method-to-ir.c (mono_method_check_inlining): Avoid calling 
2784         mono_method_get_header () on inflated methods as an optimization.
2785
2786 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
2787
2788         * ssa.c (fold_ins): Fix another crash if the instruction following the
2789         switch was optimized away.
2790
2791 2009-02-16  Mark Probst  <mark.probst@gmail.com>
2792
2793         Contributed under the terms of the MIT/X11 license by Steven
2794         Munroe <munroesj@us.ibm.com>.
2795
2796         * mini-ppc.c, mini-ppc.h: Implement TLS for PPC64.
2797
2798 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
2799
2800         * mini.c method-to-ir.c mini-trampolines.c aot-runtime.c: Remove locking
2801         around the mono_domain_alloc calls, it is now done by the functions
2802         themselves.
2803
2804         * aot-compiler.c (compile_method): Only add wrappers referenced by
2805         the method if compiling with full AOT.
2806         (mono_compile_assembly): Error out if --aot=full is specified on
2807         a platform where it is not supported.
2808
2809         * aot-compiler.c (emit_trampolines): Emit generic class init trampolines
2810         on ARM too.
2811
2812         * tramp-arm.c (mono_arch_create_generic_class_init_trampoline_full): Add
2813         AOT support.
2814
2815         * aot-runtime.c (load_named_code): Handle 
2816         mono_arm_throw_exception_by_token.
2817
2818         * mini-arm.h: Add declaration of mono_arm_throw_exception_by_token.
2819
2820         * image-writer.c (asm_writer_emit_pointer_unaligned): Make this really
2821         unaligned.
2822
2823         * Makefile.am (fullaotcheck): Exit if a test fails.
2824
2825         * aot-compiler.c (mono_compile_assembly): Use the ASM writer for full aot
2826         on ARM.
2827         (mono_compile_assembly): Handle the assembler failing.
2828
2829         * image-writer.c (asm_writer_emit_section_change): Handle ARM gas not
2830         accepting subsections of .bss.
2831
2832         * ssa.c (visit_inst): Fix a crash if the instruction following a switch
2833         was optimized away.
2834
2835         * aot-compiler.c: Remove some unused includes.
2836         
2837         * aot-compiler.c (MonoAotCompile): Remove some unused fields which are
2838         now in MonoImageWriter.
2839
2840         * mini-x86.c (mono_arch_get_vcall_slot): Handle yet another
2841         code sequence which matches a non-virtual call. Fixes #472654.
2842
2843 2009-02-15  Zoltan Varga  <vargaz@gmail.com>
2844
2845         * aot-compiler.c: Use xdebug_lock ()/unlock () macros for locking in the
2846         xdebug code.
2847         
2848         * aot-compiler.c: Make the xdebug code not depend on the AOT compiler,
2849         use the image/dwarf writers directly.
2850
2851         * image-writer.c (struct _MonoImageWriter): Remove the unused 'image'
2852         field.
2853
2854         * aot-compiler.c (MonoAotCompile): Remove fields which are now in
2855         MonoDwarfWriter.
2856
2857         * image-writer.h: Fix some typos.
2858
2859         * dwarfwriter.h dwarfwriter.c: New files.
2860         
2861         * aot-compiler.c: Extract the DWARF info writing functionality into a 
2862         separate module.
2863
2864         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add a 'out_unwind_ops'
2865         argument to return unwind info.
2866
2867         * tramp-arm.c (mono_arch_create_trampoline_code_full): Ditto.
2868
2869         * aot-compiler.c: Emit unwind info for trampolines in full-aot mode.
2870         
2871         * aot-runtime.c (decode_method_ref): Add a case for 
2872         MONO_AOT_METHODREF_WRAPPER_NAME.
2873
2874         * mini.h: Add constants for the magic numbers used in encode_method_ref ()
2875         for AOT.
2876
2877         * aot-compiler.c (encode_method_ref): Use the new constants.
2878
2879         * aot-runtime.c (decode_method_ref): Ditto.
2880
2881         * aot-compiler.c (compile_method): For generic icalls, queue the wrapper to
2882         be compiled, not the icall itself.
2883
2884 2009-02-14  Zoltan Varga  <vargaz@gmail.com>
2885
2886         * aot-runtime.c (find_extra_method_in_amodule): Avoid decoding wrapper names
2887         using decode_method_ref ().
2888
2889         * method-to-ir.c (mini_emit_ldelema_1_ins): If the array index is a long,
2890         convert it to an in32. Fixes #475859.
2891
2892         * arrays.cs: Add a test.
2893
2894 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
2895
2896         * mini-s390x.c (mono_arch_output_basic_block): Fix the shift amounts in 
2897         OP_LCONV_TO_U2.
2898
2899         * basic-long.cs: Add a test.
2900
2901 2009-02-12  Mark Probst  <mark.probst@gmail.com>
2902
2903         * mini-x86.c, mini-x86.h: Very simple frame pointer removal.  We
2904         remove the frame pointer in leaf methods which don't receive any
2905         arguments, don't throw exceptions and don't do dynamic stack
2906         allocations.
2907
2908 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
2909
2910         * mini-amd64.c (mono_arch_build_imt_thunk): Fix size calculation after
2911         the fail_tramp changes. Hopefully fixes #475132.
2912
2913 2009-02-12  Rodrigo Kumpera  <rkumpera@novell.com>
2914
2915         * method-to-ir.c (mono_emit_method_call_full): Use mono_metadata_signature_dup_mempool
2916         instead of mono_metadata_signature_dup_full.
2917
2918 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
2919
2920         * ssa.c (fold_ins): Use MONO_IS_JUMP_TABLE () and MONO_JUMP_TABLE_FROM_INS ()
2921         for processing jump tables. Fixes #473787.
2922
2923 2009-02-11  Mark Probst  <mark.probst@gmail.com>
2924
2925         * mini-generic-sharing.c: mini_method_get_context() just calls
2926         mono_method_get_context_general() now.
2927
2928         * mini.c, mini.h: Moved get_object_generic_inst(),
2929         construct_object_context_for_method() and
2930         mono_domain_lookup_shared_generic() to metadata/generic-sharing.c.
2931
2932 2009-02-11  Zoltan Varga  <vargaz@gmail.com>
2933
2934         * branch-opts.c (mono_if_conversion): Handle the case where the merged 
2935         basic block fell through to its successor bblock without a branch. Fixes
2936         #474718.
2937
2938         * iltests.il.in: Add a test.
2939         
2940         * aot-compiler.c (encode_method_ref): Encode methods of array types.
2941         (can_encode_patch): We can now handle arrays of generic parameters and
2942         array methods.
2943
2944         * aot-runtime.c (decode_method_ref_2): Handle methods of array types.
2945
2946         * aot-compiler.c aot-runtime.c: Emit the size of specific trampolines into
2947         the AOT file to avoid some #ifdefs in aot-runtime.c
2948
2949         * mini.h: Bump AOT file format version.
2950
2951 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
2952
2953         * Makefile.am (fullaotcheck): Make this run the tests.
2954
2955         * aot-compiler.c: Make the printing of skipped methods runtime configurable.
2956
2957 2009-02-10  Mark Probst  <mark.probst@gmail.com>
2958
2959         * mini-x86.c (mono_arch_context_get_int_reg): Handle all registers
2960         individually.  Fixes #473482.
2961
2962 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
2963
2964         * mini-arm.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
2965
2966 2009-02-09  Jeffrey Stedfast  <fejj@novell.com>
2967
2968         * aot-compiler.c (arch_emit_plt_entry): Fixed to compile.
2969         (mono_compile_assembly): Hush compile warnings about
2970         uninitialized [tmp_]outfile_name variables in the !use_bin_writer
2971         code path.
2972
2973 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
2974
2975         * exceptions-arm.c (mono_arch_find_jit_info): Fix aot support.
2976
2977         * mini-arm.c: Checkin unwind related changes missing from an earlier commit.
2978
2979         * aot-compiler.c: Fix arm support.
2980
2981         * image-writer.c: Move the R_ARM constants to image-writer.h. Export a
2982         img_writer_emit_unset_mode () function.
2983
2984         * unwind.c (mono_unwind_get_dwarf_data_align): New helper function.
2985         (mono_unwind_get_dwarf_pc_reg): Ditto.
2986
2987         * aot-compiler.c (emit_dwarf_abbrev): Another large reorganization.
2988         Move almost all platform specific code to a set of arch_ functions, 
2989         and document them to ease porting.
2990         
2991         * aot-compiler.c (mono_xdebug_init): Fix xdebug support.
2992
2993         * image-writer.h image-writer.c: New files, extracted from aot-compiler.c.
2994
2995         * aot-compiler.c: Extract the image writing functionality into a separate
2996         module to reduce the size of this file.
2997
2998 2009-02-09  Geoff Norton  <gnorton@novell.com>
2999
3000         * mini-s390.c: Fix the signature of emit_sig_cookie.
3001
3002 2009-02-09  Zoltan Varga  <vargaz@gmail.com>
3003
3004         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_IMAGE.
3005
3006         * aot-runtime.c (is_shared_got_patch): Ditto.
3007
3008         * aot-runtime.c (load_named_code): Cope with the fact that 
3009         decode_got_entry () won't decode the patch fully if its corresponding got
3010         entry is already filled.
3011         
3012         * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): 
3013         Initialize *ji.
3014         (mono_arch_create_monitor_exit_trampoline_full): Ditto.
3015
3016         * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): Use 'code'
3017         as the moving pointer instead of 'buf' for consistency with the rest of the
3018         codebase.
3019         (mono_arch_create_monitor_exit_trampoline): Ditto.
3020
3021         * aot-compiler.c (emit_trampolines): Add throw_pending_exception/
3022         generic_class_init trampolines.
3023         (add_generic_class): Extract some code from add_generic_instances () into a
3024         separate function so it can be called from other places too.
3025         (compile_method): Call add_generic_class () for the classes of inflated methods
3026         referenced by the method.
3027         (can_encode_patch): Allow references to generic parameters.
3028
3029         * aot-runtime.c: Add support the patches required by the new trampolines.
3030         
3031         * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Add full-aot
3032         support.
3033
3034         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline_full): Add
3035         full-aot support.
3036
3037         * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Rename
3038         this from get_throw_pending_exception, make the signature full aot compatible.
3039
3040         * Makefile.am (fullaotcheck): New target to run full-aot tests.
3041
3042         * method-to-ir.c (inline_method): Save/Restore cfg->ret_var_set too.
3043
3044         * exceptions.cs: Add a test.
3045
3046 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
3047
3048         * unwind.c (mono_unwind_frame): Eliminate the data_align_factor argument,
3049         use the DWARF_DATA_ALIGN constant instead.
3050
3051         * exception-<ARCH>.c: Update after the above change.
3052
3053         * exceptions-arm.c (mono_arch_find_jit_info): Transition this to use the
3054         dwarf unwinder.
3055
3056         * mini-arm.c: Enable the dwarf unwinder.
3057
3058         * mini-trampolines.c (mono_magic_trampoline): Use mono_class_get_vtable_entry ()
3059         instead of mono_class_setup_vtable ().
3060
3061 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
3062
3063         * exceptions-x86.c (mono_arch_find_jit_info): Transition this to use the
3064         dwarf unwinder.
3065
3066         * mini-x86.h: Enable the dwarf unwinder.
3067
3068 2009-02-06  Raja R Harinath  <harinath@hurrynot.org>
3069
3070         Fix mcs/tests/test-7.cs
3071         * mini-amd64.c (mono_arch_allocate_vars): Revert change from
3072         2009-02-03.
3073
3074 2009-02-06  Zoltan Varga  <vargaz@gmail.com>
3075
3076         * mini.c (print_jit_stats): Remove some unused statistics.
3077
3078 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
3079
3080         * aot-compiler.c (emit_klass_info): Update after MonoClass changes.
3081
3082 2009-02-05  Mark Probst  <mark.probst@gmail.com>
3083
3084         * jit-icalls.c (mono_helper_compile_generic_method): Don't inflate
3085         the method we get from mono_object_get_virtual_method() because
3086         that function does it properly, now.
3087
3088 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
3089
3090         * unwind.c (mono_unwind_ops_encode): Handle offsets greater than 32 between
3091         opcodes. Fixes #472775.
3092
3093 2009-02-05  Mark Probst  <mark.probst@gmail.com>
3094
3095         * mini-exceptions.c (ves_icall_get_frame_info): Account for the
3096         fact that mono_find_jit_info() sometimes returns the context
3097         corresponding to the jit info in new_ctx.  Fixes #472600.
3098
3099 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
3100
3101         * method-to-ir.c mini-hppa.c mini.c trace.c mini-s390x.c aot-compiler.c
3102         mini-s390.c: Use mono_class_enum_basetype () instead of accessing
3103         klass->enum_basetype directly.
3104
3105         * aot-compiler.c (emit_class_dwarf_info): Add support for all possible
3106         enum subtypes.
3107
3108         * unwind.c: Avoid 0 sized arrays.
3109
3110 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
3111
3112         * mini-exceptions.c (mono_setup_altstack): Use a more reasonable altstack
3113         size on systems with 64k pages. Fixes #471389.
3114
3115 2009-02-04  Mark Probst  <mark.probst@gmail.com>
3116
3117         Contributed under the terms of the MIT/X11 license by Steven
3118         Munroe <munroesj@us.ibm.com>.
3119
3120         * mini-ppc.c (mono_arch_output_basic_block): Generate better code
3121         for LOADI4_MEMBASE.  Use addi instead of addic if it's not
3122         necessary.
3123
3124 2009-02-04  Mark Probst  <mark.probst@gmail.com>
3125
3126         Contributed under the terms of the MIT/X11 license by Steven
3127         Munroe <munroesj@us.ibm.com>.
3128
3129         * exceptions-ppc.c (mono_arch_get_restore_context): Code size
3130         comparison fix.
3131
3132         * tramp-ppc.c (mono_arch_create_generic_class_init_trampoline):
3133         The trampoline can be longer on PPC64.
3134
3135 2009-02-04  Mark Probst  <mark.probst@gmail.com>
3136
3137         Contributed under the terms of the MIT/X11 license by Steven
3138         Munroe <munroesj@us.ibm.com>.
3139
3140         * mini-ppc.c: Compiler warning fixes and trivial code
3141         simplifications.
3142
3143 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
3144
3145         * method-to-ir.c (mono_spill_global_vars): Fix problems caused by reading
3146         ins->dreg which could be a hardware register, not a vreg.
3147
3148         * aot-compiler.c (emit_method_dwarf_info): Ditto.
3149         
3150         * mini.h (MonoCompile): Remove vreg_to_var_num array, it is no longer used.
3151         (struct MonoMethodVar): Add a vreg field, holding the vreg of variable.
3152
3153         * mini.c (mono_compile_create_var_for_vreg): Set var->vreg.
3154         
3155         * mini-amd64.c (mono_arch_output_basic_block): Avoid reading cfg->varinfo[..]
3156         ->dreg, that is not the vreg we are looking for.
3157
3158         * mini-amd64.h mini-x86.h: Enable MONO_ARCH_LIVENESS_OPS again.
3159
3160         * mini-x86.c (mono_arch_output_basic_block): Add support for LIVERANGE_START/
3161         LIVERANGE_END.
3162
3163         * method-to-ir.c (mono_spill_global_vars): Add an assert to help track down
3164         strange crashes.
3165
3166 2009-02-03  Zoltan Varga  <vargaz@gmail.com>
3167
3168         * mini-x86.c (mono_arch_emit_prolog): Emit unwind info.
3169
3170         * aot-compiler.c (emit_line_number_info): Fix line number emission when
3171         the line diff is 0.
3172
3173         * aot-compiler.c: Add xdebug support on x86.
3174
3175         * unwind.c: Add x86 support.
3176         
3177         * aot-compiler.c (emit_exception_debug_info): Control the emission of
3178         unwind info using a new MONO_ARCH_HAVE_XP_UNWIND define.
3179
3180         * mini.c (mini_method_compile): Ditto.
3181         
3182         * mini-amd64.c (mono_arch_allocate_vars): Avoid setting cfg->ret->dreg to
3183         the variable index.
3184
3185         * aot-compiler.c: Add emit_push_section ()/emit_pop_section () helper functions
3186         which mimic .push_section/.pop_section in GAS.
3187         
3188         * aot-compiler.c: Emit precise live range information for variables.
3189
3190         * mini-amd64.c (mono_arch_output_basic_block): Add OP_LIVERANGE_START/END.
3191
3192         * method-to-ir.c (mono_spill_global_vars): Compute the instructions marking
3193         the live ranges of variables, and emit OP_LIVERANGE_START/END opcodes for
3194         them.
3195
3196         * mini-ops.h: Add OP_LIVERANGE_START/END opcodes to mark
3197         the live ranges of variables.
3198
3199         * mini.h (struct MonoMethodVar): Add two fields containing the live range
3200         of the variable in terms of native offsets.
3201
3202 2009-02-03  Rodrigo Kumpera  <rkumpera@novell.com>
3203
3204         * arrays.cs: Test for Get/SetValue of array with negate lower bounds.
3205         
3206 2009-02-02  Mark Probst  <mark.probst@gmail.com>
3207
3208         Contributed under the terms of the MIT/X11 license by Steven
3209         Munroe <munroesj@us.ibm.com>.
3210
3211         * exceptions-ppc.c (restore_regs_from_context): Correct operand
3212         order (offset then base reg) for ppc_load_multiple_regs.
3213         (emit_save_saved_regs) Correct operand order for
3214         ppc_store_multiple_regs.
3215         (mono_arch_get_call_filter): Correct operand order for
3216         ppc_load_multiple_regs.
3217
3218         * mini-ppc.c (emit_memcpy): Fix operand order for
3219         ppc_load_reg_update and ppc_store_reg_update.
3220         (mono_arch_output_basic_block): Correct operand order for ppc_lha.
3221         (mono_arch_emit_epilog): Correct operand order for
3222         ppc_load_multiple_regs.
3223
3224         * tramp-ppc.c (mono_arch_create_trampoline_code): Correct operand
3225         order for ppc_store_multiple_regs and ppc_load_multiple_regs.
3226
3227 2009-02-02  Mark Probst  <mark.probst@gmail.com>
3228
3229         * cpu-ppc64.md: Fixed storer4_memindex length.
3230
3231 2009-02-02  Zoltan Varga  <vargaz@gmail.com>
3232
3233         * aot-compiler.c (emit_line_number_info): Optimize the size of the emitted
3234         line number info.
3235         
3236         * aot-compiler.c (emit_line_number_info): Optimize this.
3237
3238 2009-02-01  Zoltan Varga  <vargaz@gmail.com>
3239
3240         * aot-compiler.c: Disassemble tokens in the IL disassembly.
3241         
3242         * aot-compiler.c: Add debug info for methods without debug info by
3243         emitting an IL file and having the line number info referencing that file.
3244
3245         * aot-compiler.c: Optimize the size of the generated line number info.
3246
3247         * aot-compiler.c: Emit line number info in xdebug mode.
3248
3249         * aot-compiler.c (mono_save_xdebug_info): Receive a MonoCompile instead of a
3250         million arguments.
3251
3252 2009-01-31  Zoltan Varga  <vargaz@gmail.com>
3253
3254         * aot-compiler.c (emit_method_dwarf_info): Emit names for local variables.
3255
3256         * driver.c (mono_main): Enable debugging support automatically if XDEBUG
3257         is used.
3258
3259 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
3260
3261         * basic-calls.cs: Test for the weird crash found on arm.
3262         
3263 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
3264
3265         * cpu-arm.md: Increase the size of storer8_membase_reg and
3266         loadr8_membase_reg to 24 bytes to accomodate the extra add.
3267
3268         * mini-arm.c (mono_arch_output_basic_block): Under FPA, when emitting
3269         OP_STORER8_MEMBASE_REG and OP_LOADR8_MEMBASE_REG, add the original
3270         reg to LR otherwise we'll be loading/storing from just the offset.
3271
3272 2009-01-30  Miguel de Icaza  <miguel@novell.com>
3273
3274         Question: if we are storing gint32's inside the "*native_offset",
3275         should we change the signature to "gint32 *native_offset" to
3276         ensure that we do not have type definition problems?
3277         
3278         * mini-exceptions.c (ves_icall_get_frame_info): Cast the gint32 to
3279         an int * as this is what the other function expects, causes
3280         problems with Freescale's compiler that defined int32_t to be a
3281         long and makes int incompatible 
3282
3283 2009-01-30  Miguel de Icaza  <miguel@novell.com>
3284
3285         * Rename generic-sharing.c to mini-generic-sharing.c to avoid the
3286         filename conflict with bjam.
3287
3288 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
3289
3290         * cpu-arm.md: Increase the size of storer8_membase_reg to 20 bytes
3291         as it might use decomposed ops.
3292
3293 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
3294
3295         * jit-icalls.c (mono_imul_ovf): Fix one of the literals.
3296
3297         * mini.c (mini_init): Emulate mul.ovf opcodes if MONO_ARCH_EMULATE_MUL_OVF
3298         is defined.
3299
3300         * mini-arm.h (MONO_ARCH_EMULATE_MUL_OVF): New define.
3301
3302         * mini-arm.c (mono_arch_build_imt_thunk): Rewrite this to allow large vtable
3303         offsets.
3304
3305         * mini-arm.c (mono_arch_context_get_int_reg): Adapt this to the "clever"
3306         way registers are stored in MonoContext on arm.
3307
3308         * unwind.c: Rewrite the handling of the cached_info array to use hazard pointers
3309         instead of locking so mono_get_cached_unwind_info () becomes signal safe.
3310
3311         * mini.c (mini_init): Emuate OP_FCONV_TO_I when using soft float.
3312
3313         * mini-arm.c (emit_load_volatile_arguments): Avoid an unneccesary assert.
3314
3315         * mini.c (mini_init): Register mono_isfinite.
3316
3317         * jit-icalls.c (mono_isfinite): New jit icall.
3318
3319         * method-to-ir.c (mono_decompose_soft_float): Add support for OP_CKFINITE.
3320         
3321         * exceptions-arm.c (mono_arch_find_jit_info): When unwinding using the LMF,
3322         set esp to ARMREG_FP instead of R12, since R12 stores the value of sp for
3323         the parent frame.
3324
3325 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
3326
3327         * exceptions-arm.c (mono_arch_find_jit_info): The frame layout on arm have
3328         separate frame and stack pointers, so we must use FP to find the register
3329         spill area.
3330         The FP reg is retrieved from the MonoContext::regs array.
3331
3332 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
3333
3334         * mini-arm.c (mono_arch_output_basic_block): Emit two cond ops for OP_FBGE
3335         as FPA requires it.
3336
3337 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
3338
3339         * mini-arm.c (mono_arch_emit_setret): Emit OP_FMOVE for methods that
3340         return R4 and R8 when not running under softfloat.
3341
3342         Fixes basic-calls.exe
3343
3344 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
3345
3346         * mini-arm.c: Implement some overflow opcodes.
3347
3348 2009-01-29  Miguel de Icaza  <miguel@novell.com>
3349
3350         * ssa.c: handle another alloca.h
3351
3352         * mini-exceptions.c (mono_handle_native_sigsegv): Do not use
3353         PLATFORM_WIN32 for detecting if we have sigaction.   Instead use
3354         MONO_ARCH_USE_SIGACTION. 
3355
3356         * aot-runtime.c, mini-exceptions.c: Replace platform define with
3357         capability defines.
3358
3359         * method-to-ir.c (mono_method_to_ir): Type cast fix on some platforms.
3360
3361         * mini-ppc.h (MONO_ARCH_USE_SIGACTION): Do not define this for all
3362         PPC targets as sigaction does not exist on all platforms, define
3363         this on a per-platform basis.
3364
3365         Instead of erroring out if the platform is not defined, include
3366         mini-ppc-os.h, and expect that the OS specific setting provides
3367         the required information.   
3368
3369 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
3370
3371         * aot-compiler.c: Fix --enable-minimal=aot.
3372
3373 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
3374
3375         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Fix the
3376         previous change.
3377
3378 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
3379
3380         * exceptions-arm.c: Fix warnings.
3381
3382         * tramp-arm.c aot-compiler.c unwind.h unwind.c: Implement xdebug support for
3383         ARM.
3384
3385         * mini-x86.c: Fix --enable-minimal=jit build.
3386
3387         * mini.c: Really fix --enable-minimal=jit build.
3388         
3389         * mini.c (construct_object_context_for_method): Move this outside
3390         the DISABLE_JIT block to fix the --enable-minimal=jit build.
3391
3392         "Backported" of r124984 from 2.0 branch.
3393         
3394         * aot-compiler.c aot-runtime.c: Add full-aot support delegate BeginInvoke/EndInvoke.
3395
3396         "Backport" of r124977 + r124978 from 2.0 branch.
3397         
3398         * exceptions-arm.c (mono_arm_throw_exception_by_token): New helper function
3399         to avoid calling mono_exception_from_token () from the throw trampoline.
3400         (mono_arch_get_throw_exception_generic): call throw_exception_by_token
3401         for throwing corlib exceptions, this fixes full-aot support for corlib
3402         exceptions.
3403
3404         * aot-compiler.c (compile_method): Make a copy of cfg->locals to fix the build.
3405
3406 2009-01-29  Miguel de Icaza  <miguel@novell.com>
3407
3408         * mini-darwin.c, mini-windows.c, mini-posix.c: Commit the first
3409         part of the changes to split the code in mini into operating
3410         system specific files.
3411
3412         This patch was done by copying mini.c to the respective files to
3413         preserve SVN history.
3414
3415 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
3416
3417         * aot-compiler.c (emit_method_dwarf_info): Add minimal support for locals.
3418
3419 2009-01-28  Zoltan Varga  <vargaz@gmail.com>
3420
3421         * method-to-ir.c (mono_method_to_ir): Avoid generic sharing for calls made to
3422         remoting-invoke-with-check wrappers of shared methods.
3423
3424         * mini.c (print_jit_stats): Print out major gc count/time for libgc too.
3425
3426 2009-01-27  Mark Probst  <mark.probst@gmail.com>
3427
3428         * method-to-ir.c (emit_stloc_ir): Only apply the reg-reg move
3429         optimization if the top of stack is the last instruction in the
3430         bblock.  Otherwise it might have been used after its definition.
3431         Fixes #469742.
3432
3433 2009-01-27  Zoltan Varga  <vargaz@gmail.com>
3434
3435         * mini-trampolines.c (mono_magic_trampoline): Print out the caller
3436         method as well when get_vcall_slot () fails to match a code sequence.
3437
3438         * mini-arm.c: Fix the android build, which doesn't have
3439         __aeabi_read_tp.
3440
3441 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
3442
3443         * mini-s390x.c: Remove a stray declaration of emit_sig_cookie () to fix
3444         the s390x build.
3445
3446 2009-01-26  Rodrigo Kumpera  <rkumpera@novell.com>
3447
3448         * unwind.c (mono_unwind_cleanup): Don't crash if cached_info is NULL.
3449
3450 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
3451
3452         * mini.c (mini_method_compile): Save the unwind info generated by the JIT
3453         and put its id into jinfo->used_regs. This is only used on amd64,
3454         which is currently the only platform generating unwind info.
3455
3456         * exceptions-amd64.c: Instead of unwinding based on a register mask, use
3457         the dwarf unwinder. This is required to correctly handle async exceptions
3458         like thread abort and stack overflows, which can happen while a method
3459         is in the middle of its prolog or epilog.
3460         
3461         * aot-runtime.c (mono_aot_get_unwind_info): New helper function to obtain
3462         the unwind info belonging to an AOTed method.
3463
3464         * aot-compiler.c aot-runtime.c: Save/Load the unwind info emitted by the JIT
3465         into cfg->unwind_ops.
3466         
3467         * unwind.c (mono_unwind_frame): Use <= instead of < for the loop exit check.
3468
3469         * mini.c (mini_init): Call mono_unwind_init ().
3470         (mini_cleanup): Call mono_unwind_cleanup ().
3471
3472         * unwind.c: Add functions for managing a set of unwind info entries, allowing
3473         unwind info to be shared between methods.
3474
3475         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info for the registers
3476         saved in the LMF.
3477
3478         * exceptions-amd64.c (mono_arch_exceptions_init): Call 
3479         get_throw_pending_exception () to avoid initialization races.
3480
3481         * mini-exceptions.c (mono_exceptions_init): Call an arch specific
3482         mono_arch_exceptions_init () function.
3483
3484         * mini.h (MONO_INST_NEW): Remove duplicate setting of cil_code.
3485
3486 2009-01-25  Zoltan Varga  <vargaz@gmail.com>
3487
3488         * mini.c (mono_get_domain_intrinsic): New helper function.
3489         (mono_get_thread_intrinsic): Ditto.
3490
3491         * mini-arm.c mini-ia64.c: Use the new helper functions.
3492         
3493         * method-to-ir.c (mono_method_to_ir): Fix the comment for
3494         the last constrained_call change, since it is needed in the non-AOT
3495         case as well.
3496
3497         * mini-arm.c: Implement OP_TLS_GET on arm eabi linux.
3498         
3499         * mini-arm.c (mono_arch_emit_prolog): Add an inlined version of 
3500         mono_get_lmf_addr () on arm eabi linux.
3501
3502 2009-01-24  Zoltan Varga  <vargaz@gmail.com>
3503
3504         * mini-amd64.c (mono_arch_get_vcall_slot): Handle yet another
3505         code sequence which matches a non-virtual call.
3506
3507 2009-01-23  Mark Probst  <mark.probst@gmail.com>
3508
3509         * mini-ppc.c (mono_arch_context_get_int_reg): Allow access to the
3510         stack pointer (r1).
3511
3512 2009-01-23  Zoltan Varga  <vargaz@gmail.com>
3513
3514         * aot-compiler.c aot-runtime.c: Treat delegate-invoke wrappers similarly to
3515         runtime-invoke wrappers, since they are also shared based on signature.
3516
3517 2009-01-22  Mark Probst  <mark.probst@gmail.com>
3518
3519         * mini-exceptions.c (ves_icall_get_frame_info): Fetch the generic
3520         info from the (correct) context.
3521
3522 2009-01-22  Zoltan Varga  <vargaz@gmail.com>
3523
3524         * unwind.c (mono_unwind_frame): Remove a stray g_free ().
3525         
3526         * unwind.c (mono_unwind_frame): New function to unwind through a frame
3527         using dwarf unwinding info. Not yet used.
3528
3529         * mini.c (mini_init): When using xdebug, disable freeing of domains.
3530
3531 2009-01-21  Mark Probst  <mark.probst@gmail.com>
3532
3533         * mini-ppc.c (mono_arch_delegate_invoke_impl): Return function
3534         descriptors.
3535
3536         * mini-trampolines.c (mono_delegate_trampoline): Remove the PPC64
3537         special case and handle mono_arch_delegate_invoke_impl() returning
3538         function descriptors.
3539
3540         * tramp-ppc.c (mono_arch_create_trampoline_code): Delegate
3541         trampolines return function descriptors, too.
3542
3543 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
3544
3545         * method-to-ir.c (handle_alloc): Avoid generic instances in the
3546         out_of_line optimization.
3547
3548 2009-01-21  Martin Baulig  <martin@ximian.com>
3549
3550         * mini.h
3551         (MonoCompile): Added `disable_deadce_vars' to disable removing
3552         unused variables.
3553
3554         * mini.c
3555         (mini_method_compile): Set `cfg->disable_deadce_vars' when running
3556         inside the debugger.
3557
3558         * liveness.c (mono_analyze_liveness): Don't remove any unused
3559         variables if `cfg->disable_deadce_vars' is set.
3560
3561 2009-01-21  Mark Probst  <mark.probst@gmail.com>
3562
3563         * method-to-ir.c: Only apply exception constructor optimization if
3564         the the method actually belongs to an exception class.  Fixes
3565         #467456.
3566
3567 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
3568
3569         * mini-trampolines.c (mono_delegate_trampoline): Put back the previous
3570         change inside a #ifdef __mono_ppc64__.
3571
3572         * aot-compiler.c (compile_method): Remove the previous limitation.
3573
3574         * method-to-ir.c (method-to-ir.c): Add support for the constrained prefix
3575         on type variables in AOTed code.
3576         
3577         * aot-compiler.c (compile_method): Skip generic methods having type 
3578         constraints on their generic parameters.
3579
3580         * aot-compiler.c (compile_method): Check for methods which cannot be
3581         encoded inside RGCTX_FETCH patches as well.
3582
3583         * mini-exceptions.c (mono_print_thread_dump): Fix the windows
3584         build.
3585
3586 2009-01-20  Mark Probst  <mark.probst@gmail.com>
3587
3588         * method-to-ir.c: Force the vtable variable in shared generic code
3589         for the case that they might show up on a stack trace where they
3590         are needed.
3591
3592         * mini-exceptions.c: Save and use generic sharing info as well as
3593         IP in stack traces to resolve shared generic instantiations.
3594
3595 2009-01-20  Zoltan Varga  <vargaz@gmail.com>
3596
3597         * mini-trampolines.c (mono_delegate_trampoline): Revert the change which
3598         added a mono_get_addr_from_ftnptr () as it breaks the ia64 build.
3599
3600 2009-01-20  Mark Probst  <mark.probst@gmail.com>
3601
3602         * method-to-ir.c: Do generic sharing for array constructors.
3603
3604 2009-01-20  Rodrigo Kumpera  <rkumpera@novell.com>
3605
3606         * mini-exceptions.c (mono_print_thread_dump): Add information
3607         about the thread state using wapi_current_thread_desc.
3608
3609 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
3610
3611         * basic-simd.cs: Tests for the new constructors. 
3612
3613 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
3614
3615         * mini-ops.h: Added OP_EXPAND_*
3616
3617         * cpu-x86.md: Same.
3618
3619         * mini-x86.c (mono_arch_output_basic_block): Same.
3620         
3621         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for single element constructors.
3622
3623 2009-01-19  Zoltan Varga  <vargaz@gmail.com>
3624
3625         * iltests.il.in: Add a test for #467385.
3626
3627 2009-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
3628
3629         * mini.c (mini_thread_cleanup): Don't cleanup TLS storage if the
3630         thread been cleaned up is not the same currently in execution.
3631
3632         Fixes appdomain-unload crashes on windows, osx and linux variants
3633         without the __thread keyword.
3634
3635 2009-01-18  Zoltan Varga  <vargaz@gmail.com>
3636
3637         * mini-arm.c (mono_arch_flush_icache): Applied patch from Koushik Dutta
3638         (koush@koushikdutta.com). Implement this for android.
3639
3640         * helpers.c (mono_disassemble_code): Avoid assembler errors if the id
3641         begins with a digit.
3642
3643         * method-to-ir.c: Call mono_gc_get_write_barrier () instead of
3644         mono_marshal_get_write_barrier ().
3645
3646 2009-01-17  Rodrigo Kumpera  <rkumpera@novell.com>
3647
3648         * decompose.c (mono_decompose_vtype_opts): Fix the decomposition
3649         of OP_VCALL_* ops for 8 bytes vtypes on 32 bits archs and platorms
3650         that pass them on a register pair.
3651
3652         This affects windows, OSX and FreeBSD. The mono/tests/handleref.exe
3653         test was crashing due to that.
3654
3655 Fri Jan 16 15:21:21 CET 2009 Paolo Molaro <lupus@ximian.com>
3656
3657         * exceptions-ppc.c: tweaks from malc (OV-Soft) to fix the size of the
3658         trampoline code. Include ucontext.h only if available.
3659
3660 2009-01-15  Mark Probst  <mark.probst@gmail.com>
3661
3662         * mini.c: mono_domain_lookup_shared_generic() takes an open method
3663         and doesn't check whether it's sharable, like it was before
3664         removing the shared generics hash.  This brings IronPython
3665         performance back to what it was before that change.
3666
3667 2009-01-14  Mark Probst  <mark.probst@gmail.com>
3668
3669         * method-to-ir.c: Handle delegate invocation optimization earlier,
3670         otherwise it would be handled (much more slowly) by the
3671         final/sealed optimization.
3672
3673 2009-01-13  Zoltan Varga  <vargaz@gmail.com>
3674
3675         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes when the current thread or
3676         domain is not set. Fixes #465864.
3677
3678 2009-01-12  Mark Probst  <mark.probst@gmail.com>
3679
3680         * method-to-ir.c: Don't stop sharing of generic methods with catch
3681         clauses - we already handle those.
3682
3683 2009-01-12  Mark Probst  <mark.probst@gmail.com>
3684
3685         * mini.c, mini.h: lookup_generic_method() is now
3686         mono_domain_lookup_shared_generic() and uses the jit_code_hash,
3687         making the shared_generics_hash obsolete.
3688
3689 2009-01-12  Mark Probst  <mark.probst@gmail.com>
3690
3691         * mini-ppc.c, exceptions-ppc.c, cpu-ppc.md, cpu-ppc64.md: Don't
3692         use the red zone.  Make room on the stack first and then use it,
3693         not the other way around.
3694
3695 2009-01-12  Zoltan Varga  <vargaz@gmail.com>
3696
3697         * mini.c (mini_init): Call mono_xdebug_init ().
3698
3699         * aot-compiler.c (mono_xdebug_init): Make this non-static.
3700
3701 2009-01-11  Zoltan Varga  <vargaz@gmail.com>
3702
3703         * TestDriver.cs: Add an --iter argument to run tests multiple times.
3704
3705         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Emit debug info for
3706         trampolines.
3707
3708         * aot-compiler.c (mono_save_trampoline_xdebug_info): New function to emit
3709         debug+unwind info for trampolines.
3710
3711         * mini.c (mono_create_unwind_op): New helper function.
3712
3713         * unwind.h: Add macros for emitting unwind ops without a MonoCompile.
3714
3715 2009-01-10  Zoltan Varga  <vargaz@gmail.com>
3716
3717         * aot-compiler.c: Fix the build.
3718
3719 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
3720
3721         * Makefile.am: Update dtrace-prelink.sh location.
3722
3723 2009-01-08  Zoltan Varga  <vargaz@gmail.com>
3724
3725         * method-to-ir.c (mono_method_to_ir): Fix the check for the mscorlib ldstr 
3726         optimization. Fixes #464520.
3727
3728 2009-01-07  Bill Holmes  <billholmes54@gmail.com>
3729
3730         * mini-amd64.c : Adding code to save/restore non-volatile registers
3731            on Winx64.
3732
3733         * exceptions-amd64.c : Adding code to save/restore non-volatile 
3734           registers on Winx64.
3735
3736         Contributed under MIT/X11 license.
3737
3738 2009-01-07  Zoltan Varga  <vargaz@gmail.com>
3739
3740         * mini-arm.c (mono_arch_flush_icache): Use __GNUC_PREREQ instead of checking
3741         __GNUC_MINOR__ which can break when the major version changes.
3742
3743 2009-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
3744
3745         * basic-simd.cs: Add tests for usage of the sizeof opcode.
3746
3747 2009-01-07  Geoff Norton  <gnorton@novell.com>
3748
3749         * helpers.c:  Allow mono -v -v -v to work on darwin.
3750
3751 2009-01-05  Bill Holmes  <billholmes54@gmail.com>
3752
3753         * mini-amd64.c (mono_arch_get_vcall_slot) : Handle an additional instruction
3754           pattern. 
3755
3756         Contributed under MIT/X11 license.
3757
3758 2009-01-05  Zoltan Varga  <vargaz@gmail.com>
3759
3760         * mini.c (mono_allocate_stack_slots_full2): Use mono_class_from_mono_type
3761         instead of directly accessing type->data.klass. Fixes #462016.
3762         (mono_allocate_stack_slots_full): Ditto.
3763
3764         * mini-arm.c (mono_arch_flush_icache): Applied patch from Riku Voipio 
3765         <novell@kos.to>. Fix cache flush on kernels without OLDABI compat option.
3766
3767         * aot-compiler.c (emit_plt): Fix ARM build.
3768
3769 2009-01-04  Zoltan Varga  <vargaz@gmail.com>
3770
3771         * branch-opts.c (mono_if_conversion): Optimize this using ins->prev.
3772         
3773         * branch-opts.c (mono_if_conversion): Fix an assert introduced by the last
3774         change.
3775
3776         * branch-opts.c (mono_if_conversion): Use branch->inst_true_bb/inst_false_bb
3777         instead of bblock->out_bb [0]/[1], the two might not be the same. Fixes
3778         #463357.
3779
3780         * iltests.il.in: Add a regression test.
3781
3782 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
3783
3784         * mini-codegen.c (mono_print_ins_index): Pretty print XPHI and VPHI.
3785
3786 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
3787
3788         * basic-simd.cs: Add a regression test for #462457.
3789
3790 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
3791
3792         * mini-ops.h: Add a definition of XPHI.
3793
3794         * mini.h (MONO_IS_PHI): Make is aware of simd instrincs. 
3795
3796         * ssa.c (op_phi_to_move): Handle XPHI.
3797
3798         * ssa.c (mono_ssa_compute): Generate a XPHI for simd intrinsics instead of VPHI.
3799
3800         Fixes #462457
3801
3802 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
3803
3804         * method-to-ir.c (mono_emit_rgctx_calli): Fix a warning.
3805
3806 2008-12-31  Geoff Norton  <gnorton@novell.com>
3807
3808         * mini-ppc.c: The prolog size allocated can be too small for darwin
3809         ppc32 under certain circumstances.  Also fix a small logic bug.
3810
3811 2008-12-29  Zoltan Varga  <vargaz@gmail.com>
3812
3813         * mini.c (mono_jit_compile_method_inner): Avoid holding the domain lock
3814         while loading AOT methods.
3815
3816         * mini-exceptions.c: Check jit_tls->class_cast_from instead of class_cast_to
3817         since only the former is nulled out after a successful cast. This prevents
3818         crashes with rethrown exceptions when using --debug=casts.
3819
3820 2008-12-24  Mark Probst  <mark.probst@gmail.com>
3821
3822         * mini.h: New macro for checking whether a method is final,
3823         i.e. whether the method or its class is marked final.
3824
3825         * method-to-ir.c: Use the new macro for all final-checks
3826         consistently.  Fixes the crash in the System.ServiceModel tests.
3827
3828 2008-12-23  Mark Probst  <mark.probst@gmail.com>
3829
3830         * mini-exceptions.c (get_exception_catch_class): Corrected another
3831         overly strict assertion.
3832
3833 2008-12-23  Mark Probst  <mark.probst@gmail.com>
3834
3835         * mini-ppc.c (mono_arch_build_imt_thunk): Save and restore r11.
3836         Clobbering it is not allowed because the caller might use it as
3837         the vtable register in the interface call.
3838
3839 2008-12-19  Mark Probst  <mark.probst@gmail.com>
3840
3841         * mini-exceptions.c (get_exception_catch_class): Corrected an
3842         overly strict assertion.
3843
3844 2008-12-18  Mark Mason  <mmason@upwardaccess.com>
3845         
3846         * method-to-ir.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P or sizeof(gpointer) when appropriate.
3847
3848         * mini.h: Move typedef to mgreg_t up above include of mini-arch.h
3849
3850         * local-propogation.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P when appropriate
3851
3852         * cpu-mips.md: correct lengths for certain long_ opcodes.
3853
3854         * mini-mips.h: Only emulate long operations when SIZEOF_REGISTER==4. Add missing func decl.
3855
3856         * mini-mips.c: Add support for more long operations. Fix issues with stack frame layout for n32 (still not perfect yet). Add mips_emit_load_const().
3857         
3858 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
3859
3860         * exceptions-mips.c (mono_arch_find_jit_info): decode sd instructions as well when looking for registers.
3861         
3862 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
3863         
3864         * mini-mips.c (mono_arch_output_basic_block): OP_JUMP_TABLE stores patch type in inst_c1, not inst_i1.
3865         
3866 2008-12-16  Rodrigo Kumpera  <rkumpera@novell.com>
3867
3868         * branch-opts.c (remove_block_if_useless): Even if BB0 falls through, don't add a br to the
3869         next basic block.
3870         
3871 2008-12-16  Mark Mason  <mmason@upwardaccess.com>
3872
3873         * mini.h: Allow MonoInst 'p' field to alias with the low-order bits of the 'const_val' fields correctly on big-endian systems when SIZEOF_VOID_P < SIZEOF_REGISTER
3874
3875         * ir-emit.h: Change SIZEOF_VOID_P to SIZEOF_REGISTER, init instruction through inst_c* fields instead of inst_p* fields in case sizeof(inst_p) < sizeof(inst_c)
3876         
3877 2008-12-15  Mark Mason  <mmason@upwardaccess.com>
3878         
3879         * trace.c (mono_trace_enter_method): correctly handle arguments smaller than the stack slot size on big endian systems.
3880         
3881 2008-12-14  Zoltan Varga  <vargaz@gmail.com>
3882
3883         * liveness.c (mono_analyze_liveness): Avoid eliminating the 'this' var in
3884         gshared code. Fixes #458947.
3885
3886         * generics.cs: Add a test.
3887
3888 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
3889         
3890         * method-to-ir.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
3891         
3892         * mini-mips.c: first pass n32 code generation.
3893
3894         * mini-mips.h: datatypes and defines for n32 support.
3895
3896         * exceptions-mips.c: first pass n32 code generation.
3897         
3898         * tramp-mips.c: first pass n32 code generation.
3899         
3900         * cpu-mips.md: add long_ opcodes.
3901         
3902 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
3903
3904         * liveness.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
3905
3906         * cfold.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
3907         
3908         * local-propogation.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
3909         
3910         * regalloc2.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
3911
3912         * mini.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
3913
3914         * mini-codegen.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
3915
3916         * ssa.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
3917
3918         * decompose.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
3919
3920         * helpers.c: for mips/n32, don't pass -mips32 to objdump
3921
3922 2008-12-12  Zoltan Varga  <vargaz@gmail.com>
3923
3924         * mini-arm.c tramp-arm.c: Fix calls to mono_arch_flush_icache.
3925
3926 2008-12-12  Andres G. Aragoneses  <aaragoneses@novell.com>
3927
3928         * driver.c: Sync --help-trace with man page (EXPR,EXPR).
3929
3930 2008-12-12  Mark Probst  <mark.probst@gmail.com>
3931
3932         * mini-ppc.h, exceptions-ppc.c, tramp-ppc.c: Create function
3933         descriptors for helper functions directly in front of the code.
3934
3935 2008-12-11  Mark Probst  <mark.probst@gmail.com>
3936
3937         * method-to-ir.c: Removed an unnecessary assertion.
3938
3939 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
3940
3941         * method-to-ir.c: Merge SGEN changes from the old JIT.
3942
3943 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
3944
3945         * driver.c (compile_all_methods_thread_main): Handle failure of
3946         mono_get_method ().
3947
3948 2008-12-10  Mark Probst  <mark.probst@gmail.com>
3949
3950         * mini-ppc.c: Merged with mini-ppc64.c.
3951
3952         * mini-ppc.h: Define PPC_MINIMAL_PARAM_AREA_SIZE on all targets.
3953
3954         * Makefile.am: Use the same sources for PPC and PPC64.
3955
3956         * mini-ppc64.c: Removed.
3957
3958 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
3959
3960         * branch-opts.c (remove_block_if_useless): Extract fall through detection
3961         code to mono_bb_is_fall_through.
3962         
3963         * branch-opts.c (mono_remove_critical_edges): Same.
3964
3965 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
3966
3967         * ssa.c (fold_ins): branch opt can kill dummy switch ops so we can't
3968         expect that an OP_BR_REG will be there.
3969
3970 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
3971
3972         * branch-opts.c (remove_block_if_useless): Use MONO_IS_BRANCH_OP instead of checking
3973         for the many branch ops. The original check miss OP_BR_REG.
3974
3975         Fixes #457574.
3976         
3977 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
3978
3979         * mini-mips.h mini-mips.c exceptions-mips.c tramp-mips.c: first round of changes necessary to eventually support n32.
3980
3981 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
3982
3983         * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
3984         while holding the aot lock.
3985
3986 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
3987
3988         * mini-mips.c (mono_arch_output_basic_block): use mfc1/lwc1 instead of mfc1d/ldc1
3989         
3990 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
3991
3992         * mini.c (mini_cleanup) : Adding a call to cominterop_release_all_rcws 
3993           to release all runtime callable wrappers held by the runtime.
3994
3995         Contributed under MIT/X11 license.
3996
3997 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
3998
3999         * tramp-amd64.c (mono_arch_create_trampoline_code_full) : Increase the code size for
4000           for Winx64.
4001
4002         Contributed under MIT/X11 license.
4003
4004 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
4005
4006         * aot-runtime.c (decode_exception_debug_info): Acquire the domain
4007         lock when calling mono_domain_alloc (). Hopefully fixes #415608.
4008
4009 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
4010
4011         * cpu-mips.md: fix ckfinite length
4012
4013         * mini-mips.c: at least recognize n32 ABI when used (not yet supported)
4014         (mono_arch_lowering_pass): cleanup, rearrange for clarity
4015         (mono_arch_output_basic_block): implement OP_CKFINITE, add more asserts
4016         
4017 2008-12-08  Mark Mason   <mmason@upwardaccess.com>
4018
4019         * exceptions-mips.c (mono_arch_find_jit_info): init new_ctx with ctx, dont' call setup_context.
4020         
4021 2008-12-08  Geoff Norton  <gnorton@novell.com>
4022
4023         * tramp-amd64.c: r120895 stores RAX, so we need to increase the window
4024         size by 8 bytes as well.
4025
4026 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4027
4028         * basic-simd.cs: Fix method names for Vector16b.
4029         
4030 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4031
4032         * basic-simd.cs: Fix method names for Vector16sb.
4033
4034 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4035
4036         * basic-simd.cs: Fix method names for Vector8us.
4037         
4038 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4039
4040         * basic-simd.cs: Fix method names for Vector8s.
4041         
4042 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4043
4044         * basic-simd.cs: Fix method names for Vector4ui.
4045
4046 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4047
4048         * basic-simd.cs: Fix method names for Vector2l.
4049
4050 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4051
4052         * basic-simd.cs: Fix method names for Vector2d.
4053
4054 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4055
4056         * simd-intrinsics.c (mono_emit_simd_intrinsics): Add support for intrinsics
4057         that are extension methods.
4058
4059 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4060
4061         * basic-simd.cs: Fix method names for Vector4f.
4062
4063 2008-12-08  Zoltan Varga  <vargaz@gmail.com>
4064
4065         * mini-exceptions.c (mono_print_thread_dump): Mark threadpool threads
4066         as such. Fixes #456669.
4067
4068 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
4069
4070         * mini-mips.c (mono_arch_emit_call): narrow float arguments when passing as args.
4071         
4072 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
4073
4074         * mini-mips.c (mono_arch_lowering_pass): don't handle OP_ICONV_TO_R* or OP_R*CONST
4075         (mono_arch_emit_setret): use OP_MIPS_CVTSD to return SP floats
4076         (mono_arch_output_basic_block): simplify FP load/store, handle OP_MIPS_FBLT_UN
4077         (mips_adjust_stackframe): handle FP spills
4078                 
4079         * mini-ops.h: add mips_mtc1_s2
4080         
4081         * cpu-mips.md: add mips_mtc1_s2
4082         
4083 2008-12-07  Zoltan Varga  <vargaz@gmail.com>
4084
4085         * unwind.c: New file, move the unwind info encoding functions here from
4086         aot-compiler.c, so they could be used at runtime too.
4087
4088 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
4089
4090         * mini-mips.c (mono_arch_lowering_pass): handle OP_IMUL_IMM as well
4091         (mono_arch_output_basic_block): fix OP_LOCALLOC code generation
4092         
4093 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
4094
4095         * mini-mips.c: cleanup warnings
4096         (mono_arch_lowering_pass): handle OP_LOCALLOC_IMM
4097         (mips_adjust_stackframe): handle case of taking the address of stack locals
4098         
4099 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
4100
4101         * aot-compiler.c: Implement a few functions missing from the asm writer.
4102         (emit_method_code): Only write symbols for methods when using the bin
4103         writer, since the assembler can't deal with the characters in our method
4104         names.
4105
4106         * aot-compiler.c (is_plt_patch): ICALL_ADDR is also a plt patch.
4107
4108         * method-to-ir.c (mono_method_to_ir): Transform aotconst+calli into a direct
4109         call.
4110
4111         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Rework the code
4112         a bit to also restore %rax.
4113
4114 2008-12-05  Mark Probst  <mark.probst@gmail.com>
4115
4116         * mini-ppc.c: Some simple merges from mini-ppc64.c.
4117
4118 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
4119
4120         * ssa.c (mono_ssa_compute): Only add an implicit reference at start for
4121         arguments.
4122
4123 2008-12-05  Mark Probst  <mark.probst@gmail.com>
4124
4125         * exceptions-ppc.c: Merged with exceptions-ppc64.c.
4126
4127         * mini-ppc.c, mini-ppc.h: Remove PPC_STACK_ALIGNMENT and use
4128         MONO_ARCH_FRAME_ALIGNMENT.  Struct for PPC64 function descriptors.
4129
4130         * exceptions-ppc64.c: Removed.
4131
4132         * Makefile.am: Use exceptions-ppc.c instead of exceptions-ppc64.c.
4133
4134 2008-12-05  Mark Probst  <mark.probst@gmail.com>
4135
4136         * tramp-ppc.c, mini-ppc.c, mini-ppc.h: Merged tramp-ppc.c with
4137         tramp-ppc64.c.
4138
4139         * Makefile.am: Use tramp-ppc.c instead of tramp-ppc64.c.
4140
4141         * tramp-ppc64.c: Removed.
4142
4143 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
4144
4145         * aot-compiler.c (add_generic_instances): Skip non-generic classes in
4146         the TYPESPEC table.
4147
4148 2008-12-05  Mark Probst  <mark.probst@gmail.com>
4149
4150         * mini-ppc.h: Merged mini-ppc64.h with mini-ppc.h.
4151
4152         * exceptions-ppc64.c, tramp-ppc64.c, mini-arch.h, Makefile.am: Use
4153         mini-ppc.h instead of mini-ppc64.h.
4154
4155         * mini-ppc64.h: Removed.
4156
4157 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
4158
4159         * mini-mips.c: introduce USE_LDC_SDC: use ldc1/sdc1 to load/store doubles, disabled by default
4160         
4161         * mini-mips.c (mono_arch_emit_outarg_vt): fix offset calculation for memcpy in structure passing.
4162         
4163 2008-12-05  Mark Probst  <mark.probst@gmail.com>
4164
4165         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c:
4166         Removed FIRST/LAST_[GF]REG macros, to make merging PPC64 with PPC
4167         code easier.
4168
4169 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
4170
4171         * basic-simd.cs: Tests for operator == and != on  Vector8us and Vector16b.
4172
4173 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
4174
4175         * simd-intrinsics.c: Add support for operator == and != to Vector8(u)s and Vector16(s)b.
4176
4177 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
4178
4179         * basic-simd.cs: Tests for operator == and != on Vector4f.
4180
4181 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
4182
4183         * simd-intrinsics.c (simd_intrinsic_emit_equality): Adapt to support Vector4f.
4184
4185         * simd-intrinsics.c: Kill useless enum.
4186
4187 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
4188
4189         * cpu-mips.md: add long_conv_to_ovf_i4_2
4190         * mini-mips.c: update/add various _OVF_ opcodes to fix test failures
4191
4192 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
4193
4194         * mini-mips.c: ifdef protect automatic promotions of R4 to R8.
4195         
4196         * mini-mips.c (mono_arch_emit_setret): handle R4 case with FCONV_TO_R4 instead of FMOVE
4197
4198 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
4199
4200         * mini-mips.c (mono_arch_output_basic_block): fix codegen for OP_OR_IMM/OP_IOR_IMM
4201         
4202 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
4203
4204         * basic-simd.cs: Add tests for new methods.
4205
4206 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
4207
4208         * simd-intrinsics.c: Add support for operator == and !=
4209         on Vector4(u)i.
4210
4211         * simd-methods.h: Add SN_op_Inequality and SN_op_Equality.
4212
4213 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
4214
4215         * simd-intrinsics.c: Remove ExtractByteMask intrinsics.
4216
4217 2008-12-04  Zoltan Varga  <vargaz@gmail.com>
4218
4219         * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
4220
4221         * mini.c (mono_resolve_patch_target): Allow pinvoke methods in 
4222         MONO_PATCH_INFO_ICALL_ADDR.
4223
4224         * aot-runtime.c (MonoAotFileInfo): Correct order of fields.
4225
4226         * aot-compiler.c: Resurrect full-aot support.
4227
4228 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
4229
4230         * mini-mips.c (mono_arch_lowering_pass): handle OP_COMPARE and OP_ICOMPARE
4231         
4232 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
4233
4234         * mini-mips.c (mono_arch_output_basic_block): fix OP_IREM_UN code generation
4235         
4236 2008-12-03  Rodrigo Kumpera  <rkumpera@novell.com>
4237
4238         * basic-simd.cs: Fix tests to work under ppc.
4239         Remove tests for methods that will be removed.
4240
4241 2008-12-03  Mark Probst  <mark.probst@gmail.com>
4242
4243         * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
4244         generic type (via a typedef or typeref) correctly.
4245
4246 2008-12-03  Zoltan Varga  <vargaz@gmail.com>
4247
4248         * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
4249         diagnose an assertion failure.
4250
4251 2008-12-02  Mark Probst  <mark.probst@gmail.com>
4252
4253         * tramp-ppc64.c (mono_arch_create_rgctx_lazy_fetch_trampoline):
4254         Fix trampoline size.
4255
4256         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: A few floating point
4257         conversion opcodes are implemented natively instead via emulation.
4258
4259 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
4260
4261         * cpu-mips.md: remove mips_xori
4262
4263         * mini-ops.h:  remove mips_xori
4264
4265         * mini-mips.h: replace OP_MIPS_XORI with OP_IXOR
4266
4267         * mini-mips.c (mono_arch_decompose_long_opts): Add ladd_imm, lsub, lsub_imm, lneg, lsub_ovf, lsub_ovf_un.
4268         
4269         * mini-mips.c (mono_arch_lowering_pass, mono_arch_output_basic_block): fix IXOR handling
4270         
4271 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
4272
4273         * cpu-mips.md: fix instruction lengths.
4274
4275         * mini-mips.h: define MONO_ARCH_NO_IOV_CHECK
4276
4277         * mini-mips.c: move most instruction rewriting into decompose_ops. Implement conditional branches and exceptions. Fix jump table patch handling. Implement add/sub OVF.
4278
4279         * mini-ops.h: fix slti / sltiu op profiles.
4280         
4281 2008-12-02  Martin Baulig  <martin@ximian.com>
4282
4283         * method-to-ir.c (mono_method_to_ir): Disable debugging
4284         information for the init locals block to make the debugger stop
4285         after all locals have been initalized.
4286
4287 2008-12-02  Martin Baulig  <martin@ximian.com>
4288
4289         * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
4290         running inside the debugger.
4291
4292 2008-12-01  Zoltan Varga  <vargaz@gmail.com>
4293
4294         * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
4295         is enabled.
4296
4297         * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the 
4298         alu->alu imm optimization which only shows if deadce is disabled.
4299
4300         * aot-compiler.c: Rename the function names for the binary and asm writers
4301         so they can coexist in the same process. Rework the xdebug code to use the
4302         asm writer. This avoids the need to call into the runtime to dump the
4303         debugging info. Add more debugging info for types.
4304
4305         * mini-<ARCH>.h: Kill MONO_ARCH_HAVE_NORMALIZE_OPCODES define.
4306
4307         * genmdesc.c genmdesc.pl mini.h: Don't put the CEE_ opcodes into the
4308         cpu description tables, they can't occur in cpu-<ARCH>.md.
4309
4310         * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
4311         the stack in CEE_LDFLDA. Fixes #450542.
4312
4313         * generics.cs: Add a new test.
4314
4315 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
4316
4317         * mini-ops.h: updated MIPS opcodes
4318         * mini-mips.c: decompose long opts
4319         * mini-mips.h: decompose long opts
4320         
4321 2008-11-29  Mark Mason   <mmason@upwardaccess.com>
4322
4323         * cpu-mips.md: fix length on int_rem_un
4324         * mini-mips.c (mips_stackframe_adjust): fix insertion of spillvars region in MIPS stackframes.
4325         
4326 2008-11-29  Zoltan Varga  <vargaz@gmail.com>
4327
4328         * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
4329
4330         * mini-codegen.c (mono_print_ins_index): Handle OP_VOIDCALL_MEMBASE.
4331
4332 2008-11-29  Martin Baulig  <martin@ximian.com>
4333
4334         * mini-exceptions.c (mono_handle_native_sigsegv): Check
4335         mono_debug_using_mono_debugger() in addition to the
4336         `no_gdb_backtrace' flag in the `MonoDebugOptions'.
4337
4338 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
4339
4340         * mini-ops.h: updated more MIPS opcodes
4341         * mini-mips.c: FP compare/branch working again, clean up last of CEE_ -> OP_ mappings
4342         * cpu-mips.md: Added MIPS versions of new FP compare/branch opcodes.
4343         
4344 2008-11-28  Mark Probst  <mark.probst@gmail.com>
4345
4346         * mini-ppc64.c: Patch the RGCTX fetch trampoline correctly.
4347
4348 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
4349
4350         * mini-mips.c (mono_arch_emit_call): adding missing conversion to fp single when passing in integer arg register.
4351         * mini-mips.c (mips_adjust_stackframe): compensate for spill-down logic.
4352         * mini-ops.h: correct selected mips opcode entries
4353         
4354 2008-11-28  Mark Probst  <mark.probst@gmail.com>
4355
4356         * mini-ppc64.c, mini-ppc64.h: Enable generalized IMT thunks and
4357         make them work.
4358
4359 2008-11-28  Mark Probst  <mark.probst@gmail.com>
4360
4361         * mini-ppc64.h, tramp-ppc64.c: Make generic code sharing work.
4362
4363 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
4364
4365         * method-to-ir.c, mini-trampolines.c: protect IMG code with #ifdef MONO_ARCH_HAVE_IMT to fix compile errors.
4366         * mini-mips.c: Fixup stackframe assignments after allocation of spillvars.
4367         * mini-mips.h: disable IMT
4368         * tramp-mips.c (mono_arch_get_vcall_slot): fix offset extraction
4369         
4370 2008-11-28  Mark Probst  <mark.probst@gmail.com>
4371
4372         * mini-ppc64.c, mini-ppc64.h: Don't emulate long ops.
4373
4374 2008-11-28  Mark Probst  <mark.probst@gmail.com>
4375
4376         * mini-ppc64.c, exceptions-ppc64.c: Several fixes.
4377
4378 2008-11-28  Zoltan Varga  <vargaz@gmail.com>
4379
4380         * method-to-ir.c (handle_isinst): Use PCONST instead of ICONST for
4381         consistency.
4382
4383 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
4384
4385         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
4386         for Set/GetVector aligned versions.
4387
4388 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
4389
4390         * basic-simd.cs: Add tests for Get/SetVector.
4391
4392 2008-11-27  Mark Probst  <mark.probst@gmail.com>
4393
4394         * mini.c: Removed g_slist_append_mempool().  Now in
4395         metadata/mempool.c.
4396
4397 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
4398
4399         * simd-intrinsics.c (mono_emit_vector_ldelema): Extract the element
4400         size properly and make the bounds check optional.
4401
4402         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
4403         for SetVector and IsAligned.
4404
4405 2008-11-27  Zoltan Varga  <vargaz@gmail.com>
4406
4407         * mini.c: Remove unused mono_normalize_opcodes () function.
4408
4409 2008-11-26  Mark Probst  <mark.probst@gmail.com>
4410
4411         * method-to-ir.c (mini_emit_inst_for_method): Small fix: we're
4412         using the new atomic add ops now.
4413
4414         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Implemented atomic
4415         add.
4416
4417 2008-11-26  Mark Probst  <mark.probst@gmail.com>
4418
4419         * mini-ppc64.c: Several fixes.
4420
4421 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
4422
4423         * cpu-mips.md: added jump_table
4424         * mini-mips.c: added jump_table. Eliminate compare-imm when lowering. Remove dead function.             
4425
4426 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
4427
4428         * mini-mips.c, mini-mips.h, tramp-mips.c, cpu-mips.md: Initial upgrade of MIPS port to new IR.
4429
4430 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
4431
4432         * mini-ops.h: corrected a handful of MIPS opcodes.
4433
4434 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
4435
4436         * aot-compiler.c: MIPS to use ELF writer
4437
4438 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
4439
4440         * mini-codegen.c: remove MIPS specific assert.
4441
4442 2008-11-25  Mark Probst  <mark.probst@gmail.com>
4443
4444         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Several
4445         fixes.  PPC64 now passes most of the runtime regressions.
4446
4447 2008-11-24  Zoltan Varga  <vargaz@gmail.com>
4448
4449         * regalloc2.c: Distinguish between use/def positions. Optimize the creation of
4450         volatile intervals a bit.
4451
4452 2008-11-24  Mark Probst  <mark.probst@gmail.com>
4453
4454         * basic-long.cs: New test case.
4455
4456 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
4457
4458         * mini.c (mini_method_compile): Disable globalra for large methods for 
4459         now.
4460
4461         * regalloc2.c (order_moves): Add fp support.
4462
4463         * branch-opts.c (mono_remove_critical_edges): Split non-critical edges whose
4464         source bblock ends with an OP_BR_REG.
4465
4466         * ratests.cs: Add a new test.
4467
4468 2008-11-23  Mark Probst  <mark.probst@gmail.com>
4469
4470         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c: Disable generic code
4471         sharing.  PPC64 now passes generics.exe.
4472
4473 2008-11-23  Mark Probst  <mark.probst@gmail.com>
4474
4475         * mini-ppc64.c: Several fixes.  PPC64 now runs iltests.exe.
4476
4477 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
4478
4479         * exceptions-x86.c (mono_arch_find_jit_info): Avoid reading uninitialized
4480         memory when mono_jit_info_table_find () can't find the method in the
4481         LMF case.
4482
4483         * aot-compiler.c (mono_save_xdebug_info): Emit complete debug info for
4484         AOTed code too.
4485         
4486         * aot-compiler.c (mono_save_xdebug_info): Make this work with the assembly
4487         writer too.
4488
4489 2008-11-23  Mark Probst  <mark.probst@gmail.com>
4490
4491         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, cpu-ppc64.md:
4492         Several fixes.  PPC64 now runs exceptions.exe and
4493         devirtualization.exe.
4494
4495 2008-11-22  Mark Probst  <mark.probst@gmail.com>
4496
4497         * mini-ppc64.c, tramp-ppc64.c: Small fixes.  PPC64 now runs
4498         arrays.exe and basic-math.exe.
4499
4500 2008-11-22  Mark Probst  <mark.probst@gmail.com>
4501
4502         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c,
4503         cpu-ppc64.md: Several fixes.  PPC64 now runs objects.exe.
4504
4505 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
4506
4507         * simd-intrinsics.c: Add support ArrayExtension intrinsics.
4508
4509 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
4510
4511         * method-to-ir.c: Move bounds checking macros to ir-emit.h
4512
4513         * ir-emit.h: Move macros from method-to-ir.c to here.
4514
4515 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
4516
4517         * mini-ops.h: Correct the long simd ops to use LREG.
4518
4519 2008-11-21  Zoltan Varga  <vargaz@gmail.com>
4520
4521         * mini-ops.h: Correct the dreg type of OP_LOADI8_MEMBASE.
4522         
4523         * mini-ops.h: Correct the dreg type of a few long opcodes.
4524
4525         * mini-amd64.h: Applied patch from Mihai Chelaru <kefren@ngnetworks.ro>.
4526         Add netbsd support.
4527
4528 Fri Nov 21 12:52:23 CET 2008 Paolo Molaro <lupus@ximian.com>
4529
4530         * mini-ppc.c: remove negative stack references in epilog
4531         for platforms that don't support the red zone.
4532
4533 2008-11-21  Mark Probst  <mark.probst@gmail.com>
4534
4535         * mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved floating
4536         point regs.  Now PPC64 passes basic-calls.exe.
4537
4538 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4539
4540         * basic-simd.cs: Add tests for accessors of Vector2l.
4541
4542 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4543
4544         * mini-ops.h: Added OP_INSERTX_I8_SLOW,.
4545
4546         * mini-x86.c (mono_arch_decompose_long_opts): Decompose OP_INSERTX_I8_SLOW.
4547         
4548         * simd-intrinsics.c: Add support for Vector2l and Vector2ul.
4549
4550 2008-11-21  Mark Probst  <mark.probst@gmail.com>
4551
4552         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes.  Now
4553         PPC64 passes basic-long.exe.
4554
4555 2008-11-20  Mark Probst  <mark.probst@gmail.com>
4556
4557         * decompose.c: Decompose carry and overflow add on PPC64 like on
4558         other 64 bit archs.  Don't decompose sub at all on PPC64.
4559
4560         * mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c, cpu-ppc64.md:
4561         Several fixes and new opcodes.  Now PPC64 runs (but doesn't pass)
4562         basic-long.exe.
4563
4564 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4565
4566         * basic-simd.cs: Add tests for accessors of Vector2d.
4567
4568 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4569
4570         * mini-ops.h: Added OP_INSERTX_R8_SLOW,.
4571
4572         * cpu-x86.md: Same.
4573
4574         * mini-x86.c (mono_arch_output_basic_block): Same.
4575         
4576         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector2d.
4577
4578 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4579
4580         * basic-simd.cs: Add tests for accessors of Vector4f.
4581
4582 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4583
4584         * mini-ops.h: Added OP_INSERTX_R4_SLOW,.
4585
4586         * cpu-x86.md: Same.
4587
4588         * mini-x86.c (mono_arch_output_basic_block): Same.
4589         
4590         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4f.
4591
4592 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4593
4594         * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
4595
4596 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4597
4598         * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
4599
4600         * cpu-x86.md: Same.
4601
4602         * mini-x86.c (mono_arch_output_basic_block): Same.
4603         
4604         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
4605
4606 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4607
4608         * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
4609
4610 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4611
4612         * simd-intrinsics.c: Enable setters for Vector16sb.
4613
4614 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4615
4616         * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
4617
4618         * cpu-x86.md: Same.
4619
4620         * mini-x86.c (mono_arch_output_basic_block): Same.
4621         
4622         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
4623
4624 2008-11-19  Rodrigo Kumpera  <rkumpera@novell.com>
4625
4626         * simd-intrinsics.c: Implement setter for Vector8us.
4627
4628 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
4629
4630         * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
4631         for dead variables.
4632
4633 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
4634
4635         * mini-ppc.c: remove references to the red zone in the prolog
4636         (for systems that don't support it).
4637
4638 2008-11-19  Mark Probst  <mark.probst@gmail.com>
4639
4640         * cpu-ppc64.md: Fixed a few instruction lengths.
4641
4642         * mini-ppc64.c: Don't emit SETLRET.  PPC64 passes basic-float.exe,
4643         now.
4644
4645 2008-11-19  Mark Probst  <mark.probst@gmail.com>
4646
4647         * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes.  PPC64 passes
4648         basic.exe now.
4649
4650 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
4651
4652         * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
4653
4654 2008-11-18  Rodrigo Kumpera  <rkumpera@novell.com>
4655
4656         * mini-ops.h: Added OP_INSERT_I2.
4657
4658         * cpu-x86.md: Same.
4659
4660         * mini-x86.c (mono_arch_output_basic_block): Same.
4661         
4662         * simd-intrinsics.c: Implement setter for Vector8s.
4663
4664         * simd-methods.h: Add the names of get setters of Vector8s.
4665
4666 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
4667
4668         * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
4669         
4670         * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
4671         parameters.
4672
4673         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
4674
4675 2008-11-18  Mark Probst  <mark.probst@gmail.com>
4676
4677         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
4678         for PPC64.  An empty program runs now.
4679
4680 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
4681
4682         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
4683
4684         * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
4685         a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
4686         info for JITted code is emitted into a shared library, loadable into gdb.
4687
4688 2008-11-18  Mark Probst  <mark.probst@gmail.com>
4689
4690         * Makefile.am: Changes to build PPC64.
4691
4692         * mini-arch.h: Include mini-ppc64.h on PPC64.
4693
4694 2008-11-18  Mark Probst  <mark.probst@gmail.com>
4695
4696         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
4697         in PPC code up to r119147.
4698
4699 2008-11-18  Mark Probst  <mark.probst@gmail.com>
4700
4701         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
4702         cpu-ppc64.md: Changes for PPC64.
4703
4704         Based on code submitted by andreas.faerber@web.de at
4705         https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
4706         X11/MIT license.
4707
4708 2008-11-18  Mark Probst  <mark.probst@gmail.com>
4709
4710         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
4711         cpu-ppc64.md: Copied from the corresponding PPC files from
4712         r118846.
4713
4714 2008-11-18  Scott Peterson  <lunchtimemama@novell.com>
4715
4716         * mini-ops.h: Added OP_ROUND.
4717
4718         * cpu-x86.md: Added round.
4719
4720         * mini-x86.c: Added support for intrinsicing Math.Round (double).
4721
4722         * basic-math.cs: Added test_0_round to test rounding.
4723
4724         Contributed under MIT/X11 license.
4725
4726 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
4727
4728         * aot-compiler.c : Fix the Winx64 build.
4729
4730         Contributed under MIT/X11 license.
4731
4732 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
4733
4734         * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
4735         in OP_EXTRACT_R8 to avoid possible stack corruption.
4736
4737 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
4738
4739         * mini-ops.h: Added OP_EXTRACT_R8/I8.
4740
4741         * cpu-x86.md: Added extract_r8.
4742
4743         * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
4744         
4745         * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
4746         a couple of OP_EXTRACT_I4.
4747
4748         * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
4749
4750         * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
4751
4752 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
4753
4754         * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
4755         and not 4.1. 
4756
4757 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
4758
4759         * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
4760         trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
4761
4762         * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
4763         are not needed any more.
4764
4765         * mini.h: Remove the unused INS_LIST macros.
4766
4767         * mini.c (mini_method_compile): Remove a disable globalra case which is no
4768         longer needed.
4769
4770         * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
4771         ir-emit.h.
4772
4773         * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
4774         mono_alloc_ireg () instead.
4775
4776         * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
4777         macros.
4778
4779         * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
4780         on amd64.
4781
4782         * aot-runtime.c (load_aot_module): Disable AOT when running under
4783         CAS.
4784
4785         * mini-amd64.h: Change the monitor fastpath defines to check for
4786         !PLATFORM_WIN32 so they work on *bsd too.
4787
4788         * mini.h mini.c mini-hhpa.c: Remove more unused code.
4789
4790         * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
4791
4792         * mini.h (MonoCompile): Remove new_ir flag.
4793
4794         * regalloc.h regalloc.c: Remove unused code.
4795
4796         * cpu-*.md: Remove more unused opcodes.
4797
4798         * simple-cee-ops.h simple-mini-ops.h: Removed.
4799
4800         * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
4801         
4802 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
4803
4804         * aliasing.h: Removed.
4805
4806         * *.c: Remove references to aliasing.h and inssel.h.
4807
4808         * mini.c: Remove additional unused functions.
4809
4810         * mini-ops.h cpu-*.md: Remove unused opcodes.
4811
4812 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
4813
4814         Remove the old JIT code.
4815
4816         * inssel*.brg: Removed.
4817
4818         * ssa.c abcremoval.c aliasing.c: Removed.
4819
4820         * ssa2.c: Renamed to ssa.c.
4821
4822         * abcremoval2.c: Renamed to abcremoval.c.
4823
4824         * *.c: Removed all !cfg->new_ir code.
4825
4826         * mini-<ARCH>.c: Removed mono_arch_call_opcode (), 
4827         mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
4828
4829         * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
4830         
4831 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
4832
4833         * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
4834         to simplify the code and cut back on the number of global symbols in the AOT
4835         file.
4836         
4837         * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
4838
4839 2008-11-15  Zoltan Varga  <vargaz@gmail.com>
4840
4841         * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
4842         with the got/got_info tables.
4843
4844         * mini.h: Bump AOT file format version.
4845         
4846         * unwind.h: New file, contains definitions for stack unwinding.
4847
4848         * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
4849         to cfg->unwind_ops.
4850         
4851         * aot-compiler.c: Generalize the emitting of unwind information to use the
4852         information in cfg->unwind_ops.
4853
4854         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
4855
4856         * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
4857         AOT method frames. Enable writing symbols for methods by default.
4858
4859 2008-11-14  Rodrigo Kumpera  <rkumpera@novell.com>
4860
4861         * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
4862         and make it work with vectors of element sizes 1, 2 and 4.
4863
4864         * simd-intrinsics.c: Enable getter for all vectors with element size
4865         1, 2 or 4.
4866
4867         * simd-methods.h: Add the names of other getters.
4868
4869         * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
4870
4871         * cpu-x86.md: Same.
4872
4873         * mini-x86.c: Same.
4874
4875 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
4876
4877         * mini-ppc.h: portability fix.
4878
4879 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
4880
4881         * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
4882         buggy and will overwrite it.
4883
4884 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
4885
4886         * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
4887         Use it to emit local symbols for all methods so AOTed methods show up with
4888         their full name in gdb/valgrind output.
4889
4890 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
4891
4892         * mini-ppc.c: portability fixes.
4893
4894 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
4895
4896         * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
4897         entries out of the if (!generic_shared...) code so it is always done.
4898         (mono_class_init_trampoline): Do the patching when running under valgrind
4899         too, newer versions of valgrind have no problems with it.
4900
4901 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
4902
4903         * aot-compiler.c (emit_writeout): Rework this to make it easier to add
4904         further sections.
4905
4906 2008-11-13  Mark Probst  <mark.probst@gmail.com>
4907
4908         * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
4909         filters.
4910
4911 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
4912
4913         * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui. 
4914
4915 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
4916
4917         * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
4918
4919         * cpu-x86.md: Same.
4920
4921         * mini-x86.c: Same.
4922
4923         * simd-intrinsics.c: Same.
4924
4925 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
4926
4927         * simd-intrinsics.c: Enable constructor intrinsics for all types.
4928
4929 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
4930
4931         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
4932         to work with more Vector types.
4933
4934 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
4935
4936         * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
4937         store the elemens directly instead of using and intermediate.
4938
4939 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
4940
4941         * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
4942
4943         * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
4944         to preserve %eax for aot plt trampolines.
4945
4946         * aot-compiler.c (compile_method): Don't skip synchronized methods.
4947         (encode_method_ref): Flag synchronized methods so they won't go through
4948         the AOT trampoline.
4949
4950         * aot-compiler.c: Additional work to support AOTing synchronized methods/
4951         wrappers.
4952
4953         * cpu-ia64.md (jmp): Increase max length.
4954
4955 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
4956
4957         * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
4958         open generic classes.
4959
4960         * aot-compiler.c: Enable the ELF writer on ELF platforms.
4961
4962         * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
4963         box+brtrue optimization since it causes test failures on x86.
4964
4965 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
4966
4967         * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
4968
4969         * cpu-x86.md: Same.
4970
4971         * mini-x86.c: Same.
4972
4973         * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
4974         for simd ctor values. 
4975
4976         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
4977         instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
4978
4979 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
4980
4981         * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
4982         LogicalRightShift.
4983
4984         * simd-instrincs.c: Same.
4985
4986         * basic-simd.cs: Same.
4987
4988 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
4989
4990         * ratests.cs: Add more tests.
4991
4992         * regalloc2.c (add_spill_code): Handle more corner cases.
4993
4994 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
4995
4996         * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
4997         (update_liveness): Avoid holes in the liveness ranges of hregs if they are
4998         both the source an destination of an instruction.
4999
5000 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
5001
5002         * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
5003         wapihandles.c: more portability changes.
5004
5005 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
5006
5007         * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
5008         * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
5009         safe to execute in a signal handler and the kernel provides better
5010         the info in /proc/self/smaps. Avoid the assert on sigaction during
5011         cleanup.
5012
5013 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
5014
5015         * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
5016         do the bblock linking hack if it is actually needed.
5017
5018         * Makefile.am (patch-libtool): New helper target to patch libtool to speed
5019         up linking.
5020
5021         * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
5022         crash problem is fixed.
5023
5024         * branch-opts.c (mono_remove_critical_edges): Link up newly added
5025         bblocks.
5026
5027         * mini.c (mini_method_compile): Compute unreachable bblocks properly even
5028         for catch clauses.
5029         (mini_method_compile): Set the starting value of next_vreg to 
5030         MAX_IREGS + MAX_FREGS when using globalra.
5031
5032         * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
5033         filter clauses with BB_EXCEPTION_HANDLER.
5034
5035         * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
5036
5037 2008-11-10  Mark Probst  <mark.probst@gmail.com>
5038
5039         * mini-x86.c (mono_arch_get_argument_info): Don't align argument
5040         space for stdcall.  Fixes regressions on Win32.
5041
5042 2008-11-10  Zoltan Varga  <vargaz@gmail.com>
5043
5044         * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
5045         bblocks.
5046         (linear_scan): Remove an assert which doesn't seem to be needed.
5047
5048         * local-propagation.c (mono_local_deadce): Avoid a call to
5049         MONO_DELETE_INS which would screw up the instruction linking.
5050
5051         * mini.c (mono_decompose_op_imm): Make this work with globalra.
5052
5053         * regalloc2.c: Upgrade to work the current JIT code.
5054
5055 2008-11-09  Zoltan Varga  <vargaz@gmail.com>
5056
5057         * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
5058         case.
5059
5060         * aot-runtime.c: Remove some dead code.
5061
5062         * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
5063         consistency.
5064         (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
5065
5066         * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
5067         trampolines using sscanf since atoi doesn't work on large unsigned values.
5068
5069         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): 
5070         Initialize code_size.
5071
5072 2008-11-08  Mark Probst  <mark.probst@gmail.com>
5073
5074         * method-to-ir.c (mini_emit_inst_for_method): Make
5075         Interlocked.CompareExchange work for Int arguments on 32 bit
5076         archs, as well.
5077
5078 2008-11-07  Mark Probst  <mark.probst@gmail.com>
5079
5080         * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
5081
5082 2008-11-06  Bill Holmes  <billholmes54@gmail.com>
5083
5084         * main.c Fix MSVC build.
5085
5086         Contributed under MIT/X11 license.
5087
5088 2008-11-06  Mark Probst  <mark.probst@gmail.com>
5089
5090         * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
5091         alignment larger than 8 bytes are aligned correctly, too.
5092
5093         * mini.c: Honor the min_align field of MonoClass when laying out
5094         the stack.
5095
5096 2008-11-06  Zoltan Varga  <vargaz@gmail.com>
5097
5098         * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
5099
5100         * aot-compiler.c (emit_plt): Fix a warning.
5101         
5102         * aot-compiler.c: Implement ARM support in the binary writer.
5103
5104 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
5105
5106         * basic-simd.cs: Add test for getter with byref arg.
5107         Fix the naming of a few tests.
5108         Add missing checks to a test.
5109
5110 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
5111
5112         * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
5113
5114         * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
5115         most of the full-aot support for monitor enter/exit trampolines.
5116
5117         * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
5118         enter/exit trampoline creation functions.
5119
5120         * Makefile.am: Fix the generation of buildver.h so it is not invoked during
5121         make dist.
5122
5123 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
5124
5125         * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
5126         incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
5127         implement the needed functionality without adding crap to the runtime.
5128
5129 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
5130
5131         * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
5132         non-x86 builds.
5133
5134         * mini.c (mono_build_date): New global version holding the build date in
5135         string format.
5136         
5137         * Makefile.am (buildver.c): Generate a file containing the build date.
5138
5139         * main.c: Set the build date from the generated file.
5140
5141         * mini.c (mono_get_runtime_build_info): New helper function returning build
5142         information in a string format.
5143         
5144         * driver.c (mono_main): Print the build date in --version.
5145
5146         * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
5147         file when the bind-to-runtime-version option is used.
5148
5149 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
5150
5151         * simd-intrinsics.c: Fix bug when using getters and byref args. 
5152
5153 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
5154
5155         * simd-methods.h: Rename prefetch methods.
5156
5157         * simd-intrinsics.c: Same.      
5158
5159 2008-11-05  Mark Probst  <mark.probst@gmail.com>
5160
5161         * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
5162         sizes.
5163
5164 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
5165
5166         * aot-compiler.c: Use the bundled elf header files instead of depending on
5167         the system one.
5168         
5169         * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
5170         mempool.
5171
5172         * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
5173         on every call.
5174
5175 2008-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
5176
5177         * cpu-x86.md: Add store nta ops.
5178
5179         * mini-ops.h: Same.
5180
5181         * mini-x86.c: Same.
5182
5183         * mini.h: Add an enum for simd prefetch modes.
5184
5185         * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
5186         of store. Use the changed code to support store nta.
5187
5188         * simd-intrinsics.c: Add prefetch ops for all vector types.
5189
5190 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
5191
5192         * aot-compiler.c: Add an option for JIT compiling the methods by multiple 
5193         threads.
5194         
5195         * aot-compiler.c: Use statically allocated buffers for constructing symbol 
5196         names.
5197
5198         * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
5199         trampolines.
5200
5201 2008-11-04  Mark Probst  <mark.probst@gmail.com>
5202
5203         * mini-x86.c: Fixed commit.
5204
5205 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
5206
5207         * aot-compiler.c (emit_plt): Align the plt section only on x86.
5208
5209 2008-11-04  Mark Probst  <mark.probst@gmail.com>
5210
5211         * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
5212         and MONITOR_EXIT, for the ASM fastpaths.
5213
5214         * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
5215         available.
5216
5217         * mini.c, patch-info.h: Signature and patch infos for
5218         Monitor.Enter/Exit trampolines.
5219
5220         * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
5221
5222         * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
5223         Monitor.Enter/Exit ASM fastpath for Linux.
5224
5225 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
5226
5227         * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
5228
5229         * objects.cs: Add a new test.
5230         
5231         * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
5232
5233         * aot-runtime.c (load_method): Run class initialization in the PLT case even
5234         if MONO_LOG_LEVEL is set.
5235
5236         * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
5237
5238         * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
5239
5240         * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
5241         
5242         * aot-compiler.c: Change the relocation code to use virtual addresses instead
5243         of file offsets. Align the sections belonging to the data segment to 
5244         PAGESIZE.
5245
5246 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
5247
5248         * aot-compiler.c: Simplify the elf writer by depending on the definitions in
5249         elf.h. Port it to amd64.
5250
5251 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
5252
5253         * driver.c: Enable SIMD by default.
5254
5255 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
5256
5257         * cpu-x86.md: Add prefetch op.
5258
5259         * mini-ops.h: Same.
5260
5261         * mini-x86.c: Same.
5262
5263         * mini.h: Add an enum for simd prefetch modes.
5264
5265         * simd-methods.h: Add prefetch function names.
5266
5267         * simd-intrinsics.c: Add prefetch ops for all vector types.
5268
5269 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
5270
5271         * aot-compiler.c (emit_bytes): Speed this up a little.
5272
5273 2008-11-02  Zoltan Varga  <vargaz@gmail.com>
5274
5275         * aot-compiler.c: Add JIT time etc. statistics.
5276         
5277         * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
5278
5279         * mini.h (MonoCompile): Add 'got_offset' field.
5280
5281         * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
5282         method_got_offsets array.
5283
5284         * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
5285         wrappers.
5286
5287         * aot-compiler.c (compile_method): Add generic method instances referenced
5288         by the method to the list of methods to be compiled, this is required so if
5289         A<T> references B<T>, and another assembly references A<int>, then it will
5290         also get a copy of B<int>.
5291
5292         * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
5293         when checking for monitor enter/exit.
5294
5295 2008-10-30  Mark Probst  <mark.probst@gmail.com>
5296
5297         * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
5298         for Monitor.Enter and Monitor.Exit if enabled.
5299
5300         * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
5301         Solaris.
5302
5303 2008-10-30  Zoltan Varga  <vargaz@gmail.com>
5304
5305         * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
5306         of an OP_MOVE. Fixes #440046.
5307
5308         * basic-long.cs: Add a new test.
5309
5310 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
5311
5312         * mini.h: Add synchronization note for the managed counter-part.
5313
5314         * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
5315         returns the simd caps of the current cpu.
5316
5317 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
5318
5319         * basic-simd.cs: Remove Console.WriteLine.
5320
5321 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
5322
5323         * basic-simd.cs: New tests for Vector2ul.
5324
5325 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
5326
5327         * simd-intrinsics.c: Add new vector type Vector2ul.
5328
5329 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
5330
5331         * basic-simd.cs: New tests for Vector2l.
5332
5333 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
5334
5335         * cpu-x86.md: Add long version of most packed int ops.
5336
5337         * mini-ops.h: Same.
5338
5339         * mini-x86.h: Same.
5340
5341         * simd-intrinsics.c: Add new vector type Vector2l.
5342
5343 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
5344
5345         * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
5346
5347         * simd-methods.h: Remove SN_op_BitwiseXor.
5348
5349 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
5350
5351         * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
5352         alignment.
5353
5354 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
5355
5356         * basic-simd.cs: Test for Vector2d.
5357
5358         * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
5359         value.
5360
5361 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
5362
5363         * cpu-x86.md: Add double version of all packed float ops.
5364
5365         * mini-ops.h: Same.
5366
5367         * mini-x86.h: Same.
5368
5369         * simd-intrinsics.c: Add new vector type Vector2d.
5370
5371         * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
5372
5373         * simd-methods.h: Add Duplicate.
5374
5375 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
5376
5377         * basic-simd.cs: Test for packing with signed saturation.
5378
5379 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
5380
5381         * aot-compiler.c (add_generic_instances): Add all methods of generic instances
5382         found in the TYPESPEC table.
5383
5384 2008-10-26  Zoltan Varga  <vargaz@gmail.com>
5385
5386         * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
5387         too.
5388
5389         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
5390
5391         * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
5392         instead of the RVA, since the RVA can be changed by tools like the cil 
5393         stripper.
5394
5395         * method-to-ir.c (mono_method_to_ir2): Ditto.
5396
5397         * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
5398         (deserialize_variable): Ditto.
5399
5400 2008-10-25  Martin Baulig  <martin@ximian.com>
5401
5402         * debug-mini.c (write_variable): Use
5403         `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
5404
5405 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
5406
5407         * cpu-x86.md: Add unsigned variants of packd and packw.
5408
5409         * mini-ops.h: Same.
5410
5411         * mini-x86.h: Emit the right instruction for packd and packw.
5412         Add unsigned variants of packd and packw.
5413
5414         * simd-intrinsics.c: Packd and packw were used in place of their
5415         unsigned variants. Change that.
5416         Add intrinsics for (Signed)PackWithSignedSaturation.
5417
5418         * simd-methods.h: Add (Signed)PackWithSignedSaturation.
5419
5420 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
5421
5422         * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
5423
5424 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
5425
5426         * mini-ops.h: Remove dword packed add/sub with saturation ops.
5427
5428         * cpu-x86.md: Remove dword packed add/sub with saturation ops.
5429
5430         * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
5431         sse instructions.
5432
5433         * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
5434
5435 2008-10-24  Mark Probst  <mark.probst@gmail.com>
5436
5437         * method-to-ir.c, mini.c: Special casing for the synchronized
5438         wrapper for the ldtoken+GetTypeFromHandle case.
5439
5440 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
5441
5442         * mini.c (mono_replace_ins): Move this to branch-opts.c.
5443
5444         * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
5445         created/split bblocks.
5446
5447 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
5448
5449         * mini-ops.h: Add packed signed mul high.
5450         
5451         * cpu-x86.md: Same.
5452
5453         * mini-x86.c (mono_arch_output_basic_block): Same.
5454
5455         * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
5456
5457         * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
5458
5459 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
5460
5461         * basic-simd.cs: Tests for Vector16sb.
5462
5463 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
5464
5465         * inssel.brg (stmt): Fix OP_HARD_NOP rule.
5466
5467 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
5468
5469         * mini-ops.h: Add packed signed min, max and compare greater.
5470         
5471         * cpu-x86.md: Same.
5472
5473         * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
5474         saturation.
5475
5476         * simd-methods.h: Add CompareGreaterThan.
5477
5478         * simd-methods.h: Remove CompareEquals.
5479
5480         * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
5481
5482         * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
5483
5484         * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
5485         CompareEqual.
5486
5487 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
5488
5489         * basic-simd.cs: Fix tests due to change in the API.
5490
5491 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
5492
5493         * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
5494
5495 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
5496
5497         * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
5498
5499         * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
5500         inst_offset as this has invalid values for LDADDR.
5501
5502 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
5503
5504         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
5505
5506         * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
5507
5508 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
5509
5510         * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
5511         for accessing field->data.
5512
5513 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
5514
5515         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
5516
5517 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
5518
5519         * simd-methods.h: Add SignedPackWithUnsignedSaturation.
5520
5521         * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
5522
5523 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
5524
5525         * dominators.c (mono_compute_natural_loops): Allocate GList enties
5526         from the cfg mempool.
5527
5528 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
5529
5530         * basic-simd.cs: Tests for new methods in Vector8us.
5531
5532 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
5533
5534         * mini-ops.h: Add multiply and store high.
5535         
5536         * cpu-x86.md: Same.
5537
5538         * mini-x86.c (mono_arch_output_basic_block): Same.
5539
5540         * simd-methods.h: Same.
5541
5542         * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
5543         and CompareEqual.
5544
5545 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
5546
5547         * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
5548         mono_class_setup_vtable ().
5549
5550         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
5551         mono_class_get_vtable_entry () for accessing klass->vtable.
5552
5553         * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
5554
5555         * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
5556         found.
5557
5558         * method-to-ir.c (mono_save_token_info): Don't save references made from
5559         wrappers.
5560
5561         * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
5562         of generic instances.
5563
5564         * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
5565
5566 2008-10-19  Mark Probst  <mark.probst@gmail.com>
5567
5568         * cpu-ppc.md, mini-ppc.c: The length of the code generated for
5569         OP_JMP depends on the method signature.  Calculate it properly.
5570
5571 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
5572         
5573         * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
5574         called directly.
5575
5576         * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
5577         instances.
5578         (emit_extra_methods): Add another table mapping method indexes to 
5579         offsets in the extra_method_info table.
5580
5581         * mini.h: Bump AOT file format version.
5582         
5583         * aot-runtime.c: Merge most of the code from mono_aot_get_method
5584         and mono_aot_get_method_from_token () into one function.
5585
5586 2008-10-19  Mark Probst  <mark.probst@gmail.com>
5587
5588         * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
5589         separate counter.
5590
5591 2008-10-18  Zoltan Varga  <vargaz@gmail.com>
5592
5593         * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
5594         methods.
5595
5596         * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
5597         disable_aot.
5598
5599         * mini.c (mono_patch_info_equal): Compare the generic context as well.
5600
5601         * mini.h: Bump aot file format version.
5602
5603         * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
5604         AOT file can contain native code for methods which are not in the METHOD
5605         table. Generate code for non-sharable generic instances of generic methods
5606         found in the METHODSPEC table.
5607         
5608         * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
5609         encoding generic type handles.
5610
5611         * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
5612         (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
5613
5614         * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
5615         macros + MONO_ADD_INS.
5616
5617         * mini.c (mono_jump_info_token_new2): New function which takes a generic
5618         context as well.
5619
5620         * mini.h (MonoJumpInfoToken): Include fields for a generic context.
5621
5622         * mini.h: Bump aot file format version.
5623
5624         * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
5625
5626 2008-10-17  Mark Probst  <mark.probst@gmail.com>
5627
5628         * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
5629         platforms, with definable stack alignment value.  Set to 16 now
5630         for all platforms.
5631
5632         * mini.c, mini.h, driver.c: Command line option for disabling
5633         stack alignment.
5634
5635 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
5636
5637         * basic-simd.cs: Tests for new methods in Vector4ui.
5638
5639 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
5640
5641         * mini-ops.h: Add packed int shuffle.
5642         
5643         * cpu-x86.md: Same.
5644
5645         * mini-x86.c (mono_arch_output_basic_block): Same.
5646
5647         * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
5648         extract mask, max, min, shuffle.
5649
5650         * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
5651
5652 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
5653
5654         * basic-simd.cs: Tests for new methods in Vector8us.
5655
5656 2008-10-17  Mark Probst  <mark.probst@gmail.com>
5657
5658         * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
5659         RuntimeTypeHandle, not a TypedReference.
5660
5661 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
5662
5663         * simd-intrinsics.c: remove relocations.
5664
5665 2008-10-17  Zoltan Varga  <vargaz@gmail.com>
5666
5667         * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM 
5668         optimizations from the x86 backend.
5669
5670 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
5671
5672         * simd-methods.h, simd-intrinsics.c: debloat method names and
5673         prepare for no relocations.
5674
5675 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
5676
5677         * mini-ops.h: Add packed min/equal and sum of absolute differences.
5678         
5679         * cpu-x86.md: Same.
5680
5681         * mini-x86.c (mono_arch_output_basic_block): Same.
5682
5683         * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
5684         extract mask, max, min and sum of absolute differences.
5685
5686         * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
5687         method name.
5688
5689 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
5690
5691         * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
5692         Renamed one test for consistency.
5693
5694 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
5695
5696         * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
5697         fix to the code that deal with other blocks.
5698
5699 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
5700
5701         * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
5702
5703 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
5704
5705         * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
5706         that deals with vreg interference. Explicitly check for OP_LDADDR to be
5707         able to process the source reg.
5708
5709 2008-10-16  Martin Baulig  <martin@ximian.com>
5710
5711         * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
5712
5713         * inssel.brg: Add `OP_HARD_NOP'.
5714
5715         * mini.h (MonoCompile): Added `keep_cil_nops' flag.
5716
5717         * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
5718         `OP_HARD_NOP' instruction when running inside the debugger.
5719
5720         * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
5721         `OP_HARD_NOP' instruction when running inside the debugger.
5722
5723 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
5724
5725         * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
5726         now works. The issue with the regalloc tripping up no longer
5727         happens.
5728
5729         * simd-intrinsics.c (load_simd_vreg): Same.
5730
5731 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
5732         
5733         * basic-simd.cs: Tests for new Vector8ui methods.
5734
5735 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
5736
5737         * simd-intrinsics.c (get_simd_vreg): Simplify code and test
5738         only for type. This fixes crashes where MonoInst::klass is checked
5739         for ops of type != VTYPE or OBJ.
5740
5741         * simd-intrinsics.c (load_simd_vreg): Same.
5742
5743 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
5744
5745         * mini-ops.h: Add ops for packed shuffle/max/avg and
5746         extract mask.
5747         
5748         * cpu-x86.md: Same.
5749
5750         * mini-x86.c (mono_arch_output_basic_block): Same.
5751
5752         * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
5753         extract mask.
5754
5755         * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
5756         to emit extract mask op.
5757
5758         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
5759         to emit word shuffles.
5760
5761 2008-10-15  Mark Probst  <mark.probst@gmail.com>
5762
5763         * mini.c (mono_allocate_stack_slots_full): Align stack frame to
5764         the largest alignment needed by a variable, but at least
5765         sizeof(gpointer).
5766
5767 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
5768
5769         * basic-simd.cs: Tests for the fixes in the last commit.
5770
5771 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
5772
5773         * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
5774         no longer handles STACK_PTR input.
5775
5776         * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
5777
5778         * simd-intrinsics.c (load_simd_vreg): New function that works like 
5779         get_simd_vreg   but handles STACK_PTR input.
5780
5781         * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
5782         as the input can be an arbitrary pointer.
5783
5784         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
5785         LDADDR local optimization directly otherwise use a store op.
5786
5787 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
5788
5789         * basic-simd.cs: Tests for dup low and dup high.
5790
5791 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
5792
5793         * mini-ops.h: Add dup low and dup high ops.
5794         
5795         * cpu-x86.md: Same.
5796
5797         * mini-x86.c (mono_arch_output_basic_block): Same.
5798
5799         * simd-intrinsics.c (vector4f_intrinsics): Same.
5800
5801 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
5802
5803         * basic-simd.cs: Tests for recently added functionality.
5804
5805 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
5806
5807         * mini-ops.h: Add remaining sse1 fp ops.
5808         
5809         * cpu-x86.md: Add remaining sse1 fp ops.
5810
5811         * mini-x86.c (mono_arch_output_basic_block): Same.
5812
5813         * mini.h: Add enum for simd FP compare conditions.
5814
5815         * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
5816
5817         * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
5818         so the backed can generate the appropriate op.
5819
5820 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
5821         This patch squeese one more byte from the SimdIntrinsc struct.
5822
5823         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
5824         a a shift amount intead of simply or'ing it.
5825
5826         * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
5827
5828         * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
5829         byte so we can have an aditional flags field without increasing struct size.
5830
5831         * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
5832         against the simd_supported_versions bitmask.
5833
5834         * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
5835
5836 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
5837
5838         * mini.c: remove rawbuffer code (the only use here is unsafe because
5839         it takes locks during signal handling and the kernel now provides much
5840         better info in proc/pid/smaps these days).
5841
5842 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
5843
5844         * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
5845         OP_X86_PUSH_OBJ. Fixes #434620.
5846
5847         * objects.cs: Add a test.
5848         
5849 2008-10-12  Rodrigo Kumpera  <rkumpera@novell.com>
5850
5851         * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
5852         that the packuswb/packusdw don't work with unsigned numbers for what
5853         would be negative numbers in signed format.
5854
5855         * cpu-x86.md: Add doubleword forms of many ops and packing ones.
5856         Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
5857
5858         * mini-ops.h: Add doubleword forms of many ops and packing ones.
5859
5860         * mini-x86.c: Emit doubleword forms of many ops and packing ones.
5861
5862         * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
5863
5864         * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
5865
5866         * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
5867         add more ops.
5868
5869         * simd-intrinsics.c (simd_version_name): New function, returns the name of the
5870         version as the enum in mini.h.
5871
5872         * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
5873         for sse3 ops, check the simd_version field if present. This way the code
5874         works with all versions of sse.
5875
5876 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
5877
5878         * simd-intrinsics.c: Fixed intrinsic name typo.
5879
5880         * mini.h: Added missing simd exported function.
5881
5882         * basic-simd.cs: Added tests for Vector4ui.
5883         Fixed broken test for Vector16b.
5884
5885 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
5886
5887         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
5888         the max length to 64.
5889
5890 2008-10-10  Mark Probst  <mark.probst@gmail.com>
5891
5892         * method-to-ir.c: Only do the fast virtual generic method call for
5893         non-wrapper methods.
5894
5895         * mini.h, mini-trampolines.c: The new generic virtual remoting
5896         trampoline handles virtual method calls via the vtable (as done by
5897         the fast virtual generic method calls) to remoting proxies.
5898
5899         * mini.c (mono_jit_create_remoting_trampoline): For generic
5900         methods reate a generic virtual remoting trampoline.
5901
5902         * mini-amd64.h: Enable fast virtual generic method calls again.
5903
5904 2008-10-10  Mark Probst  <mark.probst@gmail.com>
5905
5906         * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
5907         restore registers when doing tail calls.
5908
5909 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
5910
5911         * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
5912         Vector4ui.
5913
5914 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
5915
5916         * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
5917
5918 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
5919
5920         * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
5921
5922 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
5923
5924         * basic-simd.cs: Retrofit for API changes.
5925
5926 2008-10-10  Mark Probst  <mark.probst@gmail.com>
5927
5928         * mini-ppc.c: Handle integer stack arguments for tail calls.
5929
5930 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
5931
5932         * optflags-def.h: Removed sse3 optimization.
5933
5934         * driver.c: Same.
5935
5936         * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
5937         sse3.
5938
5939         * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
5940
5941         * mini.h: Added enumeration with simd versions.
5942
5943         * simd-intrinsics.c (emit_intrinsics): Use the new static var
5944         for detecting SSE3.
5945
5946         * simd-intrinsics.c: Added mono_simd_intrinsics_init.
5947
5948         * mini.c (mini_init): Call mono_simd_intrinsics_init.
5949
5950 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
5951
5952         * basic-simd.cs: Added tests for Vector8u and Vector16u.
5953
5954         * basic-simd.cs: Fixed test naming.
5955
5956 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
5957
5958         * mini-ops.h: Added ops for packed and saturated math, shifts
5959         and packing/unpacking.
5960
5961         * cpu-x86.md: Added descriptors for the above ops.
5962
5963         * mini-x86.c: Added code to emmit the above ops.
5964
5965         * simd-intrinsics.c: Added support for Vector16u and Vector8u.
5966
5967 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
5968
5969         * aot-compiler.c (compile_method): Enable AOT for generic code.
5970
5971         * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
5972
5973 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
5974
5975         * mini.c: add a workaround for a common screwup that ends up blamed
5976         to mono (other processes blocking signal delivery).
5977
5978 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
5979
5980         * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
5981         in the LDFLD/STFLD opcodes. Fixes #432673.
5982
5983         * iltests.il.in: Add a new test.
5984
5985 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
5986
5987         * mini-arm.c: attach the thread in unmanaged->managed transitions
5988         using delegates (bug #433148).
5989
5990 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
5991
5992        * basic-simd.cs: Use new ShuffleSel constants.
5993
5994 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
5995
5996         * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
5997
5998         * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
5999         only disable simd intrinsics if no sse2 is detected.
6000
6001         * optflags-def.h: Added sse3.
6002
6003         * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
6004         is disabled.
6005
6006 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
6007
6008         * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
6009         when adding delegate-invoke wrappers.
6010
6011 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
6012
6013         * Makefile.am: Reenable the simd tests.
6014
6015 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
6016
6017         * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
6018           add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
6019           other vreg is allocated to that hreg.
6020
6021         Contributed under MIT/X11 license.
6022
6023 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
6024
6025         * Makefile.am: Disable the simd tests for now as Mono.Simd is not
6026         yet checked in.
6027
6028 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
6029
6030         * basic-simd.cs: New test suite for SIMD intrinsics.
6031
6032         * Makefile.am: Added new tests.
6033
6034 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
6035
6036         * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
6037
6038         * mini-ops.h: Same.
6039
6040         * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
6041
6042         * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
6043         using SSE2 aware opcodes.
6044
6045         * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
6046         is enabled, this code path is only reachable if conversion ops are emmited after
6047         mono_method_to_ir.
6048
6049         * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
6050
6051         This optimization saves 6 bytes per conversion against the old version.
6052
6053 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
6054
6055         * aot-compiler.c (compile_method): Don't skip methods referencing 
6056         generic methods without a corresponding entry in token_info_hash, since
6057         encode_method_ref () can handle all generic methods now.
6058
6059         * method-to-ir.c (mono_save_token_info): Don't save the token info if a 
6060         generic context is set.
6061         
6062         * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
6063         generic sharing of LDTOKEN.
6064
6065 2008-10-06  Mark Probst  <mark.probst@gmail.com>
6066
6067         * mini-amd64.h: Temporarily disabled fast virtual generic method
6068         calls because it breaks the System.Runtime.Remoting tests.
6069
6070 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
6071
6072         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
6073
6074         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
6075         so inlining actually works.
6076         (check_inline_caller_method_name_limit): Ditto.
6077
6078 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
6079
6080         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
6081         64 bit safety (from Olaf Hering and Andreas Farber).
6082
6083 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
6084         
6085         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
6086         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
6087         unused virtual call support code.
6088
6089         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
6090         
6091         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
6092         which can't use aot trampolines.
6093         (decode_patch): Don't create aot trampolines for methods which can't use
6094         them.
6095
6096         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
6097         use aot trampolines.
6098
6099         * mini.h: Bump AOT image format version.
6100         
6101 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
6102
6103         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
6104         to save_token_info () since cmethod is inflated for constrained calls.
6105
6106         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
6107
6108 2008-10-04  Andreas Farber  <andreas.faerber@web.de>
6109
6110         * Makefile.am: Add build rules for ppc64.
6111         This avoids the build failing at pedump with unresolved symbols
6112         due to lack of arch_sources. Instead it will now fail earlier
6113         due to lack of cpu-ppc64.md.
6114
6115         Contributed under MIT/X11 license.
6116
6117 2008-10-04  Mark Probst  <mark.probst@gmail.com>
6118
6119         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
6120         tail calls.
6121
6122         * iltests.il.in: Add test case for tail call with many arguments.
6123
6124 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
6125
6126         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
6127         to the fast virtual generic method code until the aot case is fixed.
6128
6129 2008-10-03  Mark Probst  <mark.probst@gmail.com>
6130
6131         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
6132
6133 2008-10-03  Mark Probst  <mark.probst@gmail.com>
6134
6135         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
6136         thunks.
6137
6138 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
6139         
6140         * simd-intrinsics.c: Forgot to add this one.
6141
6142         * mini-codegen.c: Fix macro in case SIMD is not supported.
6143
6144 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
6145         
6146         This patch land initial JIT support for simd intrinsics.
6147
6148         * mini-x86.h: Added new define to make --enable_minimal work on x86.
6149
6150         * Makefile.am: Added simd-intrinsics.c
6151
6152         * simd-intrinsics.c: New file with simd instrinsic related
6153         code.
6154
6155         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
6156
6157         * cpu-x86.md: Add simd related instructions.
6158
6159         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
6160
6161         * driver.c: Added two new --regression variants.
6162
6163         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
6164
6165         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
6166
6167         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
6168         extract some complicated logic to helper functions.
6169
6170         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
6171
6172         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
6173
6174         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
6175         the specialized simplification pass.
6176
6177         * method-to-ir.c (mono_spill_global_vars): Use new macro.
6178
6179         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
6180
6181         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
6182         table.
6183
6184         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
6185         if MONO_ARCH_NEED_SIMD_BANK is defined.
6186
6187         * mini-ops.h: Added the new simd ops.
6188
6189         * mini-x86.c: Added mono_arch_xregname.
6190
6191         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
6192
6193         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
6194
6195         * mini-x86.h: Define simd related MONO_ARCH macros.
6196
6197         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
6198
6199         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
6200
6201         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
6202         MONO_CLASS_IS_SIMD to deal with simd related IR.
6203
6204         * mini.h (MonoInst): Added spill_var to the backend union.
6205
6206         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
6207
6208         * mini.h: Added forward declarations of the new simd fuctions.
6209
6210         * optflags-def.h: Added new optimization names SIMD.
6211
6212         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
6213
6214         * regalloc.h: Added support for working with 3 register banks.
6215
6216         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
6217
6218         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
6219
6220 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
6221
6222         * mini-exceptions.c: remove 64 bit related ifdef clutter.
6223
6224 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
6225
6226         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
6227         instead of one on 64 bit systems.
6228
6229         * method-to-ir.c: Remove unused includes.
6230
6231 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
6232
6233         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
6234         cfg->used_int_regs, since the two are different on arm.
6235
6236 2008-10-02  Mark Probst  <mark.probst@gmail.com>
6237
6238         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
6239         mono_method_get_vtable_index() to get the vtable index.
6240
6241 2008-10-02  Mark Probst  <mark.probst@gmail.com>
6242
6243         * method-to-ir.c (mono_method_to_ir2): Don't create native
6244         wrappers for array methods, because they're never called (and if
6245         they were called they wouldn't work).
6246
6247 2008-10-02  Mark Probst  <mark.probst@gmail.com>
6248
6249         * method-to-ir.c (mono_method_to_ir2): Array methods are
6250         special-cased and must not be invoked indirectly via the (M)RGCTX
6251         when generic sharing is turned on.  Fixes #431413.
6252
6253 2008-10-01  Mark Probst  <mark.probst@gmail.com>
6254
6255         * method-to-ir.c: When generic sharing is active, call
6256         non-interface virtual generic methods via the standard trampoline.
6257
6258         * mini-trampolines.c: Handle virtual generic shared methods.
6259
6260         * mini.h, mini-x86.c, mini-x86.h: New argument for
6261         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
6262         method thunks and which is the trampoline to call if the lookup
6263         fails.  Enable the virtual generic method thunk for x86.
6264
6265         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
6266         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
6267         argument but assert that it's NULL, because these archs don't yet
6268         implement the virtual generic method thunk.  Changes in the IMT
6269         thunk data structures.
6270
6271 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
6272
6273         * aot-compiler.c (emit_globals): Avoid invalid characters in
6274         the static linking symbol.
6275
6276         * objects.cs: Add a test for the range check optimization. Fix warnings.
6277
6278         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
6279         optimization from the current JIT.
6280
6281         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
6282         later in decompose_array_access_opts () to allow more optimizations.
6283
6284         * method-to-ir.c (mono_handle_soft_float): Rename this to 
6285         mono_decompose_soft_float () for consistency.
6286
6287         * mini-ops.h: Fix arguments of OP_STRLEN.
6288
6289         * method-to-ir.c (save_cast_details): Extract the cast details saving code
6290         into a separate function.
6291         (reset_cast_details): Ditto.
6292         (handle_unbox): Save cast details. Fixes #431254.
6293
6294         * method-to-ir.c: Remove some obsolete FIXMEs.
6295
6296 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
6297
6298         * ir-emit.h (alloc_dreg): Write a warning before crashing.
6299
6300 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
6301
6302         * mini-codegen.c: More work on macros to make them
6303         ready for multiple regbanks.
6304
6305 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
6306
6307         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
6308
6309         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
6310
6311 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
6312
6313         * mini-codegen.c (mono_spillvar_offset): Proper support for
6314         multiple regbanks.
6315
6316 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
6317
6318         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
6319         the stack overflow changes.
6320
6321 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
6322
6323         * mini-codegen.c: Make all bank macros depend on reg_bank.
6324
6325         * mini-codegen.c (mono_local_regalloc): Make free mask
6326         initialization regbank aware.
6327
6328 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
6329
6330         * mini-codegen.c (mono_local_regalloc): Extract callee
6331         mask selection to a function and make it regbank aware.
6332
6333 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
6334
6335         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
6336         code to deal with many regbanks.
6337
6338 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
6339
6340         * mini-codegen.c: More fp->regbank changes.
6341
6342 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
6343
6344         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
6345         of a hardcoded constant.
6346
6347 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
6348
6349         * method-to-ir.c (type_from_stack_type): Fix typo.
6350
6351 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
6352
6353         * mini-ia64.c (emit_move_return_value): Convert float return values to
6354         double.
6355
6356         * objects.cs: Add a new test.
6357         
6358         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
6359         VARARG methods to fix an assert later.
6360
6361         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
6362         end so it at least compiles.
6363
6364 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
6365
6366         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
6367
6368 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
6369
6370         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
6371         optimization to a new function (emit_optimized_ldloca_ir) and enable
6372         it for both ldloca and ldloca_s.
6373
6374 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
6375
6376         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
6377         gshared CASTCLASS code.
6378
6379         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
6380         amd64, where the libc stack unwinder encounters stack frames referring to
6381         native code in unmapped memory.
6382
6383         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
6384         sharing.
6385
6386         * generics.cs: Add new test.
6387
6388 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
6389
6390         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
6391         add a check that one of the ARM_FPU_ constants is defined.
6392
6393         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
6394         
6395         * mini-exceptions.c: Fix build on non-altstack platforms.
6396
6397         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
6398         sharing of vtypes.
6399
6400         * ir-emit.h: Add a comment to NEW_PCONST.
6401
6402         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
6403
6404         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
6405
6406         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
6407         after the changes to MonoJitDomainInfo.
6408
6409 2008-09-27  Mark Probst  <mark.probst@gmail.com>
6410
6411         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
6412
6413 2008-09-27  Mark Probst  <mark.probst@gmail.com>
6414
6415         * mini-ppc.c: Compiler warning fixes.
6416
6417 2008-09-27  Mark Probst  <mark.probst@gmail.com>
6418
6419         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
6420         for pinvokes.
6421
6422 2008-09-27  Mark Probst  <mark.probst@gmail.com>
6423
6424         * exceptions-ppc.c, mini-ppc.h: Compile
6425         mono_arch_handle_altstack_exception() on Darwin, too.
6426
6427 2008-09-27  Mark Probst  <mark.probst@gmail.com>
6428
6429         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
6430         work on archs which don't have generic sharing implemented, only
6431         without the vtable_arg.
6432
6433 2008-09-26  Mark Probst  <mark.probst@gmail.com>
6434
6435         * mini.c: Added comment explaining why delegate ctor icall
6436         wrappers are compiled.
6437
6438 2008-09-26  Mark Probst  <mark.probst@gmail.com>
6439
6440         * mini.c: Don't produce trampolines to delegate ctor icall
6441         wrappers but compile them upfront.
6442
6443 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
6444
6445         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
6446         runtime-set function when going back to managed code. Currently this
6447         is used to set back the protection on the soft ovf pages and/or to
6448         throw the stack overflow exception that happened in unmanaged code.
6449
6450 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
6451
6452         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
6453         runtime-set function when going back to managed code. Currently this
6454         is used to set back the protection on the soft ovf pages and/or to
6455         throw the stack overflow exception that happened in unmanaged code.
6456
6457 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
6458
6459         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
6460         the support code for restoring stack protection after stack overflows
6461         that happen in unmanaged code. Don't set the exec permission on the
6462         soft overflow area.
6463
6464 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
6465
6466         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
6467         delegate->method_ptr is set. Fixes #428054.
6468
6469 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
6470
6471         * tests.cs: Rename to ratests.cs.
6472
6473         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
6474         emit_get_rgctx_... functions.
6475
6476 2008-09-25  Mark Probst  <mark.probst@gmail.com>
6477
6478         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
6479
6480 2008-09-25  Mark Probst  <mark.probst@gmail.com>
6481
6482         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
6483         before asserting that method is sharable.
6484
6485 2008-09-25  Mark Probst  <mark.probst@gmail.com>
6486
6487         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
6488         whether method needs a static RGCTX wrapper used instead of
6489         complex conditions.
6490
6491         * generic-sharing.c, mini.h: A few functions moved to
6492         metadata/generic-sharing.c.
6493
6494 2008-09-25  Mark Probst  <mark.probst@gmail.com>
6495
6496         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
6497         Generic code sharing for value types, which essentially means
6498         treating value type methods like static methods.  The RGCTX is
6499         passed in the same way.
6500
6501 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
6502
6503         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
6504         opcode when creating multi-dimensional arrays of open types.
6505
6506         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
6507         open generic types.
6508
6509         * generics.cs: Add a test.
6510
6511         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
6512
6513 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
6514
6515         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
6516
6517         * mini.c (mini_method_compile): Set it when running under the debugger. 
6518
6519         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
6520         vreg optimization if the flag is set.
6521
6522         * driver.c (mono_main): Add --attach= option to pass options to
6523         the attach agent.
6524
6525         * mini.c (sigquit_signal_handler): Start the attach agent.
6526
6527         * ssapre.c: Disable this to save space since it is not yet ported to
6528         linear IR.
6529
6530         * regalloc2.c: Disable this to save space.
6531
6532         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
6533
6534 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
6535
6536         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
6537         the -v option useful again.
6538
6539 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
6540
6541         * mini-amd64.c (mono_arch_output_basic_block): Add support for
6542         --break-at-bb.
6543
6544         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
6545         arrays of arrays. Fixes #428406.
6546
6547         * method-to-ir.c (mini_emit_castclass): Ditto.
6548
6549         * objects.cs: Add new test.
6550         
6551 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
6552
6553         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
6554         was wrong at it choked against target_type_is_incompatible for byref types.
6555
6556 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
6557
6558         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
6559         places.
6560
6561 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
6562
6563         * mini-exceptions.c: update a few more exceptions-related counters.
6564
6565 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
6566
6567         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
6568         new functions to allocate from persistent mempools.
6569
6570 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
6571
6572         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
6573         multiple register banks in the future.
6574
6575         * mini-codegen.c (mono_local_regalloc): Fix a warning.
6576
6577 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
6578
6579         * mini.c (type_to_eval_stack_type): Remove duplicated function.
6580
6581         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
6582
6583         * mini.h: Export type_to_eval_stack_type.
6584
6585         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
6586         is only ins->klass of byref types.
6587
6588 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
6589
6590         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
6591         (mini_emit_memcpy2): Ditto.
6592
6593         * mini-amd64.c: Fix a warning.
6594
6595 2008-09-21  Mark Probst  <mark.probst@gmail.com>
6596
6597         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
6598         linking.
6599
6600 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
6601
6602         * method-to-ir.c: Extract stloc micro-optimization to a
6603         function and apply it to all cases.
6604
6605 2008-09-19  Mark Probst  <mark.probst@gmail.com>
6606
6607         * method-to-ir.c: Don't fail generic code sharing in cases we
6608         already support.
6609
6610 2008-09-18  Mark Probst  <mark.probst@gmail.com>
6611
6612         * mini-ppc.c: Handle structs in tailcalls on Darwin.
6613
6614 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
6615
6616         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
6617         implementation.
6618
6619 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
6620
6621         * trace.c: make tracing more useful and correct, with per-thread
6622         id and indent info.
6623
6624 2008-09-15  Mark Probst  <mark.probst@gmail.com>
6625
6626         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
6627         doing a method call and the argument is an R4.
6628
6629 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
6630
6631         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
6632         generic methods.
6633
6634 2008-09-13  Mark Probst  <mark.probst@gmail.com>
6635
6636         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
6637
6638 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
6639
6640         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
6641         (MONO_JUMP_TABLE_FROM_INS): Ditto.
6642
6643 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
6644
6645         * driver.c: Add a --agent argument (not supported yet) to load managed
6646         agent assemblies before loading the main assembly, similarly to how the
6647         Java VM handles agents.
6648
6649 2008-09-11  Mark Probst  <mark.probst@gmail.com>
6650
6651         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
6652         function to do stack layout of local variables.
6653
6654 2008-09-11  Mark Probst  <mark.probst@gmail.com>
6655
6656         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
6657         calculation.
6658
6659 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
6660
6661         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
6662         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
6663         JIT if DISABLE_JIT is defined.
6664
6665         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
6666         defined.
6667
6668 2008-09-10  Mark Probst  <mark.probst@gmail.com>
6669
6670         * iltests.il.in: Disable the fconv test on PPC (the result is
6671         undefined according to ECMA).
6672
6673 2008-09-10  Mark Probst  <mark.probst@gmail.com>
6674
6675         * iltests.il.in: Enable tail call tests for PPC.
6676
6677         * mini.h: Add variable for storing incoming valuetype argument
6678         addresses for tail calls.
6679
6680         * mini-ppc.c: Implement valuetype arguments and return values for
6681         tailcalls on Linux.
6682
6683 2008-09-09  Mark Probst  <mark.probst@gmail.com>
6684
6685         * mini-ppc.c: Partially implement tail calls (struct arguments and
6686         return values not supported).
6687
6688         * method-to-ir.c: Enable tail calls on PPC.
6689
6690 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
6691
6692         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
6693         runtime-invoke wrappers to work around the problem of them getting
6694         assigned to a random class.
6695
6696         * aot-runtime.c (mono_aot_get_method): Ditto.
6697         
6698 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
6699
6700         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
6701         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
6702
6703 2008-09-07  Mark Probst  <mark.probst@gmail.com>
6704
6705         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
6706         until they're implemented properly.
6707
6708         * exceptions-ppc.c: Use arch-independent exception-handling code
6709         instead of custom one.
6710
6711         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
6712         for Linear IR.
6713
6714         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
6715
6716         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
6717         applies when __powerpc__ is defined.
6718
6719 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
6720
6721         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
6722         methods to their code to avoid computing the full name of wrappers and
6723         doing a lookup in a string hash table.
6724
6725 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
6726
6727         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
6728         we identify bblocks before method_to_ir () is ran.
6729
6730         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
6731         Also avoid optimizing branches pointing to themselves.
6732
6733         * mini.c (mini_method_compile): Ditto. Fixes #422947.
6734
6735 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
6736
6737         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
6738
6739 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
6740
6741         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
6742         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
6743         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
6744         'buf'.
6745
6746         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
6747         jumped to the same entry in plt_jump_table.
6748
6749 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
6750
6751         * method-to-ir.c (initialize_array_data): Handle field with RVA from
6752         dynamic images.
6753
6754 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
6755
6756         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
6757         other assignment can be if converted. Saves 1.5% on corlib size and fixes
6758         #421807.
6759
6760 2008-08-29  Geoff Norton  <gnorton@novell.com>
6761
6762         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
6763         segment, and doesn't properly handle .space as .text.  Fixes
6764         AOT Mach/ARM
6765
6766 2008-08-29  Geoff Norton  <gnorton@novell.com>
6767
6768         * mini.c: Disable the mach exception handler when running on 
6769         ARM
6770
6771 2008-08-29  Geoff Norton  <gnorton@novell.com>
6772
6773         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
6774         globals on Darwin/ARM
6775
6776 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
6777
6778         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
6779         since too many things depend on it. Instead, call 
6780         mono_runtime_set_no_exec ().
6781         
6782         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
6783         the new JIT.
6784
6785         * aot-compiler.c: Add an 'asm-only' AOT option.
6786
6787         * mini.c: Avoid initializing the runtime when doing AOT compilation.
6788                 
6789         * aot-compiler.c (compile_method): Disable gshared support for now as it
6790         doesn't yet work.
6791
6792 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
6793
6794         * mini-amd64.h : Fix a compiler warning.
6795
6796         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
6797           Changed to use a callback function to retrieve the unwind info.
6798           This avoids problems observed when code blocks were removed by
6799           unloading an app domain.
6800
6801         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
6802           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
6803           to work properly.
6804
6805         Contributed under MIT/X11 license.
6806
6807 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
6808
6809         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
6810           case to keep the stack aligned to 8.
6811
6812         Contributed under MIT/X11 license.
6813
6814 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
6815
6816         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
6817         avoid repeated linear searches.
6818
6819 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
6820
6821         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
6822         methods it can't handle.
6823         
6824         * aot-compiler.c (add_method): Avoid adding a method twice.
6825         (add_wrappers): Add runtime invoke wrappers for all methods.
6826
6827         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
6828         function to create an aot-compatible version of this trampoline.
6829
6830         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
6831
6832 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
6833
6834         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
6835
6836         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
6837         with a generic sharing failure.
6838
6839         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
6840
6841         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
6842         CEE_RETHROW. Fixes #419634.
6843
6844         * mini.c (mono_method_to_ir): Ditto.
6845
6846         * exceptions.cs: Add a new test.
6847         
6848         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
6849         to mono_type_stack_size_internal () since some callers might not pass in
6850         an rgctx.
6851
6852         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
6853         instrument_prolog. Fixes #419878.
6854
6855         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
6856         doubles in soft float mode volatile.
6857
6858 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
6859
6860         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
6861
6862         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
6863         to handle soft float correctly.
6864
6865         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
6866         the fast path.
6867
6868         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
6869
6870         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
6871         to sp, since the generics catch code requires it.
6872
6873         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
6874         copying.
6875
6876         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
6877         mono_arch_emit_imt_argument ().
6878
6879         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
6880
6881         * mini-arm.c tramp-arm.c: Generic sharing updates.
6882
6883 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
6884
6885         * mini-arm.c: Fix the arm build.
6886
6887         * generic-sharing.c (mini_type_get_underlying_type): New helper function
6888         handling enums, generic instances and generic sharing.
6889         (mini_type_stack_size_full): Ditto.
6890
6891         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
6892         
6893         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
6894
6895         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
6896
6897         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
6898         trampolines.
6899
6900         * mini-arm.c: Various small generic sharing changes.
6901
6902         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
6903         this for x86.
6904         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
6905         custom code.
6906
6907         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
6908         helper function to return a generic class init trampoline.
6909
6910         * method-to-ir.c mini.c: Use it.
6911         
6912         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
6913         arch-specfic function to return a generic class init trampoline.
6914
6915         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
6916         the GENERIC_CLASS_INIT custom code.
6917
6918         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
6919         a fatal error, not a sharing failure.
6920
6921         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
6922         needed.
6923
6924         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
6925         trampoline argument from MONO_ARCH_VTABLE_REG.
6926
6927         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
6928         order of the arguments to the C trampoline: pass 'slot' as the trampoline
6929         argument, and pass the vtable in VTABLE_REG.
6930
6931         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
6932         order of the arguments to the C trampoline: pass 'slot' as the trampoline
6933         argument, and pass the vtable in VTABLE_REG.
6934         (mono_arch_create_trampoline_code_full): Remove some special casing for
6935         the rgctx fetch trampoline.
6936
6937         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
6938         Fixes #419273.
6939
6940         * iltests.il: Add a test for it.
6941
6942 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
6943
6944         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
6945
6946         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
6947         no longer needed.
6948
6949         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
6950         use mono_jit_info_table_find () to avoid recursion.
6951         (mono_delegate_trampoline): Add a sync wrapper here.
6952
6953         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
6954         here.
6955
6956         * mini.c (mono_method_to_ir): Ditto.
6957         
6958         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
6959         add_sync_wrapper argument. Don't add a sync wrapper here.
6960         (mono_create_jump_trampoline): Don't add a sync wrapper here.
6961
6962         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
6963         
6964 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
6965
6966         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
6967           of nonvolatile registers back from MonoContext to CONTEXT.
6968
6969         Contributed under MIT/X11 license.
6970
6971 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
6972
6973         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
6974           arguments on Winx64 there are only 4 argument registers.  For this
6975           logic to work the last argument must be pulled from the stack.  
6976
6977         Contributed under MIT/X11 license.
6978
6979 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
6980
6981         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
6982
6983         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
6984         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
6985         encode/decode_method_ref ().
6986
6987         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
6988
6989         * aot-runtime.c (decode_patch): Ditto.  
6990
6991         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
6992         MONO_PATCH_INFO_METHOD.
6993
6994         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
6995         MonoGenericJitInfo.
6996
6997         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
6998         MonoGenericJitInfo.
6999
7000         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
7001
7002         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
7003         one from the caller.
7004
7005         * aot-runtime.c (decode_generic_inst): New function to decode and
7006         return a interned generic inst.
7007         (decode_klass_ref): Use it.
7008         (decode_method_ref): Ditto.
7009
7010         * aot-compiler.c (emit_exception_debug_info): Save 
7011         jinfo->has_generic_jit_info too.
7012
7013 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
7014
7015         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
7016
7017         * iltests.il.in: Add a test for fconv_to_i.
7018
7019         * liveness.c: Disable the liveness2 pass for now to save space.
7020
7021         * regalloc2.c: Include mempool-internals.h to fix warnings.
7022
7023         * aot-compiler.c (encode_method_ref): Encode the context of generic
7024         instance methods.
7025
7026         * aot-runtime.c (decode_method_ref): Inflate generic methods using
7027         the context saved in the aot file.
7028
7029         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
7030
7031         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
7032
7033         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
7034         volatile so they won't be optimized away.
7035
7036 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
7037
7038         * ssa.c:
7039         * ssa2.c:
7040         * mini.c:
7041         * regalloc2.c:
7042         * dominators.c: Remove duplicated functions that now are in
7043         mempool-internals.h.
7044
7045 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
7046
7047         * aot-compiler.c: Fix warnings.
7048
7049         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
7050
7051         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
7052
7053         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
7054         as the patch type.
7055
7056         * mini.c (mono_resolve_patch_target): Ditto.
7057         
7058         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
7059         (encode_klass_ref): Add support for encoding VARs/MVARs.
7060
7061         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
7062
7063         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
7064         the handling of the got entries into a separate 'decode_got_entry' function.
7065         Add support for RGCTX_FETCH.
7066
7067         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
7068         clobbered by the trampoline code.
7069
7070         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
7071         not clobbered by the indirect calling code.
7072
7073 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
7074
7075         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
7076         to fix the build.
7077
7078 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
7079
7080         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
7081         signature using the compilation mempool otherwise we would leak it.
7082
7083 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
7084
7085         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
7086         mono_emit_abs_call ().
7087
7088         * patch-info.h: Add GENERIC_CLASS_INIT.
7089
7090         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
7091
7092         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
7093         as their target as a near call.
7094
7095         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
7096         ABS handling code.
7097         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
7098
7099         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
7100         call to a runtime function described by a patch.
7101
7102         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
7103         mono_emit_abs_call, this has the advantage that the ABS handling code in
7104         mono_codegen () can handle them both, and can handle other stuff in the
7105         future without additional code.
7106
7107         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
7108         entry.
7109         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
7110         abs addresses.
7111
7112         * mini.h: Add missing bblock related prototypes.
7113
7114         * mini.h (MonoCompile): Remove unused reverse_inst_list and
7115         reverse_inst_list_len fields.
7116
7117         * mini.c: Refactor this file a bit by moving branch optimizations to 
7118         branch-opts.c.
7119
7120         * method-to-ir.c: Merge generic sharing changes missed earlier.
7121
7122         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
7123
7124         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
7125         shared patches. Process METHODCONST as a shared patch.
7126
7127         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
7128         as it crashes on the 2.0 mscorlib.
7129
7130         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
7131         to cause crashes.
7132         
7133         * aot-compiler.c: Use is_plt_patch () in a few additional places.
7134         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
7135         by IMT.
7136
7137         * aot-compiler.c: Reorganize the got handling code to be a bit more
7138         understandable.
7139
7140 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
7141
7142         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
7143         mono_patch_info_equals/hash, and use it to massively simplify
7144         get_plt_index ().
7145
7146         * mini.c (mono_patch_info_hash): Simplify this and add support for
7147         more patch types.
7148
7149         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
7150
7151         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
7152         handling code, since an offset is not enough to identify a trampoline.
7153
7154         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
7155
7156 2008-08-17  Mark Probst  <mark.probst@gmail.com>
7157
7158         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
7159
7160         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
7161
7162         * mini-ops.h: Argument and result types for OVF_CARRY ops.
7163
7164         * decompose.c: PPC decompositions for various ops.
7165
7166         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
7167
7168 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
7169
7170         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
7171         call the generic trampoline code using a call, instead of a jump, to
7172         remove some special casing from the generic trampoline code.
7173
7174         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
7175         (mono_codegen): Ditto.
7176
7177         * aot-compiler.c aot-runtime.c: Ditto.
7178
7179         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
7180
7181         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
7182         helper function to find the offset corresponding to a lazy fetch trampoline.
7183
7184         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
7185         when doing generic sharing.
7186
7187         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
7188         places.
7189         
7190         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
7191         mini-trampolines.c to be with the other trampoline creation functions.
7192
7193         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
7194         as it is equal to method->signature in most cases, add a 
7195         mono_emit_method_call_full variant which takes a signature and an imt
7196         argument as well.
7197
7198 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
7199
7200         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
7201         to this function, since it could be computed easily from the method 
7202         argument.
7203         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
7204         more.
7205
7206         * method-to-ir.c mini.c: Remove references to 
7207         compile_generic_method_wo_context.
7208
7209         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
7210         generic method calls.
7211         
7212         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
7213         dimensional non-szarrays.
7214
7215         * mini.c (mini_init): Register mono_array_new_1.
7216
7217         * jit-icalls.c (mono_array_new_1): New jit icall.
7218
7219         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
7220         pointing to the method.
7221
7222         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
7223         method addresses belonging to METHOD_JUMP patches in the 
7224         jump_target_got_slot_hash.
7225         (mono_aot_load_method): Ditto.
7226
7227         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
7228         METHOD_JUMP patches.
7229
7230         * mini.c (mini_create_jit_domain_info): New helper function which 
7231         initializes/frees domain->runtime_info.
7232         (mini_free_jit_domain_info): Ditto.
7233         (mini_init): Install the domain hook functions with the runtime.
7234
7235         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
7236         information maintained by the JIT.
7237
7238         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
7239         insertion into jump_table_hash into mono_codegen (), also implement proper
7240         locking.
7241
7242         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
7243         tail calls, it is already done by the aot code.
7244         
7245         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
7246         mechanism on amd64.
7247
7248         * iltests.il.in: Make the jmp test a bit more complex.
7249
7250         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
7251         generic instances which doesn't have a token.
7252
7253         * aot-runtime.c (decode_method_ref): Ditto.
7254         
7255         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
7256         can handle this case now.
7257         (handle_box): Ditto.
7258
7259 2008-08-15  Geoff Norton  <gnorton@novell.com>
7260
7261         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
7262         debugging check.
7263
7264 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
7265
7266         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
7267         calling generic methods.
7268
7269         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
7270
7271         * aot-runtime.c (decode_patch_info): Ditto.
7272
7273         * mini.c (mono_resolve_patch_target): Ditto.
7274         
7275         * patch-info.h: Add METHOD_RGCTX.
7276
7277         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
7278
7279 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
7280
7281         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
7282         arguments in registers.
7283
7284         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
7285         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
7286
7287         * mini.c (mini_method_compile): Abort aot compilation for generic
7288         methods if generic sharing is disabled.
7289         
7290         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
7291         an mrgctx.
7292
7293         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
7294         requiring an mrgctx.
7295
7296         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
7297         store instructions when converting a vcall to a normal call.
7298
7299         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
7300         mono_arch_find_jit_info.
7301
7302 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
7303
7304         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
7305         avoid calling mono_method_full_name () for every method even if the
7306         env var is not set.
7307         (check_inline_caller_method_name_limit): Ditto.
7308
7309 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
7310
7311         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
7312         assemblies in one run.
7313
7314         * aot-compiler.c (mono_compile_assembly): Only print out a count of
7315         skipped methods if it is not 0.
7316
7317         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
7318
7319 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
7320
7321         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
7322           MONO_ARCH_HAVE_UNWIND_TABLE.
7323
7324         Contributed under MIT/X11 license.
7325
7326 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
7327
7328         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
7329           from default optimizaton list on Winx64.
7330
7331         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
7332
7333         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
7334           the LMF from the MonoJitTlsData structure.
7335
7336         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
7337
7338         Contributed under MIT/X11 license.
7339
7340 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
7341
7342         * mini.c (sigsegv_signal_handler): Fix the build.
7343
7344         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
7345         assembly->aot_module.
7346
7347         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
7348         hash table. This simplifies and speeds up a lot of code, and fixes support
7349         for .netmodules.
7350
7351         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
7352         with the runtime.
7353
7354         * mini-exceptions.c: Ditto.
7355         
7356         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
7357         'native_offset' argument, since these are computed in the 
7358         mono_find_jit_info () function.
7359
7360         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
7361         is used by exceptions-ppc.c.
7362
7363         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
7364         mono_arch_find_jit_info ().
7365         
7366         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
7367         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
7368         generic code in mini-exceptions.c.
7369
7370 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
7371
7372         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
7373
7374         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
7375         
7376         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
7377         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
7378         called while holding the loader lock. Fixes #415608.
7379         (mono_aot_get_method_from_token_inner): Ditto.
7380
7381 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
7382
7383         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
7384         to reduce differences between this and the generic implementation in
7385         mini-exceptions.c.
7386         (ves_icall_get_frame_info): Ditto.
7387
7388         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
7389
7390         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
7391         longer neccesarry.
7392
7393         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
7394         mono_arch_get_call_filter () and make it non-static, for consistency with the
7395         other architectures.
7396
7397 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
7398
7399         * mini.c:
7400         * local-propagation.c:
7401         * mini-x86.c: Correct the name of arch defines.
7402
7403 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
7404
7405         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
7406         NO_EMULATE_LONG_SHIFT_OPS define.
7407
7408 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
7409
7410         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
7411         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
7412
7413         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
7414         MACH fixes. Merged from the 2.0 branch.
7415
7416         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
7417
7418         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
7419         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
7420
7421         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
7422
7423         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
7424         mono_marshal_get_native_wrapper () signature changes.
7425
7426 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
7427
7428         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
7429         conversion bug under arm.
7430
7431 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
7432
7433         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
7434
7435         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
7436         with overflow checking.
7437
7438 2008-08-05  Marek Habersack  <mhabersack@novell.com>
7439
7440         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
7441         to the genmdesc.pl file
7442
7443 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
7444
7445         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
7446         arg_array in the soft-float versions of the LOAD/STORE macros.
7447
7448         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
7449         implementation.
7450
7451         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
7452
7453 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
7454
7455         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
7456         a float HFA. Fixes #413621.
7457
7458 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
7459
7460         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
7461         frame_size to args_size. Fixes build.
7462
7463 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
7464
7465         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
7466         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
7467
7468         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
7469         the stack are not unaligned. Fixes #413247.
7470         
7471 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
7472
7473         * mini.c: update jitted methods performance counters.
7474
7475 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
7476
7477         * mini-exceptions.c: increase the exceptions thrown performance
7478         counter in mono_handle_exception ().
7479
7480 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
7481
7482         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
7483         can work with netmodules.
7484
7485 2008-07-28  Geoff Norton  <gnorton@novell.com>
7486
7487         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
7488         regression tests.
7489
7490 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
7491
7492         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
7493         correct place.
7494
7495 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
7496
7497         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
7498           The float param registers and other param registers must be the 
7499           same index on Windows x64.
7500
7501         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
7502           ArgValuetypeAddrInIReg argument case.  Setting the argument
7503           op to OP_VTARG_ADDR (OP_REGOFFSET)).
7504
7505         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
7506           variable computed above as the copy length for arguments of storage
7507           type ArgValuetypeAddrInIReg.
7508
7509         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
7510           ArgValuetypeAddrInIReg argument case.  This case will rely on
7511           mono_arch_emit_outarg_vt to emit the correct code later in the process.
7512
7513         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
7514           a 32 byte stack allocation for all calls.  We will omit the adjustment for
7515           jump and tail call instructoins as they do not follow the typical call behavior.
7516
7517         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
7518           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
7519           local variable and pass the local variable by reference to the called method.
7520
7521         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
7522           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
7523           of a struct is passed in a register it must be saved with the other
7524           volatile argument on the stack.
7525
7526         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
7527           frame pointer the stack adjustment value must be saved to the unwind 
7528           info structure.
7529
7530         Contributed under MIT/X11 license.
7531
7532 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
7533
7534         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
7535         which got lost in the merge.
7536
7537 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
7538
7539         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
7540         build.
7541
7542         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
7543         
7544         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
7545         icalls, since they won't be patched.
7546
7547         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
7548         different code sequence when running under valgrind to prevent some valgrind
7549         errors.
7550
7551         * iltests.il.in: Add new regression test.
7552
7553         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
7554         end with a throw.
7555
7556         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
7557         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
7558
7559         * iltests.il.in: Add new test.
7560
7561         * aot-compiler.c: Fix some warnings.
7562
7563         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
7564         Fixes #412494.
7565
7566 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
7567
7568         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
7569         (mini_usage_jitdeveloper): Add a missing --wapi option.
7570
7571 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
7572
7573         * mini-codegen.c: Simplify the is_fp macros.
7574         (free_up_ireg): Remove, use free_up_reg instead.
7575         (free_up_reg): Fix the fp case.
7576
7577 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
7578
7579         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
7580         lowered earlier.
7581
7582         * exceptions-x86.c: Merge some changes which seemed to have got lost
7583         in the linear-ir merge.
7584
7585         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
7586
7587         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
7588         long vreg volatile even if the variable was already created.
7589
7590         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
7591         volatile variables.
7592
7593 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
7594
7595         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
7596
7597         * mini.c (mono_jit_compile_method_inner): Add support for 
7598         MONO_EXCEPTION_BAD_IMAGE.
7599
7600         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
7601         mini_method_get_context () returns NULL. Fixes #356531.
7602
7603         * mini.c (mono_method_to_ir): Ditto.
7604         
7605         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
7606         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
7607
7608 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
7609
7610         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
7611         in the LDFTN implementation.
7612
7613 2008-07-25  Mark Probst  <mark.probst@gmail.com>
7614
7615         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
7616         code, patch calls to icalls, too, even if they're not in the
7617         shared generic code hash.  Fixes #411962.
7618
7619 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
7620
7621         * cpu-x86.md: Increase the length of the fcall opcodes.
7622
7623         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
7624         calls returning floats.
7625
7626         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
7627         on NEWARR.
7628         
7629         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
7630         missed earlier.
7631
7632         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
7633         into the domain->method_code_hash.
7634
7635         * aot-compiler.c: Fix win32 build.
7636
7637         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
7638         
7639         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
7640         gshared NEWARR implementation.
7641
7642         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
7643
7644         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
7645         can be used outside of method_to_ir.
7646
7647         * mini.h (MonoCompile): Add arg_types field.
7648
7649         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
7650         
7651         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
7652         the values of the local arg_array and param_types array.
7653
7654 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
7655
7656         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
7657         got accesses might only get generated later when NEWOBJ is decomposed.
7658         
7659         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
7660         looking up the native code of the target method when a delegate is called
7661         for the first time.
7662
7663         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
7664         optimization.
7665
7666         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
7667
7668         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
7669         AOT work on platforms without a working dlsym implementation.
7670
7671         * mini.h: Bump AOT image format version.
7672         
7673 2008-07-24  Mark Probst  <mark.probst@gmail.com>
7674
7675         * mini-exceptions.c: Free a MonoType with
7676         mono_metadata_free_type() instead of g_free().
7677
7678         * aot-runtime.c: Free a MonoType.
7679
7680 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
7681
7682         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
7683         optimization.
7684
7685         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
7686         fp stack on x86.
7687
7688 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
7689         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
7690         profiler hook.
7691
7692 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
7693
7694         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
7695         NEWOBJ calls on valuetypes.
7696
7697         * iltests.il.in: Add new test.
7698
7699         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
7700
7701 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
7702
7703         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
7704         is no longer needed.
7705
7706         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
7707         non register sized integer arguments.
7708         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
7709         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
7710         emit_memcpy2 ().
7711
7712         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
7713         CEE_MONO_RETOBJ.
7714         
7715         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
7716         two a binop with different sized arguments is emitted.
7717
7718         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
7719         instruction in the ins==NULL case.
7720
7721 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
7722
7723         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
7724
7725         * mini-x86.c: Fix osx build.
7726
7727         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
7728         opcodes as well.
7729
7730         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
7731         instruction for non int sized variables.
7732
7733         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
7734         implementation.
7735
7736 2008-07-23  Robert Jordan  <robertj@gmx.net>
7737
7738         * method-to-ir.c: Fix MSVC build.
7739
7740 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
7741
7742         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
7743         a non int sized type, widen it to an int since newer versions of gcc seem to
7744         generate code which needs this.
7745
7746         * ssa2.c abcremoval2.c: Fix warnings.
7747
7748         * *: Merge the Linear IR branch.
7749
7750         The original branch is at trunk/branches/vargaz/mini-linear-il, and
7751         the ChangeLog file there describes all the changes done over the years. 
7752         Further documentation can be found at www.mono-project.com/Linear_IL.
7753
7754 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
7755
7756         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
7757           The float param registers and other param registers must be the 
7758           same index on Windows x64.
7759
7760         Contributed under MIT/X11 license.
7761
7762 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
7763
7764         * mini.c: Make the previous fix GC safe.
7765
7766 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
7767
7768         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
7769
7770 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
7771
7772         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
7773           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
7774           ArgValuetypeAddrInIReg instead.
7775
7776         Contributed under MIT/X11 license.
7777
7778 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
7779
7780         * mini-codegen.c (get_register_spilling): Fix a warning.
7781
7782 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
7783
7784         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
7785         for types which the initialization fails. Raises the provided exception
7786         at the right stop after cleanup.
7787
7788 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
7789
7790         * aot-compiler.c: Free most of the memory allocated during compilation.
7791
7792         * mini.c (mini_parse_debug_options): Fix a leak.
7793         
7794         * mini.c (mini_method_compile): Don't add the method to the jit info tables
7795         during aot compilation.
7796
7797 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
7798
7799         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
7800         it has too much register pressure.
7801
7802 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
7803
7804         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
7805
7806 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
7807
7808         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
7809         on x86.
7810
7811         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
7812         on amd64 similar to the way it is done on arm.
7813
7814         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
7815
7816         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
7817         consistency, normalize error messages, avoid loading aot-only modules in
7818         normal mode.
7819
7820         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
7821         for consistency.
7822
7823         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
7824
7825 2008-07-11  Martin Baulig  <martin@ximian.com>
7826
7827         * debug-debugger.h
7828         (MonoDebuggerInfo): Add `interruption_request'.
7829
7830 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
7831
7832         * aot-compiler.c (emit_plt): Remove some dead code.
7833
7834         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
7835
7836         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
7837         return the plt info offset belonging to a given plt entry.
7838
7839         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
7840         mono_aot_get_plt_info_offset.
7841         
7842         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
7843         similar to the amd64 code by makeing jumps through a separate jump table 
7844         instead of embedding the jump addresses into the code.
7845
7846 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
7847
7848         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
7849         method.
7850
7851 2008-07-10  Martin Baulig  <martin@ximian.com>
7852
7853         * mini.c (mini_method_compile): Disable generics sharing when
7854         running in the debugger.
7855
7856 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
7857
7858         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
7859
7860         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
7861         the local register allocator from running out of registers on x86 when 
7862         using aot.
7863
7864 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
7865
7866         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
7867         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
7868         C4146.
7869
7870         Contributed under MIT/X11 license.
7871
7872 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
7873
7874         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
7875         speed up the assembler.
7876
7877 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
7878
7879         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
7880         support.
7881
7882         * mini.c: Move the soft float handling macros a bit earlier, add 
7883         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
7884         place.
7885
7886         * mini.h: Add prototype for mono_arch_fixup_jinfo.
7887
7888         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
7889         read-only to help catch code allocation requests.
7890         
7891         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
7892         and turn it off when using --aot-only or when compiling with --aot=full.
7893
7894         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
7895         jump table for switches from the normal domain mempool, not the code
7896         manager.
7897
7898         * mini-trampolines.c (get_unbox_trampoline): New function to return an
7899         unbox trampoline which handles aot-only mode too.
7900
7901         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
7902         an AOTed unbox trampoline.
7903
7904         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
7905
7906 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
7907
7908         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
7909         ""
7910
7911         Contributed under MIT/X11 license.
7912
7913 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
7914
7915         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
7916           the unwind information for the method at the end of the allocated block.
7917           
7918         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
7919           MonoCompileArch to hold the unwind info for SEH on Winx64
7920         
7921         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
7922           frame pointer info for the method being compiled.
7923           
7924         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
7925           the call to mono_exception_from_token.
7926           
7927         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
7928           storing the method prolog information in a format that the Winx64 SEH can understand.  This
7929           information is stored a the end of the method block because it is all 32-bit offset based.
7930
7931         Contributed under MIT/X11 license.
7932
7933 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
7934
7935         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
7936
7937         * wapihandles.c: Fix warnings.
7938
7939         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
7940         mode.
7941
7942         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
7943         mono_jit_compile_method in aot-only mode since that calls the type 
7944         initializer.
7945         
7946         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
7947         get_delegate_invoke_impl in aot-only mode.
7948
7949         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
7950
7951 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
7952
7953         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
7954
7955         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
7956         is on by default.
7957
7958         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
7959
7960         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
7961         init trampoline from the AOT file as well.
7962
7963         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
7964         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
7965         code.
7966
7967         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
7968         mono_init.
7969
7970         * exceptions-amd64.c: Add _full variants for the remaining exception code
7971         creation functions as well, allow emission of relocatable code, remove
7972         caching since that is now done by the caller.
7973
7974         * mini-exceptions.c: Add _full variants for the remaining exception code
7975         creation functions as well, add aot-only support.
7976
7977         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
7978         if we can determine a proper token for them.
7979         (add_wrappers): Add a few more wrappers.
7980         (emit_method_code): Remove some dead code.
7981         (emit_trampolines): Emit exception code too.
7982
7983         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
7984
7985         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
7986         mono_array_new_va which avoids varargs.
7987
7988         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
7989
7990         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
7991         mono_arch_create_specific_trampoline () in all places.
7992
7993         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
7994         a bit so it can be used for other things as well.
7995         
7996         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
7997         on demand as well.
7998
7999         * exceptions-amd64.c: Rename the caching from the exception code creation
8000         functions, it is done by the caller instead.
8001         
8002         * exceptions-amd64.c: Change the signature of the exception code creation 
8003         functions to allow the creation of relocatable code later.
8004
8005         * mini-exceptions.c: Add a set of functions to query the various 
8006         runtime-generated exception functions.
8007
8008         * mini.c mini-exceptions.c: Use the newly added functions instead of the
8009         mono_arch_.. () functions.
8010         
8011 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
8012
8013         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
8014
8015         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
8016
8017         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
8018         (mini_get_vtable_trampoline): Ditto.
8019
8020         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
8021         code in the AOT case by returning the code size and a list of relocations to
8022         the caller.
8023
8024         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
8025
8026 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
8027
8028         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
8029           clean the stack.
8030
8031         Contributed under MIT/X11 license.
8032
8033 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
8034
8035         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
8036         so the buffer size can be computed correctly. Fixes #404735.
8037
8038         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
8039         normally as cfg->debug_info is already freed.
8040
8041 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
8042
8043         * mini-amd64.c: For calls returning vtypes in registers, don't store
8044         the return address on the stack, instead allocate a separate local for
8045         it. Fixes #404729.
8046
8047 2008-07-05  Mark Probst  <mark.probst@gmail.com>
8048
8049         * mini-trampolines.c, mini.h: Add an argument to
8050         mono_create_jit_trampoline_in_domain() for turning off the adding
8051         of the sync wrapper.
8052
8053         * mini.c: Use the JIT trampoline without sync instead of
8054         ldftn_nosync in static RGCTX invoke wrappers so that the call can
8055         be patched.
8056
8057 2008-07-04  Mark Probst  <mark.probst@gmail.com>
8058
8059         * driver.c: Turn on GSHARED optimization by default.
8060
8061 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
8062
8063         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
8064         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
8065
8066         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
8067         create a variant of the generic trampoline code callable from AOTed trampolines.
8068
8069         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
8070         trampoline code callable from AOTed trampolines.
8071
8072         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
8073
8074 2008-07-04  Mark Probst  <mark.probst@gmail.com>
8075
8076         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
8077         pass-through manner.
8078
8079         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
8080         and don't fail sharing for them anymore.
8081
8082         * mini-exceptions.c: Handle exceptions in shared generic methods.
8083
8084         * generic-sharing.c: When checking the context of a generic
8085         method, also check its class's context.  Don't treat wrappers as
8086         sharable.
8087
8088         * mini-trampolines.c: Some code factored out to
8089         metadata/generic-sharing.c.  Handle the MRGCTX case.
8090
8091         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
8092         we must deal with the method being of another instantiation of the
8093         class.  Add static rgctx invoke wrappers to generic methods.
8094
8095 2008-07-04  Mark Probst  <mark.probst@gmail.com>
8096
8097         * mini.c: Provide all jit infos of generic shared methods with a
8098         generic jit info.
8099
8100         * mini-exceptions.c: Handle the new situation that a generic info
8101         might be available, but not info about the this/vtable/mrgctx
8102         variable.
8103
8104 2008-07-03  Mark Probst  <mark.probst@gmail.com>
8105
8106         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
8107         generic methods.
8108
8109 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
8110
8111         * dominators.c (check_dominance_frontier): Fix a warning.
8112
8113         * mini.h: Add some missing prototypes.
8114
8115         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
8116
8117         * driver.c (mono_jit_init_version): Correct the comments since the first
8118         argument should be the name of the root domain, not a filename.
8119
8120         * aot-runtime.c (make_writable): Error out if this is called while running
8121         with --aot-only.
8122         (load_aot_module): Ditto.
8123
8124         * aot-compiler.c: Really fix the computation of method indexes.
8125
8126         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
8127         optimizations as this is no longer called frequently.
8128
8129         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
8130         method and the invoke impl code and pass it to the delegate trampoline instead of
8131         just the delegate class.
8132
8133 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
8134
8135         * aot-compiler.c: Fixup the computation of method indexes.
8136         (add_wrappers): Create the base methods of the runtime invoke wrappers using
8137         the method builder infrastructure.
8138
8139         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
8140         has no header.
8141
8142         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
8143         mode, load the method right away instead of creating a trampoline.
8144
8145         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
8146
8147         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
8148         some checks a bit.
8149
8150 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
8151
8152         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
8153         (mono_aot_load_method): Use method_index instead of method->token.
8154
8155         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
8156         can handle icalls etc. properly.
8157
8158         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
8159
8160         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
8161
8162         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
8163         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
8164         JIT_ICALL_ADDR patch type.
8165
8166         * patch-info.h: Add JIT_ICALL_ADDR patch type.
8167
8168         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
8169         request flag.
8170         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
8171
8172         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
8173
8174 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
8175
8176         * mini.c: Use domain->jit_code_hash_lock for controlling access to
8177         domain->jit_code_hash.
8178
8179 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
8180
8181         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
8182
8183 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
8184
8185         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
8186         get_this_arg_from_call, let it compute it when needed.
8187
8188         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
8189         gsctx from code only when needed.
8190
8191         * mini-trampolines.c (get_generic_context): Rename this to 
8192         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
8193         it can be called by the arch backends.
8194
8195         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
8196
8197 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
8198
8199         * driver.c (mono_main): Add experimental --aot-only command line option.
8200
8201         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
8202         set.
8203
8204 2008-06-26  Kornel Pal  <kornelpal@gmail.com>
8205
8206         * driver.c (DllMain): Remove mono_module_handle.
8207
8208         Contributed under MIT/X11 license.
8209
8210 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
8211
8212         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
8213         for emitting methods which are not in the source assembly. Detect and report
8214         failure of assembling+linking.
8215         
8216         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
8217
8218         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
8219
8220 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
8221
8222         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
8223
8224 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
8225
8226         * mini.h: Remove some obsolete prototypes.
8227
8228         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
8229
8230 2008-06-24  Mark Probst  <mark.probst@gmail.com>
8231
8232         * mini.c (get_object_generic_inst): Variable-sized arrays are not
8233         supported by Visual Studio, so use alloca().
8234
8235 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
8236
8237         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
8238         Fixes #402585.
8239
8240 2008-06-23  Mark Probst  <mark.probst@gmail.com>
8241
8242         * mini.c: Fail sharing of a generic method if it contains an open
8243         catch clause (because we don't pass MRGCTXs yet).
8244
8245 2008-06-23  Mark Probst  <mark.probst@gmail.com>
8246
8247         * mini.c: When compiling a method with generic sharing, insert the
8248         method instantiated with an all-Object generic context into the
8249         jit info table, instead of the context of the first instantiation
8250         of the method we happen to compile.
8251
8252 2008-06-18  Martin Baulig  <martin@ximian.com>
8253
8254         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
8255         `major_version' and `minor_version'.
8256
8257 2008-06-17  Mark Probst  <mark.probst@gmail.com>
8258
8259         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
8260         mono_method_is_generic_sharable_impl() takes an additional
8261         argument specifying whether to treat type variables as reference
8262         types.
8263
8264 2008-06-17  Mark Probst  <mark.probst@gmail.com>
8265
8266         * mini.h: Removed obsolete prototypes.
8267
8268 2008-06-17  Mark Probst  <mark.probst@gmail.com>
8269
8270         * mini.c: Don't fail generic sharing for initobj and sizeof - we
8271         already handle them.
8272
8273 2008-06-17  Mark Probst  <mark.probst@gmail.com>
8274
8275         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
8276         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
8277         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
8278         tramp-x86.c: Added a MonoGenericContext* argument to
8279         mono_arch_get_unbox_trampoline() so that it can call other
8280         functions which require it.
8281
8282 2008-06-17  Mark Probst  <mark.probst@gmail.com>
8283
8284         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
8285         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
8286         mono_arch_get_this_arg_from_call() takes a
8287         MonoGenericSharingContext* as well.
8288
8289 2008-06-17  Mark Probst  <mark.probst@gmail.com>
8290
8291         * mini.c: Factor out code for emitting unbox into emit_unbox() and
8292         implement generic sharing of unbox.
8293
8294 2008-06-17  Mark Probst  <mark.probst@gmail.com>
8295
8296         * mini.c: Don't compute the vtable to determine whether a field is
8297         special static, because it might not work for open types.
8298
8299 2008-06-17  Mark Probst  <mark.probst@gmail.com>
8300
8301         * mini.c: Removed the unused token_type and token_source arguments
8302         from get_runtime_generic_context_ptr().
8303
8304 2008-06-17  Marek Habersack  <mhabersack@novell.com>
8305
8306         * mini.c (ADD_BINOP): fix the build
8307
8308 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
8309
8310         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
8311         a widening op.
8312
8313 2008-06-16  Mark Probst  <mark.probst@gmail.com>
8314
8315         * mini.h: Removed class relations enum that's not used anymore.
8316
8317 2008-06-16  Mark Probst  <mark.probst@gmail.com>
8318
8319         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
8320
8321         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
8322         the lazy fetch trampoline access code.
8323
8324 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
8325
8326         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
8327
8328 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
8329
8330         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
8331
8332         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
8333
8334         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
8335
8336 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
8337
8338         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
8339         intrinsics.
8340
8341         * mini-ops.h: Add MIN/MAX_UN opcodes.
8342
8343         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
8344         intrinsics.
8345
8346         * basic-math.cs: Add more min/max tests.
8347
8348         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
8349
8350 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8351
8352         * mini.c: Small fix in the prologue of emit_castclass.
8353
8354 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
8355
8356         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
8357
8358         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
8359         do not work even for unsigned types. Fixes #400014.
8360
8361         * basic-math.cs: Add regression tests for unsigned Min/Max.
8362
8363 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8364
8365         * mini.c: Added additional context_used argument to several
8366         functions, which will be needed for sharing generic methods.  Use
8367         GET_RGCTX macro wherever appropriate.  Declare only one
8368         context_used in mono_method_to_ir().
8369
8370 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8371
8372         * mini.c, generic-sharing.c: Removed generic class relations.
8373
8374         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
8375         functions due to MRGCTX changes.
8376
8377 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8378
8379         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
8380         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
8381         with calculated IMT.
8382
8383         * mini.c: Generic sharing of calls via generic interfaces.
8384
8385         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
8386         generic method with non-constant MonoGenericContext*.  Instead,
8387         the context is taken out of the method itself.
8388
8389 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8390
8391         * mini.c: Generic sharing of ldvirtftn.
8392
8393 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8394
8395         * mini.c: Generic sharing of ldftn.
8396
8397 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8398
8399         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
8400
8401 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8402
8403         * mini.c: Generic sharing of the special case of ldtoken followed
8404         by a call to GetTypeFromHandle.
8405
8406 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8407
8408         * mini.c: Generic sharing of box for nullable types.
8409
8410 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
8411
8412         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
8413         are passed on the stack. Fixes #324807.
8414
8415 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
8416
8417         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
8418         for the ArgValuetypeAddrInIReg case.
8419
8420         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
8421         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
8422
8423         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
8424         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
8425         local variable and pass the local variable by reference to the called method.
8426           
8427         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
8428         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
8429
8430         Contributed under MIT/X11 license.
8431
8432 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
8433
8434         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
8435
8436         * debug-mini.c (mono_debug_print_vars): Release memory after printing
8437         everything.
8438
8439 2008-06-10  Martin Baulig  <martin@ximian.com>
8440
8441         * debug-mini.c
8442         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
8443
8444 2008-06-09  Kornel Pal  <kornelpal@gmail.com>
8445
8446         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
8447         possible error when no arguments are passed.
8448
8449         Contributed under MIT/X11 license.
8450
8451 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
8452
8453         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
8454         where the file name is NULL.
8455
8456 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
8457
8458         * mini.c: Fix s390 build.
8459
8460 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
8461
8462         * trace.c (mono_trace_parse_options): Fix warnings.
8463
8464         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
8465
8466 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
8467
8468         * mini.c (remove_block_if_useless): Avoid printing the method name.
8469         
8470         * mini.c: Remove needless setting of ins->cil_code which is now done by 
8471         MONO_INST_NEW.
8472
8473         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
8474         LMF. Not yet used.
8475
8476         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
8477         translated code after it has been patched.
8478
8479 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
8480
8481         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
8482         avoid problems during code patching on SMP systems.
8483         (emit_call): Avoid adding a patch info which is already added by 
8484         emit_call_body.
8485         (mono_arch_emit_exceptions): Ditto.
8486
8487 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
8488
8489         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
8490         MONO_TYPE_ISSTRUCT already checks for it.
8491
8492 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
8493
8494         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
8495           structs with floats on Winx64 the float registers are not used.  
8496           The integer registers are always used..
8497         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
8498           only one register will be used and only if the size of the struct 
8499           is 1,2,4, or 8 bytes.
8500
8501         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
8502           to work for Winx64.
8503
8504         Contributed under MIT/X11 license.
8505
8506 2008-06-05  Martin Baulig  <martin@ximian.com>
8507
8508         * debug-debugger.c (debugger_lookup_class): Also call
8509         mono_class_setup_methods() here; we're only called from RTI.
8510
8511 2008-06-05  Andreas Farber  <andreas.faerber@web.de>
8512
8513         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
8514         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
8515         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
8516         Post-process object files and add dtrace-generated object, if necessary.
8517
8518         Contributed under MIT/X11 license.
8519
8520 2008-06-04  Mark Probst  <mark.probst@gmail.com>
8521
8522         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
8523         element class.
8524
8525         * mini.c: Generic sharing for unbox.any and castclass.
8526
8527 2008-06-04  Mark Probst  <mark.probst@gmail.com>
8528
8529         * mini.c: Ignore tailcall prefix in shared generic code and when
8530         doing calls which require a vtable/rgctx argument.
8531
8532 2008-06-04  Mark Probst  <mark.probst@gmail.com>
8533
8534         * mini.c: Don't free the JIT info.
8535
8536         * driver.c: Changes in the JIT info table testing code.
8537
8538 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
8539
8540         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
8541         interruption. Fix some warnings.
8542
8543         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
8544         interruption_checkpoint.
8545
8546 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
8547
8548         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
8549         from embedding applications.
8550
8551 2008-06-02  William Holmes  <billholmes54@gmail.com>
8552
8553         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
8554           reserving 32 bytes on the stack when making calls. 
8555
8556         Contributed under MIT/X11 license.
8557
8558 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
8559
8560         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
8561         the linear IL branch.
8562
8563         * driver.c: Print out more information for --version on arm.
8564
8565 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
8566
8567         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
8568         bb_exit instead, since out of line bblocks might not actually be emitted
8569         out-of-line.
8570         
8571         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
8572         maximum epilog size for out of line bblocks if tracing is enabled.
8573
8574         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
8575
8576 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
8577
8578         * arrays.cs: Regression tests for allocating arrays with negative sizes.
8579
8580 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
8581
8582         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
8583         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
8584         opcodes.
8585
8586 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
8587
8588         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
8589         the 'value' to store is a constant.
8590
8591         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
8592
8593         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
8594         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
8595
8596 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
8597
8598         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
8599         for accessing method->generic_container.
8600
8601 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
8602
8603         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
8604         
8605         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
8606
8607         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
8608
8609         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
8610         fails.
8611
8612 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
8613
8614         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
8615
8616         * mini.c: Handle the case when mono_class_vtable () fails.
8617
8618 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
8619         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
8620         the stat profiler.
8621
8622 2008-05-22  Mark Probst  <mark.probst@gmail.com>
8623
8624         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
8625         together with domain sharing.
8626
8627 2008-05-22  Mark Probst  <mark.probst@gmail.com>
8628
8629         * mini.c: Treat callvirts to final methods like non-virtual calls
8630         when doing generic sharing, i.e. look them up in the runtime
8631         generic context.
8632
8633 2008-05-22  Mark Probst  <mark.probst@gmail.com>
8634
8635         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
8636         with computed types (for generic sharing).
8637
8638         * mini.c: Generic sharing for mkrefany and refanyval.
8639
8640 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
8641
8642         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
8643         possible.
8644
8645         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
8646         the generic sharing code.
8647         
8648         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
8649         when needed.
8650
8651 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
8652
8653         * mini.h: Remove the declaration of mono_aot_init_vtable ().
8654
8655 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
8656
8657         * driver.c: updated copyright date
8658
8659 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
8660
8661         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
8662         needed.
8663
8664 2008-05-19  Martin Baulig  <martin@ximian.com>
8665
8666         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
8667         pointing to the new `_mono_debug_using_mono_debugger' variable.
8668
8669         * driver.c
8670         (mono_main): Check mono_debug_using_mono_debugger() rather than
8671         the `MONO_INSIDE_MDB' environment variable to check whether we're
8672         inside the debugger.
8673
8674 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
8675
8676         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
8677         argument.
8678
8679 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
8680
8681         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
8682
8683         * mini.c: Added mini_assembly_can_skip_verification. This
8684         function checks if the assembly requested to skip verification. 
8685         Fixes part of #387274.
8686
8687 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
8688
8689         * mini.c (mini_get_method): Disable the check for open generic classes when
8690         using generic sharing.
8691
8692         * generics.cs: Add a test for #387034.
8693
8694         * mini.c (mini_get_method): Check whenever the method class is an open generic
8695         type, and return NULL in that case, causing a verification error. Fixes
8696         #384123.
8697
8698 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
8699
8700         * driver.c (mono_main): Revert r102623. The right
8701         thing to do is to enable the verifier under verifiable
8702         unless a --security flag was passed.
8703
8704         We need this non-trivial behavior for --verify-all otherwise
8705         mcs-compileall won't be able to use it. As it needs everything to
8706         be verified under validil.
8707
8708 2008-05-06  Martin Baulig  <martin@ximian.com>
8709
8710         Fix #383749.
8711
8712         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
8713         (mono_debugger_thread_cleanup): Likewise.
8714         (mono_debugger_extended_notification): Likewise.
8715
8716 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
8717
8718         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
8719         against both inflated and non-inflated methods. We need to check against the
8720         generic definition for cases where the instantiated method is not visible.
8721         We need to check against the inflated types for cases where the instantiation
8722         changes any super type. This fixes #382986.
8723
8724         Note that this doesn't need to be applied to other parts of mono_method_to_ir
8725         that check for visibiliy as generic params only appears as the type subject
8726         of tokens on call opcodes. Field manipulation and ldftn must always
8727         target an exact type.
8728
8729 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
8730
8731         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
8732         if no related --security flag is passed.
8733
8734 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
8735
8736         * mini-arch.h: Prepare support for ppc64.
8737
8738         Contributed under MIT/X11 license.
8739
8740 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
8741
8742         * aot-runtime.c: Prepare support for ppc64.
8743
8744         Contributed under MIT/X11 license.
8745
8746 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
8747
8748         * mini-ops.h: Prepare support for ppc64.
8749
8750         Contributed under MIT/X11 license.
8751
8752 2008-05-04  Andreas Farber  <andreas.faerber@web.de>
8753
8754         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
8755
8756         Contributed under MIT/X11 license.
8757
8758 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
8759
8760         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
8761         assemblies, since aot_name is not a full path, causing us to load MS.NET 
8762         assemblies on windows.
8763
8764 ?2008-04-28  Kornel Pal  <kornelpal@gmail.com>
8765
8766         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
8767         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
8768         * main.c: Use UTF-8 encoded command line instead of Windows default code
8769         page on Windows to support Unicode.
8770         * driver.c (DllMain): New function for mixed-mode assembly support.
8771         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
8772         export __stdcall functions without decoration.
8773
8774         Contributed under MIT/X11 license.
8775
8776 2008-04-28  Mark Probst  <mark.probst@gmail.com>
8777
8778         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
8779         saving it very early.
8780
8781 2008-04-28  Mark Probst  <mark.probst@gmail.com>
8782
8783         * mini.h, mini.c: Lots of code for accessing the old RGCTX
8784         deleted.  The only way to access the new RGCTX is via the
8785         trampline.
8786
8787         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
8788         vtable instead of the RGCTX to static methods.
8789
8790         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
8791         accessing the new RGCTX.
8792
8793         * generic-sharing.c: There is no separation between self, type
8794         arguments and other types in the RGCTX anymore.
8795
8796 2008-04-25  Jonathan Chambers <joncham@gmail.com>
8797
8798         * mini-amd64.c (add_general): Remove previous stack adjustment.
8799         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
8800         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
8801         for 32 bytes of stack space reserved for all calls.
8802         
8803         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
8804         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
8805         adjustment.
8806         
8807         Code contributed under MIT/X11 license.
8808
8809 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
8810
8811         * mini.c (mini_method_verify): Only verify non-inflated methods, check
8812         against the root definition, peeling out method and type instantiations.
8813         Cache verify success results, code that fails verification is still
8814         checked multiple times.
8815
8816 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
8817
8818         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
8819
8820 2008-04-23  Jonathan Chambers <joncham@gmail.com>
8821
8822         * mini-amd64.c (add_general): Always increment stack on Win64.
8823         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
8824         on Win64.
8825         
8826         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
8827         stack based argument handling on Win64.
8828         
8829         Code contributed under MIT/X11 license.
8830
8831 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
8832
8833         * Makefile.am (version.h): Add support for git-svn.
8834
8835 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
8836
8837         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
8838         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
8839         avoiding allocations and libc functions which might deadlock.
8840         
8841         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
8842         'no-gdb-backtrace' option is set.
8843
8844         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
8845
8846         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
8847
8848 2008-04-21  Martin Baulig  <martin@ximian.com>
8849
8850         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
8851         and `get_lmf_addr'; `notification_address' is no longer a pointer.
8852
8853 2008-04-21  Martin Baulig  <martin@ximian.com>
8854
8855         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
8856         `thread_vtable', `event_handler_ptr' and `event_handler'.
8857
8858 2008-04-21  Martin Baulig  <martin@ximian.com>
8859
8860         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
8861         allows delayed initialization of the `executable_code_buffer' when
8862         attaching.
8863
8864 2008-04-21  Martin Baulig  <martin@ximian.com>
8865
8866         * mini.h (mono_debugger_create_notification_function): Removed.
8867         * tramp-*.c (mono_debugger_create_notification_function): Removed.
8868
8869         * mdb-debug-info64.s
8870         (MONO_DEBUGGER__notification_function): Added this in the .text section.
8871
8872         * mdb-debug-info32.s
8873         (MONO_DEBUGGER__notification_function): Added this in the .text section.
8874
8875         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
8876         currently only works on x86 and x86_64, so don't create it on ppc.
8877
8878 2008-04-21  Martin Baulig  <martin@ximian.com>
8879
8880         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
8881
8882         * mini.c
8883         (mini_method_compile): In the fp elimination check, check
8884         `debug_options.mdb_optimizations' in addition to
8885         mono_debug_using_mono_debugger().       
8886
8887         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
8888         disable some JIT optimizations which are only disabled when
8889         running inside the debugger.
8890         Added `--help-debug' option to describe the debugging options.
8891         (parse_debug_options): New static function to parse the `--debug'
8892         options, so we can easily add more stuff in future.
8893
8894 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
8895
8896         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
8897         the method has no body.
8898
8899 2008-04-19  Jonathan Chambers <joncham@gmail.com>
8900
8901         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
8902         assembly is not allowed in MSVC 64-bit compiler. 
8903         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
8904         as we get floating point exceptions everywhere.
8905         
8906         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
8907         correctly align arguments for call to throw_exception.
8908         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
8909         
8910         Code contributed under MIT/X11 license.
8911
8912 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
8913
8914         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
8915
8916 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
8917
8918         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
8919
8920         * mini-amd64.c (NEW_INS): Set cil_code.
8921
8922         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
8923         from mini-amd64.c so all debugger related logic is in one place.
8924
8925         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
8926         later won't have a random ip assigned to them.
8927
8928 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
8929
8930         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
8931         the arch specific function initializes code_size.
8932         (mono_create_delegate_trampoline): Ditto.
8933
8934         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
8935         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
8936         platforms.
8937
8938         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
8939         running under the debugger.
8940
8941         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
8942         debugger.
8943
8944         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
8945         debugger. Also move the disabling of optimizations here from driver.c.
8946         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
8947         debugger.
8948
8949         * mini.h (MonoCompile): Add a few new flags.
8950
8951 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
8952
8953         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
8954         so the cil_code field of created MonoInst's is properly set.
8955         (mini_select_instructions): Ditto.
8956
8957         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
8958         (MONO_INST_NEW_CALL): Ditto.
8959
8960         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
8961         in many places so the ins->cil_code field is properly initialized.
8962
8963         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
8964         place.
8965
8966 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
8967
8968         * mini.c (mini_method_compile): Print a different message when compiling a 
8969         shared method.
8970         
8971         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
8972         > 1.
8973
8974 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
8975
8976         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
8977         SSE2 instructions.
8978
8979         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
8980         
8981 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
8982
8983         * mini.c (handle_stack_args): Make this return void since its return value was
8984         never used. Also set cfg->unverifiable for invalid IL instead of calling
8985         G_BREAKPOINT ().
8986
8987 2008-04-10  Mark Probst  <mark.probst@gmail.com>
8988
8989         * mini.c: Make sure "this" is live in catch clauses with type
8990         variables in shared generic code.
8991
8992 2008-04-08  Mark Probst  <mark.probst@gmail.com>
8993
8994         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
8995         generic_class_is_reference_type() to ensure the proper behaviour
8996         when sharing generic code and the type in question is a type
8997         argument.
8998
8999 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
9000
9001         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
9002         race conditions when printing thread dumps. Fixes #377738.
9003
9004 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
9005         
9006         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
9007         shows up when both MonoInst arguments can cause aliasig.
9008         There is likely no way in the current JIT to trigger this problem, but
9009         it showed up in the development of generics sharing, when in a new
9010         opcode both args of an OP_GROUP can be aliases (addresses of a local).
9011         When the generics sharing code will be committed, its tests will be
9012         valid also for this bug.
9013
9014 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
9015
9016         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
9017         PATCH_INFO_METHOD.
9018
9019         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
9020         NULL.
9021
9022 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
9023
9024         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
9025         use a more detailed exception message for InvalidCastException.
9026
9027         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
9028
9029         * driver.c (mono_main): Add --debug=casts option to turn on better 
9030         InvalidCastException message details.
9031
9032         * mini.c (mini_get_debug_options): New helper function to return the address of
9033         the debug_options variable.
9034
9035         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
9036         the jit_tls TLS variable.
9037
9038         * mini.c (mono_jit_tls): New TLS variable.
9039
9040         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
9041         option is used.
9042
9043 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
9044
9045         * mini.h: Removed verifer related stuff. This code was moved to verify.c
9046
9047         * mini.c: Removed verifer related stuff, code moved to verify.c.
9048
9049         * driver.c: Using code from verify.c instead of mini.c.
9050
9051 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
9052
9053         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
9054         longer valid.
9055
9056 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
9057
9058         * mini.c (check_for_method_verify): Enabling verification of
9059         corlib if mono_verify_all is set. Bugs in the verifier preventing that
9060         have been fixed.
9061
9062 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
9063
9064         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
9065         caller saved registers as well.
9066         
9067         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
9068         saved registers as well.
9069
9070 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
9071
9072         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
9073
9074         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
9075         code.
9076
9077 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
9078
9079         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
9080         to get_call_info.
9081         (get_call_info): Take a gsctx argument instead of 'cfg'.
9082
9083 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
9084
9085         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
9086         mono_verify_all is set.
9087
9088         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
9089
9090         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
9091
9092 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
9093
9094         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
9095         an exception.
9096
9097         * driver.c mini.c mini.h: Add a --verify-all development option to test the
9098         verifier and the code generated by the compiler.
9099
9100 2008-03-25  Mark Probst  <mark.probst@gmail.com>
9101
9102         * mini.c: Generic sharing of the non-nullable case of the box
9103         instruction.
9104
9105 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
9106
9107         * inssel.brg: Fix the build.
9108
9109         * iltests.il.in: Add a test for lconv.ovf.u8.un.
9110
9111 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
9112
9113         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
9114         Array:Address. Fixes #372410.
9115
9116         * iltests.il.in: New tests for readonly prefix.
9117
9118 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
9119
9120         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
9121         mini-trampolines.c.
9122
9123         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
9124         mini-exceptions.c.
9125
9126         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
9127         
9128         * mini.c (mono_decompose_op_imm): New helper function.
9129
9130         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
9131         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
9132         return value.
9133
9134         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
9135         mono_arch_output_basic_block. Fix warnings.
9136
9137         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
9138         for now.
9139
9140 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
9141
9142         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
9143         since the extra frame is now detected automatically inside the loop.
9144
9145         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
9146         opts which are now in mono_peephole_ins ().
9147         
9148         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
9149
9150         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
9151         frames and skip duplicate managed-to-native frames. Fixes #367665.
9152
9153         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
9154         opts which are now in mono_peephole_ins ().
9155         (mono_arch_peephole_pass_2): Ditto.
9156
9157         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
9158
9159         * mini-codegen.c (mono_peephole_ins): New helper function containing the
9160         arch independent peephole optimizations.
9161
9162         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
9163         opts which are now in mono_peephole_ins ().
9164
9165         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
9166         
9167         * mini-s390.c (mono_arch_output_basic_block): Fix build.
9168
9169         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
9170         pattern.
9171
9172         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
9173         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
9174         opcode. 
9175
9176 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
9177
9178         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
9179         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
9180         return value.
9181
9182         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
9183         mono_arch_output_basic_block. Fix warnings.
9184
9185 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
9186
9187         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
9188         conv.ovf.u.un.
9189
9190 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
9191
9192         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
9193         conv.ovf.u.un.
9194
9195         * iltests.il: Add new tests.
9196
9197 2008-03-20  Kornel Pal  <kornelpal@gmail.com>
9198
9199         * mini.c: Removed Windows version macros.
9200
9201 2008-03-20  Mark Probst  <mark.probst@gmail.com>
9202
9203         * generic-sharing.c: Put reflection types in the extensible part
9204         of the runtime generic context.
9205
9206         * mini.c: Generic sharing of the GetTypeHandle special case of the
9207         ldtoken instruction.
9208
9209 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
9210
9211         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
9212
9213         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
9214         
9215         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
9216         consistency with the other version on the linear IR branch.
9217
9218         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
9219
9220         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
9221
9222         * iltests.il.in: Add new tests.
9223
9224 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
9225
9226         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
9227
9228         * iltests.il.in: Add new tests.
9229
9230 2008-03-19  Mark Probst  <mark.probst@gmail.com>
9231
9232         * mini.c: Two variables with the same name were declared in
9233         nesting contexts and one wasn't initialized.  Fixed.
9234
9235 2008-03-19  Mark Probst  <mark.probst@gmail.com>
9236
9237         * mini.c: Generic sharing of the initobj instruction.
9238
9239 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
9240
9241         * mini.c: make the test to optimize ldtoken from typeof() more
9242         precise.
9243
9244 2008-03-18  Mark Probst  <mark.probst@gmail.com>
9245
9246         * mini.c: Generic sharing of the initobj instruction for reference
9247         types.
9248
9249 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
9250
9251         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
9252         the mono_breakpoint_clean_code() code to perform bound checks.
9253
9254 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
9255
9256         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
9257         mono_arch_patch_callsite() to include the start of the managed method
9258         to be able to perform bound checks.
9259
9260 2008-03-17  Mark Probst  <mark.probst@gmail.com>
9261
9262         * mini.c: Generic sharing for the isinst instruction.
9263
9264 2008-03-17  Mark Probst  <mark.probst@gmail.com>
9265
9266         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
9267         inssel-long32-mips.brg: Added opcodes for doing indirect calls
9268         with the runtime generic context argument.
9269
9270         * mini.c: Share calls to several types of unsharable methods by
9271         putting the address of the method code in the runtime generic
9272         context and doing an indirect call.
9273
9274         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
9275         to switches.
9276
9277 2008-03-16  Mark Probst  <mark.probst@gmail.com>
9278
9279         * generic-sharing.c: Change due to a change in the runtime genric
9280         context API.
9281
9282 2008-03-15  Martin Baulig  <martin@ximian.com>
9283
9284         * tramp-x86.c
9285         (mono_arch_nullify_class_init_trampoline): Add call to
9286         mono_breakpoint_clean_code() to make things work when running
9287         inside the debugger.
9288
9289         * tramp-amd64.c
9290         (mono_arch_nullify_class_init_trampoline): Add call to
9291         mono_breakpoint_clean_code() to make things work when running
9292         inside the debugger.
9293
9294 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
9295
9296         * inssel-long.brg (reg): Fix 64 bit build.
9297
9298 2008-03-14  Mark Probst  <mark.probst@gmail.com>
9299
9300         * mini.c, mini.h: Share static generic code by passing it an
9301         implicit argument pointing to the runtime generic context.
9302
9303         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
9304         inssel-long32-mips.brg: New opcodes for calling shared static,
9305         which need to be passed the runtime generic context.
9306
9307         * mini-amd64.c, mini-x86.c: Save the runtime generic context
9308         argument on the stack in the prologue if needed.  New function for
9309         finding the runtime generic context argument from the registers
9310         saved by the trampoline.
9311
9312         * mini-amd64.h, mini-x86.h: Specify which register to use for the
9313         runtime generic context argument.
9314
9315         * tramp-amd64.c: Also restore the register used for the runtime
9316         generic context argument.
9317
9318         * mini-trampoline.c: Resolve shared static calls by consulting the
9319         runtime generic context via the new argument.
9320
9321         * generic-sharing.c: Add an argument to sharability-checking
9322         functions that specifies whether type variables should be treated
9323         as sharable type arguments.
9324
9325         * inssel-x86.brg: Removed a superfluous, buggy rule.
9326
9327         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
9328         to switches.
9329
9330 2008-03-14  Martin Baulig  <martin@ximian.com>
9331
9332         * debug-debugger.c (main_thread_handler): Call
9333         mono_runtime_run_main() without sending any notifications.
9334
9335         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
9336
9337 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
9338
9339         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
9340
9341 2008-03-14  Mark Probst  <mark.probst@gmail.com>
9342
9343         * tramp-x86.c: Fixed register restore offsets in the trampoline
9344         code for ECX and EDX.
9345
9346 2008-03-12  Geoff Norton  <gnorton@novell.com>
9347
9348         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
9349         different ucontext_t implementations.
9350         * exceptions-arm.c: Use the above defines to get exceptions working on 
9351         iPhone (based on a patch by Luke Howard lukeh@padl.com)
9352         * mini-arm.c: Implement iPhone icache support (based on a patch by
9353         Luke Howard lukeh@padl.com)
9354
9355 2008-03-12  Mark Probst  <mark.probst@gmail.com>
9356
9357         * mini.c: Enable generic sharing of calls to non-static
9358         non-interface non-generic non-value-type methods.
9359
9360         * mini-trampolines.c: Resolve calls from shared generic code.
9361
9362 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
9363
9364         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
9365
9366         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
9367
9368 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
9369
9370         * mini.c: some fixes for the AOT compiler.
9371
9372 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
9373
9374         * cpu-amd64.md: Add clob:1 to some float opcodes.
9375
9376 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
9377
9378         * mini.h: Added MiniVerifierMode enumeration.
9379
9380         * mini.c: Added mini_verifier_set_mode to control
9381         the usage of the new verifier.
9382
9383         * mini.c (mono_method): Integrated the new verifier.
9384
9385         * driver.c: Extended --security option with validil and
9386         verifiable options to activate the new verifier.
9387
9388 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
9389
9390         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
9391         optimization to ctors taking 0 or 2 arguments too.
9392
9393         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
9394         a bit.
9395
9396         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
9397
9398         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
9399
9400 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
9401
9402         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
9403         non-aot case as well.
9404
9405         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
9406
9407         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
9408         changes.
9409
9410         * aot-compiler.c (encode_patch): Ditto.
9411
9412         * mini.h (G_MININT32): Fix the definition of this.
9413
9414 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
9415
9416         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
9417
9418         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
9419
9420 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
9421
9422         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
9423         methods returning vtypes in registers.
9424         (mono_arch_allocate_vars): Ditto.
9425
9426         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
9427
9428         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
9429
9430         * generics.cs: Add a test from the linear IR branch.
9431
9432         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
9433
9434         * mini.c (inline_method): Cache failed inline attempts.
9435
9436 2008-03-04  Mark Probst  <mark.probst@gmail.com>
9437
9438         * mini.c: For shared methods of generic classes put the location
9439         of "this" into the MonoGenericJitInfo.
9440
9441         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
9442         register out of a MonoContext by register number.  Add the generic
9443         sharing context as an argument to mono_arch_find_this_argument().
9444
9445         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
9446         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
9447         for new arch function.
9448
9449         * mini-exception.c: Handle open exception clauses in shared
9450         generic code.
9451
9452         * mini-trampolines.c: Supply additional argument to
9453         mono_arch_find_this_argument().
9454
9455 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
9456
9457         * Makefile.am (regtests): Run the bench.exe tests last.
9458
9459 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
9460
9461         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
9462         a bit.
9463
9464 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
9465
9466         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
9467         with MS.
9468
9469         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
9470         
9471         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
9472
9473         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
9474         whose class has no cctor.
9475
9476         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
9477
9478 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
9479
9480         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
9481         unverified.
9482
9483 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
9484
9485         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
9486         to be in sync with the code on the linear IR branch.
9487
9488         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
9489
9490         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
9491
9492 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
9493
9494         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
9495
9496         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
9497
9498         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
9499
9500         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
9501
9502         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
9503         
9504         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
9505         body.
9506
9507 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
9508
9509         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
9510         OP_LOADR4_MEMBASE emission.
9511
9512         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
9513         (mono_spillvar_offset_float): Ditto.
9514
9515         * mini-mips.c (mono_arch_emit_prolog): Ditto.
9516
9517         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
9518         emission.
9519
9520         * basic-long.cs: Add regression tests for them.
9521
9522         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
9523         use.
9524         (mono_arch_allocate_vars): Fix representation of single-precision float
9525         argument.
9526         (mono_arch_output_basic_block): Ditto.
9527
9528         * inssel-mips.brg: Ditto, remove duplicate items.
9529
9530         * mini-mips.c (emit_load_volatile_arguments): New function to handle
9531         arguments of tail calls as on other platforms.
9532         (mono_arch_output_basic_block): Handle tail calls.
9533
9534         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
9535         register.
9536
9537         * objects.cs (test_5_pass_static_struct): Add test for it.
9538
9539         Contributed under MIT/X11 license.
9540
9541 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
9542
9543         * Makefile.am: Use gmcs for compiling the regression tests.
9544
9545         * *.2.cs *.2.il: Rename to *.cs and *.il.
9546
9547 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
9548
9549         * regalloc.h: Make the vassign array smaller.
9550
9551         * mini.c (mini_method_compile): Remove an unused field in cfg.
9552
9553         * mini-codegen.c: Add a bunch of micro optimizations.
9554
9555 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
9556
9557         * regalloc.h: Remove some unused fields.
9558
9559 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
9560
9561         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
9562
9563         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
9564
9565 2008-02-22  Mark Probst  <mark.probst@gmail.com>
9566
9567         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
9568
9569         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
9570         trampoline: Fetch an entry from the runtime generic context.  If
9571         it's NULL, jump to the actual trampoline to fill the runtime
9572         generic context.  Otherwise, return it.
9573
9574         * mini.c: Call the lazy fetch trampoline to get entries out of the
9575         runtime generic context.
9576
9577         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
9578         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
9579         tramp-sparc.c: Stubs for the lazy fetch trampoline.
9580
9581 2008-02-21  Mark Probst  <mark.probst@gmail.com>
9582
9583         * mini.c: Fetch data out of the extensible part of the runtime
9584         generic context instead of calling a helper function.
9585
9586         * generic-sharing.c: Some functions moved into
9587         metadata/generic-sharing.c.  Helper function for fetching other
9588         types now checks and asserts against extensible rgctx (just for
9589         debugging purposes - the helper function isn't called anymore
9590         unless for debugging).
9591
9592 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
9593
9594         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
9595         for tail calls up to the point that the tests in iltests.exe run. Also add a
9596         dummy CKFINITE implementation.
9597         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
9598         needed for trampoline LMF frames.
9599
9600         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
9601         trampoline LMF frames.
9602
9603 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
9604
9605         * mini.c (inline_method): clean any pending loader error when inlining fail.
9606         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
9607
9608 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
9609
9610         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
9611
9612         * aot-runtime.c (decode_patch_info): Ditto.
9613
9614         * mini.c (mono_resolve_patch_target): Ditto.
9615         
9616         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
9617         icall wrappers.
9618
9619         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
9620         
9621         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
9622         if it references an icall address.
9623
9624 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
9625
9626         * cpu-s390x.md: Remove some more unused opcodes.
9627         
9628         * cpu-s390x.md: Remove some unused opcodes.
9629
9630         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
9631         mono_op_imm_to_op ().
9632
9633         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
9634         instead of a switch statement.
9635         
9636         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
9637         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
9638
9639         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
9640         
9641         * mini-codegen.c: Remove unused mono_regstate2_... functions.
9642
9643         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
9644         -1.
9645
9646 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
9647
9648         * driver.c (mono_main): Improve error reporting when an assembly cannot be
9649         opened. Fixes #362607.
9650
9651         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
9652
9653         * iltests.il.in: Add a test for static methods in interfaces.
9654
9655 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
9656
9657         * genmdesc.c (build_table): Fix a crash on older glib versions.
9658
9659         * cpu-sparc.md: Remove some unused opcodes.
9660         
9661         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
9662         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
9663
9664         * cpu-amd64.md: Remove some unused opcodes.
9665
9666         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
9667         like the other opcodes.
9668
9669 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
9670
9671         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
9672
9673         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
9674
9675         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
9676         variables 'cfg' instead of 'm' for consistency.
9677
9678         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
9679
9680         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
9681         argument holding the vtype return address, to avoid the ambigious use of
9682         cfg->ret for this purpose.
9683
9684         * mini.c (NEW_RETLOADA): Use vret_addr if set.
9685
9686         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
9687         
9688         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
9689         new mono_print_ins () function which only takes one argument.
9690
9691 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
9692
9693         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
9694         macro arguments.
9695
9696 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
9697
9698         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
9699
9700         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
9701
9702         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
9703         opcodes and other small changes.
9704
9705         * mini-ops.h: Add some new opcodes from the linear IR branch.
9706
9707         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
9708
9709         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
9710         opcodes, use the REG_MEMBASE opcodes instead.
9711         
9712         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
9713         opcodes, use the REG_MEMBASE opcodes instead.
9714         
9715         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
9716         linear IR branch.
9717
9718         * mini.c (mono_op_imm_to_op): New helper function.
9719
9720         * mini-ops.h: Add some opcodes from linear IR branch.
9721
9722 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
9723
9724         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
9725         <tsv@solvo.ru>.
9726
9727 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
9728
9729         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
9730         OP_ICONV_TO_R4/R8.
9731
9732         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
9733
9734 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
9735
9736         * aot-compiler.c (emit_method_code): Add an assert.
9737
9738         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
9739         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
9740         methods.
9741
9742 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
9743
9744         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
9745         some load/store opcodes so they are consistent. 
9746         (mono_arch_emit_prolog): Simplify some code.
9747
9748         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
9749
9750         * objects.cs: Add tests for large argument offsets on ARM.
9751
9752         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
9753         stack offsets. Fixes #359651.
9754
9755         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
9756
9757         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
9758
9759         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
9760
9761         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
9762
9763         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
9764
9765         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
9766         rid of CEE_CONV_R_UN.
9767
9768         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
9769
9770 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
9771
9772         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
9773
9774         * mini.c (mono_normalize_opcodes): Add some more opcodes.
9775
9776         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
9777
9778         * cpu-amd64.md: Remove some unused opcodes.
9779
9780         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
9781
9782         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
9783
9784         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
9785         arch specific functions for its parts. Call the peephole pass after local
9786         regalloc so the prolog can compute a more accurate max_offset.
9787         
9788         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
9789         the corresponding OP_I/OP_L opcodes.
9790
9791         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
9792
9793         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
9794
9795 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
9796
9797         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
9798         as they are handled in mini.c.
9799
9800         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
9801         
9802         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
9803         case since it is handled in mini.c.
9804
9805         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
9806
9807         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
9808
9809         * *.c: Use the new opcodes in the IR and back end code.
9810
9811         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
9812
9813         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
9814
9815 2008-02-06  Mark Probst  <mark.probst@gmail.com>
9816
9817         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
9818         an assert because it has a race condition.
9819
9820 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
9821
9822         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
9823
9824         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
9825
9826         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
9827
9828         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
9829         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
9830
9831 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
9832
9833         * cpu-amd64.md (move): Correct the maximum size of move.
9834
9835 2008-02-05  Mark Probst  <mark.probst@gmail.com>
9836
9837         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
9838         the generic class init trampoline to return quickly if the class
9839         is already inited.
9840
9841 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
9842
9843         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
9844         issues where an 32 bit callsite cannot be patched by a 64 bit address.
9845
9846 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
9847
9848         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
9849         branch.
9850
9851 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
9852
9853         * objects.cs: Add some soft-float tests.
9854
9855         * mini.c: Fix a couple more soft-float issues.
9856
9857         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
9858
9859         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
9860         avoid a REX prefix.
9861
9862 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
9863
9864         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
9865         exception happens while compiling a virtual method.
9866
9867 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
9868
9869         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
9870         
9871         * mini-sparc.c: Fix build.
9872
9873         * mini-sparc.c (get_call_info): Add support for generic sharing.
9874
9875         * mini-exceptions.c: Add a FIXME.
9876
9877 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
9878
9879         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
9880         altstack handling code.
9881
9882         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
9883         
9884         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
9885
9886         * mini-s390.c: Add support for generic sharing.
9887
9888         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
9889         Fix CAS on s390.
9890         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
9891
9892         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
9893
9894         * mini-s390x.c: Add support for generic sharing.
9895         
9896         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
9897         Fix CAS on ia64.
9898         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
9899
9900         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
9901         can be used since it takes a 16 bit signed immediate.
9902
9903         * inssel-s390x.brg: Fix OP_SETRET.
9904
9905         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
9906
9907         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
9908
9909         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
9910
9911         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
9912
9913         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
9914         in one place.
9915
9916         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
9917         stuff.
9918
9919         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
9920         of the unused mono_arch_patch_delegate_trampoline stuff.
9921
9922 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
9923
9924         * basic-long.cs: Move the fp related tests to basic-float.cs.
9925
9926         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
9927
9928         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
9929
9930         * basic-calls.cs: Add a test for proper float argument passing.
9931
9932         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
9933         if the context corresponds to an exception received through a signal.
9934
9935         * exceptions.cs: Add a test for nullref handling at the start of a try
9936         clause.
9937
9938         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
9939
9940         * jit-icalls.c (mono_break): New JIT icall.
9941
9942         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
9943
9944         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
9945
9946 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
9947
9948         * cpu-*.md: Get rid of unused opcodes.
9949
9950         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
9951
9952         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
9953         by all platforms.
9954
9955         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
9956         define.
9957
9958         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
9959         the arch independent trampoline code in mini-trampolines.c.
9960
9961         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
9962
9963         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
9964
9965         * mini-s390.h: Remove an unused define.
9966         
9967         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
9968         the arch independent trampoline code in mini-trampolines.c.
9969
9970         * mini-arm.c (mono_arch_emit_prolog): Fix build.
9971
9972 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
9973
9974         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
9975
9976         * mini-s390.c (mono_arch_emit_prolog): Fix build.
9977
9978         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
9979
9980         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
9981
9982         * cpu-amd64.md: Use smaller sizes for int opcodes.
9983
9984         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
9985
9986         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
9987         objects.cs.
9988
9989         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
9990         debugging.
9991
9992         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
9993         instead of though a pointer to save an indirection when accessing elements of
9994         the array.
9995
9996         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
9997         some typos.
9998         (NOT_IMPLEMENTED): New helper macro.
9999         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
10000         of a bb.
10001
10002         * *.c: Use the new helper macro.
10003
10004 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
10005
10006         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
10007
10008 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
10009
10010         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
10011         stack slots.
10012
10013 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
10014
10015         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
10016         profiling is enabled.
10017         
10018         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
10019         the end.
10020         (mono_arch_emit_prolog): Add more first bblock optimizations.
10021
10022         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
10023         in order if possible.
10024         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
10025         bblock, since the arguments are still in their original registers.
10026
10027         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
10028
10029 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
10030
10031         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
10032         as well.
10033
10034         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
10035         offset 0.
10036
10037         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
10038
10039         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
10040         process async exceptions received while in unmanaged code.
10041
10042         * mini.c (mini_init): Install a callback with the runtime which will be called
10043         when a thread receives an async exception while in unmanaged code.
10044
10045         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
10046
10047         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
10048
10049 2008-01-16  Wade Berrier  <wberrier@novell.com>
10050
10051         * cpu-g4.md:
10052         * cpu-arm.md:
10053         * cpu-s390x.md:
10054         fix build
10055
10056 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
10057
10058         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
10059         compilation with sun cc.
10060
10061         * cpu-*.md: Fix the build.
10062
10063         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
10064
10065         * mini-amd64.h: Add some comments to the MonoLMF structure.
10066
10067         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
10068         
10069         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
10070         in the LMF structure if possible. This saves two instructions in the
10071         managed->native wrappers.
10072
10073         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
10074
10075 2008-01-16  Mark Probst  <mark.probst@gmail.com>
10076
10077         * generic-sharing.c: New type argument lookup code which uses the
10078         runtime generic context template.
10079
10080 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
10081
10082         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
10083
10084         * mini-arm.c (add_general): Fix arm eabi parameter passing.
10085         (mono_arch_output_basic_block): Fix localloc implementation.
10086
10087         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
10088
10089         * mini-ia64.c (peephole_pass): Fix ia64 build.
10090
10091         * mini-amd64.c (peephole_pass): Fix a warning.
10092         
10093         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
10094         at a constant offset from sp/fp.
10095
10096         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
10097         instead of obtaining it from *lmf in the managed method case.
10098
10099 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
10100
10101         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
10102
10103 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
10104
10105         * mini.h (MonoInstList): New type.
10106         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
10107         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
10108         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
10109         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
10110         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
10111         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
10112         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
10113         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
10114         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
10115         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
10116         MONO_INST_LIST_FOR_EACH_ENTRY,
10117         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
10118         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
10119         mono_inst_list_first, mono_inst_list_last,
10120         mono_inst_list_next, mono_inst_list_prev): New instruction
10121         list handling interfaces.
10122         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
10123         list head 'ins_list'.
10124         (MonoInst): Replace next pointer with list head 'node'.
10125         (MonoCallInst): Make 'out_args' a MonoInstList.
10126         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
10127         (MonoCompile): Delete reverse_inst_list and
10128         reverse_inst_list_len.
10129         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
10130         mono_arch_lowering_pass, mono_arch_local_regalloc,
10131         mono_arch_output_basic_block, mono_arch_emit_prolog):
10132         Convert to new instruction lists.
10133         (insert_after_ins): Delete.
10134         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
10135         instruction lists.
10136         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
10137         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
10138         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
10139         mono_emulate_opcode, mono_emit_load_got_addr,
10140         inline_method, mono_method_to_ir, mono_print_bb_code,
10141         print_dfn, decompose_pass, nullify_basic_block,
10142         replace_out_block_in_code, remove_block_if_useless,
10143         merge_basic_blocks, move_basic_block_to_end,
10144         try_unsigned_compare, optimize_branches, mono_print_code,
10145         mini_select_instructions, remove_critical_edges): Likewise.
10146         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
10147         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
10148         mono_arch_output_basic_block, mono_arch_emit_prolog):
10149         Likewise.
10150         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
10151         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
10152         mono_arch_output_basic_block): Likewise.
10153         (inst_list_prepend, insert_after_ins): Delete.
10154         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
10155         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
10156         instruction lists.
10157         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
10158         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
10159         mono_arch_emit_prolog): Likewise.
10160         * cfold.c (mono_constant_fold): Likewise.
10161         * liveness.c (visit_bb, mono_analyze_liveness,
10162         optimize_initlocals): Likewise.
10163         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
10164         * graph.c (mono_draw_code_cfg): Likewise.
10165         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
10166         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
10167         mono_ssa_cprop): Likewise.
10168         * abcremoval (get_relations_from_previous_bb, process_block):
10169         Likewise.
10170         * local-propagation (mono_cprop_invalidate_values,
10171         mono_local_cprop_bb): Likewise.
10172         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
10173         peephole_pass, mono_arch_output_basic_block,
10174         mono_arch_emit_prolog): Likewise.
10175         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
10176         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
10177         mono_arch_emit_prolog): Likewise.
10178         (insert_after_ins): Delete.
10179         * aliasing.c (print_code_with_aliasing_information,
10180         mono_build_aliasing_information, mono_aliasing_deadce):
10181         Convert to new instruction lists.
10182         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
10183         peephole_pass, NEW_INS, mono_arch_lowering_pass,
10184         mono_arch_local_regalloc, mono_arch_output_basic_block):
10185         Likewise.
10186         (insert_after_ins): Delete.
10187         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
10188         peephole_pass, mono_arch_output_basic_block): Convert to
10189         new instruction lists.
10190         * mini-codegen (InstList, inst_list_prepend,
10191         insert_after_ins): Delete.
10192         (insert_before_ins, get_register_force_spilling,
10193         get_register_spilling, free_up_ireg, free_up_reg,
10194         create_copy_ins, create_spilled_store, alloc_int_reg,
10195         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
10196         to new instruction lists.
10197         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
10198         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
10199         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
10200         (insert_after_ins): Delete.
10201         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
10202         mono_arch_local_regalloc, mono_arch_output_basic_block,
10203         mono_arch_call_opcode): Convert to new instruction lists.
10204         (insert_after_ins): Delete.
10205         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
10206         peephole_pass, mono_arch_output_basic_block,
10207         mono_arch_emit_prolog): Convert to new instruction lists.
10208
10209 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
10210
10211         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
10212
10213         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
10214         Fixes #353182.
10215
10216         * Makefile.am (version.h): Make this work with non-bash shells.
10217
10218 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
10219
10220         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
10221
10222 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
10223
10224         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
10225         the InitializeArray optimization.
10226
10227 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
10228
10229         * mini.c driver.c: Don't include os/gc_wrapper.h.
10230
10231 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
10232
10233         * mini.c (print_jit_stats): Print GC statistics if available.
10234
10235 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
10236
10237         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
10238
10239 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
10240
10241         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
10242
10243 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
10244
10245         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
10246         
10247         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
10248
10249         * driver.c (mono_main): Ditto.
10250
10251 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
10252
10253         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
10254
10255         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
10256         in the vtable can't be encoded.
10257         (compile_method): Ditto.
10258
10259 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
10260
10261         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
10262         defined.
10263
10264         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
10265         lmf->rbp.
10266
10267         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
10268         the top LMF entry belongs to the current method.
10269
10270         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
10271
10272 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
10273
10274         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
10275         
10276         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
10277
10278         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
10279
10280         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
10281
10282         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
10283
10284         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
10285         implementation.
10286
10287         * basic-float.cs: Add an ulong->double cast test.
10288
10289 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
10290
10291         * mini.c (mono_method_to_ir): Fix a warning.
10292
10293 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
10294
10295         * mini-ops.h: Add OP_SWITCH.
10296
10297         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
10298         CEE_SWITCH in back-end code, use OP_SWITCH instead.
10299
10300 2007-12-11  Geoff Norton  <gnorton@novell.com>
10301
10302         * mini-s390x.c: Minor change to the MAX() define to allow
10303         it to compile with other gcc versions.
10304
10305 2007-12-11  Geoff Norton  <gnorton@novell.com>
10306
10307         * cpu-s390x.md:
10308         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
10309
10310 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
10311
10312         exceptions-arm.c (mono_arch_get_restore_context): Restore
10313         the frame pointer.
10314
10315         exceptions-arm.c (throw_exception): Save the frame pointer.
10316         This is a partial fix for #323747. Only the client side is
10317         fixed.
10318
10319 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
10320
10321         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
10322         was using an unrelated variable to log the class which
10323         needed the cctor to be called. This was crashing on arm.
10324
10325 2007-12-09  Robert Jordan  <robertj@gmx.net>
10326
10327         * mini-x86.c (mono_arch_emit_epilog):
10328         Consider all kinds of 64-bit types. Fixes #323114.
10329
10330 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
10331
10332         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
10333
10334 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
10335
10336         * mini-amd64.c (peephole_pass): Add a missing instruction check.
10337
10338 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
10339
10340         * mini.c: run type ctor before allocating an object, not only
10341         when running it's constructor method (fixes at least part of bug #342507).
10342
10343 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
10344         
10345         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
10346         
10347         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
10348         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
10349         function.
10350
10351         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
10352         mono_generic_class_init_trampoline () the same as it is done with the other
10353         trampolines.
10354
10355         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
10356         aot-runtime.c aot-compiler.c: Implement AOT support.    
10357
10358 2007-12-07  Mark Probst  <mark.probst@gmail.com>
10359
10360         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
10361         build for archs which don't have the vtable trampoline defined
10362         yet.
10363
10364 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
10365
10366         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
10367
10368         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
10369
10370         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
10371
10372         * tramp-<ARCH>.c: Use the new helper function.
10373
10374 2007-12-07  Mark Probst  <mark.probst@gmail.com>
10375
10376         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
10377         trampoline call, which takes a vtable argument.
10378
10379         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
10380         OP_TRAMPCALL_VTABLEs like other calls.
10381
10382         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
10383         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
10384         call.  Implemented a support function which fetches the vtable
10385         from a register set.
10386
10387         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
10388         Implemented a generic class init trampoline, using the
10389         OP_TRAMPCALL_VTABLE opcode.
10390
10391         * mini.c: Implemented static field access when sharing generic
10392         code.  This implies initing the class using the new
10393         OP_TRAMPCALL_VTABLE call.
10394
10395 2007-12-07  Mark Probst  <mark.probst@gmail.com>
10396
10397         * mini.c: Don't compile methods with sharing enabled if their
10398         classes are disabled for sharing.
10399
10400 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
10401
10402         * inssel.brg: Add a missing sign extension to the GETCHR and array access
10403         opcodes. Fixes #346563.
10404
10405         * objects.cs: Add a new test.
10406
10407         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
10408
10409         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
10410         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
10411
10412 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
10413
10414         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
10415
10416 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
10417
10418         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
10419         code stream.
10420
10421 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
10422
10423         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
10424
10425         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
10426         optimization in the AOT case.
10427         
10428 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
10429
10430         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
10431         
10432         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
10433
10434         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
10435
10436         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
10437
10438         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
10439         is created by the inlined delegate ctor.
10440
10441         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
10442
10443         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
10444
10445 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
10446
10447         * cpu-x86.md: Fix the length of ckfinite.
10448
10449 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
10450
10451         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
10452         
10453         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
10454         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
10455
10456         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
10457
10458         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
10459         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
10460
10461 2007-11-28  Martin Baulig  <martin@ximian.com>
10462
10463         * mini-x86.c
10464         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
10465         after creating the trampoline.
10466
10467 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
10468
10469         * aot-runtime.c (load_aot_module): Check runtime version if needed.
10470
10471         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
10472         the same version.
10473
10474         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
10475         instead of the calling method to help AOT.
10476
10477         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
10478
10479 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
10480
10481         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
10482         is defined.
10483
10484 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
10485
10486         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
10487         
10488         * aot-compiler.c (compile_method): Correct check for generic method definitions.
10489         (encode_method_ref): No need to handle generic method definitions specially.
10490
10491         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
10492
10493         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
10494         decode_klass_info.
10495
10496         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
10497         encode_klass_info.
10498         (compile_method): Enable generic sharing.
10499
10500 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
10501
10502         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
10503         (mini_method_compile): Add preliminary support for AOTing shared generic code.
10504
10505         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
10506         generic code.
10507
10508         * mini-trampolines.c: Fix a warning.
10509
10510         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
10511         NEW_PCONST.
10512         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
10513         (generic_class_is_reference_type): Remove unused function.
10514
10515         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
10516         in the generic vtable trampoline case.
10517
10518         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
10519         
10520         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
10521         return an AOT method based on a vtable slot.
10522
10523         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
10524
10525         * mini.c (mini_get_vtable_trampoline): Export this.
10526
10527 2007-11-22  Martin Baulig  <martin@ximian.com>
10528
10529         * debug-debugger.h
10530         (MonoDebuggerInfo): Move `debugger_version' up.
10531
10532 2007-11-22  Martin Baulig  <martin@ximian.com>
10533
10534         * mini-amd64.c
10535         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
10536
10537         * mini-trampolines.c
10538         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
10539         after compiling the method.
10540
10541 2007-11-20  Martin Baulig  <martin@ximian.com>
10542
10543         * debug-mini.c
10544         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
10545         (mono_debugger_remove_breakpoint): Likewise.
10546         (mono_debugger_check_breakpoints): Likewise.
10547
10548         * debug-debugger.c: Implement the new breakpoint interface here.
10549
10550 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
10551
10552         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
10553         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
10554
10555         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
10556
10557 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
10558
10559         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
10560
10561         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
10562         mini.c.
10563
10564         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
10565         mini.c.
10566
10567         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
10568         returning a vtype in a register.
10569
10570         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
10571         here from the arch specific code.
10572
10573         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
10574         mini.c.
10575
10576         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
10577         (mono_arch_emit_prolog): Increment maximum prolog size.
10578
10579         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
10580         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
10581
10582         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
10583         MonoGenericSharingContext.
10584
10585         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
10586         MonoGenericSharingContext. Allocate memory from the cfg mempool.
10587
10588 2007-11-15  Mark Probst  <mark.probst@gmail.com>
10589
10590         * mini.c, mini.h, generic-sharing.c: Functions for producing code
10591         which extract fields out of the runtime generic context.  Full
10592         sharing of the NEWARR opcode.
10593
10594 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
10595
10596         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
10597         --enable-minimal=ssa.
10598
10599 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
10600
10601         * mini-trampolines.c (mono_delegate_trampoline): Update after 
10602         mono_marshal_get_delegate_invoke () signature change.
10603
10604 2007-11-13  Mark Probst  <mark.probst@gmail.com>
10605
10606         * mini.c: Removed the shared context in favor of the generic
10607         sharing context.  Allocate the MonoJitInfo structure with room for
10608         the generic sharing context if it's needed.
10609
10610         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
10611         domain-internals.h now.
10612
10613         * mini-x86.c: Pass the generic sharing context to get_call_info ().
10614
10615         * generic-sharing.c: Several changes for working without a shared
10616         context and instead operating on open types instead.
10617
10618 2007-11-12  David S. Miller  <davem@davemloft.net>
10619
10620        * inssel-sparc.brg: Fix double instruction emit.
10621
10622 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
10623
10624         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
10625         Get/Set/Address methods.
10626         
10627         * mini.c debug-debugger.c mini-trampolines.c: Update after 
10628         mono_marshal_get_delegate_invoke signature change.
10629
10630 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
10631
10632         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
10633         This can happens with dynamic methods. Fixes the other bug in #322722.
10634
10635 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
10636
10637         * tramp-arm.c (mono_arch_patch_callsite): Support patching
10638         BX call sequence.
10639
10640         * mini-arm.c (arm_patch): Implement patching of BX call
10641         sequence. Fixes one of the bugs in #322722.
10642
10643 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
10644
10645        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
10646        under Linux.  We only need to flush every 32-byte cache line.    
10647
10648 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
10649
10650         * mini.c:
10651         move_basic_block_to_end: Add branches when needed, eventually creating
10652         a new BB.
10653         optimize_branches: added a parameter that tells if it's ok to create
10654         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
10655         and avoid calling move_basic_block_to_end when it's not ok.
10656         Fixes bug 318677.
10657
10658 2007-11-07  Mark Probst  <mark.probst@gmail.com>
10659
10660         * mini.c: Abort inlining call to InitializeArray if something
10661         looks wrong.  Let the icall handle it, which now has proper safety
10662         checks.
10663
10664 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
10665
10666         * mini.c (mono_spill_call): add support for soft-float.
10667
10668         * mini.c (mono_method_to_ir): add support for soft-float
10669         to inlined functions that return float.
10670
10671         * mini.c (mono_method_to_ir): add support for soft-float
10672         to cee_stsfld opcode on float fields.
10673
10674 2007-11-05  Geoff Norton  <gnorton@novell.com>
10675
10676         * mini-x86.h: Fix the structure access for X86 Leopard.
10677
10678
10679 2007-11-05  Martin Baulig  <martin@ximian.com>
10680
10681         * mini-trampolines.c
10682         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
10683         after compiling the method to notify the debugger.
10684
10685 2007-11-05  Martin Baulig  <martin@ximian.com>
10686
10687         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
10688
10689 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
10690
10691         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
10692         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
10693
10694 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
10695
10696         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
10697         native-to-managed wrappers.
10698         
10699 2007-11-01  Geoff Norton  <gnorton@novell.com>
10700
10701         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
10702         members.
10703
10704 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
10705
10706         * mini.c, mini-x86.c: when getting back from unmanaged code
10707         to managed via a marshaled delegate we also need to set the
10708         right domain.
10709
10710 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
10711
10712         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
10713         for amd64.
10714
10715 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
10716
10717         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
10718         let the debugger or other external agents to tell the JIT when
10719         a sw breakpoint has been inserted in the code that the JIT needs
10720         to be able to inspect.
10721
10722 2007-10-31  Martin Baulig  <martin@ximian.com>
10723
10724         * debug-debugger.h
10725         (MonoDebuggerInfo): Remove `runtime_class_init'.
10726
10727 2007-10-30  Martin Baulig  <martin@ximian.com>
10728
10729         * debug-mini.h
10730         (mono_debugger_thread_created): Added `MonoThread *' argument.
10731         (mono_debugger_extended_notification): New public method.
10732         (mono_debugger_trampoline_compiled): New public method.
10733
10734         * debug-mini.c
10735         (MonoDebuggerThreadInfo): Added `thread' and
10736         `extended_notifications' fields.
10737
10738         * debug-debugger.c
10739         (debugger_executable_code_buffer): New static variable.
10740
10741         * debug-debugger.h
10742         (MonoDebuggerInfo): Added `executable_code_buffer',
10743         `executable_code_buffer_size', `breakpoint_info_area',
10744         `breakpoint_table' and `breakpoint_table_size'.
10745
10746 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
10747
10748         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
10749         that IP  either is an unused value or the vtable pointer. IMT 
10750         calls use vtable + offset now. Reduced by almost half the size
10751         of IMT entries.
10752
10753 2007-10-26  Jonathan Chambers <joncham@gmail.com>
10754
10755         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
10756         defines to access param registers. Replace long usage with
10757         gsize as sizeof(long) != sizeof(void*) on Win64.
10758
10759         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
10760         on Win64. Fix intrinsic, use _AddressOfReturnAddress
10761         instead of non-existant _GetAddressOfReturnAddress.
10762
10763         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
10764         param registers. Save/restore %rdi and %rsi in MonoLMF.
10765
10766         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
10767         param registers. Modify (throw_exception) signature to take 
10768         %rdi and %rsi on Win64. 
10769
10770         Code is contributed under MIT/X11 license.
10771
10772 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
10773
10774         * helpers.c: unlink debugging output files.
10775
10776 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
10777
10778         * mini.c: Move mono_create_ftnptr () to object.c.
10779
10780 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
10781
10782         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
10783         optional. This function can now be used to disassemble code generated
10784         outside the JIT such as trampolines and IMT thunks.
10785
10786         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
10787
10788         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
10789         vtable pointer from a ldr instruction.
10790
10791         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
10792         new IMT call sequence.
10793
10794         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
10795         call sequence for interface invocations.
10796
10797         * mini-arm.c (mono_arch_emit_imt_argument): added, required
10798         for imt support. This function is empty since IMT on ARM requires no
10799         special handling on the IR side.
10800
10801         * mini-arm.c (mono_arch_find_imt_method): added, required for
10802         imt support.
10803
10804         * mini-arm.c (mono_arch_find_this_argument): added, required
10805         for imt support.
10806
10807         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
10808         a ldr instruction to load a value stored in the code stream.
10809
10810         * mini-arm.c (mono_arch_build_imt_thunk):added, required
10811         for imt support.
10812
10813
10814 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
10815
10816         * mini.c (mini_init): Install the jump trampoline callback.
10817
10818 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
10819
10820         * mini-trampolines.c: handle synchronized methods with the common
10821         vtable trampoline (bug #335601).
10822
10823 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
10824
10825         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
10826
10827         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
10828         64 bit platforms.
10829
10830         * mini-ia64.h mini-ia64.c: Add support for IMT.
10831
10832         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
10833         prolog. Fixes #331958.
10834
10835 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
10836
10837         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
10838
10839 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
10840
10841         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
10842         trampoline.
10843
10844 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
10845
10846         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
10847         trampoline.
10848
10849 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
10850
10851         * mini-x86.c, mini-x86.h: x86 support for the common vtable
10852         trampoline.
10853
10854 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
10855
10856         * mini-trampolines.c: changed the magic rampoline to understand
10857         the common vtable trampoline method: the method to invoke is
10858         determined by the vtable displacement of the call.
10859
10860 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
10861
10862         * mini.c, mini.h: register the common vtable trampoline if the
10863         architecture supports it.
10864
10865 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
10866
10867         * cpu-amd64.md: use the correct max length for tls_get.
10868
10869 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
10870
10871         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
10872         CEE_STELEM_ANY. Fixes #333696.
10873
10874 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
10875
10876         * exceptions-x86.c: provide more graceful handling of the case where
10877         we followed a bogus function pointer from managed code (bug #332866).
10878
10879 2007-10-11  Mark Probst  <mark.probst@gmail.com>
10880
10881         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
10882         replaces the generic_shared flag and will carry more information
10883         in the future.
10884
10885         * generic-sharing.c: Added mini_type_stack_size() which allows
10886         allows open types if given a generic sharing context.
10887         mini_get_basic_type_from_generic() takes a
10888         MonoGenericSharingContext* instead of a MonoCompile* now.
10889
10890         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
10891         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
10892         mini-sparc.c, mini-x86.c: Trivial changes required by the two
10893         changes above.  Just passing arguments through to the right
10894         places.
10895
10896 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
10897
10898         * mini-arm.c: unify the call emission to emit_code_seq().
10899
10900 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
10901
10902         * tramp-arm.c: reduced the trampoline size.
10903
10904 2007-10-10  Mark Probst  <mark.probst@gmail.com>
10905
10906         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
10907         variable handling out of arch-specific code.
10908
10909 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
10910
10911         * mini-arm.c: implemented fast delegate dispatch.
10912
10913 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
10914
10915         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
10916         that fp elimination is turned off if the space required by locals is too
10917         big. Fixes #331958.
10918
10919 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
10920
10921         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
10922         ARM to the new style trampoline.
10923
10924 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
10925
10926         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
10927
10928         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
10929
10930 2007-10-09  Martin Baulig  <martin@ximian.com>
10931
10932         * debug-debugger.h
10933         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
10934         `field_info_offset_offset'.     
10935
10936 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
10937
10938         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
10939         removed more internal usage of the r11 register and made it available
10940         to the register allocator.
10941
10942 2007-10-08  Mark Probst  <mark.probst@gmail.com>
10943
10944         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
10945         when sharing generics and treat type variables as references.
10946
10947 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
10948
10949         * mini-ppc.c: started removing the internal uses of register r11
10950         to eventually allow the register allocator to manage it as an
10951         additional available register.
10952
10953 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
10954
10955         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
10956
10957 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
10958
10959         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
10960         specific trampolines as they are not performance critical as a jump
10961         target (maybe align as before only for AOT code?). This saves about
10962         200 KB of native code on x86 for monodevelop startup.
10963
10964 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
10965
10966         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
10967         monodevelop startup.
10968
10969 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
10970
10971         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
10972
10973         * mini-sparc.h mini-sparc.c: Implement IMT support.
10974
10975         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
10976         its smaller and doesn't clobber sparc_g1.
10977
10978         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
10979
10980 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
10981
10982         * mini-ppc.c: optimized the size of the IMT thunks a bit.
10983
10984 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
10985
10986         * mini-ppc.c: implemented fast delegate invocation.
10987
10988 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
10989
10990         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
10991
10992 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
10993
10994         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
10995         code to the new style trampoline in preparation for IMT support.
10996
10997 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
10998
10999         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
11000         systems already. This also reduces the specific trampiline sizes and
11001         prepares for the use of r12 as the IMT identifier register.
11002
11003 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
11004
11005         * mini-mips.h: endianess fix (simplified from a patch by
11006         Thomas Kunze <thommy@tabao.de>, bug #323737).
11007
11008 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
11009
11010         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
11011         to access ucontext fields and enable netbsd support
11012         (partially from Magnus Henoch <mange@freemail.hu>).
11013
11014 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
11015
11016         * genmdesc.pl: patch from Henryk Plotz <henryk@openmoko.org> to
11017         use the preprocessor from the CPP env var if it is set.
11018
11019 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
11020
11021         * mini-trampolines.c: fixed an assertion and moved it earlier in the
11022         code, before interface_offset gets used.
11023
11024 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
11025
11026         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
11027         mono_class_setup_vtable () before accessing klass->vtable.
11028
11029 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
11030
11031         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
11032         hackish.
11033
11034 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
11035
11036         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
11037         IMT slots (this saves hundreds of KB of memory in programs like
11038         IronPython and Monodevelop).
11039
11040 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
11041
11042         * mini.c: print the delegate counter.
11043
11044 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
11045
11046         * mini-x86.c: make it easier to enable the debugging code for IMT
11047         slots.
11048
11049 2007-09-28  Martin Baulig  <martin@ximian.com>
11050
11051         * debug-debugger.h
11052         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
11053         `mono_method_klass_offset' and `mono_method_token_offset'.
11054
11055 2007-09-20  Mark Probst  <mark.probst@gmail.com>
11056
11057         * mini.c: First generics sharing implementation.  Can only share
11058         in very simple cases.  If sharing doesn't work it falls back to
11059         dedicated compilation.
11060
11061         * mini.h: Flag in MonoCompile to specify whether generic
11062         compilation is shared.  Flags enum for marking which generic inst
11063         of a context is used.  Prototypes for helper functions.
11064
11065         * generic-sharing.c: Helper functions for generic method sharing.
11066
11067         * optflags-def.h: Optimization flag (gshared) for enabling generic
11068         method sharing added.
11069
11070         * Makefile.am: generic-sharing.c added.
11071
11072 2007-09-19 Daniel Nauck <dna@mono-project.de>
11073
11074         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
11075
11076 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
11077         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
11078         fixes bug 325507.
11079
11080 2007-09-19  Martin Baulig  <martin@ximian.com>
11081
11082         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
11083         mono_debug_cleanup() is now part of mono_cleanup().
11084
11085 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
11086
11087         * driver.c (mono_main): Fix a warning.
11088
11089 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
11090
11091         * aot-compiler.c: Optimize various parts when processing large assemblies.
11092         Fixes ##325568.
11093
11094         * mini.c (mono_patch_info_hash): Improve hash function.
11095
11096 2007-09-14  Jonathan Chambers <joncham@gmail.com>
11097
11098         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
11099         
11100         Code is contributed under MIT/X11 license.
11101
11102 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
11103
11104         * mini.c (mini_init): Fix a leak.
11105
11106         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
11107
11108 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
11109
11110         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
11111
11112 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
11113
11114         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
11115
11116 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
11117
11118         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
11119         variance tests.
11120
11121         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
11122
11123         * mini.c (handle_alloc): Enable managed allocators in AOT code.
11124
11125         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
11126
11127         * aot-runtime.c (decode_patch_info): Ditto.
11128
11129 2007-09-12  Jonathan Chambers <joncham@gmail.com>
11130
11131         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
11132         static case. Cache delegates in architecture specific code, 
11133         based on number of parameters.
11134         
11135         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
11136         in architecture specific code, based on number of parameters.
11137         
11138         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
11139         caching happen in architecture specific code now.
11140         
11141         Code is contributed under MIT/X11 license.
11142
11143 2007-09-12  Jonathan Chambers <joncham@gmail.com>
11144
11145         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
11146         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
11147         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
11148
11149         Code is contributed under MIT/X11 license.
11150
11151 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
11152         * mini.c: (mono_thread_abort) Fixed bug #82416.
11153
11154 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
11155
11156         * mini.: hook the new managed GC allocation feature into the JIT.
11157
11158 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
11159
11160         * mini.c: implementation for the new runtime tls opcode.
11161
11162 2007-09-11  Martin Baulig  <martin@ximian.com>
11163
11164         * debug-debugger.h
11165         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
11166         `mono_method_inflated_offset'.
11167
11168 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
11169
11170         * driver.c mini.h mini.c: Add a new devel command line option for injecting
11171         async exceptions into a method.
11172
11173         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
11174         purpose of testing whenever the unwinder works at every instruction.
11175
11176 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
11177
11178         * mini.c: check accessibility of method used in ldftn (fixes
11179         bug #82635).
11180
11181 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
11182
11183         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
11184
11185         * inssel.brg: Fix a warning.
11186
11187 2007-09-03  Martin Baulig  <martin@ximian.com>
11188
11189         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
11190         now takes the `main_method' as argument.
11191
11192 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
11193
11194         * cpu-sparc.md (endfilter): Add missing src1:i argument.
11195
11196 2007-08-30  Jonathan Chambers <joncham@gmail.com>
11197
11198         * driver.c: include the cil-coff.h header on Windows.
11199         
11200         Code is contributed under MIT/X11 license.
11201
11202 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
11203
11204         * mini.c, driver.c: don't include the cil-coff.h header.
11205
11206 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
11207
11208         * mini.c: flag places that needs fixes fo soft-float support.
11209
11210 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
11211
11212         * mini.h, inssel-float.brg: fix soft-float constant loads on big
11213         endian systems (partially from Dean Jenkins, bug #81924).
11214
11215 2007-08-28  Mark Probst  <mark.probst@gmail.com>
11216
11217         * mini.c (check_linkdemand): Remove embedded reference object in
11218         call to LinkDemandSecurityException.
11219         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
11220         with an IntPtr instead of a reference object.
11221
11222 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
11223
11224         * mini.c (handle_initobj): Handle alignment properly.
11225
11226         * inssel.brg (mini_emit_memset): Ditto. 
11227
11228         * inssel.brg (mini_emit_memcpy): Ditto. 
11229
11230         * inssel-sparc.brg: Ditto.              
11231
11232         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
11233
11234 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
11235
11236         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
11237         exceptions raised in unmanaged code. Fixes part of #82594.
11238
11239 2007-08-24  Mark Probst  <mark.probst@gmail.com>
11240
11241         * mini.c (mono_method_to_ir), declsec.c
11242         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
11243
11244 2007-08-22  Martin Baulig  <martin@ximian.com>
11245
11246         * debug-mini.h
11247         (MonoDebuggerThreadInfo): New typedef.
11248         (mono_debugger_thread_table): New global variable.
11249         (mono_debugger_thread_created): New public function.
11250         (mono_debugger_thread_cleanup): New public function.
11251
11252         * debug-debugger.h
11253         (MonoDebuggerInfo):
11254         - removed `get_current_thread' and `lookup_assembly'.
11255         - removed `data_table'.
11256         - added `thread_table'.
11257
11258         * mini.c
11259         (mono_thread_start_cb): Call mono_debugger_thread_created().
11260         (mono_thread_attach_cb): Likewise.
11261         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
11262         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
11263         initial domain.
11264
11265         * driver.c (mono_main): Move mono_debug_init() up, before calling
11266         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
11267
11268 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
11269
11270         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
11271         together when passing several arguments of type double (gives a small
11272         speedup and saves a few bytes of generated code).
11273
11274 2007-08-20  Jb Evain  <jbevain@novell.com>
11275
11276         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
11277
11278 2007-08-20  Jb Evain  <jbevain@novell.com>
11279
11280         * mini.c (mono_method_to_ir): throw MethodAccessException
11281         and FieldAccessException instead of InvalidProgramException.
11282
11283 2007-08-20  Mark Probst  <mark.probst@gmail.com>
11284
11285         * mini.c: CoreCLR security checks.
11286
11287         * mini.h: Removed MonoSecurityMode (moved to
11288         metadata/security-manager.h) and mono_security_mode global var
11289         (replaced by set/get functions in security-manager.h).
11290
11291         * driver.c: Added "core-clr-test" security mode for testing.  Used
11292         set-function for setting security mode.
11293
11294 2007-08-17  Mark Probst  <mark.probst@gmail.com>
11295
11296         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
11297         the new jit_info_table.
11298
11299         * driver.c: Test code for the new jit_info_table (enabled by the
11300         define MONO_JIT_INFO_TABLE_TEST).
11301
11302 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
11303
11304         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
11305         detection of call <REG> instruction sequence. Fixes build on freebsd.
11306
11307 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
11308
11309         * mini-exceptions.c: Fix a warning.
11310
11311 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
11312
11313         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
11314         stack overflow handling code on amd64 too.
11315
11316         * mini-exceptions.c (mono_setup_altstack): Make this use 
11317         mono_thread_get_stack_bounds ().
11318
11319         * mini-x86.h: Disable sigaltstack on solaris x86.
11320
11321 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
11322
11323         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
11324
11325 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
11326
11327         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
11328
11329 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
11330
11331         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
11332
11333         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
11334
11335 2007-08-03  Neale Ferguson <neale@sinenomine.net>
11336
11337         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
11338         due to alignment.
11339
11340 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
11341
11342         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
11343         to be emitted (bug #82281).
11344
11345 2007-08-01  Martin Baulig  <martin@ximian.com>
11346
11347         Merged the `debugger-dublin' branch.
11348
11349         * debug-debugger.h (MonoDebuggerInfo):
11350         Removed the `old_*' compatibility entries.
11351         Added `debugger_version' and `data_table'.
11352         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
11353         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
11354
11355         * debug-mini.c
11356         (MiniDebugMethodBreakpointInfo): Add `address_list'.
11357         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
11358         instead of a `gconstpointer'.
11359         (mono_debugger_insert_method_breakpoint): Return a
11360         `MonoDebugMethodAddressList *'.
11361
11362 2007-06-28  Martin Baulig  <martin@ximian.com>
11363
11364         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
11365
11366 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
11367
11368         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
11369         __builtin_frame_address () since it is broken on older gcc versions.
11370
11371 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
11372
11373         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
11374         on the stack overflow handling and made the managed stack overflows
11375         catchable in most cases using soft guard pages.
11376         * exceptions-x86.c: added code to restore the protection in the soft
11377         guard pages at the end of exception handling.
11378
11379 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
11380
11381         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
11382
11383 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
11384
11385         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
11386         exception handling.
11387
11388 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
11389
11390         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
11391         signal handling support until it has been ported to the new mechanism.
11392         * mini.c: fixed stack overflow detection and use the new
11393         architecture code  to handle signals on the altstack.
11394
11395 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
11396
11397         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
11398         stack overflows on the alt stack.
11399
11400 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
11401
11402         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
11403         stack overflows on the alt stack.
11404
11405 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
11406
11407         * exceptions-ppc.c: cleanup preparing for altstack support.
11408
11409 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
11410
11411         * exceptions-arm.c: cleanup preparing for altstack support.
11412
11413 2007-07-27  Mark Probst  <mark.probst@gmail.com>
11414
11415         * mini.c (print_jit_stats): Output hazard pointer stats.
11416
11417 2007-07-26  Mark Probst  <mark.probst@gmail.com>
11418
11419         * driver.c, mini.c: Replaced security mode flags with a single
11420         enum variable.
11421
11422 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
11423
11424         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
11425
11426 2007-07-25  Mark Probst  <mark.probst@gmail.com>
11427
11428         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
11429         (which doesn't do anything yet) for activating Core CLR
11430         (Silverlight) security.
11431
11432 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
11433
11434         * mini-codegen.c: work around a possible gcc bug on arm.
11435
11436 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
11437
11438         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
11439         message for platforms that don't support AOT compilation.
11440
11441 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
11442
11443         * mini.h, mini.c, driver.c: temporary smcs hack.
11444
11445 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
11446
11447         * mini-arm.h, mini-arm.c: arm EABI fixes.
11448
11449 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
11450
11451         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
11452         case.
11453
11454         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
11455         trampolines taking a method argument.
11456
11457         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
11458
11459         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
11460         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
11461
11462         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
11463         JIT compilation throws an exception. Fixes #82050.
11464
11465 2007-07-19  Mark Probst  <mark.probst@gmail.com>
11466
11467         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
11468         with the MONO_EXCEPTION_ defines.
11469
11470 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
11471
11472         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
11473         #82117.
11474         
11475         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
11476         the cause of an assertion.
11477
11478 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
11479
11480         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
11481         removed.
11482
11483 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
11484
11485         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
11486         assert. Should fix #82103.
11487
11488 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
11489
11490         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
11491         here too. Fixes #82095.
11492
11493         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
11494         addresses.
11495
11496         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
11497
11498         * mini-amd64.h: Enable IMT for amd64.
11499         
11500         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
11501
11502 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
11503
11504         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
11505
11506 2007-07-12  Mark Probst  <mark.probst@gmail.com>
11507
11508         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
11509         as soon as check_linkdemand sets an exception_type.
11510
11511 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
11512
11513         * mini-x86.c: fixed offsets for IMT call sequence.
11514         * mini-x86.h: enable IMT again.
11515
11516 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
11517
11518         * trace.c (mono_trace_enter_method): Decode MonoType too.
11519
11520         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
11521
11522         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
11523
11524         * mini-amd64.c: Add preliminary IMT implementation.
11525         
11526 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
11527
11528         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
11529         understand the new IMT-base interface invocation (thanks to
11530         Daniel Nauck for the report and the remote debugging session).
11531
11532 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
11533
11534         * mini-x86.c: size and speed optimizations for the IMT bsearch.
11535
11536 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
11537
11538         * Makefile.am (aotcheck): Make this actually use the AOTed code.
11539
11540 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
11541
11542         * mini-trampolines.c: implement AOT IMT support.
11543         * mini-x86.h: enable IMT support for wider testing.
11544
11545 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
11546
11547         * inssel.brg (emit_imt_argument): Add aot support here.
11548
11549         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
11550
11551 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
11552
11553         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
11554         of the IMT implementation, partially from massi, with my
11555         implementation of the bsearch sequence. Disabled by default until
11556         the AOT code is implemented.
11557
11558 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
11559
11560         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
11561
11562         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
11563
11564 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
11565
11566         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
11567         arch-independent IMT JIT code from Massimiliano
11568         Mantione (massi@ximian.com) with small cleanups from me.
11569
11570 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
11571
11572         * Makefile.am: fix svn invocation to get the svn revision to be
11573         independent of the local language (build fix).
11574
11575 2007-07-09  Mark Probst  <mark.probst@gmail.com>
11576
11577         * mini.c (inline_method): Reset cfg->exception_type if the
11578         inlining is aborted.  Fixes: 82049.
11579
11580 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
11581
11582         * mini.c: remove assert from exception handling code when exception_ptr
11583         is not set.
11584
11585 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
11586
11587         * mini.c (mono_codegen): Add an assert.
11588
11589         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
11590         enter and leave code.
11591         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
11592
11593 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
11594
11595         * mini-ppc.c: fixed memory corruption for localloc(0)
11596         (bug #81852).
11597
11598 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
11599         
11600         * mini.c: Fix warnings.
11601
11602 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
11603
11604         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
11605         to emit better double->int conversions.
11606
11607 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
11608
11609         * mini.c: the provided Min/Max optimizations are valid for unisgned
11610         ints.
11611
11612 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
11613
11614         * 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
11615
11616 2007-06-28  Miguel de Icaza  <miguel@novell.com>
11617
11618         * mini.c (mono_running_on_valgrind): Add support for reporting the
11619         method and  its boundaries to valgrind.
11620
11621 2007-06-28  Martin Baulig  <martin@ximian.com>
11622
11623         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
11624
11625 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
11626
11627         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
11628
11629         * generic.2.cs: Add new test case.
11630
11631 2007-06-25  Martin Baulig  <martin@ximian.com>
11632
11633         Merged the `debugger-dublin' branch.
11634
11635         * debug-mini.c
11636         (mono_debugger_insert_method_breakpoint): New public method.
11637         (mono_debugger_remove_method_breakpoint): Likewise.
11638         (mono_debugger_check_breakpoints): New static method.
11639         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
11640
11641         * debug-debugger.h (MonoDebuggerInfo):
11642         Renamed (to keep backward compatibility in the vtable):
11643         `insert_breakpoint' -> `old_insert_breakpoint'.
11644         `remove_breakpoint' -> `old_remove_breakpoint'.
11645         `create_string' -> `old_create_string'.
11646         `lookup_class' -> `old_lookup_class'.
11647         `lookup_type' -> removed; changed into a dummy field.
11648         `lookup_assembly' -> `old_lookup_assembly'.
11649         Added (same functionality, but different signature):
11650         `create_string', `lookup_class', `lookup_assembly'
11651         Added new:
11652         `get_method_addr_or_bpt', `remove_method_breakpoint',
11653         `runtime_class_init'.
11654
11655         * debug-debugger.c: Merged the `debugger-dublin' branch.
11656
11657 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
11658
11659         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
11660         well.
11661         (peephole_pass): Likewise.
11662
11663 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
11664
11665         * driver.c: hopefully make setaffinity work also for ancient
11666         versions of linux.
11667
11668 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
11669
11670         * driver.c : win32 build fix.
11671
11672 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
11673
11674         * driver.c: check for the MONO_NO_SMP env var and bind to a single
11675         processor if it is set.
11676
11677 2007-06-21  Martin Baulig  <martin@ximian.com>
11678
11679         * debug-mini.h: New file.
11680
11681         * debug-mini.c
11682         (mono_debugger_insert_breakpoint_full): Moved here from
11683         ../metadata/mono-debug-debugger.c.
11684         (mono_debugger_remove_breakpoint): Likewise.
11685         (mono_debugger_breakpoint_callback): Likewise.
11686
11687 2007-06-15  Raja R Harinath  <rharinath@novell.com>
11688
11689         * jit-icalls.c (mono_helper_compile_generic_method): Update to
11690         changes in MonoGenericClass.
11691
11692 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
11693
11694         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
11695
11696 2007-06-14  Raja R Harinath  <rharinath@novell.com>
11697
11698         * jit-icalls.c (mono_helper_compile_generic_method): Update to
11699         removal of MonoGenericMethod.
11700
11701 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
11702
11703         * mini-exceptions.c: hooks for the exception events profiling API.
11704
11705 2007-06-14  Randolph Chung  <tausq@debian.org>
11706
11707         * Makefile.ma: Add hppa target.
11708         * mini-arch.h: Include mini-hppa.h
11709         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
11710         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
11711         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
11712
11713 2007-06-14  Randolph Chung  <tausq@debian.org>
11714
11715         * inssel.brg: Add rules for "chained" compare-branch operations so that
11716         a single compare op can affect multiple branches.  Adjust cost for
11717         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
11718         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
11719         cost for some rules so that they can more easily be overridden by
11720         per-arch rules (with fixes from lupus).
11721         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
11722
11723 2007-06-13  Randolph Chung  <tausq@debian.org>
11724
11725         * mini-ops.h: Reorder branch ops so that they match the order of the
11726         corresponding CEE_* ops.  The code expects them this way.
11727         Add new ops for HPPA target.
11728         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
11729
11730 2007-06-13  Randolph Chung  <tausq@debian.org>
11731
11732         * mini-exceptions.c: Handle cases where the stack grows towards
11733         larger addresses.
11734         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
11735
11736 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
11737
11738         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
11739         counter.
11740         * driver.c: explain where a non-matching corlib is found.
11741
11742 2007-06-13  Mark Probst  <mark.probst@gmail.com>
11743
11744         * mini.c (print_jit_stats): Output dynamic code allocation stats.
11745
11746 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
11747
11748         * mini-exceptions.c: Generate a method profile leave event during
11749         an exception to ensure that the profiler gets notified.
11750
11751 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
11752
11753         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
11754         branch.
11755
11756         * cpu-amd64.md: Add long_and/or/xor opcodes.
11757
11758 2007-06-06  Wade Berrier  <wberrier@novell.com>
11759
11760         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
11761         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
11762         length of instruction shr_imm (expected 8, got 10)
11763
11764 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
11765
11766         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
11767
11768 2007-06-06  Mark Probst  <mark.probst@gmail.com>
11769
11770         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
11771         MonoInternalHashTable again (fixed bug in the internal hash table
11772         code).
11773
11774 2007-06-06  Mark Probst  <mark.probst@gmail.com>
11775
11776         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
11777         Have to figure out what makes it crash the SWF regression.
11778
11779 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
11780
11781         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
11782
11783 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
11784
11785         * mini.c: optimize out the type check when storing null in a
11786         reference array.
11787
11788 2007-06-04  Mark Probst  <mark.probst@gmail.com>
11789
11790         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
11791         MonoInternalHashTable.
11792
11793 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
11794
11795         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
11796         signed integer methods.
11797
11798 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
11799
11800         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
11801         permanently since the current approach doesn't work.
11802
11803 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
11804
11805         * inssel.brg (stmt): Only call delegate->invoke_impl if 
11806         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
11807
11808 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
11809
11810         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
11811         the sreg2==rdx case.
11812         
11813         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
11814         account if it contains a rex prefix.
11815         (peephole_pass): Handle OP_FMOVE as well.
11816
11817 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
11818
11819         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
11820         as it causes regressions.
11821
11822 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
11823
11824         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
11825         static case as well.
11826
11827         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
11828
11829         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
11830         (mono_arch_get_this_arg_from_call): Ditto.
11831
11832         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
11833
11834         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
11835         invoke_impl field.
11836
11837         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
11838         (mono_arch_get_this_arg_from_call): Ditto.
11839
11840         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
11841         
11842         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
11843         try to create optimized invoke code and use that for further invocations. 
11844         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
11845
11846         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
11847
11848 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
11849
11850         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
11851         sealed classes or methods.
11852         *devirtualization.cs: tests for the new optimization
11853
11854 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
11855
11856         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
11857         by the update_volatile () function.
11858
11859 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
11860
11861         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
11862         require it.
11863
11864         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
11865
11866 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
11867
11868         * mini.c: Add configure checks for header files.
11869         * mini-x86.c: Add configure checks for header files.
11870         * trace.c: Add configure checks for header files.
11871         * aot-runtime.c: Add configure checks for header files.
11872         * aot-compiler.c: Add configure checks for header files.
11873         * driver.c: Add configure checks for header files.
11874         * mini-codegen.c: Add configure checks for header files.
11875         
11876         Code is contributed under MIT/X11 license.
11877
11878 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
11879
11880         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
11881         icompare_imm -128 + op_iclt. Fixes #81703.
11882
11883 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
11884
11885         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
11886
11887 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
11888
11889         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
11890         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
11891         so that all isinst checks now use "interface_bitmap".
11892
11893 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
11894
11895         * cpu-amd64.md (jmp): Fix a warning.
11896
11897         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
11898
11899         * basic.cs: Add new regression test.
11900
11901         * basic.cs: Remove test which is now in basic-long.cs.
11902
11903         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
11904
11905         * basic-long.cs: Add new test.
11906         
11907 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
11908
11909         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
11910
11911 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
11912
11913         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
11914
11915         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
11916         places.
11917         
11918         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
11919         throwing code a bit.
11920
11921         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
11922         the exception throwing code a bit.
11923
11924         * mini-x86.c (get_call_info): Allocate result from a mempool.
11925
11926 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
11927
11928         * aot-compiler.c (find_typespec_for_class): Fix the assert.
11929
11930         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
11931
11932         * mini.h (MonoCompile): Add 'token_info_hash' field.
11933
11934         * mini.c: Save token->method associations during compilation so the AOT 
11935         compiler can use it.
11936         
11937         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
11938         which reference generic classes and methods.
11939
11940 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
11941
11942         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
11943
11944         * aot-compiler.c (compile_method): Fix a typo in a comment.
11945
11946         * aot-runtime.c (decode_cached_class_info): Skip generic types.
11947
11948         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
11949         everything generic.
11950
11951         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
11952
11953 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
11954
11955         * mini.h (MonoCompile): Add 'args' field.
11956
11957         * mini.c (mono_compile_create_vars): Store variables representing the arguments
11958         into cfg->args.
11959
11960         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
11961
11962 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
11963
11964         * mini.c (mono_compile_get_interface_var): Remove this unused function.
11965
11966         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
11967
11968         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
11969         opcodes for some opcodes.
11970
11971         * mini.h *.brg *.c: Use the new opcodes.
11972
11973 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
11974
11975         * mini.h: Bumped aot revision.
11976
11977         * inssel.brg: modified code generation of type checks for interfaces
11978         to use the new "MonoClass.interface_bitmap" instead of the old
11979         "MonoClass.interface_offsets".
11980
11981 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
11982
11983         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
11984
11985 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
11986
11987         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
11988         64 bit platforms.
11989
11990 2007-04-27  Neale Ferguson <neale@sinenomine.net>
11991
11992         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
11993
11994 2007-04-27  Wade Berrier  <wberrier@novell.com>
11995
11996         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
11997         mini.h) to fix build.
11998
11999 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
12000
12001         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
12002         
12003         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
12004         causes the corlib unit tests to fail.
12005
12006 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
12007
12008         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
12009
12010         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
12011
12012         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
12013         opcodes to the comparison relations.
12014
12015         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
12016         opcodes to their types.
12017         
12018         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
12019
12020         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
12021         it in cfg->arch.cinfo.
12022
12023         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
12024
12025         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
12026         cfg->cil_offset_to_bb.
12027
12028 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
12029
12030         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
12031         created becase of initlocals.
12032
12033 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
12034
12035         * mini-alpha.c cpu-alpha.md: More alpha port work from 
12036         Sergey Tikhonov <tsv@solvo.ru>.
12037
12038 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
12039
12040         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
12041
12042 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
12043
12044         * cpu-s390.md (break): Correct the length of break instruction.
12045
12046 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
12047
12048         * mini.c: fix a couple of soft-float issues and comments.
12049
12050 2007-04-15  Miguel de Icaza  <miguel@novell.com>
12051
12052         * trace.c (is_filenamechar): - is also a filename char.
12053
12054 2007-04-15  Neale Ferguson <neale@sinenomine.net>
12055
12056         * mini-s390.c: Correct checking for enum type in return value processing.
12057
12058 2007-04-14  Raja R Harinath  <rharinath@novell.com>
12059
12060         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
12061         (version.h): Makefile is in the build directory.
12062
12063 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
12064
12065         * mini-amd64.h: fix for assertion failure on Solaris/amd64
12066
12067 2007-04-11  Martin Baulig  <martin@ximian.com>
12068
12069         * mini.c (can_access_member): Fix handling of generic classes;
12070         fixes #81259.
12071
12072 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
12073
12074         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
12075
12076 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
12077
12078         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
12079
12080 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
12081
12082         * mini-codegen.c: make sure the right spill amount is
12083         used for fp or integer registers (fixes the float_sub_spill() on ppc).
12084
12085 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
12086
12087         * mini-ppc.c: fixes for the fp_branch_nan test.
12088
12089 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
12090
12091         * basic.cs: Comment out new test which still fails on ia64.
12092
12093 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
12094
12095         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
12096
12097 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
12098
12099         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
12100
12101 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
12102
12103         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
12104         on 64 bit machines. Fixes part of #80738.
12105
12106         * basic.cs: Add regression test.
12107
12108 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
12109
12110         * inssel.brg basic.cs: Revert previous change to fix build.
12111
12112         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
12113         platforms.
12114         
12115         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
12116
12117         * basic.cs: Add new regression test.
12118
12119 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
12120
12121         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
12122         many arguments.
12123
12124 2007-03-16  Neale Ferguson <neale@sinenomine.net>
12125
12126         * cpu-s390x.md: Correct length of break instruction.
12127
12128 2007-03-16  Neale Ferguson <neale@sinenomine.net>
12129
12130         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
12131         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
12132
12133 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
12134
12135         * *.c: Begin WIN64 port.
12136         * mini.c:  Use correct register in profiler.
12137         * mini-amd64.c: No inline assembly on Win64.
12138         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
12139         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
12140         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
12141         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
12142         mono_arch_ip_from_context for Win64.
12143         
12144         Contributed under MIT/X11 license.
12145
12146 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
12147
12148         * exceptions-amd64.c (seh_handler): Ditto.
12149
12150         * exceptions-x86.c (seh_handler): Fix a memory leak.
12151
12152 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
12153
12154         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
12155         mini-s390x.c: fixed peephole optimizations to deal
12156         correctly with 1 and 2 byte reload avoidance.
12157
12158 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
12159
12160         * cpu-s390.md, cpu-s390x.md: update localloc length.
12161
12162 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
12163
12164         * cpu-g4.md: added missing descriptions.
12165
12166 2007-03-14  Miguel de Icaza  <miguel@novell.com>
12167
12168         *  Makefile.am: Add support so the tail tests are not executed on
12169         PowerPC as that is a known limitation of the PowerPC port.
12170
12171 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
12172
12173         * runmdesc.bat:  Move to msvc directory.
12174         
12175 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
12176
12177         * runmdesc.bat:  Run executable that was produced by the current
12178         target and sent via an argument.
12179         
12180 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
12181
12182         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
12183         #81102.
12184
12185         * generics.2.cs: Add regression test.
12186
12187 2007-03-09  Wade berrier  <wberrier@novell.com>
12188
12189         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
12190
12191 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
12192
12193         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
12194         AOT code depends on this.
12195
12196 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
12197
12198         * mini.c: more precise tracking of types in the eval stack
12199         (part of fix for bug #81044).
12200
12201 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
12202
12203         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
12204
12205         * aot-compiler.c (encode_patch): Remove an obsolete comment.
12206
12207 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
12208
12209         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
12210
12211         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
12212
12213 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
12214
12215         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
12216         a pointer on 64 bit systems. Fixes #80190.
12217
12218         * iltests.il: Add new regression test.
12219
12220 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
12221
12222         * mini.c: inline a constant for Environment.IsRunningOnWindows.
12223
12224 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
12225
12226         * trace.c: Remove an erroneous alignemnt check when tracing.
12227           Fixes --trace on OSX86.
12228
12229 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
12230
12231         * mini-$(arch).h: initialize SP in context for all the archs.
12232
12233 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
12234
12235         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
12236         regressions in the thread tests.
12237
12238 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
12239
12240         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
12241         - fixed implementation of LOCALLOC opcode
12242         - implemented non-un compare for floats
12243         - code cleanup
12244         - implementation of FDIV and CKFINITE opcodes
12245         - fixes for latest mono updates
12246         - additional arch opcodes
12247
12248 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
12249
12250         * Makefile.am: simplify and merge rules for cross-compilation.
12251
12252 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
12253
12254         * local-propagation.c: Actually *apply* the fix for bug 80591...
12255
12256 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
12257
12258         * mini-exceptions.c: backuot part of the last change
12259         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
12260
12261 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
12262         * inssel.brg: Fix bug 59286.
12263
12264
12265 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
12266
12267         * mini-exceptions.c: patch from Zoltan to correctly check for
12268         stack boundaries (using the stack register, not the frame register),
12269         fixes bugs #80724, #79717.
12270
12271 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
12272
12273         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
12274         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
12275
12276         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
12277         presence of frame pointer elimination.
12278
12279 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
12280         
12281         * mini-x86.h: NetBSD UCONTEX_REG defines.
12282
12283 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
12284
12285         * inssel-amd64.brg: Fix amd64 build.
12286
12287 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
12288
12289         * mini.h: remove extern to workaround what looks likes gcc bug 26905
12290         on amd64.
12291
12292 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
12293
12294         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
12295         ends.
12296
12297         * mini-<ARCH>.c: Use mono_is_regsize_var ().
12298
12299 2007-01-30 Mark Mason <mason@broadcom.com>
12300
12301            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
12302            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
12303            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
12304            beginning support for CEE_JMP [not quite working yet]
12305            * tramp-mips.c: LMF handling now works
12306         
12307 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
12308
12309         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
12310
12311         * mini.h (NULLIFY_INS): New macro.
12312
12313 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
12314
12315         * mini.c: statistical profiler fix for windows, patch
12316         from Tor Lillqvist (tml@novell.com).
12317
12318 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
12319         * local-propagation.c: Fix bug 80591.
12320
12321 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
12322
12323         * Makefile.am: put back the --export-dynamic option as with
12324         the previous gmodule flags (thanks to Robert Jordan).
12325
12326 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
12327
12328         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
12329
12330         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
12331         simplify and speed up the local register allocator. Also rename some fields
12332         like iassign->vassign.
12333         
12334         * regalloc.c: Remove some functions which are no longer used since their
12335         inlined version is in mini-codegen.c.
12336         
12337         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
12338
12339         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
12340
12341 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
12342
12343         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
12344         narrowing. Fixes #80622.
12345
12346         * iltests.il: Add new regresssion test. 
12347
12348 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
12349
12350         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
12351         debug-debugger.c, debug-debugger.h: warning fixes.
12352         * driver.c: updated copyright year and made it fit in one line.
12353
12354 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
12355
12356         * aot-runtime.c: updated to use mono-dl instead of gmodule.
12357
12358 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
12359
12360         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
12361
12362         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
12363
12364         * iltests.il: Add new test for bug #80507.
12365
12366 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
12367
12368         * mini-arm.h: use soft-float also on vfp for now.
12369
12370 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
12371
12372         * mini.c: fix some more soft-float issues.
12373
12374 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
12375
12376         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
12377
12378 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
12379         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
12380         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
12381         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
12382
12383 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
12384
12385         * mini-arm.c: typo fix.
12386
12387 2007-01-23  Neale Ferguson <neale@sinenomine.net>
12388
12389         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
12390
12391 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
12392
12393         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
12394         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
12395
12396         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
12397
12398         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
12399
12400         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
12401         
12402         * inssel.brg: Fix a warning.
12403
12404         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
12405
12406         * abcremoval.c ssa.c ssapre.c: Update after this change.
12407         
12408         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
12409
12410         * dominators.c (df_set): Use mono_bitset_union_fast.    
12411
12412 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
12413
12414         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
12415         mini-codegen.c: reduce relocations and memory usage for the cpu
12416         description.
12417
12418 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
12419
12420         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
12421
12422         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
12423         to reduce their size.
12424
12425 2007-01-19 Mark Mason <mason@broadcom.com>
12426
12427         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
12428         * mini-mips.c: more configuration macros, support long conditional branches, additional
12429         asserts, fix epilog instrumentation.
12430         * mini-mips.h: use standard stack walk
12431         * cpu-mips.md: increase size of div, rem and conditional branches
12432         
12433 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
12434
12435         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
12436         to cpu spec data.
12437
12438 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
12439
12440         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
12441         (compile_method): Ditto.
12442
12443         * aot-runtime.c (decode_klass_info): Ditto.
12444
12445         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
12446         needed by the code generated by inssel.brg. Also fix a warning.
12447
12448 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
12449
12450         * mini.c: deal with enums that become genericinsts by
12451         being nested in a generic class (bug #79956).
12452
12453 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
12454
12455         * mini.c: match the generic definition to check for
12456         private access with generic types (bug #78431).
12457
12458 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
12459
12460         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
12461         to make life easier for people cross-compiling that insist on not
12462         using scratchbox.
12463
12464 2007-01-17 Mark Mason <mason@broadcom.com>
12465
12466         * inssel-long.brg: patch to deal with mips missing flags
12467         * inssel-long32-mips.brg: implement overflow checks
12468         * insset-mips.brg: implement overflow checks
12469         * mini-mips.h: implement conditional exception handling
12470         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
12471           Remove unused code, minor cleanups.
12472         * exceptions-mips.c: minor cleanups
12473         * mini-ops.h: add mips conditional exception ops
12474         * cpu-mips.md: add mips conditional exception ops
12475
12476         
12477 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
12478
12479         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
12480         to deal with mips missing of flags.
12481
12482 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
12483
12484         * exceptions-ppc.c: execute fault handlers.
12485
12486 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
12487
12488         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
12489
12490 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
12491
12492         * mini.c: handle also floating point values in initialize_array.
12493
12494 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
12495
12496         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
12497         array initialization and make it conditional on the intrins option.
12498
12499 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
12500
12501         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
12502         relocations and put the patch info names close to the enum definition.
12503
12504 2007-01-15 Mark Mason <mason@broadcom.com>
12505
12506         * basic.cs, exceptions.cs: break up large tests to increase debugability.
12507
12508 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
12509
12510         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
12511
12512 2007-01-12  Raja R Harinath  <rharinath@novell.com>
12513
12514         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
12515
12516 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
12517
12518         * Makefile.am: distribute the mips sources.
12519
12520 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
12521
12522         * mini-codegen.h: handle bug #80489 here, by excluding ecx
12523         directly.
12524
12525 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
12526
12527         * cpu-x86.md: back out for now as this triggers other regressions.
12528
12529 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
12530
12531         * cpu-x86.md: force src1 and dest regpair for long shift instructions
12532         to eax:edx, so ecx can't get allocated to them (bug #80489).
12533
12534 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
12535
12536         * mini.c, mini-exceptions.c: enabled running fault handlers
12537         (bug #80469).
12538
12539 2007-01-03  Miguel de Icaza  <miguel@novell.com>
12540
12541         * driver.c: If nothing fail, do not use the string "failed",
12542         because it makes it very annoying to view test result logs on the
12543         web. 
12544
12545 2006-12-30  Miguel de Icaza  <miguel@novell.com>
12546
12547         * debug-debugger.c (mono_debugger_main): Rename "main" to
12548         "main_method" to prevent a warning.
12549
12550         Remove a warning for unused field.
12551
12552 2006-12-28  Martin Baulig  <martin@ximian.com>
12553
12554         * debug-debugger.c
12555         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
12556
12557 2006-12-22  Martin Baulig  <martin@ximian.com>
12558
12559         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
12560         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
12561         seperate `.mdb_debug_info' section, so we can access it from the
12562         debugger even if the binary is stripped.
12563
12564         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
12565         from the `.mdb_debug_info' here to prevent the linker from
12566         removing that section.
12567
12568         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
12569         mdb-debug-info64.s.
12570
12571 2006-12-19  Robert Jordan  <robertj@gmx.net>
12572
12573         * mini-x86: enable the code to return small structures in
12574         registers for FreeBSD as well. Fixes bug #80278.
12575         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
12576
12577 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
12578
12579         * mini-x86.c: align the stack when calling the profiler
12580         function instrumenting the prolog (on OSX).
12581
12582 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
12583
12584         * mini.c: emit a break opcode where Debugger.Break () is called.
12585
12586 2006-12-13  Miguel de Icaza  <miguel@novell.com>
12587
12588         * mini.c (mono_method_to_ir): Provide useful information on this
12589         assert, to prevent others from debugging like I did.
12590
12591 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
12592
12593         * mini.c: enable code which was incorrectly commented
12594         (bug #80235).
12595
12596 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
12597
12598         * mini-x86.c: enable on OSX, too, the code to return small
12599         structures in registers.
12600
12601 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
12602
12603         * mini-x86.c: remove the use of the dynamic code manager here, too.
12604
12605 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
12606
12607         * mini.h, debug-debugger.c, tramp-*.c: fixed 
12608         mono_debugger_create_notification_function() to use
12609         mono_global_codeman_reserve () instead of a dynamic code manager.
12610
12611 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
12612
12613         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
12614         ves_array_element_address() jit icall and use a generated
12615         managed method instead (which is about 4 times faster for a rank 3
12616         array access).
12617
12618 2006-11-29  Mark Mason  <mason@broadcom.com>
12619
12620         * basic-calls.cs: additional tests for passing
12621         structures as function arguments.
12622
12623 2006-11-29  Mark Mason  <mason@broadcom.com>
12624
12625         * mini-mips.h: disable custom exception handling
12626         * mini-mips.c: throw/rethrow should use jalr to call
12627         exception stubs.  Fixed bug with passing structures
12628         by value. More support for tracing floating point
12629         functions.
12630
12631 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
12632
12633         * mini.c: fixed typo in the soft-float ldind.r4 handling
12634         (bug #80086).
12635
12636 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
12637
12638         * mini.c, mini.h, driver.c: added --runtime command line
12639         option to select a different runtime than the autodetected one.
12640         * jit.h: added API for embedders to initialize with a specific
12641         runtime version.
12642
12643 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
12644
12645         * mini.c: handle also boxing of r4 values (bug #80024).
12646
12647 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
12648
12649         * mini-ppc.c: force indirect calls until we reserve
12650         enough address space for all the generated code.
12651
12652 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
12653
12654         * exceptions-arm.c: workaround bugs in the libc definition
12655         of struct ucontext.
12656
12657 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
12658
12659         * inssel.brg: fixes from me and Mark Mason.
12660
12661 2006-11-23  Dick Porter  <dick@ximian.com>
12662
12663         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
12664         semaphore display now we've fixed the initial value
12665
12666 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
12667
12668         * inssel.brg: partially revert the last change to fix the build.
12669
12670 2006-11-21  Mark Mason  <mason@broadcom.com>
12671
12672         * inssel.brg: Add and use compare-and-branch macros to support
12673         architectures that do not have condition code registers (ie. MIPS).
12674         * *-mips.{c,brg,md}: Fix copyright statements
12675
12676 2006-11-20  Mark Mason  <mason@broadcom.com>
12677
12678         * Makefile.am: remove mini-codegen.c from list of MIPS sources
12679         * mini.c: Allow GET_CONTEXT to be specified by the arch port
12680         * mini.h: Added declaration for mono_print_ins()
12681         * mini-codegen.c: added ins_spec initializer for MIPS
12682         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
12683         vreg to be virtual and hreg to be non-virtual.
12684         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
12685         is not yet working/implemented correctly.
12686         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
12687         non-static, fixup calls to print_ins() from other parts in the file.
12688
12689 2006-11-20  Mark Mason  <mason@broadcom.com>
12690
12691         * basic-calls.cs: added tests for passing structures as arguments
12692         to calls.
12693
12694 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
12695
12696         * inssel-long32.brg: optimize signed division by power of two.
12697
12698 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
12699
12700         * mini-arm.c: added support for interworking with thumb code
12701         (mono must be still be built using the ARM instruction encoding).
12702
12703 2006-11-19  Miguel de Icaza  <miguel@novell.com>
12704
12705         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
12706         verifier has different rules for it.   Fixes a few verifier issues
12707         in the test suite.
12708
12709         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
12710         at the end, so people know what happened.
12711
12712 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
12713
12714         * brach-opts.c: in optimize_exception_target() make sure we
12715         are in a catch clause (fixes bug #79871).
12716
12717 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
12718
12719         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
12720         more soft-float support fixes.
12721
12722 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
12723
12724         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
12725         that are passed half on the stack and half in registers.
12726
12727 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
12728
12729         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
12730         more mips integration work from Mark E Mason 
12731         <mark.e.mason@broadcom.com>.
12732
12733 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
12734
12735         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
12736         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
12737         tramp-mips.c: added sources for the mips port, not
12738         integrated in the build yet. Contributed by
12739         Mark E Mason <mark.e.mason@broadcom.com>.
12740
12741 2006-11-14  Neale Ferguson <neale@sinenomine.net>
12742
12743         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
12744
12745 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
12746
12747         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
12748         put the soft-float rules in its own file since it seems to
12749         break s390 compilation.
12750
12751 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
12752
12753         * mini-arm.c: fixed wrnings.
12754
12755 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
12756
12757         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
12758         inssel-arm.brg: ARM support for soft-float.
12759
12760 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
12761
12762         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
12763         loads and stores of 32 bit fp values.
12764
12765 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
12766
12767         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
12768
12769         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
12770         works. Fixes #79852 and #79463.
12771
12772 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
12773
12774         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
12775         more soft-float support WIP and fixes.
12776
12777 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
12778
12779         * mini-arm.c: some VFP updates.
12780
12781 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
12782
12783         * mini-exceptions.c: 0 is a valid local var offset in some
12784         architectures, don't assert (bug #78508).
12785
12786 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
12787
12788         * exceptions-arm.c: fixed off by one error in stack walk code.
12789
12790 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
12791
12792         * mini.h, mini.c: more precise tracking of type load exceptions.
12793
12794 2006-11-03  Robert Jordan  <robertj@gmx.net>
12795
12796         * Makefile.am: [WIN32] Add monow.exe target.
12797         * driver.c: [WIN32] Don't detach the console when debugging.
12798         Fixes bug #79797.
12799         
12800 2006-10-30  Miguel de Icaza  <miguel@novell.com>
12801
12802         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
12803
12804 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
12805
12806         * aot-compiler.c (emit_method_info): Add a case missed earlier.
12807
12808         * driver.c (mini_regression): Fix --regression with AOT.
12809
12810         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
12811
12812 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
12813
12814         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
12815
12816         * mini-sparc.h: Don't use sigaction on sparc/linux.
12817
12818         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
12819
12820         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
12821
12822         * mini-exceptions.c: Add proper include files for getpid ().
12823
12824 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
12825
12826         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
12827         address instead of a MonoJitInfo* to avoid decoding the exception info for the
12828         method.
12829
12830         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
12831         name cache to reduce its size.
12832
12833         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
12834
12835 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
12836
12837         * mini-x86.c: Save/restore the current LMF structure more efficiently using
12838         the mono_lmf TLS variable.
12839
12840         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
12841         trampoline lmf frames.  
12842
12843         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
12844
12845 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
12846
12847         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
12848         the mono_lmf TLS variable.
12849
12850         * mini-exceptions.c: Access the LMF structure through accessors.
12851
12852         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
12853         variable instead of in jit_tls->lmf.
12854
12855         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
12856         
12857         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
12858         trampoline lmf frames.
12859
12860         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
12861
12862 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
12863
12864        * mini.c trace.c mini-x86.c: Revert these too.
12865         
12866        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
12867        signature change.
12868
12869 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
12870
12871         * genmdesc.c: removed now dead code.
12872
12873 2006-10-09  Robert Jordan <robertj@gmx.net>
12874
12875         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
12876
12877 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
12878
12879         * mini.h: do not leave gaps in the opcode values.
12880
12881 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
12882
12883         * jit-icalls.h: flag functions as internal here, too.
12884
12885 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
12886
12887         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
12888         functions with the internal attribute.
12889
12890 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
12891
12892         * aot-compiler.c: fclose the file descriptor in the profile read loop.
12893
12894 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
12895
12896         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
12897         for soft-float.
12898
12899 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
12900
12901         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
12902         tail calls as on other platforms.
12903
12904         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
12905
12906         * iltests.il: Add a few tailcall tests.
12907
12908 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
12909
12910         * driver.c: fix loop for old compilers (bug #79521).
12911
12912 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
12913
12914         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
12915
12916         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
12917
12918         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
12919         metadata without any code.
12920
12921         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
12922         more precise debugging information using gdb.
12923
12924 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
12925
12926         * inssel-ia64.brg: Make the helper methods static.
12927
12928 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
12929
12930         * inssel-x86.brg: make the helper methods static.
12931
12932 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
12933
12934         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
12935
12936 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
12937
12938         * mini.c: updates for monoburg changes.
12939         * inssel.brg: make a few helper functions static as they should.
12940
12941 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
12942
12943         * Makefile.am: Move mini-codegen.c to common_sources.
12944
12945 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
12946
12947         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
12948         instructions.
12949         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
12950         mini-ppc.h: port to use the common local register allocator.
12951
12952 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
12953
12954         * mini.h: Remove the comment too then.
12955
12956 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
12957
12958         * mini.h: put back backend.data which is to be used shortly and
12959         doesn't increase the size of MonoInst. If any 64 bit arch aligned
12960         pointers on 4 byte boundaries it'd have much bigger issues running
12961         and you can ifdef it out anyway.
12962
12963 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
12964
12965         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
12966         MonoInst size by 4 bytes on 64 bit machines.
12967
12968 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
12969
12970         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
12971         replacement with more meaningful field names. Arch maintainers, please
12972         check the assigned names are good enough for your arch.
12973
12974 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
12975
12976         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
12977         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
12978
12979 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
12980
12981         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
12982         relocations and memory requirements, put the optimization flags
12983         definitions in their own file.
12984
12985 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
12986
12987         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
12988
12989         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
12990
12991 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
12992
12993         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
12994
12995 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
12996
12997         * inssel.brg: use the correct function to get the size of an item
12998         in an array, given an element class.
12999         * aot-compiler.c: do not access class->class_size directly.
13000
13001 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
13002
13003         * mini.h, debug-mini.c: added a debugging function to print
13004         info about local variables and arguments in a jitted method.
13005
13006 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
13007
13008         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
13009
13010         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
13011
13012 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
13013
13014         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
13015         inner and outer loops when passing vtypes.
13016
13017 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
13018
13019         * mini-ppc.c: take into account the cpu errata for cache flushing
13020         which caused some random errors (bug #79381).
13021
13022 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
13023
13024         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
13025         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
13026
13027 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
13028
13029         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
13030         loaded.
13031
13032         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
13033         freebsd ports tree.
13034
13035         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
13036         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
13037
13038         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
13039         displacement.
13040
13041 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
13042
13043         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
13044
13045 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
13046
13047         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
13048         macro does not have to be changed during debugging.
13049
13050         * 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>.
13051
13052         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
13053
13054         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
13055         
13056         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
13057         MONO_ARCH_NO_EMULATE_MUL is defined.
13058
13059         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
13060
13061         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
13062
13063         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
13064
13065         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
13066         
13067 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
13068
13069         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
13070         stuff to mini-exceptions.c where it is used.
13071
13072         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
13073         setup code, the real one is in mini-exceptions.c.
13074
13075         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
13076         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
13077         some changes from the freebsd ports tree.
13078
13079         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
13080         constants.
13081         
13082         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
13083
13084 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
13085
13086         * mini.c: on Linux, check for /proc to be mounted
13087         (bug# 79351, novell bug#201204).
13088
13089 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
13090
13091         * mini.c: handle cases where pthread_attr_getstack() behaves
13092         incorrectly (bug #78096).
13093
13094 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
13095
13096         * mini-arm.c: support larger stack frames (bug #79272).
13097
13098 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
13099
13100         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
13101
13102         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
13103         tokens.
13104
13105         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
13106         mono_class_from_name () to find a class from its name.
13107
13108         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
13109
13110 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
13111
13112         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
13113
13114 2006-09-05  Kornel Pal  <kornelpal@gmail.com>
13115
13116         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
13117
13118 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
13119
13120         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
13121         callinfo->trampoline.
13122
13123         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
13124         fixes #79271.
13125         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
13126         future.
13127
13128 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
13129
13130         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
13131
13132 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
13133
13134         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
13135         stats.method_trampolines, it is already done by the generic trampoline code.
13136
13137         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
13138         
13139 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
13140
13141         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
13142
13143         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
13144
13145         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
13146
13147         * mini.c (print_jit_stats): Print mscorlib mempool size too.
13148         
13149         * mini.c (print_jit_stats): Print new stats.
13150
13151         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
13152
13153 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
13154
13155         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
13156         Address on two dimensional arrays. Fixes #78729.
13157
13158         * mini.h (MonoCompile): Add a 'skip_visibility' field.
13159
13160         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
13161         a method.
13162
13163         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
13164
13165         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
13166         #79130.
13167         
13168         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
13169         a race condition.
13170         (mini_get_ldelema_ins): Ditto.
13171
13172 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
13173
13174         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
13175         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
13176         Fixes #79213.
13177
13178 2006-08-29 Neale Ferguson <neale@sinenomine.net>
13179
13180         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
13181         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
13182
13183         * exceptions-s390x.c: Cosmetic change.
13184
13185         * tramp-s390.c: Fix warning.
13186
13187         * cpu-s390.md: Correct length of mul_imm.
13188
13189 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
13190
13191         * aot-compiler.c: added binary writer with ELF backend
13192         implementation (only on Linux/x86 for now).
13193
13194 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
13195
13196         * Makefile.am: Don't run net 2.0 AOT tests.
13197
13198         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
13199         (mono_compile_assembly): Skip net 2.0 assemblies as well.
13200
13201         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
13202
13203 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
13204
13205         * aot-compiler.c: simplified and refactored the asm-writing code
13206         to allow different backends.
13207
13208 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
13209
13210         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
13211
13212         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
13213         little. Share patches of type TYPE_FROM_HANDLE as well.
13214
13215         * mini.c (mono_patch_info_equal): New helper function.
13216         (mono_patch_info_hash): Ditto.
13217
13218         * aot-compiler.c (emit_method_code): Fix s390 build.
13219
13220         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
13221         is not handled because it is stored as a flag and not as a type ctor. Fixes
13222         #79016.
13223
13224 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
13225
13226         * aot-compiler.c: Fix computation of GOT slot statistics.
13227         
13228         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
13229         Also remove support for not PIC AOT.
13230
13231         * mini.h: Bump AOT file format version.
13232
13233         * objects.cs: Add a test for #78990.
13234
13235         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
13236         (peter.dettman@iinet.net.au). Fixes #79087.
13237
13238         * basic-long.cs: Add a test for the above.
13239
13240 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
13241
13242         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
13243         
13244         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
13245         code somewhat.
13246
13247 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
13248
13249         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
13250         exceptions.
13251
13252 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
13253
13254         * mini.c: Don't verify COM proxy invoke calls
13255         
13256
13257 2006-08-10  Dick Porter  <dick@ximian.com>
13258
13259         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
13260         which process is holding semaphores locked.
13261
13262 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
13263
13264         * mini-ia64.c mini-amd64.c: Fix #79027.
13265
13266         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
13267
13268         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
13269
13270         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
13271         implicit arguments in a vararg call. Fixes #79027.
13272
13273 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
13274
13275         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
13276         (mono_get_array_new_va_signature): Ditto.
13277
13278 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
13279
13280         * aot-runtime.c: Call init_plt lazily.
13281
13282         * inssel-long.brg: Fix unsigned long->int conversion.
13283
13284         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
13285
13286         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
13287         that most data is now in the .rss/.data section.
13288
13289 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
13290
13291         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
13292
13293         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
13294
13295         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
13296
13297         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
13298
13299         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
13300         virtual call. Fixes #79010.
13301
13302         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
13303         and use the result as the this argument in the real call.
13304
13305         * generics.2.cs: Add a new test for #79010.
13306         
13307 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
13308
13309         * mini-x86.c: Fix a warning.
13310
13311         * aot-compiler.c: Add a bunch of statistics.
13312
13313         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
13314
13315 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
13316
13317         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
13318
13319 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
13320
13321         * 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>.
13322
13323 2006-07-13  Miguel de Icaza  <miguel@novell.com>
13324
13325         * mini.c (mono_method_to_ir): Obtain the original method in the
13326         CIL stream and use this to perform validation.
13327
13328         Fixed: #78816
13329
13330 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
13331
13332         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
13333         (mono_arch_call_opcode): Ditto.
13334
13335         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
13336         #78826.
13337
13338         * mini.c (mono_patch_info_dup_mp): New helper function.
13339         
13340         * aot-compiler.c (compile_method): Fix some of the memory allocated during
13341         compilation. Fixes #78827.
13342
13343 2006-07-18  Kornel Pal  <kornelpal@gmail.com>
13344
13345         * declsec.c: Use original security informations for
13346           MONO_WRAPPER_MANAGED_TO_MANAGED.
13347
13348 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
13349
13350         * mini.c: Allow Com Interop methods/classes and
13351         don't verify COM wrapper calls
13352         
13353
13354 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
13355
13356         * inssel-long32.brg: Fix long->i4 checked conversion.
13357
13358         * exceptions.cs: Add a test for the above.
13359
13360 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
13361
13362         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
13363
13364         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
13365         leaks.
13366
13367         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
13368         #78775.
13369
13370 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
13371
13372         * mini.c: Fix solaris/x86 exception handling.
13373
13374         * Makefile.am: Get rid of $(ICU_LIBS).
13375
13376 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
13377
13378         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
13379         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
13380         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
13381
13382         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
13383
13384         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
13385         this function causes a SIGSEGV.
13386
13387 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
13388
13389         * mini.c: Remove unused solaris/x86 includes.
13390
13391 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
13392
13393         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
13394
13395 2006-06-20  Jb Evain  <jbevain@gmail.com>
13396
13397         * cpu-g4.md: fix max length of start_handler instruction.
13398
13399 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
13400         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
13401
13402 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
13403         * ssa.c: Fixed bug 78653 for SSA based deadce.
13404         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
13405         MonoInst.flags, used in SSA based deadce.
13406         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
13407         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
13408
13409 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
13410
13411         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
13412         it can end up using non executable memory on ppc64 systems
13413         running ppc32 userspace (fix from Johannes Berg).
13414
13415 2006-06-14  Dick Porter  <dick@ximian.com>
13416
13417         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
13418         4.1.1
13419
13420 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
13421         * mini.c: Made so that inline is locally disabled if it would
13422         trigger a .cctor, because too many apps depend on this behavior
13423         (which seems to be also the one of the MS CLR).
13424
13425 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
13426
13427         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
13428         No idea why this worked before.
13429
13430         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
13431         which branch to outer exception clauses since they could skip the
13432         inner finally clauses. Fixes #78633.
13433
13434         * exceptions.cs: Add a test for the above.
13435
13436         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
13437         Fixes #78629.
13438
13439         * iltests.il: Add a test for the above.
13440
13441 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
13442
13443         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
13444         after the end of a try bblock, to prevent asserts in mini_method_compile ().
13445
13446         * iltests.il: Add a test for the above.
13447
13448 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
13449
13450         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
13451         
13452         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
13453         methods as instrinsics.
13454
13455 2006-06-09  Wade Berrier <wberrier@novell.com>
13456
13457         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
13458         (simple-cee-ops.h ssapre-mini-ops.h)
13459
13460 2006-06-09  Neale Ferguson <neale@sinenomine.net>
13461
13462         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
13463         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
13464         instruction).
13465         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
13466         * cpu-s390x.md: Fix max. length values for a couple of instructions.
13467
13468 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
13469
13470         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
13471
13472 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
13473
13474         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
13475         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
13476         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
13477         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
13478         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
13479         of opcodes, so that bug 78549 should not happen again.
13480         * ssapre.c: Updated to use the renamed files.
13481
13482 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
13483
13484         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
13485         in OP_ATOMIC_EXCHANGE_I4.
13486
13487 2006-06-07  Wade Berrier <wberrier@novell.com>
13488
13489         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
13490         in mono_debugger_create_notification_function)
13491
13492 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
13493
13494         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
13495         
13496         * mini.c (type_from_stack_type): Disable some changes which do not
13497         seem to work.
13498
13499         * driver.c: Reenable opts.
13500
13501         * mini.h (MonoStackSlot): New structure to keep track of the verification state
13502         of the evaluation stack.
13503         
13504         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
13505         evaluation stack trace at entry to the bblock.
13506
13507         * mini.c (merge_stacks): New function to perform verification of stack merges.
13508         Turned off by default.
13509
13510         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
13511         STACK_MP.
13512         
13513 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
13514
13515         * local-propagation.c: Fixed bug 78549.
13516
13517 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
13518
13519         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
13520
13521 2006-06-02  Miguel de Icaza  <miguel@novell.com>
13522
13523         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
13524         tramp-arm.c, tramp-ia64.c
13525         (mono_debugger_create_notification_function): Update signature to
13526         new signature and use new protocol for creating the notification
13527         function.  
13528
13529         Should fix the build.
13530
13531 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
13532
13533         * exceptions-ppc.c (mono_jit_walk_stack)
13534         (ves_icall_get_frame_info): Fix the build
13535
13536 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
13537
13538         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
13539
13540 2006-05-31  Raja R Harinath  <rharinath@novell.com>
13541
13542         * il2tests.2.il: New file for generics CIL tests.  Add test for
13543         #78019.
13544         * Makefile.am: Update.
13545
13546         Fix #78019
13547         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
13548         to nullable types.
13549
13550 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
13551
13552         * aliasing.c: Fixed bug 78311.
13553
13554 2006-05-29  Martin Baulig  <martin@ximian.com>
13555
13556         * mini-exceptions.c (mono_find_jit_info): When computing the
13557         native offset, check whether we're actually inside the method's
13558         code; call mono_debug_print_stack_frame() to format the frame.
13559         (ves_icall_System_Exception_get_trace): Call
13560         mono_debug_print_stack_frame() to format the stack frame.
13561         (ves_icall_get_trace): Update to the new debugging API.
13562         (mono_jit_walk_stack_from_ctx): Likewise.
13563         (ves_icall_get_frame_info): Likewise.
13564
13565         * mini.c (get_method_from_ip): Use the new debugging API.
13566         (mono_print_method_from_ip): Likewise.
13567
13568         * exceptions-ppc.c
13569         (mono_jit_walk_stack): Use the new debugging API.
13570         (ves_icall_get_frame_info): Likewise.   
13571
13572 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
13573
13574         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
13575
13576 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
13577
13578         * mini.c: Added "limitator" to inline for debugging.
13579
13580 2006-05-24  Martin Baulig  <martin@ximian.com>
13581
13582         * debug-debugger.c (mono_debugger_init): Create a private,
13583         malloc()-based code manager for the notification function and
13584         intentionally leak it on exit.  This fixes the crash-on-exit race
13585         condition.
13586
13587         * tramp-amd64.c
13588         (mono_debugger_create_notification_function): Added
13589         `MonoCodeManager *' argument.
13590
13591         * tramp-x86.c
13592         (mono_debugger_create_notification_function): Added
13593         `MonoCodeManager *' argument.
13594
13595 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
13596
13597         * aliasing.c: Fixed 64 bit issue.
13598         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
13599         default since all known bugs are fixed (one more time!).
13600
13601 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
13602
13603         * mini.c: write barrier support.
13604
13605 2006-05-23  Martin Baulig  <martin@ximian.com>
13606
13607         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
13608         check at the top of the file.
13609
13610 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
13611
13612         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
13613         reverting changes without reason and without changelog entries.
13614
13615 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
13616
13617         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
13618         to a few opcodes. Fixes #78439.
13619
13620         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
13621         consistency with other archs.
13622
13623         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
13624
13625 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
13626
13627         * debug-debugger.c: fix the build.
13628
13629 2006-05-17  Martin Baulig  <martin@ximian.com>
13630
13631         * debug-debugger.c
13632         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
13633         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
13634         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
13635         (debugger_attach): Call GC_mono_debugger_add_all_threads().
13636
13637 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
13638
13639         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
13640
13641 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
13642
13643         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
13644         MONO_TYPE_GENERICINST.
13645         
13646         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
13647         MONO_TYPE_GENERICINST.
13648
13649 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
13650
13651         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
13652         #78325.
13653
13654 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
13655
13656         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
13657         mempool.
13658         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
13659
13660 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
13661
13662         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
13663         mono_trace_cleanup ().
13664
13665         * iltests.il: Fix problem with the newly added test.
13666
13667         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
13668         due to register constraints, free up the previous hreg. Fixes #78314.
13669
13670         * iltests.il: Add new test for #78314.  
13671
13672         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
13673         Interlocked.Add. Fixes #78312.
13674
13675         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
13676         
13677 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
13678
13679         * inssel.brg (mini_emit_virtual_call): Fix a warning.
13680
13681 2006-05-05  Martin Baulig  <martin@ximian.com>
13682
13683         * debug-mini.c (mono_debug_open_block): New method.
13684
13685         * mini-amd64.c
13686         (mono_arch_output_basic_block): Call mono_debug_open_block() at
13687         the beginning of each basic block.
13688
13689         * mini-x86.c
13690         (mono_arch_output_basic_block): Call mono_debug_open_block() at
13691         the beginning of each basic block.
13692
13693 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
13694
13695         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
13696         default until I understand why they break the build on amd64.
13697
13698 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
13699
13700         * mini.c (mini_cleanup): Call mono_cleanup ().
13701
13702         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
13703         errors.
13704
13705 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
13706
13707         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
13708         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
13709         default since all known bugs are fixed, and I cannot reproduce bug
13710         77944... I'm asking Matt Hargett to test again after this commit.
13711
13712 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
13713
13714         * mini-codegen.c: Fixed typo that thrashed inline.
13715
13716 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
13717
13718         * dominators.c (compute_dominators): Avoid using a worklist since
13719         it is not correct in some cases. Instead, iterate over all bblocks as
13720         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
13721
13722 2006-04-28  Miguel de Icaza  <miguel@novell.com>
13723
13724         * mini.c (mono_jit_compile_method_inner): Use
13725         mono_prepare_exception_from_error that resets the value
13726         internally.
13727
13728 2006-04-27  Miguel de Icaza  <miguel@novell.com>
13729
13730         * mini.c: Move the mini_loader_error_to_exception to metadata. 
13731         
13732 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
13733
13734         * aliasing.c: Fixed bug 78210.
13735
13736 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
13737
13738         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
13739         default until all their problems (or the ones they trigger) are fixed.
13740
13741 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
13742
13743         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
13744         
13745         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
13746         as loaded only after resolving patches since that could invoke the same method.
13747
13748         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
13749
13750         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
13751         functions.
13752
13753         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
13754         AOT loader.
13755
13756         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
13757         stack.
13758
13759         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
13760         made from AOT code through the PLT table.
13761
13762         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
13763         holding the plt offset when a call is made to the aot plt trampoline.
13764         
13765 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
13766
13767         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
13768         amd64 AOT support.
13769
13770         * Makefile.am (common_sources): Fix build breakage.
13771
13772         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
13773         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
13774         intra-assembly calls if possible.
13775         
13776         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
13777
13778         * mini-trampolines.c: Handle PLT entries.
13779
13780         * mini.c: Avoid creating a GOT var for calls.
13781
13782         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
13783         from mscorlib code.
13784
13785         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
13786         from mscorlib code.
13787
13788         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
13789         AOT code.       
13790
13791         * mini.h: Bump AOT file format version.
13792         
13793         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
13794         covers more cases.
13795
13796 2006-04-25  Martin Baulig  <martin@ximian.com>
13797
13798         * driver.c: Disable copyprop, consprop and inline when running
13799         inside the debugger.
13800
13801 2006-04-25  Martin Baulig  <martin@ximian.com>
13802
13803         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
13804         with `get_current_thread' and added `detach'.
13805         (MonoDebuggerMetadataInfo): Added `thread_size',
13806         `thread_tid_offset', `thread_stack_ptr_offset' and
13807         `thread_end_stack_offset'.
13808
13809 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
13810
13811         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
13812         aot-runtime.c.
13813
13814         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
13815         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
13816
13817         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
13818
13819         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
13820
13821         * aot.c: Add support for ADJUSTED_IID.  
13822
13823 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
13824
13825         * aot.c (emit_method_order): Don't align method_order_end.
13826
13827         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
13828         the interface ID changes.
13829
13830 2006-04-21  Dick Porter  <dick@ximian.com>
13831
13832         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
13833         cleaning up a thread.  Fixes the new part of bug 77470.
13834
13835 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
13836
13837         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
13838         to managed wrapper.
13839                      
13840 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
13841
13842         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
13843         
13844         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
13845         SIGSEGV. Fixes #78072.
13846
13847         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
13848         unregister our SIGABRT handler.
13849
13850 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
13851
13852         * mini.c: Disabled inline where it can alter the call stack in a
13853         way visible from managed code.
13854         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
13855         default.
13856
13857 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
13858
13859         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
13860         on other platforms. Fixes #78089.
13861
13862 2006-04-13  Martin Baulig  <martin@ximian.com>
13863
13864         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
13865         determine whether we're inside the debugger.
13866
13867         * debug-debugger.h
13868         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
13869
13870 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
13871
13872         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
13873         handler clauses. Fixes #78024.
13874
13875         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
13876         in the CALL_MEMBASE opcodes. Fixes #78088.
13877         (mono_arch_get_vcall_slot_addr): Ditto.
13878
13879 2006-04-10  Martin Baulig  <martin@ximian.com>
13880
13881         * debug-debugger.c: The thread handling code has now been moved
13882         into ../metadata/threads.c.
13883
13884 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
13885
13886         * driver.c (mono_main): Fix --with-gc=none build.
13887
13888         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
13889         (mono_spillvar_offset_float): Ditto.
13890         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
13891         hreg, not when its !global, since on ia64, there is a third category: stacked
13892         registers.      
13893
13894 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
13895
13896         * mini.c: set MonoInst->klass for load field address and a few other
13897         places.
13898
13899 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
13900
13901         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
13902
13903 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
13904
13905         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
13906         the branch opt changes.
13907
13908 2006-04-06  Dick Porter  <dick@ximian.com>
13909
13910         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
13911         
13912         * wapihandles.c (mini_wapi_seminfo): 
13913         * driver.c (mono_main): Add semaphore info option
13914
13915 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
13916
13917         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
13918         branch optimization changes. Fixes #78009.
13919
13920 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
13921
13922         * mini.c: ignore accessibility of methods in managed->native wrappers.
13923
13924 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
13925
13926         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
13927         
13928         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
13929
13930 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
13931
13932         * mini.c: Modify the branch optimizations to preserve the invariant that
13933         the entries inside the in_bb and out_bb arrays are unique.
13934         (mono_unlink_bblock): Avoid creation of new arrays.
13935
13936 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
13937
13938         * mini.c (mono_unlink_bblock): Fix regression caused by previous
13939         change (#77992).
13940
13941 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
13942
13943         * mini.c (optimize_branches): Remove the "optimizations" in
13944         the cbranch1/cbranch2 -> branch cases which were causing several
13945         problems in the past. Fixes #77986.
13946
13947 2006-03-31  Chris Toshok  <toshok@ximian.com>
13948
13949         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
13950         default optimizations :(
13951
13952 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
13953
13954         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
13955         branch.
13956
13957 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
13958
13959         * local-propagation.c: Added comments to structs and removed
13960         "Mono" prefixes from local tree mover types.
13961
13962 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
13963
13964         * Makefile.am (arch_sources): Define this for each architecture so 
13965         libmono_la_SOURCES is defined in one place.
13966
13967 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
13968
13969         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
13970         from handles/.
13971
13972 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
13973
13974         * driver.c: print the GC name supplied by configure.
13975
13976 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
13977
13978         * local-propagation.c: Added tree mover, and moved here all the
13979         local propagation code from mini.c
13980         * mini.c: Added support for treeprop, and moved all the local
13981         propagation code to local-propagation.c
13982         * mini.h: Added support for treeprop
13983         * driver.c: Added support for treeprop, enabled consprop, copyprop,
13984         treeprop, inline and deadce by default
13985         * Makefile.am: Added local-propagation.c
13986
13987 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
13988
13989         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
13990
13991 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
13992
13993         * debug-debugger.c: make it compile without the Boehm GC.
13994
13995 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
13996
13997         * mini.c: fixed issue with mismatch when an icall is registered
13998         with multiple names but same address.
13999
14000 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
14001
14002         * declsec.c, mini-exceptions.c: use write barrier to set reference
14003         fields of managed objects.
14004
14005 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
14006
14007         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
14008         (can_access_internals): Fix a warning.
14009
14010         * mini.c (print_method_from_ip): Rename this to 
14011         mono_print_method_from_ip so it gets exported.
14012
14013         * trace.c: Deal with strings inside StringBuilder's containing garbage
14014         and fix memory leaks. Fixes #77848.
14015
14016 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
14017
14018         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
14019         fixes #77787.
14020
14021 2006-03-16 Neale Ferguson <neale@sinenomine.net>
14022         
14023         * mini-s390.c: Remove OP_X86_TEST_NULL.
14024
14025 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
14026
14027         * mini.c: use the correct GetHashCode() for the moving collector.
14028
14029 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
14030
14031         * liveness.c: Regalloc spill cost tuning.
14032
14033 2006-03-15 Neale Ferguson <neale@sinenomine.net>
14034         
14035         * mini-s390x.h: Correct S390_LONG macro.
14036
14037         * mini-s390x.c: Cleanup unused code.
14038
14039 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
14040
14041         * jit-icalls.h: New file.
14042
14043         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
14044         icalls and include that instead of including jit-icalls.c.
14045
14046         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
14047         OP_X86 opcodes.
14048
14049 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
14050
14051         * mini.c: when checking for member accessibility, also check for
14052         friend assemblies and for explicit interface implementations.
14053
14054 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
14055
14056         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
14057
14058         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
14059
14060         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
14061         common cases are done first.    
14062
14063         * mini-ops.h: Only define platform specific opcodes on the given platform.
14064
14065         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
14066         branch.
14067         
14068 2006-03-14  Martin Baulig  <martin@ximian.com>
14069
14070         Revert Paolo's change from r57348:
14071
14072         * mini.h: don't use gboolean for bitfields.
14073         * mini.c: verifier changes for fields and methods accessibility.
14074
14075 2006-03-13  Neale Ferguson <neale@sinenomine.net>
14076
14077         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
14078
14079         * mini-s390x.c: Fix conv_r_un.
14080
14081         * cpu-s390, cpu-s390x.md: Fix lengths.
14082
14083 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
14084
14085         * mini.c: nested types have access to all the nesting
14086         levels, not just the enclosing types.
14087
14088 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
14089
14090         * mini.c: added a few more verification checks.
14091
14092 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
14093
14094         * liveness.c: Merge optimizations from the linear-il branch.
14095
14096 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
14097
14098         * mini-ia64.c (emit_call): Add a comment.
14099
14100         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
14101
14102         * tramp-ia64.c: Fix some warnings.
14103
14104 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
14105
14106         * mini.h: don't use gboolean for bitfields.
14107         * mini.c: verifier changes for fields and methods accessibility.
14108
14109 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
14110
14111         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
14112         lazy icall wrapper changes.
14113
14114         * dominators.c: Replace all the dominator algorithms with faster
14115         ones from the linear-il branch.
14116
14117         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
14118         the mempool.
14119
14120         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
14121         common cases are done first.
14122
14123         * mini-amd64.c: Fix some warnings.
14124
14125         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
14126         from the mempool.
14127
14128         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
14129         added code.
14130
14131         * mini.h: Add a missing prototype.
14132
14133 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
14134
14135         * mini.c: Compile icall wrappers lazily.
14136
14137         * mini-codegen.c: Use printf instead of g_print since its much faster.
14138
14139         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
14140         function.
14141
14142         * mini.c (optimize_branches): Cache the negative result from 
14143         remove_block_if_useless ().
14144
14145         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
14146         Also fix some bblock linking issues.
14147
14148         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
14149         assembly files.
14150
14151         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
14152
14153         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
14154         accessed fields first, for better cache behavior.
14155         
14156 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
14157
14158         * mini.c: speedup IList<T> array accesses.
14159
14160 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
14161
14162         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
14163         inline_costs counter. Fixes #77190.
14164
14165 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
14166
14167         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
14168         trace messages. Fixes #77706.
14169
14170 2006-03-04  Martin Baulig  <martin@ximian.com>
14171
14172         * tramp-amd64.c, tramp-x86.c
14173         (mono_debugger_create_notification_function): Use
14174         mono_global_codeman_reserve() to allocate a buffer at runtime and
14175         return it.
14176
14177         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
14178
14179         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
14180         notification function at runtime and then call `initialize' in the
14181         `MONO_DEBUGGER__debugger_info' vtable.
14182
14183 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
14184
14185         * iltests.il: Fix a visibility problem.
14186
14187 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
14188
14189         * driver.c, mini.c: add hooks for the counters API.
14190
14191 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
14192
14193         * driver.c: show disabled options.
14194
14195 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
14196
14197         * linear-scan.c: always use cost-driven selection.
14198
14199 2006-02-28  Raja R Harinath  <rharinath@novell.com>
14200
14201         * jit-icalls.c (helper_compile_generic_method): Revert change from
14202         2006-02-24.
14203
14204 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
14205
14206         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
14207
14208 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
14209
14210         * inssel.brg: style fixes, mostly to force the updated monoburg
14211         to run for people using svn.
14212
14213 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
14214
14215         * mini.c: match monoburg changes.
14216
14217 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
14218
14219         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
14220         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
14221         declaration in the header file.
14222
14223 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
14224
14225         * helpers.c: reduce relocations and mem usage.
14226
14227 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
14228
14229         * mini.h, mini-codegen.c: disable logging features if
14230         requested by configure.
14231
14232 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
14233
14234         * mini.c: tiny verifier changes.
14235
14236 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
14237
14238         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
14239         cpu-pentium.md: stack alignment changes for osx/x86,
14240         partially from Geoff Norton <gnorton@customerdna.com>.
14241
14242 2006-02-24  Raja R Harinath  <harinath@gmail.com>
14243
14244         * jit-icalls.c (helper_compile_generic_method): Update to changes
14245         in metadata/class.c.
14246
14247 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
14248         
14249         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
14250         
14251         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
14252         interface calls with large offsets.
14253
14254 2006-02-23  Raja R Harinath  <rharinath@novell.com>
14255
14256         * jit-icalls.c (helper_compile_generic_method): Document the
14257         special-case we depend on so that we can inflate the method twice
14258         with the same context with no bad side-effects.
14259
14260 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
14261
14262         * mini-x86.c, mini-amd64.c: fix for case when xen support
14263         is disabled.
14264
14265 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
14266
14267         * mini-x86.c, mini-amd64.c: generate code to access tls items
14268         in a faster way for Xen systems.
14269
14270 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
14271
14272         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
14273         updates and compilation fixes for the OSX/x86 port, mostly from
14274         Geoff Norton <gnorton@customerdna.com>.
14275
14276 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
14277
14278         * inssel.brg: faster interface call implementation
14279         to sync with the interface_offsets MonoVTable changes.
14280
14281 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
14282
14283         * mini.c: more verification checks.
14284
14285 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
14286
14287         * mini.c: added a few more verification checks.
14288
14289 2006-02-17      Neale Ferguson <neale@sinenomine.net>
14290
14291         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
14292         facility on the processor and use it if available.
14293
14294 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
14295
14296         * driver.c, aot.c, mini.c: throw exception if the IL code is
14297         invalid or unverifiable.
14298
14299 2006-02-17  Raja R Harinath  <rharinath@novell.com>
14300
14301         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
14302         m.StructField.
14303
14304 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
14305
14306         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
14307
14308 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
14309
14310         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
14311         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
14312         handling of instantiated generic valuetypes.
14313
14314 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
14315
14316         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
14317         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
14318         instead.
14319
14320         * generics.2.cs: Revert the nullable reftypes tests.
14321
14322 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
14323
14324         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
14325         using __builtin_frame_address (1) as it doesn't work in the presence
14326         of optimizations. Hopefully fixes #77273.
14327
14328         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
14329         -> generics.cs change as it doesn't work with some automake versions.
14330
14331 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
14332
14333         * mini.c: handle systems that sue a different way to
14334         retrieve the stack address of the current thread.
14335
14336 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
14337
14338         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
14339         it specially in the makefile.
14340
14341         * generics.2.cs: Add tests for nullable reference types.
14342
14343 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
14344
14345         * mini.c: always handle the case when mono_jit_init()
14346         is called in a thread different from the main thread,
14347         confusing libgc (bug #77309).
14348
14349 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
14350
14351         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
14352
14353 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
14354
14355         * mini.c: change optimize_branches () to use a single loop
14356         and introduce a new optimization to simplify some range checks.
14357
14358 2006-02-03  Martin Baulig  <martin@ximian.com>
14359
14360         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
14361         and merged with debugger_thread_manager_add_thread().
14362         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
14363         inform the debugger about the main thread.
14364
14365 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
14366
14367         * basic.cs: Add test for div.un/rem.un constant folding.
14368
14369 2006-02-03  Neale Ferguson <neale@sinenomine.net>
14370
14371         * cpu-s390x.md: correct int_xor_imm length
14372
14373 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
14374
14375         * generics.2.cs: New test for #77442.
14376
14377         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
14378         #77442.
14379
14380 2006-02-02  Martin Baulig  <martin@ximian.com>
14381
14382         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
14383         <mono/metadata/mono-debug-debugger.h>   
14384
14385         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
14386
14387 2006-02-02  Martin Baulig  <martin@ximian.com>
14388
14389         * debug-debugger.h: New header file for debug-debugger.c.
14390
14391         * debug-debugger.c: Big API cleanup; don't run the managed Main()
14392         function is a separate thread anymore; add support for attaching.
14393
14394 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
14395
14396         * tramp-x86.c: Fix a warning.
14397
14398 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
14399
14400         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
14401         on very large methods.
14402
14403         * aot.c (load_patch_info): Fix a warning.
14404
14405 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
14406
14407         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
14408         mini-ops.h: alu membase optimizations.
14409
14410 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
14411
14412         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
14413         to speedup StringBuilder.
14414
14415 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
14416
14417         * dominators.c (mono_compute_natural_loops): Fix detection of
14418         loop body start blocks.
14419
14420         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
14421
14422 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
14423
14424         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
14425         #75145.
14426
14427 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
14428
14429         * aliasing.c: Fixed aliasing issue on 64 bit archs.
14430
14431 2006-01-25  Martin Baulig  <martin@ximian.com>
14432
14433         * debug-debugger.c: Moved the `MonoDebuggerManager' and
14434         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
14435         started to cleanup this file a little bit.
14436
14437 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
14438
14439         * mini.c: optimize a codepath frequently happening in generics code.
14440
14441 2006-01-23  Martin Baulig  <martin@ximian.com>
14442
14443         * Makefile.am: Only compile debug-debugger.c on supported platforms.
14444
14445         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
14446         functions directly.
14447
14448         * driver.c: debug-debugger.c is only available if
14449         `MONO_DEBUGGER_SUPPORTED' is defined.   
14450
14451 2006-01-23  Martin Baulig  <martin@ximian.com>
14452
14453         * debug-debugger.c: Only enable this on platforms where the Mono
14454         Debugger is working (x86 and x86_64).
14455
14456 2006-01-21  Martin Baulig  <martin@ximian.com>
14457
14458         The Mono Debugger is now using the normal `mono' instead of the
14459         `mono-debugger-mini-wrapper' when executing managed code.
14460
14461         * debug-debugger.c: New file; previously known as
14462         debugger/wrapper/wrapper.c.
14463
14464         * debug-mini.c (mono_init_debugger): Removed.
14465
14466         * driver.c (mono_main): Added new `--inside-mdb' command line
14467         argument which is used when running inside the debugger.
14468
14469 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
14470
14471         * liveness.c (mono_analyze_liveness): Remove some unused data
14472         structures.
14473
14474 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
14475
14476         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
14477
14478 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
14479
14480         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
14481         depends on implementation details of monobitset.
14482
14483         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
14484         Fixes #77271.
14485
14486 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
14487
14488         * liveness.c: Update after monobitset changes.
14489
14490 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
14491
14492         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
14493
14494 2006-01-11 Neale Ferguson <neale@sinenomine.net>
14495
14496         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
14497
14498         * mini-s390x.c: Remove warning messages.
14499
14500 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
14501
14502         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
14503
14504 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
14505
14506         * generics.2.cs: Add ldelem/stelem_any test.
14507
14508 2006-01-10 Neale Ferguson <neale@sinenomine.net>
14509
14510         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
14511
14512 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
14513
14514         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
14515         
14516 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
14517
14518         * generics.2.cs: Reenable vtype tests.
14519
14520         * inssel-x86.brg: Remove an icorrect valuetype rule.
14521
14522 2006-01-06 Neale Ferguson <neale@sinenomine.net>
14523
14524         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
14525         initial support for OP_ABS.
14526
14527 2006-01-05 Neale Ferguson <neale@sinenomine.net>
14528
14529         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
14530
14531 2006-01-05 Neale Ferguson <neale@sinenomine.net>
14532
14533         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
14534         conversion and implement LADD/LSUB.
14535
14536         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
14537         architectures.
14538
14539 2006-01-05 Neale Ferguson <neale@sinenomine.net>
14540
14541         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
14542
14543         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
14544         architectures.
14545
14546 2006-01-05 Neale Ferguson <neale@sinenomine.net>
14547
14548         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
14549         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
14550         (stack walk problem).
14551
14552 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
14553
14554         * aot.c (mono_aot_load_method): Fix a warning.
14555
14556 2006-01-03  Neale Ferguson <neale@sinenomine.net>
14557
14558         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
14559
14560 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
14561
14562         * iltests.il: Add test for #77148.
14563
14564         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
14565         #77148.
14566
14567 2006-01-03  Neale Ferguson <neale@sinenomine.net>
14568
14569         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
14570
14571 2006-01-03  Neale Ferguson <neale@sinenomine.net>
14572
14573         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
14574         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
14575
14576         * basic-long.cs: Add lconv-to-r4/r8 tests.
14577
14578 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
14579
14580         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
14581
14582         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
14583         here as on other archs.
14584
14585 2005-12-29 Neale Ferguson <neale@sinenomine.net>
14586
14587         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
14588
14589 2005-12-29 Neale Ferguson <neale@sinenomine.net>
14590
14591         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
14592         
14593         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
14594
14595         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
14596         instrument_prolog; Add memory_barrier instruction.
14597
14598 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
14599
14600         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
14601
14602 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
14603
14604         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
14605
14606         * aliasing.c inssel.brg: Fix warnings.
14607
14608         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
14609         could skip initialization of some parts of memory.
14610
14611         * mini.c mini-ia64.c: Fix warnings.
14612
14613         * inssel-sparc.brg: Add an implementation of lneg which actually works.
14614
14615 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
14616
14617         * aliasing.c (mono_build_aliasing_information): Add a workaround for
14618         a crash seen on sparc.
14619
14620         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
14621         
14622         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
14623
14624 2005-12-21 Neale Ferguson <neale@sinenomine.net>
14625
14626         * mini-ops.h: Add s390_backchain instruction
14627
14628         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
14629
14630         * cpu-s390.md: Add s390_backchain instruction
14631
14632         * mini-s390.c: Significant ABI changes
14633
14634         * mini-s390.h: Cater for zero length structures
14635
14636 2005-12-20 Neale Ferguson <neale@sinenomine.net>
14637
14638         * mini-s390.c: ABI fixes
14639
14640         * inssel-s390.brg: Remove debug statements
14641
14642         * cpu-s390.md: Fix length of ATOMIC_xx operations
14643
14644 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
14645
14646         * basic-float.cs: Add float<->long conversion tests.
14647
14648 2005-12-16 Neale Ferguson <neale@sinenomine.net>
14649
14650         * mini-s390.c: Fix LOCALLOC processing.
14651
14652         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
14653
14654 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
14655
14656         * iltests.il: Add tests for some opcodes not covered by the other
14657         tests.
14658
14659 2005-12-15 Neale Ferguson <neale@sinenomine.net>
14660
14661         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
14662         register loading for Tail processing; Correct trace output.
14663
14664         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
14665
14666         * cpu-s390.md: Correct size of jmp instruction. 
14667
14668 2005-12-13 Neale Ferguson <neale@sinenomine.net>
14669
14670         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
14671
14672 2005-12-13 Neale Ferguson <neale@sinenomine.net>
14673
14674         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
14675           Bring s390 up to current level.
14676
14677 2005-12-12  Zltan Varga  <vargaz@gmail.com>
14678
14679         * generics.2.cs: Disable the newly added tests as they do not work yet.
14680         
14681         * generics.2.cs: Add valuetype tests.
14682
14683 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
14684
14685         * basic-long.cs: Add i4->u8 test.
14686
14687         * objects.cs: Add tests for JIT intrinsic.
14688
14689         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
14690         optimizations lost by a mistake.
14691
14692 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
14693
14694         * basic-long.cs: Remove a test moved to objects.cs.
14695
14696         * arrays.cs: Add more array tests.
14697
14698 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
14699
14700         * arrays.cs: Add new tests for multi-dimensional arrays.
14701
14702 2005-12-06  Raja R Harinath  <rharinath@novell.com>
14703
14704         * Makefile.am (test_sources2): Add generics.2.cs.
14705         (EXTRA_DIST): Add test_sources2.
14706
14707 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
14708
14709         Support for boxing and unboxing nullable types as well as the
14710         isinst operation on nullables, per the CLI ammendment.
14711
14712         * inssel.brg (CEE_ISINST): Special case for nullable
14713
14714         * mini.c (handle_unbox_nullable): new method
14715         (handle_box): Special case for nullable types
14716         (mono_method_to_ir): Call handle_unbox_nullable in correct
14717         places.
14718
14719         * generics.2.cs: New test suite
14720
14721         * Makefile.am: Support for regression tests with generics.
14722
14723 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
14724
14725         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
14726         allocated to registers. Fixes #76800.
14727
14728 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
14729
14730         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
14731
14732 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
14733
14734         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
14735         of platforms.
14736
14737 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
14738
14739         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
14740         objects.cs.
14741
14742         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
14743         
14744         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
14745 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
14746
14747         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
14748         single precision before storing to a single precision location.
14749
14750 2005-11-28  Raja R Harinath  <rharinath@novell.com>
14751
14752         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
14753
14754 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
14755
14756         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
14757         correct files.
14758
14759         * basic.cs: Remove test_0_byte_compares test which was moved to
14760         objects.cs a long time ago.
14761
14762 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
14763
14764         * aliasing.c: Fixed aliasing issue on 64 bit archs.
14765
14766 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
14767
14768         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
14769         handlers are called.
14770
14771         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
14772         throwing code.
14773
14774          * mini-ia64.c: Add support for the throw->branch exception 
14775         optimization.   
14776
14777         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
14778
14779 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
14780
14781         * mini.c: Enabled "fastpath" deadce :-)
14782         
14783 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
14784
14785         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
14786         alias analysis pass to support it.
14787         * mini.h: Likewise.
14788         * ssa.c: Likewise.
14789         * liveness.c: Likewise (liveness computation can use aliasing
14790         information to be more accurate).
14791         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
14792         moreover made so that "--compile-all" uses the given optimization
14793         flags and not the default ones.
14794         * aliasing.c: Alias analysis (new file).
14795         * aliasing.h: Likewise.
14796         * Makefile.am: added "aliasing.c" and "aliasing.h".
14797         
14798 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
14799
14800         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
14801         OP_L opcodes.
14802
14803 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
14804
14805         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
14806         fp >= end_of_stack exit condition, as it is not needed, and it might
14807         become true for fp eliminated frames.
14808
14809 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
14810
14811         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
14812         coded offsets.
14813
14814 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
14815
14816         * mini-arm.c: fixed alignment of doubles/longs to match
14817         the C ABI (bug #76635).
14818
14819 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
14820
14821         * aot.c: fix compilation with --enable-minimal=aot.
14822
14823 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
14824
14825         * mini-arm.c: fixed compatibility with the new
14826         floating point emulator package for compares.
14827
14828 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
14829
14830         * mini.c : reverted sig->pinvoke changes (r51396-51397).
14831
14832 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
14833
14834         * mini-exceptions.c (print_stack_frame): Output to stderr.
14835         (mono_handle_native_sigsegv): Ditto.
14836
14837 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
14838
14839         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
14840         OP_LCONV_TO_OVF_I implementation.
14841
14842         * mini-amd64.c: Add support for the throw->branch exception 
14843         optimization.
14844
14845         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
14846         when the catch clause catches a more general exception, i.e. Object.
14847
14848 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
14849
14850         * cpu-ia64.md: Remove unused opcodes.
14851
14852         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
14853         specific defines for architectures defining USE_SIGACTION.
14854
14855         * mini-ia64.c: Fix some warnings.
14856
14857         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
14858         version seemed to skip a frame.
14859
14860 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
14861
14862         * mini.c: Clean up the usage of sig->pinvoke flag. Now
14863         only calls which are made to native code use this flag.
14864
14865 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
14866
14867         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
14868         varargs methods as well.
14869         
14870         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
14871         which have save_lmf set. Reorganize methods prologs a bit.
14872
14873         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
14874         debugger to the proper place.
14875
14876 2005-10-29  Martin Baulig  <martin@ximian.com>
14877
14878         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
14879         when running inside the debugger until the debugger has support
14880         for it.
14881
14882 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
14883
14884         * mini.h: Fix a warning.
14885
14886 2005-10-24  Miguel de Icaza  <miguel@novell.com>
14887
14888         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
14889         we expose publicly, this returns the string.
14890
14891 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
14892
14893         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
14894         with fp elimination.
14895
14896 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
14897
14898         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
14899         native stacktrace using the glibc 'backtrace' function if available.
14900
14901 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
14902
14903         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
14904
14905         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
14906         handle SIGSEGVs received while in native code.
14907
14908         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
14909         code, call mono_handle_native_sigsegv which will abort the runtime
14910         after printing some diagnostics, instead of converting it into a
14911         confusing NullReferenceException.
14912
14913 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
14914
14915         * cpu-pentium.md: Remove unused opcodes.
14916
14917 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
14918
14919         * mini-amd64.h (MonoLMF): Add rsp field.
14920
14921         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
14922         the lmf too.
14923
14924 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
14925
14926         * mini-codegen.c (get_register_spilling): Fix some warnings.
14927
14928 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
14929
14930         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
14931         elimination during exception handling. Enable fp elimination by
14932         default.
14933
14934         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
14935         elimination.
14936
14937 2005-10-16  Martin Baulig  <martin@ximian.com>
14938
14939         * mini-exceptions.c
14940         (mono_debugger_run_finally): New public method for the debugger.
14941
14942 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
14943
14944         * debug-mini.c (mono_debug_init_method): Fix warning.
14945
14946         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
14947         the 'exname' parameter const to fix some warnings.
14948
14949 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
14950
14951         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
14952         introduced by the previous patch.
14953
14954 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
14955
14956         * basic-float.cs: Add test for precision of float arithmetic.
14957
14958         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
14959         when loading/storing single values from/to memory.
14960
14961         * mini.c (mono_jit_compile_method_with_opt): Create the function
14962         pointers in the correct domain.
14963
14964 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
14965
14966         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
14967         introduced by previous patch.
14968         
14969         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
14970         when out_filter_idx is NULL.
14971
14972         * mini-exceptions.c: Don't run filter clauses twice during exception
14973         handling. Fixes #75755.
14974
14975 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
14976
14977         * aot.c: Add support for ldflda wrappers.
14978
14979         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
14980         #75902.
14981
14982 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
14983
14984         * mini.c, mini.h: do not consider exception handlers blocks when
14985         setting up interface variables.
14986
14987 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
14988
14989         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
14990
14991 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
14992
14993         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
14994         causes a regression.
14995
14996         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
14997
14998 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
14999
15000         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
15001         of the OP_P definitions.
15002
15003         * TODO: Add a proposal for dealing with the CEE/OP mess.
15004
15005         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
15006         optimizations from the x86 port.
15007
15008         * cpu-amd64.md: Ditto.
15009
15010         * basic.cs basic-long.cs: Add tests.
15011
15012 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
15013
15014         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
15015         Patrik Torstensson's implementation of my exception-handling
15016         optimization idea, when the exception object is not used
15017         (bug #62150).
15018
15019 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
15020
15021         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
15022         of the mul_imm optimizations from the old jit.
15023
15024 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
15025
15026         * mini.c, liveness.c: patch by Patrik Torstensson and
15027         Zoltan Varga to improve performance in methods with
15028         exception clauses.
15029
15030 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
15031
15032         * driver.c: Remove 'Globalization' entry from --version.
15033
15034 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
15035
15036         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
15037         there is a profiler interested in JIT events.
15038
15039         * aot.c: Load profile files produced by the AOT profiling module, and
15040         reorder methods based on the profiling info. Add a 'method_order' table
15041         to the AOT file to make mono_aot_find_jit_info work with the reordered
15042         methods.
15043
15044         * mini.h: Bump AOT file version info.
15045
15046 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
15047
15048         * mini-arm.h: work around what looks like a gcc bug when optimizations
15049         are enabled.
15050
15051 2005-09-28  Raja R Harinath  <rharinath@novell.com>
15052
15053         * Makefile.am (AM_CFLAGS): Don't use += to append inside
15054         conditionals.  Use ...
15055         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
15056
15057 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
15058
15059         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
15060         to determine the amount of memory to copy when passing valuetypes.
15061
15062         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
15063         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
15064
15065 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
15066
15067         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
15068         information about aot.
15069
15070 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
15071
15072         * *.c: Replace the use of {Enter,Leave}CriticalSection with
15073         macros. This will allow a deadlock debugger to easily be plugged
15074         in.
15075
15076 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
15077
15078         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
15079
15080 2005-09-27  Raja R Harinath  <rharinath@novell.com>
15081
15082         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
15083         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
15084         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
15085         ($(arch_built)) [CROSS_COMPILING]: Error out.
15086
15087 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
15088
15089         * aot.c: Add support for the no_special_static flag for classes.
15090
15091 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
15092
15093         * Reapply reverted patches.
15094
15095         * *: Revert r50174 as well.
15096
15097         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
15098
15099 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
15100
15101         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
15102
15103 2005-09-23  Miguel de Icaza  <miguel@novell.com>
15104
15105         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
15106         part of the SIG_HANDLER_SIGNATURE.  
15107
15108 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
15109
15110         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
15111         statistics.
15112
15113         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
15114         introduced by previous patch.
15115
15116 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
15117
15118         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
15119         saved registers too.
15120
15121         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
15122         upon the information returned by get_call_info ().
15123         
15124         * mini-x86.c (add_float): Fix stack size calculation.
15125         (mono_arch_call_opcode): Rewrite this so it works based up the
15126         information returned by get_call_info ().
15127         (mono_arch_get_this_vret_args): Ditto.
15128
15129 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
15130
15131         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
15132         in cinfo to determine the registers which need to be used.
15133
15134 2005-09-20  Miguel de Icaza  <miguel@novell.com>
15135
15136         * driver.c (mono_main): Add --server and --desktop flags. 
15137
15138 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
15139
15140         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
15141         registers as global registers.
15142
15143         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
15144         longer needed with the new register allocator.
15145
15146         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
15147
15148         * cpu-ia64.md: Remove unused opcodes.
15149         
15150         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
15151         
15152 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
15153
15154         * cpu-amd64.md: Remove unused opcodes.
15155
15156         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
15157         needed with the new register allocator.
15158
15159         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
15160         reg-reg moves.
15161
15162 2005-09-16  Raja R Harinath  <rharinath@novell.com>
15163
15164         * Makefile.am (check-local): Don't invoke semdel-wrapper.
15165
15166 2005-09-16  Martin Baulig  <martin@ximian.com>
15167
15168         * exceptions-amd64.c
15169         (throw_exception): Don't call mono_debugger_throw_exception() if
15170         we're a rethrow - see the FIXME in the code.
15171
15172 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
15173
15174         * mini.c (mono_init_exceptions): This only works on some architectures.
15175         
15176 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
15177
15178         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
15179         on ia64.
15180
15181         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
15182
15183         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
15184         now in mini-exceptions.c.
15185
15186 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
15187
15188         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
15189         now in mini-exceptions.c.
15190
15191 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
15192
15193         * exceptions-x86.c: Applied patch from Patrik Torstensson 
15194         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
15195
15196         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
15197         code into mini-exceptions.c. Add some assertions to it.
15198
15199 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
15200
15201         * aot.c (emit_section_change): Applied patch from "The Software Team" 
15202         (<software@solmersa.com>). Fix as errors on windows.
15203
15204 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
15205
15206         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
15207         method info into the LMF.
15208
15209 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
15210         
15211         * mini-ia64.c: Add proper unwind info for method epilogs.
15212
15213         * exceptions-ia64.c: Add some code to help debugging.
15214         
15215         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
15216
15217         * mini-exceptions.c: Fix warning.
15218
15219 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
15220
15221         * mini.c: Really fix build.
15222
15223         * mini-x86.c mini-amd64.c: Fix build.
15224
15225 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
15226
15227         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
15228
15229         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
15230         some Interlocked methods as intrinsics.
15231
15232         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
15233         for Thread methods as well.
15234
15235         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
15236
15237         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
15238
15239         * mini-ia64.c mini-x86.c mini-amd64.c 
15240         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
15241         OP_MEMORY_BARRIER.
15242         
15243         * mini.c (mono_init_exceptions): Fix build breakage.
15244
15245 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
15246
15247         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
15248         of instructions. Use the new ia64_unw_op macros for emitting unwind
15249         info.
15250
15251         * mini.c (mono_init_exceptions): Initialize exception handling
15252         related trampolines at startup.
15253
15254 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
15255
15256         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
15257
15258 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
15259
15260         * mini.c: Handle type loading errors gracefully during compilation and
15261         throw the appropriate exception.
15262
15263 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
15264
15265         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
15266         for the mono binary.
15267
15268 2005-09-09  Martin Baulig  <martin@ximian.com>
15269
15270         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
15271         the release.
15272
15273 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
15274
15275         * mini-arm.h: use emulation for conv.r.un for the release.
15276
15277 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
15278
15279         * mini-arm.c, objects.cs: more fixes and tests for them.
15280
15281 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
15282
15283         * mini-arm.c: align structures to at least 4 bytes to be able
15284         to keep our current optimized memcpy.
15285
15286 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
15287
15288         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
15289
15290 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15291
15292         * mini.c: ignore SIGPIPE.
15293
15294 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
15295
15296         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
15297
15298         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
15299
15300 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
15301
15302         * mini.h: Add prototype for mono_allocate_stack_slots_full.
15303
15304 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
15305
15306         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
15307         exception handling support.
15308         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
15309         patch by Brian Koropoff <briank@marakicorp.com>).
15310
15311 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
15312
15313         * mini.c: revert another 'optimization' which breaks when
15314         items on the eval stack need to be saved at a basic block end
15315         (bug #75940).
15316
15317 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
15318
15319         * jit-icalls.c: for arrays, ensure we always provide
15320         lower bounds.
15321
15322 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
15323
15324         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
15325         
15326         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
15327
15328 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
15329
15330         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
15331         arguments in their original register.
15332
15333 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
15334
15335         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
15336         memset/memcpy.
15337
15338         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
15339         when ssapre is enabled.
15340
15341         * inssel-long.brg: Fix bug in previous patch.
15342
15343         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
15344         multiplication by a constant.
15345
15346 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
15347
15348         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
15349         icc.
15350
15351         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
15352         saving registers.
15353
15354 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
15355
15356         * inssel-arm.brg: apply changes tested by Brian Koropoff
15357         <briank@marakicorp.com>.
15358
15359 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
15360
15361         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
15362         
15363 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
15364
15365         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
15366         to the same register if dreg is just a base register.
15367         (print_ins): Improve printing of membase opcodes.
15368
15369         * inssel-x86.brg: Add optimized ldind(reg) rules.
15370
15371         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
15372
15373 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
15374
15375         * mini.c: when running under valgrind, set the stack bottom for
15376         the GC at the actual approximate stack for the app (fixes running
15377         mono with valgrind).
15378
15379 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
15380
15381         * mini.c: do no break at the first valuetype to init found
15382         (fixes bug #75791).
15383
15384 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
15385
15386         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
15387
15388 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
15389
15390         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
15391
15392 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
15393
15394         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
15395
15396 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
15397
15398         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
15399
15400         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
15401         code.
15402
15403         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
15404         code.
15405
15406         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
15407         methods.
15408
15409 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
15410
15411         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
15412
15413 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
15414
15415         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
15416         in the tail recursion optimization.
15417
15418         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
15419         debug info into the assembly file.
15420
15421         * iltests.il: Add test for filter regions.
15422
15423         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
15424         initial stack of filter regions. Fixes #75755.
15425
15426 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
15427
15428         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
15429         stack requirements.
15430
15431 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
15432
15433         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
15434         the check for an already compiled method on non-ia64 platforms.
15435         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
15436         proper domain.
15437
15438         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
15439
15440         * inssel-x86.brg: Add some optimized call rules.
15441
15442 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
15443
15444         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
15445         method here.
15446
15447         * mini.h mini-trampolines.c: Pass the trampoline argument to 
15448         mono_arch_patch_delegate_trampoline.
15449
15450         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
15451
15452         * mini-trampolines.c: Fix build.
15453
15454         * mini-amd64.h: Add delegate trampolines.
15455
15456         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
15457
15458         * inssel-amd64.brg: Add optimized call rules.
15459         
15460         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
15461
15462         * inssel-ia64.brg: Add optimized ldind(reg) rules.
15463
15464 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
15465
15466         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
15467         change.
15468
15469         * mini-ia64.c: Remove LMF fixmes.
15470
15471         * mini-ia64.h: Remove most fields from LMF.
15472
15473         * inssel-ia64.brg (stmt): Fix unaligned access errors.
15474
15475         * mini-trampolines.c: Add support for IA64 function descriptors.
15476
15477         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
15478         for IA64 function descriptors.
15479
15480 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
15481
15482         * tramp-arm.c: patch the vtable for virtual calls. Added
15483         support code to register/unregister the LMF.
15484         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
15485         more LMF work.
15486
15487 2005-08-19  Dick Porter  <dick@ximian.com>
15488
15489         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
15490         bit value if needed.
15491
15492 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
15493
15494         * mini.c (mini_get_method): Move handling of wrapper data here.
15495
15496         * mini.c (mono_method_to_ir): Add support for dynamic methods.
15497
15498         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
15499         virtual.
15500
15501         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
15502         bblock->code does not remain empty.
15503
15504 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
15505
15506         * arrays.cs: Add regression test for #75832.
15507
15508         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
15509         rules. Fixes #75832.
15510
15511         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
15512         instruction scheduling.
15513
15514 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
15515
15516         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
15517
15518 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
15519
15520         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
15521
15522         * mini-codegen.c: Fix VC build.
15523
15524         * cpu-pentium.md: Increase length of atomic_exhange_i4.
15525
15526 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15527
15528         * mini.h: fix signature for mono_register_opcode_emulation.
15529
15530 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
15531
15532         * mini.c: Get rid of most of the helper_sig_... constants using
15533         mono_create_icall_signature ().
15534
15535 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
15536
15537         * jit-icalls.c (helper_ldstr): New helper function.
15538
15539         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
15540
15541         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
15542         throw, load the string using a helper call instead of creating a string object.
15543
15544         * aot.c: Update after LDSTR changes.
15545
15546         * mini.h: Bump AOT file version.
15547         
15548         * aot.c: Save class size info into the AOT file. Print more statistics during
15549         compilation.
15550
15551         * mini.h: Bump AOT file version.
15552
15553         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
15554         ordering of disasm cases. Fixes #74957.
15555
15556 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
15557
15558         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
15559         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
15560         the generic code needed for the ARM port.
15561
15562 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
15563
15564         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
15565         inssel-arm.brg: more ARM features and fixes.
15566
15567 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
15568
15569         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
15570         ARM port work in progress.
15571
15572 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
15573
15574         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
15575
15576         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
15577
15578         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
15579
15580         * inssel.brg (mini_emit_memset): Add support for unaligned access.
15581
15582         * *-ia64.*: Ongoing IA64 work.
15583         
15584         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
15585
15586 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
15587
15588         * TODO: Remove out-of-data todo stuff.
15589
15590         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
15591         dead code.
15592
15593         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
15594
15595         * mini.h: Bump corlib version.
15596
15597 2005-07-27  Martin Baulig  <martin@ximian.com>
15598
15599         * mini-codegen.c
15600         (create_copy_ins): Added `const unsigned char *ip' argument; set
15601         `copy->cil_code' from it.
15602
15603 2005-07-27  Martin Baulig  <martin@ximian.com>
15604
15605         * mini-exceptions.c (mono_handle_exception): Don't call
15606         mono_debugger_handle_exception() for filters.
15607
15608 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
15609
15610         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
15611         as well.
15612
15613 2005-07-26  Martin Baulig  <martin@ximian.com>
15614
15615         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
15616
15617         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
15618         helper_compile_generic_method() if the method is actually virtual
15619         and non-final.
15620
15621 2005-07-26  Martin Baulig  <martin@ximian.com>
15622
15623         * mini.c
15624         (trampoline_code): Renamed to `mono_trampoline_code' and made it
15625         public; this is now accessed directly by the debugger.
15626         (mono_generic_trampoline_code): Removed.
15627
15628         * debug-mini.c
15629         (mono_debug_init_method): Also add interncalls and wrappers.
15630
15631 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
15632
15633         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
15634
15635 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
15636
15637         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
15638
15639 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
15640
15641         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
15642
15643 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
15644
15645         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
15646         getting TLS offsets on AMD64 too.
15647
15648 2005-07-20  Kornel Pal <kornelpal@hotmail.com>
15649
15650         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
15651
15652 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
15653
15654         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
15655         inssel-arm.brg, mini-arm.h: ARM port work in progress.
15656
15657 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
15658
15659         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
15660
15661         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
15662         to mini.c.
15663
15664         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
15665         mono_sparc_is_virtual_call ().
15666         
15667         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
15668
15669         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
15670         trampoline parameters.
15671
15672         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
15673         
15674         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
15675         to mono_arch_get_vcall_slot_addr.
15676
15677         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
15678         trampoline code.
15679
15680         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
15681
15682 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
15683
15684         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
15685
15686 2005-07-19  Martin Baulig  <martin@ximian.com>
15687
15688         * exceptions-amd64.c (throw_exception): Call
15689         mono_debugger_throw_exception() here like we're doing it on i386.
15690
15691 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
15692
15693         * mini-ia64.c: Add optimized TLS access support.
15694
15695 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
15696
15697         * mini-exceptions.c: Ongoing IA64 work.
15698
15699         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
15700
15701         * mini.c: Use the default optimization set when embedding. Fixes
15702         #75194.
15703
15704 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
15705
15706         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
15707         of trampolines to a separate file.
15708
15709         * mini-trampolines.c: New file.
15710
15711         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
15712         separate file.
15713         
15714         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
15715         amd64/ia64 code.
15716
15717         * mini-codegen.c: Fix cygwin build.
15718
15719 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
15720
15721         * mini.c: Add some minor changes needed by the IA64 port.
15722
15723         * *-ia64.*: Ongoing IA64 work.
15724
15725 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
15726
15727         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
15728         trampolines into arch-independent and arch-dependent parts.
15729
15730         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
15731
15732 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
15733
15734         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
15735
15736         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
15737         the xp-regalloc-branch for amd64.
15738
15739         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
15740         xp-regalloc-branch for x86.
15741
15742 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
15743
15744         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
15745
15746 2005-07-06  Martin Baulig  <martin@ximian.com>
15747
15748         * mini.c
15749         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
15750         (mono_jit_runtime_invoke): Likewise.
15751
15752 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
15753
15754         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
15755         on x86 too.
15756         
15757         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
15758         without loading their metadata. Reorganize the file format so exception handling+
15759         debug info is kept separate from normal method info. Create MonoJitInfo 
15760         structures for methods lazily.
15761
15762         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
15763         loading metadata.
15764         (x86_class_init_trampoline): Patch AOT class init trampolines too.
15765
15766         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
15767
15768         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
15769         in AOT code.
15770
15771         * mini.h: Bump AOT file version.
15772
15773 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
15774
15775         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
15776
15777 2005-07-01  Raja R Harinath  <rharinath@novell.com>
15778
15779         * Makefile.am (check-local): Call semdel-wrapper.
15780
15781 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
15782
15783         * mini-x86.c: Revert the last change as it seems to break the build..
15784
15785 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
15786
15787         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
15788         
15789         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
15790
15791 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
15792
15793         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
15794         outside of the macro, so strange stuff doesn't happen with gcc4
15795         (NEW_AOTCONST_TOKEN): Likewise.
15796
15797 2005-06-28  Martin Baulig  <martin@ximian.com>
15798
15799         * mini.c (mini_class_is_system_array): New static method; use this
15800         instead of `klass->parent == mono_defaults.array_class' everywhere
15801         since this also works for the new generic array class.
15802
15803 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
15804
15805         * inssel.brg: Remove warnings.
15806
15807 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
15808
15809         * mini-ia64.c: Ongoing IA64 work.
15810
15811         * basic-float.cs: Add float->i1 conversion test.
15812
15813         * iltests.il: Add conv.u4 test.
15814
15815 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
15816
15817         * inssel-long.brg: Fix bug caused by last change.
15818
15819 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
15820
15821         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
15822         BSDs.  Allows the x86 JIT to work on OSX86
15823
15824 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
15825
15826         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
15827         u4->i8 conversion.
15828
15829         * mini-ia64.c: Ongoing IA64 work.
15830
15831 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
15832
15833         * mini-ia64.c: Ongoing IA64 work.
15834
15835         * driver.c: Clean up jit_code_hash as well when using --regression.
15836
15837         * inssel-long.brg: Fix long->i4/u4 conversion rules.
15838
15839         * basic-long.cs: Add tests for long->u4 conversion.
15840
15841 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
15842
15843         * mini.c: Take mono_get_domainvar out of macros. This makes sure
15844         that we do not depend on undefined C behavior: the order stuff
15845         gets evaluated within an expression. Fixes mono when compiled on
15846         GCC 4.
15847
15848 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
15849
15850         * *-ia64.*: Ongoing IA64 work.
15851
15852         * aot.c: Lower memory usage while loading AOT methods.
15853
15854         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
15855
15856         * mini.h: Bump AOT file format version.
15857
15858 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
15859
15860         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
15861
15862 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
15863
15864         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
15865         not on callee assembly). Fixed some comments.
15866
15867 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
15868
15869         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
15870         it gets proper disassembly.
15871         (emit_method_info): Remove some dead code.
15872
15873         * mini.c (mini_method_compile): Allways allocate the GOT var in
15874         mono_method_to_ir for emulating opcodes.
15875
15876 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
15877
15878         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
15879         before freeing the code memory. Fixes #74990.
15880
15881         * objects.cs: Add regression test for #74992.
15882
15883         * liveness.c: Extend live ranges of arguments to the beginning of the
15884         method. Fixes #74992.
15885
15886         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
15887         so it points into the faulting instruction.
15888
15889 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
15890
15891         * jit-icalls.c (mono_imul_ovf): Add exception handling.
15892
15893         * *-ia64.*: Ongoing IA64 work.
15894
15895         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
15896
15897 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
15898
15899         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
15900
15901         * *-ia64.*: Ongoing IA64 work.
15902
15903 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
15904
15905         * basic-long.cs: Add tests for add/sub.ovf.
15906
15907         * basic.cs: Add tests for sub.ovf.
15908
15909         * *-ia64.*: Ongoing IA64 work.
15910
15911 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
15912
15913         * *-ia64.*: Ongoing IA64 work.
15914
15915         * basic.cs: Add conv.ovf.i4.un test.
15916
15917 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
15918
15919         * mini.c: (remove_block_if_useless) Fixed bug 75061.
15920         
15921 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15922
15923         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
15924
15925 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
15926
15927         * *-ia64.*: Ongoing IA64 work.
15928
15929 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15930
15931         * trace.[ch]:
15932         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
15933
15934 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
15935
15936         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
15937
15938 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
15939
15940         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
15941
15942         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
15943         of a call is callable by a near call.
15944
15945 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
15946
15947         * mini-ia64.c: Ongoing IA64 work.
15948
15949 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
15950
15951         * genmdesc.c: Make the generated array non-static.
15952
15953         * inssel-long.brg: Fix LSHR_IMM rule.
15954
15955         * *-ia64.*: Ongoing IA64 work.
15956
15957         * *-ia64.*: Ongoing IA64 work.
15958
15959 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
15960
15961         * *-ia64.*: Ongoing IA64 work.
15962
15963         * *-ia64.*: Ongoing IA64 work.
15964         
15965         * mini-ia64.c: Ongoing IA64 work.
15966
15967         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
15968
15969 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
15970
15971         * objects.cs basic-calls.cs: Move some tests to objects.cs.
15972         
15973         * objects.cs basic-long.cs: Move some tests to objects.cs.
15974
15975 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
15976
15977         * *-ia64.*: Ongoing IA64 work.
15978
15979         * iltests.il: Add a new test.
15980
15981         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
15982         newobj. Fixes #75042.
15983
15984 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
15985
15986         * *-ia64.*: Ongoing IA64 work.
15987         
15988         * *-ia64.*: Ongoing IA64 work.
15989         
15990         * *-ia64.*: Ongoing IA64 work.
15991
15992         * basic.cs objects.cs: Move tests accessing static variables as well.
15993
15994         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
15995
15996 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
15997
15998         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
15999
16000         * driver.c: Always print failed tests.
16001
16002         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
16003         frame pointer.
16004
16005         * *ia64*: Ongoing IA64 work.
16006
16007 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
16008
16009         * basic.cs: Add tests for add.ovf. Fix warnings.
16010
16011 2005-05-18  Miguel de Icaza  <miguel@novell.com>
16012
16013         * driver.c (mono_main): Avoid crash if no argument is passed to
16014         --break;  Do not use g_error, but f_printf.   And fix all other
16015         ocurrences of the same crash.
16016
16017 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
16018
16019         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
16020         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
16021         Fixes #74742.
16022
16023 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
16024
16025         * *-ia64.*: Add beginnings of IA64 backend.
16026
16027         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
16028
16029 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
16030
16031         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
16032         Fixes #74925.
16033
16034         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
16035
16036         * mini-amd64.c: Fix a warning.
16037
16038 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
16039
16040         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
16041         in float_neg. Fixes #74897.
16042
16043         * mini-amd64.c (emit_call): Fix another near call bug.
16044
16045 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
16046
16047         * declsec.c: Keep the appdomain information in the structure. Added a 
16048         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
16049         value gets overwritten).
16050         * declsec.h: Set the default MonoArray for the the stack to 6. Added
16051         an MonoAppDomain member to MonoSecurityFrame.
16052         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
16053         used in the stack walk. Now use a MonoArray which grow (double) when
16054         it gets full.
16055
16056 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
16057
16058         * mini.c: Re-enabled runtime cleanup, since running threads should
16059         now properly stop when exiting.
16060
16061 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
16062
16063         * mini-codegen.c: New file contaning the arch-independent local
16064         register allocator. Not used by any architectures yet.
16065
16066         * mini.h linear-scan.c: Merge some changes from the 
16067         mini-xp-local-regalloc branch.
16068
16069 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
16070
16071         * mini-amd64.c (emit_call): Fix calls to native functions when the
16072         runtime is compiled as a shared library. Fixes #74756.
16073
16074         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
16075         on a literal field. Fixes #74751.
16076
16077 2005-04-25  Raja R Harinath  <rharinath@novell.com>
16078
16079         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
16080
16081 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
16082
16083         * objects.cs: Add missing null casting test.
16084
16085 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
16086
16087         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
16088         in wrapper methods. Also rename 'address' variable to 'offset'.
16089
16090 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
16091
16092         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
16093         warnings.
16094         
16095         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
16096
16097         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
16098         work on windows.
16099
16100 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
16101
16102         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
16103
16104 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
16105
16106         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
16107         just the last bytes.
16108
16109 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
16110
16111         * aot.c (mono_compile_assembly): Fix warning.
16112
16113         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
16114         by the _MSC_VER stuff.
16115
16116 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
16117
16118         * inssel-long.brg: Fix #74588.
16119
16120         * cpu-amd64.md: Fix #74591.
16121
16122         * iltests.il: Add new regression tests.
16123
16124 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
16125
16126         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
16127         valuetype.
16128
16129 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
16130
16131         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
16132
16133         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
16134         from Bill Middleton <flashdict@gmail.com>.
16135
16136 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
16137
16138         * arrays.cs: Add new regression test. Fix warnings.
16139
16140 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
16141
16142         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
16143         and leakage in CKFINITE.
16144
16145         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
16146         this to a null op since it is called on amd64 too.
16147
16148         * exceptions-amd64.c (get_throw_trampoline): Align stack.
16149
16150         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
16151         body since this is not used on amd64.
16152         
16153         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
16154
16155         * mini-amd64.c: Remove obsolete fixmes.
16156
16157         * mini.c (print_method_from_ip): Fix debugging support.
16158
16159 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
16160
16161         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
16162         so that expressions that don't give much gain are not reduced.
16163         * ssapre.h: Likewise.
16164
16165 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
16166
16167         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
16168
16169         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
16170
16171         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
16172
16173 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
16174
16175         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
16176
16177         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
16178
16179 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
16180
16181         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
16182         stack touching.
16183
16184         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
16185
16186         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
16187
16188         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
16189
16190         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
16191         MONO_ARCH_USE_SIGACTION. Fixes #74252.
16192
16193         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
16194
16195         * mini-x86.c: Fix up stack overflow handling.   
16196
16197         * exceptions.cs: Add new regression test.
16198
16199 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
16200
16201         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
16202         mono_jit_thread_attach.
16203
16204         * mini.c (mono_method_to_ir): Verify called method is not abstract.
16205
16206 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
16207
16208         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
16209         avoid calling constructors using callvirt.
16210
16211         * inssel.brg: Fix #74073.
16212
16213 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
16214
16215         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
16216         compilation with non-GCC compilers.
16217         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
16218         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
16219
16220 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
16221
16222         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
16223         klass->interface_offsets (will likely fix bug#74073).
16224
16225 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
16226
16227         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
16228
16229 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
16230
16231         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
16232         to amd64_div_reg_size ().
16233         
16234         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
16235
16236 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
16237
16238         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
16239
16240 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
16241
16242         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
16243
16244 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
16245
16246         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
16247         
16248         * mini.c (mono_precompile_assembly): Load and precompile referenced
16249         assemblies as well. Fixes #74015.
16250
16251 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
16252
16253         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
16254
16255 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
16256
16257         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
16258         a lot of checks and (anyway) permissions cannot work until corlib is 
16259         loaded.
16260
16261 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
16262
16263         * mini-ppc.c: fixed ABI issue on sysv/ppc.
16264
16265 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
16266
16267         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
16268         calls (fixes bug#72824).
16269
16270 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
16271
16272         * mini.c: fix tail recursion elimination (see test in bug#73936).
16273
16274 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
16275
16276         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
16277         some fp functions in sse2 mode.
16278
16279 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
16280
16281         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
16282
16283 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
16284
16285         * mini.h mini.c: Add mono_get_jit_tls_key ().
16286
16287         * mini-x86.c: Enable fast TLS support on windows.
16288
16289 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
16290
16291         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
16292         * mini.c: Check for p/invoke method when generating code. If a
16293         p/invoke method, or it's class, isn't decorated with [Suppress
16294         UnmanagedCodeSecurity] then generate code to call System.Security.
16295         UnmanagedDemand (only if the security manager is active).
16296
16297 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
16298
16299         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
16300         last change as it seems to cause strange crashes.
16301         
16302 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
16303
16304         * *.c: handle unsafe function pointers where needed.
16305
16306 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
16307
16308         * mini.c (mono_jit_free_method): Remove the fixme too.
16309
16310 2005-03-15  Miguel de Icaza  <miguel@novell.com>
16311
16312         * mini.c: As discussed, make the code actually free the delegate
16313         thunk now, to enable the debugging of delegate problems, use
16314         MONO_DEBUG=1 when running Mono. 
16315
16316         This takes also care of parts of the leaks as seen by Joe.
16317
16318 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
16319
16320         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
16321         thread_tls_offset calculation.
16322
16323 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
16324
16325         * declsec.c: Reworked linkdemand checks for icall. The previous code
16326         was using the declaration code (untrusted) and didn't work as expected
16327         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
16328         specific case.
16329
16330 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
16331
16332         * iltests.il: Add new localloc test.
16333
16334         * mini-amd64.c: Handle large stack allocations the same way as on
16335         windows if stack overflow handling is working.
16336         
16337         * mini-amd64.c: Allocate the signal stack using mmap.
16338
16339         * mini.c (sigsegv_signal_handler): Fix reading of context.
16340
16341         * mini-exceptions.c: Fix up stack overflow handling.
16342
16343         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
16344
16345         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
16346
16347         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
16348
16349         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
16350
16351         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
16352         tramp_init functions as they are no longer needed.
16353
16354 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
16355
16356         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
16357         
16358         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
16359
16360         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
16361         
16362         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
16363         support that now.
16364
16365         * mini-ops.h: Add OP_LMUL_IMM.
16366
16367         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
16368         long mul/div opcodes as intrinsic.
16369
16370         * mini-amd64.c (emit_call): Handle the case when the callee might be
16371         an AOT method.
16372
16373 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
16374
16375         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
16376         extra safe.
16377         
16378         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
16379
16380         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
16381
16382 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
16383
16384         * mini.c (mono_codegen): Don't leak here, to help people running
16385         monogrind.
16386
16387 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
16388
16389         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
16390         conversions in sse2 mode.
16391
16392         * basic-float.cs: Add regression test.
16393         
16394         * mini-amd64.c: Reenable sse2.
16395
16396 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
16397
16398         * mini-amd64.c: Disable sse2 until some regressions are fixed.
16399
16400 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
16401
16402         * driver.c: Copyright text should include 2005.
16403         
16404 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
16405
16406         * cpu-amd64.md (load_membase): Fix more max lengths.
16407
16408 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
16409
16410         * cpu-amd64.md (load_membase): Fix max length.
16411
16412         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
16413
16414         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
16415
16416         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
16417         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
16418
16419         * basic-float.cs: Add rounding regression test.
16420
16421         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
16422
16423 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
16424
16425         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
16426         structures in registers for pinvoke wrappers.
16427
16428 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
16429
16430         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
16431
16432 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
16433
16434         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
16435         wrapper to mono_jit_thread_attach.
16436
16437         * mini.c (mini_jit_thread_attach): New jit icall.
16438
16439         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
16440         native->managed wrappers.
16441
16442         * exceptions.cs: Add new regression test.
16443
16444         * mini.c (optimize_branches): Check regions in the cbranch to throw
16445         block case as well. Fixes #73242.
16446
16447 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
16448
16449         * mini.c: thread safety fixes.
16450
16451 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
16452
16453         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
16454         patching stuff, since delegates use jump trampolines so there is
16455         no caller.
16456
16457         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
16458         jump trampolines.
16459         
16460         * tramp-amd64.c: Fix build.
16461
16462         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
16463         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
16464
16465         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
16466         Rename this to mono_arch....
16467         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
16468
16469         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
16470
16471         * mini-amd64.c (emit_call): If both the caller and the callee is
16472         guaranteed to have 32 bit addresses, emit a normal call.
16473
16474         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
16475
16476         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
16477         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
16478         method_ptr inside delegates.
16479
16480 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
16481
16482         * mini.c (mono_jit_free_method): Free the method info even if the native code is
16483         invalidated. Fixes #73001.
16484
16485         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
16486
16487         * mini-x86.c: Only use stdcall for pinvokes on windows.
16488
16489 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
16490
16491         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
16492         * mini-x86.c: remove unreliable __thread var offset detection,
16493         use the correct accessors and enable by default.
16494
16495 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
16496
16497         * mini.c (mono_jit_free_method): Fix memory leak.
16498
16499 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
16500
16501         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
16502
16503 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
16504
16505         * cpu-amd64.md: Fix lengths of atomic opcodes.
16506
16507 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
16508
16509         * driver.c: try to not imply using ICU is any good.
16510
16511 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
16512
16513         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
16514         functions as inline ops.
16515
16516         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
16517         some Interlocked functions as inline ops.
16518
16519         * mini.c (move_basic_block_to_end): Fix bug in last patch.
16520
16521         * mini.h (MonoBasicBlock): Reorganize fields a bit.
16522
16523         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
16524
16525         * mini.c: Add support for OP_NOT_TAKEN.
16526
16527         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
16528         structures in registers for pinvoke wrappers.
16529
16530         * mini-amd64.c: Fix warnings.
16531
16532 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
16533
16534         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
16535
16536         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
16537
16538         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
16539         address instead of loading the address from it.
16540
16541         * mini-x86.c: Add support for returning small structs in registers
16542         on Win32. Fixes part of #70864.
16543         
16544 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
16545
16546         * trace.c (get_token): Improve error checking.
16547
16548 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
16549
16550         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
16551
16552 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
16553  
16554         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
16555         it can be reused for MonoClass.
16556         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
16557         _LINKDEMAND.
16558
16559 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
16560
16561         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
16562         instead of a MonoReflectionMethod. The method information wasn't used
16563         when displaying SecurityException details (but will be now).
16564
16565 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
16566
16567         * Makefile.am : windows build fix.
16568
16569 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
16570
16571         * iltests.il: Add new regression test.
16572
16573         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
16574         #72522.
16575
16576 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
16577  
16578         * mini.c: Moved linkdemand check into helper function check_linkdemand
16579         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
16580         LDFTN, LDVIRTFTN).
16581
16582 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
16583
16584         * declsec.c: Added statistics counter for different kinds of 
16585         LinkDemands.
16586         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
16587         (and commented) declaration.
16588         * mini.c: Added statistics counter for security Demand code 
16589         generation. Added display of security statistics.
16590
16591 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
16592
16593         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
16594         Fix compilation errors under gcc-2.95.
16595
16596 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
16597
16598         * mini.c, driver.c: Use the new jit trampoline hashtable
16599
16600 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
16601
16602         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
16603
16604 2005-02-11  Martin Baulig  <martin@ximian.com>
16605
16606         * debug-mini.c (mono_debug_close_method): Free the line number array.
16607
16608 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
16609
16610         * aot.c: Break up large methods into smaller ones. Share GOT slots for
16611         icalls.
16612
16613         * mini.h: Bump AOT file format version. 
16614
16615 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
16616
16617         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
16618         APTC and P/Invoke.
16619         * declsec.h: Added macros to get/set lazyly initialized security 
16620         informations about assemblies. Added new enum for different type of
16621         possible LinkDemand violation. Added function to check LinkDemands.
16622         * mini.h: Added a field to MonoCompile to hold any security violation
16623         detected when JITting a method (so it can be thrown later).
16624         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
16625         and CEE_CALLVIRT. Added code to throw exception at the end of
16626         mini_method_compile (note: the exception is unhandled right now).
16627
16628 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
16629
16630         * mini.c, jit-icalls.c: use the managed implementation of
16631         memset for initobj and memset, to avoid managed <-> unmanaged
16632         transitions.
16633
16634 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
16635
16636         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
16637         optimization if it would need a GOT var.
16638
16639         * basic.cs: Add tests for constant propagation and switch statements.
16640
16641         * ssa.c: Fix out-of-range constant propagation and switch statements.
16642
16643 2005-02-09    <vargaz@freemail.hu>
16644
16645         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
16646
16647 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
16648
16649         * cpu-amd64.md (load_membase): Fix max length of load_membase.
16650
16651 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
16652
16653         * mini.c: update to new signature of mono_class_get_allocation_ftn().
16654
16655 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
16656
16657         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
16658         arithmetic operations.
16659
16660 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
16661
16662         * mini-ppc.c: add a workaround for broken user code that
16663         DllImports vararg functions with non-vararg signatures.
16664
16665 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
16666
16667         * mini.c (mono_jit_compile_method_inner): Add detection and a 
16668         meaningfull error message for assemblies written in Managed C++.
16669
16670         * tramp-amd64.c mini-amd64.h: Add support for 
16671         create_trampoline_from_token ().
16672
16673         * aot.c mini-x86.c abcremoval.c: Applied patch from
16674         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
16675
16676 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
16677
16678         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
16679         which takes a MonoImage/token as parameter instead of a MonoMethod.
16680
16681         * aot.c: Use the new trampoline for initializing vtables.
16682
16683         * aot.c: Add support for ldfld/stfld_remote wrappers.
16684
16685         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
16686         rules for compare <MEM>, IMM.
16687
16688         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
16689
16690         * aot.c: Handle inherited finalizers correctly.
16691
16692 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
16693
16694         * inssel.brg (stmt): Add a missing _setup_... ().
16695
16696         * aot.c: Save some parts of the class state to the AOT file and use it
16697         to recompute that state when a class is initialized.
16698
16699         * mini.c: Install AOT hooks into the runtime.
16700
16701         * mini.h: Bump AOT file format version.
16702         
16703         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
16704         Fixes #72148.
16705
16706         * iltests.il: Add new test.
16707
16708 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
16709
16710         * mini.c: fix typo.
16711
16712 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
16713
16714         * mini.c: setup the statistical profiler in the thread attach
16715         callback to cope with the new single thread code.
16716
16717 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
16718
16719         * mini-ppc.c: ensure we have enough room for the profiler
16720         calls (fixed bug#72084).
16721
16722 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
16723
16724         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
16725         it.
16726
16727 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
16728
16729         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
16730
16731 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
16732
16733         * ssapre.c: Fixed an issue with down safety (this allows IronPython
16734         to succesfully execute parrotbench).
16735         * ssapre.h: Likewise.
16736
16737 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
16738
16739         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
16740         variable for stores to method arguments (fixes a SSAPRE issue).
16741
16742 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
16743
16744         * mini.c: handle value types in dup, fixes gen-112.cs.
16745
16746 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
16747
16748         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
16749         sequence for calls in dynamic methods to avoid thunks.
16750
16751 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
16752
16753         * mini.c: correctly remove dynamic methods from the hashtable.
16754
16755 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
16756
16757         * driver.c: Disabled SSAPRE until fix the bug that appears
16758         in IronPython's parrotbench.
16759
16760 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
16761
16762         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
16763
16764         * mini.c (mono_method_to_ir): Revert the previous change.
16765         
16766         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
16767         when AOT compiling.
16768
16769         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
16770         mono_jit_info_table_find () etc. when running under valgrind.
16771
16772         * inssel.brg: Fix warnings.
16773
16774         * mini-exceptions.c: Fix warnings.
16775
16776 2005-01-31  Martin Baulig  <martin@ximian.com>
16777
16778         * driver.c (compile_all_methods_thread_main): Don't try to compile
16779         generic methods or anything which has type parameters.
16780
16781 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
16782
16783         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
16784
16785         * TestDriver.cs: Add --verbose flags.
16786
16787         * graph.c ssa.c: Fix 64 bit warnings.
16788         
16789         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
16790         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
16791         Fix 64 bit warnings.
16792
16793         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
16794         variable not spotted by gcc.
16795         
16796         * mini-amd64.c inssel-amd64.brg: Applied patch from  
16797         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
16798         X86_COMPARE_MEMBASE opcodes.
16799
16800         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
16801
16802 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
16803
16804         * *: MonoMethod->signature might be NULL now. You *MUST* use
16805         mono_method_signature.
16806
16807 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
16808
16809         * driver.c (compile_all_methods_thread_main): Compile the methods
16810         without invoking cctors.
16811
16812 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
16813
16814         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
16815         * basic-calls.cs: test for the above.
16816
16817 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
16818
16819         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
16820         MonoJitInfo changes.
16821
16822 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
16823
16824         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
16825         eagerly if it contains dynamic methods.
16826         
16827         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
16828
16829         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
16830         trace, it is now computed by an icall from trace_ips.
16831         
16832         * mini-exceptions.c: Fix a warning.
16833
16834 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
16835
16836         * mini-exceptions.c: don't bother getting stack trace info if
16837         it's not going to be used.
16838
16839 2005-01-27  Raja R Harinath  <rharinath@novell.com>
16840
16841         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
16842         ssapre-mini-ops.h.
16843
16844 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
16845
16846         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
16847
16848         * aot.c: Avoid calling mono_method_get_header () if not needed.
16849
16850         * mini.h: Bump AOT file format version.
16851         
16852         * mini.c (mono_emit_native_call): Allocate a GOT var here.
16853
16854         * mini.c (mono_print_tree): Print more info for calls.
16855
16856 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
16857
16858         * declsec.h: Remove warning by adding missing include for marshal.h
16859
16860 2005-01-26  Martin Baulig  <martin@ximian.com>
16861
16862         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
16863         `ip' twice.
16864
16865 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
16866
16867         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
16868         flags.
16869
16870         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
16871
16872         * aot.c (mono_compile_assembly): Fix a warning.
16873
16874 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
16875
16876         * declsec.c: Look for security attributes on the original MonoMethod 
16877         (and not the wrapped one). This fix permissions on icalls.
16878
16879 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
16880
16881         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
16882
16883         * mini.c (mono_allocate_stack_slots): Add a fixme.
16884
16885         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
16886
16887 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
16888
16889         * inssel.brg: optimize casts of sealed types (more
16890         optimizations waiting for fixes in remoting).
16891
16892 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
16893
16894         * inssel.brg (stmt): Add another dummy rule.
16895
16896         * driver.c: Fix warnings.
16897
16898         * driver.c (mono_main): If running under valgrind, instruct glib to use
16899         the system allocation functions so valgrind can track the memory
16900         allocated by the g_... functions.
16901
16902         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
16903
16904         * mini-ops.h: Add OP_DUMMY_STORE opcode.
16905
16906         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
16907
16908         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
16909         variables in try regions.
16910
16911         * mini.c (mini_method_compile): Don't disable optimizations on large
16912         methods when AOT compiling.
16913
16914         * mini.c (mono_allocate_stack_slots): New arch independent method to 
16915         allocate stack slots. Not yet used.
16916
16917 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
16918
16919         * debug-mini.c (mono_debug_close_method): Plug some leaks.
16920
16921 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
16922
16923         * mini-ppc.c: make the branch info relative as the code
16924         buffer can be reallocated.
16925
16926 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
16927
16928         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
16929         * driver.c: Removed the AOT/security restriction. Now initialize the
16930         security manager (in metadata) if --security is used.
16931         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
16932         rather than the pointer to declarative security, when AOT is used.
16933
16934 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
16935
16936         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
16937         basic blocks, reduced intrinsic exception throwing code size.
16938
16939 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
16940
16941         * driver.c (mini_usage): Reorder the usage screen.
16942
16943 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
16944
16945         * mini.c (mono_resolve_patch_target): Fix warning.
16946
16947 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
16948
16949         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
16950         previous patch.
16951
16952         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
16953
16954         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
16955         breaks the amd64 build.
16956
16957         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
16958         register allocation. Fixes #71454.
16959
16960         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
16961
16962         * arrays.cs: Add new regression test.   
16963
16964 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
16965
16966         * ssapre.c: Turned usage of snprintf to GString.
16967         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
16968         (I left it on by mistake in my previous commit).
16969
16970 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
16971
16972         * mini.c, cfold.c, basic-calls.cs: preserve side effects
16973         on cond branch optimization (fixes bug# 71515).
16974
16975 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
16976
16977         * abcremoval.c: Fixed bug 71062.
16978         * abcremoval.h: Likewise.
16979
16980 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
16981
16982         * mini.c: Added a new functionality to optimize_branches, the removal
16983         of useless basic blocks, and fixed some problem in the removal of
16984         critical edges; some utility functions added for both purposes.
16985         * ssapre.c: Added complex expression support, and fixed bug 70637.
16986         * ssapre.h: Likewise.
16987         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
16988         enabled in SSAPRE.
16989         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
16990         * driver.c: Re-enabled SSAPRE.
16991
16992 2005-01-19  Martin Baulig  <martin@ximian.com>
16993
16994         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
16995         the result of mono_get_method_constrained().
16996
16997 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
16998
16999         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
17000         manager.
17001
17002 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
17003
17004         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
17005         be detected.  Fixes #59296.
17006
17007 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
17008
17009         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
17010         which can happen. Fixes #71361.
17011
17012 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
17013
17014         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
17015         manager.
17016
17017 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
17018
17019         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
17020         appdomain-unload.exe to fail.
17021         
17022         * mini.c: Fix some memory leaks.
17023
17024 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
17025
17026         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
17027         Fixed bug and sped up some codepaths.
17028
17029 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
17030
17031         * mini.c: Fix some memory leaks.
17032
17033         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
17034         conversion.
17035
17036         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
17037
17038         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
17039         #71320.
17040
17041         * iltests.il: Add regression test for #71320.
17042
17043 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
17044
17045         * mini.c (mono_codegen): Fix installation of profiler hooks.
17046
17047         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
17048
17049 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
17050
17051         * mini.h, mini.c, cfold.c: optimize access to enum
17052         readonly fields, too. Eval conditional branches if possible
17053         to perform unreachable code removal in more cases.
17054
17055 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
17056
17057         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
17058
17059         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
17060         code manager.
17061
17062         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
17063         WinXP DEP. Fixes #71244.
17064
17065 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
17066
17067         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
17068
17069 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
17070
17071         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
17072
17073 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
17074
17075         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
17076         changes.
17077
17078         * mini.h: Bump AOT version.
17079
17080         * mini.h (MonoCompile): Change exvar to a hash table.
17081
17082         * mini.c: Allocate a separate exvar for each handler block.
17083
17084         * mini.c: Get rid of the computation of filter_lengths, its not needed.
17085
17086         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
17087         ex var with the pending exception and only throw if the two are equal.
17088         Fixes #68552.
17089         
17090         * exceptions.cs: Add tests for rethrow and nested catch clauses.
17091
17092         * mini-x86.c: Fix warnings.
17093
17094         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
17095         used by all the ports now.
17096
17097         * aot.c: Add write-symbols and save-temps options.
17098
17099 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
17100
17101         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
17102
17103 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
17104
17105         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
17106         operations.
17107
17108         * tramp-s390.c: Check vtable slot belongs to the domain.
17109
17110         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
17111         as per other platforms.
17112
17113         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
17114
17115 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
17116
17117         * driver.c: we don't run the Main() code in a subthread anymore.
17118
17119 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
17120
17121         * mini.c: added experimental rtc support in the statistical
17122         profiler: if the user has the permission, more accurate statistics
17123         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
17124         The MONO_RTC value must be restricted to what the linux rtc allows:
17125         power of two from 64 to 8192 Hz.
17126
17127 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
17128
17129         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
17130
17131 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
17132
17133         * mini-ppc.c: better icache flush for smp.
17134
17135 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
17136
17137         * mini-amd64.c (emit_move_return_value): Fix memory leak.
17138
17139         * mini-x86.c (get_call_info): Add the get_call_info () code from the
17140         amd64 port, not yet used.
17141
17142 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
17143
17144         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
17145         a struct type.
17146
17147 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
17148
17149         * driver.c: Added --security option to activate the security manager.
17150         Right now this will allow code generation for declarative demands and
17151         is disabled when AOT is specified.
17152         * mini.c: Add code generation for declarative security demands.
17153         * mini.h: Add mono_use_security_manager as an extern gboolean.
17154
17155 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
17156
17157         * aot.c (mono_compile_assembly): Speed up compilation a bit by
17158         emitting more dense assembly code.
17159
17160         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
17161         exception throwing stuff.
17162
17163 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
17164
17165         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
17166         dead code.
17167
17168         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
17169         left in by mistake.
17170
17171         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
17172         fixed.
17173
17174         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
17175
17176         * tramp-*.c: Only patch vtable slots if the object is in the current
17177         domain. Fixes appdomain-unload.exe.
17178
17179         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
17180         
17181         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
17182         x86 branch.
17183
17184 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
17185
17186         * mini.c (reverse_branch_op): New helper function.
17187
17188         * mini.c (optimize_branches): Run the new optimization only on 
17189         platforms which support it. Also reverse all kinds of branches.
17190
17191         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
17192
17193         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
17194         a throw statement.
17195
17196         * mini.c (optimize_branches): Reverse not-equals branches if the false
17197         bblock is a throw. This happens a lot of time with argument checking in
17198         corlib.
17199
17200         * mini.c (mono_codegen): Add support for placing basic blocks after
17201         the function epilogue.
17202
17203         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
17204         function epilogue.
17205         
17206 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
17207
17208         * mini.c (setup_stat_profiler): Only set this up if the platform
17209         supports ITIMER_PROF.
17210
17211 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
17212
17213         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
17214         previous patch.
17215
17216         * inssel.brg: Fix a warning.
17217
17218 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
17219
17220         * mini.c: added support for statistical profiler 
17221         (run with: --profile=default:stat).
17222
17223 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
17224
17225         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
17226
17227         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
17228
17229         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
17230         related to global registers from the amd64 port.
17231
17232 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
17233
17234         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
17235
17236         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
17237         with global registers.
17238         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
17239
17240         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
17241
17242 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
17243
17244         * debug-mini.c (encode_value): Fix off-by-one.
17245
17246         * aot.c (encode_value): Likewise.
17247
17248         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
17249
17250 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
17251
17252         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
17253         AOT.
17254
17255         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
17256         
17257         * aot.c (emit_method_info): Increase size of temp buffer.
17258
17259         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
17260         the AOT case.
17261
17262 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
17263
17264         * aot.c (emit_method_info): Fix build.
17265         
17266         * aot.c: Further rework of the AOT file format to reduce the size of
17267         the method info data.
17268
17269         * mini.h: Bump AOT file format version.
17270
17271 2004-12-27  Martin Baulig  <martin@ximian.com>
17272
17273         * mini.c (mini_get_method): New static method; call
17274         mono_get_method_full() and mono_get_inflated_method().
17275         (mono_method_to_ir): Use mini_get_method() instead of
17276         mono_get_method_full(). 
17277
17278 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
17279
17280         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
17281
17282 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
17283
17284         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
17285
17286         * inssel-amd64.brg: Add some optimization rules.
17287
17288 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
17289
17290         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
17291         standard not GC'd stuff is fine.
17292
17293 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
17294
17295         * aot.c: Rework the AOT file format to get rid of most of the global
17296         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
17297
17298         * mini.h: Bump AOT file format version.
17299         
17300 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
17301
17302         * mini.h: Bump AOT file format version.
17303
17304         * aot.c (mono_aot_is_got_entry): New function to determine if an 
17305         address is inside a GOT.
17306
17307         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
17308
17309         * cpu-pentium.md: Increase the maximum size of some instructions which
17310         might involve a got access.
17311         
17312         * mini.c (get_method_from_ip): Another debug helper function.
17313
17314         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
17315         when got var accesses are created during the decompose phase.
17316
17317         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
17318
17319         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
17320         argument mini_compile_method and to MonoCompile, and use this to
17321         determine whenever a given method is compiled for AOT. This allows the
17322         other methods compiled during AOT compilation to be free of AOT stuff,
17323         so the backends does not need to add special support for them by
17324         creating a fake GOT etc.
17325
17326         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
17327         longer needed.
17328
17329 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
17330
17331         * mini.c (mono_method_to_ir): It turns out that some of the
17332         x-appdomain wrappers are lax with types, so just ignore this for
17333         all wrappers.
17334
17335         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
17336         at the vtable->klass. If it is non-shared code we can just use the
17337         vtable.
17338
17339 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
17340
17341         * mini-ppc.c: access MonoDomain from tls, too.
17342
17343 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
17344
17345         * declsec.c: Removed unused variable (and related warning ;-)
17346
17347 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
17348
17349         * iltests.il: New test for LDELEMA on an array of ref types.
17350
17351         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
17352         all ldelema's on reftypes.
17353         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
17354         it was the wrong place to put it.
17355
17356         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
17357         register to pop to make this cleaner, at the request of Paolo.
17358
17359 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
17360
17361         * mini-ops.h (OP_GETHASHCODE): New op.
17362
17363         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
17364
17365         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
17366         operation.
17367
17368         For a microbenchmark, this reduces the cost of Hashtable.get_Item
17369         by 25%.
17370         
17371         * mini-x86.c (mono_arch_output_basic_block): Rather than
17372
17373         add ebp, 4
17374
17375         Emit
17376
17377         pop edx
17378
17379         The first is 3 bytes while the second is 1. This saves 36 kb on
17380         mscorlib, quite a big saving. When bootstraping mcs, I was able to
17381         see a small boost because of icache locality.
17382
17383         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
17384
17385 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
17386
17387         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
17388         started code sharing with the generic code.
17389
17390 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
17391
17392         * mini-ppc.c, cpu-g4.md: added code for direct access to
17393         tls data slots.
17394
17395 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
17396
17397         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
17398          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
17399         to OP_TLS_GET.
17400
17401 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
17402
17403         * declsec.c|h: Added functions to cache the declarative stack modifiers
17404         in MonoJitInfo and to create a security frame from a MonoJitInfo 
17405         structure.
17406         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
17407         created. Register internal calls for System.Security.SecurityFrame::
17408         _GetSecurityFrame and _GetSecurityStack.
17409         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
17410         the definitions for the new stack walk/callback mechanism.
17411         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
17412         first security frame for LinkDemands and InheritanceDemands) and
17413         GetSecurityStack for Demands. Both use the new mono_walk_stack code
17414         from lupus.
17415         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
17416         walk initialization (lupus).
17417
17418 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
17419
17420         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
17421         idiom.
17422         (handle_loaded_temps): Do not create a temporary variable for
17423         things that we know are temps. They will never be modified.
17424         (mono_spill_call): Set MONO_INST_IS_TEMP
17425         (mono_emulate_opcode): ditto
17426         (emit_tree): ditto
17427         (mono_method_to_ir.CEE_DUP): ditto
17428
17429 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
17430
17431         * mini.c (type_to_eval_stack_type): Make this handle the void type
17432         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
17433         (emit_tree): use ip_in_bb to special case some common idioms
17434         Update all callers to pass in the IP.
17435         (mono_method_to_ir): Make CEE_CALL* do the above as well.
17436
17437         This gives us a nice 2% speedup in mcs bootstrap.
17438
17439         * mini-x86.c (peephole_pass): Peephole pass to make
17440         mov  [foo], eax
17441         push [foo]
17442
17443         into
17444
17445         mov [foo], eax
17446         push eax
17447
17448         * mini.c (ip_in_bb): new method.
17449         (mono_method_to_ir): use this method rather than doing the hash
17450         lookup ourselves.
17451
17452         * linear-scan.c (mono_linear_scan): When expiring actives, you
17453         don't need to keep around variables that expire on this
17454         instruction. This makes it so that:
17455              a = b + 1
17456         will turn into:
17457              store (ebx add (ebx, 1))
17458         which will become
17459              add ebx, 1
17460
17461 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
17462
17463         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
17464         combination to avoid doing two copies. Fix up problems with previous
17465         patch.
17466
17467         * mini.c: Fix 64 bit warnings.
17468
17469         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
17470
17471 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
17472
17473         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
17474         changes from the x86 code.
17475
17476         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
17477
17478 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
17479
17480         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
17481         throwing code to reduce its size, unify the AOT and non-aot code and 
17482         get rid of relocations in the AOT case.
17483
17484         * mini-x86.h mini.c exceptions-x86.c 
17485         (mono_arch_get_throw_corlib_exception): New arch specific function to 
17486         raise corlib exceptions which doesn't require relocations in the 
17487         caller.
17488
17489         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
17490
17491 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
17492
17493         * mini.c (mono_emit_method_call): Only allocate the got var when it is
17494         needed.
17495
17496         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
17497         in the AOT case.
17498
17499 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
17500
17501         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
17502         with add function when used from Inc/dec atomic 
17503         functions. Re-enabled optimization on x86.
17504         * mini-ops.h: renamed atomic_add functions to
17505         allow _add to match the Interlocked::Add and
17506         _add_next to match Interlocked::Inc/Dec.
17507
17508 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
17509
17510         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
17511         linking of BBs to the end BB, and enabled SSAPRE also with
17512         consprop and copyprop (which was prevented by that bug).
17513
17514 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
17515
17516         * mini-x86.c: disabling the Interlocked optimizing code. 
17517
17518 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
17519
17520         * aot.c (load_aot_module): Move reading of got_addr after the AOT
17521         file version check.
17522         
17523 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
17524
17525         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
17526         interlocked optimization due lack of support on x86, rewrote 
17527         exchange to take into account that base may be in eax.
17528         
17529         xsp works again; activated Interlocked optimizing code.
17530         
17531 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
17532
17533         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
17534
17535 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
17536
17537         * mini-ops.h: Add new opcodes.
17538
17539         * mini.h: Add new patch types. Add got_var to MonoCompile.
17540
17541         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
17542         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
17543         make it work with all kinds of patchable code.
17544
17545         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
17546         address of the GOT, and referencing entries in the GOT.
17547
17548         * mini.c: Add code to load the GOT address if needed by an opcode.
17549
17550         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
17551         independent AOT code on the x86 using an elf-style Global Offset Table.
17552
17553 2004-12-14  Raja R Harinath  <rharinath@novell.com>
17554
17555         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
17556
17557 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17558
17559         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
17560         when running xsp.
17561
17562 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
17563
17564         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
17565         of Interlocked:Increment/Decrement/Add as inline ops.
17566         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
17567
17568 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
17569
17570         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
17571         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
17572
17573 2004-12-12  Duncan Mak  <duncan@ximian.com>
17574
17575         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
17576         again. `patch_info->table_size' is no longer valid after Zoltan's
17577         commit #37636.
17578
17579 2004-12-12  Martin Baulig  <martin@ximian.com>
17580
17581         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
17582         if we are the "real" method, ie. not an inlined method inside it.
17583
17584 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
17585
17586         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
17587         before we look in the special fields table. This fixes
17588         ../tests/thread-static-init.cs.
17589
17590 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17591
17592         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
17593         for Array get_Rank and get_Length. Fixes bug #70465.
17594
17595 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
17596
17597         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
17598         separate structure to reduce the size of MonoJumpInfo.
17599
17600 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
17601
17602         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
17603
17604 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
17605
17606         * mini.c (mini_get_inst_for_method): Changed to allow ports
17607         to return a MonoInst instead of opcode 
17608         (renamed mini_get_opcode_for_method to better reflect the new functionality)
17609         
17610         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
17611         Allow ports to return a created MonoInst instead of op-code, will enable
17612         new optimizations.
17613         (renamed mini_get_opcode_for_method to better reflected the functionality)
17614
17615 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
17616
17617         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
17618
17619 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
17620
17621         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
17622         Fixes #69985.
17623
17624 2004-12-08  Martin Baulig  <martin@ximian.com>
17625
17626         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
17627         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
17628
17629 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
17630
17631         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
17632         correctly.
17633
17634         * exceptions.cs: Disable some tests which depend on properties of x86 fp
17635         arithmetic.
17636
17637 2004-12-08  Raja R Harinath  <rharinath@novell.com>
17638
17639         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
17640
17641 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
17642
17643         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
17644         bug introduced by the previous patch.
17645
17646 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
17647
17648         * mini-ppc.c, objectc.cs: handle large structs passed by value
17649         (fixes bug #69972).
17650
17651 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
17652
17653         * mini-ppc.c: OP_ARGLIST implementation from
17654         Geoff Norton  <gnorton@customerdna.com>.
17655
17656 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
17657
17658         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
17659         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
17660
17661 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
17662
17663         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
17664
17665 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
17666
17667         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
17668         support.
17669
17670 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
17671
17672         * mini-sparc.c: Zero out localled-ed memory.
17673
17674         * iltests.il: Add tests for zeroing out localloc-ed memory.
17675
17676 2004-12-04  Martin Baulig  <martin@ximian.com>
17677
17678         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
17679         mono_method_get_signature_full().       
17680
17681 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
17682
17683         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
17684         and some utility functions (always for SSAPRE), integrated SSAPRE.
17685         * mini.h: Likewise.
17686         * driver.c: Added ssapre option.
17687         * ssa.c: Small fix on OP_ARG handling.
17688         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
17689         * Makefile.am: Likewise.
17690
17691 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
17692
17693         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
17694         now in the xp code.
17695
17696         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
17697         icall.
17698
17699 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
17700
17701         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
17702         
17703         * cpu-s390.md : Increase instruction length of oparglist.
17704
17705         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
17706
17707 2004-11-30  Martin Baulig  <martin@ximian.com>
17708
17709         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
17710         virtual generic methods.  We call a special helper_compile_generic_method()
17711         icall to retrieve the method from the vtable, inflate and compile
17712         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
17713
17714         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
17715
17716 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
17717
17718         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
17719
17720 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
17721
17722         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
17723         Fixes #69929.
17724
17725 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
17726
17727         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
17728         platforms with PIC aot.
17729
17730 2004-11-28  Martin Baulig  <martin@ximian.com>
17731
17732         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
17733         Fixes gen-112.cs.
17734
17735 2004-11-28  Martin Baulig  <martin@ximian.com>
17736
17737         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
17738         the result of mono_type_get_underlying_type() to check whether
17739         we're byref.
17740
17741 2004-11-26  Martin Baulig  <martin@ximian.com>
17742
17743         * mini.c
17744         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
17745         in the g_assert().
17746
17747 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
17748
17749         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
17750         the same way as the other arguments so they won't get clobbered.
17751
17752         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
17753         calls through R11 since it is clobbered by the trampoline code.
17754
17755 2004-11-26  Raja R Harinath  <rharinath@novell.com>
17756
17757         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
17758         pick up in-tree mscorlib.dll.
17759
17760 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
17761
17762         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
17763
17764         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
17765         runtime data/code are now stored in a table similar to the GOT in ELF. 
17766         This allows the code itself to be position independent.
17767
17768         * aot.c: Fix loading of referenced assemblies after the lazy assembly
17769         loading changes.
17770
17771         * aot.c: Attach ELF type (object/function) directives to all global
17772         symbols.
17773
17774         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
17775
17776         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
17777
17778         * mini-amd64.h: Turn on PIC AOT code.
17779
17780         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
17781         returning the offset within an OP_AOTCONST instruction where the GOT
17782         offset needs to be added.
17783
17784         * mini.h: Bump AOT file format version.
17785
17786 2004-11-25  Martin Baulig  <martin@ximian.com>
17787
17788         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
17789         uninflated generic methods.
17790
17791 2004-11-25  Martin Baulig  <martin@ximian.com>
17792
17793         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
17794
17795 2004-11-24  Martin Baulig  <martin@ximian.com>
17796
17797         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
17798         original klass (this only applies for generic instances).
17799
17800 2004-11-24  Martin Baulig  <martin@ximian.com>
17801
17802         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
17803         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
17804         that array).
17805
17806 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
17807
17808         * mini.c (mono_method_to_ir): Disable inlining for methods containing
17809         localloc. Fixes #69678.
17810
17811         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
17812         
17813 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
17814
17815         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
17816         used SSE registers on pinvoke calls. Fixes #69774.
17817
17818 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
17819
17820         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
17821         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
17822
17823 2004-11-23  Raja R Harinath  <rharinath@novell.com>
17824
17825         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
17826         Refer directly to the mcs/ tree.
17827
17828 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
17829
17830         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
17831         Check if a trampoline for a synchronized method is required. 
17832
17833 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
17834
17835         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
17836         with localloc if needed. Throe arithmetric exception in
17837         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
17838         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
17839
17840 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
17841
17842         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
17843         types before switching on type.  Fixes #69622.
17844
17845 2004-11-19  Raja R Harinath  <rharinath@novell.com>
17846
17847         * Makefile.am (check-local): New.  Integrate into 'make check'.
17848         (MCS,RUNTIME): Define using in-tree mono and mcs.
17849         (ILASM): New.
17850         (%.exe): Use $(ILASM).
17851
17852 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
17853
17854         * mini-ppc.c: adjust initial prolog size (bug #69691).
17855
17856 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
17857
17858         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
17859         #69664.
17860
17861 2004-11-17  Raja R Harinath  <rharinath@novell.com>
17862
17863         * Makefile.am (clean-local): Rename from 'clean'.
17864
17865 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
17866
17867         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
17868         to mono_arch_is_int_overflow. 
17869         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
17870         SIGFPE events.
17871
17872 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
17873
17874         * declsec.c|h: New files to support declarative security attributes.
17875         Added function to check if a method has (applicable) security.
17876         * mini.c|h: Add check for declarative security attributes in
17877         mono_method_check_inlining.
17878         * Makefile.am: Added declsec.c and declsec.h to the build.
17879
17880 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
17881
17882         * mini.c, mini.h: update to keep dynamic code info per-domain.
17883
17884 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
17885
17886         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
17887         (mini_init): Get rid of it from here too.
17888
17889 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
17890
17891         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
17892         implemented OP_RETHROW (patch by Geoff Norton
17893         <gnorton@customerdna.com>).
17894
17895 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
17896
17897         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
17898         between appdomains.  Fixes appdomain-unload on PPC.
17899
17900 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
17901
17902         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
17903         mini-exceptions.c: handle the new wrapper types.
17904         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
17905         token value as a MonoClass* when compiling a wrapper.
17906         mono_jit_create_remoting_trampoline now takes an additional
17907         MonoRemotingTarget parameter.
17908         
17909 2004-11-10  Martin Baulig  <martin@localhost>
17910
17911         * mini.c (mono_method_to_ir): Use `generic_container->context'
17912         rather than creating a new one.
17913
17914 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
17915
17916         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
17917
17918         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
17919
17920 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
17921
17922         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
17923         the experimental aot cache stuff.
17924
17925 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
17926
17927         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
17928         mini-exceptions.c: update to exception clause structure changes.
17929
17930 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
17931
17932         * exceptions-x86.c (throw_exception): Fix warnings.
17933
17934         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
17935         for OP_RETHROW.
17936
17937 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
17938
17939         * exceptions-sparc.c (get_throw_exception): Really fix this.
17940
17941 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
17942
17943         * tramp-*.c: we no longer support icalls without wrappers, so
17944         a bit of code can be removed here
17945
17946 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
17947
17948         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
17949         patch.
17950
17951         * cpu-sparc.md: Add op_rethrow.
17952
17953         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
17954
17955         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
17956
17957         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
17958         * mini-ops.h: Add OP_RETHROW.
17959
17960         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
17961
17962         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
17963
17964 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
17965         
17966         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
17967         Makes the output much easier to read
17968
17969 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
17970
17971         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
17972         prevents another huge leak when compiling with ssa. Secondly, the
17973         performance of doing this rather than freeing the lists is much
17974         better. GList does a lock every time you allocate a list link,
17975         so that it can use a memory pool. So, it is better to just use
17976         a memory pool of our own.
17977         
17978         * ssa.c, linear-scan.c: replace g_list_remove_link with
17979         g_list_delete.  The remove one does not free the GList, so we were
17980         leaking memory. On -O=all --compile-all with corlib, this cut down
17981         3 MB of allocations.
17982
17983 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
17984
17985         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
17986
17987         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
17988
17989         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
17990         into a new function mono_create_jit_trampoline ().
17991
17992 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
17993
17994         * trace.c (get_spec): Allow tracing of classes without a namespace.
17995
17996 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
17997
17998         * mini.c: Fix pointer overwrite in mini_method_compile.
17999
18000 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
18001
18002         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
18003         The darwin ABI needs some special handling for 1 and 2 byte structs
18004         Lets use lbz/lhz instead of lwz everywhere.
18005         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
18006         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
18007         Use stb/sth for the former, and put the latter always on stack instead of in
18008         argument registers.
18009
18010 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
18011
18012         * trace.c (is_filenamechar): Add '_'.
18013
18014 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
18015
18016         * mini-s390.c: Fix prolog length to allow for large trace requirements.
18017
18018         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
18019
18020 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
18021
18022         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
18023         depends on libmonogc. Fixes #68805.
18024
18025 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
18026
18027         * mini.c (mono_jit_free_method): Provide extra information for
18028         this error.  Currently this leaks, but will be turned into a
18029         developer option in the future.
18030
18031 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
18032
18033         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
18034
18035 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
18036
18037         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
18038         boundary. Fixes reading of PATCH_INFO_R4 and R8.
18039         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
18040
18041 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
18042
18043         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
18044         trampolines for AOT code.
18045
18046 2004-10-22    <vargaz@freemail.hu>
18047
18048         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
18049         constructed types. Fixes #68136.
18050
18051 2004-10-21  Martin Baulig  <martin@ximian.com>
18052
18053         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
18054         if it returns true, unwind the stack to the call instruction.
18055
18056 2004-10-21    <vargaz@freemail.hu>
18057
18058         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
18059
18060         * mini.h: Bump AOT version number.
18061
18062         * objects.cs: Add another test for unbox trampolines.
18063
18064         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
18065         valuetype methods.
18066
18067 2004-10-20    <vargaz@freemail.hu>
18068
18069         * driver.c: Add SHARED to the set of optimizations tested.
18070
18071         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
18072
18073         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
18074         used by CEE_NEWARR.
18075
18076         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
18077
18078 2004-10-20  Martin Baulig  <martin@ximian.com>
18079
18080         * mini-exceptions.c (mono_handle_exception): Call
18081         mono_debugger_handle_exception() to tell the debugger about
18082         catch/finally clauses.
18083
18084 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
18085
18086         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
18087
18088         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
18089         #68447.
18090
18091 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
18092
18093         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
18094         methods as their native size, fixed bug #57543, #57545.
18095         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
18096         This saves a temporary register and mullw call down into 1 (minor perf
18097         increase for cases like sum = sum * 5;  This use to translate into:
18098             li r11,5
18099             mullw r28,r28,r11
18100         It now translates to
18101             mulli r28,r28,5
18102
18103 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
18104
18105         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
18106         #68388.
18107
18108 2004-10-11  Martin Baulig  <martin@ximian.com>
18109
18110         * mini.c (mono_method_to_ir): If we're a generic method, get the
18111         MonoGenericContainer from our MonoMethodNormal and create a
18112         MonoGenericContext from it.
18113
18114 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
18115
18116         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
18117
18118         * basic-long.cs: Add test for checked i8->i2 cast.
18119
18120 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
18121
18122         * inssel-ppc.brg: added a couple of speedup rules.
18123
18124 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
18125
18126         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
18127         to speed up rebuilds.
18128
18129 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18130
18131         * mini-s390.c: Minor fix to OP_OR_IMM.
18132
18133 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
18134
18135         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
18136         better. Fixes appdomain-unload.exe on sparc.
18137
18138 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
18139
18140         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
18141         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
18142         see bug 67324.
18143
18144 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
18145
18146         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
18147
18148 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
18149
18150         * mini.c: Always generate a field read/write wrapper for members
18151         of the class MarshalByRefObject since the actual instance could
18152         be a CBO.
18153
18154 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
18155
18156         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
18157
18158 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
18159
18160         * driver.c mini.h trace.c: Move the setting of the main assembly into
18161         a separate function called mono_trace_set_assembly () and call it after
18162         actually loading the main assembly. Fixes #66872.
18163
18164 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
18165
18166         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
18167         using the code manager.
18168
18169 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
18170
18171         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
18172
18173 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
18174
18175         * cpu-amd64.md: Fix bug in previous patch.
18176         
18177         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
18178         #66650.
18179
18180 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
18181
18182         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
18183         mini-exceptions.c: updates for changed stack walk interface.
18184
18185 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18186
18187         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
18188
18189 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
18190
18191         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
18192
18193 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
18194
18195         * driver.c (mini_regression_list): Do not call mono_assembly_close 
18196         since assemblies can't be unloaded.
18197         
18198 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
18199
18200         * cpu-amd64.md: Fix more instruction lengths.
18201
18202         * cpu-amd64.md: Fix lengths of some instructions.
18203
18204 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
18205
18206         * inssel.brg: Make the array ldelema check aot friendly.
18207
18208 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
18209
18210         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
18211
18212         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
18213
18214 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
18215
18216         * mini-x86.c: Fix build.
18217
18218         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
18219         mono_type_get_underlying_type () helper function to simplify code.
18220         
18221 2004-09-09  Martin Baulig  <martin@ximian.com>
18222
18223         * mini-amd64.c: Don't access `type->data.klass' directly, call
18224         mono_class_from_mono_type() instead since the type may be a
18225         generic instance.
18226
18227 2004-09-09  Martin Baulig  <martin@ximian.com>
18228
18229         * mini-amd64.c (get_call_info): Fix support for generic instances.
18230         (add_valuetype): Use mono_class_from_mono_type() to get the class
18231         since we can be a generic instance.
18232
18233 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
18234
18235         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
18236
18237 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
18238
18239         * liveness.c: reset spill costs on each scan: bug 62107
18240
18241 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
18242
18243         * exceptions-sparc.c (mono_arch_find_jit_info): remove
18244         unnecessary line that doesn't compile
18245
18246 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
18247
18248         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
18249         trampolines, make them call an error function so people can fix their
18250         code.
18251
18252 2004-09-06  Martin Baulig  <martin@ximian.com>
18253
18254         * mini.c (mono_method_to_ir): When initializing locals, handle a
18255         generic instances like a valuetype if it's a valuetype and like a
18256         class if it's a class.
18257
18258 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
18259
18260         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
18261         stack. Fixes #64674.
18262
18263         * exceptions.cs: Add test for unwinding of call arguments.
18264
18265 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
18266
18267         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
18268         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
18269         set the carry/borrow flag). The sparc and s390 implementations
18270         can now use optimized versions (and simplify the code). ppc bugfixes.
18271
18272 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
18273
18274         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
18275
18276 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
18277
18278         * inssel-amd64.brg: Remove leftover 32 bit rule.
18279
18280         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
18281
18282 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
18283
18284         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
18285         mono_arch_find_jit_info functions into a new function. Fix a memory
18286         leak.
18287
18288         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
18289         refactored code.
18290         
18291 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
18292
18293         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
18294         as well.
18295         
18296         * exceptions.cs: Add array size tests.
18297
18298         * mini.c: Allocate a separate icall wrapper for each arity of 
18299         mono_array_new_va. Fixes #59509.
18300
18301         * exceptions.cs: Add testcase for 64578.
18302
18303         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
18304
18305         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
18306         
18307 2004-09-02  Martin Baulig  <martin@ximian.com>
18308
18309         * mini.c (mono_method_to_ir): When initializing the locals, call
18310         handle_initobj() on the generic instance itself, not its
18311         underlying type.
18312
18313 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
18314
18315         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
18316         MonoJitInfo for dynamic methods.
18317
18318         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
18319
18320         * mini.c: Add support for freeing JIT data for dynamic methods.
18321         
18322 2004-09-01  Martin Baulig  <martin@ximian.com>
18323
18324         * mini-x86.c (is_regsize_var): Added support for generic
18325         instances.
18326         (mono_arch_emit_prolog): Make this compile again, use
18327         `x86_push_imm_template (code)'.
18328
18329 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18330
18331         * mini-x86.c: make all push_imm instructions that get
18332         patched always emit the long form
18333
18334 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
18335
18336         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
18337         in a per-domain hash.
18338
18339         * mini-amd64.c (merge_argument_class_from_type): Handle generic
18340         types.
18341
18342 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
18343
18344         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
18345         work.
18346         
18347         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
18348         work.
18349
18350         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
18351         Beginnings of SSE2 support.
18352
18353         * exceptions.cs: Add more tests for checked int<->uint casts.
18354
18355 2004-08-28  Martin Baulig  <martin@ximian.com>
18356
18357         * mini-x86.c (mono_arch_instrument_epilog): Added support for
18358         generic instances.
18359
18360         * mini.c
18361         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
18362         Handle generic instances recursively.
18363
18364 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
18365
18366         * iltests.il: test for conv.u8 on a constant
18367
18368 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
18369
18370         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
18371         LCONV_x4 (shrun_32 (membase)).
18372
18373 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
18374
18375         * inssel-x86.brg: c&p rules for push/setret of long
18376
18377 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
18378
18379         * inssel-x86.brg: c&p rules for compare (base, regvar) and
18380         compare (regvar, base)
18381
18382         * inssel-x86.brg: more burg love
18383
18384         * inssel.brg: more cleanup
18385
18386         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
18387
18388 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
18389
18390         * basic-long.cs, basic-calls.cs: new tests for optimization.
18391
18392 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
18393
18394         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
18395         patch.
18396
18397 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
18398
18399         * mini-amd64.c (read_tls_offset_from_method): Add another case.
18400         
18401 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
18402
18403         * inssel.brg (mini_emit_memcpy): use 
18404         NO_UNALIGNED_ACCESS to disable memcpy optimization
18405
18406 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
18407
18408         * mini-amd64.c: Handle generic types in various places.
18409
18410         * mini.c (mono_method_to_ir): Handle generic types in init locals.
18411
18412 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
18413
18414         * mini.c (handle_box): Fix warning.
18415
18416         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
18417
18418         * mini-amd64.h: Enable the emit_state optimization.
18419
18420         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
18421
18422         * mini-amd64.c: Add some new 64 bit peephole opts.
18423
18424         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
18425
18426         * cpu-amd64.md: sreg1 of div instructions must be %rax.
18427
18428         * mini-amd64.c: Register allocator fixes.
18429
18430         * mini.c: Add an optimization to emit_state to avoid allocation of new
18431         registers on some platforms.
18432
18433 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
18434
18435         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
18436
18437         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
18438         allocation. Fixes #63085.
18439
18440         * basic-long.cs: Add new regression test.
18441
18442         * mini-amd64.c: Register allocator improvements.
18443
18444 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
18445
18446         * mini-amd64.c (read_tls_offset_from_method): Add another code
18447         sequence.
18448
18449         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
18450         instruction sequence for nullifying class init trampolines.
18451
18452         * objects.cs: Add new regalloc test.
18453
18454         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
18455
18456 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
18457
18458         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
18459         
18460         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
18461         arguments.
18462
18463         * driver.c: Fix profiling after TLS changes.
18464         
18465         * driver.c (mono_main): Set mono_stats.enabled if needed.
18466
18467         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
18468         CEE_BOX.
18469
18470 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
18471
18472         * mini-x86.c: use a 1 op rather than a 2 op tls access
18473         instruction -> faster.
18474
18475 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
18476
18477         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
18478         x86 backend.
18479
18480 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
18481
18482         * exceptions-sparc.c (throw_exception): fix typo
18483
18484 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
18485
18486         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
18487         set tree->dreg correctly with tls. Allow any
18488         register to be used.
18489
18490         * mini-x86.c (read_tls_offset_from_method): add new code
18491         generation pattern seen with GCC.
18492
18493
18494 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
18495
18496         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
18497         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
18498         exceptions-sparc.c: fix some performance issues in exception
18499         handling and setting of the stack trace for exceptions that were
18500         already thrown.
18501
18502 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
18503
18504         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
18505         x86 backend.
18506         
18507         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
18508         registers.
18509
18510 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
18511
18512         This patch inlines tls access, when possible.
18513         
18514         * mini.h: new arch functions for TLS intrinsics.
18515         All platforms updated with a stub.
18516
18517         * mini.c: use the new intrinsics
18518
18519         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
18520         arch specific intrinsic for tls variables
18521
18522 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
18523
18524         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
18525         under windows.
18526
18527 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
18528
18529         * mini.c: thread local allocation
18530
18531 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
18532
18533         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
18534
18535         * Makefile.am: Link against the static version of libmonogc.
18536         
18537         * Makefile.am: Link the static versions of the convenience libraries
18538         into the mono executable.
18539
18540         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
18541
18542 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
18543
18544         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
18545         on integer overflow.
18546
18547         * mini-amd64.c: Reorganize function call code.
18548
18549         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
18550
18551 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
18552
18553         * inssel-x86.brg: use xor eax,eax.
18554         
18555         * basic.cs: new tests
18556
18557 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
18558
18559         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
18560         in exception throwing code.
18561         
18562 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
18563
18564         * inssel-x86.brg: use xor esi,esi.
18565
18566 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
18567
18568         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
18569         can trace methods compiled during mini_init () too.
18570
18571         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
18572         CEE_CONV_U4.
18573
18574 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
18575
18576         * Makefile.am: static link on x86 (r=zoltan)
18577
18578 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
18579
18580         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
18581         code since it causes some programs to fail.
18582
18583 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
18584
18585         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
18586
18587 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
18588
18589         * mini.c: ovfops_op_map - add STACK_OBJ case for
18590         CONV_I 
18591         * basic.cs: add test_0_pin_string as test
18592         case for above.
18593
18594 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
18595
18596         * Makefile.am: build C# if srcdir != builddir
18597
18598 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
18599
18600         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
18601         fall-through blocks.
18602
18603 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
18604
18605         * driver.c: enable loop by default again and include abcrem in -O=all.
18606
18607 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
18608
18609         * iltests.il: Add some localloc tests.
18610
18611         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
18612
18613         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
18614         Fixes #62574.
18615
18616         * inssel-amd64.brg: Add some optimizations.
18617
18618         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
18619         for gcc-3.4.
18620
18621         * Makefile.am: Statically link mono against libmono on AMD64.
18622         
18623         * mini-amd64.c inssel-amd64.brg: Optimizations.
18624
18625 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
18626
18627         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
18628
18629         * tramp-amd64.c: Patch calling code in trampolines.
18630
18631 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
18632
18633         * mini-amd64.c: pinvoke struct passing fixes.
18634
18635 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
18636
18637         * mini-sparc.c: redo change, make mono_arch_cpu_init call
18638         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
18639
18640 2004-08-05  Duncan Mak  <duncan@ximian.com>
18641
18642         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
18643         CEE_LDELEM_ANY.
18644
18645 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
18646
18647         * mini-amd64.c (emit_move_return_value): Move return value for normal
18648         calls too.
18649
18650 2004-08-05  Martin Baulig  <martin@ximian.com>
18651
18652         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
18653         `type->type'; just modify `type' itself when dealing with enums
18654         and generic instances.
18655         (check_call_signature): Make `simple_type' a `MonoType *'.
18656
18657 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
18658
18659         * mini.c: Use OP_PADD to add offsets to addresses.
18660
18661         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
18662
18663 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
18664
18665         * mini-sparc.c (mono_arch_emit_epilog): fix check
18666         for folding last op into restore instruction
18667
18668 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
18669
18670         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
18671         helper methods using the code manager.
18672         
18673         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
18674
18675         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
18676
18677 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18678         
18679         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
18680           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
18681
18682         * mini-s390.c: fix tail processing
18683
18684 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
18685
18686         * mini-ppc.c: mul.ovf.un exception name fix.
18687
18688 2004-08-03  Martin Baulig  <martin@ximian.com>
18689
18690         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
18691         instances; before jumping to `handle_enum', also modify `ptype'.
18692
18693 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
18694
18695         * cpu-sparc.md: fcall maximal length too small.
18696
18697 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
18698
18699         * mini-amd64.c mini.h: Add initial support for passing/returning 
18700         structures to/from pinvoked methods.
18701
18702 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
18703
18704         * mini-ppc.c: reg allocator fix.
18705
18706 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
18707
18708         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
18709
18710         * inssel.brg: Optimize memset on 64 bit machines.
18711
18712         * mini-amd64.c: Fix some vararg cases.
18713
18714 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18715
18716         * mini-s390.c: Corrected macro in emit_float_to_int
18717
18718         * s390-abi.cs: Tests to exercise the s390 ABI
18719
18720 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
18721
18722         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
18723         caller saved regs.
18724
18725         * basic.cs: Add a test for add.ovf.un.
18726
18727 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
18728
18729         * mini-sparc.c: add case for OP_IDIV_UN
18730
18731 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
18732
18733         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
18734         
18735         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
18736
18737 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
18738
18739         * basic.cs: regression tests.
18740
18741         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
18742         regressions.
18743
18744 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
18745
18746         * basic.cs: Add a new test.
18747
18748         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
18749         and AOT. Various fixes and optimizations.
18750
18751         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
18752
18753 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
18754
18755         * mini-ppc.c: make sure temp regs are not used for global reg
18756         allocation.
18757
18758 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
18759
18760         * cpu-sparc.md: conv_i8 fix for 64bits
18761
18762         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
18763
18764 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
18765         
18766         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
18767         add opcode for cmp BYTE PTR [eax], imm.
18768
18769         * inssel.brg: Make memcpy and memset takes bases.
18770
18771 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
18772
18773         * *-amd64.*: More AMD64 work.
18774         
18775 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
18776
18777         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
18778         add a compare-not-equal opcode.
18779         
18780 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
18781
18782         * mini.c: Use mono_init_from_assembly instead of mono_init.
18783         
18784 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
18785
18786         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
18787
18788         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
18789
18790         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
18791
18792         * inssel.brg: 64 bit fixes.
18793
18794         * mini.h (MonoCallInst): Add some AMD64 specific data.
18795
18796         * mini.h: Add some OP_P opcodes.
18797
18798 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
18799
18800         * basic.cs: tests for 61797 and 61740
18801
18802 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
18803
18804         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
18805         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
18806
18807 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
18808
18809         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
18810
18811         * *-amd64*.*: Ongoing AMD64 work.
18812
18813 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
18814
18815         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
18816
18817         * *-amd64*: Ongoing AMD64 work.
18818
18819         * mini-arch.h: Add AMD64 support.
18820
18821         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
18822
18823         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
18824
18825         * mini-ops.h: Add new opcodes.
18826
18827         * Makefile.am: Add AMD64 support.
18828
18829         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
18830         rules into the inssel-long*.brg files.
18831
18832         * *-amd64.*: Add beginnings of AMD64 backend.
18833
18834 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
18835
18836         * mini.c (print_dfn): commenting out the code that prints
18837         the cil. With -O=deadce, this makes -v -v crash.
18838         
18839         * cpu-pentium.md: make checkthis have a length of 2
18840
18841 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
18842
18843         * mini-sparc.h: fix implementations of __builtin
18844         functions for Sun compiler for V9.
18845
18846 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
18847
18848         * mini.c: use the new stelem.ref wrapper
18849         * exceptions.cs, arrays.cs: new stelem.ref tests
18850
18851 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
18852
18853         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
18854         new XSP should work with these changes).
18855
18856 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
18857         
18858         * inssel-{long32,x86,}.brg: trivial optimizations.
18859         
18860 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
18861
18862         * mini.c: load value when emitting box operation in
18863         constrained calls.
18864
18865 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
18866
18867         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
18868         is one byte shorter than cmp DWORD PTR [eax], 0.
18869
18870 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
18871
18872         * inssel-ppc.brg: arguments on the stack are always
18873         relative to the stack pointer (spotted by Neale Ferguson).
18874
18875 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18876
18877         * exceptions-x86.c: delay appending the method name to the trace until
18878         after mono_jit_info_table_find is called, as this gets the real
18879         MonoMethod.
18880
18881 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
18882
18883         * aot.c: register roots
18884
18885 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
18886
18887         * aot.c : I could just use PLATFORM_WIN32 flag.
18888
18889 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
18890
18891         * aot.c : Reverting the previous fix. This time it broke linux build.
18892
18893 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
18894
18895         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
18896
18897 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
18898
18899         * mini.c (handle_stack_args): Remove some more debugging code.
18900         
18901         * mini.c (handle_stack_args): Remove debug output left in by mistake.
18902
18903         * driver.c mini.h aot.c: Allow additional options to be specified with
18904         --aot and pass them to mono_compile_assembly.
18905
18906         * aot.c: Add experimental code to AOT compile all loaded assemblies
18907         on demand and save the code into a cache in the filesystem.
18908
18909         * aot.c: Add support for more wrapper methods.
18910         
18911         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
18912         58863.
18913
18914         * cpu-*.md: Remove removed opcodes.
18915
18916         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
18917         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
18918         related icalls to marshal.c.
18919
18920 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
18921
18922         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
18923
18924         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
18925
18926         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
18927
18928 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
18929         * liveness.c: If liveness is recomputated we need to reset the information
18930         for each variable. This way, if the liveness range has been narrowed
18931         by optimizations that happened after the last computation, we can return
18932         a smaller range.
18933         
18934         For example, if you have
18935         
18936         {
18937                 int i = 0;
18938                 
18939                 // Tons of code that does not affect i
18940                 
18941                 i = foo ();
18942                 ...
18943         }
18944         
18945         i = 0 is dead code and will be removed by SSA. However, when
18946         linear scan gets to the code, i will still appear to be live
18947         throughout the entire block. This prevents good register allocation.
18948
18949 2004-07-06  Martin Baulig  <martin@ximian.com>
18950
18951         * debug-mini.c (mono_debug_init_method): Allow
18952         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
18953         (mono_debug_add_icall_wrapper): New method.
18954
18955         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
18956
18957 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
18958
18959         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
18960         optimization.
18961
18962 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
18963
18964         * aot.c (mono_aot_load_method): Fix loading of debug info.
18965
18966 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
18967
18968         * aot.c: Add logging support.
18969
18970 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
18971
18972         * mini.h: Add prototype for mono_print_method_from_ip.
18973
18974         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
18975
18976         * inssel.brg: 64 bit fixes.
18977
18978         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
18979         inssel-long32.brg.
18980
18981         * Makefile.am: Add SPARC64 support.
18982
18983 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
18984
18985         * aot.c: Fix alignment problems on 32 bit platforms.
18986
18987 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
18988
18989         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
18990         SPARC64.
18991
18992         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
18993         problems.
18994
18995         * mini.h: Bump AOT file version. Some 64 bit fixes.
18996
18997 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
18998
18999         * inssel-sparc.brg: Add new rule to avoid register moves.
19000
19001         * inssel.brg: Add ldind_to_load_membase helper function.
19002
19003 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
19004
19005         * mini.c: OffsetToStringData intrinsic.
19006         
19007 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
19008
19009         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
19010
19011         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
19012         regression tests.
19013
19014         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
19015 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
19016
19017         * mini.c: reinstated mono_compile_get_interface_var()
19018         on x86, too, since the change breaks the Gtk# build there as well.
19019
19020 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19021
19022         * driver.c: remove loop from the default optimizations: it seems to
19023         interact badly with some of the other options (see bug #60613).
19024
19025 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
19026
19027         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
19028         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
19029
19030 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
19031
19032         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
19033         vararg-using methods.
19034
19035 2004-06-21  Martin Baulig  <martin@ximian.com>
19036
19037         * mini/mini-exceptions.c
19038         (mono_handle_exception): Added `gpointer original_ip' argument.
19039         After calling mono_unhandled_exception(), call
19040         mono_debugger_unhandled_exception() and if that returns true,
19041         restore the context and return.
19042
19043 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
19044
19045         * mini-ppc.c: prefer the use of relative branches so
19046         they won't need to be patched in aot code (patch from Patrick Beard).
19047
19048 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
19049
19050         * aot.c: patch from Patrick Beard to make the output assembly
19051         more correct for the MacOSX assembler. Small tweak to
19052         generate sane images on Linux/PPC, too.
19053
19054 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19055
19056         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
19057         case until bug #59509 is fixed (shows up in #60332).
19058
19059 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
19060
19061         * mini.c: make sure the needed wrappers are compiled, too, with
19062         precomp.
19063
19064 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
19065
19066         * driver.c: remove NPTL reference in --version output.
19067
19068 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19069
19070         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
19071         generate valid assembly for the Mach-O assembler.
19072
19073 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
19074
19075         * driver.c: don't include abcrem in the all optimization specifier
19076         since it slows down jit compilation too much for now.
19077
19078 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
19079
19080         * mini.c: use BIGMUL only if both operands have the same signage.
19081         * iltests.il: Test for bug 60056. (errors related to signage in
19082         BIGMUL).
19083
19084         r=lupus.
19085
19086 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
19087
19088         * mini.c, aot.c: memory leak fixes.
19089
19090 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
19091
19092         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
19093
19094 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
19095
19096         * Makefile.am: remove the -static hack completely, it links in
19097         statically glib as well.
19098
19099 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
19100
19101         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
19102         * exceptions.cs: make it compile with new mcs/csc.
19103
19104 2004-06-03 Massimiliano Mantione <massi@ximian.com>
19105         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
19106         and added relevant test case.
19107
19108 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
19109
19110         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
19111         regressions in gtk-sharp.
19112
19113 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
19114
19115         * exceptions.cs: New regression tests.
19116
19117         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
19118
19119 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
19120
19121         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
19122
19123 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
19124
19125         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
19126
19127         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
19128
19129 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
19130
19131         * mini.c (mono_jit_runtime_invoke): Init class in this
19132         method instead of trusting mono_jit_compile_method to
19133         do the work (because wrappers can be in object class)
19134
19135 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
19136
19137         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
19138
19139         * basic-long.cs: New regression test.
19140
19141 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
19142
19143         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
19144         and div/rem checks.
19145
19146 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
19147
19148         * Makefile.am: fix miguel's change to build mono statically against
19149         libmono (track build dependencies).
19150
19151 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
19152
19153         * cfold.c: Some glib versions do not have G_MININT32.
19154
19155 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
19156
19157         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
19158         with precision of tan, atan, sin and cos, and implemented related
19159         regressions tests (fixes bug 54467, but one new problem appeared and
19160         is not fixed yet).
19161
19162 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
19163
19164         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
19165
19166         * exceptions.cs: Add test for constant folding && division by zero.
19167
19168         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
19169         since driver.c is in libmono too, so the optimization was useless.
19170
19171         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
19172         variable to driver.c so the compiler can emit more efficient code to
19173         access them.
19174
19175 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19176
19177         * Makefile.am: don't distribute generated inssel.[ch] files.
19178
19179 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
19180
19181         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
19182         into the default appdomain. Fixes #58707.
19183
19184         * jit-icalls.c: Remove the broken approximation for truncl, doing
19185         no conversion is better.
19186
19187         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
19188         Fixes #58863.
19189
19190 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
19191
19192         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
19193         of the mcrxr instruction which is not available on some processors
19194         even if it's documented to be. Implement add and sub overflow correctly
19195         (still not complete for long unsigned). Speed up icalls a bit.
19196
19197 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
19198
19199         * mini.c (mono_jit_compile_method_with_opt): Make sure that
19200         we run .cctor in the current domain instead of target_domain.
19201         
19202         Fixes bug #58558, .cctor not being called in -O=shared.
19203
19204 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
19205
19206         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
19207
19208 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
19209
19210         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
19211         which can be done with an imm8, do it that way.
19212         (mono_arch_output_basic_block): ditto for a jmp
19213         (mono_arch_emit_prolog): Computate maximum offset of a label.
19214
19215 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
19216
19217         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
19218         now tries to allocate prefered physical reg's for virtual
19219         regs. This reduces the number of emited spills/loads with
19220         20-30% on our core assemblies.
19221
19222 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
19223
19224         * jit-icalls.c: truncl() is not needed and trunc() is
19225         the correct thing to do anyway (bug #58287).
19226
19227 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
19228
19229         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
19230         if available.
19231
19232 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
19233
19234         * driver.c: enable loop optimizations by default.
19235
19236 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
19237
19238         * mini-x86.c: fix calc of max loop size when aligning loops start.
19239
19240 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
19241
19242         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
19243         the stack.
19244
19245 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
19246
19247         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
19248         should set carry.
19249
19250         * basic-long.cs: Add tests for add/subtract of immediates with carry.
19251
19252         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
19253         
19254         * mini.c (inline_method): Allways inline some wrappers even if the cost
19255         is too large. Fixes #58785.
19256
19257         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
19258         
19259 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
19260
19261         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
19262         (crichton@gimp.org). Beginning of support for sparc/linux.
19263
19264         * mini-sparc.c: Optimize retrieval of LMF address.
19265
19266 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
19267
19268         * exceptions-ppc.c:  handle alloca in methods with clauses.
19269
19270 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
19271
19272         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
19273
19274 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
19275
19276         * mini.c: Delegate most of the abort signal work to 
19277           mono_thread_request_interruption, which also handles Stop and Suspend
19278           states.
19279
19280 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
19281
19282         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
19283         supports the save/restore lmf opcodes.
19284
19285 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
19286
19287         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
19288         by gcc-3.4 as well.
19289
19290         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
19291
19292 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
19293
19294         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
19295         methods which contain array accesses.
19296
19297         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
19298         boundaries. Fixes #58537.
19299
19300         * iltests.il: Add regression test for #58537.
19301
19302 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
19303
19304         * mini-x86.c (mono_arch_local_regalloc): Last part of
19305         fix for bug #58633 (releasing register to early).
19306
19307 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
19308
19309         * basic-long.cs: Add new regression test.
19310
19311 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
19312
19313         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
19314         register too early on the chain.
19315
19316 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
19317
19318         * mini.c (create_helper_signature): Use a helper function to reduce
19319         the code which needs to be written. Also set the calling convention of
19320         icalls on windows. Fixes #57840.
19321
19322 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
19323
19324         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
19325         exceptions-ppc.c: added helper function to get the instruction address
19326         from a signal handler context.
19327
19328 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
19329
19330         * helpers.c: use g_get_tmp_dir. Invokes happyness 
19331         from gonzalo.
19332
19333 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
19334
19335         * helpers.c: Add new env variable to pass args to objdump.
19336         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
19337
19338 2004-05-17  Radek Doulik  <rodo@ximian.com>
19339
19340         * Makefile.am (common_sources): added abcremoval.h so it get
19341         disted and daily mono packages on go-mono.com will build again
19342
19343 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
19344
19345         * abcremoval.c: Fixed coding style, added copyright header.
19346
19347         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
19348
19349         * mini.h: Added prototype for abc removal main function.
19350
19351         * build_relations_propagation_table.pl: Added copyright header.
19352
19353 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
19354
19355         * basic-long.cs: reg test for complex ceq_long bug.
19356
19357 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
19358
19359         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
19360         reg in long and clob case (bug #58343). Fixed/added comments.
19361
19362 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
19363
19364         * mini.c (mono_jit_runtime_invoke): Follow new convention
19365         of calling the invoke method with an function pointer.
19366
19367 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
19368
19369         * ChangeLog: Fix author of memory leak patch.
19370
19371 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
19372
19373         * Makefile.am: fix make dist as well...
19374
19375
19376 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
19377
19378         * cfold.c: Made so that conversions from pointer to int4 are no-ops
19379         on archs where pointers are 4 bytes long.
19380
19381         * Makefile.am: Added abcremoval.c source file.
19382
19383         * abcremoval.c: Added abcremoval.c.
19384
19385         * abcremoval.h: Added abcremoval.h.
19386
19387         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
19388
19389         * inssel.brg: Enabled bounds check removal.
19390
19391         * mini.c: Added support for abcrem optimization.
19392
19393         * mini.h: Added abcrem optimization label.
19394
19395         * driver.c: Added support for abcrem optimization.
19396
19397         * propagated_relations_table.def: Added propagated_relations_table.def.
19398
19399 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
19400
19401         * mini.c, cfold.c: fix style.
19402
19403 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
19404
19405         * mini.c: handle issue with the low-level implementation of
19406         some long opcodes (bug #54209).
19407
19408 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
19409
19410         * basic.cs: test for my new cmov stuff.
19411
19412 2004-05-13      Patrik Torstensson
19413
19414         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
19415         opt and added peephole documentation.
19416
19417 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
19418
19419         * tramp-ppc.c: rewrote the generic trampoline code.
19420
19421 2004-05-11      Patrik Torstensson
19422
19423         * mini-x86.c: optimize long shl/shr asm code (one less branch)
19424
19425 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
19426
19427         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
19428
19429         * mini.h mini.c dominators.c: Applied patch from Derek Woo
19430         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
19431
19432         * mini.c: Add new icalls for AsAny marshalling.
19433
19434 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
19435
19436         * tramp-ppc.c, mini-ppc.c: more cleanups.
19437
19438 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19439
19440         * mini.c: no warnings.
19441
19442 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19443
19444         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
19445
19446 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
19447
19448         * mini.c: In the thread abort signal handler, if the thread is in the
19449         process of being stoped, don't throw the Abort exception, just stop the
19450         thread.
19451
19452 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
19453
19454         * tramp-ppc.c: removed old code.
19455
19456 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19457
19458         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
19459         do some simple speed optimizations on ppc.
19460
19461 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
19462
19463         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
19464         and large offsets in load/store.
19465
19466 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
19467
19468         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
19469         it causes regressions.
19470
19471 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
19472
19473         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
19474         support.
19475
19476 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
19477
19478         * jit-icalls.c: remove warnings.
19479         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
19480         speedups for unsafe code.
19481
19482 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
19483
19484         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
19485
19486 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
19487
19488         * basic-calls.cs: Add new regression test.
19489
19490         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
19491         more portable.
19492
19493         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
19494
19495         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
19496         is no longer used.
19497
19498 2004-05-06      Patrik Torstensson
19499
19500         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
19501         long reg allocation in any reg (not only eax:edx) and implemented 
19502         long shl/shr ops in asm instead of helpers.
19503
19504 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
19505
19506         * mini-sparc.h: Fix warnings.
19507
19508         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
19509         stack.
19510
19511         * mini-exceptions.c (mono_handle_exception): Call the filter in a
19512         separate statement for clarity.
19513
19514         * mini-sparc.c: Update status.
19515
19516 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
19517
19518         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
19519         here.
19520
19521 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
19522
19523         * inssel-ppc.brg: another small pre-release workaround:
19524         we don't do overflow detection for long_sub_un.
19525
19526 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
19527
19528         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
19529         (also works around a weird ppc bug: 57957).
19530
19531 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
19532
19533         * tramp-ppc.c: trampoline fixes.
19534
19535 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
19536
19537         * mini-ppc.c: fixed typos.
19538
19539 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
19540
19541         * mini-ppc.c, exceptions-ppc.c: more code saves registers
19542         at the top of the stack. Fixed typos. Use a frame registers
19543         for all the methods with exception clauses.
19544
19545 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
19546
19547         * exceptions-ppc.c: restore fp registers.
19548
19549 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
19550
19551         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
19552         order from the stack top (moved the stack room to save the
19553         return value for trace after the param area). Fixed corruption
19554         in restoring registers on unwind.
19555
19556 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
19557
19558         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
19559
19560 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
19561
19562         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
19563         and prolog/epilog for methods that use it. Allow
19564         enough param area room for varargs methods. Fix miguel's
19565         breakage in exception handling.
19566
19567 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
19568
19569         * Makefile.am: run genmdesc only on current arch.
19570
19571 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19572
19573         * exceptions-x86.c:
19574         * mini-x86.h: fix the build on windows.
19575
19576 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
19577
19578         * 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.
19579
19580         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
19581
19582         * mini-exceptions.c: New file.
19583         
19584         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
19585         Move some parts of the x86 exception handling code to an 
19586         arch-independent file so it can be shared with other ports.
19587
19588 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
19589
19590         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
19591
19592 2004-04-26  David Waite  <mass@akuma.org>
19593
19594         * driver.c: remove comma from end of enumeration declaration
19595
19596 2004-04-26  Jackson Harper  <jackson@ximian.com>
19597
19598         * driver.c: parse config file before loading first assembly. This
19599         allows the user gac to be enabled/disabled. 
19600         
19601 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
19602
19603         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
19604         simpler mechanism: we do not care what is encoded initially
19605         (branch absolute or relative), we care about the code and its
19606         target.  I kept the old code for reference for now.
19607
19608         The new code tries first to determine if the jump is anywhere in
19609         the -/+32 absolute meg range, if it succeeds, it encodes using the
19610         absolute branch;  If not, it tried to find something in the
19611         relative range, if not, it uses the handle_thunk code. 
19612
19613 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
19614
19615         * exceptions-ppc.c: use the correct ip register on macosx.
19616
19617 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
19618
19619         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
19620
19621 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
19622
19623         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
19624         Raise exception on integer divide by zero by hand since the hw
19625         doesn't support it. Handle NaNs in FP compares.
19626
19627 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
19628
19629         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
19630         code reducing duplication between the platforms and enabled
19631         signal exception handling (on linux for now).
19632
19633 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
19634
19635         * exceptions-ppc.c: more macosx support.
19636
19637 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19638
19639         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
19640
19641 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
19642
19643         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
19644
19645 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
19646
19647         * iltests.il: more tests.
19648
19649 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
19650
19651         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
19652         vars as well.
19653
19654 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
19655
19656         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
19657
19658 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
19659
19660         * liveness.c: Mark variables as volatile in all basic blocks reachable
19661         from exception clauses.
19662
19663 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
19664
19665         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
19666         inlining.
19667
19668 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
19669
19670         * iltests.il, basic.cs: more tests for regalloc.
19671
19672 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
19673
19674         * iltests.il: Some tests for register allocation modifications
19675         I have locally.
19676
19677 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
19678
19679         * exceptions.cs: Add regression test for bug #56782.
19680
19681         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
19682         original stack trace if an exception is rethrown. Fixes #56782. Oh,
19683         the beauty of fixing the same thing in 5 different files...
19684
19685 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
19686
19687         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
19688         methods.
19689
19690 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
19691
19692         * mini.c: Add support for STRWLPARRAY marshalling convention.
19693
19694 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
19695
19696         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
19697         to init the context to setup the regs pointer).
19698
19699 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
19700
19701         * exceptions-ppc.c: more exceptions work.
19702
19703 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
19704
19705         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
19706         not allowed.
19707
19708 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
19709
19710         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
19711         can use the memory directly.
19712
19713         * cpu-pentium.md: Update documentation from a post from Zoltan. 
19714
19715         add x86_add_membase, x86_sub_membase, x86_mul_membase
19716
19717 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
19718
19719         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
19720         GENERAL_REGS they were also hardcoded for all PPC ports.
19721
19722         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
19723
19724         Remove hard-coded limit for floating point registers, use
19725         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
19726
19727         Notice that in MacOS X calling conventions you can fit a lot more
19728         floating point values in registers, so I should update the PInvoke
19729         test to excercise the passing of floating point values on the
19730         stack (currently broken).
19731         
19732 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
19733
19734         * tramp-ppc.c (create_trampoline_code): Added
19735         JUMP_TRAMPOLINE_SIZE. 
19736         (ppc_magic_trampoline): Follow the pattern from
19737         x86_magic_trampoline: if code is set to zero, return. 
19738         (create_trampoline_code): Always pass MonoMethod to the jump
19739         trampoline, before it was passing a null.
19740         (mono_arch_create_jump_trampoline): Implement the jump stub, could
19741         share the code with mono_arch_create_jit_trampoline. 
19742
19743         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
19744         implemented.
19745         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
19746         implemented.  
19747
19748         * cpu-g4.md: Added length for jmp instruction, the worst case
19749         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
19750         for save_lmf).
19751
19752 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
19753
19754         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
19755
19756 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
19757
19758         * mini.c: Only set bblock->real_offset when adding a new bblock, and
19759         before each IL instruction.
19760
19761         * mini.c (CEE_BOX): Fix warnings.
19762
19763 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19764
19765         * mini.c: removed a few unused vars and extra whitespace.
19766
19767 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
19768
19769         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
19770         checks.
19771         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
19772         index.
19773         (OP_GETCHR): use the above
19774         (CEE_LDELEMA): use the above.
19775
19776         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
19777         version of the generic impl.
19778         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
19779         (CEE_LDELEMA): use the above.
19780
19781 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
19782
19783         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
19784         Fixes #56317.
19785
19786         * iltests.il: Added new regression test for #56317.
19787
19788 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
19789
19790         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
19791         under NetBSD. Fixes #56450.
19792
19793         * liveness.c (update_gen_kill_set): Fix previous patch.
19794
19795 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19796
19797         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
19798
19799 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
19800
19801         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
19802         ldsfld and ldsflda.
19803
19804         * inssel-sparc.brg: Add more optimizations.
19805
19806         * mini-sparc.c: Replace multiply/divide with shifts if possible.
19807
19808 2004-04-01  Martin Baulig  <martin@ximian.com>
19809
19810         * mini.c (handle_box): New static function; moved the
19811         implementation of CEE_BOX here.
19812         (mono_method_to_ir): Added `constrained_call' variable.
19813         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
19814         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
19815         mono_method_get_constrained() to get the method.
19816
19817 2004-04-01  Martin Baulig  <martin@ximian.com>
19818
19819         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
19820         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
19821         (mono_method_to_ir): We don't need these macros anymore since
19822         mono_class_get_full() already takes care of it. 
19823
19824 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19825
19826         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
19827         use @function (as doesn't accept #function here) and check the return
19828         value of system and stop if fails.
19829
19830 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19831
19832         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
19833
19834 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
19835
19836         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
19837
19838         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
19839
19840         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
19841         #56223.
19842
19843         * basic-long.cs: Add test for negation of Int64.MinValue.
19844
19845 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
19846
19847         * mini-sparc.c: Update status.
19848
19849         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
19850
19851         * exceptions-sparc.c: Fix return value in filters.
19852
19853         * inssel-sparc.brg: Fix register allocation in some rules.
19854
19855 2004-03-28  Martin Baulig  <martin@ximian.com>
19856
19857         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
19858         if neccessary.  
19859
19860 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
19861
19862         * mini-x86.c (mono_arch_patch_code): Fix warnings.
19863         
19864         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
19865         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
19866         remove unused conv_u4 opcode.
19867
19868         * mini-x86.c: Remove valgrind workaround since it slows down things
19869         even when mono is not run under valgrind.
19870
19871 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
19872
19873         * mini-sparc.c: Update status.
19874
19875         * inssel-sparc.brg: Add some optimizations.
19876
19877         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
19878         future delay slot filling. Add support for varargs, tail calls and JMP.
19879
19880         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
19881         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
19882
19883         * inssel.brg: Fix register allocation in OP_ARGLIST.
19884
19885         * inssel.brg: Fix warnings.
19886
19887 2004-03-25  Martin Baulig  <martin@ximian.com>
19888
19889         * mini.c (inflate_generic_field): Removed.
19890         (mini_get_method): Removed, use mono_get_method_full(),
19891         (mini_get_class): Removed, use mono_class_get_full().
19892         (mono_method_to_ir): Pass our generic context to
19893         mono_field_from_token().        
19894
19895 2004-03-25  Martin Baulig  <martin@ximian.com>
19896
19897         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
19898         of a `MonoMethod *'.
19899         (mini_get_method): Take a `MonoGenericContext *' instead
19900         of a `MonoMethod *'.
19901         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
19902         a new local variable called `generic_context' which holds the
19903         current `MonoGenericContext *'; use it to lookup things.
19904
19905 2004-03-24  Martin Baulig  <martin@ximian.com>
19906
19907         * mini.c (mini_get_class): New static method; if we're inside a
19908         generic instance, inflate the class if neccessary.
19909         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
19910
19911 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
19912
19913         * iltests.il: New regression test for #55976.
19914
19915         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
19916         #55976.
19917
19918 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
19919
19920         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
19921         output.
19922
19923 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
19924
19925         * liveness.c: Consider SSA stores as well as loads when making vars
19926         volatile.
19927
19928         * exceptions.cs: New regression tests for register allocation.
19929         
19930 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
19931
19932         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
19933         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
19934           domain lock only to protect puntual access to data structures.
19935           Added access lock for sighash, jit_icall_hash_name, 
19936           jit_icall_hash_addr and domain->code_mp.
19937
19938 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
19939
19940         * driver.c: Print SIGSEGV handling method.
19941
19942         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
19943
19944         * mini.c (setup_jit_tls_data): Handle case when this is called
19945         multiple times for a thread.
19946
19947         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
19948         is different from fbxx_un. Fixes #54303. Also use constants instead of
19949         magic numbers in a lot of places.
19950
19951 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
19952
19953         * exceptions.cs: Fix cctor test when --regression is used.
19954
19955 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
19956
19957         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
19958         for Linux/ppc.
19959
19960 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
19961
19962         * inssel-ppc.brg: fixed register assignments for some rules.
19963
19964 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
19965
19966         * exceptions.cs: Add test for exceptions in static constructors.
19967
19968         * mini.c (mono_jit_compile_method_with_out): Move the calling of
19969         static constructors outside the domain lock. Fixes #55720.
19970
19971 2004-03-17  Martin Baulig  <martin@ximian.com>
19972
19973         * mini.c (get_generic_field_inst): Removed, this'll never happen.
19974         (inflate_generic_field): Take the `MonoMethod *' instead of the
19975         `MonoClass *' and added support for generic method.
19976         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
19977         have a `field->parent->gen_params', only inflate the field if it's
19978         an open constructed type.
19979
19980 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
19981
19982         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
19983         exception object instead of the preconstructed ones.
19984
19985 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19986
19987         * mini.c: reverted changed to sigsegv_signal_handler commited
19988         accidentally in the previous patch.
19989
19990 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19991
19992         * mini.c:
19993         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
19994         running --aot with an old assembly.
19995
19996 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
19997
19998         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
19999         point values.
20000
20001         * mini-sparc.c: Add support for v9 branches with prediction.
20002
20003 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
20004
20005         * mini.c (mini_init): #warning is GNUC only
20006
20007         * mini-sparc.h: implement __builtin_frame_address
20008         and __builtin_return_address for Sun C compiler
20009
20010 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
20011
20012         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
20013
20014 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
20015
20016         * basic-calls.cs: Add test for unaligned byref long argument passing.
20017
20018         * mini-ops.h: Add sparcv9 compare and branch instructions.
20019
20020         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
20021         v9 instructions if we have a v9 cpu.
20022
20023         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
20024         registers for global allocation.
20025
20026         * exceptions-sparc.c: Fixes.
20027         
20028 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
20029
20030         * liveness.c (mono_analyze_liveness): Optimized version.
20031
20032         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
20033
20034         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
20035         sparc work.
20036
20037         * basic-float.cs basic-calls.cs: New regression tests.
20038
20039 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
20040
20041         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
20042         sigaltstack implementation.
20043
20044         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
20045         
20046         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
20047         stuff if SIGSEGV_ON_ALTSTACK is not defined.
20048
20049 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
20050
20051         * mini.c: Fix warnings.
20052         
20053         * mini.c (mono_resolve_patch_target): New function which contains the
20054         arch independent part of the patching process.
20055
20056         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
20057         patching code to a separate function.
20058
20059 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
20060
20061         * mini.c (add_signal_handler): ifdef out on Windows
20062
20063 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
20064
20065         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
20066         cpu-sparc.md: Add exception handling support + other fixes.
20067
20068         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
20069         typed GC detection in --version.
20070
20071         * basic.cs exceptions.cs: New regression tests.
20072
20073         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
20074         the arch specific code can store data during a compilation.
20075
20076         * mini-ops.h: Add OP_SETFRET.
20077
20078         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
20079         function, register a separate icall for each arity, so the icalls can
20080         get a wrapper.
20081         
20082         * mini.c (mono_print_tree): Print negative offsets in a more readable
20083         form.
20084         
20085         * mini.c: Make signal handling work on sparc.
20086         
20087         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
20088
20089         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
20090
20091         * jit-icalls.c: Emulate truncl by aintl on solaris.
20092
20093         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
20094
20095 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
20096
20097         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
20098
20099 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
20100
20101         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
20102         a MarshalByRef type, inline a method that performs the check, taking into
20103         account that the object can be a proxy. Also implemented tow new opcodes:
20104         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
20105         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
20106         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
20107
20108 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
20109
20110         * mini-ppc.c: if a relative branch displacement is too big
20111         but it points to and area reachable with an absolute branch, 
20112         avoid the thunks.
20113
20114 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
20115
20116         * mini.c: optimize small copies in cpblk.
20117
20118 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
20119
20120         * basic-calls.cs basic-float.cs: New regression tests.
20121
20122         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
20123         negative offsets from %fp. Implement localloc. Fix local register 
20124         allocation. Fix the case when the this argument needs to be saved to
20125         the stack. Implement some missing opcodes.
20126
20127 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
20128
20129         * mini.c (mini_method_compile): Reenable global regalloc in methods
20130         with exception handlers.
20131
20132         * linear-scan.c (mono_varlist_sort): Fix warning.
20133
20134         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
20135
20136         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
20137         regalloc costs.
20138
20139         * liveness.c: Make all variables uses in exception clauses volatile, to
20140         prevent them from being allocated to registers. Fixes #42136.
20141
20142 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
20143
20144         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
20145         causes regressions.
20146
20147         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
20148         argument to mono_arch_regalloc_cost.
20149
20150         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
20151         precisely.
20152
20153 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
20154
20155         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
20156         Make the cost of allocating a variable to a register arch dependent.
20157
20158         * basic-calls.cs: Fix compilation of tests.
20159         
20160         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
20161         helper function to cut back on the number of #ifdefs needed.
20162
20163         * mini-ppc.c: Fix compilation.
20164
20165         * basic-calls.cs: New regression tests.
20166
20167         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
20168
20169         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
20170         of l0 since that is callee saved.
20171
20172         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
20173         to virtual calls.
20174
20175         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
20176         of delay instruction.
20177
20178         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
20179
20180         * mini.h (MonoCallInst): Add 'virtual' flag.
20181
20182         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
20183
20184 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
20185
20186         * *.cs: New regression tests.
20187
20188         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
20189         work.
20190
20191         * mini.c (mono_runtime_install_handlers): Fix build.
20192
20193         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
20194         'signal_stack_size' members.
20195
20196         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
20197         alternate signal stack.
20198
20199         * exceptions-x86.c: Add stack overflow handling.
20200
20201         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
20202         functions to arch independent code.
20203
20204         * mini.c (mono_print_tree): Print more detailed info for load_membase
20205         opcodes.
20206         
20207 2004-02-23  Martin Baulig  <martin@ximian.com>
20208
20209         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
20210
20211 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
20212
20213         * mini-x86.c: fixed reg allocation for div/rem.
20214
20215 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
20216
20217         * driver.c (mono_main): Report some configuratio options on --version.
20218
20219 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
20220
20221         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
20222         low in the address space. Correctly flush memory in thunks where we
20223         output native code.
20224
20225 2004-02-20  Martin Baulig  <martin@ximian.com>
20226
20227         * mini.c (mini_get_method): New static method; inflate all generic
20228         methods and methods in open generic instances.
20229         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
20230         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
20231
20232 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
20233
20234         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
20235
20236         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
20237
20238 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
20239
20240         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
20241
20242         * mini-sparc.c (flushi mono_arch_output_basic_block): make
20243         it compile using Sun's compiler.
20244
20245 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
20246
20247         * 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.
20248
20249         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
20250
20251 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
20252
20253         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
20254         code.
20255         * mini-ppc.c: handle calls outside of the allowed range with thunks
20256         allocated using the code manager.
20257         * tramp-ppc.c: use the code manager to hold generated native code.
20258         Fixed the magic trampoline to just patch vtable entries.
20259
20260 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
20261
20262         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
20263         independent file.
20264
20265 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
20266
20267         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
20268         PPC.
20269
20270         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
20271         if we have a working __thread implementation.
20272
20273         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
20274         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
20275
20276 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
20277
20278         * mini-x86.c: Fix compilation under gcc 2.
20279         
20280 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
20281
20282         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
20283         contains a call to the wrapped function.
20284
20285         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
20286         OP_<CALL>_IMM opcodes, and use them under X86.
20287         
20288         * mini.c (mono_jit_find_compiled_method): Fix warning.
20289
20290         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
20291
20292         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
20293
20294         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
20295         functionality to mini.c.
20296
20297         * mini.c (mono_create_jump_trampoline): New function to create a jump
20298         trampoline. Return a compiled method instead of a trampoline if it
20299         exists. Add a cache for jump trampolines.
20300
20301         * mini.c (mono_jit_find_compiled_method): New function to return a
20302         compiled method if it exists.
20303
20304         * mini-x86.c: Call mono_create_jump_trampoline instead of 
20305         mono_arch_create_jit_trampoline.
20306
20307         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
20308         a jump trampoline. Fixes #52092.
20309         
20310 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
20311
20312         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
20313         which is not up-to-date. Add check_corlib_version () instead.
20314
20315         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
20316         have to call it.
20317         
20318         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
20319         since newer valgrind versions do not need it.
20320
20321         * mini.c (mono_jit_compile_method_with_opt): New helper function to
20322         compile a method with a given set of optimizations.
20323
20324         * mini.c: Compile icall wrappers on-demand instead of at startup.
20325
20326         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
20327         wrapper for an icall.
20328
20329 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
20330
20331         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
20332         #54063.
20333
20334         * iltests.il: Add test for non-empty stack before switch instruction.
20335
20336 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
20337
20338         * mini.c: Add support for new stringbuilder marshalling conventions.
20339
20340         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
20341
20342 2004-02-01  Martin Baulig  <martin@ximian.com>
20343
20344         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
20345         in `ginst->mtype_argv'.
20346
20347 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
20348
20349         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
20350         facilitate grepping.
20351
20352 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
20353
20354         * mini.c: fixed buglet in initobj generic implementation for references.
20355
20356 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
20357
20358         * Makefile.am: make the version script conditional.
20359         * jit-icalls.c: handle missing truncl().
20360
20361 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
20362
20363         * exceptions.cs: Add more tests for double->int conversion.
20364
20365         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
20366         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
20367
20368 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
20369
20370         * driver.c: make --verbose --version emit an error
20371         if the loaded corlib doesn't match the runtime version.
20372
20373 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
20374
20375         * mini-ppc.h: export ppc_patch().
20376         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
20377         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
20378         on par or better than on MacOSX.
20379
20380 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
20381
20382         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
20383         mono_lookup_pinvoke_call.
20384
20385         * mini-x86.c: Under windows, the default pinvoke calling convention is
20386         stdcall. Fixes #52834.
20387
20388         * mini.c (optimize_branches): Add an upper bound to the number of
20389         iterations to prevent infinite loops on strange loops. Fixes #53003.
20390
20391 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
20392
20393         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
20394         and ISINST. Fixes #52093.
20395
20396         * objects.cs (test_0_vector_array_cast): New tests.
20397         
20398 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
20399
20400         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
20401         checking in Array.Set ().
20402
20403         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
20404         #52590.
20405
20406         * object.cs (test_0_multi_array_cast): New regression test.
20407
20408 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
20409
20410         * exceptions-ppc.c: fix build on Linux/PPC.
20411
20412 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
20413
20414         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
20415         running under valgrind.
20416         (x86_magic_trampoline): Fix build bustage.
20417
20418         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
20419         negative values as well. This is needed for the encoding of the line number
20420         info, since sometimes the line numbers are not in increasing order.
20421
20422 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
20423
20424         * cpu-pentium.md (localloc): Increase the size of the localloc 
20425         instruction since it is a loop under Win32.
20426
20427         * debug-mini.c (record_line_number): Get rid of unneccesary memory
20428         allocation.
20429
20430 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
20431
20432         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
20433         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
20434         Max Horn (max@quendi.de). Fix file names in comments.
20435
20436 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
20437
20438         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
20439         avoid stack overflow.
20440         (replace_usage): Avoid uninitialized variable warnings.
20441
20442         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
20443         and taking the address of valuetype variables.
20444
20445 2004-01-03  Patrik Torstensson
20446
20447         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
20448         for other purposes than FP later on.
20449
20450 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
20451
20452         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
20453         of tail calls.
20454
20455 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
20456
20457         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
20458
20459 2003-12-30  Patrik Torstensson <p@rxc.se>
20460
20461         * mini-x86.h: Decreased number of availiable fp regs.
20462         Solves corner cases with FP spilling.
20463
20464 2003-12-23  Patrik Torstensson <p@rxc.se>
20465
20466         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
20467         for floating point stack tracking / spilling on x86. 
20468         Fixes bug #49012.
20469         
20470         * basic-float.cs: added float mul overflow test.
20471
20472 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
20473
20474         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
20475
20476 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
20477
20478         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
20479         supports for cond branches that overflow the immediate
20480         overflow offset. mcs can compile simple programs.
20481
20482 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
20483
20484         * exceptions-ppc.c: exception handling support wip:
20485         finally handlers get run on exception.
20486
20487 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
20488
20489         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
20490         profiling.
20491
20492 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
20493
20494         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
20495         initial support for stack walking and unwinding.
20496
20497 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
20498
20499         * driver.c (mono_main): Make corlib-out-of-sync message more 
20500         descriptive. Also remove verify_corlib call.
20501
20502 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
20503
20504         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
20505         not overlap with other call's arguments, too.
20506
20507 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
20508
20509         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
20510         move to arch-specific code the choice of arch-specific
20511         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
20512         * mini.c: ensure emulation calls will not interleave
20513         with other calls.
20514
20515 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
20516
20517         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
20518         the magic trampoline stack frame is dropped before executing
20519         the new method.
20520
20521 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
20522
20523         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
20524         and integer to fp conversions. Added support for overflowing
20525         arguments on the stack. Reserve a couple more registers as temps.
20526         Added support for aot compilation (as output still needs to be
20527         tweaked, though).
20528
20529 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
20530
20531         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
20532         Don't overwrite return register in some corner cases.
20533
20534 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
20535
20536         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
20537         static constructors when AOT compiling.
20538
20539         * driver.c (mono_main): Call mono_check_corlib_version.
20540
20541 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
20542
20543         * cpu-g4.md, basic.cs: fixed div target register.
20544
20545 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
20546
20547         * mini-ppc.c, basic.cs: shl_imm fix with test.
20548
20549 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
20550
20551         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
20552         structures by value. Misc fixes.
20553         * objects.cs: more tests.
20554
20555 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
20556
20557         * mini-ppc.c: lconv.ovf.i implemented.
20558
20559 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20560
20561         * mini.c:
20562         (mini_init): don't error out if someone already called g_thread_init.
20563
20564 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
20565
20566         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
20567         to be any type per the spec. Fix abnormal memory usage when
20568         the same object is repeatedly thrown.
20569
20570 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
20571
20572         * mini.c: check for overruns in IL code.
20573
20574 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
20575
20576         * TODO: Add/remove some todo entries.
20577
20578 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
20579
20580         * driver.c (mono_main): Call mono_verify_corlib.
20581
20582 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
20583
20584         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
20585         This has been moved to mini.c
20586         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
20587         type being casted is marshalbyref it could be a proxy, so instead of
20588         emitting the type check code, emit a call to a runtime method that will
20589         perform the check by calling CanCastTo if needed.
20590
20591 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
20592
20593         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
20594         methods with large stack frames under Win32.
20595
20596 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
20597
20598         * Makefile.am: Distribute regression tests.
20599
20600         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
20601         at the end instead of inserting each variable into the sorted list.
20602
20603         * linear-scan.c (mono_varlist_sort): New helper function.
20604         
20605 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
20606
20607         * mini.c: ensure arguments and locals are within bounds.
20608
20609 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
20610
20611         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
20612         related fixes.
20613
20614 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
20615
20616         * mini.c (mono_cprop_copy_values): Fix crash.
20617
20618         * aot.c: Set verbosity back to 0.
20619         
20620 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
20621
20622         * regalloc.c: complete memory leak fix by Laurent Morichetti
20623         (l_m@pacbell.net).
20624
20625 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
20626
20627         * driver.c (main_thread_handler): Revert the previous patch.
20628
20629         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
20630         under valgrind.
20631
20632         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
20633         memory from the memory pool.
20634
20635         * driver.c (main_thread_handler): Turn on all optimizations when
20636         --aot is used.
20637
20638         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
20639         an array for better performance.
20640
20641         * regalloc.c (mono_regstate_assign): Fix memory leak.
20642
20643         * debug-mini.c (mono_debug_serialize_debug_info): New function to
20644         serialize the debug info.
20645
20646         * debug-mini.c (mono_debug_add_aot_method): New function to load the
20647         debug info from the serialized representation.
20648
20649         * aot.c: Save debug info into the generated file and load it when 
20650         loading a method.
20651
20652         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
20653
20654 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
20655
20656         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
20657         More FP-related fixes.
20658
20659 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
20660
20661         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
20662         and register allocation buglet. Hello world now runs.
20663
20664 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
20665
20666         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
20667         * tramp-ppc.c: fixed class init trampoline.
20668         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
20669
20670 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
20671
20672         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
20673         mini.c: more ppc changes/fixes.
20674
20675 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
20676
20677         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
20678         Also optimize the case when the arguments are the same in the caller 
20679         and in the callee.
20680
20681         * iltests.il: Add tests for tail calls with valuetype arguments.
20682
20683 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
20684
20685         * mini-ppc.c: fixes for struct return type.
20686
20687 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
20688
20689         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
20690         mono_spillvar_offset() to arch-specific code.
20691
20692 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
20693
20694         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
20695
20696 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
20697
20698         * exceptions-x86.c: Fix stack space leaks.
20699         
20700         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
20701         registers from the lmf if the method has save_lmf set.
20702
20703 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
20704
20705         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
20706         of icall wrappers into InvokeInDomain, since these are now per-domain.
20707
20708 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
20709
20710         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
20711         make some opcode emulation and intrinsic ops enabled/disabled 
20712         according to the architecture. More fixes.
20713
20714 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
20715
20716         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
20717
20718 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
20719
20720         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
20721         arch-specific handling for 'this' and struct return type to
20722         arch-specific code.
20723
20724 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20725
20726         * aot.c: prevent divide by zero error when reporting (it happened with
20727         Accessibility.dll).
20728
20729 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
20730
20731         * mini.h (inst_switch): Remove unused macro.
20732
20733 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20734
20735         * aot.c:
20736         (load_aot_module): free 'info->methods' and 'info' properly. No more
20737         "free(): invalid pointer blah" messages when you have an old aot
20738         compiled assembly.
20739
20740 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
20741
20742         * jit-icalls.c, mini.c: Added support for context static fields.
20743
20744 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
20745
20746         * mini.c (mono_method_blittable): Methods which set LastError are not 
20747         blittable either. Fixes #51108.
20748         
20749 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
20750
20751         * mini.c: flush icache.
20752         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
20753
20754 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
20755
20756         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
20757
20758 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
20759
20760         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
20761         safe on IA32.
20762
20763         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
20764         vararg calls.
20765
20766         * inssel.brg (CEE_MKREFANY): Fix AOT case.
20767
20768 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
20769
20770         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
20771         instruction when the result is discarded.
20772
20773         * iltests.il (test_0_div_regalloc): New regression test.
20774
20775         * arrays.cs: Fix compilation error.
20776
20777 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
20778
20779         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
20780         float rules to inssel-x86.brg: sane architectures with FP registers
20781         don't need to implement these rules.
20782
20783 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
20784
20785         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
20786
20787 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
20788
20789         * mini.h, inssel-long32.brg: fixed endianess issues in int64
20790         implementation of 32 bit systems.
20791
20792 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
20793
20794         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
20795         (Jeroen Zwartepoorte).
20796
20797 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
20798
20799         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
20800         the caller and the callee matches.
20801         
20802         * mini.c (mono_method_to_ir): Add comment.
20803
20804         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
20805         signbit is missing on some platforms.
20806
20807 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
20808
20809         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
20810
20811         * mini.c (setup_jit_tls_data): Call the new function.
20812         
20813         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
20814
20815         * mini-x86.c: Add experimental support for fast access to the lmf
20816         structure under NPTL/Linux 2.6.x.
20817
20818 2003-11-06  Martin Baulig  <martin@ximian.com>
20819
20820         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
20821         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
20822         the debugger.
20823
20824 2003-11-02  Martin Baulig  <martin@ximian.com>
20825
20826         * mini.c (inflate_generic_field): New static method.
20827         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
20828         generic instance and the field is declared in a generic type, call
20829         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
20830
20831 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
20832
20833         * mini.h mini.c (mono_method_same_domain): New function to return
20834         whenever the caller and the callee are in the same domain.
20835
20836         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
20837
20838 2003-10-30  Martin Baulig  <martin@ximian.com>
20839
20840         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
20841         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
20842         method parameters.
20843         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
20844         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
20845
20846 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
20847
20848         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
20849         propagation.
20850
20851         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
20852         object here, so it is in the correct appdomain etc.
20853
20854 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
20855
20856         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
20857         already done.
20858         (mono_method_to_ir): Avoid freeing the type created returned from
20859         mono_type_create_from_typespec, since it is put into an internal cache
20860         by the function. Fixes pointer.exe.
20861
20862         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
20863         trampolines for icalls and pinvokes as well. Fixes #33569.
20864
20865 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
20866
20867         * mini.c: Update after appdomain changes.
20868
20869         * mini.c (mono_jit_compile_method_inner): Allways compile native
20870         method wrappers in the root domain, since there can only be one
20871         instance of them, whose address is stored in method->info.
20872
20873 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
20874
20875         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
20876         environment variable. Instead detect automatically whenever running
20877         under valgrind using the magic macro RUNNING_ON_VALGRIND from
20878         valgrind.h.
20879
20880 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
20881
20882         * trace.c, trace.h: New files that implement the new trace option
20883         parsing. 
20884
20885         * driver.c: Document new --trace options.
20886
20887         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
20888         mini-x86.c: Apply:
20889
20890         -       if (mono_jit_trace_calls)
20891         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
20892
20893         * mini.h: prototypes.
20894         
20895 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
20896
20897         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
20898
20899         * mini.c inssel.brg: Implement typedefbyref opcodes.
20900
20901         * mini.c (mono_jit_compile_method): Remove unused local variable.
20902
20903         * mini.c (mono_jit_compile_method_inner): Ditto.
20904         
20905 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
20906
20907         * tramp-x86.c (x86_class_init_trampoline): Fix build.
20908         
20909         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
20910
20911 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
20912
20913         * mini.c (mono_no_aot): Remove unused global variable.
20914
20915         * mini.c: Thread safety fixes.
20916
20917 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
20918
20919         * mini.c (mono_create_class_init_trampoline): Add a lock around
20920         class_init_hash_addr.
20921
20922         * arrays.cs (test_0_newarr_emulation): Add new regression test for
20923         #30073.
20924
20925         * mini.c: Decompose the NEWARR instruction before decomposing its
20926         arguments. Fixes #30073.
20927
20928 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
20929
20930         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
20931         convention.
20932
20933 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
20934
20935         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
20936
20937         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
20938
20939         * driver.c: Add support for compiling icall wrappers to --compile.
20940
20941 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
20942
20943         * inssel.brg: The empty value in class->interface_offsets is -1, not
20944         0. Fixes #49287.
20945
20946 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
20947
20948         * objects.cs: New test for 'is' operator on an array of interfaces.
20949
20950 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
20951
20952         * tramp-ppc.c: update trampoline code to support jumps
20953         and class initialization.
20954
20955 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
20956
20957         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
20958
20959         * inssel.brg (OP_UNBOXCAST): Fix #46027.
20960
20961         * inssel.brg (OP_UNBOX): Remove unused rule.
20962
20963         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
20964         region instead of one for each method. Fixes #47813.
20965
20966 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
20967
20968         * exceptions.cs (test_0_nested_finally): New regression test for
20969         nested exception handlers.
20970
20971         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
20972
20973         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
20974
20975         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
20976         inlining.
20977
20978         * mini.c (mono_method_check_inlining): Make the inlining limit 
20979         configurable by an environment variable.
20980         
20981         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
20982
20983         * mini.h: Bump AOT file version.
20984
20985         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
20986         token, store the image along with the token, since the token might not 
20987         refer to the same image as the method containing the relocation, 
20988         because of inlining.
20989
20990 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
20991
20992         * mini.c (mono_precompile_assemblies): New function to compile
20993         all methods in all loaded assemblies.
20994
20995         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
20996
20997         * regalloc.h regalloc.c (MonoRegState): Change the type of 
20998         iassign and fassign to int*, since they can contain large negative
20999         values if the register is spilled. Also added some comments. Fixes
21000         #45817.
21001
21002         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
21003         under Win32. Fixes #42964.
21004
21005 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
21006
21007         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
21008
21009         * aot.c: Added support for AOT compiling methods which contain calls
21010         to wrappers. Currently, only remoting-invoke-with-check wrappers are
21011         handled.
21012         
21013         * driver.c (compile_all_methods): Run the compilation in a thread
21014         managed by mono. Fixes #44023.
21015
21016         * mini.c (mono_codegen): Print full method name in verbose output.
21017
21018         * mini-x86.c (mono_arch_patch_code): Fix warning.
21019         
21020         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
21021         jumps, since the method we are jumping to might be domain-specific.
21022
21023         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
21024
21025 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
21026
21027         * inssel.brg: string chars are unsigned.
21028
21029 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
21030
21031         * TODO: New todo item.
21032
21033         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
21034         which calls mono_runtime_class_init and patches the call site to
21035         avoid further calls.
21036         (mono_arch_create_class_init_trampoline): New arch specific function 
21037         to create a class init trampoline.
21038         (create_trampoline_code): Generalized so it can create
21039         class init trampolines as well.
21040
21041         * mini.c (helper_sig_class_init_trampoline): New helper variable.
21042         (mono_create_class_init_trampoline): New function to create and cache
21043         class init trampolines.
21044         (mono_find_class_init_trampoline_by_addr): New function to lookup the
21045         vtable given the address of a class init trampoline. Used by the
21046         patching process.
21047         (mono_codegen): Generate a call to a trampoline instead of
21048         mono_runtime_class_init in LDSFLD[A].
21049         (mono_codegen): Add relocations for the new trampoline.
21050         
21051         * mini.h mini-x86.c aot.c: Added a new relocation type: 
21052         MONO_PATCH_INFO_CLASS_INIT.
21053
21054         * mini.h: Bump AOT version number.
21055
21056         * aot.c: Create a copy of the loaded code instead of using the original
21057         so methods which call each other will be close in memory, improving
21058         cache behaviour.
21059         
21060         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
21061         patch since it breaks the regression tests.
21062         
21063         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
21064         for the register saving instruction sequence since the 
21065         frame_state_for function in glibc 2.3.2 don't seem to detect it.
21066
21067 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
21068
21069         * TODO: Fix todo item && remove another.
21070
21071 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
21072
21073         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
21074         previous checkin.
21075
21076         * aot.c: Moved the check for MONO_LASTAOT into the initialization
21077         function of the module.
21078
21079         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
21080         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
21081         --no-aot command line option.
21082
21083 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
21084
21085         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
21086         by Bernie Solomon (bernard@ugsolutions.com).
21087
21088         * inssel.brg: Refactor the interface offset table related code into
21089         its separate functions and add support for the AOT case.
21090
21091 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
21092
21093         * aot.c (mono_aot_get_method_inner): Fix memory leak.
21094         
21095         * aot.c: Added mono_aot_verbose variable and made all debugging
21096         output depend on the value of this variable.
21097
21098         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
21099         method_label and info_label.
21100
21101         * mini.h mini-x86.c aot.c: Added a new relocation type 
21102         MONO_PATCH_INFO_IID for klass->interface_id.
21103
21104         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
21105         the MonoJitInfo structure.
21106
21107         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
21108         a non-root appdomain in shared mode.
21109
21110 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
21111
21112         * aot.c: make aot loader less verbose. Remove free of unused variable.
21113
21114 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
21115
21116         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
21117
21118         * .cvsignore: Added *.dll.
21119
21120         * mini.c (mono_print_tree_nl): New function callable while debugging.
21121
21122         * mini.c (mono_print_code): Export this.
21123
21124         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
21125         patched code.
21126
21127 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
21128
21129         * mini.h (MonoCompile): Added 'jit_info' field.
21130
21131         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
21132         the cfg structure, since it is needed by the AOT compiler.
21133
21134         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
21135
21136         * aot.c: A major rewrite. Changes include:
21137         - save exception tables for methods which have them.
21138         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
21139         to g_module_symbol.
21140         - reworked the file format so it is now much smaller and needs
21141         fewer relocation entries.
21142         
21143 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
21144
21145         * aot.c (load_aot_module): Fix build bustage on platforms without
21146         Boehm GC.
21147
21148 2003-09-04  Martin Baulig  <martin@ximian.com>
21149
21150         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
21151
21152 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
21153
21154         * TODO: Some new optimization ideas.
21155
21156         * aot.c: Move AOT module loading logic here from mono_assembly_open.
21157
21158         * aot.c: Save the optimization flags used to compile the code into
21159         the AOT module.
21160
21161         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
21162         support emitting domain specific code.
21163         
21164         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
21165         no longer domain neutral. It can be made domain neutral by compiling 
21166         with --optimize=shared.
21167
21168         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
21169         between appdomains.
21170
21171         * driver.c mini.h mini.c: New --no-aot debugging option which disables
21172         loading of AOT code.
21173
21174         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
21175         
21176         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
21177         if there is no domain neutrality information.
21178
21179 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
21180
21181         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
21182         format version into the generated library.
21183
21184         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
21185         callee method into the caller since one of them could be shared.
21186
21187         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
21188         system exceptions from AOT code now works.
21189
21190         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
21191         method if it is domain neutral and the callee is not.
21192
21193         * graph.c (cfg_emit_one_loop_level): Fix warning.
21194
21195 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
21196
21197         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
21198         last checkin.
21199
21200 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
21201
21202         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
21203         is needed  by code which is executed before mono_runtime_init ().
21204         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
21205         
21206         * mini.c (mono_thread_abort): Fix warning.
21207         (mono_jit_compile_method): Call static constructor in the AOT case too.
21208
21209         * aot.c (mono_compile_assembly): Fix warning.
21210
21211 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21212
21213         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
21214
21215 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
21216
21217         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
21218
21219         * cpu-pentium.md: Fix the length of call opcodes so they include the
21220         ESP restoring instruction. Fixes #47968.
21221
21222 2003-08-28  Martin Baulig  <martin@ximian.com>
21223
21224         * mini-x86.c (mono_arch_call_opcode): Added support for
21225         MONO_TYPE_GENERICINST.
21226
21227         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
21228
21229 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
21230
21231         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
21232         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
21233
21234         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
21235         metadata_section.
21236
21237 2003-08-26  Martin Baulig  <martin@ximian.com>
21238
21239         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
21240         when reporting an error, set this to the actual error location.
21241         (mono_method_to_ir): Report the correct error location if
21242         get_basic_blocks() returned an error.
21243
21244 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
21245
21246         * mini.c (mono_type_blittable): OBJECT is not blittable.
21247         (mono_method_blittable): Methods which have marshalling descriptors
21248         are not blittable either. Fixes #47842.
21249
21250 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
21251
21252         * driver.c mini.c: Use an environment variable instead of a global 
21253         variable. Also fix the build.
21254
21255         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
21256         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
21257         reporting this. 
21258
21259         * driver.c mini.c: Added --with-valgrind option to turn off some
21260         code which prevents mono from running under valgrind.
21261
21262         * mini.c (mono_emit_call_args): Fixed warning.
21263
21264         * mini.c (mono_emulate_opcode): Fixed warning.
21265
21266 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
21267
21268         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
21269         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
21270         regalloc.c, regalloc.h: specify available registers in arch-specific
21271         code and support floats in the regallocator (patch by Laurent Morichetti 
21272         <l_m@pacbell.net>)
21273
21274 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
21275
21276         * mini.c: mono_thread_current() can be called only after
21277         mono_runtime_init(): rearrange code to not call it early on.
21278
21279 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
21280
21281         * mini.c: allocate jump tables in the code mempools.
21282
21283 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
21284
21285         * mini.c, mini.h: make sure per-thread data allocated by the jit is
21286         freed.
21287
21288 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
21289
21290         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
21291         12 to 16.  This fixes bug #47453.
21292
21293
21294 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
21295
21296         * mini-ppc.c: fixed indexed load and unsigned compares.
21297
21298 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
21299
21300         * mini.c: reenabled installation of handler for
21301           thread abort signal.
21302
21303 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
21304
21305         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
21306         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
21307         until it's fixed and actually useful.
21308
21309 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
21310
21311         * inssel-long32.brg: couple more opcodes implemented.
21312
21313 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
21314         
21315         * mini-sparc.c: Even more opcodes implemeted.
21316
21317 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
21318
21319         * mini-sparc.c: More opcodes implemented.
21320
21321 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
21322
21323         * mini-sparc.c: More opcodes implemented.
21324
21325 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
21326
21327         * inssel-sparc.brg: Add some needed rules.  Direct
21328         copy from PPC.
21329         * Makefile.am: Use inssel-sparc.brg
21330         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
21331         an assert happy for now.
21332
21333 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
21334
21335         * mini-sparc.c: Fixed compile errors.
21336         * exceptions-sparc.c: Same.  We now produce a mono binary 
21337         on sparc-linux.  Yea.
21338
21339 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
21340
21341         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
21342         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
21343         They compile, but do not work.
21344
21345 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
21346
21347         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
21348         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
21349         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
21350         (ct@gentoo.org).
21351
21352 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
21353
21354         * mini.c: more opcodes implemented and better support for generics.
21355
21356 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
21357
21358         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
21359         * mini.c, mini.h: first cut at generics support: some new instructions 
21360         added and changed the behaviour of some of the existing ones.
21361
21362 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
21363
21364         * mini.c: Removed definition of metadata_shared mutex here.
21365
21366 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
21367
21368         * mini-x86.c: make vararg calls work for instance methods.
21369
21370 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
21371
21372         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
21373         returns the arguments in a separte list, now.
21374
21375 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
21376
21377         * aot.c, mini.c: updates for array type representation changes.
21378
21379 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
21380
21381         * mini.c: register function to perform jit shutdown.
21382
21383 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
21384
21385         * mini.c: use a faster allocator if possible.
21386
21387 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
21388
21389         * aot.c: some cleanups and portability changes.
21390
21391 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
21392
21393         * mini.c: use faster allocation for CEE_BOX if possible.
21394
21395 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
21396
21397         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
21398         Moved inlined mempcy code to its own function so that is can be
21399         reused. Added an inline memset function as well (optimized initobj).
21400         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
21401
21402 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
21403
21404         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
21405
21406 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
21407
21408         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
21409         arch code can setup the cpu for CLR execution, if needed.
21410         We use it on x86 to set the precision of FP operations.
21411
21412 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
21413
21414         * mini.c: disable some optimizations if we can guess they'll cost too
21415         much for a given method.
21416
21417 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
21418
21419         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
21420         
21421 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
21422         * mini.h mini.c mini-x86.c: Added instruction level coverage 
21423         info collection support.
21424
21425 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
21426
21427         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
21428         is now implemented in the profiling API. Get rid of a couple of
21429         unnecessary global variables.
21430
21431 2003-06-15  Nick Drochak <ndrochak@gol.com>
21432
21433         * basic-long.cs: tests for negative values for bigmul, and unsigned.
21434         * cpu-g4.md: add op_bigmul and op_bigmul_un
21435         * cpu_pentium.md: add op_bigmul_un
21436         * inssel-long32.brg: add rule for unsigned bigmul
21437         * mini-ops.h: define OP_BIGMUL_UN
21438         * mini-x86.c: THE BUG: handle (un)signed properly
21439         * mini.c: choose unsigned opcode if needed.
21440         This set of patches fixes bug #44291
21441
21442 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
21443
21444         * mini.c (optimize_branches): improved to handle all kinds of
21445         conditional branches.
21446
21447 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
21448
21449         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
21450         don't raise exceptions.
21451
21452 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
21453
21454         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
21455         to arch-specific files.
21456
21457 2003-06-09  Martin Baulig  <martin@ximian.com>
21458
21459         * Makefile.am (libs): Added $(LIBGC_LIBS).
21460
21461 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
21462
21463         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
21464         and OP_ATAN (fixes bug#44293).
21465
21466 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
21467
21468         * Makefile.am, mini-x86.c: rename cpu description array to
21469         pentium_desc, since some compilers define the 'pentium' preprocessor
21470         symbol.
21471
21472 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
21473
21474         * mini.c (mini_select_instructions): add explicit branch if the
21475         following block is not the false target of a conditional branch -
21476         we need this with any optimization that reorder or remove bblocks
21477
21478         * mini.c (optimize_branches): bug fixes
21479
21480 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
21481
21482         * mini.c (mono_method_to_ir): inline static readonly fields
21483
21484         * ssa.c (fold_tree): start cfold support for long (very simple
21485         cases only)
21486
21487         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
21488
21489 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
21490
21491         * inssel.brg: fixed memcpy (bug #44219).
21492
21493 2003-06-05  Dick Porter  <dick@ximian.com>
21494
21495         * driver.c: Set the glib log levels to not abort if g_message
21496         recurses.
21497
21498         g_set_prgname() has to happen before mini_init() so that the
21499         process handle gets the info.
21500         
21501 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
21502
21503         * driver.c: add intrins to the default optimizations to get wider
21504         exposure.
21505
21506 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
21507
21508         * mini.h: some large basic blocks will overflow a 16-bit
21509         integers for symbolic registers.
21510
21511 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
21512
21513         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
21514         (mono_arch_output_basic_block): fix bug 43499 
21515
21516 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
21517
21518         * mini.c: kill duplicated definition of mono_debug_format.
21519
21520 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
21521
21522         * mini-x86.c, arrays.cs: fixed register allocation bug.
21523
21524 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
21525
21526         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
21527
21528         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
21529
21530 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21531
21532         * mini.c:
21533         (print_method_from_ip): also print source location information if
21534         available.
21535
21536 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
21537
21538         * mini.c (mono_find_block_region): bug fix in region code
21539         (mini_method_compile): enable removing unreachable code again, but
21540         only in methods without exception clauses.
21541
21542 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
21543
21544         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
21545         Implemented arglist opcode and handling of TypedReference type.
21546         Fixed x86 call convention when a structure is returned.
21547         Minimal support for calling static vararg methods.
21548
21549 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
21550
21551         * mini.c (mini_method_compile):  always remove unreachable code,
21552         because the code in them may be inconsistent  (access to dead
21553         variables for example).
21554
21555 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
21556
21557         * driver.c, debug-mini.c: warning fixes.
21558
21559 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
21560
21561         * Makefile.am, jit.h, mini.h: install header for embedding mono.
21562
21563 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
21564
21565         * mini.c: thread-static fields are registered in mono_class_vtable(),
21566         so ensure the function is called before checking for them.
21567
21568 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
21569
21570         * mini.c (optimize_branches): fix for bug 43586
21571
21572         * jit-icalls.c (mono_llmult_ovf): added an additional check for
21573         overflow (fixes Bug #43639)
21574
21575 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
21576
21577         * mini.c, objects.cs: allow the use of stobj for primitive types.
21578
21579 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
21580
21581         * mini.c: be less strict about argument checking until we support
21582         running the verifier.
21583
21584 2003-05-27  Nick Drochak <ndrochak@gol.com>
21585
21586         * basic-long.cs: tests for (ulong)int * (ulong)int also
21587         * mini.c: use the same trick for (ulong)int * (ulong)int
21588
21589 2003-05-27  Nick Drochak <ndrochak@gol.com>
21590
21591         * basic-long.cs: add regression test for (long)int * (long)int
21592         * cpu-pentium.md: add op_bigmul specification
21593         * inssel-long32.brg: add OP_BIGMUL rule
21594         * mini-ops.h: add OP_BIGMUL
21595         * mini-x86.c: register allocator: handle case where src1 needs to be
21596         in EAX.
21597         * mini.c: substitute special BIGMUL opcode in the tree for 
21598         (long)int * (long)int
21599
21600 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
21601
21602         * jit-icalls.c: call the type ctor on field access if needed.
21603
21604 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
21605
21606         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
21607         to a method (including results of ldelema, bug#43207).
21608
21609 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
21610
21611         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
21612         colors to show exception handler blocks.
21613
21614         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
21615         (fix for pinvoke7.cs).
21616
21617 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
21618
21619         * mini.h, mini.c: ensure correct initialization order for types that
21620         require it. Prepare for lazy compilation of jit icall wrappers.
21621         Provide a name for opcode emulation to reduce unneeded mallocing.
21622
21623 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
21624
21625         * mini-x86.c: better register restoring code and profiling
21626         support for tail calls.
21627
21628 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
21629
21630         * mini.h, driver.c: prepare for leaf methods optimization.
21631
21632 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
21633
21634         * mini.c: get targets of branches before converting a method.
21635
21636 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
21637
21638         * mini.c (optimize_branches): added some experimental code (disbaled) 
21639
21640 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
21641
21642         * mini.c (optimize_branches): fix branch to branch optimization 
21643
21644         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
21645
21646         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
21647
21648         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
21649
21650         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
21651         if needed.
21652
21653 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
21654
21655         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
21656         enable use of interface variables again.
21657
21658         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
21659         I1 to registers because there is no simply way to sign extend 8bit
21660         quantities in caller saved registers on x86.
21661
21662         * inssel-float.brg: set costs of some rules to 2 so
21663         that monobure always select the arch. specific ones if supplied,
21664         regardless of the order we pass the files to monoburg.
21665
21666 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
21667
21668         * mini.c, mini-x86.c: since the magic trampoline for jumps
21669         can't patch the code directly, we do it as soon as the
21670         method gets compiled.
21671
21672 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
21673
21674         * mini-x86.c, mini.h: introduce a new patching method
21675         to support CEE_JMP and tail calls.
21676         * mini.c: obey tail.call. Don't precompile methods target
21677         of CEE_JMP.
21678         * tramp-x86.c: new trampoline code to handle methods
21679         reached through a jump.
21680
21681 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
21682
21683         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
21684         bit values to registers
21685
21686 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
21687
21688         * mini.c (mono_compile_get_interface_var): share interface
21689         variables if possible.
21690
21691 2003-05-16  Martin Baulig  <martin@ximian.com>
21692
21693         * debug-mini.c (mono_init_debugger): New function to initialize
21694         the debugger.  This is not in the debugger since it needs to
21695         access some of mini's internals.
21696
21697 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
21698
21699         * mini.c (mono_method_to_ir): inlining fixes/cleanups
21700
21701 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
21702
21703         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
21704         for value type handling.
21705
21706 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
21707
21708         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
21709         (mono_method_check_inlining): enable inlining of all kinds of wrappers
21710
21711 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
21712
21713         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
21714           the constructor through a proxy.
21715
21716 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
21717
21718         * jit-icalls.c, inssel.brg: fixes to array element address
21719         calculations.
21720
21721 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
21722
21723         * mini-x86.c (is_regsize_var): allocate pointer to registers
21724
21725 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
21726
21727         * driver.c: fixed typo, added intrins to the set of optimizations
21728         tested with regressions.
21729
21730 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
21731
21732         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
21733         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
21734         test case.
21735
21736 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
21737
21738         * inssel.brg: remove some common pop instructions without side effects
21739
21740 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
21741
21742         * inssel-x86.brg: fixed thinko in int to double conversions.
21743
21744 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
21745
21746         * mini.c, jit-icalls.c: added runtime thread-static variable support.
21747
21748 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
21749
21750         * inssel-long32.brg: two more missing instructions.
21751
21752 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
21753
21754         * mini.c (mono_emit_call_args): set the cil_code for all arguments
21755         if not already set.
21756
21757 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
21758
21759         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
21760         correctly.
21761
21762         * basic-float.cs: Added tests for negative zero.
21763
21764 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
21765
21766         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
21767         a couple of missing operations for long casts, with test cases.
21768
21769 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21770
21771         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
21772
21773 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
21774
21775         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
21776         code size estimation.
21777
21778 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
21779
21780         * mini.c (mono_jit_create_remoting_trampoline): make it work with
21781         abstract methods (fix bug 42542)
21782
21783         * aot.c: add ability to handle array types
21784         
21785 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
21786
21787         * mini.c: Call the _specific versions of the object allocation
21788         functions if possible.
21789
21790 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
21791
21792         * driver.c: call setlocale ().
21793
21794 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
21795
21796         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
21797         windows build.
21798
21799 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
21800
21801         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
21802
21803         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
21804         wrappers (fix bug 42122)
21805
21806 2003-05-04  Martin Baulig  <martin@ximian.com>
21807
21808         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
21809
21810         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
21811         s/mini_set_defaults/mono_set_defaults/g.
21812
21813 2003-05-04  Martin Baulig  <martin@ximian.com>
21814
21815         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
21816
21817 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
21818
21819         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
21820         (reported by Don Roberts).
21821
21822 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
21823
21824         * mini.c: temporarily work around two bugs for this release.
21825
21826 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
21827
21828         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
21829         that contains -export-dynamic and it makes using the ld script
21830         useless.
21831         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
21832
21833 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
21834
21835         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
21836         specific cpu.
21837
21838 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
21839
21840         * mini.c: make sure leave calls all the needed finally blocks,
21841         even when the target jumps out of multiple exception clauses.
21842
21843 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
21844
21845         * ldscript, Makefile.am: add linker script to reduce the number of
21846         exported symbols (should also fix the issues with libwine defining
21847         some of the same symbols in io-layer).
21848
21849 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
21850
21851         * driver.c (mini_main): Avoid assertion when no file name is given on 
21852         the command line.
21853
21854 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
21855
21856         * driver.c: added --version/-V command line option.
21857         Added the inline optimization in the regression tests.
21858
21859 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
21860
21861         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
21862         to the type in the method signature (fixes bug#42134).
21863
21864 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
21865
21866         * mini.c: when inlining, check this is not null only when needed (bug #42135).
21867
21868 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
21869
21870         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
21871
21872 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21873
21874         * driver.c: fixed bug #42100.
21875
21876 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
21877
21878         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
21879
21880 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
21881
21882         * mini.c: moved most of the code required to do inlining to its own
21883         function so it can be reused. Inline also ctors if appropriate.
21884
21885 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
21886
21887         * Makefile.am: Link with -export-dynamic so shared libs loaded by
21888         the runtime can call mono API functions.
21889
21890 2003-04-27  Martin Baulig  <martin@ximian.com>
21891
21892         * debug-mini.c (mono_debug_init_method): Added
21893         `guint32 breakpoint_id' argument; if the method has a breakpoint,
21894         send a notification to the debugger.
21895
21896         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
21897         running in the Mono Debugger, just pass the breakpoint number to
21898         mono_debug_init_method().
21899
21900         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
21901
21902 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
21903
21904         * mini.c: allow some more unsafe compares.
21905
21906 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
21907
21908         * mini-x86.c, Makefile.am: make distcheck works (partially from
21909         a patch by Richard Lee <r.h.lee@attbi.com>).
21910         * regset.c, regset.h: removed, they are unused.
21911
21912 2003-04-25  Dick Porter  <dick@ximian.com>
21913
21914         * driver.c: Usage reports the name as 'mono' not 'mini'
21915         * exceptions-x86.c: Build and run on freebsd
21916
21917 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
21918
21919         * Makefile.am: install the program with the 'mono' name and
21920         the library as libmono instead of mini and libmini.
21921
21922 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
21923
21924         * driver.c: provide the APIs for the embedding interface of the old jit.
21925
21926 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
21927
21928         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
21929
21930 2003-04-23  Martin Baulig  <martin@ximian.com>
21931
21932         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
21933
21934         * driver.c: Added `--debug' command line argument to enable
21935         debugging support.
21936
21937 2003-04-23  Martin Baulig  <martin@ximian.com>
21938
21939         * debug.[ch]: Removed.  The code is now in
21940         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
21941
21942         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
21943         last six months.
21944
21945 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
21946
21947         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
21948
21949 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21950
21951         * mini.c:
21952         (mini_cleanup): moved mono_runtime_cleanup call after the call to
21953         mono_domain_finalize.
21954         (mini_method_compile): use mono_method_profile* if the the option is
21955         enabled.
21956
21957 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
21958
21959         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
21960         methods with their wrapper.
21961
21962         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
21963         methods with their wrapper.
21964
21965         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
21966         their wrapper.
21967
21968         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
21969         wrapper.
21970
21971         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
21972         methods.
21973
21974 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
21975
21976         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
21977
21978 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
21979
21980         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
21981         of the mempool. This is slightly faster and uses less memory
21982
21983 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
21984
21985         * mini.c: avoid O(n) allocation for variables.
21986
21987 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
21988
21989         * mini.c: handle items on the stack after inlining methods.
21990
21991 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
21992
21993         * mini.c: make the method->opcode optimization dependent
21994         on MONO_OPT_INSTRINS and do it lazily.
21995
21996 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
21997
21998         * driver.c: print overall results at the end of regression run.
21999
22000 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
22001
22002         * inssel.brg: don't overwrite symbolic registers.
22003
22004 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
22005
22006         * inssel-x86.brg: fix conversion from long to float.
22007
22008 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
22009
22010         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
22011
22012 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
22013
22014         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
22015
22016         * driver.c: Added --print-vtable option as in the old JIT.
22017
22018 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
22019
22020         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
22021
22022 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
22023
22024         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
22025
22026 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
22027
22028         * mini.c regalloc.c regalloc.h: Fix memory leak.
22029
22030 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
22031
22032         * aot.c (mono_aot_get_method): register all used strings
22033
22034 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
22035
22036         * mini.c: always intern strings references with ldstr at compile time.
22037
22038 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
22039
22040         * Makefile.am: add BUILT_SOURCES.
22041
22042 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
22043
22044         * driver.c: give a better error message when the assembly to execute
22045         doesn't have an entry point.
22046
22047 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
22048
22049         * Makefile.am: added hack for automake
22050
22051         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
22052         correct sematics.
22053
22054         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
22055
22056 22003-04-07  Martin Baulig  <martin@ximian.com>
22057
22058         * Makefile.am: Added Makefile.am.
22059
22060         * debugger-main.c: Removed, this is now in the debugger where it
22061         belongs.
22062
22063         * mini.pc.in: Call this package `mini' for the moment.
22064
22065
22066
22067
22068
22069
22070
22071
22072
22073
22074
22075
22076
22077
22078