2009-10-16 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / ChangeLog
1 2009-10-16  Zoltan Varga  <vargaz@gmail.com>
2
3         * aot-compiler.c (emit_extra_methods): Remove some asserts which are not needed.
4
5 2009-10-15  Zoltan Varga  <vargaz@gmail.com>
6
7         * mini.c (mono_op_imm_to_op): Handle OP_AND/OR/XOR_IMM.
8
9 2009-10-14  Massimiliano Mantione  <massi@ximian.com>
10
11         * mini-posix.c (sigprof_signal_handler):
12         Implemented support for building stat call chans in different ways.
13
14 2009-10-14  Massimiliano Mantione  <massi@ximian.com>
15
16         * mini-exceptions.c (mono_find_jit_info):
17         Also check that a jit info has been found (fixes a profiler crash).
18
19 2009-10-14  Massimiliano Mantione  <massi@ximian.com>
20
21         * mini.c (mono_codegen):
22         Call mono_profiler_code_buffer_new with correct code address.
23
24 2009-10-14  Zoltan Varga  <vargaz@gmail.com>
25
26         * driver.c (mono_main): Change the date in the copyright.
27
28 2009-10-14  Mark Probst  <mark.probst@gmail.com>
29
30         * method-to-ir.c (mono_method_to_ir): Don't use a managed array
31         allocator in shared generic code for open classes, because we
32         can't get those classes' vtables.  We need to make managed
33         allocators not depend on the vtable at compile-time to solve this.
34
35 2009-10-13  Martin Baulig  <martin@ximian.com>
36
37         * debug-mini.c (mono_debugger_trampoline_compiled): Add
38         `const guint8 *trampoline' argument; send both the old and the new
39         notification.
40
41 2009-09-30  Zoltan Varga  <vargaz@gmail.com>
42
43         * aot-compiler.c (add_wrappers): Add a runtime invoke wrapper which is used by
44         mono_runtime_capture_context () without calling mono_runtime_invoke ().
45         (can_marshal_struct): Skip structures with auto layout.
46
47         * tramp-arm.c (GEN_TRAMP_SIZE): Increase this by 4.
48
49 2009-10-02  Zoltan Varga  <vargaz@gmail.com>
50
51         * mini-sparc.c (mono_arch_emit_setret): Emit long return values using OP_LMOVE.
52         (mono_arch_create_vars): Instead of allocating a stack slot by hand, allocate
53         a variable to hold the stack slot used by the int<->float conversion opcodes.
54
55         * mini-sparc.c (mono_arch_build_imt_thunk): Implement support for fail_tramp.
56
57 2009-10-04  Zoltan Varga  <vargaz@gmail.com>
58
59         * aot-compiler.c (add_generic_class): Only add GetGenericValueImpl wrappers
60         when using full-aot.
61
62 2009-10-06  Zoltan Varga  <vargaz@gmail.com>
63
64         * aot-compiler.c (add_generic_class): Add an instance of GenericComparer<T> for
65         each instance of Comparer<T>.
66
67         * generics.cs: Add a new test.
68
69 2009-10-09  Zoltan Varga  <vargaz@gmail.com>
70
71         * driver.c (parse_debug_options): Add a 'gdb' option.
72
73         * mini.c (mini_parse_debug_options): Add a 'gdb' option.
74
75         * image-writer.c: Add support for emitting the image into a memory buffer.
76
77         * dwarfwriter.c: Add support for sharing one IL file between multiple images.
78
79         * aot-compiler.c: Add support for registering debug info with GDB using the
80         new JIT debugging interface in GDB 7.0. It can be turned on by setting
81         MONO_XDEBUG to 'gdb'.
82
83 2009-10-10  Zoltan Varga  <vargaz@gmail.com>
84
85         * aot-compiler.c (mono_save_trampoline_xdebug_info): Implement this for the
86         gdb mode.
87
88 2009-10-11  Zoltan Varga  <vargaz@gmail.com>
89
90         * aot-compiler.c (mono_save_xdebug_info): Emit a symbol for the method which
91         can be used to set breakpoints in gdb.
92
93         * image-writer.c (bin_writer_emit_writeout): Add support for setting the text
94         segment to an absolute address.
95
96 2009-10-13  Mark Probst  <mark.probst@gmail.com>
97
98         * method-to-ir.c: Use the managed array allocator method if
99         available.
100
101 2009-10-13  Bill Holmes  <billholmes54@gmail.com>
102
103         * aot-compiler.c : Fix the MSVC builds
104
105         Code is contributed under MIT/X11 license.
106
107 2009-10-13  Zoltan Varga  <vargaz@gmail.com>
108
109         * aot-compiler.c (mono_save_xdebug_info): Group methods into groups of 10 to
110         avoid registering 1 symbol file per method with gdb.
111
112 2009-09-29  Zoltan Varga  <vargaz@gmail.com>
113
114         * mini-sparc.c: Fix the handling of enums with base type long.
115
116         * mini-sparc.c (mono_arch_output_basic_block): Fix IREM_UN_IMM.
117
118         * mini-sparc.c (mono_arch_allocate_vars): Use mono_class_from_mono_type ()
119         instead of using type->data.klass as the later doesn't work with generics.
120
121 2009-09-25  Mark Probst  <mark.probst@gmail.com>
122
123         * method-to-ir.c, mini.h, mini-alpha.c, mini-amd64.c, mini-arm.c,
124         mini-hppa.c, mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c,
125         mini-s390x.c, mini-sparc.c, mini-x86.c: Thread.get_CurrentThread
126         works differently now and we don't handle it in the JIT anymore.
127
128         * mini.c, mini-exceptions.c, mini-posix.c, debug-debugger.c,
129         debug-mini.c, tramp-amd64.c, tramp-x86.c: Changes resulting from
130         the Thread class split.
131
132 2009-09-25  Zoltan Varga  <vargaz@gmail.com>
133
134         * driver.c: Don't run tests with the obsolete treeprop optimization.
135
136         * mini-sparc.c (mono_arch_create_vars): Make the component vars of a long ret
137         variable volatile. Fixes #541577.
138
139         * basic-calls.cs: Add a new test.
140
141         * basic-long.cs: Remove tests which are now in basic-calls.cs.
142
143 2009-09-24  Zoltan Varga  <vargaz@gmail.com>
144
145         * dwarfwriter.c (emit_debug_info_end): Disable this as it doesn't seem to
146         work/required with recent iphone sdk versions.
147
148         * aot-compiler.c (add_wrappers): Generate PtrToStructure wrappers for more
149         structures.
150
151         * decompose.c (mono_decompose_vtype_opts): Avoid reading uninitialized memory
152         in the VCALL decomposition code.
153
154 2009-09-22  Zoltan Varga  <vargaz@gmail.com>
155
156         * mini-ia64.c (mono_arch_output_basic_block): Fix ISHR/ISHR_IMM.
157
158         * basic.cs: Add a test.
159
160         * mini-ia64.c (mono_arch_build_imt_thunk): Implement support the virtual
161         generic invokes.
162
163         * mini-exceptions.c (mini_jit_info_table_find): New helper function which
164         searches all the domains of the current thread.
165
166         * exceptions-<ARCH>.c: Use it. Fixes #539394.
167
168 2009-09-21  Zoltan Varga  <vargaz@gmail.com>
169
170         * exceptions-arm.c (mono_arm_throw_exception): Set ctx->ebp to fp instead of sp
171         so catching exceptions thrown in the same method works. Fixes exception17.exe.
172
173         * tramp-arm.c (mono_arch_create_trampoline_code_full): Store NULL into lmf->method
174         for non-jit trampolines.
175
176         * mini.c (mono_jit_runtime_invoke): Allow string ctors with dyn runtime invoke.
177
178         * aot-compiler.c (add_wrappers): Ditto.
179
180         * mini-arm.c: Implement support for passing vtypes and floats, and increase
181         the size of the param area used by dyn_call to 6 which covers the majority of
182         methods.
183
184         * mini.c aot-compiler.c: Allow dyn_call for string methods except ctors.
185
186         * mini-arm.c: Implement support for passing/receiving
187         longs and receiving floats in the dyn_call code.
188
189         * mini-amd64.c: Implement support for receiving vtypes in registers in
190         the dyn_call code.
191
192         * mini.c mini-amd64.c: Implement partial support for passing vtypes in
193         the dyn_call code.
194
195 2009-09-20  Zoltan Varga  <vargaz@gmail.com>
196
197         * mini-arm.c (get_call_info): Return more precise information in
198         ArgInfo->regtype.
199         (dyn_call_supported): Use the information in CallInfo.
200
201         * mini-arm.c: Enable support for returning vtypes in the dyn_call code.
202
203         * mini.c mini-amd64.c: Enable support for returning vtypes in the dyn_call
204         code.
205
206         * mini-arm.c: Update after the dyn_call api changes.
207
208         * mini.c (mini_create_jit_domain_info): Register a destructor function
209         for the runtime_invoke_hash.
210
211         * mini-amd64.c (mono_arch_get_dyn_call_args): Rename this to
212         'mono_arch_dyn_call_start'. Pass the pointer to the return value buffer to
213         this function.
214         (mono_arch_get_dyn_call_ret): Rename this to 'mono_arch_dyn_call_finish'.
215         (dyn_call_supported): Simplify this by using get_call_info ().
216         (mono_arch_dyn_call_free): New destructor function.
217
218         * generics.cs: Remove a printf.
219
220         * method-to-ir.c (mono_method_to_ir): Allocate some param area for DYN_CALL.
221
222         * mini-arm.c: Add support for enum return values and passing a few arguments
223         on the stack.
224         
225         * mini.c (mono_jit_runtime_invoke): Add support for enum return values to
226         dyn invoke.
227
228         * mini-amd64.c (mono_arch_get_dyn_call_ret): Ditto.
229
230         * aot-compiler.c (add_wrappers): Add a few restrictions for the use of
231         the dynamic invoke wrappers.
232
233         * mini-arm.c: Implement OP_DYN_CALL for arm.
234
235         * aot-compiler.c (add_wrappers): Avoid aot-ing runtime invoke wrappers
236         supported by the dynamic runtime invoke wrapper.
237
238         * aot-compiler.c aot-runtime.c: Add support for encoding the dynamic
239         runtime invoke wrapper.
240
241         * mini.c (mono_jit_runtime_invoke): Use the dynamic runtime invoke wrappers
242         if possible when running with full-aot.
243
244         * mini-ops.h: Add OP_DYN_CALL opcode.
245
246         * mini-amd64.c method-to-ir.c: Add infrastructure for making method calls
247         with dynamic arguments lists similar to libffi.
248
249 2009-09-19  Zoltan Varga  <vargaz@gmail.com>
250
251         * method-to-ir.c: Fix the previous change on 64 bit platforms.
252         
253         * method-to-ir.c: Applied patch from Rodrigo Kumpera. Allow an i8 argument
254         to NEWARR.
255
256         * iltests.il.in: Add a new test.
257         
258 2009-09-18  Zoltan Varga  <vargaz@gmail.com>
259
260         * aot-compiler.c (add_generic_instances): Add more instances of
261         GenericEqualityComparer.
262
263 2009-09-18  Rodrigo Kumpera  <rkumpera@novell.com>
264
265         * mini.c: Add asserts for mono_class_vtable calls that are not meant to fail.
266
267 2009-09-18  Rodrigo Kumpera  <rkumpera@novell.com>
268
269         * method-to-ir.c: Handle failures from mono_class_vtable. Added some
270         comments on some functions that now can fail.
271
272 2009-09-17  Andrew Jorgensen  <ajorgensen@novell.com>
273
274         * Makefile.am: Add Info.plist to EXTRA_DIST
275
276 2009-09-16  Zoltan Varga  <vargaz@gmail.com>
277
278         * method-to-ir.c (mono_method_to_ir): Allow AOT for CEE_LDTOKEN in
279         static synchronized wrappers. Fixes #539500.
280
281 2009-09-14  Rodrigo Kumpera  <rkumpera@novell.com>
282
283         * jit-icalls.c (mono_class_static_field_address): handle vtable failure
284         properly.
285
286 2009-09-16  Zoltan Varga  <vargaz@gmail.com>
287
288         * mini-exceptions.c (mono_handle_exception_internal): Store the computed
289         lmf before calling filter clauses as well. Fixes #539550.
290
291         * exceptions.cs: Add a test.
292         
293 2009-09-14  Zoltan Varga  <vargaz@gmail.com>
294
295         * aot-compiler.c (add_generic_class): Add instances of
296         Array.GetGenericValueImpl as well.
297
298         * Makefile.am (fullaotcheck): Copy and aot more assemblies so linq
299         can be tested too.
300
301         * generics.cs: Add a fullaot linq test.
302
303 2009-09-10  Zoltan Varga  <vargaz@gmail.com>
304
305         * aot-compiler.c (arch_emit_static_rgctx_trampoline): Don't clobber argument
306         reg r1 on arm.
307
308 2009-09-10  Bill Holmes  <billholmes54@gmail.com>
309
310         * mini-trampolines.c (mono_delegate_trampoline) : Call
311           mono_cominterop_get_invoke if the delegate target object
312           is a COM object.
313
314         Code is contributed under MIT/X11 license.
315
316 2009-09-09  Sebastien Pouliot  <sebastien@ximian.com>
317
318         * method-to-ir.c: For CoreCLR throw a SecurityException if an 
319         internal call is defined outside platform code. Reduce code 
320         duplication with existing [Method|Field]AccessException
321
322 2009-09-08  Rodrigo Kumpera  <rkumpera@novell.com>
323
324         * mini-x86.c (mono_arch_emit_call): Don't reduce stack usage by 4
325         if the return value is a small struct passed on regs.
326
327 2009-09-09  Zoltan Varga  <vargaz@gmail.com>
328
329         * cpu-arm.md mini-arm.c: Remove unused opcodes.
330
331         * mini-codegen.c: Enable the cpu description validation for arm.
332
333 2009-09-08  Zoltan Varga  <vargaz@gmail.com>
334
335         * basic-calls.cs: Move the test_0_float_load_and_store_with_big_offset ()
336         test which depends on structs to objects.cs.
337         
338         * basic-calls.cs: Remove calls to Console.WriteLine and throws, since those
339         require object model related stuff working.
340
341         * cpu-x86.md mini-x86.c: Remove more unused opcodes.
342
343         * mini-ops.h: Fix OP_BIGMUL instruction descriptions.
344
345         * mini-codegen.c (mono_local_regalloc): Validate the cpu description 
346         against the instruction metadata in mini-ops.h. amd64 only for now.
347
348         * mini-ops.h: Fix some instruction descriptions.
349
350         * mini-ops.h mini-x86.c mini-amd64.c cpu-<ARCH>.md: Remove some
351         unused instructions.
352
353 2009-09-06  Zoltan Varga  <vargaz@gmail.com>
354
355         * exceptions.cs: Add a new test.
356
357 2009-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
358
359         * mini-x86.c (needs_stack_frame): OSX requires full frames to keep proper alignment.
360
361 2009-09-06  Zoltan Varga  <vargaz@gmail.com>
362
363         * mini-llvm.c (mono_llvm_emit_method): Add a few more missing casts,
364         skip empty phi opcodes.
365         
366         * mini-llvm.c (mono_llvm_emit_method): Handle unsigned volatile variables
367         correctly by zero extending after loads. Skip methods containing calls
368         to the monitor enter/exit trampolines.
369
370         * tramp-x86.c (mono_arch_create_trampoline_code): Align the stack
371         when calling mono_thread_force_interruption_checkpoint ().
372
373         * mini.c (mini_method_compile): Disable llvm when AOT compiling.
374
375         * tramp-amd64.c (mono_arch_patch_callsite): Add support for 32 bit ->
376         64 bit thunks.
377         (mono_arch_nullify_class_init_trampoline): Read 'buf' instead of 'code'.
378
379         * mini-llvm.c (mono_llvm_emit_method): Add a few missing conversions so a 
380         bootstrap could run.
381
382 2009-09-04  Zoltan Varga  <vargaz@gmail.com>
383
384         * mini.c (mini_init): Set callbacks.get_runtime_build_info ().
385
386 2009-09-03  Zoltan Varga  <vargaz@gmail.com>
387
388         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass the start
389         of the method to
390         mono_breakpoint_clean_code () when using LLVM as the prologues generated by
391         LLVM might be very short.
392
393         * mini-x86.c (mono_arch_output_basic_block): Maintain stack alignment
394         in OP_THROW/RETHROW.
395
396         * exceptions-x86.c: Rewrite the throw trampolines so they maintain stack
397         alignment on osx.
398
399 2009-09-03  Zoltan Varga  <vargaz@gmail.com>
400
401         * mini-amd64.c (mono_arch_get_vcall_slot): Pass the start of the method to
402         mono_breakpoint_clean_code () when using LLVM as the prologues generated by
403         LLVM might be very short.
404
405 2009-09-01  Zoltan Varga  <vargaz@gmail.com>
406
407         * exceptions-x86.c (throw_exception): Fix the previous change by substracting
408         the alignment for the value of sp.
409
410 2009-09-01  Geoff Norton  <gnorton@novell.com>
411
412         * mini.c (mono_get_lmf_addr): Fix jit_thread_attach for native to 
413         managed wrappers in full aot.
414
415 2009-08-31  Zoltan Varga  <vargaz@gmail.com>
416
417         * exceptions-x86.c (get_throw_exception): Align the stack on osx.
418
419 2009-08-28  Zoltan Varga  <vargaz@gmail.com>
420
421         * mini-llvm-cpp.cpp mini-llvm.c: Update to latest llvm api.
422
423 2009-08-25  Zoltan Varga  <vargaz@gmail.com>
424
425         * aot-compiler.c (emit_exception_debug_info): Emit ei->flags too.
426
427         * aot-runtime.c (decode_exception_debug_info): Decode ei->flags from the
428         saved info.
429
430         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
431
432         * aot-runtime.c aot-compiler.c: Emit exception causes fully so we don't
433         depend on the info MonoMethodHeader which could be missing in IL stripped
434         assemblies.
435
436 2009-08-25  Zoltan Varga  <vargaz@gmail.com>
437
438         * mini-arm.c (add_general): Fix the passing of 64 bit values on darwin, where
439         they are only 4 byte aligned.
440
441 2009-08-21  Zoltan Varga  <vargaz@gmail.com>
442
443         * mini-arm.c (mono_arch_allocate_vars): Use FP as the frame pointer as
444         was done previously, since using SP causes too many problems.
445
446         * exceptions-arm.c: Fix the handling of sp/fp so unwinding through
447         frames without a frame pointer works.
448
449         * mini-arm.c (mono_arch_get_global_int_regs): Avoid using V5 as a
450         global register in methods with calls, since the calls can go through
451         a static rgctx trampoline which doesn't save it.
452
453 2009-08-19  Zoltan Varga  <vargaz@gmail.com>
454
455         * mini-arm.c (mono_arch_context_get_int_reg): Handle SP as well.
456
457 2009-08-18  Zoltan Varga  <vargaz@gmail.com>
458
459         * aot-compiler.c (add_generic_instances): Fix the net 1.1 build.
460
461 2009-08-18  Christian Hergert  <chris@dronelabs.com>
462
463         * method-to-ir.c: Fix warnings for uninitialized variables.
464
465 2009-08-18  Christian Hergert  <chris@dronelabs.com>
466
467         * mini-exceptions.c:
468         * aot-compiler.c: Fix printf warnings.
469
470 2009-08-18  Zoltan Varga  <vargaz@gmail.com>
471
472         * aot-compiler.c (add_generic_instances): Add string[] wrapper methods.
473         Add GetGenericValueImpl<string>.
474         
475         * aot-compiler.c (add_generic_instances): Add instances of
476         GenericEqualityComparer<T> for primitive types. Only emit the array
477         wrappers into the mscorlib image.
478
479 2009-08-15  Zoltan Varga  <vargaz@gmail.com>
480
481         * aot-runtime.c (load_method): Rename 'aot_module' -> 'amodule'. Allocate
482         the methods_loaded array using amodule->info->nmethods.
483
484         * mini.h (MonoAotFileInfo): Add an 'nmethods' field.
485         (MONO_AOT_FILE_VERSION): Bump this.
486
487         * aot-compiler.c: Emit more generic instances allowing some parts of linq
488         to work.
489
490         * aot-runtime.c (mono_aot_get_unwind_info): Handle the case when the
491         MonoJitInfo doesn't belong to its methods aot image.
492
493 2009-08-14  Zoltan Varga  <vargaz@gmail.com>
494
495         * mini-arm.c (mono_arch_allocate_vars): Use SP as the default frame reg.
496
497         * mini-arm.c: Fix warnings.
498         
499         * mini-arm.c (mono_arm_emit_load_imm): Only emit a movt if needed.
500
501         * mini-arm.c (mono_arm_emit_load_imm): Use movt/movw if the cpu
502         supports it.
503
504 2009-08-12  Zoltan Varga  <vargaz@gmail.com>
505
506         * aot-compiler.c (arch_emit_imt_thunk): Rework the arm code to
507         avoid clobbering IP.
508
509         * mini-trampolines.c (mono_magic_trampoline): Allocate a local to
510         hold the trampoline argument, so its initial value is available during
511         debugging.
512
513 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
514
515         * exceptions-arm.c:
516         * exceptions-hppa.c:
517         * mini.c:
518         * exceptions-s390x.c:
519         * exceptions-mips.c:
520         * exceptions-ppc.c:
521         * exceptions-sparc.c:
522         * exceptions-alpha.c:
523         * aot-runtime.c:
524         * mini-trampolines.c:
525         * exceptions-x86.c:
526         * exceptions-s390.c: add and use #define's instead of sizeof()
527         for MonoJitInfo and MonoJitInfoTable.
528
529 2009-08-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
530
531         * tramp-arm.c:
532         * tramp-amd64.c:
533         * tramp-ppc.c:
534         * tramp-x86.c: use a #define instead of sizeof() for a few
535         structures that use a zero-length array.
536
537 2009-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
538
539         * method-to-ir.c (mono_method_to_ir/CEE_CONSTRAINED_): Handle the
540         case when the method is dynamic. Fixes #529238.
541
542 2009-08-06  Zoltan Varga  <vargaz@gmail.com>
543
544         * mini.c (mono_jit_compile_method_inner): Throw an exception instead
545         of asserting when a method is JIT compiled in full-aot mode.
546
547 2009-08-03  Jerry Maine  <crashfourit@gmail.com>
548         
549         Contributed under the terms of the MIT/X11 license by
550         Jerry Maine <crashfourit@gail.com>.
551         
552         * fixed wrong dates in changelog.
553
554 2009-08-03  Jerry Maine  <crashfourit@gmail.com>
555         
556         Contributed under the terms of the MIT/X11 license by
557         Jerry Maine <crashfourit@gail.com>.
558
559         * basic-simd.cs: added test for packed double square root.
560         * cpu-amd64.md: added opcode info for packed double square root.
561         * cpu-x86.md: added opcode info for packed double square root.
562         * mini-ops.h: added IR opcode for packed double square root.
563         * mini-x86.c: added IR to native translation code for packed double square root.
564         * mini-amd64.c: removed todo for packed double square root.
565         * simd-intrinsics.c: added method to IR opcode converstion for
566         packed double square root.
567
568 2009-08-03 Jerry Maine <crashfourit@gmail.com>
569
570         Contributed under the terms of the MIT/X11 license by
571         Jerry Maine <crashfourit@gail.com>.
572
573         * mini-amd64.c: Added a change to help tell the difference as 
574         to what perpose the xmm register is being used--mainly to help
575         with debuging.
576         * mini-amd64.h: Changed callee regs to use 15 out of 16 
577         (one used for special cases) xmm registers for both fp
578         and simd ops. Added define to turn on new feature in the regalloc
579         that allows fp and simd ops to share the xmm regs happily.
580         * codegen.c: Added code to detect for which perpose an xmm reg is
581         being used (fp or simd) and to translate back and forth to the
582         correct logical reg bank (fp or simd) for 'spill load's.
583
584 2009-08-03 Jerry Maine <crashfourit@gmail.com>
585
586         Contributed under the terms of the MIT/X11 license by
587         Jerry Maine <crashfourit@gail.com>.
588
589         * basic-simd.cs: Added tests for stressing the regalloc when running with
590         16 simd regs and when simd and fp ops share the same reg bank.
591
592 2009-08-01  Mark Probst  <mark.probst@gmail.com>
593
594         * method-to-ir.c (mini_emit_stobj): If we call mono_value_copy()
595         in shared generic code, we might have to look up the class in the
596         RGCTX.  If we use the class directly, compute its GC descriptor.
597
598 2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>
599
600         * mini.c (mono_jit_runtime_invoke): Fix a warning.
601
602 2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>
603
604         * mini.c (mono_jit_runtime_invoke): Initialize the class and
605         check for errors. Fixed the case when the class with the Main
606         method is broken.
607
608 2009-07-31 Jerry Maine <crashfourit@gmail.com>
609
610         Contributed under the terms of the MIT/X11 license by
611         Jerry Maine <crashfourit@gail.com>.
612
613         * cpu-amd64.md: Fixed simple bug in machine discrition file.
614
615 2009-07-31  Zoltan Varga  <vargaz@gmail.com>
616
617         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_IREM_UN_IMM.
618
619 2009-08-30  Rodrigo Kumpera  <rkumpera@novell.com>
620
621         * method-to-ir.c: Fix naming of stelem and ldelem.
622
623 2009-07-30  Zoltan Varga  <vargaz@gmail.com>
624
625         * driver.c (main_thread_handler): Check that the assembly loaded
626         matches the filename when doing AOT.
627
628 2009-07-30  Mark Probst  <mark.probst@gmail.com>
629
630         * mini.c: get_ip_from_sigctx installer has been removed, so don't
631         call it anymore.
632
633         * mini-x86.h, mini-amd64.h, mini-ppc.h: UCONTEXT macros moved (to
634         utils/mono-sigcontext.h).
635
636         * exceptions-amd64.c: Use the UCONTEXT_GREGS macro instead of an
637         #ifdef.
638
639 2009-07-29  Massimiliano Mantione  <massi@ximian.com>
640
641         * mini.c (mono_codegen):
642         Call profiler hook to keep track of method code buffers.
643
644 2009-07-27  Mark Probst  <mark.probst@gmail.com>
645
646         * method-to-ir.c: Invoke write barriers for the
647         Interlocked.(Compare)Exchange JIT intrinsics.
648
649 2009-07-26  Raja R Harinath  <harinath@hurrynot.org>
650
651         * Makefile.am (version.h): Fix issues when built out of tree.
652         Remove some redundant 'grep's piped through 'sed's.
653
654 Fri Jul 24 17:28:37 CEST 2009 Steven Munroe  <munroesj@us.ibm.com>
655
656         This patch is contributed under the terms of the MIT/X11 license
657
658         * mini-ppc.c (mono_arch_output_basic_block):
659         (OP_STOREI1_MEMBASE_REG): Handle 32-bit offsets combining addis
660         for bits 32-47 with signed load/store diplacements for bits
661         48-63.  Use prefered base/offset order for indexed form.
662         (OP_STOREI2_MEMBASE_REG, OP_STORE_MEMBASE_REG): Same.
663         (OP_LOAD_MEMBASE, OP_LOADI4_MEMBASE, OP_LOADU4_MEMBASE,
664         OP_LOADI1_MEMBASE, OP_LOADU1_MEMBASE, OP_LOADU2_MEMBASE,
665         OP_LOADI2_MEMBASE): Same.
666         (OP_STORER8_MEMBASE_REG, OP_LOADR8_MEMBASE,
667         OP_STORER4_MEMBASE_REG, OP_LOADR4_MEMBASE): Same.
668         (OP_STOREI1_MEMINDEX): Use prefered base/offset order for
669         indexed form.
670         (OP_STOREI2_MEMINDEX, OP_STORE_MEMINDEX): Same.
671         (OP_LOAD_MEMINDEX, OP_LOADI4_MEMINDEX, OP_LOADU4_MEMINDEX,
672         OP_LOADU2_MEMINDEX, OP_LOADI2_MEMINDEX, OP_LOADU1_MEMINDEX,
673         OP_LOADI1_MEMINDEX): Same
674         (OP_LOADR4_MEMINDEX, OP_LOADR8_MEMINDEX, OP_STORER4_MEMINDEX,
675         OP_STORER8_MEMINDEX): Same
676         (OP_JMP): Use addis/addi sequence for int cfg->stack_usage
677         computations.
678         (mono_arch_emit_prolog): Handle 32-bit offsets combining addis
679         for bits 32-47 with signed load/store diplacements for bits
680         48-63.  Use prefered base/offset order for indexed form.
681
682 Fri Jul 24 16:57:12 CEST 2009 Steven Munroe  <munroesj@us.ibm.com>
683
684 This patch is contributed under the terms of the MIT/X11 license
685
686         * mini-ppc.c: Define PPC_MOVE_FPR_GPR and PPC_ISA_64.
687         (mono_arch_get_vcall_slot): Fx pointer to int cast warning.
688         (mono_arch_decompose_opts): Make OP_ICONV_TO_R4 and
689         OP_ICONV_TO_R8 decompose conditional on !PPC_ISA_64.
690         (mono_arch_output_basic_block) [OP_JMP]: Use ppc_load32 for
691         cfg->stack_usage to avoid size warnings.
692         (mono_arch_output_basic_block) [__mono_ppc64__]: Replace
693         store/load sequence with mffgpr if PPC_MOVE_FPR_GPR is true.
694         (mono_arch_output_basic_block) [!__mono_ppc64__]: For
695         OP_ICONV_TO_R4 or OP_ICONV_TO_R8 and PPC_ISA_64 use fcfid
696         to convert.
697         (mono_arch_emit_prolog): Move mono_emit_unwind_op_def_cfa 
698         after code varible is initialized.
699         Add g_assert ppc_is_imm16 for ainfo->offset. Handle
700         ainfo->size == 8 when ainfo->offset !ppc_is_imm16.
701         (mono_arch_emit_epilog): 
702         Move Use ppc_load32 for cfg->stack_usage to avoid size
703         warnings.
704
705 2009-07-24  Mark Probst  <mark.probst@gmail.com>
706
707         * method-to-ir.c: The write barrier doesn't do the store anymore,
708         so we have always to emit it.  Also, emit the wbarrier after the
709         store.
710
711 2009-07-24  Zoltan Varga  <vargaz@gmail.com>
712
713         * mini-arm.c (mono_arch_get_delegate_invoke_impls): Add a trampoline
714         for argument count 3 too.
715
716 2009-07-23  Zoltan Varga  <vargaz@gmail.com>
717
718         * mini.c (mono_jit_compile_method_with_opt): Add an 'ex' argument to let
719         the caller handle the exceptions.
720         (mono_jit_runtime_invoke): Handle exceptions thrown while compiling the
721         method. Fixes #524498.
722
723 2009-07-22  Geoff Norton  <gnorton@novell.com>
724
725         * mini-exceptions.c: Fix build on ia64.
726
727 2009-07-22  Mark Probst  <mark.probst@gmail.com>
728
729         * mini-exceptions.c (ves_icall_get_frame_info): Use write
730         barriers.
731
732 2009-07-21  Zoltan Varga  <vargaz@gmail.com>
733
734         * mini-arm.c (mono_arch_emit_prolog): Fix thread attaching in aot
735         code.
736
737 2009-07-20  Zoltan Varga  <vargaz@gmail.com>
738
739         * basic-simd.cs (Main): Pass args to the test driver.
740
741 2009-07-20  Geoff Norton  <gnorton@novell.com>
742
743         * mini-x86.h: Fix the x86 version guards to use Apple's
744         properly defined macros.
745
746 2009-07-20  Geoff Norton  <gnorton@novell.com>
747
748         * mini-x86.c: Fix --trace on darwin-x86 and other systems which require
749         aligned access.
750
751 2009-07-20  Zoltan Varga  <vargaz@gmail.com>
752
753         * mini.c (mono_jit_runtime_invoke): Speed this up by adding a hash to
754         MonoJitDomainInfo which maps MonoMethod's to a structure containing all
755         the information which is needed for invokes, so only one locking+hash table
756         lookup is needed.
757
758         * aot-compiler.c: Add a 'tool-prefix' option to be used when cross-compiling.
759         
760         * aot-compiler.c (add_generic_instances): Emit instances of 
761         GenericComparer<T> for primitive types.
762
763 2009-07-19 Rodrigo Kumpera  <rkumpera@novell.com>
764
765         * mini-posix.c: Fix linux build.
766
767 2009-07-19  Geoff Norton  <gnorton@novell.com>
768
769         * mini.h: Add prototypes for mono_runtime_syscall_fork and
770         mono_gdb_render_native_backtraces
771         * mini-darwin.c: Apple's syscall(SYS_fork) is very weird on x86,
772         so we implement the sane semantics to the runtime here
773         (mono_gdb_render_native_backtraces).  Apple also uses an ancient gdb
774         so we need to call it differently (mono_gdb_render_native_backtraces)
775         * mini-posix.c: Move the old semantics from mini.c to the prototypes
776         here for default implementations.
777         * mini.c: Refactor mono_handle_native_sigsegv so that we can properly
778         support Apple's weird syscall (SYS_fork) implementation and not busy
779         loop in abort() on native crashes on OSX anymore.
780
781 2009-07-18  Zoltan Varga  <vargaz@gmail.com>
782
783         * aot-runtime.c (load_method): Change the handling of the
784         MONO_LASTAOT env variable so MONO_LASTAOT=0 means that no aot methods
785         are used.
786
787         * mini.c (mono_patch_info_equal): Really fix the handling of RGCTX_FETCH.
788
789 2009-07-17  Zoltan Varga  <vargaz@gmail.com>
790
791         * mini.c (mono_patch_info_equal): Revert the last change for now as it
792         seems to break the aot tests.
793         
794         * mini.c (mono_patch_info_equal): Fix the handling of 
795         MONO_PATCH_INFO_RGCTX_FETCH.
796
797 2009-07-16  Zoltan Varga  <vargaz@gmail.com>
798
799         * unwind.c: Use TARGET_AMD64 instead of __x86_64__.
800
801         * mini.c (mono_patch_info_hash): Fix the handling of 
802         MONO_PATCH_INFO_INTERNAL_METHOD.
803         (mono_patch_info_equal): Ditto.
804
805 2009-07-16  Zoltan Varga  <vargaz@gmail.com>
806
807         * mini-llvm.c (mono_llvm_emit_method): Use module instead of ctx->module
808         in a few places.
809         
810         * mini-llvm.c: Add some infrastructure for AOT support.
811
812 2009-07-15  Zoltan Varga  <vargaz@gmail.com>
813
814         * mini-llvm-cpp.c: Update to the latest llvm api.
815         
816         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Set the EnablePrettyStackTrace
817         option to false to prevent llvm from installing signal handlers which
818         trip up the gc.
819         
820 2009-07-15 Rodrigo Kumpera  <rkumpera@novell.com>
821
822         * cpu-x86.md:
823         * cpu-amd64.md: Revert previous change as those instructions
824         take 2 separate arguments. Remember to read the arch docs more
825         carefully next time.
826
827 2009-07-15  Zoltan Varga  <vargaz@gmail.com>
828
829         * mini-llvm-cpp.cpp (mono_llvm_build_alloca): Update to latest llvm api.
830
831 Wed Jul 15 17:20:27 CEST 2009 Paolo Molaro <lupus@ximian.com>
832
833         * mini-ppc.c: exploit multiple load/store units if available (rest of
834         the change from Steven Munroe (<munroesj@us.ibm.com>) first patch at 
835         http://bugzilla.novell.com/show_bug.cgi?id=487846).
836
837 Wed Jul 15 16:24:57 CEST 2009 Paolo Molaro <lupus@ximian.com>
838
839         * mini-ppc.c: integrate most of Steven Munroe (<munroesj@us.ibm.com>)
840         first patch at http://bugzilla.novell.com/show_bug.cgi?id=487846.
841
842 2009-07-14 Rodrigo Kumpera  <rkumpera@novell.com>
843
844         * cpu-x86.md: Fix missing clobbering from trancendental simd
845         ops.
846
847         * cpu-amd64.md: Same.
848
849 2009-07-14 Jerry Maine <crashfourit@gmail.com>
850
851         Contributed under the terms of the MIT/X11 license by
852         Jerry Maine <crashfourit@gail.com>.
853
854         * basic-simd.cs: Added tests for single and doulble indexers.
855
856         * cpu-amd64.md: Added simd opcode information.
857
858         * mini-amd64.c: Added IR to native simd generation code.
859         Added simd register names and function that returns them.
860
861         * mini-amd64.h: Added marcos to turn on simd code compilation in
862         amd64. Added max simd register count marco. Added caller/callee
863         register mask marcos. Added marcos to use simd register bank.
864
865         * mini.h: Added helper marco for shufling dwords and simple
866         floats.
867
868 2009-07-14  Zoltan Varga  <vargaz@gmail.com>
869
870         * mini-llvm-cpp.cpp: Update to latest llvm SVN api.
871
872         * Makefile.am (mono_LDADD): Pass LLVM_LDFLAGS to the linked.
873
874         * unwind.c (mono_unwind_get_ops_from_fde): Make this return
875         the length of the native code as well.
876
877         * basic-simd.cs: Add a test for #521662.
878
879 Mon Jul 13 17:58:50 CEST 2009 Paolo Molaro <lupus@ximian.com>
880
881         * mini-ppc.c: fixed bug introduced by Steven's TLS changes.
882
883 2009-07-13  Mark Probst  <mark.probst@gmail.com>
884
885         * mini.c: Register function for getting the IP from a signal
886         context with metadata.
887
888 2009-07-13  Zoltan Varga  <vargaz@gmail.com>
889
890         * method-to-ir.c (mono_method_to_ir): When calling a gshared method,
891         call a generic class init trampoline if needed. Fixes #519336.
892
893         * generics.cs: Add a test.
894         
895 2009-07-09  Mark Probst  <mark.probst@gmail.com>
896
897         * method-to-ir.c: When doing a call which might be remote from
898         shared generic code to other shared code with open type arguments,
899         get the remoting invoke wrapper from the RGCTX and do an indirect
900         call to it.
901
902 2009-07-03  Zoltan Varga  <vargaz@gmail.com>
903
904         * mini-trampolines.c (get_unbox_trampoline): Add an rgctx trampoline
905         after the unbox trampoline in the full-aot case.
906
907 2009-07-02  jonas echterhoff <jonas@unity3d.com>
908         
909         * mini.c: Move initialization of jit_mutex before debugger initialization
910         
911         to avoid crashes.
912         
913         
914         * Info.plist: added Info.plist and link flag to enable the mono executable
915         to access other processes. Requires codesigning of the executable to work.
916         
917         * mdb-debug-info32-darwin.s: The same as mdb-debug-info32.s, changed to 
918         
919         compile on OS X.
920         
921
922 2009-06-30  Zoltan Varga  <vargaz@gmail.com>
923
924         * driver.c (mini_regression): Handle loading errors. Fixes #508869.
925
926 2009-06-29  Zoltan Varga  <vargaz@gmail.com>
927
928         * mini-exceptions.c (get_generic_context_from_stack_frame): Fix the case
929         when the generic instance is an instantiation of a subclass of the
930         methods class. Fixes #517166.
931
932 2009-06-26  Zoltan Varga  <vargaz@gmail.com>
933
934         * mini-amd64.c (mono_arch_emit_prolog): Fix thread attaching in AOTed
935         code.
936
937         * mini.c (mono_jit_thread_attach): Allow domain to be NULL for calls from
938         AOTed code.
939
940         * CMakeLists.txt: Add minimal support for installation.
941
942 2009-06-25  Zoltan Varga  <vargaz@gmail.com>
943
944         * aot-compiler.c (emit_and_reloc_code): Factor out the code to
945         determine whenever a method is directly callable to a separate function.
946
947         * mini-<ARCH>.c tramp-<ARCH>.c: Remove needless casts and add new
948         needed ones as a result of the previous change.
949
950         * mini-<ARCH>.c tramp-<ARCH>.c: Use mgreg_t* as the
951         type of register arrays.
952
953         * mini-trampolines.c tramp-<ARCH>.c aot-runtime.c: Use mgreg_t* as the
954         type of register arrays.
955
956 2009-06-24  Jerry Maine  <crashfourit@gmail.com>
957         
958         Contributed under the terms of the MIT/X11 license by
959         Jerry Maine <crashfourit@gail.com>.
960
961         * mini-amd64.c: Added code to convert simd IR to native amd64 sse.
962
963 2009-06-24  Zoltan Varga  <vargaz@gmail.com>
964
965         * aot-compiler.c (emit_plt): Define debug labels for most plt entries.
966
967 2009-06-24  Neale Ferguson <neale@sinenomine.net>
968
969         * mini-s390x.c: Correct LCONV_TO_Ix and ICONV_TO_Ix routines. Fix leave_method
970         dump of structure return value. Fix some formatting.
971         * cpu-s390x.md: Fix lengths of instruction sequences.
972         * mini-s390.c: Minor formatting changes.
973
974 2009-06-24  Zoltan Varga  <vargaz@gmail.com>
975
976         * mini-x86.h: Applied patch from Romain Tartiere (romain@blogreen.org).
977         Use sigaction on freebsd as well.
978
979 2009-06-23  Zoltan Varga  <vargaz@gmail.com>
980
981         * mini.h: Don't define MONO_ARCH_HAVE_TLS_GET to 0, as some code
982         uses #ifdef on it.
983         
984         * mini.c (mini_init): Revert a change which breaks cross-compilation.
985
986 2009-06-22  Mark Probst  <mark.probst@gmail.com>
987
988         * mini-ppc.c, cpu-ppc.md: Enable TLS on Darwin/G4.
989
990 2009-06-22  Mark Probst  <mark.probst@gmail.com>
991
992         * mini.c, mini.h: Tell the runtime whether we support MONO_TLS.
993
994 2009-06-20  Martin Baulig  <martin@ximian.com>
995
996         * debug-mini.c
997         (MonoDebuggerThreadFlags): New enum typedef.
998         (MonoDebuggerThreadInfo): Added `guint32 thread_flags'.
999         (mono_debugger_thread_created): Added `gpointer func' argument;
1000         initialize the new `thread_flags' field.
1001
1002 2009-06-18  Martin Baulig  <martin@ximian.com>
1003
1004         * debug-debugger.h (MonoDebuggerRuntimeFlags): New enum typedef.
1005         (MonoDebuggerInfo): Renamed the `dummy' field info `runtime_info'.
1006
1007         * debug-debugger.c
1008         (mini_debugger_set_attach_ok): New function; sets the attach-ok
1009         flag in `MONO_DEBUGGER__info.runtime_info'.
1010
1011         * driver.c
1012         (mono_main): Call mini_debugger_set_attach_ok() if generics
1013         sharing is disabled.
1014
1015 2009-06-22  Zoltan Varga  <vargaz@gmail.com>
1016
1017         * aot-compiler.c (add_wrappers): Fix a warning.
1018
1019         * mini-ppc.c tramp-ppc.c exceptions-ppc.c aot-compiler.c: Update after
1020         the ppc load/store macro changes.
1021
1022 2009-06-21  Zoltan Varga  <vargaz@gmail.com>
1023
1024         * tramp-ppc.c (mono_arch_patch_plt_entry): Implement this.
1025
1026         * aot-compiler.c (mono_compile_assembly): Sanitize the plt symbol too,
1027         not just the got symbol.
1028
1029         * mini-ppc.c aot-compiler.c unwind.c: Implement generation of unwind info
1030         on ppc.
1031
1032         * aot-compiler.c unwind.c: Add infrastructure for unwind support on
1033         ppc.
1034         
1035         * aot-compiler.c: Remove some fixmes.
1036
1037         * driver.c (mono_main): Print a helpful message when cross-compiling.
1038
1039         * mini.c (mini_init): Disable signal handlers when cross-compiling.
1040
1041         * method-to-ir.c (initialize_array_data): Do the optimization if the
1042         target byte order is little endian, instead of the host byte order.
1043
1044         * aot-compiler.c: Emit sizes for most symbols, only emit runtime-invoke
1045         wrappers into the mscorlib image, Emit a unique plt symbol for each
1046         image, emit symbols for plt entries.
1047
1048         * image-writer.c (img_writer_emit_symbol_size): New function to emit
1049         a .size directive.
1050         
1051 2009-06-20  Zoltan Varga  <vargaz@gmail.com>
1052
1053         * aot-compiler.c (add_wrappers): Avoid calling 
1054         mono_marshal_get_type_info () since it can assert for some types.
1055
1056         * method-to-ir.c (mono_method_to_ir): Disable aot when some forms of 
1057         ldtoken are used inside wrappers.
1058
1059         * helpers.c: Add support for prefixing tools with the arch name.
1060
1061         * mini.h (OP_LOADR_MEMBASE): New opcodes to load/store pointer sized
1062         quantities when using ilp32.
1063
1064         * mini-codegen.c: Use OP_LOADR_MEMBASE/OP_STORER_MEMBASE for loading/storing
1065         spill slots. Use sizeof(mgreg_t) for the spill slot size.
1066
1067         * image-writer.c: Use .long on ilp32.
1068
1069         * aot-compiler.c: Use 32 bit loads on ilp32.
1070         
1071 2009-06-19  Zoltan Varga  <vargaz@gmail.com>
1072
1073         * tramp-ppc.c (mono_arch_create_trampoline_code): Fix the ppc build.
1074
1075         * mini-ops.h: Use TARGET_POWERPC define for consistency.
1076
1077         * patch-info.h: Add 'MSCORLIB_GOT_ADDR' patch type.
1078
1079         * aot-compiler.c aot-runtime.c: Put the mscorlib got address into the 
1080         second got slot of every aot image.
1081         
1082         * aot-compiler.c aot-runtime.c mini-trampolines.c: Add support for
1083         aot on platforms with function pointers.
1084
1085         * mini-ppc.h mini-ppp.c cpu-ppc.md exceptions-ppc.c tramp-ppc.c: Add
1086         support for aot/full aot on ppc/ppc64.
1087         
1088         * tramp-<ARCH>.c (mono_arch_patch_plt_entry): Add 'got' and 'regs'
1089         arguments which are needed on ppc.
1090
1091         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Add 'regs'
1092         argument.
1093
1094         * mini-trampolines.c aot-runtime.c: Update after the above changes.
1095         
1096         * liveness.c (BITS_PER_CHUNK): Use MONO_BITSET_BITS_PER_CHUNK.
1097
1098         * regalloc2.c (BITS_PER_CHUNK): Ditto.  
1099
1100         * aot-compiler.c (emit_got_info): Fix reading unused memory.
1101
1102         * ir-emit.h (alloc_dreg): Add a 'return -1' to quiet some compilers.
1103
1104 2009-06-17  Geoff Norton  <gnorton@novell.com>
1105
1106         * aot-compiler.c: Ensure we dont try to close a null dwarf writer.
1107
1108 2009-06-17  Zoltan Varga  <vargaz@gmail.com>
1109
1110         * dwarfwriter.c (mono_dwarf_writer_create): Add an 'appending' parameter
1111         to control whenever the dwarf writer is in xdebug or aot mode.
1112         (emit_class_dwarf_info): Use a separate abbrev for structures without
1113         children.
1114
1115         * aot-compiler.c: Pass the appending parameter to 
1116         mono_dwarf_writer_create ().
1117
1118         * branch-opts.c (mono_merge_basic_blocks): Fix the case when bbn
1119         falls through to its next bblock. Fixes #513931.
1120
1121         * iltests.il: Add a test.
1122
1123         * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Emit some line number
1124         infor even if emit_line is FALSE, as the apple linker seems to require it.
1125
1126         * image-writer.c (asm_writer_emit_symbol_diff): Call get_label ().
1127
1128         * dwarfwriter.c (emit_cie): Emit a separate symbol for the cie start, as
1129         gcc does.
1130         (emit_fde): Ditto.
1131
1132 2009-06-15  Zoltan Varga  <vargaz@gmail.com>
1133
1134         * exceptions-mips.c (mono_arch_get_throw_exception_by_name): Fix the
1135         mips build.
1136
1137 2009-06-13  Zoltan Varga  <vargaz@gmail.com>
1138
1139         * mini.h (struct MonoBasicBlock): Add 'has_jump_table' and 
1140         'has_call_handler' fields.
1141
1142         * method-to-ir.c (mono_method_to_ir): Set them if needed.
1143
1144         * branch-opts.c (mono_merge_basic_blocks): Avoid iterating through the
1145         first bblock if not needed. Fixes #512790.
1146         
1147 2009-06-11  Zoltan Varga  <vargaz@gmail.com>
1148
1149         * aot-compiler.c (mono_compile_assembly): Fix a warning.
1150         
1151         * aot-compiler.c (add_wrappers): Don't emit remoting-invoke-with-check
1152         wrappers.
1153
1154         * aot-runtime.c (mono_aot_get_method): Use the original method's code for
1155         remoting-invoke-with-check wrappers, which are not needed when running with
1156         full-aot, since it doesn't support remoting.
1157         
1158 2009-06-10  Zoltan Varga  <vargaz@gmail.com>
1159
1160         * aot-compiler.c (emit_got_info): Don't emit offsets for the plt got entries.
1161
1162         * aot-compiler.c aot-runtime.c: Don't emit the first got offset in the
1163         method info, it is not used anymore.
1164
1165         * mini.h: Bump AOT file format version.
1166         
1167         * aot-compiler.c (arch_emit_plt_entry): Make the arm plt entries one
1168         word smaller.
1169
1170         * aot-runtime.c (mono_aot_get_plt_info_offset): Update after the
1171         change above.
1172         
1173         * tramp-arm.c (mono_arch_patch_plt_entry): Ditto.
1174
1175         * mini.h: Bump AOT file format version.
1176         
1177 2009-06-10  Zoltan Varga  <vargaz@gmail.com>
1178
1179         * image-writer.c (asm_writer_emit_symbol_diff): Disable the 
1180         TARGET_ASM_APPLE stuff for now, as it doesn't seem to work on the
1181         iphone.
1182
1183         * mini-arm.c (mono_arch_output_basic_block): Fix the implementation
1184         of CKFINITE and FBGE for VFP.
1185
1186 2009-06-09  Zoltan Varga  <vargaz@gmail.com>
1187
1188         * aot-compiler.c: Don't align code to 16 bytes on arm.
1189         
1190         * aot-compiler.c (emit_method_code): Emit the unbox trampolines right
1191         before the methods they belong to.
1192
1193         * aot-runtime.c (mono_aot_plt_resolve): Avoid creating trampolines in
1194         the full-aot case if possible, since the trampoline will be called right 
1195         away.
1196
1197         * aot-compiler.c (mono_compile_assembly): Decrease the number of full aot
1198         trampolines to 1024 after the change above.
1199
1200         * aot-compiler.c (arch_emit_specific_trampoline): Rework the arm
1201         trampoline to save 8 bytes per trampoline.
1202
1203         * tramp-arm.c (mono_arch_create_trampoline_code_full): Update after the
1204         change above.
1205
1206 2009-06-08  Zoltan Varga  <vargaz@gmail.com>
1207
1208         * aot-compiler.c: Use acfg->temp_prefix instead of .L to prefix labels.
1209
1210 2009-06-08  Martin Baulig  <martin@ximian.com>
1211
1212         * debug-mini.c
1213         (MonoDebuggerExceptionAction): Moved into debug-mini.h.
1214         (_mono_debugger_throw_exception): Don't make this static.
1215         (_mono_debugger_unhandled_exception): Likewise.
1216         (mono_debugger_handle_exception): Moved to mini-exceptions.c
1217
1218         * debug-mini.c
1219         (MonoDebuggerExceptionAction): Moved here from debug-mini.c.
1220         (_mono_debugger_throw_exception): Add function prototype.
1221         (_mono_debugger_unhandled_exception): Likewise.
1222
1223         * mini-exceptions.c
1224         (mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
1225         arg; return the first exception handler if the exception is caught
1226         and we're running inside the debugger.
1227         (mono_debugger_handle_exception): Moved here from debug-mini.c;
1228         improve exception handle inside runtime-invoke, check whether the
1229         exception is actually caught in the method being invoked and not
1230         by the runtime-invoke-wrapper.
1231
1232 2009-06-08  Zoltan Varga  <vargaz@gmail.com>
1233
1234         * image-writer.c: Improve support for the osx assembler.
1235
1236         * dwarfwriter.c: Avoid the usage of subsections if the assembler doesn't
1237         support them.
1238
1239 2009-06-08  Martin Baulig  <martin@ximian.com>
1240
1241         * debug-mini.c
1242         (MonoDebuggerExceptionAction): Moved into debug-mini.h.
1243         (_mono_debugger_throw_exception): Don't make this static.
1244         (_mono_debugger_unhandled_exception): Likewise.
1245         (mono_debugger_handle_exception): Moved to mini-exceptions.c
1246
1247         * debug-mini.c
1248         (MonoDebuggerExceptionAction): Moved here from debug-mini.c.
1249         (_mono_debugger_throw_exception): Add function prototype.
1250         (_mono_debugger_unhandled_exception): Likewise.
1251
1252         * mini-exceptions.c
1253         (mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
1254         arg; return the first exception handler if the exception is caught
1255         and we're running inside the debugger.
1256         (mono_debugger_handle_exception): Moved here from debug-mini.c;
1257         improve exception handle inside runtime-invoke, check whether the
1258         exception is actually caught in the method being invoked and not
1259         by the runtime-invoke-wrapper.
1260
1261 2009-06-07  Zoltan Varga  <vargaz@gmail.com>
1262
1263         * image-writer.c (append_subsection): Don't align subsections of the
1264         debug_line section as a workaround.
1265
1266         * dwarfwriter.c: Emit line number info in the AOT case as well.
1267
1268 2009-06-06  Steven Munroe  <munroesj@us.ibm.com>
1269
1270         This patch is contributed under the terms of the MIT/X11 license
1271
1272        * mini-ppc.c (mono_arch_emit_exceptions): Change assert to
1273        code_len <= code_size
1274
1275 2009-06-06  Zoltan Varga  <vargaz@gmail.com>
1276
1277         * mini-mips.c (mips_emit_exc_by_name): Fix the mips build.
1278
1279 2009-06-04  Zoltan Varga  <vargaz@gmail.com>
1280
1281         * aot-compiler.c aot-runtime.c: Delete references to static rgctx
1282         invoke wrappers, we now use trampolines instead.
1283
1284 2009-06-04  Mark Probst  <mark.probst@gmail.com>
1285
1286         * mini-darwin.c: The exception thread must not be registered with
1287         the GC.
1288
1289 2009-06-04  Mark Probst  <mark.probst@gmail.com>
1290
1291         * mini-gc.c: Disable the code because it makes SGen crash.
1292
1293 2009-06-03  Zoltan Varga  <vargaz@gmail.com>
1294
1295         * aot-compiler.c (mono_compile_assembly): Handle file open errors gracefully
1296         instead of asserting.
1297
1298 2009-05-31  Zoltan Varga  <vargaz@gmail.com>
1299
1300         * aot-compiler.c (mono_compile_assembly): Move the creation of the
1301         output file after the code has been compiled.
1302
1303 2009-05-30  Zoltan Varga  <vargaz@gmail.com>
1304
1305         * tramp-ppc.c (mono_arch_get_static_rgctx_trampoline): Fix 64 bit support.
1306
1307 2009-05-31  Zoltan Varga  <vargaz@gmail.com>
1308
1309         * aot-compiler.c aot-runtime.c: Get rid of the shared/non-shared got
1310         entries distinction to simplify the code.
1311
1312         * mini.h: Bump AOT file format version.
1313         
1314 2009-05-28  Zoltan Varga  <vargaz@gmail.com>
1315
1316         * objects.cs: Fix the signature of one of the tests.
1317
1318         * mini.c (mini_create_ftnptr): New helper function, moved here from
1319         object.c.
1320         (mini_get_addr_from_ftnptr): Ditto.
1321         (mini_init): Install the new helpers.
1322
1323 2009-05-28  Martin Baulig  <martin@ximian.com>
1324
1325         Correctly initialize the debugger when embedding Mono.
1326
1327         * mdb-debug-info32.s, mdb-debug-info64.s: Add a global variable
1328         `MONO_DEBUGGER__using_debugger' to the `.mdb_debug_info' section;
1329         see documentation in mini_debug_running_inside_mdb().
1330
1331         * debug-debugger.c
1332         (mini_debug_running_inside_mdb): New function to check whether
1333         we're running inside mdb.
1334
1335         * mini.c (mini_init): Call mini_debugger_init() if we're running
1336         inside the debugger.
1337
1338         * driver.c (mono_main): Moved the call to mini_debugger_init()
1339         into mini_init() to make this work when embedding Mono.
1340
1341         * debug-debugger.c (mini_debugger_init): Warn about duplicate
1342         calls to mini_debugger_init().
1343
1344         * mini.h: Rename mono_debugger_init() -> mini_debugger_init(),
1345         mono_debugger_main() -> mini_debugger_main() and put them inside a
1346         `MONO_DEBUGGER_SUPPORTED' conditional.
1347
1348 2009-05-26 Rodrigo Kumpera  <rkumpera@novell.com>
1349
1350         * mini-trampolines.c: Kill mono_find_delegate_trampoline_by_addr as
1351         this is no longer in use.
1352         * mini.h: Same.
1353
1354 2009-05-26  Zoltan Varga  <vargaz@gmail.com>
1355
1356         * mini-sparc.c (add_outarg_load): Fix the sparc build.
1357
1358         * aot-compiler.c (emit_method_code): Always write out C style symbols for
1359         methods.
1360
1361 2009-05-27  Martin Baulig  <martin@ximian.com>
1362
1363 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
1364
1365         * mini-x86.c (mono_arch_output_basic_block): Fix the precision of
1366         long_conv_to_r_un to 64 bits.
1367
1368         * cpu-x86.md: Increase the instruction size due to the changes.
1369
1370         * iltests.il.in: Add regression test.
1371
1372         Fixes #467201.
1373
1374 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
1375
1376         * objects.cs: Move the previous test from basic.cs to here.
1377
1378 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
1379
1380         * basic.cs: Add regression test for #506915.
1381
1382 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
1383
1384         * method-to-ir.c (mono_method_to_ir): When doing the ldobj+stobj
1385         optimization we must check the bb of the first byte of stobj as
1386         it's the only one set in cil_offset_to_bb.
1387
1388         Fixes #506915.  
1389
1390 2009-05-25  Zoltan Varga  <vargaz@gmail.com>
1391
1392         * image-writer.c: Fix pointer directive on ppc64.
1393
1394 2009-05-24  Zoltan Varga  <vargaz@gmail.com>
1395
1396         * image-writer.c (asm_writer_emit_section_change): Avoid using
1397         .bss subsections on ppc too.
1398
1399 2009-05-23  Zoltan Varga  <vargaz@gmail.com>
1400
1401         * image-writer.c: Fix the definition of TARGET_ASM_....
1402         
1403         * image-writer.c: Fix the emission of assembler directives in the last
1404         change.
1405
1406         * mini-ppc.c (mono_arch_emit_exceptions): Increase the size of the
1407         exception throwing code to accomodate ppc64.
1408
1409         * tramp-ppc.c (mono_arch_get_nullified_class_init_trampoline): Increase the
1410         size to work on ppc64 too.
1411
1412         * mini-ppc.h (MonoCompileArch): Enable static rgctx trampolines on ppc64
1413         too.
1414
1415         * image-writer.c: Clean up the #ifdef hell a bit by adding defines for
1416         the assembler dialect instead of using platform specific defines.
1417
1418 2009-05-22  Geoff Norton  <gnorton@novell.com>
1419
1420         * mini-arm.c (get_call_info): If a structure is split between the stack
1421         and argument registers, we should not advance the stack pointer by the entire
1422         native size, but just by the amount that spilled.
1423
1424 2009-05-22  Zoltan Varga  <vargaz@gmail.com>
1425
1426         * mini-arm.c (get_call_info): Handle structures with alignment requirements
1427         correctly.
1428
1429 2009-05-21  Zoltan Varga  <vargaz@gmail.com>
1430
1431         * aot-compiler.c (emit_extra_methods): Encode direct runtime invoke
1432         wrappers normally.
1433         
1434         * aot-compiler.c (add_extra_method): Fix up the collection of extra
1435         methods so wrapper don't get added twice.
1436         (add_generic_instances): Don't add methods of arrays.
1437
1438         * generics.cs: Mark one test as !FULLAOT.
1439
1440 2009-05-21 Rodrigo Kumpera  <rkumpera@novell.com>
1441
1442         * mini-x86.c (emit_move_return_value): Remove unused vars.
1443
1444 2009-05-21 Rodrigo Kumpera  <rkumpera@novell.com>
1445
1446         * mini-x86.c (mono_arch_emit_call): The decompose code now supports
1447         decomposing 8 bytes structs into a LCALL.
1448
1449         * mini-x86.c (emit_move_return_value): We no longer push the vtype
1450         pointer for where to store the returned regs.
1451
1452         * decompose.c (mono_decompose_vtype_opts): Fix the comment to properly
1453         state the concern.
1454
1455         Fixes #471747, #471751 and #4734530 (in fact, it's a bunch of dups).
1456
1457 2009-05-20  Miguel de Icaza  <miguel@novell.com>
1458
1459         * aot-runtime.c (mono_aot_init): Use g_getenv to work on systems
1460         without getenv.
1461
1462 2009-05-21  Zoltan Varga  <vargaz@gmail.com>
1463
1464         * aot-compiler.c (add_wrappers): Add StructureToPtr/PtrToStructure wrappers.
1465
1466         * basic.cs: Move the test_2_cprop_bug () test to generics.cs as it involves
1467         generics.
1468
1469 2009-05-20 Rodrigo Kumpera  <rkumpera@novell.com>
1470
1471         * local-propagation.c (mono_local_cprop): Avoid local propagation
1472         across paired add/sub if the first instruction dest reg is it's
1473         source reg. For example:
1474
1475         int_add_imm R12 <- R12 [1] clobbers: 1
1476         int_sub_imm R42 <- R12 [1] clobbers: 1
1477
1478         The cprop pass would wrongly const prop + 1 to int_sub_imm which doesn't
1479         maintain the math identify.
1480
1481         Fixes #505375.
1482
1483 2009-05-20  Andreia Gaita  <avidigal@novell.com>
1484
1485         * Makefile.am: avoid going on the network just to get the revision,
1486         use git log instead
1487
1488 2009-05-19  Massimiliano Mantione  <massi@ximian.com>
1489
1490         Fixed estimate for short branches on amd64 (they were off mark, and
1491         enabling call prolog-epilog instrumentations caused assertions).
1492         * mini.h (struct MonoBasicBlock): added max_length field to hold the
1493         estimate for the maximum length of this basic block.
1494         * mini-amd64.c:
1495         - mono_arch_emit_prolog: compute max_length for each basic block
1496           (instead of max_offset), and inflate size estimate also for entry bb
1497           in case of code instrumentation.
1498         - mono_arch_output_basic_block: get rid of "cpos" (the current
1499           estimated "position" in the code), and always use "offset" instead,
1500           which is accurate; at the beginning of the function quickly recompute
1501           max_offset for all the remaining blocks, starting from the current
1502           cfg->code_len (which is correct, and not estimated) and using the
1503           estimated block lengths computed previously.
1504
1505 2009-05-17  Zoltan Varga  <vargaz@gmail.com>
1506
1507         * exceptions-ppc.c: Remove the caching from the trampoline creation 
1508         functions, it is already done in the caller.
1509
1510         * mini-trampolines.c (mono_llvm_vcall_trampoline): Fix the llvm build.
1511
1512         * mini-ppc.h mini-arm.h mini-x86.h mini-amd64.h: Add 
1513         MONO_ARCH_GSHARED_SUPPORTED define.
1514
1515         * mini.c (mini_init): Use the MONO_ARCH_GSHARED_SUPPORTED define.
1516
1517         * mini-arm.c mini.c: Get rid of the unused mono_arch_fixup_jinfo ()
1518         function.
1519
1520 2009-05-16  Zoltan Varga  <vargaz@gmail.com>
1521
1522         * jit-icalls.c (mono_helper_compile_generic_method): Get rid of the 
1523         call to mono_marshal_get_rgctx_invoke ().
1524
1525         * mini.c method-to-ir.c mini-trampolines.c: Get rid of the usage of
1526         mono_marshal_get_static_rgctx_invoke (), all platforms which support
1527         gshared use the static rgctx trampolines now.
1528         
1529         * mini.c (mini_init): Call mono_set_generic_sharing_supported () if the
1530         platform supports it.
1531
1532 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
1533
1534         * mini-arm.c (mono_arch_allocate_vars): Correctly save R5 when using AOT.
1535
1536         * aot-compiler.c (emit_method_code): Avoid duplicate labels for methods.
1537
1538 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
1539
1540         * mini-ppc.c (mono_arch_emit_exceptions): Nullify the processed patches.
1541
1542         * tramp-ppc.c (mono_arch_nullify_class_init_trampoline): Implement this
1543         for ppc.
1544
1545 2009-05-15  Massimiliano Mantione  <massi@ximian.com>
1546
1547         Made it possible for mono_arch_instrument_epilog to preserve
1548         argument registers, otherwise instrumenting the "epilogue" before
1549         a tail call would clobber them.
1550         * mini.h: Added "mono_arch_instrument_epilog_full" prototype, which
1551         if like mono_arch_instrument_epilog but with an additional parameter
1552         that states if argument registers must be preserved.
1553         * mini.c: implemented mono_arch_instrument_epilog as a call to
1554         mono_arch_instrument_epilog_full without asking to preserve argument
1555         registers (this makes the existing code work as usual).
1556         * mini-amd64.c:
1557         - mono_arch_instrument_epilog: add parameter to transform it into
1558         mono_arch_instrument_epilog_full, and preserve argument registers
1559         when required.
1560         - mono_arch_output_basic_block, OP_TAILCALL case: call
1561         mono_arch_instrument_epilog_full.
1562         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
1563         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c, mini-x86.c:
1564         only transformed mono_arch_instrument_epilog into
1565         mono_arch_instrument_epilog_full.
1566
1567 2009-05-15  Geoff Norton  <gnorton@novell.com>
1568
1569         * mini-darwin.c: This works on arm now.
1570
1571 2009-05-14  Geoff Norton  <gnorton@novell.com>
1572
1573         * jit.h, driver.c: Allow full-aot to be decided programatically by the
1574         embedding api.
1575
1576 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
1577
1578         * aot-compiler.c (emit_method_code): Skip a few more characters in the debug
1579         label names.
1580
1581         * mini-trampolines.c (mono_magic_trampoline): Handle static rgctx invoke
1582         wrappers during full aot mode correctly.
1583
1584         * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle shared generic
1585         methods correctly.
1586
1587         * aot-compiler.c (mono_aot_method_hash): Use our internal version of
1588         mono_metadata_type_hash ().
1589
1590 2009-05-14  Massimiliano Mantione  <massi@ximian.com>
1591
1592         * mini.h, mini-codegen.c, mini-alpha.c, mini-amd64.c, mini-arm.c,
1593         mini-hppa.h, mini-hppa.c, mini-ia64.c, mini-mips.h, mini-mips.c,
1594         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c, mini-886.c:
1595         Removed MONO_INST_BRLABEL from the instruction flags, and the
1596         remaining code that used it, because we do not support branches inside
1597         basic blocks (and branch target labels) anymore.
1598         * Makefile.am: As part of the above cleanup, remove reference to
1599         BURG files which don't exist anymore.
1600
1601 2009-05-14  Zoltan Varga  <vargaz@gmail.com>
1602
1603         * image-writer.c (asm_writer_emit_local_symbol): Make this a nop on
1604         osx.
1605
1606         * mini-mips.c mini-mips.h exceptions-mips.c: Transition the mips backend
1607         to use mono_arch_throw_corlib_exception.
1608
1609         * mini-ppc.c mini-ppc.h exceptions-ppc.c: Use 
1610         mono_arch_throw_corlib_exception for throwing corlib exceptions.
1611
1612         * aot-runtime.c (decode_patch): Allocate the data for R4/R8 from the
1613         domain mempool.
1614
1615         * mini.c (mono_patch_info_dup_mp): Copy the table of switch targets too.
1616
1617         * aot-compiler.c: Emit a local symbol prefixed with the assembly name 
1618         for the got to make debugging easier and to avoid confusing it with the
1619         system got.
1620         
1621         * aot-compiler.c (emit_method_code): Emit a C style symbol for each
1622         method so a breakpoint can be set when using gdb.
1623
1624 2009-05-13  Zoltan Varga  <vargaz@gmail.com>
1625
1626         * aot-compiler.c (mono_aot_method_hash): Implement this properly based
1627         on mono_method_get_imt_slot ().
1628
1629         * aot-runtime.c (find_extra_method_in_amodule): Get rid of the
1630         num_decodes variables.
1631
1632         * aot-compiler.c (mono_aot_method_hash): Revert part of the last
1633         change as it doesn't seem to work.
1634         
1635         * aot-compiler.c (mono_aot_method_hash): Improve the hashing of
1636         wrappers.
1637
1638 2009-05-12  Zoltan Varga  <vargaz@gmail.com>
1639
1640         * aot-compiler.c mini.c mini-amd64.h mini-arm.h: Kill 
1641         MONO_ARCH_FULL_AOT_IMT_SUPPORTED define, both platforms now support imt.
1642
1643         * mini.c (mini_init): Install mono_aot_get_imt_thunk as the IMT thunk
1644         builder when using full aot.
1645
1646         * mini-amd64.c (mono_arch_build_imt_thunk): Don't handle the full-aot case
1647         here, it is already handled.
1648         
1649         * mini-arm.c (mono_arch_emit_imt_argument): Pass the dynamic imt arg
1650         correctly for IMT.
1651
1652         * aot-compiler.c (arch_emit_imt_thunk): Implement this for ARM.
1653
1654         * mini-arm.h: Enable IMT for full aot.
1655         
1656         * aot-compiler.c (mono_compile_assembly): Don't emit imt thunk if the
1657         arch doesn't support it.
1658
1659         * mini.c (mini_init): Don't disable IMT for full aot if the
1660         architecture supports it.
1661
1662         * mini.h (MonoAotTrampoline): New enum containing the different types
1663         of 'numerous' trampolines.
1664         (MONO_AOT_FILE_VERSION): Bump this.
1665
1666         * aot-compiler.c aot-runtime.c: Unify the handling of specific and
1667         static rgctx trampolines. Add support for full-aot IMT thunks.
1668
1669         * mini-amd64.h: Enable IMT for full aot.
1670
1671         * TestDriver.cs: Add a CategoryAttribute class and an --exclude option
1672         to exclude tests belonging to a category.
1673
1674         * generics.cs: Mark some tests with a !FULLAOT category.
1675
1676         * Makefile.am (fullaotcheck): Run tests with --exclude !FULLAOT. Include
1677         generics tests.
1678
1679 2009-05-11  Zoltan Varga  <vargaz@gmail.com>
1680
1681         * aot-compiler.c (emit_and_reloc_code): Move the implementation of
1682         MONO_PATCH_INFO_GOT_OFFSET to a separate arch-specific function.
1683         (emit_plt): Fix a warning.
1684
1685 2009-05-10  Zoltan Varga  <vargaz@gmail.com>
1686
1687         * aot-compiler.c aot-runtime.c: Fix the build by moving is_shared_got_patch
1688         back into aot-compiler.c to a place where the other functions shared by
1689         the runtime and aot compiler are.
1690         
1691         * aot-compiler.c aot-runtime.c: Emit the got addr using a separate symbol,
1692         as done previously, instead of in MonoAotFileInfo, since pointers might have
1693         alignment requirements.
1694
1695         * mini.h: Bump AOT file format version.
1696
1697 2009-05-10  Miguel de Icaza  <miguel@novell.com>
1698
1699         * aot-runtime.c (mono_aot_is_shared_got_patch): Move this routine
1700         that is used at runtime from the aot-compiler.c, this makes it
1701         work on setups that remove the AOT compiler from the output
1702         image. 
1703
1704 2009-05-09  Zoltan Varga  <vargaz@gmail.com>
1705
1706         * tramp-ppc.c (mono_arch_get_static_rgctx_trampoline): Implement this for
1707         PPC.
1708
1709         * mini-ppc.h: Enable static rgctx trampolines for ppc.
1710
1711         * mini-<ARCH>.h: Kill the MONO_ARCH_ENABLE_EMIT_STATE_OPT define.
1712
1713         * decompose.c (mono_decompose_long_opts): Move the ppc/sparc specific 
1714         stuff to mono_arch_decompose_long_opts ().
1715         (mono_decompose_opcode): Remove some dead code.
1716
1717 2009-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
1718
1719         * method-to-ir.c (mono_method_to_ir): Fix boostrap of non amd64 builds
1720         cmethod can be null for quite a some reasons.
1721
1722 2009-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
1723
1724         * method-to-ir.c (mono_method_to_ir): Fix non amd64 builds.
1725
1726 2009-05-08  Zoltan Varga  <vargaz@gmail.com>
1727
1728         * aot-compiler.c (arch_emit_got_access): Fix the aot-not-supported build.
1729
1730 2009-05-08  Zoltan Varga  <vargaz@gmail.com>
1731
1732         * method-to-ir.c (mono_emit_call_args): Add a 'tail' flag argument.
1733         (mono_method_to_ir): Use MONO_ARCH_USE_OP_TAIL_CALL macro to determine
1734         whenever to make tail calls using OP_TAIL_CALL. Enable support for tail
1735         calls returning structures by addr on amd64.
1736
1737         * mini-amd64.h (MONO_ARCH_USE_OP_TAIL_CALL): New arch-specific macro.
1738
1739         * iltests.il.in: Restructure the tail call tests a bit.
1740         
1741 2009-05-07  Zoltan Varga  <vargaz@gmail.com>
1742
1743         * aot-compiler.c (add_wrappers): Add remoting-invoke-with-check wrappers
1744         for virtual methods too.
1745
1746 2009-05-06  Raja R Harinath  <harinath@hurrynot.org>
1747
1748         * method-to-ir.c (mono_method_to_ir): Revert change of 2009-05-02
1749         due to regression in verifying System.dll.
1750
1751 2009-05-06  Zoltan Varga  <vargaz@gmail.com>
1752
1753         * debug-mini.c (mono_debugger_method_has_breakpoint): Allow breakpoints
1754         in dynamic methods.
1755
1756         * dwarfwriter.c (emit_class_dwarf_info): Add support for generic
1757         instances.
1758
1759         * aot-compiler.c aot-runtime.c: Use our own hash function instead of
1760         g_str_hash () which can change.
1761
1762         * driver.c (mini_regression): Disable optimizations not supported by
1763         the cpu. Fixes #500019.
1764
1765         * aot-runtime.c (mono_aot_get_unwind_info): Fix the --enable-minimal=aot
1766         build.
1767
1768 2009-05-06  Zoltan Varga  <vargaz@gmail.com>
1769
1770         * mini-llvm.c (mono_llvm_emit_method): Update the OP_TLS_GET implementation
1771         to the latest LLVM code.
1772
1773 2009-05-05  Zoltan Varga  <vargaz@gmail.com>
1774
1775         * genmdesc.pl (load_opcodes): Fix this after the TARGET_... changes.
1776
1777 2009-05-04  Zoltan Varga  <vargaz@gmail.com>
1778
1779         * mini-llvm.c (mono_llvm_emit_method): Implement TLS support on 
1780         x86/amd64.
1781
1782         * aot-compiler.c (encode_patch_list): Simplify this considerably as we are
1783         no longer saving offsets, so just save the patch types along with the other
1784         info.
1785         * aot-runtime.c (load_patch_info): Update after the changes to 
1786         encode_patch_list ().
1787         (decode_got_entry): Removed, merged into load_patch_info ().
1788         (is_shared_got_patch): Removed, call the same function from
1789         aot-compiler.c.
1790
1791         * mini.h: Bump aot file format version.
1792         
1793         * aot-compiler.c aot-runtime.c: Resurrect static linking support. Kill the
1794         half-finished no-dlsym code.
1795
1796         * aot-runtime.c (load_method): Kill the old and bit-rotten use_loaded_code
1797         option.
1798
1799         * mini-<ARCH>.h mini-trampolines.c aot-runtime.c: Kill the 
1800         MONO_ARCH_HAVE_CREATE_TRAMPOLINE_FROM_TOKEN define.
1801
1802 2009-05-02  Zoltan Varga  <vargaz@gmail.com>
1803
1804         * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Increase the
1805         buffer length to work with AOT code.
1806
1807         * method-to-ir.c (mono_method_to_ir): Handle loading errors in the
1808         ldfld/stfld opcodes.
1809
1810         * exceptions-x86.c (mono_arch_get_throw_exception_by_name): Simplify this
1811         as it is not used.
1812
1813         * mini-llvm.c mini-x86.c: Implement 32 bit and x86 support.
1814
1815         * ssa.c (mono_ssa_compute): Don't skip I8 values when using LLVM.
1816
1817         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Update to the latest
1818         LLVM API.
1819
1820         * mini.c (mini_method_compile): Set the from_llvm flag in MonoJitInfo
1821         if needed. Don't decompose long operations when using llvm.
1822
1823 2009-05-01  Zoltan Varga  <vargaz@gmail.com>
1824
1825         * aot-compiler.c aot-runtime.c: Use mono_pagesize () instead of the
1826         PAGESIZE constant.
1827
1828         * aot-runtime.c (load_aot_module): Get rid of another mprotect call.
1829
1830 2009-05-03  Martin Baulig  <martin@ximian.com>
1831
1832         * debug-debugger.c (debugger_insert_source_breakpoint): Don't call
1833         mono_debugger_insert_method_breakpoint() since the class init
1834         handler we're inserting at the top of the method already gives us
1835         a notification.
1836
1837 2009-04-30  Zoltan Varga  <vargaz@gmail.com>
1838
1839         * decompose.c (mono_decompose_long_opts): Move the implementation of LNEG
1840         to mono_arch_decompose_long_opts () for x86 and arm.
1841
1842 2009-04-29  Zoltan Varga  <vargaz@gmail.com>
1843
1844         * mini-codegen.c (mono_regstate_alloc_int): Use __x86_64__ instead of
1845         TARGET_AMD64 here.
1846
1847 2009-04-28  Zoltan Varga  <vargaz@gmail.com>
1848
1849         * *.h *.c: Use TARGET_<ARCH> defines instead of __<arch>__ defines in the
1850         JIT code.
1851
1852 2009-04-26  Zoltan Varga  <vargaz@gmail.com>
1853
1854         * aot-runtime.c (mono_aot_create_specific_trampoline): Add a stat for the
1855         number of trampolines used in full-aot mode.
1856
1857         * aot-compiler.c: Add an ntrampolines option to set the number of 
1858         trampolines emitted in full-aot mode.
1859
1860 2009-04-27  Zoltan Varga  <vargaz@gmail.com>
1861
1862         * mini-llvm.c (mono_llvm_emit_method): Implement OP_CHECK_THIS using
1863         a volatile load. Get rid of get_tempname (), llvm assigns names
1864         automatically.
1865
1866         * mini-llvm-cpp.cpp (mono_llvm_build_volatile_load): New instruction
1867         builder function.
1868
1869         * mini-llvm.c (mono_llvm_emit_method): Don't call LLVMGetParam on
1870         a value.
1871
1872         * abcremoval.c (REPORT_ABC_REMOVAL): Don't output messages at verbose
1873         level 1.
1874
1875         * mini-codegen.c (mono_local_regalloc): Prevent sreg1/dreg to be allocated
1876         to the same register as a fixed sreg2. Fixes #497271.
1877
1878         * iltests.il.in: Add a new test.
1879
1880 2009-04-26  Zoltan Varga  <vargaz@gmail.com>
1881
1882         * mini-amd64.c: Use moves instead of pushes for passing arguments on the
1883         stack, since pushes complicate exception handling.
1884
1885         * exceptions-amd64.c (mono_arch_find_jit_info): Don't pop the arguments of
1886         the stack if they are passed using moves.
1887
1888         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add an assert.
1889
1890         * method-to-ir.c (mono_method_to_ir): Disable fast virtual generic methods
1891         when using llvm.
1892
1893         * mini-llvm.c (mono_llvm_emit_method): Call jit icall wrappers, not the 
1894         icalls themselves. Convert arguments of FCOMPARE. Convert the destination
1895         of FMOVE if it is an R4.
1896
1897 2009-04-25  Zoltan Varga  <vargaz@gmail.com>
1898
1899         * mini-ops.h: Add OP_LLVM_OUTARG_VT opcode.
1900
1901         * mini.h (LLVMCallInfo): New structure to store calling convention 
1902         information for the LLVM back end similar to the CallInfo structures in 
1903         the back-ends.
1904
1905         * mini-amd64.c (mono_arch_get_llvm_call_info): New arch function to return
1906         call information in a format usable by LLVM.
1907         (mono_arch_emit_call): Move the LLVM handling code to mono_llvm_emit_call ().
1908
1909         * method-to-ir.c (mono_emit_call_args): Emit calls using 
1910         mono_llvm_emit_call () when compiling using LLVM.
1911
1912         * mini-llvm.c: Implement support for passing/receiving valuetypes. Add
1913         comments to all functions. Fix memory leaks. Add a public init/cleanup
1914         function.
1915
1916         * mini.c: Call the llvm init/cleanup functions in mini_init()/cleanup().
1917
1918         * method-to-ir.c (handle_array_new): Disable llvm when calling the vararg
1919         mono_array_new_va () jit icall.
1920         
1921 Fri Apr 24 16:44:08 CEST 2009 Paolo Molaro <lupus@ximian.com>
1922
1923         * Makefile.am, genmdesc.c, genmdesc.pl: tiny refactor to allow
1924         multiple machine description files to be specified.
1925         * mini-ops.h: fixes for cross-compilation.
1926
1927 2009-04-22  Miguel de Icaza  <miguel@novell.com>
1928
1929         * aot-runtime.c (make_writable): Use mono_mprotect to simplify
1930         some porting work.
1931
1932 2009-04-22  Zoltan Varga  <vargaz@gmail.com>
1933
1934         * method-to-ir.c (mono_method_to_ir): Force init_locals to be TRUE
1935         to prevent asserts in various passes. Fixes #497220.
1936
1937 2009-04-21  Zoltan Varga  <vargaz@gmail.com>
1938
1939         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove
1940         a racy assert.
1941
1942         * aot-compiler.c aot-runtime.c: Emit the unwind info into a separate
1943         table to avoid duplicates.
1944
1945         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
1946         
1947         * aot-compiler.c (emit_method_code): Avoid writing symbols if the nodebug
1948         option is used.
1949
1950 2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>
1951
1952         * mini.c (mini_method_verify): Fail fulltrust code if the exception
1953         is for method or field access.
1954
1955 2009-04-20  Zoltan Varga  <vargaz@gmail.com>
1956
1957         * mini-llvm-cpp.cpp (mono_llvm_dump_value): New helper function to print
1958         a Value to stdout.
1959
1960         * mini-llvm.c (mono_llvm_emit_method): Use it.
1961         
1962         * mini-llvm.c (type_to_llvm_type): Fix the mapping of enums.
1963         (mono_llvm_emit_method): Add support for CAS. Fix handling of CSET opcodes
1964         on volatile values.
1965
1966         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add support for 
1967         synchronized methods.
1968
1969         * mini.c (mini_method_compile): Disable LLVM for dynamic methods.
1970
1971         * mini.c (mini_method_compile): Enable ABCREM when running with LLVM.
1972
1973         * mini-llvm.c (mono_llvm_emit_method): Add support for OP_LOADI4_MEM/
1974         OP_LOADI8_MEM.
1975
1976         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Add a MONO_LLVM env variable
1977         allowing some options to be set dynamically.
1978
1979 2009-04-19  Zoltan Varga  <vargaz@gmail.com>
1980
1981         * mini-llvm.c (mono_llvm_emit_method): Handle compares followed by an
1982         unconditional branch.
1983
1984         * mini.h (MonoTrampolineType): Add new trampoline type 
1985         'MONO_TRAMPOLINE_LLVM_VCALL' which handles virtual calls made from LLVM
1986         compiled code.
1987
1988         * mini-trampolines.c (mono_llvm_vcall_trampoline): New C trampoline 
1989         function.
1990
1991         * mini-trampolines.c (mono_create_llvm_vcall_trampoline): New trampoline
1992         creation function.
1993
1994         * mini.c (mini_init): Avoid using the common vtable trampoline when LLVM
1995         is enabled. Instead, use the llvm vcall trampoline.
1996         
1997         * mini-trampolines.c (mono_get_vcall_slot_addr): New helper function.
1998
1999         * mini-trampolines.c tramp-amd64.c tramp-x86.c: Use it.
2000         
2001         * mini-<ARCH>.c: Get rid of the identical mono_arch_get_vcall_slot_addr ()
2002         functions.
2003
2004         * mini-<ARCH>.h mini-trampolines.c mini.c: Get rid of 
2005         MONO_ARCH_COMMON_VTABLE_TRAMPOLINE, it is supported by all archs.
2006
2007         * mini-ia64.c (mono_arch_lowering_pass): Null out the sregs of the
2008         OP_IA64_CSET opcode.
2009
2010         * mini.c: Fix a warning.
2011
2012         * mini-llvm.c (mono_llvm_emit_method): Convert arguments of SWITCH and
2013         THROW to the appropriate llvm type.
2014
2015 2009-04-18  Zoltan Varga  <vargaz@gmail.com>
2016
2017         * mini.c (mini_method_compile): Add statistics for methods JITted
2018         with/without LLVM.
2019
2020 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
2021
2022         * method-to-ir.c: Fix the computation of ins_sreg_counts for ia64
2023         OP_IA64_CMP_<cond>_IMM opcodes.
2024
2025 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
2026
2027         * mini-llvm.c (emit_cond_system_exception): Implement throwing of
2028         corlib exceptions.
2029
2030         * dwarfwriter.c (mono_dwarf_writer_emit_method): Handle --regression
2031         correctly.
2032
2033         * mini-llvm.c (type_to_llvm_type): Avoid accessing t->data.klass for
2034         GENERICINST.
2035
2036 2009-04-17  Atsushi Enomoto  <atsushi@ximian.com>
2037
2038         * mini-exceptions.c : add thread id to EXCEPTION trace message.
2039
2040 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
2041
2042         * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Fix AOT
2043         support.
2044
2045         * tramp-x86.c (mono_arch_get_unbox_trampoline): Implement static
2046         rgctx invoke trampolines for x86.
2047
2048         * mini-x86.c (mono_arch_output_basic_block): Add a few nops before
2049         indirect calls to simplify get_vcall_slot_addr (). Fixes #494567.
2050         (mono_arch_get_vcall_slot): Simplify this.
2051
2052 2009-04-16  Zoltan Varga  <vargaz@gmail.com>
2053
2054         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Move the calls to
2055         mono_debug_add_delegate_trampoline () to get_delegate_invoke_impl ().
2056
2057 2009-04-14  Zoltan Varga  <vargaz@gmail.com>
2058
2059         * aot-compiler.c tramp-arm.c mini-arm.c: Implement static rgctx 
2060         trampolines for ARM. Add full-aot support for delegate invokes for ARM.
2061
2062         * mini-trampolines.c (mono_magic_trampoline): Fix the build.
2063
2064         * liveness.c (visit_bb): Remove a needless assert.
2065
2066 2009-04-13  Zoltan Varga  <vargaz@gmail.com>
2067
2068         * mini-trampolines.c (mono_create_delegate_trampoline): Delegate the
2069         full aot support to the arch specific code.
2070
2071         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Add full-aot support.
2072
2073         * aot-compiler.c (emit_trampolines): Emit delegate invoke impl trampolines.
2074
2075         * aot-compiler.c (emit_named_code): Rename this to 'emit_trampoline'.
2076         
2077         * mini-amd64.c (mono_arch_get_delegate_invoke_impls): New function to
2078         collect information about the delegate invoke impl trampolines.
2079
2080         * mini.h (MonoAotTrampInfo): New structure collecting the information needed
2081         to save trampolines during full-aot mode.
2082
2083         * mini-trampolines.c (mono_create_static_rgctx_trampoline): New trampoline
2084         creation function which returns a trampoline which sets the rgctx
2085         argument.
2086         (mono_magic_trampoline): Use the rgctx trampoline instead of an rgctx
2087         wrapper if possible.
2088         (mono_delegate_trampoline): Ditto.
2089
2090         * mini.c (mono_jit_runtime_invoke): Ditto.
2091
2092         * tramp-amd64.c: Add an implemention of static rgctx trampolines for AMD64.
2093         
2094         * aot-compiler.c aot-runtime.c: Add support for static rgctx trampolines.
2095
2096         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
2097         
2098 2009-04-12  Zoltan Varga  <vargaz@gmail.com>
2099
2100         * mini-ia64.c (mono_arch_lowering_pass): Use NULLIFY_INS instead of
2101         just setting the opcode to OP_NOP.
2102
2103 2009-04-11  Zoltan Varga  <vargaz@gmail.com>
2104
2105         * mini.c (mini_method_compile): Put the last change inside an 
2106         #ifdef MONO_ARCH_HAVE_LIVERANGE_OPS.
2107         
2108         * mini.c (mini_method_compile): Disable sharing of stack slots/registers
2109         and extend live ranges to cover the whole method when using xdb.
2110
2111         * jit-icalls.c (ldvirtfn_internal): Avoid creating rgctx wrappers here,
2112         do it in the trampolines.
2113
2114         * mini-trampolines.c (mono_magic_trampoline): Add an rgctx wrapper if
2115         needed.
2116
2117         * mini-trampolines.c (mono_delegate_trampoline): Ditto.
2118         
2119         * method-to-ir.c (mono_method_to_ir): Avoid using the fast virtual method
2120         call code in full-aot mode since IMT is disabled there.
2121         (mono_method_to_ir): Inline ldfld wrappers which return structures too, the
2122         new JIT no longer has that restriction.
2123
2124         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
2125
2126         * aot-compiler.c (emit_extra_methods): Emit the wrapper method names in
2127         a more compact format.
2128         (mono_aot_wrapper_name): New function to return a unique name for a
2129         wrapper method, also used by the AOT runtime.
2130
2131         * aot-runtime.c (find_extra_method_in_amodule): Update after the changes to
2132         aot-compiler.c.
2133
2134         * aot-compiler.c (add_generic_class): Add the helper methods from T[]
2135         when a ICollection<T> etc is encountered.
2136         (add_generic_instances): Process method arguments/locals too.
2137         (emit_trampolines): Emit unbox trampolines for extra methods too. Shorten
2138         trampoline names.
2139
2140         * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle extra methods too.
2141         
2142 2009-04-10  Zoltan Varga  <vargaz@gmail.com>
2143
2144         * aot-compiler.c: Disable the AOT compiler if the JIT is disabled.
2145
2146         * dwarfwriter.c (emit_type): Emit byref to reference types as 'int' for now.
2147
2148         * decompose.c (mono_decompose_opcode): Make this return a MonoInst*
2149         representing the result of the decomposition. Nullify instructions
2150         instead of setting them to OP_NOP since nops can't have registers
2151         set.
2152
2153 2009-04-09  Zoltan Varga  <vargaz@gmail.com>
2154
2155         * aot-compiler.c (mono_compile_assembly): Split this huge function into
2156         smaller parts. Add 'nodebug' option to prevent generation of DWARF debug
2157         info. Strip 'mapping symbols' on ARM.
2158
2159         * iltests.il.in (test_0_fconv_to_i): Disable this on ARM too.
2160         
2161         * genmdesc.pl: Applied patch by Martin Fuzzey (mfuzzey@parkeon.com). Sync
2162         this with the native genmdesc.
2163
2164 2009-04-08  Bill Holmes  <billholmes54@gmail.com>
2165
2166         * aot-runtime.c:  Fixing the MSVC build.
2167
2168         Code is contributed under MIT/X11 license.
2169
2170 2009-04-08  Zoltan Varga  <vargaz@gmail.com>
2171
2172         * mini-llvm.c (mono_llvm_emit_method): Pass i1/i2 arguments as i4 since 
2173         JITted code depends on it.
2174
2175 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
2176
2177         * aot-compiler.c: Use new MonoGenericParam accessors.
2178
2179 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
2180
2181         Reduce memory usage and improve correctness wrt MonoGenericParam
2182         * aot-runtime.c (decode_klass_ref): Simplify generic parameter
2183         handing.  Avoid allocating MonoGenericParams, but use the ones in
2184         the container itself.
2185
2186 2009-04-07  Miguel de Icaza  <miguel@novell.com>
2187
2188         * tasklets.c: Return exceptions in the out argument.
2189
2190 2009-04-08  Zoltan Varga  <vargaz@gmail.com>
2191
2192         * mini-llvm.c (mono_llvm_emit_method): Fix alignment in the LOCALLOC_IMM
2193         opcode. Use pointer types in more places instead of casting them to 
2194         integers.
2195
2196         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Create a pass manager to run
2197         optimizations.
2198         (mono_llvm_optimize_method): New helper function to optimize a method.
2199
2200         * method-to-ir.c (mono_emit_widen_call_res): Extract the call result 
2201         widening code so it could be called from more places.
2202         (mono_method_to_ir): Call mono_emit_widne_call_res () in several more
2203         code paths in the call opcodes.
2204
2205 Mon Apr 6 14:19:54 CEST 2009 Paolo Molaro <lupus@ximian.com>
2206
2207         * exceptions-amd64.c, mini-amd64.h: amd64 support code for continuations.
2208
2209 2009-04-06  Zoltan Varga  <vargaz@gmail.com>
2210
2211         * dwarfwriter.c: Use _ to separate class name 
2212         components as gdb can't handle '.'. Represent reference variables
2213         as 'class <NAME>&'.
2214         
2215         * mini.h (MonoCompile): Add locals_min_stack_offset/locals_max_stack_offset.
2216
2217         * mini-amd64.c (mono_arch_allocate_vars): Save min/max stack offset.
2218         
2219         * mini-gc.c: New file, contains the SGEN GC related parts of the JIT.
2220
2221         * gc-test.cs: New file with GC stack marking tests.
2222         
2223         * mini-arm.c (mono_arch_output_basic_block): Fix int->float conversion of
2224         negative numbers for vfp.
2225
2226         * basic-float.cs: Add a test.
2227         
2228 Mon Apr 6 14:12:10 CEST 2009 Paolo Molaro <lupus@ximian.com>
2229
2230         * exceptions-x86.c, mini-x86.h: x86 support code for continuations.
2231
2232 Mon Apr 6 14:09:53 CEST 2009 Paolo Molaro <lupus@ximian.com>
2233
2234         * tasklets.h, tasklets.c, mini.h, mini.c, Makefile.am: arch-indep
2235         part of tasklet/continuation support.
2236
2237 2009-04-05  Zoltan Varga  <vargaz@gmail.com>
2238
2239         * mini-llvm.c (mono_llvm_emit_method): Move the handling of
2240         amd64 opcodes inside an ifdef.
2241
2242         * dwarfwriter.c: Emit inheritance information for classes, emit fields
2243         of complex types.
2244         
2245         * dwarfwriter.c (emit_type): Emit the class info for classes.
2246
2247 2009-04-04  Zoltan Varga  <vargaz@gmail.com>
2248
2249         * Makefile.am (AM_CXXFLAGS): Add GLIB_CFLAGS to this.
2250
2251         * mini-llvm-cpp.h: New header file for mini-llvm-cpp.cpp.
2252
2253         * mini-llvm.c: Remove unused fields from EmitContext, fix memory leaks.
2254
2255         * ssa.c (mono_ssa_compute): Fix some memory leaks.
2256
2257 2009-04-03  Zoltan Varga  <vargaz@gmail.com>
2258
2259         * mini.c mini-amd64.c method-to-ir.c: Use COMPILE_LLVM in a few more places.
2260
2261         * mini-llvm.c: Update comments.
2262
2263         * mini.h (COMPILE_LLVM): New macro.
2264
2265         * decompose.c (mono_decompose_opcode): Use the COMPILE_LLVM macro.
2266
2267         * ssa.c (mono_ssa_compute): Ditto.
2268         
2269         * unwind.c (mono_unwind_get_ops_from_fde): New helper function to extract
2270         the unwind ops from a DWARF FDE.
2271
2272         * mini-llvm.c: Implement generation of unwind info for LLVM compiled
2273         methods by extracting the dwarf unwind ops from the unwind info generated
2274         by LLVM.
2275         
2276         * mini-llvm.c (mono_llvm_emit_method): Enable support for non-IMT virtual
2277         calls.
2278
2279         * mini-amd64.c (mono_arch_get_vcall_slot): Handle more kinds of the SIB
2280         addressing modes.
2281
2282 2009-04-02  Zoltan Varga  <vargaz@gmail.com>
2283
2284         * Makefile.am (llvm_sources): Enable this.
2285
2286         * mini.c (mini_method_compile): Add support for compiling with LLVM, 
2287         failing back to the JIT if something cannot be handled.
2288
2289         * mini-amd64.c (mono_arch_emit_call): Emit the arguments more simple when
2290         compiling with LLVM.
2291
2292         * decompose.c (mono_decompose_opcode): Avoid decomposing some opcodes when
2293         compiling with LLVM.
2294
2295         * method-to-ir.c (mono_method_to_ir): Avoid decomposing SWITCH when 
2296         compiling with LLVM.
2297
2298         * mini-ops.h: Add a few opcodes needed by LLVM.
2299
2300         * dwarfwriter.c (mono_dwarf_writer_emit_method): Avoid crashes if the method
2301         has no unwind info.
2302
2303         * mini-llvm.c mini-llvm-cpp.cpp: New files containing the experimental llvm
2304         backend.
2305
2306         * mini-arm.c (mono_arch_output_basic_block): Fix the ARM_FPU_NONE build.
2307
2308         * mini-arm.h mini-arm.c cpu-arm.md: Finish VFP support.
2309
2310 2009-04-01  Mark Probst  <mark.probst@gmail.com>
2311
2312         * regalloc.h, mini-codegen.c: Make vassign members gint32 to fix
2313         ridiculously large methods.
2314
2315 2009-03-31  Martin Baulig  <martin@ximian.com>
2316
2317         * debug-debugger.c (debugger_remove_breakpoint): Call
2318         mono_debugger_remove_class_init_callback ().
2319
2320 2009-03-31  Zoltan Varga  <vargaz@gmail.com>
2321
2322         * aot-compiler.c (mono_compile_assembly): Call img_writer_emit_start ()
2323         right before emitting code, not at the start.
2324
2325         * mini.c (mono_postprocess_patches): Extract this into a separate function
2326         from mono_codegen ().
2327
2328         * ssa.c (mono_ssa_compute): Set ins->klass for every PHI node, handle
2329         byref types correctly.
2330
2331 2009-03-30  Zoltan Varga  <vargaz@gmail.com>
2332
2333         * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix a crash introduced
2334         by the last change.
2335
2336 2009-03-29  Zoltan Varga  <vargaz@gmail.com>
2337
2338         * mini-amd64.c (mono_arch_output_basic_block): Emit a few nops before 
2339         indirect calls, this avoids problems where get_vcall_slot () would get
2340         confused by the native code for the instruction preceeding the call.
2341         (mono_arch_get_vcall_slot): Simplify this.
2342         (mono_arch_emit_imt_argument): Remove this, it is no longer needed.
2343
2344         * mini-ops.h: Fix the definitions of the OP_IA64 opcodes, since the local
2345         register allocator now seems to depend on them instead of the data in
2346         cpu-<ARCH>.md.
2347
2348         * mini.c (mini_method_compile): Throw the correct type of exception if
2349         mono_method_get_header () fails because of a loading error.
2350
2351 2009-03-28  Zoltan Varga  <vargaz@gmail.com>
2352
2353         * mini.c (mini_method_compile): Clear the loader error if the method
2354         header cannot be decoded.
2355
2356         * mini-trampolines.c (mono_magic_trampoline): Handle generic virtual 
2357         interface methods on proxies correctly.
2358
2359         * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix handling of the
2360         this argument for vtype methods. Add precise liveness info for arguments.
2361
2362         * mini-codegen.c (mono_print_ins_index): Print the vreg of the
2363         LIVERANGE_START/END opcodes.
2364
2365         * method-to-ir.c (mono_spill_global_vars): Fix liverange calculation
2366         for arguments and values in registers.
2367
2368 2009-03-27  Zoltan Varga  <vargaz@gmail.com>
2369
2370         * method-to-ir.c (mono_method_to_ir): Disable tail calls for calls which
2371         return a valuetype. Fixes #487518.
2372
2373         * iltests.il: Add a test.
2374         
2375         * aot-compiler.c: Use mono_thread_create () to create helper threads.
2376
2377         * mini-trampolines.c (mono_delegate_trampoline): Handle static delegates
2378         closed over a null reference correctly.
2379
2380 2009-03-26  Zoltan Varga  <vargaz@gmail.com>
2381
2382         * method-to-ir.c (mono_handle_global_vregs): Fix support for ternary ops.
2383
2384 2009-03-25  Mark Probst  <mark.probst@gmail.com>
2385
2386         * mini-codegen.c (mono_local_regalloc): Don't let sregs get
2387         allocated to the same registers as fixed sregs.
2388
2389 2009-03-24  Mark Probst  <mark.probst@gmail.com>
2390
2391         * mini-ops.h: New ternary ATOMIC_CAS ops replace the old
2392         ATOMIC_CAS_IMM ops.
2393
2394         * method-to-ir.c: Handle more cases for
2395         Interlocked.CompareExchange.
2396
2397         * cpu-x86.md, mini-x86.c, mini-x86.h, cpu-amd64.md, mini-amd64.c,
2398         mini-amd64.h, cpu-ppc.md, cpu-ppc64.md, mini-ppc.c, mini-ppc.h:
2399         ATOMIC_CAS implementations for x86, AMD64, PPC and PPC64.
2400
2401 2009-03-23  Zoltan Varga  <vargaz@gmail.com>
2402
2403         * aot-runtime.c (decode_method_ref): Fix a warning.
2404
2405         * unwind.c (mono_unwind_frame): Ditto.  
2406
2407 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
2408
2409         * aot-compiler.c (arch_emit_unbox_trampoline): Fix the binary writer support.
2410         (mono_compile_assembly): Enable the binary writer for full-aot as well.
2411
2412         * image-writer.c (do_reloc): Add support for the JUMP24 relocation,
2413         fix the handling of large values in the ALU_PC_G0_NC relocation.
2414
2415 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
2416
2417         * local-propagation.c method-to-ir.c local-propagation.c: Fix warnings.
2418
2419 2009-03-22  Mark Probst  <mark.probst@gmail.com>
2420
2421         * method-to-ir.c (mono_spill_global_vars): Support for ternary
2422         ops.
2423
2424 2009-03-22  Mark Probst  <mark.probst@gmail.com>
2425
2426         * method-to-ir.c: MINI_OP3 needs a comma.
2427
2428         * method-to-ir.c, mini.h, mini.c: Remove
2429         mono_init_op_sreg_counts ().
2430
2431 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
2432
2433         * mini-arm.c (mono_arch_output_basic_block): Fix aot support in
2434         OP_JMP.
2435         
2436         * mini-arm.c (mono_arch_build_imt_thunk): Disable the !fail_tramp
2437         assertion.
2438
2439         * mini-ops.h: Fix arguments of the MEMINDEX opcodes.
2440
2441         * mini-amd64.c (mono_arch_build_imt_thunk): Simplify the fail handling
2442         code somewhat.
2443
2444 2009-03-21  Mark Probst  <mark.probst@gmail.com>
2445
2446         * cfold.c, cprop.c, decompose.c, genmdesc.c, helpers.c, ir-emit.h,
2447         liveness.c, local-propagation.c, method-to-ir.c, mini-codegen.c,
2448         mini.c, mini.h, simd-intrinsics.c, ssa.c: Support for ternary IR
2449         operations.
2450
2451 2009-03-20  Zoltan Varga  <vargaz@gmail.com>
2452
2453         * driver.c: Change location of gc_wrapper.h.
2454
2455         * method-to-ir.c (mono_find_block_region): Handle try clauses nested
2456         inside finally clauses correctly. Fixes #485721.
2457
2458         * mini.c (mono_find_spvar_for_region): This needs to handle try regions
2459         after the change above.
2460
2461         * exceptions.cs: Add a test.
2462         
2463 2009-03-19  Zoltan Varga  <vargaz@gmail.com>
2464
2465         * unwind.c (mono_unwind_ops_encode): Increase the size of the encode buffer.
2466
2467         * mini-amd64.c (mono_arch_emit_epilog): Remove the encoding of stack size
2468         into cfg->used_int_regs, it is not needed with the dwarf unwinder.
2469         (mono_arch_compute_omit_fp): Remove the emit_epilog () workaround.
2470
2471         * mini-amd64.c (mono_arch_compute_omit_fp): Add another check to avoid hitting
2472         the stack_alloc_size < (1 << 16) assertion in emit_prolog ().
2473
2474 2009-03-19  Sebastien Pouliot  <sebastien@ximian.com>
2475
2476         * method-to-ir.c: Allow CoreCLR to throw FieldAccessException. 
2477         Simplify logic for ensure_method_is_allowed_to_call_method. 
2478         Handle wrappers on callers.
2479
2480 2009-03-19  Zoltan Varga  <vargaz@gmail.com>
2481
2482         * Makefile.am (fullaotcheck): Don't run the generics tests, some of
2483         them don't run yet.
2484
2485         * basic-simd.cs: Fix the names of some test methods.
2486
2487 2009-03-18  Geoff Norton  <gnorton@novell.com>
2488
2489         * mini.c: Only chain sigfpe if it wasn't generated in mangaed code.
2490
2491 2009-03-18  Zoltan Varga  <vargaz@gmail.com>
2492
2493         * dwarfwriter.c (token_handler): Fix a crash caused by the last change.
2494
2495 2009-03-17  Jb Evain  <jbevain@novell.com>
2496
2497         * driver.c: remove now uneeded call to mono_gc_base_init before
2498         mono_profiler_load.
2499
2500 2009-03-17  Jb Evain  <jbevain@novell.com>
2501
2502         * dwarfwriter.c (token_handler): handle more cases.
2503
2504 2009-03-17  Sebastien Pouliot  <sebastien@ximian.com> 
2505
2506         * method-to-ir.c: Remove more dead code (that was required only
2507         because of method_is_safe). Fix compiler warnings.
2508
2509 2009-03-17  Sebastien Pouliot  <sebastien@ximian.com>
2510
2511         * method-to-ir.c: Remove unneeded/useless method_is_safe
2512         http://lists.ximian.com/archives/public/mono-devel-list/2009-March/031404.html
2513
2514 2009-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
2515
2516         * mini.c (mini_method_compile): Print the method been compiled with
2517         verbose level 1 instead of 3 as this helps a lot debugging JIT crashes
2518         for people not familiar with the runtime.
2519
2520 2009-03-17  Zoltan Varga  <vargaz@gmail.com>
2521
2522         * mini-exceptions.c (get_generic_info_from_stack_frame): Avoid returning
2523         a managed object which is later put into a GList. Return its class instead.
2524
2525         * mini.c (mono_allocate_stack_slots_full): Avoid sharing ref and non-ref
2526         stack slots when using sgen.
2527
2528 2009-03-16  Zoltan Varga  <vargaz@gmail.com>
2529
2530         * dwarfwriter.c (emit_line_number_info): Really fix the eglib build.
2531
2532 2009-03-14  Zoltan Varga  <vargaz@gmail.com>
2533
2534         * local-propagation.c (reg_is_softreg_no_fpstack): Use >= instead of
2535         > so it works on the first vreg as well.
2536
2537 2009-03-13  Zoltan Varga  <vargaz@gmail.com>
2538
2539         * dwarfwriter.c (emit_line_number_info): Disable an assert which seems to
2540         trigger randomly.
2541
2542         * aot-compiler.c: Get rid of xdebug_lock (), use the loader lock instead.
2543         
2544         * dwarfwriter.c (emit_line_number_info): Fix eglib build as eglib doesn't
2545         implement GArray.
2546
2547 2009-03-12  Zoltan Varga  <vargaz@gmail.com>
2548
2549         * dwarfwriter.c (emit_line_number_info): Optimize the computation of the
2550         native->IL offset mapping.
2551
2552 2009-03-11  Zoltan Varga  <vargaz@gmail.com>
2553
2554         * mini-amd64.c (mono_arch_output_basic_block): Fix % 1. Fixes #484323.
2555
2556         * basic.cs: Add a test.
2557
2558 2009-03-11  Mark Probst  <mark.probst@gmail.com>
2559
2560         * mini-x86.c (mono_arch_output_basic_block): Use different
2561         registers in case the ones we want to overwrite are used by the
2562         other operand.  Fixes regression in #480807.
2563
2564 2009-03-10  Zoltan Varga  <vargaz@gmail.com>
2565
2566         * aot-compiler.c (mono_compile_assembly): Make the output less verbose.
2567
2568         * dwarfwriter.c (emit_line_number_info): The line number info for
2569         IL code was off by one. Fix that.
2570
2571         * mini-s390x.c: Fix support for vtypes whose addresses are passed on the
2572         stack.
2573
2574 2009-03-09  Mark Probst  <mark.probst@gmail.com>
2575
2576         Contributed under the terms of the MIT/X11 license by Steven
2577         Munroe <munroesj@us.ibm.com>.
2578
2579         * mini-ppc.c: Correct handling of OP_LOADI4_MEMINDEX for ppc64.
2580         Fixes #483462.
2581
2582 2009-03-08  Zoltan Varga  <vargaz@gmail.com>
2583
2584         * dwarfwriter.c (token_handler): Decode method references in non-wrappers
2585         as well.
2586
2587 2009-03-06  Zoltan Varga  <vargaz@gmail.com>
2588
2589         * method-to-ir.c (mono_method_to_ir): Check for type load exceptions in
2590         the delegate ctor handling code. Fixes #482638.
2591         
2592         * method-to-ir.c (mini_emit_memset): Fix the handling of size '3'. Fixes
2593         #481458.
2594
2595         * iltests.il.in: Add a test.
2596         
2597         * mini-darwin.c (mono_chain_signal): Remove this, it is already in
2598         mini-posix.c.
2599
2600 2009-03-05  Mark Probst  <mark.probst@gmail.com>
2601
2602         * mini-trampolines.c (mono_create_jump_trampoline): If the method
2603         is shared generic code, return the trampoline, even if the method
2604         has already been compiled.  Fixes #479763.
2605
2606         * mini.c, mini.h: New function
2607         mono_jit_find_compiled_method_with_jit_info() which is the same as
2608         mono_jit_find_compiled_method() but also returns the jit info.
2609
2610 2009-03-05  Mark Probst  <mark.probst@gmail.com>
2611
2612         * method-to-ir.c (mono_method_to_ir): Only force the vtable var
2613         for methods which actually have one.  For all other methods, make
2614         sure the this argument var is live the whole method.
2615
2616         * mini.c (mini_method_compile): Every shared method has a
2617         this/vtable/mrgctx info.  Fixes #480807.
2618
2619 2009-03-05  Mark Probst  <mark.probst@gmail.com>
2620
2621         * mini-ppc.c (mono_arch_build_imt_thunk): Add support for mixed
2622         generic/imt thunks where some entries branch through the vtable,
2623         while other entries branch directly.
2624
2625 2009-03-05  Zoltan Varga  <vargaz@gmail.com>
2626
2627         * mini-darwin.c (mono_chain_signal): Define this to fix the build.
2628
2629         * mini-windows.c: Ditto.
2630         
2631         * mini.c (mono_jit_runtime_invoke): Speed up the invoking of parameterless
2632         ctors.
2633
2634 2009-03-04  Zoltan Varga  <vargaz@gmail.com>
2635
2636         * dwarfwriter.c (emit_line_number_info): Add some debug code to help track
2637         down an assert.
2638
2639 2009-03-04  Mark Probst  <mark.probst@gmail.com>
2640
2641         * method-to-ir.c: Don't inline methods that use JMP.  Fixes
2642         #481403.
2643
2644 2009-03-04  Mark Probst  <mark.probst@gmail.com>
2645
2646         * exceptions-x86.c: Include debug-mini.h - fixes build.
2647
2648 2009-03-04  Martin Baulig  <martin@ximian.com>
2649
2650         * debug-mini.c: Clean up the exception API and add documentation.
2651         (mono_debugger_handle_exception): New public method; this is
2652         called when throwing an exception or encountering an unhandled one.
2653         (mono_debugger_call_exception_handler): Formerly known as
2654         mono_debugger_handle_exception(); this is used to tell the
2655         debugger that we're about to invoke an exception handler.
2656
2657 2009-03-04  Martin Baulig  <martin@ximian.com>
2658
2659         * debug-mini.c (mono_debugger_runtime_invoke): Moved here from
2660         ../metadata/mono-debug-debugger.c; save and reset exception state.
2661
2662 2009-03-02  Martin Baulig  <martin@ximian.com>
2663
2664         * debug-mini.c: Moved the debugger exception handling here from
2665         ../metadata/mono-debug-debugger.c.
2666
2667         * debug-mini.h
2668         (MonoDebuggerExceptionAction): New exception typedef.
2669
2670         * debug-mini.c
2671         (MonoDebuggerThreadInfo): Added `MonoObject *last_exception'.
2672
2673         * exceptions-amd64.c
2674         (mono_amd64_throw_exception): Use the new debugger exception
2675         handling code.
2676
2677         * mini-exceptions.c
2678         (mono_handle_exception_internal): Don't call
2679         mono_debugger_unhandled_exception() here.
2680
2681 2009-03-03  Zoltan Varga  <vargaz@gmail.com>
2682
2683         * mini.c aot-compiler.c: Update after the changes to 
2684         mono_marshal_get_runtime_invoke ().
2685
2686         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): 
2687         Virtual generic methods might not have method->slot set, work around
2688         that.
2689
2690         * generics.cs: Add a test.
2691
2692 2009-03-02  Geoff Norton  <gnorton@novell.com>
2693
2694         * mini.c:
2695         * driver.c: Allow signal chaining of SIGFPE as well.
2696
2697 2009-03-02  Zoltan Varga  <vargaz@gmail.com>
2698
2699         * mini-trampolines.c (mono_generic_virtual_remoting_trampoline): Update
2700         this since it now receives the method not its generic context in the
2701         IMT reg.
2702
2703         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for mixed
2704         generic/imt thunks where some entries branch through the vtable, while
2705         other entries branch directly.
2706
2707         * mini-x86.c (mono_arch_build_imt_thunk): Ditto.
2708
2709         * method-to-ir.c (mono_method_to_ir): Enable fast virtual generic call 
2710         support for interface methods as well.
2711
2712         * mini-trampolines.c: Add support for virtual generic methods in interfaces
2713         using the normal IMT thunks.
2714
2715         generics.cs: Add new tests.
2716         
2717         * method-to-ir.c (mono_method_to_ir): Pass the method instead of
2718         the generic inst to the generic imt thunks. This fixes AOT support, 
2719         improves consistency with the normal IMT thunks, and makes it easier to
2720         add support for interface generic virtual methods later.
2721
2722         * mini-trampolines.c (mono_magic_trampoline): Ditto.    
2723         
2724 2009-02-28  Zoltan Varga  <vargaz@gmail.com>
2725
2726         * driver.c (mono_set_signal_chaining): New public API function to enable
2727         signal chaining on POSIX platforms.
2728
2729         * mini-posix.c mini.c: Applied a variant of a patch by Simon Rowland 
2730         (si@lindenlab.com) to implement signal chaining. The original patch was
2731         contributed under the MIT X/11 license:
2732         https://bugzilla.novell.com/show_bug.cgi?id=318894
2733
2734 2009-02-27  Zoltan Varga  <vargaz@gmail.com>
2735
2736         * iltests.il.in (test_0_implicit_float_to_double_conversion): Disable this
2737         too until it can be made to run on amd64.
2738
2739 2009-02-26  Zoltan Varga  <vargaz@gmail.com>
2740
2741         * mini-x86.c (mono_arch_get_this_arg_from_call): Avoid expensive calls
2742         to  get_generic_context_from_code () + get_call_info () if possible.
2743
2744 2009-02-25  Zoltan Varga  <vargaz@gmail.com>
2745
2746         * mini-exceptions.c (mono_handle_native_sigsegv): Implement the
2747         suspend-on-sigsegv functionality.
2748
2749         * mini.c (mini_parse_debug_options): Add a new 'suspend-on-sigsegv' option
2750         to suspend when a native SIGSEGV is received. This is useful for debugging
2751         crashes which don't happen under gdb, since a live process contains more
2752         information than a core file.
2753
2754         * mini-exceptions.c (mono_print_thread_dump): Use 
2755         MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX instead of platform defines.
2756
2757         * mini-x86.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): New define.
2758
2759         * mini-amd64.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): Ditto.
2760         
2761         * basic-float.cs: Disable the tests which currently fail on amd64.
2762
2763         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass a non-null 
2764         value to mono_arch_patch_callsite () to fix crashes.
2765         
2766         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix a warning.
2767
2768 2009-02-23  Zoltan Varga  <vargaz@gmail.com>
2769
2770         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Replace the
2771         nop code by patching the call address to point to the nullified class init
2772         trampoline, as the former does not seem to be safe on SMP machines.
2773
2774 2009-02-23  Mark Probst  <mark.probst@gmail.com>
2775
2776         * mini-ops.h: Fix the argument types for a few x86 opcodes where
2777         they were wrong.
2778
2779 2009-02-23  Zoltan Varga  <vargaz@gmail.com>
2780
2781         * basic-float.cs basic-calls.cs: Fix warnings.
2782
2783 2009-02-22  Mark Probst  <mark.probst@gmail.com>
2784
2785         * tramp-ppc.c (mono_arch_create_trampoline_code): Store the
2786         correct frame pointer in the LMF.  Should fix #478394.
2787
2788 2009-02-22  Zoltan Varga  <vargaz@gmail.com>
2789
2790         * Makefile.am (fullaotcheck): Copy Mono.Simd.dll as well.
2791
2792         * image-writer.c: Make the binary writer less verbose.
2793
2794 2009-02-21  Zoltan Varga  <vargaz@gmail.com>
2795
2796         * method-to-ir.c (mono_method_to_ir): Don't assert if string ctors
2797         are called from runtime invoke wrappers.
2798
2799 2009-02-20  Zoltan Varga  <vargaz@gmail.com>
2800
2801         * cpu-ppc.md (store_memindex): Increase the size of this.
2802
2803 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
2804
2805         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
2806
2807         * cpu-x86.md: Fix the sizes for long_conv_to_r_un and long_conv_to_r_un_2.
2808
2809         * mini-x86.c (mono_arch_output_basic_block): Use only 64bits of precision for
2810         OP_LCONV_TO_R_UN.
2811
2812         Last fix for of #467201.
2813
2814
2815 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
2816
2817         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
2818
2819         * cpu-x86.md: Fix the sizes for fcall(_reg,_membase), long_conv_to_r4_2
2820         and long_conv_to_r8_2:
2821
2822         Fixed part of #467201.
2823
2824 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
2825
2826         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
2827
2828         * mini-x86.c (mono_arch_output_basic_block): Adjust precision of int to float
2829         conversion to 32 bits.
2830
2831         * cpu-x86.md: Increase the size of int_conv_to_r4.
2832
2833         * basic-float.cs: Add a test for this.
2834
2835         Fixed part of #467201.
2836
2837 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
2838
2839         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
2840
2841         * mini-x86.c (mono_arch_output_basic_block): Adjust precision of long to double
2842         conversion to 64 bits.
2843
2844         * basic-float.cs: Add a test for this.
2845
2846         Fixed part of #467201.
2847
2848 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
2849
2850         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
2851
2852         * mini-x86.c (emit_move_return_value): Don't reduce precision of functions returning float.
2853         This behavior is compatible with MS.
2854
2855         * iltest.il.in: Add a test for this.
2856
2857         Fixed part of #467201.
2858
2859 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
2860
2861         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
2862
2863         * mini-x86.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_R4, it must
2864         change the precision of the value.
2865
2866         * cpu-x86.md: Define len for float_conv_to_r4.
2867
2868         * basic-float.cs: Add a test for this.
2869
2870         Fixed part of #467201.
2871
2872 2009-02-19 Rodrigo Kumpera  <rkumpera@novell.com>
2873
2874         * mini.c: Adjust locking order to the new semantics where the loader lock
2875         comes first.
2876
2877 2009-02-18  Rodrigo Kumpera  <rkumpera@novell.com>
2878
2879         * aot-runtime.c:
2880         * mini-amd64.c:
2881         * mini-arm.c:
2882         * mini-ia64.c:
2883         * mini-mips.c:
2884         * mini-ppc.c:
2885         * mini-sparc.c:
2886         * mini-trampolines.c:
2887         * mini-x86.c:
2888         * mini.c:
2889         * tramp-alpha.c:
2890         * tramp-amd64.c:
2891         * tramp-arm.c:
2892         * tramp-hppa.c:
2893         * tramp-ia64.c:
2894         * tramp-mips.c:
2895         * tramp-ppc.c:
2896         * tramp-s390.c:
2897         * tramp-s390x.c:
2898         * tramp-sparc.c:
2899         * tramp-x86.c: Use mono_domain_code_* functions instead of using MonoDomain::code_mp directly.
2900
2901 2009-02-18  Zoltan Varga  <vargaz@gmail.com>
2902
2903         * mini-codegen.c (mono_local_regalloc): Remove a ! from if (!dest_sreg1)
2904         as it is incorrect.
2905
2906 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
2907
2908         * aot-compiler.c (add_generic_class): Only add rgctx invoke wrappers
2909         for cctors if needed.
2910
2911 2009-02-17  Mark Probst  <mark.probst@gmail.com>
2912
2913         * mini-ppc.c: Fix build on Darwin.
2914
2915 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
2916
2917         * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Use 2 as the DWARF
2918         version instead of 3 as valgrind doesn't like version 3.
2919
2920         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
2921
2922         * aot-compiler.c (mono_aot_method_hash): New function to return a hash
2923         usable for hashing methods.
2924         (emit_extra_methods): Use the new hash to avoid putting every method in the
2925         same hash bucket.
2926
2927         * aot-runtime.c (find_extra_method_in_amodule): Use the new hash.
2928
2929         * aot-runtime.c (can_method_ref_match_method): New function to quickly check
2930         whenever a method ref could match a method.
2931         
2932         * aot-runtime.c (load_image): Revert the previous change, it causes an AOT
2933         test to fail.
2934         
2935         * aot-runtime.c (find_extra_method_in_amodule): Add a cache for decoded 
2936         methods refs.
2937
2938         * aot-runtime.c (load_image): Pass our basedir to mono_assembly_load.
2939
2940         * aot-compiler.c (emit_exception_debug_info): Bump the maximum size of
2941         the encoding buffer.
2942
2943         * method-to-ir.c (mono_method_check_inlining): Avoid calling 
2944         mono_method_get_header () on inflated methods as an optimization.
2945
2946 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
2947
2948         * ssa.c (fold_ins): Fix another crash if the instruction following the
2949         switch was optimized away.
2950
2951 2009-02-16  Mark Probst  <mark.probst@gmail.com>
2952
2953         Contributed under the terms of the MIT/X11 license by Steven
2954         Munroe <munroesj@us.ibm.com>.
2955
2956         * mini-ppc.c, mini-ppc.h: Implement TLS for PPC64.
2957
2958 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
2959
2960         * mini.c method-to-ir.c mini-trampolines.c aot-runtime.c: Remove locking
2961         around the mono_domain_alloc calls, it is now done by the functions
2962         themselves.
2963
2964         * aot-compiler.c (compile_method): Only add wrappers referenced by
2965         the method if compiling with full AOT.
2966         (mono_compile_assembly): Error out if --aot=full is specified on
2967         a platform where it is not supported.
2968
2969         * aot-compiler.c (emit_trampolines): Emit generic class init trampolines
2970         on ARM too.
2971
2972         * tramp-arm.c (mono_arch_create_generic_class_init_trampoline_full): Add
2973         AOT support.
2974
2975         * aot-runtime.c (load_named_code): Handle 
2976         mono_arm_throw_exception_by_token.
2977
2978         * mini-arm.h: Add declaration of mono_arm_throw_exception_by_token.
2979
2980         * image-writer.c (asm_writer_emit_pointer_unaligned): Make this really
2981         unaligned.
2982
2983         * Makefile.am (fullaotcheck): Exit if a test fails.
2984
2985         * aot-compiler.c (mono_compile_assembly): Use the ASM writer for full aot
2986         on ARM.
2987         (mono_compile_assembly): Handle the assembler failing.
2988
2989         * image-writer.c (asm_writer_emit_section_change): Handle ARM gas not
2990         accepting subsections of .bss.
2991
2992         * ssa.c (visit_inst): Fix a crash if the instruction following a switch
2993         was optimized away.
2994
2995         * aot-compiler.c: Remove some unused includes.
2996         
2997         * aot-compiler.c (MonoAotCompile): Remove some unused fields which are
2998         now in MonoImageWriter.
2999
3000         * mini-x86.c (mono_arch_get_vcall_slot): Handle yet another
3001         code sequence which matches a non-virtual call. Fixes #472654.
3002
3003 2009-02-15  Zoltan Varga  <vargaz@gmail.com>
3004
3005         * aot-compiler.c: Use xdebug_lock ()/unlock () macros for locking in the
3006         xdebug code.
3007         
3008         * aot-compiler.c: Make the xdebug code not depend on the AOT compiler,
3009         use the image/dwarf writers directly.
3010
3011         * image-writer.c (struct _MonoImageWriter): Remove the unused 'image'
3012         field.
3013
3014         * aot-compiler.c (MonoAotCompile): Remove fields which are now in
3015         MonoDwarfWriter.
3016
3017         * image-writer.h: Fix some typos.
3018
3019         * dwarfwriter.h dwarfwriter.c: New files.
3020         
3021         * aot-compiler.c: Extract the DWARF info writing functionality into a 
3022         separate module.
3023
3024         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add a 'out_unwind_ops'
3025         argument to return unwind info.
3026
3027         * tramp-arm.c (mono_arch_create_trampoline_code_full): Ditto.
3028
3029         * aot-compiler.c: Emit unwind info for trampolines in full-aot mode.
3030         
3031         * aot-runtime.c (decode_method_ref): Add a case for 
3032         MONO_AOT_METHODREF_WRAPPER_NAME.
3033
3034         * mini.h: Add constants for the magic numbers used in encode_method_ref ()
3035         for AOT.
3036
3037         * aot-compiler.c (encode_method_ref): Use the new constants.
3038
3039         * aot-runtime.c (decode_method_ref): Ditto.
3040
3041         * aot-compiler.c (compile_method): For generic icalls, queue the wrapper to
3042         be compiled, not the icall itself.
3043
3044 2009-02-14  Zoltan Varga  <vargaz@gmail.com>
3045
3046         * aot-runtime.c (find_extra_method_in_amodule): Avoid decoding wrapper names
3047         using decode_method_ref ().
3048
3049         * method-to-ir.c (mini_emit_ldelema_1_ins): If the array index is a long,
3050         convert it to an in32. Fixes #475859.
3051
3052         * arrays.cs: Add a test.
3053
3054 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
3055
3056         * mini-s390x.c (mono_arch_output_basic_block): Fix the shift amounts in 
3057         OP_LCONV_TO_U2.
3058
3059         * basic-long.cs: Add a test.
3060
3061 2009-02-12  Mark Probst  <mark.probst@gmail.com>
3062
3063         * mini-x86.c, mini-x86.h: Very simple frame pointer removal.  We
3064         remove the frame pointer in leaf methods which don't receive any
3065         arguments, don't throw exceptions and don't do dynamic stack
3066         allocations.
3067
3068 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
3069
3070         * mini-amd64.c (mono_arch_build_imt_thunk): Fix size calculation after
3071         the fail_tramp changes. Hopefully fixes #475132.
3072
3073 2009-02-12  Rodrigo Kumpera  <rkumpera@novell.com>
3074
3075         * method-to-ir.c (mono_emit_method_call_full): Use mono_metadata_signature_dup_mempool
3076         instead of mono_metadata_signature_dup_full.
3077
3078 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
3079
3080         * ssa.c (fold_ins): Use MONO_IS_JUMP_TABLE () and MONO_JUMP_TABLE_FROM_INS ()
3081         for processing jump tables. Fixes #473787.
3082
3083 2009-02-11  Mark Probst  <mark.probst@gmail.com>
3084
3085         * mini-generic-sharing.c: mini_method_get_context() just calls
3086         mono_method_get_context_general() now.
3087
3088         * mini.c, mini.h: Moved get_object_generic_inst(),
3089         construct_object_context_for_method() and
3090         mono_domain_lookup_shared_generic() to metadata/generic-sharing.c.
3091
3092 2009-02-11  Zoltan Varga  <vargaz@gmail.com>
3093
3094         * branch-opts.c (mono_if_conversion): Handle the case where the merged 
3095         basic block fell through to its successor bblock without a branch. Fixes
3096         #474718.
3097
3098         * iltests.il.in: Add a test.
3099         
3100         * aot-compiler.c (encode_method_ref): Encode methods of array types.
3101         (can_encode_patch): We can now handle arrays of generic parameters and
3102         array methods.
3103
3104         * aot-runtime.c (decode_method_ref_2): Handle methods of array types.
3105
3106         * aot-compiler.c aot-runtime.c: Emit the size of specific trampolines into
3107         the AOT file to avoid some #ifdefs in aot-runtime.c
3108
3109         * mini.h: Bump AOT file format version.
3110
3111 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
3112
3113         * Makefile.am (fullaotcheck): Make this run the tests.
3114
3115         * aot-compiler.c: Make the printing of skipped methods runtime configurable.
3116
3117 2009-02-10  Mark Probst  <mark.probst@gmail.com>
3118
3119         * mini-x86.c (mono_arch_context_get_int_reg): Handle all registers
3120         individually.  Fixes #473482.
3121
3122 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
3123
3124         * mini-arm.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
3125
3126 2009-02-09  Jeffrey Stedfast  <fejj@novell.com>
3127
3128         * aot-compiler.c (arch_emit_plt_entry): Fixed to compile.
3129         (mono_compile_assembly): Hush compile warnings about
3130         uninitialized [tmp_]outfile_name variables in the !use_bin_writer
3131         code path.
3132
3133 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
3134
3135         * exceptions-arm.c (mono_arch_find_jit_info): Fix aot support.
3136
3137         * mini-arm.c: Checkin unwind related changes missing from an earlier commit.
3138
3139         * aot-compiler.c: Fix arm support.
3140
3141         * image-writer.c: Move the R_ARM constants to image-writer.h. Export a
3142         img_writer_emit_unset_mode () function.
3143
3144         * unwind.c (mono_unwind_get_dwarf_data_align): New helper function.
3145         (mono_unwind_get_dwarf_pc_reg): Ditto.
3146
3147         * aot-compiler.c (emit_dwarf_abbrev): Another large reorganization.
3148         Move almost all platform specific code to a set of arch_ functions, 
3149         and document them to ease porting.
3150         
3151         * aot-compiler.c (mono_xdebug_init): Fix xdebug support.
3152
3153         * image-writer.h image-writer.c: New files, extracted from aot-compiler.c.
3154
3155         * aot-compiler.c: Extract the image writing functionality into a separate
3156         module to reduce the size of this file.
3157
3158 2009-02-09  Geoff Norton  <gnorton@novell.com>
3159
3160         * mini-s390.c: Fix the signature of emit_sig_cookie.
3161
3162 2009-02-09  Zoltan Varga  <vargaz@gmail.com>
3163
3164         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_IMAGE.
3165
3166         * aot-runtime.c (is_shared_got_patch): Ditto.
3167
3168         * aot-runtime.c (load_named_code): Cope with the fact that 
3169         decode_got_entry () won't decode the patch fully if its corresponding got
3170         entry is already filled.
3171         
3172         * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): 
3173         Initialize *ji.
3174         (mono_arch_create_monitor_exit_trampoline_full): Ditto.
3175
3176         * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): Use 'code'
3177         as the moving pointer instead of 'buf' for consistency with the rest of the
3178         codebase.
3179         (mono_arch_create_monitor_exit_trampoline): Ditto.
3180
3181         * aot-compiler.c (emit_trampolines): Add throw_pending_exception/
3182         generic_class_init trampolines.
3183         (add_generic_class): Extract some code from add_generic_instances () into a
3184         separate function so it can be called from other places too.
3185         (compile_method): Call add_generic_class () for the classes of inflated methods
3186         referenced by the method.
3187         (can_encode_patch): Allow references to generic parameters.
3188
3189         * aot-runtime.c: Add support the patches required by the new trampolines.
3190         
3191         * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Add full-aot
3192         support.
3193
3194         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline_full): Add
3195         full-aot support.
3196
3197         * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Rename
3198         this from get_throw_pending_exception, make the signature full aot compatible.
3199
3200         * Makefile.am (fullaotcheck): New target to run full-aot tests.
3201
3202         * method-to-ir.c (inline_method): Save/Restore cfg->ret_var_set too.
3203
3204         * exceptions.cs: Add a test.
3205
3206 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
3207
3208         * unwind.c (mono_unwind_frame): Eliminate the data_align_factor argument,
3209         use the DWARF_DATA_ALIGN constant instead.
3210
3211         * exception-<ARCH>.c: Update after the above change.
3212
3213         * exceptions-arm.c (mono_arch_find_jit_info): Transition this to use the
3214         dwarf unwinder.
3215
3216         * mini-arm.c: Enable the dwarf unwinder.
3217
3218         * mini-trampolines.c (mono_magic_trampoline): Use mono_class_get_vtable_entry ()
3219         instead of mono_class_setup_vtable ().
3220
3221 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
3222
3223         * exceptions-x86.c (mono_arch_find_jit_info): Transition this to use the
3224         dwarf unwinder.
3225
3226         * mini-x86.h: Enable the dwarf unwinder.
3227
3228 2009-02-06  Raja R Harinath  <harinath@hurrynot.org>
3229
3230         Fix mcs/tests/test-7.cs
3231         * mini-amd64.c (mono_arch_allocate_vars): Revert change from
3232         2009-02-03.
3233
3234 2009-02-06  Zoltan Varga  <vargaz@gmail.com>
3235
3236         * mini.c (print_jit_stats): Remove some unused statistics.
3237
3238 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
3239
3240         * aot-compiler.c (emit_klass_info): Update after MonoClass changes.
3241
3242 2009-02-05  Mark Probst  <mark.probst@gmail.com>
3243
3244         * jit-icalls.c (mono_helper_compile_generic_method): Don't inflate
3245         the method we get from mono_object_get_virtual_method() because
3246         that function does it properly, now.
3247
3248 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
3249
3250         * unwind.c (mono_unwind_ops_encode): Handle offsets greater than 32 between
3251         opcodes. Fixes #472775.
3252
3253 2009-02-05  Mark Probst  <mark.probst@gmail.com>
3254
3255         * mini-exceptions.c (ves_icall_get_frame_info): Account for the
3256         fact that mono_find_jit_info() sometimes returns the context
3257         corresponding to the jit info in new_ctx.  Fixes #472600.
3258
3259 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
3260
3261         * method-to-ir.c mini-hppa.c mini.c trace.c mini-s390x.c aot-compiler.c
3262         mini-s390.c: Use mono_class_enum_basetype () instead of accessing
3263         klass->enum_basetype directly.
3264
3265         * aot-compiler.c (emit_class_dwarf_info): Add support for all possible
3266         enum subtypes.
3267
3268         * unwind.c: Avoid 0 sized arrays.
3269
3270 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
3271
3272         * mini-exceptions.c (mono_setup_altstack): Use a more reasonable altstack
3273         size on systems with 64k pages. Fixes #471389.
3274
3275 2009-02-04  Mark Probst  <mark.probst@gmail.com>
3276
3277         Contributed under the terms of the MIT/X11 license by Steven
3278         Munroe <munroesj@us.ibm.com>.
3279
3280         * mini-ppc.c (mono_arch_output_basic_block): Generate better code
3281         for LOADI4_MEMBASE.  Use addi instead of addic if it's not
3282         necessary.
3283
3284 2009-02-04  Mark Probst  <mark.probst@gmail.com>
3285
3286         Contributed under the terms of the MIT/X11 license by Steven
3287         Munroe <munroesj@us.ibm.com>.
3288
3289         * exceptions-ppc.c (mono_arch_get_restore_context): Code size
3290         comparison fix.
3291
3292         * tramp-ppc.c (mono_arch_create_generic_class_init_trampoline):
3293         The trampoline can be longer on PPC64.
3294
3295 2009-02-04  Mark Probst  <mark.probst@gmail.com>
3296
3297         Contributed under the terms of the MIT/X11 license by Steven
3298         Munroe <munroesj@us.ibm.com>.
3299
3300         * mini-ppc.c: Compiler warning fixes and trivial code
3301         simplifications.
3302
3303 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
3304
3305         * method-to-ir.c (mono_spill_global_vars): Fix problems caused by reading
3306         ins->dreg which could be a hardware register, not a vreg.
3307
3308         * aot-compiler.c (emit_method_dwarf_info): Ditto.
3309         
3310         * mini.h (MonoCompile): Remove vreg_to_var_num array, it is no longer used.
3311         (struct MonoMethodVar): Add a vreg field, holding the vreg of variable.
3312
3313         * mini.c (mono_compile_create_var_for_vreg): Set var->vreg.
3314         
3315         * mini-amd64.c (mono_arch_output_basic_block): Avoid reading cfg->varinfo[..]
3316         ->dreg, that is not the vreg we are looking for.
3317
3318         * mini-amd64.h mini-x86.h: Enable MONO_ARCH_LIVENESS_OPS again.
3319
3320         * mini-x86.c (mono_arch_output_basic_block): Add support for LIVERANGE_START/
3321         LIVERANGE_END.
3322
3323         * method-to-ir.c (mono_spill_global_vars): Add an assert to help track down
3324         strange crashes.
3325
3326 2009-02-03  Zoltan Varga  <vargaz@gmail.com>
3327
3328         * mini-x86.c (mono_arch_emit_prolog): Emit unwind info.
3329
3330         * aot-compiler.c (emit_line_number_info): Fix line number emission when
3331         the line diff is 0.
3332
3333         * aot-compiler.c: Add xdebug support on x86.
3334
3335         * unwind.c: Add x86 support.
3336         
3337         * aot-compiler.c (emit_exception_debug_info): Control the emission of
3338         unwind info using a new MONO_ARCH_HAVE_XP_UNWIND define.
3339
3340         * mini.c (mini_method_compile): Ditto.
3341         
3342         * mini-amd64.c (mono_arch_allocate_vars): Avoid setting cfg->ret->dreg to
3343         the variable index.
3344
3345         * aot-compiler.c: Add emit_push_section ()/emit_pop_section () helper functions
3346         which mimic .push_section/.pop_section in GAS.
3347         
3348         * aot-compiler.c: Emit precise live range information for variables.
3349
3350         * mini-amd64.c (mono_arch_output_basic_block): Add OP_LIVERANGE_START/END.
3351
3352         * method-to-ir.c (mono_spill_global_vars): Compute the instructions marking
3353         the live ranges of variables, and emit OP_LIVERANGE_START/END opcodes for
3354         them.
3355
3356         * mini-ops.h: Add OP_LIVERANGE_START/END opcodes to mark
3357         the live ranges of variables.
3358
3359         * mini.h (struct MonoMethodVar): Add two fields containing the live range
3360         of the variable in terms of native offsets.
3361
3362 2009-02-03  Rodrigo Kumpera  <rkumpera@novell.com>
3363
3364         * arrays.cs: Test for Get/SetValue of array with negate lower bounds.
3365         
3366 2009-02-02  Mark Probst  <mark.probst@gmail.com>
3367
3368         Contributed under the terms of the MIT/X11 license by Steven
3369         Munroe <munroesj@us.ibm.com>.
3370
3371         * exceptions-ppc.c (restore_regs_from_context): Correct operand
3372         order (offset then base reg) for ppc_load_multiple_regs.
3373         (emit_save_saved_regs) Correct operand order for
3374         ppc_store_multiple_regs.
3375         (mono_arch_get_call_filter): Correct operand order for
3376         ppc_load_multiple_regs.
3377
3378         * mini-ppc.c (emit_memcpy): Fix operand order for
3379         ppc_load_reg_update and ppc_store_reg_update.
3380         (mono_arch_output_basic_block): Correct operand order for ppc_lha.
3381         (mono_arch_emit_epilog): Correct operand order for
3382         ppc_load_multiple_regs.
3383
3384         * tramp-ppc.c (mono_arch_create_trampoline_code): Correct operand
3385         order for ppc_store_multiple_regs and ppc_load_multiple_regs.
3386
3387 2009-02-02  Mark Probst  <mark.probst@gmail.com>
3388
3389         * cpu-ppc64.md: Fixed storer4_memindex length.
3390
3391 2009-02-02  Zoltan Varga  <vargaz@gmail.com>
3392
3393         * aot-compiler.c (emit_line_number_info): Optimize the size of the emitted
3394         line number info.
3395         
3396         * aot-compiler.c (emit_line_number_info): Optimize this.
3397
3398 2009-02-01  Zoltan Varga  <vargaz@gmail.com>
3399
3400         * aot-compiler.c: Disassemble tokens in the IL disassembly.
3401         
3402         * aot-compiler.c: Add debug info for methods without debug info by
3403         emitting an IL file and having the line number info referencing that file.
3404
3405         * aot-compiler.c: Optimize the size of the generated line number info.
3406
3407         * aot-compiler.c: Emit line number info in xdebug mode.
3408
3409         * aot-compiler.c (mono_save_xdebug_info): Receive a MonoCompile instead of a
3410         million arguments.
3411
3412 2009-01-31  Zoltan Varga  <vargaz@gmail.com>
3413
3414         * aot-compiler.c (emit_method_dwarf_info): Emit names for local variables.
3415
3416         * driver.c (mono_main): Enable debugging support automatically if XDEBUG
3417         is used.
3418
3419 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
3420
3421         * basic-calls.cs: Test for the weird crash found on arm.
3422         
3423 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
3424
3425         * cpu-arm.md: Increase the size of storer8_membase_reg and
3426         loadr8_membase_reg to 24 bytes to accomodate the extra add.
3427
3428         * mini-arm.c (mono_arch_output_basic_block): Under FPA, when emitting
3429         OP_STORER8_MEMBASE_REG and OP_LOADR8_MEMBASE_REG, add the original
3430         reg to LR otherwise we'll be loading/storing from just the offset.
3431
3432 2009-01-30  Miguel de Icaza  <miguel@novell.com>
3433
3434         Question: if we are storing gint32's inside the "*native_offset",
3435         should we change the signature to "gint32 *native_offset" to
3436         ensure that we do not have type definition problems?
3437         
3438         * mini-exceptions.c (ves_icall_get_frame_info): Cast the gint32 to
3439         an int * as this is what the other function expects, causes
3440         problems with Freescale's compiler that defined int32_t to be a
3441         long and makes int incompatible 
3442
3443 2009-01-30  Miguel de Icaza  <miguel@novell.com>
3444
3445         * Rename generic-sharing.c to mini-generic-sharing.c to avoid the
3446         filename conflict with bjam.
3447
3448 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
3449
3450         * cpu-arm.md: Increase the size of storer8_membase_reg to 20 bytes
3451         as it might use decomposed ops.
3452
3453 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
3454
3455         * jit-icalls.c (mono_imul_ovf): Fix one of the literals.
3456
3457         * mini.c (mini_init): Emulate mul.ovf opcodes if MONO_ARCH_EMULATE_MUL_OVF
3458         is defined.
3459
3460         * mini-arm.h (MONO_ARCH_EMULATE_MUL_OVF): New define.
3461
3462         * mini-arm.c (mono_arch_build_imt_thunk): Rewrite this to allow large vtable
3463         offsets.
3464
3465         * mini-arm.c (mono_arch_context_get_int_reg): Adapt this to the "clever"
3466         way registers are stored in MonoContext on arm.
3467
3468         * unwind.c: Rewrite the handling of the cached_info array to use hazard pointers
3469         instead of locking so mono_get_cached_unwind_info () becomes signal safe.
3470
3471         * mini.c (mini_init): Emuate OP_FCONV_TO_I when using soft float.
3472
3473         * mini-arm.c (emit_load_volatile_arguments): Avoid an unneccesary assert.
3474
3475         * mini.c (mini_init): Register mono_isfinite.
3476
3477         * jit-icalls.c (mono_isfinite): New jit icall.
3478
3479         * method-to-ir.c (mono_decompose_soft_float): Add support for OP_CKFINITE.
3480         
3481         * exceptions-arm.c (mono_arch_find_jit_info): When unwinding using the LMF,
3482         set esp to ARMREG_FP instead of R12, since R12 stores the value of sp for
3483         the parent frame.
3484
3485 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
3486
3487         * exceptions-arm.c (mono_arch_find_jit_info): The frame layout on arm have
3488         separate frame and stack pointers, so we must use FP to find the register
3489         spill area.
3490         The FP reg is retrieved from the MonoContext::regs array.
3491
3492 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
3493
3494         * mini-arm.c (mono_arch_output_basic_block): Emit two cond ops for OP_FBGE
3495         as FPA requires it.
3496
3497 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
3498
3499         * mini-arm.c (mono_arch_emit_setret): Emit OP_FMOVE for methods that
3500         return R4 and R8 when not running under softfloat.
3501
3502         Fixes basic-calls.exe
3503
3504 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
3505
3506         * mini-arm.c: Implement some overflow opcodes.
3507
3508 2009-01-29  Miguel de Icaza  <miguel@novell.com>
3509
3510         * ssa.c: handle another alloca.h
3511
3512         * mini-exceptions.c (mono_handle_native_sigsegv): Do not use
3513         PLATFORM_WIN32 for detecting if we have sigaction.   Instead use
3514         MONO_ARCH_USE_SIGACTION. 
3515
3516         * aot-runtime.c, mini-exceptions.c: Replace platform define with
3517         capability defines.
3518
3519         * method-to-ir.c (mono_method_to_ir): Type cast fix on some platforms.
3520
3521         * mini-ppc.h (MONO_ARCH_USE_SIGACTION): Do not define this for all
3522         PPC targets as sigaction does not exist on all platforms, define
3523         this on a per-platform basis.
3524
3525         Instead of erroring out if the platform is not defined, include
3526         mini-ppc-os.h, and expect that the OS specific setting provides
3527         the required information.   
3528
3529 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
3530
3531         * aot-compiler.c: Fix --enable-minimal=aot.
3532
3533 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
3534
3535         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Fix the
3536         previous change.
3537
3538 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
3539
3540         * exceptions-arm.c: Fix warnings.
3541
3542         * tramp-arm.c aot-compiler.c unwind.h unwind.c: Implement xdebug support for
3543         ARM.
3544
3545         * mini-x86.c: Fix --enable-minimal=jit build.
3546
3547         * mini.c: Really fix --enable-minimal=jit build.
3548         
3549         * mini.c (construct_object_context_for_method): Move this outside
3550         the DISABLE_JIT block to fix the --enable-minimal=jit build.
3551
3552         "Backported" of r124984 from 2.0 branch.
3553         
3554         * aot-compiler.c aot-runtime.c: Add full-aot support delegate BeginInvoke/EndInvoke.
3555
3556         "Backport" of r124977 + r124978 from 2.0 branch.
3557         
3558         * exceptions-arm.c (mono_arm_throw_exception_by_token): New helper function
3559         to avoid calling mono_exception_from_token () from the throw trampoline.
3560         (mono_arch_get_throw_exception_generic): call throw_exception_by_token
3561         for throwing corlib exceptions, this fixes full-aot support for corlib
3562         exceptions.
3563
3564         * aot-compiler.c (compile_method): Make a copy of cfg->locals to fix the build.
3565
3566 2009-01-29  Miguel de Icaza  <miguel@novell.com>
3567
3568         * mini-darwin.c, mini-windows.c, mini-posix.c: Commit the first
3569         part of the changes to split the code in mini into operating
3570         system specific files.
3571
3572         This patch was done by copying mini.c to the respective files to
3573         preserve SVN history.
3574
3575 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
3576
3577         * aot-compiler.c (emit_method_dwarf_info): Add minimal support for locals.
3578
3579 2009-01-28  Zoltan Varga  <vargaz@gmail.com>
3580
3581         * method-to-ir.c (mono_method_to_ir): Avoid generic sharing for calls made to
3582         remoting-invoke-with-check wrappers of shared methods.
3583
3584         * mini.c (print_jit_stats): Print out major gc count/time for libgc too.
3585
3586 2009-01-27  Mark Probst  <mark.probst@gmail.com>
3587
3588         * method-to-ir.c (emit_stloc_ir): Only apply the reg-reg move
3589         optimization if the top of stack is the last instruction in the
3590         bblock.  Otherwise it might have been used after its definition.
3591         Fixes #469742.
3592
3593 2009-01-27  Zoltan Varga  <vargaz@gmail.com>
3594
3595         * mini-trampolines.c (mono_magic_trampoline): Print out the caller
3596         method as well when get_vcall_slot () fails to match a code sequence.
3597
3598         * mini-arm.c: Fix the android build, which doesn't have
3599         __aeabi_read_tp.
3600
3601 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
3602
3603         * mini-s390x.c: Remove a stray declaration of emit_sig_cookie () to fix
3604         the s390x build.
3605
3606 2009-01-26  Rodrigo Kumpera  <rkumpera@novell.com>
3607
3608         * unwind.c (mono_unwind_cleanup): Don't crash if cached_info is NULL.
3609
3610 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
3611
3612         * mini.c (mini_method_compile): Save the unwind info generated by the JIT
3613         and put its id into jinfo->used_regs. This is only used on amd64,
3614         which is currently the only platform generating unwind info.
3615
3616         * exceptions-amd64.c: Instead of unwinding based on a register mask, use
3617         the dwarf unwinder. This is required to correctly handle async exceptions
3618         like thread abort and stack overflows, which can happen while a method
3619         is in the middle of its prolog or epilog.
3620         
3621         * aot-runtime.c (mono_aot_get_unwind_info): New helper function to obtain
3622         the unwind info belonging to an AOTed method.
3623
3624         * aot-compiler.c aot-runtime.c: Save/Load the unwind info emitted by the JIT
3625         into cfg->unwind_ops.
3626         
3627         * unwind.c (mono_unwind_frame): Use <= instead of < for the loop exit check.
3628
3629         * mini.c (mini_init): Call mono_unwind_init ().
3630         (mini_cleanup): Call mono_unwind_cleanup ().
3631
3632         * unwind.c: Add functions for managing a set of unwind info entries, allowing
3633         unwind info to be shared between methods.
3634
3635         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info for the registers
3636         saved in the LMF.
3637
3638         * exceptions-amd64.c (mono_arch_exceptions_init): Call 
3639         get_throw_pending_exception () to avoid initialization races.
3640
3641         * mini-exceptions.c (mono_exceptions_init): Call an arch specific
3642         mono_arch_exceptions_init () function.
3643
3644         * mini.h (MONO_INST_NEW): Remove duplicate setting of cil_code.
3645
3646 2009-01-25  Zoltan Varga  <vargaz@gmail.com>
3647
3648         * mini.c (mono_get_domain_intrinsic): New helper function.
3649         (mono_get_thread_intrinsic): Ditto.
3650
3651         * mini-arm.c mini-ia64.c: Use the new helper functions.
3652         
3653         * method-to-ir.c (mono_method_to_ir): Fix the comment for
3654         the last constrained_call change, since it is needed in the non-AOT
3655         case as well.
3656
3657         * mini-arm.c: Implement OP_TLS_GET on arm eabi linux.
3658         
3659         * mini-arm.c (mono_arch_emit_prolog): Add an inlined version of 
3660         mono_get_lmf_addr () on arm eabi linux.
3661
3662 2009-01-24  Zoltan Varga  <vargaz@gmail.com>
3663
3664         * mini-amd64.c (mono_arch_get_vcall_slot): Handle yet another
3665         code sequence which matches a non-virtual call.
3666
3667 2009-01-23  Mark Probst  <mark.probst@gmail.com>
3668
3669         * mini-ppc.c (mono_arch_context_get_int_reg): Allow access to the
3670         stack pointer (r1).
3671
3672 2009-01-23  Zoltan Varga  <vargaz@gmail.com>
3673
3674         * aot-compiler.c aot-runtime.c: Treat delegate-invoke wrappers similarly to
3675         runtime-invoke wrappers, since they are also shared based on signature.
3676
3677 2009-01-22  Mark Probst  <mark.probst@gmail.com>
3678
3679         * mini-exceptions.c (ves_icall_get_frame_info): Fetch the generic
3680         info from the (correct) context.
3681
3682 2009-01-22  Zoltan Varga  <vargaz@gmail.com>
3683
3684         * unwind.c (mono_unwind_frame): Remove a stray g_free ().
3685         
3686         * unwind.c (mono_unwind_frame): New function to unwind through a frame
3687         using dwarf unwinding info. Not yet used.
3688
3689         * mini.c (mini_init): When using xdebug, disable freeing of domains.
3690
3691 2009-01-21  Mark Probst  <mark.probst@gmail.com>
3692
3693         * mini-ppc.c (mono_arch_delegate_invoke_impl): Return function
3694         descriptors.
3695
3696         * mini-trampolines.c (mono_delegate_trampoline): Remove the PPC64
3697         special case and handle mono_arch_delegate_invoke_impl() returning
3698         function descriptors.
3699
3700         * tramp-ppc.c (mono_arch_create_trampoline_code): Delegate
3701         trampolines return function descriptors, too.
3702
3703 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
3704
3705         * method-to-ir.c (handle_alloc): Avoid generic instances in the
3706         out_of_line optimization.
3707
3708 2009-01-21  Martin Baulig  <martin@ximian.com>
3709
3710         * mini.h
3711         (MonoCompile): Added `disable_deadce_vars' to disable removing
3712         unused variables.
3713
3714         * mini.c
3715         (mini_method_compile): Set `cfg->disable_deadce_vars' when running
3716         inside the debugger.
3717
3718         * liveness.c (mono_analyze_liveness): Don't remove any unused
3719         variables if `cfg->disable_deadce_vars' is set.
3720
3721 2009-01-21  Mark Probst  <mark.probst@gmail.com>
3722
3723         * method-to-ir.c: Only apply exception constructor optimization if
3724         the the method actually belongs to an exception class.  Fixes
3725         #467456.
3726
3727 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
3728
3729         * mini-trampolines.c (mono_delegate_trampoline): Put back the previous
3730         change inside a #ifdef __mono_ppc64__.
3731
3732         * aot-compiler.c (compile_method): Remove the previous limitation.
3733
3734         * method-to-ir.c (method-to-ir.c): Add support for the constrained prefix
3735         on type variables in AOTed code.
3736         
3737         * aot-compiler.c (compile_method): Skip generic methods having type 
3738         constraints on their generic parameters.
3739
3740         * aot-compiler.c (compile_method): Check for methods which cannot be
3741         encoded inside RGCTX_FETCH patches as well.
3742
3743         * mini-exceptions.c (mono_print_thread_dump): Fix the windows
3744         build.
3745
3746 2009-01-20  Mark Probst  <mark.probst@gmail.com>
3747
3748         * method-to-ir.c: Force the vtable variable in shared generic code
3749         for the case that they might show up on a stack trace where they
3750         are needed.
3751
3752         * mini-exceptions.c: Save and use generic sharing info as well as
3753         IP in stack traces to resolve shared generic instantiations.
3754
3755 2009-01-20  Zoltan Varga  <vargaz@gmail.com>
3756
3757         * mini-trampolines.c (mono_delegate_trampoline): Revert the change which
3758         added a mono_get_addr_from_ftnptr () as it breaks the ia64 build.
3759
3760 2009-01-20  Mark Probst  <mark.probst@gmail.com>
3761
3762         * method-to-ir.c: Do generic sharing for array constructors.
3763
3764 2009-01-20  Rodrigo Kumpera  <rkumpera@novell.com>
3765
3766         * mini-exceptions.c (mono_print_thread_dump): Add information
3767         about the thread state using wapi_current_thread_desc.
3768
3769 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
3770
3771         * basic-simd.cs: Tests for the new constructors. 
3772
3773 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
3774
3775         * mini-ops.h: Added OP_EXPAND_*
3776
3777         * cpu-x86.md: Same.
3778
3779         * mini-x86.c (mono_arch_output_basic_block): Same.
3780         
3781         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for single element constructors.
3782
3783 2009-01-19  Zoltan Varga  <vargaz@gmail.com>
3784
3785         * iltests.il.in: Add a test for #467385.
3786
3787 2009-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
3788
3789         * mini.c (mini_thread_cleanup): Don't cleanup TLS storage if the
3790         thread been cleaned up is not the same currently in execution.
3791
3792         Fixes appdomain-unload crashes on windows, osx and linux variants
3793         without the __thread keyword.
3794
3795 2009-01-18  Zoltan Varga  <vargaz@gmail.com>
3796
3797         * mini-arm.c (mono_arch_flush_icache): Applied patch from Koushik Dutta
3798         (koush@koushikdutta.com). Implement this for android.
3799
3800         * helpers.c (mono_disassemble_code): Avoid assembler errors if the id
3801         begins with a digit.
3802
3803         * method-to-ir.c: Call mono_gc_get_write_barrier () instead of
3804         mono_marshal_get_write_barrier ().
3805
3806 2009-01-17  Rodrigo Kumpera  <rkumpera@novell.com>
3807
3808         * decompose.c (mono_decompose_vtype_opts): Fix the decomposition
3809         of OP_VCALL_* ops for 8 bytes vtypes on 32 bits archs and platorms
3810         that pass them on a register pair.
3811
3812         This affects windows, OSX and FreeBSD. The mono/tests/handleref.exe
3813         test was crashing due to that.
3814
3815 Fri Jan 16 15:21:21 CET 2009 Paolo Molaro <lupus@ximian.com>
3816
3817         * exceptions-ppc.c: tweaks from malc (OV-Soft) to fix the size of the
3818         trampoline code. Include ucontext.h only if available.
3819
3820 2009-01-15  Mark Probst  <mark.probst@gmail.com>
3821
3822         * mini.c: mono_domain_lookup_shared_generic() takes an open method
3823         and doesn't check whether it's sharable, like it was before
3824         removing the shared generics hash.  This brings IronPython
3825         performance back to what it was before that change.
3826
3827 2009-01-14  Mark Probst  <mark.probst@gmail.com>
3828
3829         * method-to-ir.c: Handle delegate invocation optimization earlier,
3830         otherwise it would be handled (much more slowly) by the
3831         final/sealed optimization.
3832
3833 2009-01-13  Zoltan Varga  <vargaz@gmail.com>
3834
3835         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes when the current thread or
3836         domain is not set. Fixes #465864.
3837
3838 2009-01-12  Mark Probst  <mark.probst@gmail.com>
3839
3840         * method-to-ir.c: Don't stop sharing of generic methods with catch
3841         clauses - we already handle those.
3842
3843 2009-01-12  Mark Probst  <mark.probst@gmail.com>
3844
3845         * mini.c, mini.h: lookup_generic_method() is now
3846         mono_domain_lookup_shared_generic() and uses the jit_code_hash,
3847         making the shared_generics_hash obsolete.
3848
3849 2009-01-12  Mark Probst  <mark.probst@gmail.com>
3850
3851         * mini-ppc.c, exceptions-ppc.c, cpu-ppc.md, cpu-ppc64.md: Don't
3852         use the red zone.  Make room on the stack first and then use it,
3853         not the other way around.
3854
3855 2009-01-12  Zoltan Varga  <vargaz@gmail.com>
3856
3857         * mini.c (mini_init): Call mono_xdebug_init ().
3858
3859         * aot-compiler.c (mono_xdebug_init): Make this non-static.
3860
3861 2009-01-11  Zoltan Varga  <vargaz@gmail.com>
3862
3863         * TestDriver.cs: Add an --iter argument to run tests multiple times.
3864
3865         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Emit debug info for
3866         trampolines.
3867
3868         * aot-compiler.c (mono_save_trampoline_xdebug_info): New function to emit
3869         debug+unwind info for trampolines.
3870
3871         * mini.c (mono_create_unwind_op): New helper function.
3872
3873         * unwind.h: Add macros for emitting unwind ops without a MonoCompile.
3874
3875 2009-01-10  Zoltan Varga  <vargaz@gmail.com>
3876
3877         * aot-compiler.c: Fix the build.
3878
3879 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
3880
3881         * Makefile.am: Update dtrace-prelink.sh location.
3882
3883 2009-01-08  Zoltan Varga  <vargaz@gmail.com>
3884
3885         * method-to-ir.c (mono_method_to_ir): Fix the check for the mscorlib ldstr 
3886         optimization. Fixes #464520.
3887
3888 2009-01-07  Bill Holmes  <billholmes54@gmail.com>
3889
3890         * mini-amd64.c : Adding code to save/restore non-volatile registers
3891            on Winx64.
3892
3893         * exceptions-amd64.c : Adding code to save/restore non-volatile 
3894           registers on Winx64.
3895
3896         Contributed under MIT/X11 license.
3897
3898 2009-01-07  Zoltan Varga  <vargaz@gmail.com>
3899
3900         * mini-arm.c (mono_arch_flush_icache): Use __GNUC_PREREQ instead of checking
3901         __GNUC_MINOR__ which can break when the major version changes.
3902
3903 2009-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
3904
3905         * basic-simd.cs: Add tests for usage of the sizeof opcode.
3906
3907 2009-01-07  Geoff Norton  <gnorton@novell.com>
3908
3909         * helpers.c:  Allow mono -v -v -v to work on darwin.
3910
3911 2009-01-05  Bill Holmes  <billholmes54@gmail.com>
3912
3913         * mini-amd64.c (mono_arch_get_vcall_slot) : Handle an additional instruction
3914           pattern. 
3915
3916         Contributed under MIT/X11 license.
3917
3918 2009-01-05  Zoltan Varga  <vargaz@gmail.com>
3919
3920         * mini.c (mono_allocate_stack_slots_full2): Use mono_class_from_mono_type
3921         instead of directly accessing type->data.klass. Fixes #462016.
3922         (mono_allocate_stack_slots_full): Ditto.
3923
3924         * mini-arm.c (mono_arch_flush_icache): Applied patch from Riku Voipio 
3925         <novell@kos.to>. Fix cache flush on kernels without OLDABI compat option.
3926
3927         * aot-compiler.c (emit_plt): Fix ARM build.
3928
3929 2009-01-04  Zoltan Varga  <vargaz@gmail.com>
3930
3931         * branch-opts.c (mono_if_conversion): Optimize this using ins->prev.
3932         
3933         * branch-opts.c (mono_if_conversion): Fix an assert introduced by the last
3934         change.
3935
3936         * branch-opts.c (mono_if_conversion): Use branch->inst_true_bb/inst_false_bb
3937         instead of bblock->out_bb [0]/[1], the two might not be the same. Fixes
3938         #463357.
3939
3940         * iltests.il.in: Add a regression test.
3941
3942 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
3943
3944         * mini-codegen.c (mono_print_ins_index): Pretty print XPHI and VPHI.
3945
3946 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
3947
3948         * basic-simd.cs: Add a regression test for #462457.
3949
3950 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
3951
3952         * mini-ops.h: Add a definition of XPHI.
3953
3954         * mini.h (MONO_IS_PHI): Make is aware of simd instrincs. 
3955
3956         * ssa.c (op_phi_to_move): Handle XPHI.
3957
3958         * ssa.c (mono_ssa_compute): Generate a XPHI for simd intrinsics instead of VPHI.
3959
3960         Fixes #462457
3961
3962 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
3963
3964         * method-to-ir.c (mono_emit_rgctx_calli): Fix a warning.
3965
3966 2008-12-31  Geoff Norton  <gnorton@novell.com>
3967
3968         * mini-ppc.c: The prolog size allocated can be too small for darwin
3969         ppc32 under certain circumstances.  Also fix a small logic bug.
3970
3971 2008-12-29  Zoltan Varga  <vargaz@gmail.com>
3972
3973         * mini.c (mono_jit_compile_method_inner): Avoid holding the domain lock
3974         while loading AOT methods.
3975
3976         * mini-exceptions.c: Check jit_tls->class_cast_from instead of class_cast_to
3977         since only the former is nulled out after a successful cast. This prevents
3978         crashes with rethrown exceptions when using --debug=casts.
3979
3980 2008-12-24  Mark Probst  <mark.probst@gmail.com>
3981
3982         * mini.h: New macro for checking whether a method is final,
3983         i.e. whether the method or its class is marked final.
3984
3985         * method-to-ir.c: Use the new macro for all final-checks
3986         consistently.  Fixes the crash in the System.ServiceModel tests.
3987
3988 2008-12-23  Mark Probst  <mark.probst@gmail.com>
3989
3990         * mini-exceptions.c (get_exception_catch_class): Corrected another
3991         overly strict assertion.
3992
3993 2008-12-23  Mark Probst  <mark.probst@gmail.com>
3994
3995         * mini-ppc.c (mono_arch_build_imt_thunk): Save and restore r11.
3996         Clobbering it is not allowed because the caller might use it as
3997         the vtable register in the interface call.
3998
3999 2008-12-19  Mark Probst  <mark.probst@gmail.com>
4000
4001         * mini-exceptions.c (get_exception_catch_class): Corrected an
4002         overly strict assertion.
4003
4004 2008-12-18  Mark Mason  <mmason@upwardaccess.com>
4005         
4006         * method-to-ir.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P or sizeof(gpointer) when appropriate.
4007
4008         * mini.h: Move typedef to mgreg_t up above include of mini-arch.h
4009
4010         * local-propogation.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P when appropriate
4011
4012         * cpu-mips.md: correct lengths for certain long_ opcodes.
4013
4014         * mini-mips.h: Only emulate long operations when SIZEOF_REGISTER==4. Add missing func decl.
4015
4016         * 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().
4017         
4018 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
4019
4020         * exceptions-mips.c (mono_arch_find_jit_info): decode sd instructions as well when looking for registers.
4021         
4022 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
4023         
4024         * mini-mips.c (mono_arch_output_basic_block): OP_JUMP_TABLE stores patch type in inst_c1, not inst_i1.
4025         
4026 2008-12-16  Rodrigo Kumpera  <rkumpera@novell.com>
4027
4028         * branch-opts.c (remove_block_if_useless): Even if BB0 falls through, don't add a br to the
4029         next basic block.
4030         
4031 2008-12-16  Mark Mason  <mmason@upwardaccess.com>
4032
4033         * 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
4034
4035         * 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)
4036         
4037 2008-12-15  Mark Mason  <mmason@upwardaccess.com>
4038         
4039         * trace.c (mono_trace_enter_method): correctly handle arguments smaller than the stack slot size on big endian systems.
4040         
4041 2008-12-14  Zoltan Varga  <vargaz@gmail.com>
4042
4043         * liveness.c (mono_analyze_liveness): Avoid eliminating the 'this' var in
4044         gshared code. Fixes #458947.
4045
4046         * generics.cs: Add a test.
4047
4048 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
4049         
4050         * method-to-ir.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4051         
4052         * mini-mips.c: first pass n32 code generation.
4053
4054         * mini-mips.h: datatypes and defines for n32 support.
4055
4056         * exceptions-mips.c: first pass n32 code generation.
4057         
4058         * tramp-mips.c: first pass n32 code generation.
4059         
4060         * cpu-mips.md: add long_ opcodes.
4061         
4062 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
4063
4064         * liveness.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4065
4066         * cfold.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4067         
4068         * local-propogation.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4069         
4070         * regalloc2.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4071
4072         * mini.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4073
4074         * mini-codegen.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4075
4076         * ssa.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4077
4078         * decompose.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4079
4080         * helpers.c: for mips/n32, don't pass -mips32 to objdump
4081
4082 2008-12-12  Zoltan Varga  <vargaz@gmail.com>
4083
4084         * mini-arm.c tramp-arm.c: Fix calls to mono_arch_flush_icache.
4085
4086 2008-12-12  Andres G. Aragoneses  <aaragoneses@novell.com>
4087
4088         * driver.c: Sync --help-trace with man page (EXPR,EXPR).
4089
4090 2008-12-12  Mark Probst  <mark.probst@gmail.com>
4091
4092         * mini-ppc.h, exceptions-ppc.c, tramp-ppc.c: Create function
4093         descriptors for helper functions directly in front of the code.
4094
4095 2008-12-11  Mark Probst  <mark.probst@gmail.com>
4096
4097         * method-to-ir.c: Removed an unnecessary assertion.
4098
4099 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
4100
4101         * method-to-ir.c: Merge SGEN changes from the old JIT.
4102
4103 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
4104
4105         * driver.c (compile_all_methods_thread_main): Handle failure of
4106         mono_get_method ().
4107
4108 2008-12-10  Mark Probst  <mark.probst@gmail.com>
4109
4110         * mini-ppc.c: Merged with mini-ppc64.c.
4111
4112         * mini-ppc.h: Define PPC_MINIMAL_PARAM_AREA_SIZE on all targets.
4113
4114         * Makefile.am: Use the same sources for PPC and PPC64.
4115
4116         * mini-ppc64.c: Removed.
4117
4118 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
4119
4120         * branch-opts.c (remove_block_if_useless): Extract fall through detection
4121         code to mono_bb_is_fall_through.
4122         
4123         * branch-opts.c (mono_remove_critical_edges): Same.
4124
4125 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
4126
4127         * ssa.c (fold_ins): branch opt can kill dummy switch ops so we can't
4128         expect that an OP_BR_REG will be there.
4129
4130 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
4131
4132         * branch-opts.c (remove_block_if_useless): Use MONO_IS_BRANCH_OP instead of checking
4133         for the many branch ops. The original check miss OP_BR_REG.
4134
4135         Fixes #457574.
4136         
4137 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
4138
4139         * mini-mips.h mini-mips.c exceptions-mips.c tramp-mips.c: first round of changes necessary to eventually support n32.
4140
4141 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
4142
4143         * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
4144         while holding the aot lock.
4145
4146 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
4147
4148         * mini-mips.c (mono_arch_output_basic_block): use mfc1/lwc1 instead of mfc1d/ldc1
4149         
4150 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
4151
4152         * mini.c (mini_cleanup) : Adding a call to cominterop_release_all_rcws 
4153           to release all runtime callable wrappers held by the runtime.
4154
4155         Contributed under MIT/X11 license.
4156
4157 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
4158
4159         * tramp-amd64.c (mono_arch_create_trampoline_code_full) : Increase the code size for
4160           for Winx64.
4161
4162         Contributed under MIT/X11 license.
4163
4164 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
4165
4166         * aot-runtime.c (decode_exception_debug_info): Acquire the domain
4167         lock when calling mono_domain_alloc (). Hopefully fixes #415608.
4168
4169 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
4170
4171         * cpu-mips.md: fix ckfinite length
4172
4173         * mini-mips.c: at least recognize n32 ABI when used (not yet supported)
4174         (mono_arch_lowering_pass): cleanup, rearrange for clarity
4175         (mono_arch_output_basic_block): implement OP_CKFINITE, add more asserts
4176         
4177 2008-12-08  Mark Mason   <mmason@upwardaccess.com>
4178
4179         * exceptions-mips.c (mono_arch_find_jit_info): init new_ctx with ctx, dont' call setup_context.
4180         
4181 2008-12-08  Geoff Norton  <gnorton@novell.com>
4182
4183         * tramp-amd64.c: r120895 stores RAX, so we need to increase the window
4184         size by 8 bytes as well.
4185
4186 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4187
4188         * basic-simd.cs: Fix method names for Vector16b.
4189         
4190 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4191
4192         * basic-simd.cs: Fix method names for Vector16sb.
4193
4194 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4195
4196         * basic-simd.cs: Fix method names for Vector8us.
4197         
4198 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4199
4200         * basic-simd.cs: Fix method names for Vector8s.
4201         
4202 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4203
4204         * basic-simd.cs: Fix method names for Vector4ui.
4205
4206 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4207
4208         * basic-simd.cs: Fix method names for Vector2l.
4209
4210 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4211
4212         * basic-simd.cs: Fix method names for Vector2d.
4213
4214 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4215
4216         * simd-intrinsics.c (mono_emit_simd_intrinsics): Add support for intrinsics
4217         that are extension methods.
4218
4219 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4220
4221         * basic-simd.cs: Fix method names for Vector4f.
4222
4223 2008-12-08  Zoltan Varga  <vargaz@gmail.com>
4224
4225         * mini-exceptions.c (mono_print_thread_dump): Mark threadpool threads
4226         as such. Fixes #456669.
4227
4228 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
4229
4230         * mini-mips.c (mono_arch_emit_call): narrow float arguments when passing as args.
4231         
4232 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
4233
4234         * mini-mips.c (mono_arch_lowering_pass): don't handle OP_ICONV_TO_R* or OP_R*CONST
4235         (mono_arch_emit_setret): use OP_MIPS_CVTSD to return SP floats
4236         (mono_arch_output_basic_block): simplify FP load/store, handle OP_MIPS_FBLT_UN
4237         (mips_adjust_stackframe): handle FP spills
4238                 
4239         * mini-ops.h: add mips_mtc1_s2
4240         
4241         * cpu-mips.md: add mips_mtc1_s2
4242         
4243 2008-12-07  Zoltan Varga  <vargaz@gmail.com>
4244
4245         * unwind.c: New file, move the unwind info encoding functions here from
4246         aot-compiler.c, so they could be used at runtime too.
4247
4248 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
4249
4250         * mini-mips.c (mono_arch_lowering_pass): handle OP_IMUL_IMM as well
4251         (mono_arch_output_basic_block): fix OP_LOCALLOC code generation
4252         
4253 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
4254
4255         * mini-mips.c: cleanup warnings
4256         (mono_arch_lowering_pass): handle OP_LOCALLOC_IMM
4257         (mips_adjust_stackframe): handle case of taking the address of stack locals
4258         
4259 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
4260
4261         * aot-compiler.c: Implement a few functions missing from the asm writer.
4262         (emit_method_code): Only write symbols for methods when using the bin
4263         writer, since the assembler can't deal with the characters in our method
4264         names.
4265
4266         * aot-compiler.c (is_plt_patch): ICALL_ADDR is also a plt patch.
4267
4268         * method-to-ir.c (mono_method_to_ir): Transform aotconst+calli into a direct
4269         call.
4270
4271         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Rework the code
4272         a bit to also restore %rax.
4273
4274 2008-12-05  Mark Probst  <mark.probst@gmail.com>
4275
4276         * mini-ppc.c: Some simple merges from mini-ppc64.c.
4277
4278 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
4279
4280         * ssa.c (mono_ssa_compute): Only add an implicit reference at start for
4281         arguments.
4282
4283 2008-12-05  Mark Probst  <mark.probst@gmail.com>
4284
4285         * exceptions-ppc.c: Merged with exceptions-ppc64.c.
4286
4287         * mini-ppc.c, mini-ppc.h: Remove PPC_STACK_ALIGNMENT and use
4288         MONO_ARCH_FRAME_ALIGNMENT.  Struct for PPC64 function descriptors.
4289
4290         * exceptions-ppc64.c: Removed.
4291
4292         * Makefile.am: Use exceptions-ppc.c instead of exceptions-ppc64.c.
4293
4294 2008-12-05  Mark Probst  <mark.probst@gmail.com>
4295
4296         * tramp-ppc.c, mini-ppc.c, mini-ppc.h: Merged tramp-ppc.c with
4297         tramp-ppc64.c.
4298
4299         * Makefile.am: Use tramp-ppc.c instead of tramp-ppc64.c.
4300
4301         * tramp-ppc64.c: Removed.
4302
4303 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
4304
4305         * aot-compiler.c (add_generic_instances): Skip non-generic classes in
4306         the TYPESPEC table.
4307
4308 2008-12-05  Mark Probst  <mark.probst@gmail.com>
4309
4310         * mini-ppc.h: Merged mini-ppc64.h with mini-ppc.h.
4311
4312         * exceptions-ppc64.c, tramp-ppc64.c, mini-arch.h, Makefile.am: Use
4313         mini-ppc.h instead of mini-ppc64.h.
4314
4315         * mini-ppc64.h: Removed.
4316
4317 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
4318
4319         * mini-mips.c: introduce USE_LDC_SDC: use ldc1/sdc1 to load/store doubles, disabled by default
4320         
4321         * mini-mips.c (mono_arch_emit_outarg_vt): fix offset calculation for memcpy in structure passing.
4322         
4323 2008-12-05  Mark Probst  <mark.probst@gmail.com>
4324
4325         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c:
4326         Removed FIRST/LAST_[GF]REG macros, to make merging PPC64 with PPC
4327         code easier.
4328
4329 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
4330
4331         * basic-simd.cs: Tests for operator == and != on  Vector8us and Vector16b.
4332
4333 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
4334
4335         * simd-intrinsics.c: Add support for operator == and != to Vector8(u)s and Vector16(s)b.
4336
4337 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
4338
4339         * basic-simd.cs: Tests for operator == and != on Vector4f.
4340
4341 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
4342
4343         * simd-intrinsics.c (simd_intrinsic_emit_equality): Adapt to support Vector4f.
4344
4345         * simd-intrinsics.c: Kill useless enum.
4346
4347 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
4348
4349         * cpu-mips.md: add long_conv_to_ovf_i4_2
4350         * mini-mips.c: update/add various _OVF_ opcodes to fix test failures
4351
4352 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
4353
4354         * mini-mips.c: ifdef protect automatic promotions of R4 to R8.
4355         
4356         * mini-mips.c (mono_arch_emit_setret): handle R4 case with FCONV_TO_R4 instead of FMOVE
4357
4358 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
4359
4360         * mini-mips.c (mono_arch_output_basic_block): fix codegen for OP_OR_IMM/OP_IOR_IMM
4361         
4362 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
4363
4364         * basic-simd.cs: Add tests for new methods.
4365
4366 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
4367
4368         * simd-intrinsics.c: Add support for operator == and !=
4369         on Vector4(u)i.
4370
4371         * simd-methods.h: Add SN_op_Inequality and SN_op_Equality.
4372
4373 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
4374
4375         * simd-intrinsics.c: Remove ExtractByteMask intrinsics.
4376
4377 2008-12-04  Zoltan Varga  <vargaz@gmail.com>
4378
4379         * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
4380
4381         * mini.c (mono_resolve_patch_target): Allow pinvoke methods in 
4382         MONO_PATCH_INFO_ICALL_ADDR.
4383
4384         * aot-runtime.c (MonoAotFileInfo): Correct order of fields.
4385
4386         * aot-compiler.c: Resurrect full-aot support.
4387
4388 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
4389
4390         * mini-mips.c (mono_arch_lowering_pass): handle OP_COMPARE and OP_ICOMPARE
4391         
4392 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
4393
4394         * mini-mips.c (mono_arch_output_basic_block): fix OP_IREM_UN code generation
4395         
4396 2008-12-03  Rodrigo Kumpera  <rkumpera@novell.com>
4397
4398         * basic-simd.cs: Fix tests to work under ppc.
4399         Remove tests for methods that will be removed.
4400
4401 2008-12-03  Mark Probst  <mark.probst@gmail.com>
4402
4403         * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
4404         generic type (via a typedef or typeref) correctly.
4405
4406 2008-12-03  Zoltan Varga  <vargaz@gmail.com>
4407
4408         * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
4409         diagnose an assertion failure.
4410
4411 2008-12-02  Mark Probst  <mark.probst@gmail.com>
4412
4413         * tramp-ppc64.c (mono_arch_create_rgctx_lazy_fetch_trampoline):
4414         Fix trampoline size.
4415
4416         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: A few floating point
4417         conversion opcodes are implemented natively instead via emulation.
4418
4419 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
4420
4421         * cpu-mips.md: remove mips_xori
4422
4423         * mini-ops.h:  remove mips_xori
4424
4425         * mini-mips.h: replace OP_MIPS_XORI with OP_IXOR
4426
4427         * mini-mips.c (mono_arch_decompose_long_opts): Add ladd_imm, lsub, lsub_imm, lneg, lsub_ovf, lsub_ovf_un.
4428         
4429         * mini-mips.c (mono_arch_lowering_pass, mono_arch_output_basic_block): fix IXOR handling
4430         
4431 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
4432
4433         * cpu-mips.md: fix instruction lengths.
4434
4435         * mini-mips.h: define MONO_ARCH_NO_IOV_CHECK
4436
4437         * mini-mips.c: move most instruction rewriting into decompose_ops. Implement conditional branches and exceptions. Fix jump table patch handling. Implement add/sub OVF.
4438
4439         * mini-ops.h: fix slti / sltiu op profiles.
4440         
4441 2008-12-02  Martin Baulig  <martin@ximian.com>
4442
4443         * method-to-ir.c (mono_method_to_ir): Disable debugging
4444         information for the init locals block to make the debugger stop
4445         after all locals have been initalized.
4446
4447 2008-12-02  Martin Baulig  <martin@ximian.com>
4448
4449         * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
4450         running inside the debugger.
4451
4452 2008-12-01  Zoltan Varga  <vargaz@gmail.com>
4453
4454         * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
4455         is enabled.
4456
4457         * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the 
4458         alu->alu imm optimization which only shows if deadce is disabled.
4459
4460         * aot-compiler.c: Rename the function names for the binary and asm writers
4461         so they can coexist in the same process. Rework the xdebug code to use the
4462         asm writer. This avoids the need to call into the runtime to dump the
4463         debugging info. Add more debugging info for types.
4464
4465         * mini-<ARCH>.h: Kill MONO_ARCH_HAVE_NORMALIZE_OPCODES define.
4466
4467         * genmdesc.c genmdesc.pl mini.h: Don't put the CEE_ opcodes into the
4468         cpu description tables, they can't occur in cpu-<ARCH>.md.
4469
4470         * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
4471         the stack in CEE_LDFLDA. Fixes #450542.
4472
4473         * generics.cs: Add a new test.
4474
4475 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
4476
4477         * mini-ops.h: updated MIPS opcodes
4478         * mini-mips.c: decompose long opts
4479         * mini-mips.h: decompose long opts
4480         
4481 2008-11-29  Mark Mason   <mmason@upwardaccess.com>
4482
4483         * cpu-mips.md: fix length on int_rem_un
4484         * mini-mips.c (mips_stackframe_adjust): fix insertion of spillvars region in MIPS stackframes.
4485         
4486 2008-11-29  Zoltan Varga  <vargaz@gmail.com>
4487
4488         * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
4489
4490         * mini-codegen.c (mono_print_ins_index): Handle OP_VOIDCALL_MEMBASE.
4491
4492 2008-11-29  Martin Baulig  <martin@ximian.com>
4493
4494         * mini-exceptions.c (mono_handle_native_sigsegv): Check
4495         mono_debug_using_mono_debugger() in addition to the
4496         `no_gdb_backtrace' flag in the `MonoDebugOptions'.
4497
4498 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
4499
4500         * mini-ops.h: updated more MIPS opcodes
4501         * mini-mips.c: FP compare/branch working again, clean up last of CEE_ -> OP_ mappings
4502         * cpu-mips.md: Added MIPS versions of new FP compare/branch opcodes.
4503         
4504 2008-11-28  Mark Probst  <mark.probst@gmail.com>
4505
4506         * mini-ppc64.c: Patch the RGCTX fetch trampoline correctly.
4507
4508 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
4509
4510         * mini-mips.c (mono_arch_emit_call): adding missing conversion to fp single when passing in integer arg register.
4511         * mini-mips.c (mips_adjust_stackframe): compensate for spill-down logic.
4512         * mini-ops.h: correct selected mips opcode entries
4513         
4514 2008-11-28  Mark Probst  <mark.probst@gmail.com>
4515
4516         * mini-ppc64.c, mini-ppc64.h: Enable generalized IMT thunks and
4517         make them work.
4518
4519 2008-11-28  Mark Probst  <mark.probst@gmail.com>
4520
4521         * mini-ppc64.h, tramp-ppc64.c: Make generic code sharing work.
4522
4523 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
4524
4525         * method-to-ir.c, mini-trampolines.c: protect IMG code with #ifdef MONO_ARCH_HAVE_IMT to fix compile errors.
4526         * mini-mips.c: Fixup stackframe assignments after allocation of spillvars.
4527         * mini-mips.h: disable IMT
4528         * tramp-mips.c (mono_arch_get_vcall_slot): fix offset extraction
4529         
4530 2008-11-28  Mark Probst  <mark.probst@gmail.com>
4531
4532         * mini-ppc64.c, mini-ppc64.h: Don't emulate long ops.
4533
4534 2008-11-28  Mark Probst  <mark.probst@gmail.com>
4535
4536         * mini-ppc64.c, exceptions-ppc64.c: Several fixes.
4537
4538 2008-11-28  Zoltan Varga  <vargaz@gmail.com>
4539
4540         * method-to-ir.c (handle_isinst): Use PCONST instead of ICONST for
4541         consistency.
4542
4543 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
4544
4545         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
4546         for Set/GetVector aligned versions.
4547
4548 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
4549
4550         * basic-simd.cs: Add tests for Get/SetVector.
4551
4552 2008-11-27  Mark Probst  <mark.probst@gmail.com>
4553
4554         * mini.c: Removed g_slist_append_mempool().  Now in
4555         metadata/mempool.c.
4556
4557 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
4558
4559         * simd-intrinsics.c (mono_emit_vector_ldelema): Extract the element
4560         size properly and make the bounds check optional.
4561
4562         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
4563         for SetVector and IsAligned.
4564
4565 2008-11-27  Zoltan Varga  <vargaz@gmail.com>
4566
4567         * mini.c: Remove unused mono_normalize_opcodes () function.
4568
4569 2008-11-26  Mark Probst  <mark.probst@gmail.com>
4570
4571         * method-to-ir.c (mini_emit_inst_for_method): Small fix: we're
4572         using the new atomic add ops now.
4573
4574         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Implemented atomic
4575         add.
4576
4577 2008-11-26  Mark Probst  <mark.probst@gmail.com>
4578
4579         * mini-ppc64.c: Several fixes.
4580
4581 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
4582
4583         * cpu-mips.md: added jump_table
4584         * mini-mips.c: added jump_table. Eliminate compare-imm when lowering. Remove dead function.             
4585
4586 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
4587
4588         * mini-mips.c, mini-mips.h, tramp-mips.c, cpu-mips.md: Initial upgrade of MIPS port to new IR.
4589
4590 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
4591
4592         * mini-ops.h: corrected a handful of MIPS opcodes.
4593
4594 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
4595
4596         * aot-compiler.c: MIPS to use ELF writer
4597
4598 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
4599
4600         * mini-codegen.c: remove MIPS specific assert.
4601
4602 2008-11-25  Mark Probst  <mark.probst@gmail.com>
4603
4604         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Several
4605         fixes.  PPC64 now passes most of the runtime regressions.
4606
4607 2008-11-24  Zoltan Varga  <vargaz@gmail.com>
4608
4609         * regalloc2.c: Distinguish between use/def positions. Optimize the creation of
4610         volatile intervals a bit.
4611
4612 2008-11-24  Mark Probst  <mark.probst@gmail.com>
4613
4614         * basic-long.cs: New test case.
4615
4616 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
4617
4618         * mini.c (mini_method_compile): Disable globalra for large methods for 
4619         now.
4620
4621         * regalloc2.c (order_moves): Add fp support.
4622
4623         * branch-opts.c (mono_remove_critical_edges): Split non-critical edges whose
4624         source bblock ends with an OP_BR_REG.
4625
4626         * ratests.cs: Add a new test.
4627
4628 2008-11-23  Mark Probst  <mark.probst@gmail.com>
4629
4630         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c: Disable generic code
4631         sharing.  PPC64 now passes generics.exe.
4632
4633 2008-11-23  Mark Probst  <mark.probst@gmail.com>
4634
4635         * mini-ppc64.c: Several fixes.  PPC64 now runs iltests.exe.
4636
4637 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
4638
4639         * exceptions-x86.c (mono_arch_find_jit_info): Avoid reading uninitialized
4640         memory when mono_jit_info_table_find () can't find the method in the
4641         LMF case.
4642
4643         * aot-compiler.c (mono_save_xdebug_info): Emit complete debug info for
4644         AOTed code too.
4645         
4646         * aot-compiler.c (mono_save_xdebug_info): Make this work with the assembly
4647         writer too.
4648
4649 2008-11-23  Mark Probst  <mark.probst@gmail.com>
4650
4651         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, cpu-ppc64.md:
4652         Several fixes.  PPC64 now runs exceptions.exe and
4653         devirtualization.exe.
4654
4655 2008-11-22  Mark Probst  <mark.probst@gmail.com>
4656
4657         * mini-ppc64.c, tramp-ppc64.c: Small fixes.  PPC64 now runs
4658         arrays.exe and basic-math.exe.
4659
4660 2008-11-22  Mark Probst  <mark.probst@gmail.com>
4661
4662         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c,
4663         cpu-ppc64.md: Several fixes.  PPC64 now runs objects.exe.
4664
4665 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
4666
4667         * simd-intrinsics.c: Add support ArrayExtension intrinsics.
4668
4669 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
4670
4671         * method-to-ir.c: Move bounds checking macros to ir-emit.h
4672
4673         * ir-emit.h: Move macros from method-to-ir.c to here.
4674
4675 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
4676
4677         * mini-ops.h: Correct the long simd ops to use LREG.
4678
4679 2008-11-21  Zoltan Varga  <vargaz@gmail.com>
4680
4681         * mini-ops.h: Correct the dreg type of OP_LOADI8_MEMBASE.
4682         
4683         * mini-ops.h: Correct the dreg type of a few long opcodes.
4684
4685         * mini-amd64.h: Applied patch from Mihai Chelaru <kefren@ngnetworks.ro>.
4686         Add netbsd support.
4687
4688 Fri Nov 21 12:52:23 CET 2008 Paolo Molaro <lupus@ximian.com>
4689
4690         * mini-ppc.c: remove negative stack references in epilog
4691         for platforms that don't support the red zone.
4692
4693 2008-11-21  Mark Probst  <mark.probst@gmail.com>
4694
4695         * mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved floating
4696         point regs.  Now PPC64 passes basic-calls.exe.
4697
4698 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4699
4700         * basic-simd.cs: Add tests for accessors of Vector2l.
4701
4702 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4703
4704         * mini-ops.h: Added OP_INSERTX_I8_SLOW,.
4705
4706         * mini-x86.c (mono_arch_decompose_long_opts): Decompose OP_INSERTX_I8_SLOW.
4707         
4708         * simd-intrinsics.c: Add support for Vector2l and Vector2ul.
4709
4710 2008-11-21  Mark Probst  <mark.probst@gmail.com>
4711
4712         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes.  Now
4713         PPC64 passes basic-long.exe.
4714
4715 2008-11-20  Mark Probst  <mark.probst@gmail.com>
4716
4717         * decompose.c: Decompose carry and overflow add on PPC64 like on
4718         other 64 bit archs.  Don't decompose sub at all on PPC64.
4719
4720         * mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c, cpu-ppc64.md:
4721         Several fixes and new opcodes.  Now PPC64 runs (but doesn't pass)
4722         basic-long.exe.
4723
4724 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4725
4726         * basic-simd.cs: Add tests for accessors of Vector2d.
4727
4728 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4729
4730         * mini-ops.h: Added OP_INSERTX_R8_SLOW,.
4731
4732         * cpu-x86.md: Same.
4733
4734         * mini-x86.c (mono_arch_output_basic_block): Same.
4735         
4736         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector2d.
4737
4738 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4739
4740         * basic-simd.cs: Add tests for accessors of Vector4f.
4741
4742 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4743
4744         * mini-ops.h: Added OP_INSERTX_R4_SLOW,.
4745
4746         * cpu-x86.md: Same.
4747
4748         * mini-x86.c (mono_arch_output_basic_block): Same.
4749         
4750         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4f.
4751
4752 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4753
4754         * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
4755
4756 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4757
4758         * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
4759
4760         * cpu-x86.md: Same.
4761
4762         * mini-x86.c (mono_arch_output_basic_block): Same.
4763         
4764         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
4765
4766 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4767
4768         * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
4769
4770 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4771
4772         * simd-intrinsics.c: Enable setters for Vector16sb.
4773
4774 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4775
4776         * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
4777
4778         * cpu-x86.md: Same.
4779
4780         * mini-x86.c (mono_arch_output_basic_block): Same.
4781         
4782         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
4783
4784 2008-11-19  Rodrigo Kumpera  <rkumpera@novell.com>
4785
4786         * simd-intrinsics.c: Implement setter for Vector8us.
4787
4788 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
4789
4790         * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
4791         for dead variables.
4792
4793 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
4794
4795         * mini-ppc.c: remove references to the red zone in the prolog
4796         (for systems that don't support it).
4797
4798 2008-11-19  Mark Probst  <mark.probst@gmail.com>
4799
4800         * cpu-ppc64.md: Fixed a few instruction lengths.
4801
4802         * mini-ppc64.c: Don't emit SETLRET.  PPC64 passes basic-float.exe,
4803         now.
4804
4805 2008-11-19  Mark Probst  <mark.probst@gmail.com>
4806
4807         * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes.  PPC64 passes
4808         basic.exe now.
4809
4810 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
4811
4812         * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
4813
4814 2008-11-18  Rodrigo Kumpera  <rkumpera@novell.com>
4815
4816         * mini-ops.h: Added OP_INSERT_I2.
4817
4818         * cpu-x86.md: Same.
4819
4820         * mini-x86.c (mono_arch_output_basic_block): Same.
4821         
4822         * simd-intrinsics.c: Implement setter for Vector8s.
4823
4824         * simd-methods.h: Add the names of get setters of Vector8s.
4825
4826 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
4827
4828         * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
4829         
4830         * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
4831         parameters.
4832
4833         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
4834
4835 2008-11-18  Mark Probst  <mark.probst@gmail.com>
4836
4837         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
4838         for PPC64.  An empty program runs now.
4839
4840 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
4841
4842         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
4843
4844         * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
4845         a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
4846         info for JITted code is emitted into a shared library, loadable into gdb.
4847
4848 2008-11-18  Mark Probst  <mark.probst@gmail.com>
4849
4850         * Makefile.am: Changes to build PPC64.
4851
4852         * mini-arch.h: Include mini-ppc64.h on PPC64.
4853
4854 2008-11-18  Mark Probst  <mark.probst@gmail.com>
4855
4856         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
4857         in PPC code up to r119147.
4858
4859 2008-11-18  Mark Probst  <mark.probst@gmail.com>
4860
4861         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
4862         cpu-ppc64.md: Changes for PPC64.
4863
4864         Based on code submitted by andreas.faerber@web.de at
4865         https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
4866         X11/MIT license.
4867
4868 2008-11-18  Mark Probst  <mark.probst@gmail.com>
4869
4870         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
4871         cpu-ppc64.md: Copied from the corresponding PPC files from
4872         r118846.
4873
4874 2008-11-18  Scott Peterson  <lunchtimemama@novell.com>
4875
4876         * mini-ops.h: Added OP_ROUND.
4877
4878         * cpu-x86.md: Added round.
4879
4880         * mini-x86.c: Added support for intrinsicing Math.Round (double).
4881
4882         * basic-math.cs: Added test_0_round to test rounding.
4883
4884         Contributed under MIT/X11 license.
4885
4886 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
4887
4888         * aot-compiler.c : Fix the Winx64 build.
4889
4890         Contributed under MIT/X11 license.
4891
4892 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
4893
4894         * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
4895         in OP_EXTRACT_R8 to avoid possible stack corruption.
4896
4897 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
4898
4899         * mini-ops.h: Added OP_EXTRACT_R8/I8.
4900
4901         * cpu-x86.md: Added extract_r8.
4902
4903         * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
4904         
4905         * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
4906         a couple of OP_EXTRACT_I4.
4907
4908         * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
4909
4910         * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
4911
4912 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
4913
4914         * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
4915         and not 4.1. 
4916
4917 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
4918
4919         * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
4920         trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
4921
4922         * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
4923         are not needed any more.
4924
4925         * mini.h: Remove the unused INS_LIST macros.
4926
4927         * mini.c (mini_method_compile): Remove a disable globalra case which is no
4928         longer needed.
4929
4930         * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
4931         ir-emit.h.
4932
4933         * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
4934         mono_alloc_ireg () instead.
4935
4936         * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
4937         macros.
4938
4939         * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
4940         on amd64.
4941
4942         * aot-runtime.c (load_aot_module): Disable AOT when running under
4943         CAS.
4944
4945         * mini-amd64.h: Change the monitor fastpath defines to check for
4946         !PLATFORM_WIN32 so they work on *bsd too.
4947
4948         * mini.h mini.c mini-hhpa.c: Remove more unused code.
4949
4950         * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
4951
4952         * mini.h (MonoCompile): Remove new_ir flag.
4953
4954         * regalloc.h regalloc.c: Remove unused code.
4955
4956         * cpu-*.md: Remove more unused opcodes.
4957
4958         * simple-cee-ops.h simple-mini-ops.h: Removed.
4959
4960         * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
4961         
4962 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
4963
4964         * aliasing.h: Removed.
4965
4966         * *.c: Remove references to aliasing.h and inssel.h.
4967
4968         * mini.c: Remove additional unused functions.
4969
4970         * mini-ops.h cpu-*.md: Remove unused opcodes.
4971
4972 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
4973
4974         Remove the old JIT code.
4975
4976         * inssel*.brg: Removed.
4977
4978         * ssa.c abcremoval.c aliasing.c: Removed.
4979
4980         * ssa2.c: Renamed to ssa.c.
4981
4982         * abcremoval2.c: Renamed to abcremoval.c.
4983
4984         * *.c: Removed all !cfg->new_ir code.
4985
4986         * mini-<ARCH>.c: Removed mono_arch_call_opcode (), 
4987         mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
4988
4989         * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
4990         
4991 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
4992
4993         * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
4994         to simplify the code and cut back on the number of global symbols in the AOT
4995         file.
4996         
4997         * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
4998
4999 2008-11-15  Zoltan Varga  <vargaz@gmail.com>
5000
5001         * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
5002         with the got/got_info tables.
5003
5004         * mini.h: Bump AOT file format version.
5005         
5006         * unwind.h: New file, contains definitions for stack unwinding.
5007
5008         * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
5009         to cfg->unwind_ops.
5010         
5011         * aot-compiler.c: Generalize the emitting of unwind information to use the
5012         information in cfg->unwind_ops.
5013
5014         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
5015
5016         * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
5017         AOT method frames. Enable writing symbols for methods by default.
5018
5019 2008-11-14  Rodrigo Kumpera  <rkumpera@novell.com>
5020
5021         * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
5022         and make it work with vectors of element sizes 1, 2 and 4.
5023
5024         * simd-intrinsics.c: Enable getter for all vectors with element size
5025         1, 2 or 4.
5026
5027         * simd-methods.h: Add the names of other getters.
5028
5029         * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
5030
5031         * cpu-x86.md: Same.
5032
5033         * mini-x86.c: Same.
5034
5035 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
5036
5037         * mini-ppc.h: portability fix.
5038
5039 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
5040
5041         * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
5042         buggy and will overwrite it.
5043
5044 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
5045
5046         * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
5047         Use it to emit local symbols for all methods so AOTed methods show up with
5048         their full name in gdb/valgrind output.
5049
5050 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
5051
5052         * mini-ppc.c: portability fixes.
5053
5054 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
5055
5056         * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
5057         entries out of the if (!generic_shared...) code so it is always done.
5058         (mono_class_init_trampoline): Do the patching when running under valgrind
5059         too, newer versions of valgrind have no problems with it.
5060
5061 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
5062
5063         * aot-compiler.c (emit_writeout): Rework this to make it easier to add
5064         further sections.
5065
5066 2008-11-13  Mark Probst  <mark.probst@gmail.com>
5067
5068         * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
5069         filters.
5070
5071 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
5072
5073         * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui. 
5074
5075 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
5076
5077         * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
5078
5079         * cpu-x86.md: Same.
5080
5081         * mini-x86.c: Same.
5082
5083         * simd-intrinsics.c: Same.
5084
5085 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
5086
5087         * simd-intrinsics.c: Enable constructor intrinsics for all types.
5088
5089 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
5090
5091         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
5092         to work with more Vector types.
5093
5094 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
5095
5096         * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
5097         store the elemens directly instead of using and intermediate.
5098
5099 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
5100
5101         * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
5102
5103         * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
5104         to preserve %eax for aot plt trampolines.
5105
5106         * aot-compiler.c (compile_method): Don't skip synchronized methods.
5107         (encode_method_ref): Flag synchronized methods so they won't go through
5108         the AOT trampoline.
5109
5110         * aot-compiler.c: Additional work to support AOTing synchronized methods/
5111         wrappers.
5112
5113         * cpu-ia64.md (jmp): Increase max length.
5114
5115 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
5116
5117         * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
5118         open generic classes.
5119
5120         * aot-compiler.c: Enable the ELF writer on ELF platforms.
5121
5122         * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
5123         box+brtrue optimization since it causes test failures on x86.
5124
5125 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
5126
5127         * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
5128
5129         * cpu-x86.md: Same.
5130
5131         * mini-x86.c: Same.
5132
5133         * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
5134         for simd ctor values. 
5135
5136         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
5137         instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
5138
5139 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
5140
5141         * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
5142         LogicalRightShift.
5143
5144         * simd-instrincs.c: Same.
5145
5146         * basic-simd.cs: Same.
5147
5148 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
5149
5150         * ratests.cs: Add more tests.
5151
5152         * regalloc2.c (add_spill_code): Handle more corner cases.
5153
5154 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
5155
5156         * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
5157         (update_liveness): Avoid holes in the liveness ranges of hregs if they are
5158         both the source an destination of an instruction.
5159
5160 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
5161
5162         * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
5163         wapihandles.c: more portability changes.
5164
5165 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
5166
5167         * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
5168         * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
5169         safe to execute in a signal handler and the kernel provides better
5170         the info in /proc/self/smaps. Avoid the assert on sigaction during
5171         cleanup.
5172
5173 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
5174
5175         * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
5176         do the bblock linking hack if it is actually needed.
5177
5178         * Makefile.am (patch-libtool): New helper target to patch libtool to speed
5179         up linking.
5180
5181         * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
5182         crash problem is fixed.
5183
5184         * branch-opts.c (mono_remove_critical_edges): Link up newly added
5185         bblocks.
5186
5187         * mini.c (mini_method_compile): Compute unreachable bblocks properly even
5188         for catch clauses.
5189         (mini_method_compile): Set the starting value of next_vreg to 
5190         MAX_IREGS + MAX_FREGS when using globalra.
5191
5192         * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
5193         filter clauses with BB_EXCEPTION_HANDLER.
5194
5195         * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
5196
5197 2008-11-10  Mark Probst  <mark.probst@gmail.com>
5198
5199         * mini-x86.c (mono_arch_get_argument_info): Don't align argument
5200         space for stdcall.  Fixes regressions on Win32.
5201
5202 2008-11-10  Zoltan Varga  <vargaz@gmail.com>
5203
5204         * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
5205         bblocks.
5206         (linear_scan): Remove an assert which doesn't seem to be needed.
5207
5208         * local-propagation.c (mono_local_deadce): Avoid a call to
5209         MONO_DELETE_INS which would screw up the instruction linking.
5210
5211         * mini.c (mono_decompose_op_imm): Make this work with globalra.
5212
5213         * regalloc2.c: Upgrade to work the current JIT code.
5214
5215 2008-11-09  Zoltan Varga  <vargaz@gmail.com>
5216
5217         * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
5218         case.
5219
5220         * aot-runtime.c: Remove some dead code.
5221
5222         * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
5223         consistency.
5224         (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
5225
5226         * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
5227         trampolines using sscanf since atoi doesn't work on large unsigned values.
5228
5229         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): 
5230         Initialize code_size.
5231
5232 2008-11-08  Mark Probst  <mark.probst@gmail.com>
5233
5234         * method-to-ir.c (mini_emit_inst_for_method): Make
5235         Interlocked.CompareExchange work for Int arguments on 32 bit
5236         archs, as well.
5237
5238 2008-11-07  Mark Probst  <mark.probst@gmail.com>
5239
5240         * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
5241
5242 2008-11-06  Bill Holmes  <billholmes54@gmail.com>
5243
5244         * main.c Fix MSVC build.
5245
5246         Contributed under MIT/X11 license.
5247
5248 2008-11-06  Mark Probst  <mark.probst@gmail.com>
5249
5250         * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
5251         alignment larger than 8 bytes are aligned correctly, too.
5252
5253         * mini.c: Honor the min_align field of MonoClass when laying out
5254         the stack.
5255
5256 2008-11-06  Zoltan Varga  <vargaz@gmail.com>
5257
5258         * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
5259
5260         * aot-compiler.c (emit_plt): Fix a warning.
5261         
5262         * aot-compiler.c: Implement ARM support in the binary writer.
5263
5264 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
5265
5266         * basic-simd.cs: Add test for getter with byref arg.
5267         Fix the naming of a few tests.
5268         Add missing checks to a test.
5269
5270 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
5271
5272         * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
5273
5274         * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
5275         most of the full-aot support for monitor enter/exit trampolines.
5276
5277         * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
5278         enter/exit trampoline creation functions.
5279
5280         * Makefile.am: Fix the generation of buildver.h so it is not invoked during
5281         make dist.
5282
5283 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
5284
5285         * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
5286         incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
5287         implement the needed functionality without adding crap to the runtime.
5288
5289 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
5290
5291         * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
5292         non-x86 builds.
5293
5294         * mini.c (mono_build_date): New global version holding the build date in
5295         string format.
5296         
5297         * Makefile.am (buildver.c): Generate a file containing the build date.
5298
5299         * main.c: Set the build date from the generated file.
5300
5301         * mini.c (mono_get_runtime_build_info): New helper function returning build
5302         information in a string format.
5303         
5304         * driver.c (mono_main): Print the build date in --version.
5305
5306         * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
5307         file when the bind-to-runtime-version option is used.
5308
5309 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
5310
5311         * simd-intrinsics.c: Fix bug when using getters and byref args. 
5312
5313 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
5314
5315         * simd-methods.h: Rename prefetch methods.
5316
5317         * simd-intrinsics.c: Same.      
5318
5319 2008-11-05  Mark Probst  <mark.probst@gmail.com>
5320
5321         * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
5322         sizes.
5323
5324 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
5325
5326         * aot-compiler.c: Use the bundled elf header files instead of depending on
5327         the system one.
5328         
5329         * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
5330         mempool.
5331
5332         * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
5333         on every call.
5334
5335 2008-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
5336
5337         * cpu-x86.md: Add store nta ops.
5338
5339         * mini-ops.h: Same.
5340
5341         * mini-x86.c: Same.
5342
5343         * mini.h: Add an enum for simd prefetch modes.
5344
5345         * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
5346         of store. Use the changed code to support store nta.
5347
5348         * simd-intrinsics.c: Add prefetch ops for all vector types.
5349
5350 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
5351
5352         * aot-compiler.c: Add an option for JIT compiling the methods by multiple 
5353         threads.
5354         
5355         * aot-compiler.c: Use statically allocated buffers for constructing symbol 
5356         names.
5357
5358         * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
5359         trampolines.
5360
5361 2008-11-04  Mark Probst  <mark.probst@gmail.com>
5362
5363         * mini-x86.c: Fixed commit.
5364
5365 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
5366
5367         * aot-compiler.c (emit_plt): Align the plt section only on x86.
5368
5369 2008-11-04  Mark Probst  <mark.probst@gmail.com>
5370
5371         * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
5372         and MONITOR_EXIT, for the ASM fastpaths.
5373
5374         * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
5375         available.
5376
5377         * mini.c, patch-info.h: Signature and patch infos for
5378         Monitor.Enter/Exit trampolines.
5379
5380         * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
5381
5382         * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
5383         Monitor.Enter/Exit ASM fastpath for Linux.
5384
5385 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
5386
5387         * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
5388
5389         * objects.cs: Add a new test.
5390         
5391         * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
5392
5393         * aot-runtime.c (load_method): Run class initialization in the PLT case even
5394         if MONO_LOG_LEVEL is set.
5395
5396         * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
5397
5398         * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
5399
5400         * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
5401         
5402         * aot-compiler.c: Change the relocation code to use virtual addresses instead
5403         of file offsets. Align the sections belonging to the data segment to 
5404         PAGESIZE.
5405
5406 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
5407
5408         * aot-compiler.c: Simplify the elf writer by depending on the definitions in
5409         elf.h. Port it to amd64.
5410
5411 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
5412
5413         * driver.c: Enable SIMD by default.
5414
5415 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
5416
5417         * cpu-x86.md: Add prefetch op.
5418
5419         * mini-ops.h: Same.
5420
5421         * mini-x86.c: Same.
5422
5423         * mini.h: Add an enum for simd prefetch modes.
5424
5425         * simd-methods.h: Add prefetch function names.
5426
5427         * simd-intrinsics.c: Add prefetch ops for all vector types.
5428
5429 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
5430
5431         * aot-compiler.c (emit_bytes): Speed this up a little.
5432
5433 2008-11-02  Zoltan Varga  <vargaz@gmail.com>
5434
5435         * aot-compiler.c: Add JIT time etc. statistics.
5436         
5437         * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
5438
5439         * mini.h (MonoCompile): Add 'got_offset' field.
5440
5441         * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
5442         method_got_offsets array.
5443
5444         * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
5445         wrappers.
5446
5447         * aot-compiler.c (compile_method): Add generic method instances referenced
5448         by the method to the list of methods to be compiled, this is required so if
5449         A<T> references B<T>, and another assembly references A<int>, then it will
5450         also get a copy of B<int>.
5451
5452         * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
5453         when checking for monitor enter/exit.
5454
5455 2008-10-30  Mark Probst  <mark.probst@gmail.com>
5456
5457         * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
5458         for Monitor.Enter and Monitor.Exit if enabled.
5459
5460         * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
5461         Solaris.
5462
5463 2008-10-30  Zoltan Varga  <vargaz@gmail.com>
5464
5465         * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
5466         of an OP_MOVE. Fixes #440046.
5467
5468         * basic-long.cs: Add a new test.
5469
5470 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
5471
5472         * mini.h: Add synchronization note for the managed counter-part.
5473
5474         * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
5475         returns the simd caps of the current cpu.
5476
5477 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
5478
5479         * basic-simd.cs: Remove Console.WriteLine.
5480
5481 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
5482
5483         * basic-simd.cs: New tests for Vector2ul.
5484
5485 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
5486
5487         * simd-intrinsics.c: Add new vector type Vector2ul.
5488
5489 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
5490
5491         * basic-simd.cs: New tests for Vector2l.
5492
5493 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
5494
5495         * cpu-x86.md: Add long version of most packed int ops.
5496
5497         * mini-ops.h: Same.
5498
5499         * mini-x86.h: Same.
5500
5501         * simd-intrinsics.c: Add new vector type Vector2l.
5502
5503 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
5504
5505         * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
5506
5507         * simd-methods.h: Remove SN_op_BitwiseXor.
5508
5509 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
5510
5511         * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
5512         alignment.
5513
5514 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
5515
5516         * basic-simd.cs: Test for Vector2d.
5517
5518         * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
5519         value.
5520
5521 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
5522
5523         * cpu-x86.md: Add double version of all packed float ops.
5524
5525         * mini-ops.h: Same.
5526
5527         * mini-x86.h: Same.
5528
5529         * simd-intrinsics.c: Add new vector type Vector2d.
5530
5531         * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
5532
5533         * simd-methods.h: Add Duplicate.
5534
5535 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
5536
5537         * basic-simd.cs: Test for packing with signed saturation.
5538
5539 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
5540
5541         * aot-compiler.c (add_generic_instances): Add all methods of generic instances
5542         found in the TYPESPEC table.
5543
5544 2008-10-26  Zoltan Varga  <vargaz@gmail.com>
5545
5546         * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
5547         too.
5548
5549         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
5550
5551         * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
5552         instead of the RVA, since the RVA can be changed by tools like the cil 
5553         stripper.
5554
5555         * method-to-ir.c (mono_method_to_ir2): Ditto.
5556
5557         * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
5558         (deserialize_variable): Ditto.
5559
5560 2008-10-25  Martin Baulig  <martin@ximian.com>
5561
5562         * debug-mini.c (write_variable): Use
5563         `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
5564
5565 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
5566
5567         * cpu-x86.md: Add unsigned variants of packd and packw.
5568
5569         * mini-ops.h: Same.
5570
5571         * mini-x86.h: Emit the right instruction for packd and packw.
5572         Add unsigned variants of packd and packw.
5573
5574         * simd-intrinsics.c: Packd and packw were used in place of their
5575         unsigned variants. Change that.
5576         Add intrinsics for (Signed)PackWithSignedSaturation.
5577
5578         * simd-methods.h: Add (Signed)PackWithSignedSaturation.
5579
5580 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
5581
5582         * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
5583
5584 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
5585
5586         * mini-ops.h: Remove dword packed add/sub with saturation ops.
5587
5588         * cpu-x86.md: Remove dword packed add/sub with saturation ops.
5589
5590         * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
5591         sse instructions.
5592
5593         * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
5594
5595 2008-10-24  Mark Probst  <mark.probst@gmail.com>
5596
5597         * method-to-ir.c, mini.c: Special casing for the synchronized
5598         wrapper for the ldtoken+GetTypeFromHandle case.
5599
5600 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
5601
5602         * mini.c (mono_replace_ins): Move this to branch-opts.c.
5603
5604         * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
5605         created/split bblocks.
5606
5607 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
5608
5609         * mini-ops.h: Add packed signed mul high.
5610         
5611         * cpu-x86.md: Same.
5612
5613         * mini-x86.c (mono_arch_output_basic_block): Same.
5614
5615         * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
5616
5617         * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
5618
5619 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
5620
5621         * basic-simd.cs: Tests for Vector16sb.
5622
5623 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
5624
5625         * inssel.brg (stmt): Fix OP_HARD_NOP rule.
5626
5627 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
5628
5629         * mini-ops.h: Add packed signed min, max and compare greater.
5630         
5631         * cpu-x86.md: Same.
5632
5633         * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
5634         saturation.
5635
5636         * simd-methods.h: Add CompareGreaterThan.
5637
5638         * simd-methods.h: Remove CompareEquals.
5639
5640         * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
5641
5642         * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
5643
5644         * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
5645         CompareEqual.
5646
5647 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
5648
5649         * basic-simd.cs: Fix tests due to change in the API.
5650
5651 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
5652
5653         * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
5654
5655 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
5656
5657         * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
5658
5659         * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
5660         inst_offset as this has invalid values for LDADDR.
5661
5662 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
5663
5664         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
5665
5666         * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
5667
5668 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
5669
5670         * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
5671         for accessing field->data.
5672
5673 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
5674
5675         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
5676
5677 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
5678
5679         * simd-methods.h: Add SignedPackWithUnsignedSaturation.
5680
5681         * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
5682
5683 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
5684
5685         * dominators.c (mono_compute_natural_loops): Allocate GList enties
5686         from the cfg mempool.
5687
5688 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
5689
5690         * basic-simd.cs: Tests for new methods in Vector8us.
5691
5692 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
5693
5694         * mini-ops.h: Add multiply and store high.
5695         
5696         * cpu-x86.md: Same.
5697
5698         * mini-x86.c (mono_arch_output_basic_block): Same.
5699
5700         * simd-methods.h: Same.
5701
5702         * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
5703         and CompareEqual.
5704
5705 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
5706
5707         * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
5708         mono_class_setup_vtable ().
5709
5710         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
5711         mono_class_get_vtable_entry () for accessing klass->vtable.
5712
5713         * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
5714
5715         * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
5716         found.
5717
5718         * method-to-ir.c (mono_save_token_info): Don't save references made from
5719         wrappers.
5720
5721         * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
5722         of generic instances.
5723
5724         * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
5725
5726 2008-10-19  Mark Probst  <mark.probst@gmail.com>
5727
5728         * cpu-ppc.md, mini-ppc.c: The length of the code generated for
5729         OP_JMP depends on the method signature.  Calculate it properly.
5730
5731 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
5732         
5733         * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
5734         called directly.
5735
5736         * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
5737         instances.
5738         (emit_extra_methods): Add another table mapping method indexes to 
5739         offsets in the extra_method_info table.
5740
5741         * mini.h: Bump AOT file format version.
5742         
5743         * aot-runtime.c: Merge most of the code from mono_aot_get_method
5744         and mono_aot_get_method_from_token () into one function.
5745
5746 2008-10-19  Mark Probst  <mark.probst@gmail.com>
5747
5748         * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
5749         separate counter.
5750
5751 2008-10-18  Zoltan Varga  <vargaz@gmail.com>
5752
5753         * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
5754         methods.
5755
5756         * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
5757         disable_aot.
5758
5759         * mini.c (mono_patch_info_equal): Compare the generic context as well.
5760
5761         * mini.h: Bump aot file format version.
5762
5763         * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
5764         AOT file can contain native code for methods which are not in the METHOD
5765         table. Generate code for non-sharable generic instances of generic methods
5766         found in the METHODSPEC table.
5767         
5768         * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
5769         encoding generic type handles.
5770
5771         * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
5772         (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
5773
5774         * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
5775         macros + MONO_ADD_INS.
5776
5777         * mini.c (mono_jump_info_token_new2): New function which takes a generic
5778         context as well.
5779
5780         * mini.h (MonoJumpInfoToken): Include fields for a generic context.
5781
5782         * mini.h: Bump aot file format version.
5783
5784         * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
5785
5786 2008-10-17  Mark Probst  <mark.probst@gmail.com>
5787
5788         * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
5789         platforms, with definable stack alignment value.  Set to 16 now
5790         for all platforms.
5791
5792         * mini.c, mini.h, driver.c: Command line option for disabling
5793         stack alignment.
5794
5795 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
5796
5797         * basic-simd.cs: Tests for new methods in Vector4ui.
5798
5799 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
5800
5801         * mini-ops.h: Add packed int shuffle.
5802         
5803         * cpu-x86.md: Same.
5804
5805         * mini-x86.c (mono_arch_output_basic_block): Same.
5806
5807         * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
5808         extract mask, max, min, shuffle.
5809
5810         * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
5811
5812 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
5813
5814         * basic-simd.cs: Tests for new methods in Vector8us.
5815
5816 2008-10-17  Mark Probst  <mark.probst@gmail.com>
5817
5818         * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
5819         RuntimeTypeHandle, not a TypedReference.
5820
5821 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
5822
5823         * simd-intrinsics.c: remove relocations.
5824
5825 2008-10-17  Zoltan Varga  <vargaz@gmail.com>
5826
5827         * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM 
5828         optimizations from the x86 backend.
5829
5830 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
5831
5832         * simd-methods.h, simd-intrinsics.c: debloat method names and
5833         prepare for no relocations.
5834
5835 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
5836
5837         * mini-ops.h: Add packed min/equal and sum of absolute differences.
5838         
5839         * cpu-x86.md: Same.
5840
5841         * mini-x86.c (mono_arch_output_basic_block): Same.
5842
5843         * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
5844         extract mask, max, min and sum of absolute differences.
5845
5846         * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
5847         method name.
5848
5849 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
5850
5851         * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
5852         Renamed one test for consistency.
5853
5854 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
5855
5856         * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
5857         fix to the code that deal with other blocks.
5858
5859 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
5860
5861         * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
5862
5863 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
5864
5865         * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
5866         that deals with vreg interference. Explicitly check for OP_LDADDR to be
5867         able to process the source reg.
5868
5869 2008-10-16  Martin Baulig  <martin@ximian.com>
5870
5871         * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
5872
5873         * inssel.brg: Add `OP_HARD_NOP'.
5874
5875         * mini.h (MonoCompile): Added `keep_cil_nops' flag.
5876
5877         * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
5878         `OP_HARD_NOP' instruction when running inside the debugger.
5879
5880         * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
5881         `OP_HARD_NOP' instruction when running inside the debugger.
5882
5883 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
5884
5885         * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
5886         now works. The issue with the regalloc tripping up no longer
5887         happens.
5888
5889         * simd-intrinsics.c (load_simd_vreg): Same.
5890
5891 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
5892         
5893         * basic-simd.cs: Tests for new Vector8ui methods.
5894
5895 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
5896
5897         * simd-intrinsics.c (get_simd_vreg): Simplify code and test
5898         only for type. This fixes crashes where MonoInst::klass is checked
5899         for ops of type != VTYPE or OBJ.
5900
5901         * simd-intrinsics.c (load_simd_vreg): Same.
5902
5903 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
5904
5905         * mini-ops.h: Add ops for packed shuffle/max/avg and
5906         extract mask.
5907         
5908         * cpu-x86.md: Same.
5909
5910         * mini-x86.c (mono_arch_output_basic_block): Same.
5911
5912         * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
5913         extract mask.
5914
5915         * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
5916         to emit extract mask op.
5917
5918         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
5919         to emit word shuffles.
5920
5921 2008-10-15  Mark Probst  <mark.probst@gmail.com>
5922
5923         * mini.c (mono_allocate_stack_slots_full): Align stack frame to
5924         the largest alignment needed by a variable, but at least
5925         sizeof(gpointer).
5926
5927 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
5928
5929         * basic-simd.cs: Tests for the fixes in the last commit.
5930
5931 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
5932
5933         * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
5934         no longer handles STACK_PTR input.
5935
5936         * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
5937
5938         * simd-intrinsics.c (load_simd_vreg): New function that works like 
5939         get_simd_vreg   but handles STACK_PTR input.
5940
5941         * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
5942         as the input can be an arbitrary pointer.
5943
5944         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
5945         LDADDR local optimization directly otherwise use a store op.
5946
5947 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
5948
5949         * basic-simd.cs: Tests for dup low and dup high.
5950
5951 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
5952
5953         * mini-ops.h: Add dup low and dup high ops.
5954         
5955         * cpu-x86.md: Same.
5956
5957         * mini-x86.c (mono_arch_output_basic_block): Same.
5958
5959         * simd-intrinsics.c (vector4f_intrinsics): Same.
5960
5961 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
5962
5963         * basic-simd.cs: Tests for recently added functionality.
5964
5965 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
5966
5967         * mini-ops.h: Add remaining sse1 fp ops.
5968         
5969         * cpu-x86.md: Add remaining sse1 fp ops.
5970
5971         * mini-x86.c (mono_arch_output_basic_block): Same.
5972
5973         * mini.h: Add enum for simd FP compare conditions.
5974
5975         * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
5976
5977         * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
5978         so the backed can generate the appropriate op.
5979
5980 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
5981         This patch squeese one more byte from the SimdIntrinsc struct.
5982
5983         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
5984         a a shift amount intead of simply or'ing it.
5985
5986         * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
5987
5988         * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
5989         byte so we can have an aditional flags field without increasing struct size.
5990
5991         * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
5992         against the simd_supported_versions bitmask.
5993
5994         * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
5995
5996 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
5997
5998         * mini.c: remove rawbuffer code (the only use here is unsafe because
5999         it takes locks during signal handling and the kernel now provides much
6000         better info in proc/pid/smaps these days).
6001
6002 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
6003
6004         * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
6005         OP_X86_PUSH_OBJ. Fixes #434620.
6006
6007         * objects.cs: Add a test.
6008         
6009 2008-10-12  Rodrigo Kumpera  <rkumpera@novell.com>
6010
6011         * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
6012         that the packuswb/packusdw don't work with unsigned numbers for what
6013         would be negative numbers in signed format.
6014
6015         * cpu-x86.md: Add doubleword forms of many ops and packing ones.
6016         Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
6017
6018         * mini-ops.h: Add doubleword forms of many ops and packing ones.
6019
6020         * mini-x86.c: Emit doubleword forms of many ops and packing ones.
6021
6022         * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
6023
6024         * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
6025
6026         * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
6027         add more ops.
6028
6029         * simd-intrinsics.c (simd_version_name): New function, returns the name of the
6030         version as the enum in mini.h.
6031
6032         * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
6033         for sse3 ops, check the simd_version field if present. This way the code
6034         works with all versions of sse.
6035
6036 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
6037
6038         * simd-intrinsics.c: Fixed intrinsic name typo.
6039
6040         * mini.h: Added missing simd exported function.
6041
6042         * basic-simd.cs: Added tests for Vector4ui.
6043         Fixed broken test for Vector16b.
6044
6045 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
6046
6047         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
6048         the max length to 64.
6049
6050 2008-10-10  Mark Probst  <mark.probst@gmail.com>
6051
6052         * method-to-ir.c: Only do the fast virtual generic method call for
6053         non-wrapper methods.
6054
6055         * mini.h, mini-trampolines.c: The new generic virtual remoting
6056         trampoline handles virtual method calls via the vtable (as done by
6057         the fast virtual generic method calls) to remoting proxies.
6058
6059         * mini.c (mono_jit_create_remoting_trampoline): For generic
6060         methods reate a generic virtual remoting trampoline.
6061
6062         * mini-amd64.h: Enable fast virtual generic method calls again.
6063
6064 2008-10-10  Mark Probst  <mark.probst@gmail.com>
6065
6066         * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
6067         restore registers when doing tail calls.
6068
6069 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
6070
6071         * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
6072         Vector4ui.
6073
6074 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
6075
6076         * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
6077
6078 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
6079
6080         * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
6081
6082 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
6083
6084         * basic-simd.cs: Retrofit for API changes.
6085
6086 2008-10-10  Mark Probst  <mark.probst@gmail.com>
6087
6088         * mini-ppc.c: Handle integer stack arguments for tail calls.
6089
6090 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
6091
6092         * optflags-def.h: Removed sse3 optimization.
6093
6094         * driver.c: Same.
6095
6096         * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
6097         sse3.
6098
6099         * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
6100
6101         * mini.h: Added enumeration with simd versions.
6102
6103         * simd-intrinsics.c (emit_intrinsics): Use the new static var
6104         for detecting SSE3.
6105
6106         * simd-intrinsics.c: Added mono_simd_intrinsics_init.
6107
6108         * mini.c (mini_init): Call mono_simd_intrinsics_init.
6109
6110 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
6111
6112         * basic-simd.cs: Added tests for Vector8u and Vector16u.
6113
6114         * basic-simd.cs: Fixed test naming.
6115
6116 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
6117
6118         * mini-ops.h: Added ops for packed and saturated math, shifts
6119         and packing/unpacking.
6120
6121         * cpu-x86.md: Added descriptors for the above ops.
6122
6123         * mini-x86.c: Added code to emmit the above ops.
6124
6125         * simd-intrinsics.c: Added support for Vector16u and Vector8u.
6126
6127 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
6128
6129         * aot-compiler.c (compile_method): Enable AOT for generic code.
6130
6131         * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
6132
6133 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
6134
6135         * mini.c: add a workaround for a common screwup that ends up blamed
6136         to mono (other processes blocking signal delivery).
6137
6138 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
6139
6140         * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
6141         in the LDFLD/STFLD opcodes. Fixes #432673.
6142
6143         * iltests.il.in: Add a new test.
6144
6145 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
6146
6147         * mini-arm.c: attach the thread in unmanaged->managed transitions
6148         using delegates (bug #433148).
6149
6150 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
6151
6152        * basic-simd.cs: Use new ShuffleSel constants.
6153
6154 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
6155
6156         * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
6157
6158         * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
6159         only disable simd intrinsics if no sse2 is detected.
6160
6161         * optflags-def.h: Added sse3.
6162
6163         * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
6164         is disabled.
6165
6166 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
6167
6168         * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
6169         when adding delegate-invoke wrappers.
6170
6171 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
6172
6173         * Makefile.am: Reenable the simd tests.
6174
6175 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
6176
6177         * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
6178           add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
6179           other vreg is allocated to that hreg.
6180
6181         Contributed under MIT/X11 license.
6182
6183 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
6184
6185         * Makefile.am: Disable the simd tests for now as Mono.Simd is not
6186         yet checked in.
6187
6188 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
6189
6190         * basic-simd.cs: New test suite for SIMD intrinsics.
6191
6192         * Makefile.am: Added new tests.
6193
6194 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
6195
6196         * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
6197
6198         * mini-ops.h: Same.
6199
6200         * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
6201
6202         * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
6203         using SSE2 aware opcodes.
6204
6205         * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
6206         is enabled, this code path is only reachable if conversion ops are emmited after
6207         mono_method_to_ir.
6208
6209         * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
6210
6211         This optimization saves 6 bytes per conversion against the old version.
6212
6213 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
6214
6215         * aot-compiler.c (compile_method): Don't skip methods referencing 
6216         generic methods without a corresponding entry in token_info_hash, since
6217         encode_method_ref () can handle all generic methods now.
6218
6219         * method-to-ir.c (mono_save_token_info): Don't save the token info if a 
6220         generic context is set.
6221         
6222         * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
6223         generic sharing of LDTOKEN.
6224
6225 2008-10-06  Mark Probst  <mark.probst@gmail.com>
6226
6227         * mini-amd64.h: Temporarily disabled fast virtual generic method
6228         calls because it breaks the System.Runtime.Remoting tests.
6229
6230 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
6231
6232         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
6233
6234         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
6235         so inlining actually works.
6236         (check_inline_caller_method_name_limit): Ditto.
6237
6238 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
6239
6240         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
6241         64 bit safety (from Olaf Hering and Andreas Farber).
6242
6243 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
6244         
6245         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
6246         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
6247         unused virtual call support code.
6248
6249         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
6250         
6251         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
6252         which can't use aot trampolines.
6253         (decode_patch): Don't create aot trampolines for methods which can't use
6254         them.
6255
6256         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
6257         use aot trampolines.
6258
6259         * mini.h: Bump AOT image format version.
6260         
6261 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
6262
6263         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
6264         to save_token_info () since cmethod is inflated for constrained calls.
6265
6266         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
6267
6268 2008-10-04  Andreas Farber  <andreas.faerber@web.de>
6269
6270         * Makefile.am: Add build rules for ppc64.
6271         This avoids the build failing at pedump with unresolved symbols
6272         due to lack of arch_sources. Instead it will now fail earlier
6273         due to lack of cpu-ppc64.md.
6274
6275         Contributed under MIT/X11 license.
6276
6277 2008-10-04  Mark Probst  <mark.probst@gmail.com>
6278
6279         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
6280         tail calls.
6281
6282         * iltests.il.in: Add test case for tail call with many arguments.
6283
6284 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
6285
6286         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
6287         to the fast virtual generic method code until the aot case is fixed.
6288
6289 2008-10-03  Mark Probst  <mark.probst@gmail.com>
6290
6291         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
6292
6293 2008-10-03  Mark Probst  <mark.probst@gmail.com>
6294
6295         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
6296         thunks.
6297
6298 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
6299         
6300         * simd-intrinsics.c: Forgot to add this one.
6301
6302         * mini-codegen.c: Fix macro in case SIMD is not supported.
6303
6304 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
6305         
6306         This patch land initial JIT support for simd intrinsics.
6307
6308         * mini-x86.h: Added new define to make --enable_minimal work on x86.
6309
6310         * Makefile.am: Added simd-intrinsics.c
6311
6312         * simd-intrinsics.c: New file with simd instrinsic related
6313         code.
6314
6315         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
6316
6317         * cpu-x86.md: Add simd related instructions.
6318
6319         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
6320
6321         * driver.c: Added two new --regression variants.
6322
6323         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
6324
6325         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
6326
6327         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
6328         extract some complicated logic to helper functions.
6329
6330         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
6331
6332         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
6333
6334         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
6335         the specialized simplification pass.
6336
6337         * method-to-ir.c (mono_spill_global_vars): Use new macro.
6338
6339         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
6340
6341         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
6342         table.
6343
6344         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
6345         if MONO_ARCH_NEED_SIMD_BANK is defined.
6346
6347         * mini-ops.h: Added the new simd ops.
6348
6349         * mini-x86.c: Added mono_arch_xregname.
6350
6351         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
6352
6353         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
6354
6355         * mini-x86.h: Define simd related MONO_ARCH macros.
6356
6357         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
6358
6359         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
6360
6361         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
6362         MONO_CLASS_IS_SIMD to deal with simd related IR.
6363
6364         * mini.h (MonoInst): Added spill_var to the backend union.
6365
6366         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
6367
6368         * mini.h: Added forward declarations of the new simd fuctions.
6369
6370         * optflags-def.h: Added new optimization names SIMD.
6371
6372         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
6373
6374         * regalloc.h: Added support for working with 3 register banks.
6375
6376         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
6377
6378         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
6379
6380 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
6381
6382         * mini-exceptions.c: remove 64 bit related ifdef clutter.
6383
6384 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
6385
6386         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
6387         instead of one on 64 bit systems.
6388
6389         * method-to-ir.c: Remove unused includes.
6390
6391 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
6392
6393         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
6394         cfg->used_int_regs, since the two are different on arm.
6395
6396 2008-10-02  Mark Probst  <mark.probst@gmail.com>
6397
6398         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
6399         mono_method_get_vtable_index() to get the vtable index.
6400
6401 2008-10-02  Mark Probst  <mark.probst@gmail.com>
6402
6403         * method-to-ir.c (mono_method_to_ir2): Don't create native
6404         wrappers for array methods, because they're never called (and if
6405         they were called they wouldn't work).
6406
6407 2008-10-02  Mark Probst  <mark.probst@gmail.com>
6408
6409         * method-to-ir.c (mono_method_to_ir2): Array methods are
6410         special-cased and must not be invoked indirectly via the (M)RGCTX
6411         when generic sharing is turned on.  Fixes #431413.
6412
6413 2008-10-01  Mark Probst  <mark.probst@gmail.com>
6414
6415         * method-to-ir.c: When generic sharing is active, call
6416         non-interface virtual generic methods via the standard trampoline.
6417
6418         * mini-trampolines.c: Handle virtual generic shared methods.
6419
6420         * mini.h, mini-x86.c, mini-x86.h: New argument for
6421         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
6422         method thunks and which is the trampoline to call if the lookup
6423         fails.  Enable the virtual generic method thunk for x86.
6424
6425         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
6426         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
6427         argument but assert that it's NULL, because these archs don't yet
6428         implement the virtual generic method thunk.  Changes in the IMT
6429         thunk data structures.
6430
6431 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
6432
6433         * aot-compiler.c (emit_globals): Avoid invalid characters in
6434         the static linking symbol.
6435
6436         * objects.cs: Add a test for the range check optimization. Fix warnings.
6437
6438         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
6439         optimization from the current JIT.
6440
6441         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
6442         later in decompose_array_access_opts () to allow more optimizations.
6443
6444         * method-to-ir.c (mono_handle_soft_float): Rename this to 
6445         mono_decompose_soft_float () for consistency.
6446
6447         * mini-ops.h: Fix arguments of OP_STRLEN.
6448
6449         * method-to-ir.c (save_cast_details): Extract the cast details saving code
6450         into a separate function.
6451         (reset_cast_details): Ditto.
6452         (handle_unbox): Save cast details. Fixes #431254.
6453
6454         * method-to-ir.c: Remove some obsolete FIXMEs.
6455
6456 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
6457
6458         * ir-emit.h (alloc_dreg): Write a warning before crashing.
6459
6460 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
6461
6462         * mini-codegen.c: More work on macros to make them
6463         ready for multiple regbanks.
6464
6465 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
6466
6467         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
6468
6469         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
6470
6471 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
6472
6473         * mini-codegen.c (mono_spillvar_offset): Proper support for
6474         multiple regbanks.
6475
6476 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
6477
6478         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
6479         the stack overflow changes.
6480
6481 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
6482
6483         * mini-codegen.c: Make all bank macros depend on reg_bank.
6484
6485         * mini-codegen.c (mono_local_regalloc): Make free mask
6486         initialization regbank aware.
6487
6488 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
6489
6490         * mini-codegen.c (mono_local_regalloc): Extract callee
6491         mask selection to a function and make it regbank aware.
6492
6493 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
6494
6495         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
6496         code to deal with many regbanks.
6497
6498 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
6499
6500         * mini-codegen.c: More fp->regbank changes.
6501
6502 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
6503
6504         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
6505         of a hardcoded constant.
6506
6507 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
6508
6509         * method-to-ir.c (type_from_stack_type): Fix typo.
6510
6511 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
6512
6513         * mini-ia64.c (emit_move_return_value): Convert float return values to
6514         double.
6515
6516         * objects.cs: Add a new test.
6517         
6518         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
6519         VARARG methods to fix an assert later.
6520
6521         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
6522         end so it at least compiles.
6523
6524 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
6525
6526         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
6527
6528 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
6529
6530         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
6531         optimization to a new function (emit_optimized_ldloca_ir) and enable
6532         it for both ldloca and ldloca_s.
6533
6534 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
6535
6536         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
6537         gshared CASTCLASS code.
6538
6539         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
6540         amd64, where the libc stack unwinder encounters stack frames referring to
6541         native code in unmapped memory.
6542
6543         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
6544         sharing.
6545
6546         * generics.cs: Add new test.
6547
6548 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
6549
6550         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
6551         add a check that one of the ARM_FPU_ constants is defined.
6552
6553         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
6554         
6555         * mini-exceptions.c: Fix build on non-altstack platforms.
6556
6557         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
6558         sharing of vtypes.
6559
6560         * ir-emit.h: Add a comment to NEW_PCONST.
6561
6562         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
6563
6564         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
6565
6566         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
6567         after the changes to MonoJitDomainInfo.
6568
6569 2008-09-27  Mark Probst  <mark.probst@gmail.com>
6570
6571         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
6572
6573 2008-09-27  Mark Probst  <mark.probst@gmail.com>
6574
6575         * mini-ppc.c: Compiler warning fixes.
6576
6577 2008-09-27  Mark Probst  <mark.probst@gmail.com>
6578
6579         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
6580         for pinvokes.
6581
6582 2008-09-27  Mark Probst  <mark.probst@gmail.com>
6583
6584         * exceptions-ppc.c, mini-ppc.h: Compile
6585         mono_arch_handle_altstack_exception() on Darwin, too.
6586
6587 2008-09-27  Mark Probst  <mark.probst@gmail.com>
6588
6589         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
6590         work on archs which don't have generic sharing implemented, only
6591         without the vtable_arg.
6592
6593 2008-09-26  Mark Probst  <mark.probst@gmail.com>
6594
6595         * mini.c: Added comment explaining why delegate ctor icall
6596         wrappers are compiled.
6597
6598 2008-09-26  Mark Probst  <mark.probst@gmail.com>
6599
6600         * mini.c: Don't produce trampolines to delegate ctor icall
6601         wrappers but compile them upfront.
6602
6603 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
6604
6605         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
6606         runtime-set function when going back to managed code. Currently this
6607         is used to set back the protection on the soft ovf pages and/or to
6608         throw the stack overflow exception that happened in unmanaged code.
6609
6610 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
6611
6612         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
6613         runtime-set function when going back to managed code. Currently this
6614         is used to set back the protection on the soft ovf pages and/or to
6615         throw the stack overflow exception that happened in unmanaged code.
6616
6617 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
6618
6619         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
6620         the support code for restoring stack protection after stack overflows
6621         that happen in unmanaged code. Don't set the exec permission on the
6622         soft overflow area.
6623
6624 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
6625
6626         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
6627         delegate->method_ptr is set. Fixes #428054.
6628
6629 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
6630
6631         * tests.cs: Rename to ratests.cs.
6632
6633         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
6634         emit_get_rgctx_... functions.
6635
6636 2008-09-25  Mark Probst  <mark.probst@gmail.com>
6637
6638         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
6639
6640 2008-09-25  Mark Probst  <mark.probst@gmail.com>
6641
6642         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
6643         before asserting that method is sharable.
6644
6645 2008-09-25  Mark Probst  <mark.probst@gmail.com>
6646
6647         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
6648         whether method needs a static RGCTX wrapper used instead of
6649         complex conditions.
6650
6651         * generic-sharing.c, mini.h: A few functions moved to
6652         metadata/generic-sharing.c.
6653
6654 2008-09-25  Mark Probst  <mark.probst@gmail.com>
6655
6656         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
6657         Generic code sharing for value types, which essentially means
6658         treating value type methods like static methods.  The RGCTX is
6659         passed in the same way.
6660
6661 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
6662
6663         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
6664         opcode when creating multi-dimensional arrays of open types.
6665
6666         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
6667         open generic types.
6668
6669         * generics.cs: Add a test.
6670
6671         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
6672
6673 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
6674
6675         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
6676
6677         * mini.c (mini_method_compile): Set it when running under the debugger. 
6678
6679         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
6680         vreg optimization if the flag is set.
6681
6682         * driver.c (mono_main): Add --attach= option to pass options to
6683         the attach agent.
6684
6685         * mini.c (sigquit_signal_handler): Start the attach agent.
6686
6687         * ssapre.c: Disable this to save space since it is not yet ported to
6688         linear IR.
6689
6690         * regalloc2.c: Disable this to save space.
6691
6692         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
6693
6694 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
6695
6696         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
6697         the -v option useful again.
6698
6699 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
6700
6701         * mini-amd64.c (mono_arch_output_basic_block): Add support for
6702         --break-at-bb.
6703
6704         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
6705         arrays of arrays. Fixes #428406.
6706
6707         * method-to-ir.c (mini_emit_castclass): Ditto.
6708
6709         * objects.cs: Add new test.
6710         
6711 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
6712
6713         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
6714         was wrong at it choked against target_type_is_incompatible for byref types.
6715
6716 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
6717
6718         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
6719         places.
6720
6721 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
6722
6723         * mini-exceptions.c: update a few more exceptions-related counters.
6724
6725 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
6726
6727         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
6728         new functions to allocate from persistent mempools.
6729
6730 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
6731
6732         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
6733         multiple register banks in the future.
6734
6735         * mini-codegen.c (mono_local_regalloc): Fix a warning.
6736
6737 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
6738
6739         * mini.c (type_to_eval_stack_type): Remove duplicated function.
6740
6741         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
6742
6743         * mini.h: Export type_to_eval_stack_type.
6744
6745         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
6746         is only ins->klass of byref types.
6747
6748 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
6749
6750         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
6751         (mini_emit_memcpy2): Ditto.
6752
6753         * mini-amd64.c: Fix a warning.
6754
6755 2008-09-21  Mark Probst  <mark.probst@gmail.com>
6756
6757         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
6758         linking.
6759
6760 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
6761
6762         * method-to-ir.c: Extract stloc micro-optimization to a
6763         function and apply it to all cases.
6764
6765 2008-09-19  Mark Probst  <mark.probst@gmail.com>
6766
6767         * method-to-ir.c: Don't fail generic code sharing in cases we
6768         already support.
6769
6770 2008-09-18  Mark Probst  <mark.probst@gmail.com>
6771
6772         * mini-ppc.c: Handle structs in tailcalls on Darwin.
6773
6774 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
6775
6776         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
6777         implementation.
6778
6779 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
6780
6781         * trace.c: make tracing more useful and correct, with per-thread
6782         id and indent info.
6783
6784 2008-09-15  Mark Probst  <mark.probst@gmail.com>
6785
6786         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
6787         doing a method call and the argument is an R4.
6788
6789 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
6790
6791         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
6792         generic methods.
6793
6794 2008-09-13  Mark Probst  <mark.probst@gmail.com>
6795
6796         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
6797
6798 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
6799
6800         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
6801         (MONO_JUMP_TABLE_FROM_INS): Ditto.
6802
6803 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
6804
6805         * driver.c: Add a --agent argument (not supported yet) to load managed
6806         agent assemblies before loading the main assembly, similarly to how the
6807         Java VM handles agents.
6808
6809 2008-09-11  Mark Probst  <mark.probst@gmail.com>
6810
6811         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
6812         function to do stack layout of local variables.
6813
6814 2008-09-11  Mark Probst  <mark.probst@gmail.com>
6815
6816         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
6817         calculation.
6818
6819 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
6820
6821         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
6822         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
6823         JIT if DISABLE_JIT is defined.
6824
6825         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
6826         defined.
6827
6828 2008-09-10  Mark Probst  <mark.probst@gmail.com>
6829
6830         * iltests.il.in: Disable the fconv test on PPC (the result is
6831         undefined according to ECMA).
6832
6833 2008-09-10  Mark Probst  <mark.probst@gmail.com>
6834
6835         * iltests.il.in: Enable tail call tests for PPC.
6836
6837         * mini.h: Add variable for storing incoming valuetype argument
6838         addresses for tail calls.
6839
6840         * mini-ppc.c: Implement valuetype arguments and return values for
6841         tailcalls on Linux.
6842
6843 2008-09-09  Mark Probst  <mark.probst@gmail.com>
6844
6845         * mini-ppc.c: Partially implement tail calls (struct arguments and
6846         return values not supported).
6847
6848         * method-to-ir.c: Enable tail calls on PPC.
6849
6850 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
6851
6852         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
6853         runtime-invoke wrappers to work around the problem of them getting
6854         assigned to a random class.
6855
6856         * aot-runtime.c (mono_aot_get_method): Ditto.
6857         
6858 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
6859
6860         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
6861         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
6862
6863 2008-09-07  Mark Probst  <mark.probst@gmail.com>
6864
6865         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
6866         until they're implemented properly.
6867
6868         * exceptions-ppc.c: Use arch-independent exception-handling code
6869         instead of custom one.
6870
6871         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
6872         for Linear IR.
6873
6874         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
6875
6876         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
6877         applies when __powerpc__ is defined.
6878
6879 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
6880
6881         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
6882         methods to their code to avoid computing the full name of wrappers and
6883         doing a lookup in a string hash table.
6884
6885 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
6886
6887         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
6888         we identify bblocks before method_to_ir () is ran.
6889
6890         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
6891         Also avoid optimizing branches pointing to themselves.
6892
6893         * mini.c (mini_method_compile): Ditto. Fixes #422947.
6894
6895 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
6896
6897         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
6898
6899 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
6900
6901         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
6902         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
6903         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
6904         'buf'.
6905
6906         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
6907         jumped to the same entry in plt_jump_table.
6908
6909 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
6910
6911         * method-to-ir.c (initialize_array_data): Handle field with RVA from
6912         dynamic images.
6913
6914 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
6915
6916         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
6917         other assignment can be if converted. Saves 1.5% on corlib size and fixes
6918         #421807.
6919
6920 2008-08-29  Geoff Norton  <gnorton@novell.com>
6921
6922         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
6923         segment, and doesn't properly handle .space as .text.  Fixes
6924         AOT Mach/ARM
6925
6926 2008-08-29  Geoff Norton  <gnorton@novell.com>
6927
6928         * mini.c: Disable the mach exception handler when running on 
6929         ARM
6930
6931 2008-08-29  Geoff Norton  <gnorton@novell.com>
6932
6933         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
6934         globals on Darwin/ARM
6935
6936 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
6937
6938         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
6939         since too many things depend on it. Instead, call 
6940         mono_runtime_set_no_exec ().
6941         
6942         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
6943         the new JIT.
6944
6945         * aot-compiler.c: Add an 'asm-only' AOT option.
6946
6947         * mini.c: Avoid initializing the runtime when doing AOT compilation.
6948                 
6949         * aot-compiler.c (compile_method): Disable gshared support for now as it
6950         doesn't yet work.
6951
6952 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
6953
6954         * mini-amd64.h : Fix a compiler warning.
6955
6956         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
6957           Changed to use a callback function to retrieve the unwind info.
6958           This avoids problems observed when code blocks were removed by
6959           unloading an app domain.
6960
6961         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
6962           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
6963           to work properly.
6964
6965         Contributed under MIT/X11 license.
6966
6967 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
6968
6969         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
6970           case to keep the stack aligned to 8.
6971
6972         Contributed under MIT/X11 license.
6973
6974 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
6975
6976         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
6977         avoid repeated linear searches.
6978
6979 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
6980
6981         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
6982         methods it can't handle.
6983         
6984         * aot-compiler.c (add_method): Avoid adding a method twice.
6985         (add_wrappers): Add runtime invoke wrappers for all methods.
6986
6987         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
6988         function to create an aot-compatible version of this trampoline.
6989
6990         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
6991
6992 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
6993
6994         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
6995
6996         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
6997         with a generic sharing failure.
6998
6999         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
7000
7001         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
7002         CEE_RETHROW. Fixes #419634.
7003
7004         * mini.c (mono_method_to_ir): Ditto.
7005
7006         * exceptions.cs: Add a new test.
7007         
7008         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
7009         to mono_type_stack_size_internal () since some callers might not pass in
7010         an rgctx.
7011
7012         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
7013         instrument_prolog. Fixes #419878.
7014
7015         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
7016         doubles in soft float mode volatile.
7017
7018 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
7019
7020         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
7021
7022         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
7023         to handle soft float correctly.
7024
7025         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
7026         the fast path.
7027
7028         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
7029
7030         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
7031         to sp, since the generics catch code requires it.
7032
7033         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
7034         copying.
7035
7036         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
7037         mono_arch_emit_imt_argument ().
7038
7039         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
7040
7041         * mini-arm.c tramp-arm.c: Generic sharing updates.
7042
7043 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
7044
7045         * mini-arm.c: Fix the arm build.
7046
7047         * generic-sharing.c (mini_type_get_underlying_type): New helper function
7048         handling enums, generic instances and generic sharing.
7049         (mini_type_stack_size_full): Ditto.
7050
7051         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
7052         
7053         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
7054
7055         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
7056
7057         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
7058         trampolines.
7059
7060         * mini-arm.c: Various small generic sharing changes.
7061
7062         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
7063         this for x86.
7064         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
7065         custom code.
7066
7067         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
7068         helper function to return a generic class init trampoline.
7069
7070         * method-to-ir.c mini.c: Use it.
7071         
7072         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
7073         arch-specfic function to return a generic class init trampoline.
7074
7075         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
7076         the GENERIC_CLASS_INIT custom code.
7077
7078         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
7079         a fatal error, not a sharing failure.
7080
7081         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
7082         needed.
7083
7084         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
7085         trampoline argument from MONO_ARCH_VTABLE_REG.
7086
7087         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
7088         order of the arguments to the C trampoline: pass 'slot' as the trampoline
7089         argument, and pass the vtable in VTABLE_REG.
7090
7091         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
7092         order of the arguments to the C trampoline: pass 'slot' as the trampoline
7093         argument, and pass the vtable in VTABLE_REG.
7094         (mono_arch_create_trampoline_code_full): Remove some special casing for
7095         the rgctx fetch trampoline.
7096
7097         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
7098         Fixes #419273.
7099
7100         * iltests.il: Add a test for it.
7101
7102 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
7103
7104         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
7105
7106         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
7107         no longer needed.
7108
7109         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
7110         use mono_jit_info_table_find () to avoid recursion.
7111         (mono_delegate_trampoline): Add a sync wrapper here.
7112
7113         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
7114         here.
7115
7116         * mini.c (mono_method_to_ir): Ditto.
7117         
7118         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
7119         add_sync_wrapper argument. Don't add a sync wrapper here.
7120         (mono_create_jump_trampoline): Don't add a sync wrapper here.
7121
7122         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
7123         
7124 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
7125
7126         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
7127           of nonvolatile registers back from MonoContext to CONTEXT.
7128
7129         Contributed under MIT/X11 license.
7130
7131 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
7132
7133         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
7134           arguments on Winx64 there are only 4 argument registers.  For this
7135           logic to work the last argument must be pulled from the stack.  
7136
7137         Contributed under MIT/X11 license.
7138
7139 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
7140
7141         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
7142
7143         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
7144         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
7145         encode/decode_method_ref ().
7146
7147         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
7148
7149         * aot-runtime.c (decode_patch): Ditto.  
7150
7151         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
7152         MONO_PATCH_INFO_METHOD.
7153
7154         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
7155         MonoGenericJitInfo.
7156
7157         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
7158         MonoGenericJitInfo.
7159
7160         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
7161
7162         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
7163         one from the caller.
7164
7165         * aot-runtime.c (decode_generic_inst): New function to decode and
7166         return a interned generic inst.
7167         (decode_klass_ref): Use it.
7168         (decode_method_ref): Ditto.
7169
7170         * aot-compiler.c (emit_exception_debug_info): Save 
7171         jinfo->has_generic_jit_info too.
7172
7173 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
7174
7175         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
7176
7177         * iltests.il.in: Add a test for fconv_to_i.
7178
7179         * liveness.c: Disable the liveness2 pass for now to save space.
7180
7181         * regalloc2.c: Include mempool-internals.h to fix warnings.
7182
7183         * aot-compiler.c (encode_method_ref): Encode the context of generic
7184         instance methods.
7185
7186         * aot-runtime.c (decode_method_ref): Inflate generic methods using
7187         the context saved in the aot file.
7188
7189         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
7190
7191         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
7192
7193         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
7194         volatile so they won't be optimized away.
7195
7196 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
7197
7198         * ssa.c:
7199         * ssa2.c:
7200         * mini.c:
7201         * regalloc2.c:
7202         * dominators.c: Remove duplicated functions that now are in
7203         mempool-internals.h.
7204
7205 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
7206
7207         * aot-compiler.c: Fix warnings.
7208
7209         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
7210
7211         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
7212
7213         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
7214         as the patch type.
7215
7216         * mini.c (mono_resolve_patch_target): Ditto.
7217         
7218         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
7219         (encode_klass_ref): Add support for encoding VARs/MVARs.
7220
7221         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
7222
7223         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
7224         the handling of the got entries into a separate 'decode_got_entry' function.
7225         Add support for RGCTX_FETCH.
7226
7227         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
7228         clobbered by the trampoline code.
7229
7230         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
7231         not clobbered by the indirect calling code.
7232
7233 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
7234
7235         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
7236         to fix the build.
7237
7238 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
7239
7240         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
7241         signature using the compilation mempool otherwise we would leak it.
7242
7243 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
7244
7245         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
7246         mono_emit_abs_call ().
7247
7248         * patch-info.h: Add GENERIC_CLASS_INIT.
7249
7250         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
7251
7252         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
7253         as their target as a near call.
7254
7255         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
7256         ABS handling code.
7257         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
7258
7259         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
7260         call to a runtime function described by a patch.
7261
7262         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
7263         mono_emit_abs_call, this has the advantage that the ABS handling code in
7264         mono_codegen () can handle them both, and can handle other stuff in the
7265         future without additional code.
7266
7267         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
7268         entry.
7269         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
7270         abs addresses.
7271
7272         * mini.h: Add missing bblock related prototypes.
7273
7274         * mini.h (MonoCompile): Remove unused reverse_inst_list and
7275         reverse_inst_list_len fields.
7276
7277         * mini.c: Refactor this file a bit by moving branch optimizations to 
7278         branch-opts.c.
7279
7280         * method-to-ir.c: Merge generic sharing changes missed earlier.
7281
7282         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
7283
7284         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
7285         shared patches. Process METHODCONST as a shared patch.
7286
7287         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
7288         as it crashes on the 2.0 mscorlib.
7289
7290         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
7291         to cause crashes.
7292         
7293         * aot-compiler.c: Use is_plt_patch () in a few additional places.
7294         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
7295         by IMT.
7296
7297         * aot-compiler.c: Reorganize the got handling code to be a bit more
7298         understandable.
7299
7300 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
7301
7302         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
7303         mono_patch_info_equals/hash, and use it to massively simplify
7304         get_plt_index ().
7305
7306         * mini.c (mono_patch_info_hash): Simplify this and add support for
7307         more patch types.
7308
7309         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
7310
7311         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
7312         handling code, since an offset is not enough to identify a trampoline.
7313
7314         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
7315
7316 2008-08-17  Mark Probst  <mark.probst@gmail.com>
7317
7318         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
7319
7320         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
7321
7322         * mini-ops.h: Argument and result types for OVF_CARRY ops.
7323
7324         * decompose.c: PPC decompositions for various ops.
7325
7326         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
7327
7328 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
7329
7330         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
7331         call the generic trampoline code using a call, instead of a jump, to
7332         remove some special casing from the generic trampoline code.
7333
7334         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
7335         (mono_codegen): Ditto.
7336
7337         * aot-compiler.c aot-runtime.c: Ditto.
7338
7339         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
7340
7341         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
7342         helper function to find the offset corresponding to a lazy fetch trampoline.
7343
7344         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
7345         when doing generic sharing.
7346
7347         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
7348         places.
7349         
7350         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
7351         mini-trampolines.c to be with the other trampoline creation functions.
7352
7353         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
7354         as it is equal to method->signature in most cases, add a 
7355         mono_emit_method_call_full variant which takes a signature and an imt
7356         argument as well.
7357
7358 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
7359
7360         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
7361         to this function, since it could be computed easily from the method 
7362         argument.
7363         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
7364         more.
7365
7366         * method-to-ir.c mini.c: Remove references to 
7367         compile_generic_method_wo_context.
7368
7369         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
7370         generic method calls.
7371         
7372         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
7373         dimensional non-szarrays.
7374
7375         * mini.c (mini_init): Register mono_array_new_1.
7376
7377         * jit-icalls.c (mono_array_new_1): New jit icall.
7378
7379         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
7380         pointing to the method.
7381
7382         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
7383         method addresses belonging to METHOD_JUMP patches in the 
7384         jump_target_got_slot_hash.
7385         (mono_aot_load_method): Ditto.
7386
7387         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
7388         METHOD_JUMP patches.
7389
7390         * mini.c (mini_create_jit_domain_info): New helper function which 
7391         initializes/frees domain->runtime_info.
7392         (mini_free_jit_domain_info): Ditto.
7393         (mini_init): Install the domain hook functions with the runtime.
7394
7395         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
7396         information maintained by the JIT.
7397
7398         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
7399         insertion into jump_table_hash into mono_codegen (), also implement proper
7400         locking.
7401
7402         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
7403         tail calls, it is already done by the aot code.
7404         
7405         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
7406         mechanism on amd64.
7407
7408         * iltests.il.in: Make the jmp test a bit more complex.
7409
7410         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
7411         generic instances which doesn't have a token.
7412
7413         * aot-runtime.c (decode_method_ref): Ditto.
7414         
7415         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
7416         can handle this case now.
7417         (handle_box): Ditto.
7418
7419 2008-08-15  Geoff Norton  <gnorton@novell.com>
7420
7421         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
7422         debugging check.
7423
7424 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
7425
7426         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
7427         calling generic methods.
7428
7429         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
7430
7431         * aot-runtime.c (decode_patch_info): Ditto.
7432
7433         * mini.c (mono_resolve_patch_target): Ditto.
7434         
7435         * patch-info.h: Add METHOD_RGCTX.
7436
7437         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
7438
7439 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
7440
7441         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
7442         arguments in registers.
7443
7444         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
7445         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
7446
7447         * mini.c (mini_method_compile): Abort aot compilation for generic
7448         methods if generic sharing is disabled.
7449         
7450         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
7451         an mrgctx.
7452
7453         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
7454         requiring an mrgctx.
7455
7456         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
7457         store instructions when converting a vcall to a normal call.
7458
7459         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
7460         mono_arch_find_jit_info.
7461
7462 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
7463
7464         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
7465         avoid calling mono_method_full_name () for every method even if the
7466         env var is not set.
7467         (check_inline_caller_method_name_limit): Ditto.
7468
7469 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
7470
7471         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
7472         assemblies in one run.
7473
7474         * aot-compiler.c (mono_compile_assembly): Only print out a count of
7475         skipped methods if it is not 0.
7476
7477         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
7478
7479 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
7480
7481         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
7482           MONO_ARCH_HAVE_UNWIND_TABLE.
7483
7484         Contributed under MIT/X11 license.
7485
7486 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
7487
7488         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
7489           from default optimizaton list on Winx64.
7490
7491         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
7492
7493         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
7494           the LMF from the MonoJitTlsData structure.
7495
7496         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
7497
7498         Contributed under MIT/X11 license.
7499
7500 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
7501
7502         * mini.c (sigsegv_signal_handler): Fix the build.
7503
7504         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
7505         assembly->aot_module.
7506
7507         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
7508         hash table. This simplifies and speeds up a lot of code, and fixes support
7509         for .netmodules.
7510
7511         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
7512         with the runtime.
7513
7514         * mini-exceptions.c: Ditto.
7515         
7516         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
7517         'native_offset' argument, since these are computed in the 
7518         mono_find_jit_info () function.
7519
7520         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
7521         is used by exceptions-ppc.c.
7522
7523         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
7524         mono_arch_find_jit_info ().
7525         
7526         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
7527         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
7528         generic code in mini-exceptions.c.
7529
7530 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
7531
7532         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
7533
7534         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
7535         
7536         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
7537         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
7538         called while holding the loader lock. Fixes #415608.
7539         (mono_aot_get_method_from_token_inner): Ditto.
7540
7541 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
7542
7543         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
7544         to reduce differences between this and the generic implementation in
7545         mini-exceptions.c.
7546         (ves_icall_get_frame_info): Ditto.
7547
7548         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
7549
7550         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
7551         longer neccesarry.
7552
7553         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
7554         mono_arch_get_call_filter () and make it non-static, for consistency with the
7555         other architectures.
7556
7557 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
7558
7559         * mini.c:
7560         * local-propagation.c:
7561         * mini-x86.c: Correct the name of arch defines.
7562
7563 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
7564
7565         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
7566         NO_EMULATE_LONG_SHIFT_OPS define.
7567
7568 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
7569
7570         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
7571         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
7572
7573         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
7574         MACH fixes. Merged from the 2.0 branch.
7575
7576         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
7577
7578         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
7579         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
7580
7581         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
7582
7583         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
7584         mono_marshal_get_native_wrapper () signature changes.
7585
7586 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
7587
7588         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
7589         conversion bug under arm.
7590
7591 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
7592
7593         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
7594
7595         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
7596         with overflow checking.
7597
7598 2008-08-05  Marek Habersack  <mhabersack@novell.com>
7599
7600         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
7601         to the genmdesc.pl file
7602
7603 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
7604
7605         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
7606         arg_array in the soft-float versions of the LOAD/STORE macros.
7607
7608         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
7609         implementation.
7610
7611         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
7612
7613 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
7614
7615         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
7616         a float HFA. Fixes #413621.
7617
7618 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
7619
7620         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
7621         frame_size to args_size. Fixes build.
7622
7623 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
7624
7625         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
7626         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
7627
7628         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
7629         the stack are not unaligned. Fixes #413247.
7630         
7631 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
7632
7633         * mini.c: update jitted methods performance counters.
7634
7635 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
7636
7637         * mini-exceptions.c: increase the exceptions thrown performance
7638         counter in mono_handle_exception ().
7639
7640 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
7641
7642         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
7643         can work with netmodules.
7644
7645 2008-07-28  Geoff Norton  <gnorton@novell.com>
7646
7647         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
7648         regression tests.
7649
7650 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
7651
7652         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
7653         correct place.
7654
7655 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
7656
7657         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
7658           The float param registers and other param registers must be the 
7659           same index on Windows x64.
7660
7661         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
7662           ArgValuetypeAddrInIReg argument case.  Setting the argument
7663           op to OP_VTARG_ADDR (OP_REGOFFSET)).
7664
7665         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
7666           variable computed above as the copy length for arguments of storage
7667           type ArgValuetypeAddrInIReg.
7668
7669         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
7670           ArgValuetypeAddrInIReg argument case.  This case will rely on
7671           mono_arch_emit_outarg_vt to emit the correct code later in the process.
7672
7673         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
7674           a 32 byte stack allocation for all calls.  We will omit the adjustment for
7675           jump and tail call instructoins as they do not follow the typical call behavior.
7676
7677         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
7678           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
7679           local variable and pass the local variable by reference to the called method.
7680
7681         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
7682           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
7683           of a struct is passed in a register it must be saved with the other
7684           volatile argument on the stack.
7685
7686         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
7687           frame pointer the stack adjustment value must be saved to the unwind 
7688           info structure.
7689
7690         Contributed under MIT/X11 license.
7691
7692 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
7693
7694         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
7695         which got lost in the merge.
7696
7697 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
7698
7699         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
7700         build.
7701
7702         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
7703         
7704         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
7705         icalls, since they won't be patched.
7706
7707         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
7708         different code sequence when running under valgrind to prevent some valgrind
7709         errors.
7710
7711         * iltests.il.in: Add new regression test.
7712
7713         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
7714         end with a throw.
7715
7716         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
7717         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
7718
7719         * iltests.il.in: Add new test.
7720
7721         * aot-compiler.c: Fix some warnings.
7722
7723         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
7724         Fixes #412494.
7725
7726 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
7727
7728         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
7729         (mini_usage_jitdeveloper): Add a missing --wapi option.
7730
7731 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
7732
7733         * mini-codegen.c: Simplify the is_fp macros.
7734         (free_up_ireg): Remove, use free_up_reg instead.
7735         (free_up_reg): Fix the fp case.
7736
7737 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
7738
7739         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
7740         lowered earlier.
7741
7742         * exceptions-x86.c: Merge some changes which seemed to have got lost
7743         in the linear-ir merge.
7744
7745         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
7746
7747         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
7748         long vreg volatile even if the variable was already created.
7749
7750         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
7751         volatile variables.
7752
7753 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
7754
7755         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
7756
7757         * mini.c (mono_jit_compile_method_inner): Add support for 
7758         MONO_EXCEPTION_BAD_IMAGE.
7759
7760         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
7761         mini_method_get_context () returns NULL. Fixes #356531.
7762
7763         * mini.c (mono_method_to_ir): Ditto.
7764         
7765         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
7766         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
7767
7768 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
7769
7770         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
7771         in the LDFTN implementation.
7772
7773 2008-07-25  Mark Probst  <mark.probst@gmail.com>
7774
7775         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
7776         code, patch calls to icalls, too, even if they're not in the
7777         shared generic code hash.  Fixes #411962.
7778
7779 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
7780
7781         * cpu-x86.md: Increase the length of the fcall opcodes.
7782
7783         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
7784         calls returning floats.
7785
7786         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
7787         on NEWARR.
7788         
7789         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
7790         missed earlier.
7791
7792         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
7793         into the domain->method_code_hash.
7794
7795         * aot-compiler.c: Fix win32 build.
7796
7797         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
7798         
7799         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
7800         gshared NEWARR implementation.
7801
7802         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
7803
7804         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
7805         can be used outside of method_to_ir.
7806
7807         * mini.h (MonoCompile): Add arg_types field.
7808
7809         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
7810         
7811         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
7812         the values of the local arg_array and param_types array.
7813
7814 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
7815
7816         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
7817         got accesses might only get generated later when NEWOBJ is decomposed.
7818         
7819         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
7820         looking up the native code of the target method when a delegate is called
7821         for the first time.
7822
7823         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
7824         optimization.
7825
7826         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
7827
7828         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
7829         AOT work on platforms without a working dlsym implementation.
7830
7831         * mini.h: Bump AOT image format version.
7832         
7833 2008-07-24  Mark Probst  <mark.probst@gmail.com>
7834
7835         * mini-exceptions.c: Free a MonoType with
7836         mono_metadata_free_type() instead of g_free().
7837
7838         * aot-runtime.c: Free a MonoType.
7839
7840 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
7841
7842         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
7843         optimization.
7844
7845         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
7846         fp stack on x86.
7847
7848 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
7849         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
7850         profiler hook.
7851
7852 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
7853
7854         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
7855         NEWOBJ calls on valuetypes.
7856
7857         * iltests.il.in: Add new test.
7858
7859         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
7860
7861 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
7862
7863         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
7864         is no longer needed.
7865
7866         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
7867         non register sized integer arguments.
7868         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
7869         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
7870         emit_memcpy2 ().
7871
7872         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
7873         CEE_MONO_RETOBJ.
7874         
7875         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
7876         two a binop with different sized arguments is emitted.
7877
7878         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
7879         instruction in the ins==NULL case.
7880
7881 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
7882
7883         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
7884
7885         * mini-x86.c: Fix osx build.
7886
7887         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
7888         opcodes as well.
7889
7890         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
7891         instruction for non int sized variables.
7892
7893         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
7894         implementation.
7895
7896 2008-07-23  Robert Jordan  <robertj@gmx.net>
7897
7898         * method-to-ir.c: Fix MSVC build.
7899
7900 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
7901
7902         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
7903         a non int sized type, widen it to an int since newer versions of gcc seem to
7904         generate code which needs this.
7905
7906         * ssa2.c abcremoval2.c: Fix warnings.
7907
7908         * *: Merge the Linear IR branch.
7909
7910         The original branch is at trunk/branches/vargaz/mini-linear-il, and
7911         the ChangeLog file there describes all the changes done over the years. 
7912         Further documentation can be found at www.mono-project.com/Linear_IL.
7913
7914 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
7915
7916         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
7917           The float param registers and other param registers must be the 
7918           same index on Windows x64.
7919
7920         Contributed under MIT/X11 license.
7921
7922 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
7923
7924         * mini.c: Make the previous fix GC safe.
7925
7926 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
7927
7928         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
7929
7930 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
7931
7932         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
7933           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
7934           ArgValuetypeAddrInIReg instead.
7935
7936         Contributed under MIT/X11 license.
7937
7938 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
7939
7940         * mini-codegen.c (get_register_spilling): Fix a warning.
7941
7942 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
7943
7944         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
7945         for types which the initialization fails. Raises the provided exception
7946         at the right stop after cleanup.
7947
7948 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
7949
7950         * aot-compiler.c: Free most of the memory allocated during compilation.
7951
7952         * mini.c (mini_parse_debug_options): Fix a leak.
7953         
7954         * mini.c (mini_method_compile): Don't add the method to the jit info tables
7955         during aot compilation.
7956
7957 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
7958
7959         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
7960         it has too much register pressure.
7961
7962 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
7963
7964         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
7965
7966 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
7967
7968         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
7969         on x86.
7970
7971         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
7972         on amd64 similar to the way it is done on arm.
7973
7974         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
7975
7976         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
7977         consistency, normalize error messages, avoid loading aot-only modules in
7978         normal mode.
7979
7980         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
7981         for consistency.
7982
7983         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
7984
7985 2008-07-11  Martin Baulig  <martin@ximian.com>
7986
7987         * debug-debugger.h
7988         (MonoDebuggerInfo): Add `interruption_request'.
7989
7990 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
7991
7992         * aot-compiler.c (emit_plt): Remove some dead code.
7993
7994         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
7995
7996         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
7997         return the plt info offset belonging to a given plt entry.
7998
7999         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
8000         mono_aot_get_plt_info_offset.
8001         
8002         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
8003         similar to the amd64 code by makeing jumps through a separate jump table 
8004         instead of embedding the jump addresses into the code.
8005
8006 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
8007
8008         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
8009         method.
8010
8011 2008-07-10  Martin Baulig  <martin@ximian.com>
8012
8013         * mini.c (mini_method_compile): Disable generics sharing when
8014         running in the debugger.
8015
8016 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
8017
8018         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
8019
8020         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
8021         the local register allocator from running out of registers on x86 when 
8022         using aot.
8023
8024 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
8025
8026         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
8027         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
8028         C4146.
8029
8030         Contributed under MIT/X11 license.
8031
8032 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
8033
8034         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
8035         speed up the assembler.
8036
8037 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
8038
8039         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
8040         support.
8041
8042         * mini.c: Move the soft float handling macros a bit earlier, add 
8043         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
8044         place.
8045
8046         * mini.h: Add prototype for mono_arch_fixup_jinfo.
8047
8048         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
8049         read-only to help catch code allocation requests.
8050         
8051         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
8052         and turn it off when using --aot-only or when compiling with --aot=full.
8053
8054         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
8055         jump table for switches from the normal domain mempool, not the code
8056         manager.
8057
8058         * mini-trampolines.c (get_unbox_trampoline): New function to return an
8059         unbox trampoline which handles aot-only mode too.
8060
8061         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
8062         an AOTed unbox trampoline.
8063
8064         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
8065
8066 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
8067
8068         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
8069         ""
8070
8071         Contributed under MIT/X11 license.
8072
8073 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
8074
8075         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
8076           the unwind information for the method at the end of the allocated block.
8077           
8078         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
8079           MonoCompileArch to hold the unwind info for SEH on Winx64
8080         
8081         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
8082           frame pointer info for the method being compiled.
8083           
8084         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
8085           the call to mono_exception_from_token.
8086           
8087         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
8088           storing the method prolog information in a format that the Winx64 SEH can understand.  This
8089           information is stored a the end of the method block because it is all 32-bit offset based.
8090
8091         Contributed under MIT/X11 license.
8092
8093 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
8094
8095         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
8096
8097         * wapihandles.c: Fix warnings.
8098
8099         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
8100         mode.
8101
8102         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
8103         mono_jit_compile_method in aot-only mode since that calls the type 
8104         initializer.
8105         
8106         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
8107         get_delegate_invoke_impl in aot-only mode.
8108
8109         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
8110
8111 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
8112
8113         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
8114
8115         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
8116         is on by default.
8117
8118         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
8119
8120         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
8121         init trampoline from the AOT file as well.
8122
8123         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
8124         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
8125         code.
8126
8127         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
8128         mono_init.
8129
8130         * exceptions-amd64.c: Add _full variants for the remaining exception code
8131         creation functions as well, allow emission of relocatable code, remove
8132         caching since that is now done by the caller.
8133
8134         * mini-exceptions.c: Add _full variants for the remaining exception code
8135         creation functions as well, add aot-only support.
8136
8137         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
8138         if we can determine a proper token for them.
8139         (add_wrappers): Add a few more wrappers.
8140         (emit_method_code): Remove some dead code.
8141         (emit_trampolines): Emit exception code too.
8142
8143         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
8144
8145         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
8146         mono_array_new_va which avoids varargs.
8147
8148         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
8149
8150         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
8151         mono_arch_create_specific_trampoline () in all places.
8152
8153         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
8154         a bit so it can be used for other things as well.
8155         
8156         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
8157         on demand as well.
8158
8159         * exceptions-amd64.c: Rename the caching from the exception code creation
8160         functions, it is done by the caller instead.
8161         
8162         * exceptions-amd64.c: Change the signature of the exception code creation 
8163         functions to allow the creation of relocatable code later.
8164
8165         * mini-exceptions.c: Add a set of functions to query the various 
8166         runtime-generated exception functions.
8167
8168         * mini.c mini-exceptions.c: Use the newly added functions instead of the
8169         mono_arch_.. () functions.
8170         
8171 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
8172
8173         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
8174
8175         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
8176
8177         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
8178         (mini_get_vtable_trampoline): Ditto.
8179
8180         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
8181         code in the AOT case by returning the code size and a list of relocations to
8182         the caller.
8183
8184         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
8185
8186 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
8187
8188         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
8189           clean the stack.
8190
8191         Contributed under MIT/X11 license.
8192
8193 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
8194
8195         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
8196         so the buffer size can be computed correctly. Fixes #404735.
8197
8198         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
8199         normally as cfg->debug_info is already freed.
8200
8201 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
8202
8203         * mini-amd64.c: For calls returning vtypes in registers, don't store
8204         the return address on the stack, instead allocate a separate local for
8205         it. Fixes #404729.
8206
8207 2008-07-05  Mark Probst  <mark.probst@gmail.com>
8208
8209         * mini-trampolines.c, mini.h: Add an argument to
8210         mono_create_jit_trampoline_in_domain() for turning off the adding
8211         of the sync wrapper.
8212
8213         * mini.c: Use the JIT trampoline without sync instead of
8214         ldftn_nosync in static RGCTX invoke wrappers so that the call can
8215         be patched.
8216
8217 2008-07-04  Mark Probst  <mark.probst@gmail.com>
8218
8219         * driver.c: Turn on GSHARED optimization by default.
8220
8221 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
8222
8223         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
8224         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
8225
8226         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
8227         create a variant of the generic trampoline code callable from AOTed trampolines.
8228
8229         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
8230         trampoline code callable from AOTed trampolines.
8231
8232         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
8233
8234 2008-07-04  Mark Probst  <mark.probst@gmail.com>
8235
8236         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
8237         pass-through manner.
8238
8239         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
8240         and don't fail sharing for them anymore.
8241
8242         * mini-exceptions.c: Handle exceptions in shared generic methods.
8243
8244         * generic-sharing.c: When checking the context of a generic
8245         method, also check its class's context.  Don't treat wrappers as
8246         sharable.
8247
8248         * mini-trampolines.c: Some code factored out to
8249         metadata/generic-sharing.c.  Handle the MRGCTX case.
8250
8251         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
8252         we must deal with the method being of another instantiation of the
8253         class.  Add static rgctx invoke wrappers to generic methods.
8254
8255 2008-07-04  Mark Probst  <mark.probst@gmail.com>
8256
8257         * mini.c: Provide all jit infos of generic shared methods with a
8258         generic jit info.
8259
8260         * mini-exceptions.c: Handle the new situation that a generic info
8261         might be available, but not info about the this/vtable/mrgctx
8262         variable.
8263
8264 2008-07-03  Mark Probst  <mark.probst@gmail.com>
8265
8266         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
8267         generic methods.
8268
8269 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
8270
8271         * dominators.c (check_dominance_frontier): Fix a warning.
8272
8273         * mini.h: Add some missing prototypes.
8274
8275         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
8276
8277         * driver.c (mono_jit_init_version): Correct the comments since the first
8278         argument should be the name of the root domain, not a filename.
8279
8280         * aot-runtime.c (make_writable): Error out if this is called while running
8281         with --aot-only.
8282         (load_aot_module): Ditto.
8283
8284         * aot-compiler.c: Really fix the computation of method indexes.
8285
8286         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
8287         optimizations as this is no longer called frequently.
8288
8289         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
8290         method and the invoke impl code and pass it to the delegate trampoline instead of
8291         just the delegate class.
8292
8293 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
8294
8295         * aot-compiler.c: Fixup the computation of method indexes.
8296         (add_wrappers): Create the base methods of the runtime invoke wrappers using
8297         the method builder infrastructure.
8298
8299         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
8300         has no header.
8301
8302         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
8303         mode, load the method right away instead of creating a trampoline.
8304
8305         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
8306
8307         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
8308         some checks a bit.
8309
8310 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
8311
8312         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
8313         (mono_aot_load_method): Use method_index instead of method->token.
8314
8315         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
8316         can handle icalls etc. properly.
8317
8318         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
8319
8320         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
8321
8322         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
8323         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
8324         JIT_ICALL_ADDR patch type.
8325
8326         * patch-info.h: Add JIT_ICALL_ADDR patch type.
8327
8328         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
8329         request flag.
8330         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
8331
8332         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
8333
8334 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
8335
8336         * mini.c: Use domain->jit_code_hash_lock for controlling access to
8337         domain->jit_code_hash.
8338
8339 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
8340
8341         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
8342
8343 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
8344
8345         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
8346         get_this_arg_from_call, let it compute it when needed.
8347
8348         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
8349         gsctx from code only when needed.
8350
8351         * mini-trampolines.c (get_generic_context): Rename this to 
8352         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
8353         it can be called by the arch backends.
8354
8355         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
8356
8357 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
8358
8359         * driver.c (mono_main): Add experimental --aot-only command line option.
8360
8361         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
8362         set.
8363
8364 2008-06-26  Kornel Pal  <kornelpal@gmail.com>
8365
8366         * driver.c (DllMain): Remove mono_module_handle.
8367
8368         Contributed under MIT/X11 license.
8369
8370 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
8371
8372         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
8373         for emitting methods which are not in the source assembly. Detect and report
8374         failure of assembling+linking.
8375         
8376         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
8377
8378         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
8379
8380 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
8381
8382         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
8383
8384 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
8385
8386         * mini.h: Remove some obsolete prototypes.
8387
8388         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
8389
8390 2008-06-24  Mark Probst  <mark.probst@gmail.com>
8391
8392         * mini.c (get_object_generic_inst): Variable-sized arrays are not
8393         supported by Visual Studio, so use alloca().
8394
8395 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
8396
8397         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
8398         Fixes #402585.
8399
8400 2008-06-23  Mark Probst  <mark.probst@gmail.com>
8401
8402         * mini.c: Fail sharing of a generic method if it contains an open
8403         catch clause (because we don't pass MRGCTXs yet).
8404
8405 2008-06-23  Mark Probst  <mark.probst@gmail.com>
8406
8407         * mini.c: When compiling a method with generic sharing, insert the
8408         method instantiated with an all-Object generic context into the
8409         jit info table, instead of the context of the first instantiation
8410         of the method we happen to compile.
8411
8412 2008-06-18  Martin Baulig  <martin@ximian.com>
8413
8414         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
8415         `major_version' and `minor_version'.
8416
8417 2008-06-17  Mark Probst  <mark.probst@gmail.com>
8418
8419         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
8420         mono_method_is_generic_sharable_impl() takes an additional
8421         argument specifying whether to treat type variables as reference
8422         types.
8423
8424 2008-06-17  Mark Probst  <mark.probst@gmail.com>
8425
8426         * mini.h: Removed obsolete prototypes.
8427
8428 2008-06-17  Mark Probst  <mark.probst@gmail.com>
8429
8430         * mini.c: Don't fail generic sharing for initobj and sizeof - we
8431         already handle them.
8432
8433 2008-06-17  Mark Probst  <mark.probst@gmail.com>
8434
8435         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
8436         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
8437         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
8438         tramp-x86.c: Added a MonoGenericContext* argument to
8439         mono_arch_get_unbox_trampoline() so that it can call other
8440         functions which require it.
8441
8442 2008-06-17  Mark Probst  <mark.probst@gmail.com>
8443
8444         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
8445         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
8446         mono_arch_get_this_arg_from_call() takes a
8447         MonoGenericSharingContext* as well.
8448
8449 2008-06-17  Mark Probst  <mark.probst@gmail.com>
8450
8451         * mini.c: Factor out code for emitting unbox into emit_unbox() and
8452         implement generic sharing of unbox.
8453
8454 2008-06-17  Mark Probst  <mark.probst@gmail.com>
8455
8456         * mini.c: Don't compute the vtable to determine whether a field is
8457         special static, because it might not work for open types.
8458
8459 2008-06-17  Mark Probst  <mark.probst@gmail.com>
8460
8461         * mini.c: Removed the unused token_type and token_source arguments
8462         from get_runtime_generic_context_ptr().
8463
8464 2008-06-17  Marek Habersack  <mhabersack@novell.com>
8465
8466         * mini.c (ADD_BINOP): fix the build
8467
8468 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
8469
8470         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
8471         a widening op.
8472
8473 2008-06-16  Mark Probst  <mark.probst@gmail.com>
8474
8475         * mini.h: Removed class relations enum that's not used anymore.
8476
8477 2008-06-16  Mark Probst  <mark.probst@gmail.com>
8478
8479         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
8480
8481         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
8482         the lazy fetch trampoline access code.
8483
8484 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
8485
8486         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
8487
8488 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
8489
8490         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
8491
8492         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
8493
8494         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
8495
8496 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
8497
8498         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
8499         intrinsics.
8500
8501         * mini-ops.h: Add MIN/MAX_UN opcodes.
8502
8503         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
8504         intrinsics.
8505
8506         * basic-math.cs: Add more min/max tests.
8507
8508         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
8509
8510 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8511
8512         * mini.c: Small fix in the prologue of emit_castclass.
8513
8514 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
8515
8516         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
8517
8518         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
8519         do not work even for unsigned types. Fixes #400014.
8520
8521         * basic-math.cs: Add regression tests for unsigned Min/Max.
8522
8523 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8524
8525         * mini.c: Added additional context_used argument to several
8526         functions, which will be needed for sharing generic methods.  Use
8527         GET_RGCTX macro wherever appropriate.  Declare only one
8528         context_used in mono_method_to_ir().
8529
8530 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8531
8532         * mini.c, generic-sharing.c: Removed generic class relations.
8533
8534         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
8535         functions due to MRGCTX changes.
8536
8537 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8538
8539         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
8540         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
8541         with calculated IMT.
8542
8543         * mini.c: Generic sharing of calls via generic interfaces.
8544
8545         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
8546         generic method with non-constant MonoGenericContext*.  Instead,
8547         the context is taken out of the method itself.
8548
8549 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8550
8551         * mini.c: Generic sharing of ldvirtftn.
8552
8553 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8554
8555         * mini.c: Generic sharing of ldftn.
8556
8557 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8558
8559         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
8560
8561 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8562
8563         * mini.c: Generic sharing of the special case of ldtoken followed
8564         by a call to GetTypeFromHandle.
8565
8566 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8567
8568         * mini.c: Generic sharing of box for nullable types.
8569
8570 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
8571
8572         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
8573         are passed on the stack. Fixes #324807.
8574
8575 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
8576
8577         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
8578         for the ArgValuetypeAddrInIReg case.
8579
8580         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
8581         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
8582
8583         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
8584         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
8585         local variable and pass the local variable by reference to the called method.
8586           
8587         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
8588         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
8589
8590         Contributed under MIT/X11 license.
8591
8592 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
8593
8594         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
8595
8596         * debug-mini.c (mono_debug_print_vars): Release memory after printing
8597         everything.
8598
8599 2008-06-10  Martin Baulig  <martin@ximian.com>
8600
8601         * debug-mini.c
8602         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
8603
8604 2008-06-09  Kornel Pal  <kornelpal@gmail.com>
8605
8606         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
8607         possible error when no arguments are passed.
8608
8609         Contributed under MIT/X11 license.
8610
8611 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
8612
8613         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
8614         where the file name is NULL.
8615
8616 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
8617
8618         * mini.c: Fix s390 build.
8619
8620 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
8621
8622         * trace.c (mono_trace_parse_options): Fix warnings.
8623
8624         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
8625
8626 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
8627
8628         * mini.c (remove_block_if_useless): Avoid printing the method name.
8629         
8630         * mini.c: Remove needless setting of ins->cil_code which is now done by 
8631         MONO_INST_NEW.
8632
8633         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
8634         LMF. Not yet used.
8635
8636         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
8637         translated code after it has been patched.
8638
8639 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
8640
8641         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
8642         avoid problems during code patching on SMP systems.
8643         (emit_call): Avoid adding a patch info which is already added by 
8644         emit_call_body.
8645         (mono_arch_emit_exceptions): Ditto.
8646
8647 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
8648
8649         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
8650         MONO_TYPE_ISSTRUCT already checks for it.
8651
8652 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
8653
8654         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
8655           structs with floats on Winx64 the float registers are not used.  
8656           The integer registers are always used..
8657         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
8658           only one register will be used and only if the size of the struct 
8659           is 1,2,4, or 8 bytes.
8660
8661         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
8662           to work for Winx64.
8663
8664         Contributed under MIT/X11 license.
8665
8666 2008-06-05  Martin Baulig  <martin@ximian.com>
8667
8668         * debug-debugger.c (debugger_lookup_class): Also call
8669         mono_class_setup_methods() here; we're only called from RTI.
8670
8671 2008-06-05  Andreas Farber  <andreas.faerber@web.de>
8672
8673         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
8674         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
8675         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
8676         Post-process object files and add dtrace-generated object, if necessary.
8677
8678         Contributed under MIT/X11 license.
8679
8680 2008-06-04  Mark Probst  <mark.probst@gmail.com>
8681
8682         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
8683         element class.
8684
8685         * mini.c: Generic sharing for unbox.any and castclass.
8686
8687 2008-06-04  Mark Probst  <mark.probst@gmail.com>
8688
8689         * mini.c: Ignore tailcall prefix in shared generic code and when
8690         doing calls which require a vtable/rgctx argument.
8691
8692 2008-06-04  Mark Probst  <mark.probst@gmail.com>
8693
8694         * mini.c: Don't free the JIT info.
8695
8696         * driver.c: Changes in the JIT info table testing code.
8697
8698 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
8699
8700         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
8701         interruption. Fix some warnings.
8702
8703         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
8704         interruption_checkpoint.
8705
8706 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
8707
8708         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
8709         from embedding applications.
8710
8711 2008-06-02  William Holmes  <billholmes54@gmail.com>
8712
8713         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
8714           reserving 32 bytes on the stack when making calls. 
8715
8716         Contributed under MIT/X11 license.
8717
8718 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
8719
8720         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
8721         the linear IL branch.
8722
8723         * driver.c: Print out more information for --version on arm.
8724
8725 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
8726
8727         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
8728         bb_exit instead, since out of line bblocks might not actually be emitted
8729         out-of-line.
8730         
8731         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
8732         maximum epilog size for out of line bblocks if tracing is enabled.
8733
8734         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
8735
8736 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
8737
8738         * arrays.cs: Regression tests for allocating arrays with negative sizes.
8739
8740 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
8741
8742         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
8743         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
8744         opcodes.
8745
8746 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
8747
8748         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
8749         the 'value' to store is a constant.
8750
8751         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
8752
8753         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
8754         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
8755
8756 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
8757
8758         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
8759         for accessing method->generic_container.
8760
8761 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
8762
8763         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
8764         
8765         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
8766
8767         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
8768
8769         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
8770         fails.
8771
8772 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
8773
8774         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
8775
8776         * mini.c: Handle the case when mono_class_vtable () fails.
8777
8778 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
8779         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
8780         the stat profiler.
8781
8782 2008-05-22  Mark Probst  <mark.probst@gmail.com>
8783
8784         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
8785         together with domain sharing.
8786
8787 2008-05-22  Mark Probst  <mark.probst@gmail.com>
8788
8789         * mini.c: Treat callvirts to final methods like non-virtual calls
8790         when doing generic sharing, i.e. look them up in the runtime
8791         generic context.
8792
8793 2008-05-22  Mark Probst  <mark.probst@gmail.com>
8794
8795         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
8796         with computed types (for generic sharing).
8797
8798         * mini.c: Generic sharing for mkrefany and refanyval.
8799
8800 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
8801
8802         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
8803         possible.
8804
8805         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
8806         the generic sharing code.
8807         
8808         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
8809         when needed.
8810
8811 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
8812
8813         * mini.h: Remove the declaration of mono_aot_init_vtable ().
8814
8815 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
8816
8817         * driver.c: updated copyright date
8818
8819 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
8820
8821         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
8822         needed.
8823
8824 2008-05-19  Martin Baulig  <martin@ximian.com>
8825
8826         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
8827         pointing to the new `_mono_debug_using_mono_debugger' variable.
8828
8829         * driver.c
8830         (mono_main): Check mono_debug_using_mono_debugger() rather than
8831         the `MONO_INSIDE_MDB' environment variable to check whether we're
8832         inside the debugger.
8833
8834 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
8835
8836         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
8837         argument.
8838
8839 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
8840
8841         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
8842
8843         * mini.c: Added mini_assembly_can_skip_verification. This
8844         function checks if the assembly requested to skip verification. 
8845         Fixes part of #387274.
8846
8847 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
8848
8849         * mini.c (mini_get_method): Disable the check for open generic classes when
8850         using generic sharing.
8851
8852         * generics.cs: Add a test for #387034.
8853
8854         * mini.c (mini_get_method): Check whenever the method class is an open generic
8855         type, and return NULL in that case, causing a verification error. Fixes
8856         #384123.
8857
8858 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
8859
8860         * driver.c (mono_main): Revert r102623. The right
8861         thing to do is to enable the verifier under verifiable
8862         unless a --security flag was passed.
8863
8864         We need this non-trivial behavior for --verify-all otherwise
8865         mcs-compileall won't be able to use it. As it needs everything to
8866         be verified under validil.
8867
8868 2008-05-06  Martin Baulig  <martin@ximian.com>
8869
8870         Fix #383749.
8871
8872         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
8873         (mono_debugger_thread_cleanup): Likewise.
8874         (mono_debugger_extended_notification): Likewise.
8875
8876 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
8877
8878         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
8879         against both inflated and non-inflated methods. We need to check against the
8880         generic definition for cases where the instantiated method is not visible.
8881         We need to check against the inflated types for cases where the instantiation
8882         changes any super type. This fixes #382986.
8883
8884         Note that this doesn't need to be applied to other parts of mono_method_to_ir
8885         that check for visibiliy as generic params only appears as the type subject
8886         of tokens on call opcodes. Field manipulation and ldftn must always
8887         target an exact type.
8888
8889 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
8890
8891         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
8892         if no related --security flag is passed.
8893
8894 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
8895
8896         * mini-arch.h: Prepare support for ppc64.
8897
8898         Contributed under MIT/X11 license.
8899
8900 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
8901
8902         * aot-runtime.c: Prepare support for ppc64.
8903
8904         Contributed under MIT/X11 license.
8905
8906 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
8907
8908         * mini-ops.h: Prepare support for ppc64.
8909
8910         Contributed under MIT/X11 license.
8911
8912 2008-05-04  Andreas Farber  <andreas.faerber@web.de>
8913
8914         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
8915
8916         Contributed under MIT/X11 license.
8917
8918 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
8919
8920         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
8921         assemblies, since aot_name is not a full path, causing us to load MS.NET 
8922         assemblies on windows.
8923
8924 ?2008-04-28  Kornel Pal  <kornelpal@gmail.com>
8925
8926         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
8927         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
8928         * main.c: Use UTF-8 encoded command line instead of Windows default code
8929         page on Windows to support Unicode.
8930         * driver.c (DllMain): New function for mixed-mode assembly support.
8931         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
8932         export __stdcall functions without decoration.
8933
8934         Contributed under MIT/X11 license.
8935
8936 2008-04-28  Mark Probst  <mark.probst@gmail.com>
8937
8938         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
8939         saving it very early.
8940
8941 2008-04-28  Mark Probst  <mark.probst@gmail.com>
8942
8943         * mini.h, mini.c: Lots of code for accessing the old RGCTX
8944         deleted.  The only way to access the new RGCTX is via the
8945         trampline.
8946
8947         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
8948         vtable instead of the RGCTX to static methods.
8949
8950         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
8951         accessing the new RGCTX.
8952
8953         * generic-sharing.c: There is no separation between self, type
8954         arguments and other types in the RGCTX anymore.
8955
8956 2008-04-25  Jonathan Chambers <joncham@gmail.com>
8957
8958         * mini-amd64.c (add_general): Remove previous stack adjustment.
8959         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
8960         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
8961         for 32 bytes of stack space reserved for all calls.
8962         
8963         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
8964         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
8965         adjustment.
8966         
8967         Code contributed under MIT/X11 license.
8968
8969 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
8970
8971         * mini.c (mini_method_verify): Only verify non-inflated methods, check
8972         against the root definition, peeling out method and type instantiations.
8973         Cache verify success results, code that fails verification is still
8974         checked multiple times.
8975
8976 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
8977
8978         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
8979
8980 2008-04-23  Jonathan Chambers <joncham@gmail.com>
8981
8982         * mini-amd64.c (add_general): Always increment stack on Win64.
8983         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
8984         on Win64.
8985         
8986         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
8987         stack based argument handling on Win64.
8988         
8989         Code contributed under MIT/X11 license.
8990
8991 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
8992
8993         * Makefile.am (version.h): Add support for git-svn.
8994
8995 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
8996
8997         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
8998         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
8999         avoiding allocations and libc functions which might deadlock.
9000         
9001         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
9002         'no-gdb-backtrace' option is set.
9003
9004         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
9005
9006         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
9007
9008 2008-04-21  Martin Baulig  <martin@ximian.com>
9009
9010         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
9011         and `get_lmf_addr'; `notification_address' is no longer a pointer.
9012
9013 2008-04-21  Martin Baulig  <martin@ximian.com>
9014
9015         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
9016         `thread_vtable', `event_handler_ptr' and `event_handler'.
9017
9018 2008-04-21  Martin Baulig  <martin@ximian.com>
9019
9020         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
9021         allows delayed initialization of the `executable_code_buffer' when
9022         attaching.
9023
9024 2008-04-21  Martin Baulig  <martin@ximian.com>
9025
9026         * mini.h (mono_debugger_create_notification_function): Removed.
9027         * tramp-*.c (mono_debugger_create_notification_function): Removed.
9028
9029         * mdb-debug-info64.s
9030         (MONO_DEBUGGER__notification_function): Added this in the .text section.
9031
9032         * mdb-debug-info32.s
9033         (MONO_DEBUGGER__notification_function): Added this in the .text section.
9034
9035         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
9036         currently only works on x86 and x86_64, so don't create it on ppc.
9037
9038 2008-04-21  Martin Baulig  <martin@ximian.com>
9039
9040         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
9041
9042         * mini.c
9043         (mini_method_compile): In the fp elimination check, check
9044         `debug_options.mdb_optimizations' in addition to
9045         mono_debug_using_mono_debugger().       
9046
9047         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
9048         disable some JIT optimizations which are only disabled when
9049         running inside the debugger.
9050         Added `--help-debug' option to describe the debugging options.
9051         (parse_debug_options): New static function to parse the `--debug'
9052         options, so we can easily add more stuff in future.
9053
9054 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
9055
9056         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
9057         the method has no body.
9058
9059 2008-04-19  Jonathan Chambers <joncham@gmail.com>
9060
9061         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
9062         assembly is not allowed in MSVC 64-bit compiler. 
9063         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
9064         as we get floating point exceptions everywhere.
9065         
9066         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
9067         correctly align arguments for call to throw_exception.
9068         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
9069         
9070         Code contributed under MIT/X11 license.
9071
9072 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
9073
9074         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
9075
9076 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
9077
9078         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
9079
9080         * mini-amd64.c (NEW_INS): Set cil_code.
9081
9082         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
9083         from mini-amd64.c so all debugger related logic is in one place.
9084
9085         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
9086         later won't have a random ip assigned to them.
9087
9088 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
9089
9090         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
9091         the arch specific function initializes code_size.
9092         (mono_create_delegate_trampoline): Ditto.
9093
9094         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
9095         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
9096         platforms.
9097
9098         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
9099         running under the debugger.
9100
9101         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
9102         debugger.
9103
9104         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
9105         debugger. Also move the disabling of optimizations here from driver.c.
9106         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
9107         debugger.
9108
9109         * mini.h (MonoCompile): Add a few new flags.
9110
9111 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
9112
9113         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
9114         so the cil_code field of created MonoInst's is properly set.
9115         (mini_select_instructions): Ditto.
9116
9117         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
9118         (MONO_INST_NEW_CALL): Ditto.
9119
9120         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
9121         in many places so the ins->cil_code field is properly initialized.
9122
9123         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
9124         place.
9125
9126 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
9127
9128         * mini.c (mini_method_compile): Print a different message when compiling a 
9129         shared method.
9130         
9131         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
9132         > 1.
9133
9134 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
9135
9136         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
9137         SSE2 instructions.
9138
9139         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
9140         
9141 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
9142
9143         * mini.c (handle_stack_args): Make this return void since its return value was
9144         never used. Also set cfg->unverifiable for invalid IL instead of calling
9145         G_BREAKPOINT ().
9146
9147 2008-04-10  Mark Probst  <mark.probst@gmail.com>
9148
9149         * mini.c: Make sure "this" is live in catch clauses with type
9150         variables in shared generic code.
9151
9152 2008-04-08  Mark Probst  <mark.probst@gmail.com>
9153
9154         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
9155         generic_class_is_reference_type() to ensure the proper behaviour
9156         when sharing generic code and the type in question is a type
9157         argument.
9158
9159 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
9160
9161         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
9162         race conditions when printing thread dumps. Fixes #377738.
9163
9164 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
9165         
9166         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
9167         shows up when both MonoInst arguments can cause aliasig.
9168         There is likely no way in the current JIT to trigger this problem, but
9169         it showed up in the development of generics sharing, when in a new
9170         opcode both args of an OP_GROUP can be aliases (addresses of a local).
9171         When the generics sharing code will be committed, its tests will be
9172         valid also for this bug.
9173
9174 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
9175
9176         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
9177         PATCH_INFO_METHOD.
9178
9179         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
9180         NULL.
9181
9182 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
9183
9184         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
9185         use a more detailed exception message for InvalidCastException.
9186
9187         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
9188
9189         * driver.c (mono_main): Add --debug=casts option to turn on better 
9190         InvalidCastException message details.
9191
9192         * mini.c (mini_get_debug_options): New helper function to return the address of
9193         the debug_options variable.
9194
9195         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
9196         the jit_tls TLS variable.
9197
9198         * mini.c (mono_jit_tls): New TLS variable.
9199
9200         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
9201         option is used.
9202
9203 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
9204
9205         * mini.h: Removed verifer related stuff. This code was moved to verify.c
9206
9207         * mini.c: Removed verifer related stuff, code moved to verify.c.
9208
9209         * driver.c: Using code from verify.c instead of mini.c.
9210
9211 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
9212
9213         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
9214         longer valid.
9215
9216 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
9217
9218         * mini.c (check_for_method_verify): Enabling verification of
9219         corlib if mono_verify_all is set. Bugs in the verifier preventing that
9220         have been fixed.
9221
9222 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
9223
9224         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
9225         caller saved registers as well.
9226         
9227         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
9228         saved registers as well.
9229
9230 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
9231
9232         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
9233
9234         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
9235         code.
9236
9237 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
9238
9239         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
9240         to get_call_info.
9241         (get_call_info): Take a gsctx argument instead of 'cfg'.
9242
9243 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
9244
9245         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
9246         mono_verify_all is set.
9247
9248         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
9249
9250         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
9251
9252 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
9253
9254         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
9255         an exception.
9256
9257         * driver.c mini.c mini.h: Add a --verify-all development option to test the
9258         verifier and the code generated by the compiler.
9259
9260 2008-03-25  Mark Probst  <mark.probst@gmail.com>
9261
9262         * mini.c: Generic sharing of the non-nullable case of the box
9263         instruction.
9264
9265 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
9266
9267         * inssel.brg: Fix the build.
9268
9269         * iltests.il.in: Add a test for lconv.ovf.u8.un.
9270
9271 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
9272
9273         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
9274         Array:Address. Fixes #372410.
9275
9276         * iltests.il.in: New tests for readonly prefix.
9277
9278 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
9279
9280         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
9281         mini-trampolines.c.
9282
9283         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
9284         mini-exceptions.c.
9285
9286         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
9287         
9288         * mini.c (mono_decompose_op_imm): New helper function.
9289
9290         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
9291         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
9292         return value.
9293
9294         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
9295         mono_arch_output_basic_block. Fix warnings.
9296
9297         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
9298         for now.
9299
9300 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
9301
9302         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
9303         since the extra frame is now detected automatically inside the loop.
9304
9305         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
9306         opts which are now in mono_peephole_ins ().
9307         
9308         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
9309
9310         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
9311         frames and skip duplicate managed-to-native frames. Fixes #367665.
9312
9313         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
9314         opts which are now in mono_peephole_ins ().
9315         (mono_arch_peephole_pass_2): Ditto.
9316
9317         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
9318
9319         * mini-codegen.c (mono_peephole_ins): New helper function containing the
9320         arch independent peephole optimizations.
9321
9322         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
9323         opts which are now in mono_peephole_ins ().
9324
9325         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
9326         
9327         * mini-s390.c (mono_arch_output_basic_block): Fix build.
9328
9329         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
9330         pattern.
9331
9332         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
9333         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
9334         opcode. 
9335
9336 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
9337
9338         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
9339         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
9340         return value.
9341
9342         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
9343         mono_arch_output_basic_block. Fix warnings.
9344
9345 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
9346
9347         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
9348         conv.ovf.u.un.
9349
9350 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
9351
9352         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
9353         conv.ovf.u.un.
9354
9355         * iltests.il: Add new tests.
9356
9357 2008-03-20  Kornel Pal  <kornelpal@gmail.com>
9358
9359         * mini.c: Removed Windows version macros.
9360
9361 2008-03-20  Mark Probst  <mark.probst@gmail.com>
9362
9363         * generic-sharing.c: Put reflection types in the extensible part
9364         of the runtime generic context.
9365
9366         * mini.c: Generic sharing of the GetTypeHandle special case of the
9367         ldtoken instruction.
9368
9369 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
9370
9371         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
9372
9373         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
9374         
9375         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
9376         consistency with the other version on the linear IR branch.
9377
9378         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
9379
9380         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
9381
9382         * iltests.il.in: Add new tests.
9383
9384 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
9385
9386         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
9387
9388         * iltests.il.in: Add new tests.
9389
9390 2008-03-19  Mark Probst  <mark.probst@gmail.com>
9391
9392         * mini.c: Two variables with the same name were declared in
9393         nesting contexts and one wasn't initialized.  Fixed.
9394
9395 2008-03-19  Mark Probst  <mark.probst@gmail.com>
9396
9397         * mini.c: Generic sharing of the initobj instruction.
9398
9399 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
9400
9401         * mini.c: make the test to optimize ldtoken from typeof() more
9402         precise.
9403
9404 2008-03-18  Mark Probst  <mark.probst@gmail.com>
9405
9406         * mini.c: Generic sharing of the initobj instruction for reference
9407         types.
9408
9409 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
9410
9411         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
9412         the mono_breakpoint_clean_code() code to perform bound checks.
9413
9414 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
9415
9416         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
9417         mono_arch_patch_callsite() to include the start of the managed method
9418         to be able to perform bound checks.
9419
9420 2008-03-17  Mark Probst  <mark.probst@gmail.com>
9421
9422         * mini.c: Generic sharing for the isinst instruction.
9423
9424 2008-03-17  Mark Probst  <mark.probst@gmail.com>
9425
9426         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
9427         inssel-long32-mips.brg: Added opcodes for doing indirect calls
9428         with the runtime generic context argument.
9429
9430         * mini.c: Share calls to several types of unsharable methods by
9431         putting the address of the method code in the runtime generic
9432         context and doing an indirect call.
9433
9434         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
9435         to switches.
9436
9437 2008-03-16  Mark Probst  <mark.probst@gmail.com>
9438
9439         * generic-sharing.c: Change due to a change in the runtime genric
9440         context API.
9441
9442 2008-03-15  Martin Baulig  <martin@ximian.com>
9443
9444         * tramp-x86.c
9445         (mono_arch_nullify_class_init_trampoline): Add call to
9446         mono_breakpoint_clean_code() to make things work when running
9447         inside the debugger.
9448
9449         * tramp-amd64.c
9450         (mono_arch_nullify_class_init_trampoline): Add call to
9451         mono_breakpoint_clean_code() to make things work when running
9452         inside the debugger.
9453
9454 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
9455
9456         * inssel-long.brg (reg): Fix 64 bit build.
9457
9458 2008-03-14  Mark Probst  <mark.probst@gmail.com>
9459
9460         * mini.c, mini.h: Share static generic code by passing it an
9461         implicit argument pointing to the runtime generic context.
9462
9463         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
9464         inssel-long32-mips.brg: New opcodes for calling shared static,
9465         which need to be passed the runtime generic context.
9466
9467         * mini-amd64.c, mini-x86.c: Save the runtime generic context
9468         argument on the stack in the prologue if needed.  New function for
9469         finding the runtime generic context argument from the registers
9470         saved by the trampoline.
9471
9472         * mini-amd64.h, mini-x86.h: Specify which register to use for the
9473         runtime generic context argument.
9474
9475         * tramp-amd64.c: Also restore the register used for the runtime
9476         generic context argument.
9477
9478         * mini-trampoline.c: Resolve shared static calls by consulting the
9479         runtime generic context via the new argument.
9480
9481         * generic-sharing.c: Add an argument to sharability-checking
9482         functions that specifies whether type variables should be treated
9483         as sharable type arguments.
9484
9485         * inssel-x86.brg: Removed a superfluous, buggy rule.
9486
9487         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
9488         to switches.
9489
9490 2008-03-14  Martin Baulig  <martin@ximian.com>
9491
9492         * debug-debugger.c (main_thread_handler): Call
9493         mono_runtime_run_main() without sending any notifications.
9494
9495         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
9496
9497 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
9498
9499         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
9500
9501 2008-03-14  Mark Probst  <mark.probst@gmail.com>
9502
9503         * tramp-x86.c: Fixed register restore offsets in the trampoline
9504         code for ECX and EDX.
9505
9506 2008-03-12  Geoff Norton  <gnorton@novell.com>
9507
9508         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
9509         different ucontext_t implementations.
9510         * exceptions-arm.c: Use the above defines to get exceptions working on 
9511         iPhone (based on a patch by Luke Howard lukeh@padl.com)
9512         * mini-arm.c: Implement iPhone icache support (based on a patch by
9513         Luke Howard lukeh@padl.com)
9514
9515 2008-03-12  Mark Probst  <mark.probst@gmail.com>
9516
9517         * mini.c: Enable generic sharing of calls to non-static
9518         non-interface non-generic non-value-type methods.
9519
9520         * mini-trampolines.c: Resolve calls from shared generic code.
9521
9522 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
9523
9524         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
9525
9526         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
9527
9528 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
9529
9530         * mini.c: some fixes for the AOT compiler.
9531
9532 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
9533
9534         * cpu-amd64.md: Add clob:1 to some float opcodes.
9535
9536 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
9537
9538         * mini.h: Added MiniVerifierMode enumeration.
9539
9540         * mini.c: Added mini_verifier_set_mode to control
9541         the usage of the new verifier.
9542
9543         * mini.c (mono_method): Integrated the new verifier.
9544
9545         * driver.c: Extended --security option with validil and
9546         verifiable options to activate the new verifier.
9547
9548 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
9549
9550         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
9551         optimization to ctors taking 0 or 2 arguments too.
9552
9553         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
9554         a bit.
9555
9556         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
9557
9558         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
9559
9560 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
9561
9562         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
9563         non-aot case as well.
9564
9565         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
9566
9567         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
9568         changes.
9569
9570         * aot-compiler.c (encode_patch): Ditto.
9571
9572         * mini.h (G_MININT32): Fix the definition of this.
9573
9574 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
9575
9576         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
9577
9578         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
9579
9580 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
9581
9582         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
9583         methods returning vtypes in registers.
9584         (mono_arch_allocate_vars): Ditto.
9585
9586         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
9587
9588         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
9589
9590         * generics.cs: Add a test from the linear IR branch.
9591
9592         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
9593
9594         * mini.c (inline_method): Cache failed inline attempts.
9595
9596 2008-03-04  Mark Probst  <mark.probst@gmail.com>
9597
9598         * mini.c: For shared methods of generic classes put the location
9599         of "this" into the MonoGenericJitInfo.
9600
9601         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
9602         register out of a MonoContext by register number.  Add the generic
9603         sharing context as an argument to mono_arch_find_this_argument().
9604
9605         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
9606         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
9607         for new arch function.
9608
9609         * mini-exception.c: Handle open exception clauses in shared
9610         generic code.
9611
9612         * mini-trampolines.c: Supply additional argument to
9613         mono_arch_find_this_argument().
9614
9615 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
9616
9617         * Makefile.am (regtests): Run the bench.exe tests last.
9618
9619 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
9620
9621         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
9622         a bit.
9623
9624 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
9625
9626         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
9627         with MS.
9628
9629         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
9630         
9631         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
9632
9633         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
9634         whose class has no cctor.
9635
9636         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
9637
9638 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
9639
9640         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
9641         unverified.
9642
9643 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
9644
9645         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
9646         to be in sync with the code on the linear IR branch.
9647
9648         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
9649
9650         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
9651
9652 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
9653
9654         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
9655
9656         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
9657
9658         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
9659
9660         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
9661
9662         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
9663         
9664         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
9665         body.
9666
9667 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
9668
9669         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
9670         OP_LOADR4_MEMBASE emission.
9671
9672         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
9673         (mono_spillvar_offset_float): Ditto.
9674
9675         * mini-mips.c (mono_arch_emit_prolog): Ditto.
9676
9677         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
9678         emission.
9679
9680         * basic-long.cs: Add regression tests for them.
9681
9682         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
9683         use.
9684         (mono_arch_allocate_vars): Fix representation of single-precision float
9685         argument.
9686         (mono_arch_output_basic_block): Ditto.
9687
9688         * inssel-mips.brg: Ditto, remove duplicate items.
9689
9690         * mini-mips.c (emit_load_volatile_arguments): New function to handle
9691         arguments of tail calls as on other platforms.
9692         (mono_arch_output_basic_block): Handle tail calls.
9693
9694         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
9695         register.
9696
9697         * objects.cs (test_5_pass_static_struct): Add test for it.
9698
9699         Contributed under MIT/X11 license.
9700
9701 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
9702
9703         * Makefile.am: Use gmcs for compiling the regression tests.
9704
9705         * *.2.cs *.2.il: Rename to *.cs and *.il.
9706
9707 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
9708
9709         * regalloc.h: Make the vassign array smaller.
9710
9711         * mini.c (mini_method_compile): Remove an unused field in cfg.
9712
9713         * mini-codegen.c: Add a bunch of micro optimizations.
9714
9715 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
9716
9717         * regalloc.h: Remove some unused fields.
9718
9719 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
9720
9721         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
9722
9723         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
9724
9725 2008-02-22  Mark Probst  <mark.probst@gmail.com>
9726
9727         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
9728
9729         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
9730         trampoline: Fetch an entry from the runtime generic context.  If
9731         it's NULL, jump to the actual trampoline to fill the runtime
9732         generic context.  Otherwise, return it.
9733
9734         * mini.c: Call the lazy fetch trampoline to get entries out of the
9735         runtime generic context.
9736
9737         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
9738         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
9739         tramp-sparc.c: Stubs for the lazy fetch trampoline.
9740
9741 2008-02-21  Mark Probst  <mark.probst@gmail.com>
9742
9743         * mini.c: Fetch data out of the extensible part of the runtime
9744         generic context instead of calling a helper function.
9745
9746         * generic-sharing.c: Some functions moved into
9747         metadata/generic-sharing.c.  Helper function for fetching other
9748         types now checks and asserts against extensible rgctx (just for
9749         debugging purposes - the helper function isn't called anymore
9750         unless for debugging).
9751
9752 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
9753
9754         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
9755         for tail calls up to the point that the tests in iltests.exe run. Also add a
9756         dummy CKFINITE implementation.
9757         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
9758         needed for trampoline LMF frames.
9759
9760         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
9761         trampoline LMF frames.
9762
9763 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
9764
9765         * mini.c (inline_method): clean any pending loader error when inlining fail.
9766         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
9767
9768 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
9769
9770         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
9771
9772         * aot-runtime.c (decode_patch_info): Ditto.
9773
9774         * mini.c (mono_resolve_patch_target): Ditto.
9775         
9776         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
9777         icall wrappers.
9778
9779         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
9780         
9781         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
9782         if it references an icall address.
9783
9784 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
9785
9786         * cpu-s390x.md: Remove some more unused opcodes.
9787         
9788         * cpu-s390x.md: Remove some unused opcodes.
9789
9790         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
9791         mono_op_imm_to_op ().
9792
9793         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
9794         instead of a switch statement.
9795         
9796         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
9797         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
9798
9799         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
9800         
9801         * mini-codegen.c: Remove unused mono_regstate2_... functions.
9802
9803         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
9804         -1.
9805
9806 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
9807
9808         * driver.c (mono_main): Improve error reporting when an assembly cannot be
9809         opened. Fixes #362607.
9810
9811         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
9812
9813         * iltests.il.in: Add a test for static methods in interfaces.
9814
9815 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
9816
9817         * genmdesc.c (build_table): Fix a crash on older glib versions.
9818
9819         * cpu-sparc.md: Remove some unused opcodes.
9820         
9821         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
9822         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
9823
9824         * cpu-amd64.md: Remove some unused opcodes.
9825
9826         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
9827         like the other opcodes.
9828
9829 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
9830
9831         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
9832
9833         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
9834
9835         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
9836         variables 'cfg' instead of 'm' for consistency.
9837
9838         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
9839
9840         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
9841         argument holding the vtype return address, to avoid the ambigious use of
9842         cfg->ret for this purpose.
9843
9844         * mini.c (NEW_RETLOADA): Use vret_addr if set.
9845
9846         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
9847         
9848         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
9849         new mono_print_ins () function which only takes one argument.
9850
9851 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
9852
9853         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
9854         macro arguments.
9855
9856 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
9857
9858         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
9859
9860         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
9861
9862         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
9863         opcodes and other small changes.
9864
9865         * mini-ops.h: Add some new opcodes from the linear IR branch.
9866
9867         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
9868
9869         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
9870         opcodes, use the REG_MEMBASE opcodes instead.
9871         
9872         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
9873         opcodes, use the REG_MEMBASE opcodes instead.
9874         
9875         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
9876         linear IR branch.
9877
9878         * mini.c (mono_op_imm_to_op): New helper function.
9879
9880         * mini-ops.h: Add some opcodes from linear IR branch.
9881
9882 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
9883
9884         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
9885         <tsv@solvo.ru>.
9886
9887 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
9888
9889         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
9890         OP_ICONV_TO_R4/R8.
9891
9892         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
9893
9894 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
9895
9896         * aot-compiler.c (emit_method_code): Add an assert.
9897
9898         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
9899         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
9900         methods.
9901
9902 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
9903
9904         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
9905         some load/store opcodes so they are consistent. 
9906         (mono_arch_emit_prolog): Simplify some code.
9907
9908         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
9909
9910         * objects.cs: Add tests for large argument offsets on ARM.
9911
9912         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
9913         stack offsets. Fixes #359651.
9914
9915         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
9916
9917         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
9918
9919         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
9920
9921         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
9922
9923         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
9924
9925         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
9926         rid of CEE_CONV_R_UN.
9927
9928         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
9929
9930 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
9931
9932         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
9933
9934         * mini.c (mono_normalize_opcodes): Add some more opcodes.
9935
9936         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
9937
9938         * cpu-amd64.md: Remove some unused opcodes.
9939
9940         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
9941
9942         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
9943
9944         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
9945         arch specific functions for its parts. Call the peephole pass after local
9946         regalloc so the prolog can compute a more accurate max_offset.
9947         
9948         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
9949         the corresponding OP_I/OP_L opcodes.
9950
9951         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
9952
9953         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
9954
9955 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
9956
9957         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
9958         as they are handled in mini.c.
9959
9960         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
9961         
9962         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
9963         case since it is handled in mini.c.
9964
9965         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
9966
9967         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
9968
9969         * *.c: Use the new opcodes in the IR and back end code.
9970
9971         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
9972
9973         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
9974
9975 2008-02-06  Mark Probst  <mark.probst@gmail.com>
9976
9977         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
9978         an assert because it has a race condition.
9979
9980 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
9981
9982         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
9983
9984         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
9985
9986         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
9987
9988         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
9989         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
9990
9991 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
9992
9993         * cpu-amd64.md (move): Correct the maximum size of move.
9994
9995 2008-02-05  Mark Probst  <mark.probst@gmail.com>
9996
9997         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
9998         the generic class init trampoline to return quickly if the class
9999         is already inited.
10000
10001 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
10002
10003         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
10004         issues where an 32 bit callsite cannot be patched by a 64 bit address.
10005
10006 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
10007
10008         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
10009         branch.
10010
10011 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
10012
10013         * objects.cs: Add some soft-float tests.
10014
10015         * mini.c: Fix a couple more soft-float issues.
10016
10017         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
10018
10019         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
10020         avoid a REX prefix.
10021
10022 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
10023
10024         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
10025         exception happens while compiling a virtual method.
10026
10027 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
10028
10029         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
10030         
10031         * mini-sparc.c: Fix build.
10032
10033         * mini-sparc.c (get_call_info): Add support for generic sharing.
10034
10035         * mini-exceptions.c: Add a FIXME.
10036
10037 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
10038
10039         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
10040         altstack handling code.
10041
10042         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
10043         
10044         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
10045
10046         * mini-s390.c: Add support for generic sharing.
10047
10048         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
10049         Fix CAS on s390.
10050         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
10051
10052         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
10053
10054         * mini-s390x.c: Add support for generic sharing.
10055         
10056         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
10057         Fix CAS on ia64.
10058         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
10059
10060         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
10061         can be used since it takes a 16 bit signed immediate.
10062
10063         * inssel-s390x.brg: Fix OP_SETRET.
10064
10065         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
10066
10067         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
10068
10069         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
10070
10071         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
10072
10073         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
10074         in one place.
10075
10076         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
10077         stuff.
10078
10079         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
10080         of the unused mono_arch_patch_delegate_trampoline stuff.
10081
10082 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
10083
10084         * basic-long.cs: Move the fp related tests to basic-float.cs.
10085
10086         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
10087
10088         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
10089
10090         * basic-calls.cs: Add a test for proper float argument passing.
10091
10092         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
10093         if the context corresponds to an exception received through a signal.
10094
10095         * exceptions.cs: Add a test for nullref handling at the start of a try
10096         clause.
10097
10098         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
10099
10100         * jit-icalls.c (mono_break): New JIT icall.
10101
10102         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
10103
10104         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
10105
10106 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
10107
10108         * cpu-*.md: Get rid of unused opcodes.
10109
10110         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
10111
10112         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
10113         by all platforms.
10114
10115         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
10116         define.
10117
10118         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
10119         the arch independent trampoline code in mini-trampolines.c.
10120
10121         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
10122
10123         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
10124
10125         * mini-s390.h: Remove an unused define.
10126         
10127         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
10128         the arch independent trampoline code in mini-trampolines.c.
10129
10130         * mini-arm.c (mono_arch_emit_prolog): Fix build.
10131
10132 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
10133
10134         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
10135
10136         * mini-s390.c (mono_arch_emit_prolog): Fix build.
10137
10138         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
10139
10140         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
10141
10142         * cpu-amd64.md: Use smaller sizes for int opcodes.
10143
10144         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
10145
10146         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
10147         objects.cs.
10148
10149         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
10150         debugging.
10151
10152         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
10153         instead of though a pointer to save an indirection when accessing elements of
10154         the array.
10155
10156         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
10157         some typos.
10158         (NOT_IMPLEMENTED): New helper macro.
10159         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
10160         of a bb.
10161
10162         * *.c: Use the new helper macro.
10163
10164 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
10165
10166         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
10167
10168 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
10169
10170         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
10171         stack slots.
10172
10173 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
10174
10175         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
10176         profiling is enabled.
10177         
10178         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
10179         the end.
10180         (mono_arch_emit_prolog): Add more first bblock optimizations.
10181
10182         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
10183         in order if possible.
10184         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
10185         bblock, since the arguments are still in their original registers.
10186
10187         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
10188
10189 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
10190
10191         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
10192         as well.
10193
10194         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
10195         offset 0.
10196
10197         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
10198
10199         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
10200         process async exceptions received while in unmanaged code.
10201
10202         * mini.c (mini_init): Install a callback with the runtime which will be called
10203         when a thread receives an async exception while in unmanaged code.
10204
10205         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
10206
10207         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
10208
10209 2008-01-16  Wade Berrier  <wberrier@novell.com>
10210
10211         * cpu-g4.md:
10212         * cpu-arm.md:
10213         * cpu-s390x.md:
10214         fix build
10215
10216 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
10217
10218         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
10219         compilation with sun cc.
10220
10221         * cpu-*.md: Fix the build.
10222
10223         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
10224
10225         * mini-amd64.h: Add some comments to the MonoLMF structure.
10226
10227         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
10228         
10229         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
10230         in the LMF structure if possible. This saves two instructions in the
10231         managed->native wrappers.
10232
10233         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
10234
10235 2008-01-16  Mark Probst  <mark.probst@gmail.com>
10236
10237         * generic-sharing.c: New type argument lookup code which uses the
10238         runtime generic context template.
10239
10240 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
10241
10242         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
10243
10244         * mini-arm.c (add_general): Fix arm eabi parameter passing.
10245         (mono_arch_output_basic_block): Fix localloc implementation.
10246
10247         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
10248
10249         * mini-ia64.c (peephole_pass): Fix ia64 build.
10250
10251         * mini-amd64.c (peephole_pass): Fix a warning.
10252         
10253         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
10254         at a constant offset from sp/fp.
10255
10256         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
10257         instead of obtaining it from *lmf in the managed method case.
10258
10259 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
10260
10261         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
10262
10263 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
10264
10265         * mini.h (MonoInstList): New type.
10266         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
10267         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
10268         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
10269         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
10270         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
10271         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
10272         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
10273         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
10274         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
10275         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
10276         MONO_INST_LIST_FOR_EACH_ENTRY,
10277         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
10278         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
10279         mono_inst_list_first, mono_inst_list_last,
10280         mono_inst_list_next, mono_inst_list_prev): New instruction
10281         list handling interfaces.
10282         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
10283         list head 'ins_list'.
10284         (MonoInst): Replace next pointer with list head 'node'.
10285         (MonoCallInst): Make 'out_args' a MonoInstList.
10286         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
10287         (MonoCompile): Delete reverse_inst_list and
10288         reverse_inst_list_len.
10289         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
10290         mono_arch_lowering_pass, mono_arch_local_regalloc,
10291         mono_arch_output_basic_block, mono_arch_emit_prolog):
10292         Convert to new instruction lists.
10293         (insert_after_ins): Delete.
10294         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
10295         instruction lists.
10296         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
10297         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
10298         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
10299         mono_emulate_opcode, mono_emit_load_got_addr,
10300         inline_method, mono_method_to_ir, mono_print_bb_code,
10301         print_dfn, decompose_pass, nullify_basic_block,
10302         replace_out_block_in_code, remove_block_if_useless,
10303         merge_basic_blocks, move_basic_block_to_end,
10304         try_unsigned_compare, optimize_branches, mono_print_code,
10305         mini_select_instructions, remove_critical_edges): Likewise.
10306         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
10307         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
10308         mono_arch_output_basic_block, mono_arch_emit_prolog):
10309         Likewise.
10310         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
10311         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
10312         mono_arch_output_basic_block): Likewise.
10313         (inst_list_prepend, insert_after_ins): Delete.
10314         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
10315         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
10316         instruction lists.
10317         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
10318         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
10319         mono_arch_emit_prolog): Likewise.
10320         * cfold.c (mono_constant_fold): Likewise.
10321         * liveness.c (visit_bb, mono_analyze_liveness,
10322         optimize_initlocals): Likewise.
10323         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
10324         * graph.c (mono_draw_code_cfg): Likewise.
10325         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
10326         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
10327         mono_ssa_cprop): Likewise.
10328         * abcremoval (get_relations_from_previous_bb, process_block):
10329         Likewise.
10330         * local-propagation (mono_cprop_invalidate_values,
10331         mono_local_cprop_bb): Likewise.
10332         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
10333         peephole_pass, mono_arch_output_basic_block,
10334         mono_arch_emit_prolog): Likewise.
10335         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
10336         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
10337         mono_arch_emit_prolog): Likewise.
10338         (insert_after_ins): Delete.
10339         * aliasing.c (print_code_with_aliasing_information,
10340         mono_build_aliasing_information, mono_aliasing_deadce):
10341         Convert to new instruction lists.
10342         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
10343         peephole_pass, NEW_INS, mono_arch_lowering_pass,
10344         mono_arch_local_regalloc, mono_arch_output_basic_block):
10345         Likewise.
10346         (insert_after_ins): Delete.
10347         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
10348         peephole_pass, mono_arch_output_basic_block): Convert to
10349         new instruction lists.
10350         * mini-codegen (InstList, inst_list_prepend,
10351         insert_after_ins): Delete.
10352         (insert_before_ins, get_register_force_spilling,
10353         get_register_spilling, free_up_ireg, free_up_reg,
10354         create_copy_ins, create_spilled_store, alloc_int_reg,
10355         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
10356         to new instruction lists.
10357         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
10358         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
10359         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
10360         (insert_after_ins): Delete.
10361         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
10362         mono_arch_local_regalloc, mono_arch_output_basic_block,
10363         mono_arch_call_opcode): Convert to new instruction lists.
10364         (insert_after_ins): Delete.
10365         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
10366         peephole_pass, mono_arch_output_basic_block,
10367         mono_arch_emit_prolog): Convert to new instruction lists.
10368
10369 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
10370
10371         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
10372
10373         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
10374         Fixes #353182.
10375
10376         * Makefile.am (version.h): Make this work with non-bash shells.
10377
10378 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
10379
10380         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
10381
10382 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
10383
10384         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
10385         the InitializeArray optimization.
10386
10387 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
10388
10389         * mini.c driver.c: Don't include os/gc_wrapper.h.
10390
10391 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
10392
10393         * mini.c (print_jit_stats): Print GC statistics if available.
10394
10395 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
10396
10397         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
10398
10399 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
10400
10401         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
10402
10403 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
10404
10405         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
10406         
10407         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
10408
10409         * driver.c (mono_main): Ditto.
10410
10411 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
10412
10413         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
10414
10415         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
10416         in the vtable can't be encoded.
10417         (compile_method): Ditto.
10418
10419 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
10420
10421         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
10422         defined.
10423
10424         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
10425         lmf->rbp.
10426
10427         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
10428         the top LMF entry belongs to the current method.
10429
10430         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
10431
10432 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
10433
10434         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
10435         
10436         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
10437
10438         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
10439
10440         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
10441
10442         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
10443
10444         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
10445         implementation.
10446
10447         * basic-float.cs: Add an ulong->double cast test.
10448
10449 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
10450
10451         * mini.c (mono_method_to_ir): Fix a warning.
10452
10453 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
10454
10455         * mini-ops.h: Add OP_SWITCH.
10456
10457         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
10458         CEE_SWITCH in back-end code, use OP_SWITCH instead.
10459
10460 2007-12-11  Geoff Norton  <gnorton@novell.com>
10461
10462         * mini-s390x.c: Minor change to the MAX() define to allow
10463         it to compile with other gcc versions.
10464
10465 2007-12-11  Geoff Norton  <gnorton@novell.com>
10466
10467         * cpu-s390x.md:
10468         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
10469
10470 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
10471
10472         exceptions-arm.c (mono_arch_get_restore_context): Restore
10473         the frame pointer.
10474
10475         exceptions-arm.c (throw_exception): Save the frame pointer.
10476         This is a partial fix for #323747. Only the client side is
10477         fixed.
10478
10479 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
10480
10481         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
10482         was using an unrelated variable to log the class which
10483         needed the cctor to be called. This was crashing on arm.
10484
10485 2007-12-09  Robert Jordan  <robertj@gmx.net>
10486
10487         * mini-x86.c (mono_arch_emit_epilog):
10488         Consider all kinds of 64-bit types. Fixes #323114.
10489
10490 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
10491
10492         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
10493
10494 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
10495
10496         * mini-amd64.c (peephole_pass): Add a missing instruction check.
10497
10498 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
10499
10500         * mini.c: run type ctor before allocating an object, not only
10501         when running it's constructor method (fixes at least part of bug #342507).
10502
10503 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
10504         
10505         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
10506         
10507         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
10508         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
10509         function.
10510
10511         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
10512         mono_generic_class_init_trampoline () the same as it is done with the other
10513         trampolines.
10514
10515         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
10516         aot-runtime.c aot-compiler.c: Implement AOT support.    
10517
10518 2007-12-07  Mark Probst  <mark.probst@gmail.com>
10519
10520         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
10521         build for archs which don't have the vtable trampoline defined
10522         yet.
10523
10524 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
10525
10526         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
10527
10528         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
10529
10530         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
10531
10532         * tramp-<ARCH>.c: Use the new helper function.
10533
10534 2007-12-07  Mark Probst  <mark.probst@gmail.com>
10535
10536         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
10537         trampoline call, which takes a vtable argument.
10538
10539         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
10540         OP_TRAMPCALL_VTABLEs like other calls.
10541
10542         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
10543         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
10544         call.  Implemented a support function which fetches the vtable
10545         from a register set.
10546
10547         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
10548         Implemented a generic class init trampoline, using the
10549         OP_TRAMPCALL_VTABLE opcode.
10550
10551         * mini.c: Implemented static field access when sharing generic
10552         code.  This implies initing the class using the new
10553         OP_TRAMPCALL_VTABLE call.
10554
10555 2007-12-07  Mark Probst  <mark.probst@gmail.com>
10556
10557         * mini.c: Don't compile methods with sharing enabled if their
10558         classes are disabled for sharing.
10559
10560 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
10561
10562         * inssel.brg: Add a missing sign extension to the GETCHR and array access
10563         opcodes. Fixes #346563.
10564
10565         * objects.cs: Add a new test.
10566
10567         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
10568
10569         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
10570         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
10571
10572 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
10573
10574         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
10575
10576 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
10577
10578         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
10579         code stream.
10580
10581 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
10582
10583         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
10584
10585         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
10586         optimization in the AOT case.
10587         
10588 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
10589
10590         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
10591         
10592         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
10593
10594         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
10595
10596         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
10597
10598         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
10599         is created by the inlined delegate ctor.
10600
10601         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
10602
10603         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
10604
10605 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
10606
10607         * cpu-x86.md: Fix the length of ckfinite.
10608
10609 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
10610
10611         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
10612         
10613         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
10614         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
10615
10616         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
10617
10618         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
10619         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
10620
10621 2007-11-28  Martin Baulig  <martin@ximian.com>
10622
10623         * mini-x86.c
10624         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
10625         after creating the trampoline.
10626
10627 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
10628
10629         * aot-runtime.c (load_aot_module): Check runtime version if needed.
10630
10631         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
10632         the same version.
10633
10634         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
10635         instead of the calling method to help AOT.
10636
10637         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
10638
10639 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
10640
10641         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
10642         is defined.
10643
10644 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
10645
10646         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
10647         
10648         * aot-compiler.c (compile_method): Correct check for generic method definitions.
10649         (encode_method_ref): No need to handle generic method definitions specially.
10650
10651         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
10652
10653         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
10654         decode_klass_info.
10655
10656         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
10657         encode_klass_info.
10658         (compile_method): Enable generic sharing.
10659
10660 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
10661
10662         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
10663         (mini_method_compile): Add preliminary support for AOTing shared generic code.
10664
10665         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
10666         generic code.
10667
10668         * mini-trampolines.c: Fix a warning.
10669
10670         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
10671         NEW_PCONST.
10672         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
10673         (generic_class_is_reference_type): Remove unused function.
10674
10675         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
10676         in the generic vtable trampoline case.
10677
10678         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
10679         
10680         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
10681         return an AOT method based on a vtable slot.
10682
10683         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
10684
10685         * mini.c (mini_get_vtable_trampoline): Export this.
10686
10687 2007-11-22  Martin Baulig  <martin@ximian.com>
10688
10689         * debug-debugger.h
10690         (MonoDebuggerInfo): Move `debugger_version' up.
10691
10692 2007-11-22  Martin Baulig  <martin@ximian.com>
10693
10694         * mini-amd64.c
10695         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
10696
10697         * mini-trampolines.c
10698         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
10699         after compiling the method.
10700
10701 2007-11-20  Martin Baulig  <martin@ximian.com>
10702
10703         * debug-mini.c
10704         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
10705         (mono_debugger_remove_breakpoint): Likewise.
10706         (mono_debugger_check_breakpoints): Likewise.
10707
10708         * debug-debugger.c: Implement the new breakpoint interface here.
10709
10710 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
10711
10712         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
10713         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
10714
10715         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
10716
10717 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
10718
10719         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
10720
10721         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
10722         mini.c.
10723
10724         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
10725         mini.c.
10726
10727         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
10728         returning a vtype in a register.
10729
10730         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
10731         here from the arch specific code.
10732
10733         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
10734         mini.c.
10735
10736         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
10737         (mono_arch_emit_prolog): Increment maximum prolog size.
10738
10739         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
10740         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
10741
10742         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
10743         MonoGenericSharingContext.
10744
10745         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
10746         MonoGenericSharingContext. Allocate memory from the cfg mempool.
10747
10748 2007-11-15  Mark Probst  <mark.probst@gmail.com>
10749
10750         * mini.c, mini.h, generic-sharing.c: Functions for producing code
10751         which extract fields out of the runtime generic context.  Full
10752         sharing of the NEWARR opcode.
10753
10754 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
10755
10756         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
10757         --enable-minimal=ssa.
10758
10759 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
10760
10761         * mini-trampolines.c (mono_delegate_trampoline): Update after 
10762         mono_marshal_get_delegate_invoke () signature change.
10763
10764 2007-11-13  Mark Probst  <mark.probst@gmail.com>
10765
10766         * mini.c: Removed the shared context in favor of the generic
10767         sharing context.  Allocate the MonoJitInfo structure with room for
10768         the generic sharing context if it's needed.
10769
10770         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
10771         domain-internals.h now.
10772
10773         * mini-x86.c: Pass the generic sharing context to get_call_info ().
10774
10775         * generic-sharing.c: Several changes for working without a shared
10776         context and instead operating on open types instead.
10777
10778 2007-11-12  David S. Miller  <davem@davemloft.net>
10779
10780        * inssel-sparc.brg: Fix double instruction emit.
10781
10782 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
10783
10784         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
10785         Get/Set/Address methods.
10786         
10787         * mini.c debug-debugger.c mini-trampolines.c: Update after 
10788         mono_marshal_get_delegate_invoke signature change.
10789
10790 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
10791
10792         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
10793         This can happens with dynamic methods. Fixes the other bug in #322722.
10794
10795 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
10796
10797         * tramp-arm.c (mono_arch_patch_callsite): Support patching
10798         BX call sequence.
10799
10800         * mini-arm.c (arm_patch): Implement patching of BX call
10801         sequence. Fixes one of the bugs in #322722.
10802
10803 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
10804
10805        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
10806        under Linux.  We only need to flush every 32-byte cache line.    
10807
10808 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
10809
10810         * mini.c:
10811         move_basic_block_to_end: Add branches when needed, eventually creating
10812         a new BB.
10813         optimize_branches: added a parameter that tells if it's ok to create
10814         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
10815         and avoid calling move_basic_block_to_end when it's not ok.
10816         Fixes bug 318677.
10817
10818 2007-11-07  Mark Probst  <mark.probst@gmail.com>
10819
10820         * mini.c: Abort inlining call to InitializeArray if something
10821         looks wrong.  Let the icall handle it, which now has proper safety
10822         checks.
10823
10824 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
10825
10826         * mini.c (mono_spill_call): add support for soft-float.
10827
10828         * mini.c (mono_method_to_ir): add support for soft-float
10829         to inlined functions that return float.
10830
10831         * mini.c (mono_method_to_ir): add support for soft-float
10832         to cee_stsfld opcode on float fields.
10833
10834 2007-11-05  Geoff Norton  <gnorton@novell.com>
10835
10836         * mini-x86.h: Fix the structure access for X86 Leopard.
10837
10838
10839 2007-11-05  Martin Baulig  <martin@ximian.com>
10840
10841         * mini-trampolines.c
10842         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
10843         after compiling the method to notify the debugger.
10844
10845 2007-11-05  Martin Baulig  <martin@ximian.com>
10846
10847         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
10848
10849 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
10850
10851         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
10852         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
10853
10854 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
10855
10856         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
10857         native-to-managed wrappers.
10858         
10859 2007-11-01  Geoff Norton  <gnorton@novell.com>
10860
10861         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
10862         members.
10863
10864 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
10865
10866         * mini.c, mini-x86.c: when getting back from unmanaged code
10867         to managed via a marshaled delegate we also need to set the
10868         right domain.
10869
10870 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
10871
10872         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
10873         for amd64.
10874
10875 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
10876
10877         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
10878         let the debugger or other external agents to tell the JIT when
10879         a sw breakpoint has been inserted in the code that the JIT needs
10880         to be able to inspect.
10881
10882 2007-10-31  Martin Baulig  <martin@ximian.com>
10883
10884         * debug-debugger.h
10885         (MonoDebuggerInfo): Remove `runtime_class_init'.
10886
10887 2007-10-30  Martin Baulig  <martin@ximian.com>
10888
10889         * debug-mini.h
10890         (mono_debugger_thread_created): Added `MonoThread *' argument.
10891         (mono_debugger_extended_notification): New public method.
10892         (mono_debugger_trampoline_compiled): New public method.
10893
10894         * debug-mini.c
10895         (MonoDebuggerThreadInfo): Added `thread' and
10896         `extended_notifications' fields.
10897
10898         * debug-debugger.c
10899         (debugger_executable_code_buffer): New static variable.
10900
10901         * debug-debugger.h
10902         (MonoDebuggerInfo): Added `executable_code_buffer',
10903         `executable_code_buffer_size', `breakpoint_info_area',
10904         `breakpoint_table' and `breakpoint_table_size'.
10905
10906 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
10907
10908         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
10909         that IP  either is an unused value or the vtable pointer. IMT 
10910         calls use vtable + offset now. Reduced by almost half the size
10911         of IMT entries.
10912
10913 2007-10-26  Jonathan Chambers <joncham@gmail.com>
10914
10915         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
10916         defines to access param registers. Replace long usage with
10917         gsize as sizeof(long) != sizeof(void*) on Win64.
10918
10919         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
10920         on Win64. Fix intrinsic, use _AddressOfReturnAddress
10921         instead of non-existant _GetAddressOfReturnAddress.
10922
10923         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
10924         param registers. Save/restore %rdi and %rsi in MonoLMF.
10925
10926         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
10927         param registers. Modify (throw_exception) signature to take 
10928         %rdi and %rsi on Win64. 
10929
10930         Code is contributed under MIT/X11 license.
10931
10932 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
10933
10934         * helpers.c: unlink debugging output files.
10935
10936 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
10937
10938         * mini.c: Move mono_create_ftnptr () to object.c.
10939
10940 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
10941
10942         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
10943         optional. This function can now be used to disassemble code generated
10944         outside the JIT such as trampolines and IMT thunks.
10945
10946         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
10947
10948         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
10949         vtable pointer from a ldr instruction.
10950
10951         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
10952         new IMT call sequence.
10953
10954         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
10955         call sequence for interface invocations.
10956
10957         * mini-arm.c (mono_arch_emit_imt_argument): added, required
10958         for imt support. This function is empty since IMT on ARM requires no
10959         special handling on the IR side.
10960
10961         * mini-arm.c (mono_arch_find_imt_method): added, required for
10962         imt support.
10963
10964         * mini-arm.c (mono_arch_find_this_argument): added, required
10965         for imt support.
10966
10967         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
10968         a ldr instruction to load a value stored in the code stream.
10969
10970         * mini-arm.c (mono_arch_build_imt_thunk):added, required
10971         for imt support.
10972
10973
10974 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
10975
10976         * mini.c (mini_init): Install the jump trampoline callback.
10977
10978 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
10979
10980         * mini-trampolines.c: handle synchronized methods with the common
10981         vtable trampoline (bug #335601).
10982
10983 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
10984
10985         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
10986
10987         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
10988         64 bit platforms.
10989
10990         * mini-ia64.h mini-ia64.c: Add support for IMT.
10991
10992         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
10993         prolog. Fixes #331958.
10994
10995 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
10996
10997         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
10998
10999 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
11000
11001         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
11002         trampoline.
11003
11004 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
11005
11006         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
11007         trampoline.
11008
11009 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
11010
11011         * mini-x86.c, mini-x86.h: x86 support for the common vtable
11012         trampoline.
11013
11014 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
11015
11016         * mini-trampolines.c: changed the magic rampoline to understand
11017         the common vtable trampoline method: the method to invoke is
11018         determined by the vtable displacement of the call.
11019
11020 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
11021
11022         * mini.c, mini.h: register the common vtable trampoline if the
11023         architecture supports it.
11024
11025 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
11026
11027         * cpu-amd64.md: use the correct max length for tls_get.
11028
11029 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
11030
11031         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
11032         CEE_STELEM_ANY. Fixes #333696.
11033
11034 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
11035
11036         * exceptions-x86.c: provide more graceful handling of the case where
11037         we followed a bogus function pointer from managed code (bug #332866).
11038
11039 2007-10-11  Mark Probst  <mark.probst@gmail.com>
11040
11041         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
11042         replaces the generic_shared flag and will carry more information
11043         in the future.
11044
11045         * generic-sharing.c: Added mini_type_stack_size() which allows
11046         allows open types if given a generic sharing context.
11047         mini_get_basic_type_from_generic() takes a
11048         MonoGenericSharingContext* instead of a MonoCompile* now.
11049
11050         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
11051         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
11052         mini-sparc.c, mini-x86.c: Trivial changes required by the two
11053         changes above.  Just passing arguments through to the right
11054         places.
11055
11056 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
11057
11058         * mini-arm.c: unify the call emission to emit_code_seq().
11059
11060 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
11061
11062         * tramp-arm.c: reduced the trampoline size.
11063
11064 2007-10-10  Mark Probst  <mark.probst@gmail.com>
11065
11066         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
11067         variable handling out of arch-specific code.
11068
11069 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
11070
11071         * mini-arm.c: implemented fast delegate dispatch.
11072
11073 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
11074
11075         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
11076         that fp elimination is turned off if the space required by locals is too
11077         big. Fixes #331958.
11078
11079 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
11080
11081         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
11082         ARM to the new style trampoline.
11083
11084 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
11085
11086         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
11087
11088         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
11089
11090 2007-10-09  Martin Baulig  <martin@ximian.com>
11091
11092         * debug-debugger.h
11093         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
11094         `field_info_offset_offset'.     
11095
11096 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
11097
11098         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
11099         removed more internal usage of the r11 register and made it available
11100         to the register allocator.
11101
11102 2007-10-08  Mark Probst  <mark.probst@gmail.com>
11103
11104         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
11105         when sharing generics and treat type variables as references.
11106
11107 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
11108
11109         * mini-ppc.c: started removing the internal uses of register r11
11110         to eventually allow the register allocator to manage it as an
11111         additional available register.
11112
11113 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
11114
11115         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
11116
11117 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
11118
11119         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
11120         specific trampolines as they are not performance critical as a jump
11121         target (maybe align as before only for AOT code?). This saves about
11122         200 KB of native code on x86 for monodevelop startup.
11123
11124 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
11125
11126         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
11127         monodevelop startup.
11128
11129 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
11130
11131         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
11132
11133         * mini-sparc.h mini-sparc.c: Implement IMT support.
11134
11135         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
11136         its smaller and doesn't clobber sparc_g1.
11137
11138         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
11139
11140 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
11141
11142         * mini-ppc.c: optimized the size of the IMT thunks a bit.
11143
11144 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
11145
11146         * mini-ppc.c: implemented fast delegate invocation.
11147
11148 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
11149
11150         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
11151
11152 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
11153
11154         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
11155         code to the new style trampoline in preparation for IMT support.
11156
11157 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
11158
11159         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
11160         systems already. This also reduces the specific trampiline sizes and
11161         prepares for the use of r12 as the IMT identifier register.
11162
11163 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
11164
11165         * mini-mips.h: endianess fix (simplified from a patch by
11166         Thomas Kunze <thommy@tabao.de>, bug #323737).
11167
11168 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
11169
11170         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
11171         to access ucontext fields and enable netbsd support
11172         (partially from Magnus Henoch <mange@freemail.hu>).
11173
11174 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
11175
11176         * genmdesc.pl: patch from Henryk Plotz <henryk@openmoko.org> to
11177         use the preprocessor from the CPP env var if it is set.
11178
11179 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
11180
11181         * mini-trampolines.c: fixed an assertion and moved it earlier in the
11182         code, before interface_offset gets used.
11183
11184 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
11185
11186         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
11187         mono_class_setup_vtable () before accessing klass->vtable.
11188
11189 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
11190
11191         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
11192         hackish.
11193
11194 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
11195
11196         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
11197         IMT slots (this saves hundreds of KB of memory in programs like
11198         IronPython and Monodevelop).
11199
11200 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
11201
11202         * mini.c: print the delegate counter.
11203
11204 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
11205
11206         * mini-x86.c: make it easier to enable the debugging code for IMT
11207         slots.
11208
11209 2007-09-28  Martin Baulig  <martin@ximian.com>
11210
11211         * debug-debugger.h
11212         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
11213         `mono_method_klass_offset' and `mono_method_token_offset'.
11214
11215 2007-09-20  Mark Probst  <mark.probst@gmail.com>
11216
11217         * mini.c: First generics sharing implementation.  Can only share
11218         in very simple cases.  If sharing doesn't work it falls back to
11219         dedicated compilation.
11220
11221         * mini.h: Flag in MonoCompile to specify whether generic
11222         compilation is shared.  Flags enum for marking which generic inst
11223         of a context is used.  Prototypes for helper functions.
11224
11225         * generic-sharing.c: Helper functions for generic method sharing.
11226
11227         * optflags-def.h: Optimization flag (gshared) for enabling generic
11228         method sharing added.
11229
11230         * Makefile.am: generic-sharing.c added.
11231
11232 2007-09-19 Daniel Nauck <dna@mono-project.de>
11233
11234         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
11235
11236 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
11237         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
11238         fixes bug 325507.
11239
11240 2007-09-19  Martin Baulig  <martin@ximian.com>
11241
11242         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
11243         mono_debug_cleanup() is now part of mono_cleanup().
11244
11245 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
11246
11247         * driver.c (mono_main): Fix a warning.
11248
11249 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
11250
11251         * aot-compiler.c: Optimize various parts when processing large assemblies.
11252         Fixes ##325568.
11253
11254         * mini.c (mono_patch_info_hash): Improve hash function.
11255
11256 2007-09-14  Jonathan Chambers <joncham@gmail.com>
11257
11258         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
11259         
11260         Code is contributed under MIT/X11 license.
11261
11262 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
11263
11264         * mini.c (mini_init): Fix a leak.
11265
11266         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
11267
11268 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
11269
11270         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
11271
11272 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
11273
11274         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
11275
11276 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
11277
11278         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
11279         variance tests.
11280
11281         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
11282
11283         * mini.c (handle_alloc): Enable managed allocators in AOT code.
11284
11285         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
11286
11287         * aot-runtime.c (decode_patch_info): Ditto.
11288
11289 2007-09-12  Jonathan Chambers <joncham@gmail.com>
11290
11291         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
11292         static case. Cache delegates in architecture specific code, 
11293         based on number of parameters.
11294         
11295         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
11296         in architecture specific code, based on number of parameters.
11297         
11298         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
11299         caching happen in architecture specific code now.
11300         
11301         Code is contributed under MIT/X11 license.
11302
11303 2007-09-12  Jonathan Chambers <joncham@gmail.com>
11304
11305         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
11306         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
11307         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
11308
11309         Code is contributed under MIT/X11 license.
11310
11311 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
11312         * mini.c: (mono_thread_abort) Fixed bug #82416.
11313
11314 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
11315
11316         * mini.: hook the new managed GC allocation feature into the JIT.
11317
11318 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
11319
11320         * mini.c: implementation for the new runtime tls opcode.
11321
11322 2007-09-11  Martin Baulig  <martin@ximian.com>
11323
11324         * debug-debugger.h
11325         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
11326         `mono_method_inflated_offset'.
11327
11328 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
11329
11330         * driver.c mini.h mini.c: Add a new devel command line option for injecting
11331         async exceptions into a method.
11332
11333         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
11334         purpose of testing whenever the unwinder works at every instruction.
11335
11336 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
11337
11338         * mini.c: check accessibility of method used in ldftn (fixes
11339         bug #82635).
11340
11341 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
11342
11343         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
11344
11345         * inssel.brg: Fix a warning.
11346
11347 2007-09-03  Martin Baulig  <martin@ximian.com>
11348
11349         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
11350         now takes the `main_method' as argument.
11351
11352 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
11353
11354         * cpu-sparc.md (endfilter): Add missing src1:i argument.
11355
11356 2007-08-30  Jonathan Chambers <joncham@gmail.com>
11357
11358         * driver.c: include the cil-coff.h header on Windows.
11359         
11360         Code is contributed under MIT/X11 license.
11361
11362 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
11363
11364         * mini.c, driver.c: don't include the cil-coff.h header.
11365
11366 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
11367
11368         * mini.c: flag places that needs fixes fo soft-float support.
11369
11370 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
11371
11372         * mini.h, inssel-float.brg: fix soft-float constant loads on big
11373         endian systems (partially from Dean Jenkins, bug #81924).
11374
11375 2007-08-28  Mark Probst  <mark.probst@gmail.com>
11376
11377         * mini.c (check_linkdemand): Remove embedded reference object in
11378         call to LinkDemandSecurityException.
11379         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
11380         with an IntPtr instead of a reference object.
11381
11382 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
11383
11384         * mini.c (handle_initobj): Handle alignment properly.
11385
11386         * inssel.brg (mini_emit_memset): Ditto. 
11387
11388         * inssel.brg (mini_emit_memcpy): Ditto. 
11389
11390         * inssel-sparc.brg: Ditto.              
11391
11392         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
11393
11394 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
11395
11396         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
11397         exceptions raised in unmanaged code. Fixes part of #82594.
11398
11399 2007-08-24  Mark Probst  <mark.probst@gmail.com>
11400
11401         * mini.c (mono_method_to_ir), declsec.c
11402         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
11403
11404 2007-08-22  Martin Baulig  <martin@ximian.com>
11405
11406         * debug-mini.h
11407         (MonoDebuggerThreadInfo): New typedef.
11408         (mono_debugger_thread_table): New global variable.
11409         (mono_debugger_thread_created): New public function.
11410         (mono_debugger_thread_cleanup): New public function.
11411
11412         * debug-debugger.h
11413         (MonoDebuggerInfo):
11414         - removed `get_current_thread' and `lookup_assembly'.
11415         - removed `data_table'.
11416         - added `thread_table'.
11417
11418         * mini.c
11419         (mono_thread_start_cb): Call mono_debugger_thread_created().
11420         (mono_thread_attach_cb): Likewise.
11421         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
11422         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
11423         initial domain.
11424
11425         * driver.c (mono_main): Move mono_debug_init() up, before calling
11426         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
11427
11428 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
11429
11430         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
11431         together when passing several arguments of type double (gives a small
11432         speedup and saves a few bytes of generated code).
11433
11434 2007-08-20  Jb Evain  <jbevain@novell.com>
11435
11436         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
11437
11438 2007-08-20  Jb Evain  <jbevain@novell.com>
11439
11440         * mini.c (mono_method_to_ir): throw MethodAccessException
11441         and FieldAccessException instead of InvalidProgramException.
11442
11443 2007-08-20  Mark Probst  <mark.probst@gmail.com>
11444
11445         * mini.c: CoreCLR security checks.
11446
11447         * mini.h: Removed MonoSecurityMode (moved to
11448         metadata/security-manager.h) and mono_security_mode global var
11449         (replaced by set/get functions in security-manager.h).
11450
11451         * driver.c: Added "core-clr-test" security mode for testing.  Used
11452         set-function for setting security mode.
11453
11454 2007-08-17  Mark Probst  <mark.probst@gmail.com>
11455
11456         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
11457         the new jit_info_table.
11458
11459         * driver.c: Test code for the new jit_info_table (enabled by the
11460         define MONO_JIT_INFO_TABLE_TEST).
11461
11462 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
11463
11464         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
11465         detection of call <REG> instruction sequence. Fixes build on freebsd.
11466
11467 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
11468
11469         * mini-exceptions.c: Fix a warning.
11470
11471 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
11472
11473         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
11474         stack overflow handling code on amd64 too.
11475
11476         * mini-exceptions.c (mono_setup_altstack): Make this use 
11477         mono_thread_get_stack_bounds ().
11478
11479         * mini-x86.h: Disable sigaltstack on solaris x86.
11480
11481 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
11482
11483         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
11484
11485 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
11486
11487         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
11488
11489 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
11490
11491         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
11492
11493         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
11494
11495 2007-08-03  Neale Ferguson <neale@sinenomine.net>
11496
11497         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
11498         due to alignment.
11499
11500 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
11501
11502         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
11503         to be emitted (bug #82281).
11504
11505 2007-08-01  Martin Baulig  <martin@ximian.com>
11506
11507         Merged the `debugger-dublin' branch.
11508
11509         * debug-debugger.h (MonoDebuggerInfo):
11510         Removed the `old_*' compatibility entries.
11511         Added `debugger_version' and `data_table'.
11512         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
11513         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
11514
11515         * debug-mini.c
11516         (MiniDebugMethodBreakpointInfo): Add `address_list'.
11517         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
11518         instead of a `gconstpointer'.
11519         (mono_debugger_insert_method_breakpoint): Return a
11520         `MonoDebugMethodAddressList *'.
11521
11522 2007-06-28  Martin Baulig  <martin@ximian.com>
11523
11524         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
11525
11526 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
11527
11528         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
11529         __builtin_frame_address () since it is broken on older gcc versions.
11530
11531 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
11532
11533         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
11534         on the stack overflow handling and made the managed stack overflows
11535         catchable in most cases using soft guard pages.
11536         * exceptions-x86.c: added code to restore the protection in the soft
11537         guard pages at the end of exception handling.
11538
11539 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
11540
11541         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
11542
11543 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
11544
11545         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
11546         exception handling.
11547
11548 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
11549
11550         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
11551         signal handling support until it has been ported to the new mechanism.
11552         * mini.c: fixed stack overflow detection and use the new
11553         architecture code  to handle signals on the altstack.
11554
11555 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
11556
11557         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
11558         stack overflows on the alt stack.
11559
11560 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
11561
11562         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
11563         stack overflows on the alt stack.
11564
11565 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
11566
11567         * exceptions-ppc.c: cleanup preparing for altstack support.
11568
11569 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
11570
11571         * exceptions-arm.c: cleanup preparing for altstack support.
11572
11573 2007-07-27  Mark Probst  <mark.probst@gmail.com>
11574
11575         * mini.c (print_jit_stats): Output hazard pointer stats.
11576
11577 2007-07-26  Mark Probst  <mark.probst@gmail.com>
11578
11579         * driver.c, mini.c: Replaced security mode flags with a single
11580         enum variable.
11581
11582 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
11583
11584         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
11585
11586 2007-07-25  Mark Probst  <mark.probst@gmail.com>
11587
11588         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
11589         (which doesn't do anything yet) for activating Core CLR
11590         (Silverlight) security.
11591
11592 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
11593
11594         * mini-codegen.c: work around a possible gcc bug on arm.
11595
11596 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
11597
11598         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
11599         message for platforms that don't support AOT compilation.
11600
11601 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
11602
11603         * mini.h, mini.c, driver.c: temporary smcs hack.
11604
11605 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
11606
11607         * mini-arm.h, mini-arm.c: arm EABI fixes.
11608
11609 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
11610
11611         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
11612         case.
11613
11614         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
11615         trampolines taking a method argument.
11616
11617         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
11618
11619         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
11620         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
11621
11622         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
11623         JIT compilation throws an exception. Fixes #82050.
11624
11625 2007-07-19  Mark Probst  <mark.probst@gmail.com>
11626
11627         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
11628         with the MONO_EXCEPTION_ defines.
11629
11630 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
11631
11632         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
11633         #82117.
11634         
11635         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
11636         the cause of an assertion.
11637
11638 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
11639
11640         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
11641         removed.
11642
11643 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
11644
11645         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
11646         assert. Should fix #82103.
11647
11648 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
11649
11650         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
11651         here too. Fixes #82095.
11652
11653         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
11654         addresses.
11655
11656         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
11657
11658         * mini-amd64.h: Enable IMT for amd64.
11659         
11660         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
11661
11662 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
11663
11664         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
11665
11666 2007-07-12  Mark Probst  <mark.probst@gmail.com>
11667
11668         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
11669         as soon as check_linkdemand sets an exception_type.
11670
11671 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
11672
11673         * mini-x86.c: fixed offsets for IMT call sequence.
11674         * mini-x86.h: enable IMT again.
11675
11676 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
11677
11678         * trace.c (mono_trace_enter_method): Decode MonoType too.
11679
11680         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
11681
11682         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
11683
11684         * mini-amd64.c: Add preliminary IMT implementation.
11685         
11686 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
11687
11688         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
11689         understand the new IMT-base interface invocation (thanks to
11690         Daniel Nauck for the report and the remote debugging session).
11691
11692 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
11693
11694         * mini-x86.c: size and speed optimizations for the IMT bsearch.
11695
11696 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
11697
11698         * Makefile.am (aotcheck): Make this actually use the AOTed code.
11699
11700 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
11701
11702         * mini-trampolines.c: implement AOT IMT support.
11703         * mini-x86.h: enable IMT support for wider testing.
11704
11705 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
11706
11707         * inssel.brg (emit_imt_argument): Add aot support here.
11708
11709         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
11710
11711 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
11712
11713         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
11714         of the IMT implementation, partially from massi, with my
11715         implementation of the bsearch sequence. Disabled by default until
11716         the AOT code is implemented.
11717
11718 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
11719
11720         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
11721
11722         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
11723
11724 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
11725
11726         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
11727         arch-independent IMT JIT code from Massimiliano
11728         Mantione (massi@ximian.com) with small cleanups from me.
11729
11730 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
11731
11732         * Makefile.am: fix svn invocation to get the svn revision to be
11733         independent of the local language (build fix).
11734
11735 2007-07-09  Mark Probst  <mark.probst@gmail.com>
11736
11737         * mini.c (inline_method): Reset cfg->exception_type if the
11738         inlining is aborted.  Fixes: 82049.
11739
11740 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
11741
11742         * mini.c: remove assert from exception handling code when exception_ptr
11743         is not set.
11744
11745 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
11746
11747         * mini.c (mono_codegen): Add an assert.
11748
11749         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
11750         enter and leave code.
11751         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
11752
11753 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
11754
11755         * mini-ppc.c: fixed memory corruption for localloc(0)
11756         (bug #81852).
11757
11758 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
11759         
11760         * mini.c: Fix warnings.
11761
11762 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
11763
11764         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
11765         to emit better double->int conversions.
11766
11767 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
11768
11769         * mini.c: the provided Min/Max optimizations are valid for unisgned
11770         ints.
11771
11772 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
11773
11774         * 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
11775
11776 2007-06-28  Miguel de Icaza  <miguel@novell.com>
11777
11778         * mini.c (mono_running_on_valgrind): Add support for reporting the
11779         method and  its boundaries to valgrind.
11780
11781 2007-06-28  Martin Baulig  <martin@ximian.com>
11782
11783         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
11784
11785 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
11786
11787         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
11788
11789         * generic.2.cs: Add new test case.
11790
11791 2007-06-25  Martin Baulig  <martin@ximian.com>
11792
11793         Merged the `debugger-dublin' branch.
11794
11795         * debug-mini.c
11796         (mono_debugger_insert_method_breakpoint): New public method.
11797         (mono_debugger_remove_method_breakpoint): Likewise.
11798         (mono_debugger_check_breakpoints): New static method.
11799         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
11800
11801         * debug-debugger.h (MonoDebuggerInfo):
11802         Renamed (to keep backward compatibility in the vtable):
11803         `insert_breakpoint' -> `old_insert_breakpoint'.
11804         `remove_breakpoint' -> `old_remove_breakpoint'.
11805         `create_string' -> `old_create_string'.
11806         `lookup_class' -> `old_lookup_class'.
11807         `lookup_type' -> removed; changed into a dummy field.
11808         `lookup_assembly' -> `old_lookup_assembly'.
11809         Added (same functionality, but different signature):
11810         `create_string', `lookup_class', `lookup_assembly'
11811         Added new:
11812         `get_method_addr_or_bpt', `remove_method_breakpoint',
11813         `runtime_class_init'.
11814
11815         * debug-debugger.c: Merged the `debugger-dublin' branch.
11816
11817 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
11818
11819         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
11820         well.
11821         (peephole_pass): Likewise.
11822
11823 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
11824
11825         * driver.c: hopefully make setaffinity work also for ancient
11826         versions of linux.
11827
11828 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
11829
11830         * driver.c : win32 build fix.
11831
11832 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
11833
11834         * driver.c: check for the MONO_NO_SMP env var and bind to a single
11835         processor if it is set.
11836
11837 2007-06-21  Martin Baulig  <martin@ximian.com>
11838
11839         * debug-mini.h: New file.
11840
11841         * debug-mini.c
11842         (mono_debugger_insert_breakpoint_full): Moved here from
11843         ../metadata/mono-debug-debugger.c.
11844         (mono_debugger_remove_breakpoint): Likewise.
11845         (mono_debugger_breakpoint_callback): Likewise.
11846
11847 2007-06-15  Raja R Harinath  <rharinath@novell.com>
11848
11849         * jit-icalls.c (mono_helper_compile_generic_method): Update to
11850         changes in MonoGenericClass.
11851
11852 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
11853
11854         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
11855
11856 2007-06-14  Raja R Harinath  <rharinath@novell.com>
11857
11858         * jit-icalls.c (mono_helper_compile_generic_method): Update to
11859         removal of MonoGenericMethod.
11860
11861 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
11862
11863         * mini-exceptions.c: hooks for the exception events profiling API.
11864
11865 2007-06-14  Randolph Chung  <tausq@debian.org>
11866
11867         * Makefile.ma: Add hppa target.
11868         * mini-arch.h: Include mini-hppa.h
11869         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
11870         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
11871         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
11872
11873 2007-06-14  Randolph Chung  <tausq@debian.org>
11874
11875         * inssel.brg: Add rules for "chained" compare-branch operations so that
11876         a single compare op can affect multiple branches.  Adjust cost for
11877         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
11878         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
11879         cost for some rules so that they can more easily be overridden by
11880         per-arch rules (with fixes from lupus).
11881         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
11882
11883 2007-06-13  Randolph Chung  <tausq@debian.org>
11884
11885         * mini-ops.h: Reorder branch ops so that they match the order of the
11886         corresponding CEE_* ops.  The code expects them this way.
11887         Add new ops for HPPA target.
11888         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
11889
11890 2007-06-13  Randolph Chung  <tausq@debian.org>
11891
11892         * mini-exceptions.c: Handle cases where the stack grows towards
11893         larger addresses.
11894         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
11895
11896 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
11897
11898         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
11899         counter.
11900         * driver.c: explain where a non-matching corlib is found.
11901
11902 2007-06-13  Mark Probst  <mark.probst@gmail.com>
11903
11904         * mini.c (print_jit_stats): Output dynamic code allocation stats.
11905
11906 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
11907
11908         * mini-exceptions.c: Generate a method profile leave event during
11909         an exception to ensure that the profiler gets notified.
11910
11911 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
11912
11913         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
11914         branch.
11915
11916         * cpu-amd64.md: Add long_and/or/xor opcodes.
11917
11918 2007-06-06  Wade Berrier  <wberrier@novell.com>
11919
11920         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
11921         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
11922         length of instruction shr_imm (expected 8, got 10)
11923
11924 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
11925
11926         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
11927
11928 2007-06-06  Mark Probst  <mark.probst@gmail.com>
11929
11930         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
11931         MonoInternalHashTable again (fixed bug in the internal hash table
11932         code).
11933
11934 2007-06-06  Mark Probst  <mark.probst@gmail.com>
11935
11936         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
11937         Have to figure out what makes it crash the SWF regression.
11938
11939 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
11940
11941         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
11942
11943 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
11944
11945         * mini.c: optimize out the type check when storing null in a
11946         reference array.
11947
11948 2007-06-04  Mark Probst  <mark.probst@gmail.com>
11949
11950         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
11951         MonoInternalHashTable.
11952
11953 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
11954
11955         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
11956         signed integer methods.
11957
11958 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
11959
11960         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
11961         permanently since the current approach doesn't work.
11962
11963 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
11964
11965         * inssel.brg (stmt): Only call delegate->invoke_impl if 
11966         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
11967
11968 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
11969
11970         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
11971         the sreg2==rdx case.
11972         
11973         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
11974         account if it contains a rex prefix.
11975         (peephole_pass): Handle OP_FMOVE as well.
11976
11977 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
11978
11979         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
11980         as it causes regressions.
11981
11982 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
11983
11984         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
11985         static case as well.
11986
11987         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
11988
11989         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
11990         (mono_arch_get_this_arg_from_call): Ditto.
11991
11992         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
11993
11994         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
11995         invoke_impl field.
11996
11997         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
11998         (mono_arch_get_this_arg_from_call): Ditto.
11999
12000         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
12001         
12002         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
12003         try to create optimized invoke code and use that for further invocations. 
12004         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
12005
12006         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
12007
12008 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
12009
12010         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
12011         sealed classes or methods.
12012         *devirtualization.cs: tests for the new optimization
12013
12014 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
12015
12016         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
12017         by the update_volatile () function.
12018
12019 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
12020
12021         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
12022         require it.
12023
12024         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
12025
12026 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
12027
12028         * mini.c: Add configure checks for header files.
12029         * mini-x86.c: Add configure checks for header files.
12030         * trace.c: Add configure checks for header files.
12031         * aot-runtime.c: Add configure checks for header files.
12032         * aot-compiler.c: Add configure checks for header files.
12033         * driver.c: Add configure checks for header files.
12034         * mini-codegen.c: Add configure checks for header files.
12035         
12036         Code is contributed under MIT/X11 license.
12037
12038 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
12039
12040         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
12041         icompare_imm -128 + op_iclt. Fixes #81703.
12042
12043 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
12044
12045         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
12046
12047 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
12048
12049         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
12050         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
12051         so that all isinst checks now use "interface_bitmap".
12052
12053 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
12054
12055         * cpu-amd64.md (jmp): Fix a warning.
12056
12057         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
12058
12059         * basic.cs: Add new regression test.
12060
12061         * basic.cs: Remove test which is now in basic-long.cs.
12062
12063         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
12064
12065         * basic-long.cs: Add new test.
12066         
12067 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
12068
12069         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
12070
12071 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
12072
12073         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
12074
12075         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
12076         places.
12077         
12078         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
12079         throwing code a bit.
12080
12081         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
12082         the exception throwing code a bit.
12083
12084         * mini-x86.c (get_call_info): Allocate result from a mempool.
12085
12086 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
12087
12088         * aot-compiler.c (find_typespec_for_class): Fix the assert.
12089
12090         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
12091
12092         * mini.h (MonoCompile): Add 'token_info_hash' field.
12093
12094         * mini.c: Save token->method associations during compilation so the AOT 
12095         compiler can use it.
12096         
12097         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
12098         which reference generic classes and methods.
12099
12100 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
12101
12102         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
12103
12104         * aot-compiler.c (compile_method): Fix a typo in a comment.
12105
12106         * aot-runtime.c (decode_cached_class_info): Skip generic types.
12107
12108         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
12109         everything generic.
12110
12111         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
12112
12113 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
12114
12115         * mini.h (MonoCompile): Add 'args' field.
12116
12117         * mini.c (mono_compile_create_vars): Store variables representing the arguments
12118         into cfg->args.
12119
12120         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
12121
12122 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
12123
12124         * mini.c (mono_compile_get_interface_var): Remove this unused function.
12125
12126         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
12127
12128         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
12129         opcodes for some opcodes.
12130
12131         * mini.h *.brg *.c: Use the new opcodes.
12132
12133 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
12134
12135         * mini.h: Bumped aot revision.
12136
12137         * inssel.brg: modified code generation of type checks for interfaces
12138         to use the new "MonoClass.interface_bitmap" instead of the old
12139         "MonoClass.interface_offsets".
12140
12141 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
12142
12143         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
12144
12145 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
12146
12147         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
12148         64 bit platforms.
12149
12150 2007-04-27  Neale Ferguson <neale@sinenomine.net>
12151
12152         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
12153
12154 2007-04-27  Wade Berrier  <wberrier@novell.com>
12155
12156         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
12157         mini.h) to fix build.
12158
12159 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
12160
12161         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
12162         
12163         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
12164         causes the corlib unit tests to fail.
12165
12166 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
12167
12168         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
12169
12170         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
12171
12172         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
12173         opcodes to the comparison relations.
12174
12175         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
12176         opcodes to their types.
12177         
12178         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
12179
12180         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
12181         it in cfg->arch.cinfo.
12182
12183         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
12184
12185         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
12186         cfg->cil_offset_to_bb.
12187
12188 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
12189
12190         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
12191         created becase of initlocals.
12192
12193 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
12194
12195         * mini-alpha.c cpu-alpha.md: More alpha port work from 
12196         Sergey Tikhonov <tsv@solvo.ru>.
12197
12198 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
12199
12200         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
12201
12202 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
12203
12204         * cpu-s390.md (break): Correct the length of break instruction.
12205
12206 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
12207
12208         * mini.c: fix a couple of soft-float issues and comments.
12209
12210 2007-04-15  Miguel de Icaza  <miguel@novell.com>
12211
12212         * trace.c (is_filenamechar): - is also a filename char.
12213
12214 2007-04-15  Neale Ferguson <neale@sinenomine.net>
12215
12216         * mini-s390.c: Correct checking for enum type in return value processing.
12217
12218 2007-04-14  Raja R Harinath  <rharinath@novell.com>
12219
12220         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
12221         (version.h): Makefile is in the build directory.
12222
12223 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
12224
12225         * mini-amd64.h: fix for assertion failure on Solaris/amd64
12226
12227 2007-04-11  Martin Baulig  <martin@ximian.com>
12228
12229         * mini.c (can_access_member): Fix handling of generic classes;
12230         fixes #81259.
12231
12232 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
12233
12234         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
12235
12236 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
12237
12238         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
12239
12240 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
12241
12242         * mini-codegen.c: make sure the right spill amount is
12243         used for fp or integer registers (fixes the float_sub_spill() on ppc).
12244
12245 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
12246
12247         * mini-ppc.c: fixes for the fp_branch_nan test.
12248
12249 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
12250
12251         * basic.cs: Comment out new test which still fails on ia64.
12252
12253 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
12254
12255         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
12256
12257 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
12258
12259         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
12260
12261 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
12262
12263         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
12264         on 64 bit machines. Fixes part of #80738.
12265
12266         * basic.cs: Add regression test.
12267
12268 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
12269
12270         * inssel.brg basic.cs: Revert previous change to fix build.
12271
12272         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
12273         platforms.
12274         
12275         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
12276
12277         * basic.cs: Add new regression test.
12278
12279 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
12280
12281         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
12282         many arguments.
12283
12284 2007-03-16  Neale Ferguson <neale@sinenomine.net>
12285
12286         * cpu-s390x.md: Correct length of break instruction.
12287
12288 2007-03-16  Neale Ferguson <neale@sinenomine.net>
12289
12290         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
12291         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
12292
12293 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
12294
12295         * *.c: Begin WIN64 port.
12296         * mini.c:  Use correct register in profiler.
12297         * mini-amd64.c: No inline assembly on Win64.
12298         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
12299         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
12300         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
12301         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
12302         mono_arch_ip_from_context for Win64.
12303         
12304         Contributed under MIT/X11 license.
12305
12306 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
12307
12308         * exceptions-amd64.c (seh_handler): Ditto.
12309
12310         * exceptions-x86.c (seh_handler): Fix a memory leak.
12311
12312 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
12313
12314         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
12315         mini-s390x.c: fixed peephole optimizations to deal
12316         correctly with 1 and 2 byte reload avoidance.
12317
12318 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
12319
12320         * cpu-s390.md, cpu-s390x.md: update localloc length.
12321
12322 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
12323
12324         * cpu-g4.md: added missing descriptions.
12325
12326 2007-03-14  Miguel de Icaza  <miguel@novell.com>
12327
12328         *  Makefile.am: Add support so the tail tests are not executed on
12329         PowerPC as that is a known limitation of the PowerPC port.
12330
12331 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
12332
12333         * runmdesc.bat:  Move to msvc directory.
12334         
12335 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
12336
12337         * runmdesc.bat:  Run executable that was produced by the current
12338         target and sent via an argument.
12339         
12340 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
12341
12342         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
12343         #81102.
12344
12345         * generics.2.cs: Add regression test.
12346
12347 2007-03-09  Wade berrier  <wberrier@novell.com>
12348
12349         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
12350
12351 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
12352
12353         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
12354         AOT code depends on this.
12355
12356 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
12357
12358         * mini.c: more precise tracking of types in the eval stack
12359         (part of fix for bug #81044).
12360
12361 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
12362
12363         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
12364
12365         * aot-compiler.c (encode_patch): Remove an obsolete comment.
12366
12367 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
12368
12369         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
12370
12371         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
12372
12373 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
12374
12375         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
12376         a pointer on 64 bit systems. Fixes #80190.
12377
12378         * iltests.il: Add new regression test.
12379
12380 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
12381
12382         * mini.c: inline a constant for Environment.IsRunningOnWindows.
12383
12384 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
12385
12386         * trace.c: Remove an erroneous alignemnt check when tracing.
12387           Fixes --trace on OSX86.
12388
12389 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
12390
12391         * mini-$(arch).h: initialize SP in context for all the archs.
12392
12393 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
12394
12395         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
12396         regressions in the thread tests.
12397
12398 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
12399
12400         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
12401         - fixed implementation of LOCALLOC opcode
12402         - implemented non-un compare for floats
12403         - code cleanup
12404         - implementation of FDIV and CKFINITE opcodes
12405         - fixes for latest mono updates
12406         - additional arch opcodes
12407
12408 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
12409
12410         * Makefile.am: simplify and merge rules for cross-compilation.
12411
12412 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
12413
12414         * local-propagation.c: Actually *apply* the fix for bug 80591...
12415
12416 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
12417
12418         * mini-exceptions.c: backuot part of the last change
12419         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
12420
12421 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
12422         * inssel.brg: Fix bug 59286.
12423
12424
12425 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
12426
12427         * mini-exceptions.c: patch from Zoltan to correctly check for
12428         stack boundaries (using the stack register, not the frame register),
12429         fixes bugs #80724, #79717.
12430
12431 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
12432
12433         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
12434         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
12435
12436         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
12437         presence of frame pointer elimination.
12438
12439 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
12440         
12441         * mini-x86.h: NetBSD UCONTEX_REG defines.
12442
12443 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
12444
12445         * inssel-amd64.brg: Fix amd64 build.
12446
12447 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
12448
12449         * mini.h: remove extern to workaround what looks likes gcc bug 26905
12450         on amd64.
12451
12452 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
12453
12454         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
12455         ends.
12456
12457         * mini-<ARCH>.c: Use mono_is_regsize_var ().
12458
12459 2007-01-30 Mark Mason <mason@broadcom.com>
12460
12461            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
12462            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
12463            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
12464            beginning support for CEE_JMP [not quite working yet]
12465            * tramp-mips.c: LMF handling now works
12466         
12467 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
12468
12469         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
12470
12471         * mini.h (NULLIFY_INS): New macro.
12472
12473 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
12474
12475         * mini.c: statistical profiler fix for windows, patch
12476         from Tor Lillqvist (tml@novell.com).
12477
12478 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
12479         * local-propagation.c: Fix bug 80591.
12480
12481 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
12482
12483         * Makefile.am: put back the --export-dynamic option as with
12484         the previous gmodule flags (thanks to Robert Jordan).
12485
12486 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
12487
12488         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
12489
12490         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
12491         simplify and speed up the local register allocator. Also rename some fields
12492         like iassign->vassign.
12493         
12494         * regalloc.c: Remove some functions which are no longer used since their
12495         inlined version is in mini-codegen.c.
12496         
12497         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
12498
12499         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
12500
12501 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
12502
12503         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
12504         narrowing. Fixes #80622.
12505
12506         * iltests.il: Add new regresssion test. 
12507
12508 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
12509
12510         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
12511         debug-debugger.c, debug-debugger.h: warning fixes.
12512         * driver.c: updated copyright year and made it fit in one line.
12513
12514 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
12515
12516         * aot-runtime.c: updated to use mono-dl instead of gmodule.
12517
12518 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
12519
12520         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
12521
12522         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
12523
12524         * iltests.il: Add new test for bug #80507.
12525
12526 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
12527
12528         * mini-arm.h: use soft-float also on vfp for now.
12529
12530 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
12531
12532         * mini.c: fix some more soft-float issues.
12533
12534 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
12535
12536         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
12537
12538 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
12539         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
12540         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
12541         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
12542
12543 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
12544
12545         * mini-arm.c: typo fix.
12546
12547 2007-01-23  Neale Ferguson <neale@sinenomine.net>
12548
12549         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
12550
12551 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
12552
12553         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
12554         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
12555
12556         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
12557
12558         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
12559
12560         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
12561         
12562         * inssel.brg: Fix a warning.
12563
12564         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
12565
12566         * abcremoval.c ssa.c ssapre.c: Update after this change.
12567         
12568         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
12569
12570         * dominators.c (df_set): Use mono_bitset_union_fast.    
12571
12572 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
12573
12574         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
12575         mini-codegen.c: reduce relocations and memory usage for the cpu
12576         description.
12577
12578 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
12579
12580         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
12581
12582         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
12583         to reduce their size.
12584
12585 2007-01-19 Mark Mason <mason@broadcom.com>
12586
12587         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
12588         * mini-mips.c: more configuration macros, support long conditional branches, additional
12589         asserts, fix epilog instrumentation.
12590         * mini-mips.h: use standard stack walk
12591         * cpu-mips.md: increase size of div, rem and conditional branches
12592         
12593 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
12594
12595         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
12596         to cpu spec data.
12597
12598 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
12599
12600         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
12601         (compile_method): Ditto.
12602
12603         * aot-runtime.c (decode_klass_info): Ditto.
12604
12605         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
12606         needed by the code generated by inssel.brg. Also fix a warning.
12607
12608 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
12609
12610         * mini.c: deal with enums that become genericinsts by
12611         being nested in a generic class (bug #79956).
12612
12613 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
12614
12615         * mini.c: match the generic definition to check for
12616         private access with generic types (bug #78431).
12617
12618 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
12619
12620         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
12621         to make life easier for people cross-compiling that insist on not
12622         using scratchbox.
12623
12624 2007-01-17 Mark Mason <mason@broadcom.com>
12625
12626         * inssel-long.brg: patch to deal with mips missing flags
12627         * inssel-long32-mips.brg: implement overflow checks
12628         * insset-mips.brg: implement overflow checks
12629         * mini-mips.h: implement conditional exception handling
12630         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
12631           Remove unused code, minor cleanups.
12632         * exceptions-mips.c: minor cleanups
12633         * mini-ops.h: add mips conditional exception ops
12634         * cpu-mips.md: add mips conditional exception ops
12635
12636         
12637 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
12638
12639         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
12640         to deal with mips missing of flags.
12641
12642 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
12643
12644         * exceptions-ppc.c: execute fault handlers.
12645
12646 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
12647
12648         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
12649
12650 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
12651
12652         * mini.c: handle also floating point values in initialize_array.
12653
12654 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
12655
12656         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
12657         array initialization and make it conditional on the intrins option.
12658
12659 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
12660
12661         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
12662         relocations and put the patch info names close to the enum definition.
12663
12664 2007-01-15 Mark Mason <mason@broadcom.com>
12665
12666         * basic.cs, exceptions.cs: break up large tests to increase debugability.
12667
12668 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
12669
12670         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
12671
12672 2007-01-12  Raja R Harinath  <rharinath@novell.com>
12673
12674         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
12675
12676 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
12677
12678         * Makefile.am: distribute the mips sources.
12679
12680 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
12681
12682         * mini-codegen.h: handle bug #80489 here, by excluding ecx
12683         directly.
12684
12685 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
12686
12687         * cpu-x86.md: back out for now as this triggers other regressions.
12688
12689 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
12690
12691         * cpu-x86.md: force src1 and dest regpair for long shift instructions
12692         to eax:edx, so ecx can't get allocated to them (bug #80489).
12693
12694 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
12695
12696         * mini.c, mini-exceptions.c: enabled running fault handlers
12697         (bug #80469).
12698
12699 2007-01-03  Miguel de Icaza  <miguel@novell.com>
12700
12701         * driver.c: If nothing fail, do not use the string "failed",
12702         because it makes it very annoying to view test result logs on the
12703         web. 
12704
12705 2006-12-30  Miguel de Icaza  <miguel@novell.com>
12706
12707         * debug-debugger.c (mono_debugger_main): Rename "main" to
12708         "main_method" to prevent a warning.
12709
12710         Remove a warning for unused field.
12711
12712 2006-12-28  Martin Baulig  <martin@ximian.com>
12713
12714         * debug-debugger.c
12715         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
12716
12717 2006-12-22  Martin Baulig  <martin@ximian.com>
12718
12719         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
12720         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
12721         seperate `.mdb_debug_info' section, so we can access it from the
12722         debugger even if the binary is stripped.
12723
12724         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
12725         from the `.mdb_debug_info' here to prevent the linker from
12726         removing that section.
12727
12728         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
12729         mdb-debug-info64.s.
12730
12731 2006-12-19  Robert Jordan  <robertj@gmx.net>
12732
12733         * mini-x86: enable the code to return small structures in
12734         registers for FreeBSD as well. Fixes bug #80278.
12735         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
12736
12737 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
12738
12739         * mini-x86.c: align the stack when calling the profiler
12740         function instrumenting the prolog (on OSX).
12741
12742 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
12743
12744         * mini.c: emit a break opcode where Debugger.Break () is called.
12745
12746 2006-12-13  Miguel de Icaza  <miguel@novell.com>
12747
12748         * mini.c (mono_method_to_ir): Provide useful information on this
12749         assert, to prevent others from debugging like I did.
12750
12751 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
12752
12753         * mini.c: enable code which was incorrectly commented
12754         (bug #80235).
12755
12756 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
12757
12758         * mini-x86.c: enable on OSX, too, the code to return small
12759         structures in registers.
12760
12761 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
12762
12763         * mini-x86.c: remove the use of the dynamic code manager here, too.
12764
12765 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
12766
12767         * mini.h, debug-debugger.c, tramp-*.c: fixed 
12768         mono_debugger_create_notification_function() to use
12769         mono_global_codeman_reserve () instead of a dynamic code manager.
12770
12771 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
12772
12773         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
12774         ves_array_element_address() jit icall and use a generated
12775         managed method instead (which is about 4 times faster for a rank 3
12776         array access).
12777
12778 2006-11-29  Mark Mason  <mason@broadcom.com>
12779
12780         * basic-calls.cs: additional tests for passing
12781         structures as function arguments.
12782
12783 2006-11-29  Mark Mason  <mason@broadcom.com>
12784
12785         * mini-mips.h: disable custom exception handling
12786         * mini-mips.c: throw/rethrow should use jalr to call
12787         exception stubs.  Fixed bug with passing structures
12788         by value. More support for tracing floating point
12789         functions.
12790
12791 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
12792
12793         * mini.c: fixed typo in the soft-float ldind.r4 handling
12794         (bug #80086).
12795
12796 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
12797
12798         * mini.c, mini.h, driver.c: added --runtime command line
12799         option to select a different runtime than the autodetected one.
12800         * jit.h: added API for embedders to initialize with a specific
12801         runtime version.
12802
12803 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
12804
12805         * mini.c: handle also boxing of r4 values (bug #80024).
12806
12807 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
12808
12809         * mini-ppc.c: force indirect calls until we reserve
12810         enough address space for all the generated code.
12811
12812 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
12813
12814         * exceptions-arm.c: workaround bugs in the libc definition
12815         of struct ucontext.
12816
12817 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
12818
12819         * inssel.brg: fixes from me and Mark Mason.
12820
12821 2006-11-23  Dick Porter  <dick@ximian.com>
12822
12823         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
12824         semaphore display now we've fixed the initial value
12825
12826 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
12827
12828         * inssel.brg: partially revert the last change to fix the build.
12829
12830 2006-11-21  Mark Mason  <mason@broadcom.com>
12831
12832         * inssel.brg: Add and use compare-and-branch macros to support
12833         architectures that do not have condition code registers (ie. MIPS).
12834         * *-mips.{c,brg,md}: Fix copyright statements
12835
12836 2006-11-20  Mark Mason  <mason@broadcom.com>
12837
12838         * Makefile.am: remove mini-codegen.c from list of MIPS sources
12839         * mini.c: Allow GET_CONTEXT to be specified by the arch port
12840         * mini.h: Added declaration for mono_print_ins()
12841         * mini-codegen.c: added ins_spec initializer for MIPS
12842         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
12843         vreg to be virtual and hreg to be non-virtual.
12844         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
12845         is not yet working/implemented correctly.
12846         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
12847         non-static, fixup calls to print_ins() from other parts in the file.
12848
12849 2006-11-20  Mark Mason  <mason@broadcom.com>
12850
12851         * basic-calls.cs: added tests for passing structures as arguments
12852         to calls.
12853
12854 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
12855
12856         * inssel-long32.brg: optimize signed division by power of two.
12857
12858 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
12859
12860         * mini-arm.c: added support for interworking with thumb code
12861         (mono must be still be built using the ARM instruction encoding).
12862
12863 2006-11-19  Miguel de Icaza  <miguel@novell.com>
12864
12865         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
12866         verifier has different rules for it.   Fixes a few verifier issues
12867         in the test suite.
12868
12869         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
12870         at the end, so people know what happened.
12871
12872 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
12873
12874         * brach-opts.c: in optimize_exception_target() make sure we
12875         are in a catch clause (fixes bug #79871).
12876
12877 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
12878
12879         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
12880         more soft-float support fixes.
12881
12882 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
12883
12884         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
12885         that are passed half on the stack and half in registers.
12886
12887 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
12888
12889         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
12890         more mips integration work from Mark E Mason 
12891         <mark.e.mason@broadcom.com>.
12892
12893 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
12894
12895         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
12896         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
12897         tramp-mips.c: added sources for the mips port, not
12898         integrated in the build yet. Contributed by
12899         Mark E Mason <mark.e.mason@broadcom.com>.
12900
12901 2006-11-14  Neale Ferguson <neale@sinenomine.net>
12902
12903         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
12904
12905 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
12906
12907         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
12908         put the soft-float rules in its own file since it seems to
12909         break s390 compilation.
12910
12911 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
12912
12913         * mini-arm.c: fixed wrnings.
12914
12915 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
12916
12917         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
12918         inssel-arm.brg: ARM support for soft-float.
12919
12920 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
12921
12922         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
12923         loads and stores of 32 bit fp values.
12924
12925 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
12926
12927         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
12928
12929         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
12930         works. Fixes #79852 and #79463.
12931
12932 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
12933
12934         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
12935         more soft-float support WIP and fixes.
12936
12937 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
12938
12939         * mini-arm.c: some VFP updates.
12940
12941 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
12942
12943         * mini-exceptions.c: 0 is a valid local var offset in some
12944         architectures, don't assert (bug #78508).
12945
12946 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
12947
12948         * exceptions-arm.c: fixed off by one error in stack walk code.
12949
12950 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
12951
12952         * mini.h, mini.c: more precise tracking of type load exceptions.
12953
12954 2006-11-03  Robert Jordan  <robertj@gmx.net>
12955
12956         * Makefile.am: [WIN32] Add monow.exe target.
12957         * driver.c: [WIN32] Don't detach the console when debugging.
12958         Fixes bug #79797.
12959         
12960 2006-10-30  Miguel de Icaza  <miguel@novell.com>
12961
12962         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
12963
12964 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
12965
12966         * aot-compiler.c (emit_method_info): Add a case missed earlier.
12967
12968         * driver.c (mini_regression): Fix --regression with AOT.
12969
12970         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
12971
12972 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
12973
12974         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
12975
12976         * mini-sparc.h: Don't use sigaction on sparc/linux.
12977
12978         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
12979
12980         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
12981
12982         * mini-exceptions.c: Add proper include files for getpid ().
12983
12984 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
12985
12986         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
12987         address instead of a MonoJitInfo* to avoid decoding the exception info for the
12988         method.
12989
12990         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
12991         name cache to reduce its size.
12992
12993         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
12994
12995 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
12996
12997         * mini-x86.c: Save/restore the current LMF structure more efficiently using
12998         the mono_lmf TLS variable.
12999
13000         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
13001         trampoline lmf frames.  
13002
13003         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
13004
13005 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
13006
13007         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
13008         the mono_lmf TLS variable.
13009
13010         * mini-exceptions.c: Access the LMF structure through accessors.
13011
13012         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
13013         variable instead of in jit_tls->lmf.
13014
13015         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
13016         
13017         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
13018         trampoline lmf frames.
13019
13020         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
13021
13022 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
13023
13024        * mini.c trace.c mini-x86.c: Revert these too.
13025         
13026        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
13027        signature change.
13028
13029 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
13030
13031         * genmdesc.c: removed now dead code.
13032
13033 2006-10-09  Robert Jordan <robertj@gmx.net>
13034
13035         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
13036
13037 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
13038
13039         * mini.h: do not leave gaps in the opcode values.
13040
13041 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
13042
13043         * jit-icalls.h: flag functions as internal here, too.
13044
13045 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
13046
13047         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
13048         functions with the internal attribute.
13049
13050 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
13051
13052         * aot-compiler.c: fclose the file descriptor in the profile read loop.
13053
13054 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
13055
13056         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
13057         for soft-float.
13058
13059 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
13060
13061         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
13062         tail calls as on other platforms.
13063
13064         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
13065
13066         * iltests.il: Add a few tailcall tests.
13067
13068 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
13069
13070         * driver.c: fix loop for old compilers (bug #79521).
13071
13072 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
13073
13074         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
13075
13076         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
13077
13078         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
13079         metadata without any code.
13080
13081         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
13082         more precise debugging information using gdb.
13083
13084 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
13085
13086         * inssel-ia64.brg: Make the helper methods static.
13087
13088 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
13089
13090         * inssel-x86.brg: make the helper methods static.
13091
13092 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
13093
13094         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
13095
13096 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
13097
13098         * mini.c: updates for monoburg changes.
13099         * inssel.brg: make a few helper functions static as they should.
13100
13101 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
13102
13103         * Makefile.am: Move mini-codegen.c to common_sources.
13104
13105 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
13106
13107         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
13108         instructions.
13109         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
13110         mini-ppc.h: port to use the common local register allocator.
13111
13112 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
13113
13114         * mini.h: Remove the comment too then.
13115
13116 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
13117
13118         * mini.h: put back backend.data which is to be used shortly and
13119         doesn't increase the size of MonoInst. If any 64 bit arch aligned
13120         pointers on 4 byte boundaries it'd have much bigger issues running
13121         and you can ifdef it out anyway.
13122
13123 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
13124
13125         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
13126         MonoInst size by 4 bytes on 64 bit machines.
13127
13128 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
13129
13130         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
13131         replacement with more meaningful field names. Arch maintainers, please
13132         check the assigned names are good enough for your arch.
13133
13134 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
13135
13136         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
13137         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
13138
13139 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
13140
13141         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
13142         relocations and memory requirements, put the optimization flags
13143         definitions in their own file.
13144
13145 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
13146
13147         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
13148
13149         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
13150
13151 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
13152
13153         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
13154
13155 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
13156
13157         * inssel.brg: use the correct function to get the size of an item
13158         in an array, given an element class.
13159         * aot-compiler.c: do not access class->class_size directly.
13160
13161 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
13162
13163         * mini.h, debug-mini.c: added a debugging function to print
13164         info about local variables and arguments in a jitted method.
13165
13166 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
13167
13168         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
13169
13170         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
13171
13172 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
13173
13174         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
13175         inner and outer loops when passing vtypes.
13176
13177 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
13178
13179         * mini-ppc.c: take into account the cpu errata for cache flushing
13180         which caused some random errors (bug #79381).
13181
13182 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
13183
13184         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
13185         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
13186
13187 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
13188
13189         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
13190         loaded.
13191
13192         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
13193         freebsd ports tree.
13194
13195         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
13196         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
13197
13198         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
13199         displacement.
13200
13201 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
13202
13203         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
13204
13205 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
13206
13207         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
13208         macro does not have to be changed during debugging.
13209
13210         * 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>.
13211
13212         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
13213
13214         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
13215         
13216         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
13217         MONO_ARCH_NO_EMULATE_MUL is defined.
13218
13219         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
13220
13221         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
13222
13223         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
13224
13225         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
13226         
13227 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
13228
13229         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
13230         stuff to mini-exceptions.c where it is used.
13231
13232         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
13233         setup code, the real one is in mini-exceptions.c.
13234
13235         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
13236         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
13237         some changes from the freebsd ports tree.
13238
13239         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
13240         constants.
13241         
13242         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
13243
13244 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
13245
13246         * mini.c: on Linux, check for /proc to be mounted
13247         (bug# 79351, novell bug#201204).
13248
13249 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
13250
13251         * mini.c: handle cases where pthread_attr_getstack() behaves
13252         incorrectly (bug #78096).
13253
13254 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
13255
13256         * mini-arm.c: support larger stack frames (bug #79272).
13257
13258 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
13259
13260         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
13261
13262         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
13263         tokens.
13264
13265         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
13266         mono_class_from_name () to find a class from its name.
13267
13268         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
13269
13270 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
13271
13272         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
13273
13274 2006-09-05  Kornel Pal  <kornelpal@gmail.com>
13275
13276         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
13277
13278 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
13279
13280         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
13281         callinfo->trampoline.
13282
13283         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
13284         fixes #79271.
13285         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
13286         future.
13287
13288 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
13289
13290         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
13291
13292 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
13293
13294         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
13295         stats.method_trampolines, it is already done by the generic trampoline code.
13296
13297         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
13298         
13299 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
13300
13301         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
13302
13303         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
13304
13305         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
13306
13307         * mini.c (print_jit_stats): Print mscorlib mempool size too.
13308         
13309         * mini.c (print_jit_stats): Print new stats.
13310
13311         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
13312
13313 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
13314
13315         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
13316         Address on two dimensional arrays. Fixes #78729.
13317
13318         * mini.h (MonoCompile): Add a 'skip_visibility' field.
13319
13320         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
13321         a method.
13322
13323         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
13324
13325         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
13326         #79130.
13327         
13328         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
13329         a race condition.
13330         (mini_get_ldelema_ins): Ditto.
13331
13332 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
13333
13334         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
13335         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
13336         Fixes #79213.
13337
13338 2006-08-29 Neale Ferguson <neale@sinenomine.net>
13339
13340         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
13341         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
13342
13343         * exceptions-s390x.c: Cosmetic change.
13344
13345         * tramp-s390.c: Fix warning.
13346
13347         * cpu-s390.md: Correct length of mul_imm.
13348
13349 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
13350
13351         * aot-compiler.c: added binary writer with ELF backend
13352         implementation (only on Linux/x86 for now).
13353
13354 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
13355
13356         * Makefile.am: Don't run net 2.0 AOT tests.
13357
13358         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
13359         (mono_compile_assembly): Skip net 2.0 assemblies as well.
13360
13361         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
13362
13363 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
13364
13365         * aot-compiler.c: simplified and refactored the asm-writing code
13366         to allow different backends.
13367
13368 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
13369
13370         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
13371
13372         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
13373         little. Share patches of type TYPE_FROM_HANDLE as well.
13374
13375         * mini.c (mono_patch_info_equal): New helper function.
13376         (mono_patch_info_hash): Ditto.
13377
13378         * aot-compiler.c (emit_method_code): Fix s390 build.
13379
13380         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
13381         is not handled because it is stored as a flag and not as a type ctor. Fixes
13382         #79016.
13383
13384 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
13385
13386         * aot-compiler.c: Fix computation of GOT slot statistics.
13387         
13388         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
13389         Also remove support for not PIC AOT.
13390
13391         * mini.h: Bump AOT file format version.
13392
13393         * objects.cs: Add a test for #78990.
13394
13395         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
13396         (peter.dettman@iinet.net.au). Fixes #79087.
13397
13398         * basic-long.cs: Add a test for the above.
13399
13400 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
13401
13402         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
13403         
13404         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
13405         code somewhat.
13406
13407 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
13408
13409         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
13410         exceptions.
13411
13412 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
13413
13414         * mini.c: Don't verify COM proxy invoke calls
13415         
13416
13417 2006-08-10  Dick Porter  <dick@ximian.com>
13418
13419         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
13420         which process is holding semaphores locked.
13421
13422 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
13423
13424         * mini-ia64.c mini-amd64.c: Fix #79027.
13425
13426         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
13427
13428         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
13429
13430         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
13431         implicit arguments in a vararg call. Fixes #79027.
13432
13433 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
13434
13435         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
13436         (mono_get_array_new_va_signature): Ditto.
13437
13438 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
13439
13440         * aot-runtime.c: Call init_plt lazily.
13441
13442         * inssel-long.brg: Fix unsigned long->int conversion.
13443
13444         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
13445
13446         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
13447         that most data is now in the .rss/.data section.
13448
13449 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
13450
13451         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
13452
13453         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
13454
13455         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
13456
13457         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
13458
13459         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
13460         virtual call. Fixes #79010.
13461
13462         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
13463         and use the result as the this argument in the real call.
13464
13465         * generics.2.cs: Add a new test for #79010.
13466         
13467 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
13468
13469         * mini-x86.c: Fix a warning.
13470
13471         * aot-compiler.c: Add a bunch of statistics.
13472
13473         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
13474
13475 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
13476
13477         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
13478
13479 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
13480
13481         * 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>.
13482
13483 2006-07-13  Miguel de Icaza  <miguel@novell.com>
13484
13485         * mini.c (mono_method_to_ir): Obtain the original method in the
13486         CIL stream and use this to perform validation.
13487
13488         Fixed: #78816
13489
13490 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
13491
13492         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
13493         (mono_arch_call_opcode): Ditto.
13494
13495         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
13496         #78826.
13497
13498         * mini.c (mono_patch_info_dup_mp): New helper function.
13499         
13500         * aot-compiler.c (compile_method): Fix some of the memory allocated during
13501         compilation. Fixes #78827.
13502
13503 2006-07-18  Kornel Pal  <kornelpal@gmail.com>
13504
13505         * declsec.c: Use original security informations for
13506           MONO_WRAPPER_MANAGED_TO_MANAGED.
13507
13508 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
13509
13510         * mini.c: Allow Com Interop methods/classes and
13511         don't verify COM wrapper calls
13512         
13513
13514 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
13515
13516         * inssel-long32.brg: Fix long->i4 checked conversion.
13517
13518         * exceptions.cs: Add a test for the above.
13519
13520 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
13521
13522         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
13523
13524         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
13525         leaks.
13526
13527         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
13528         #78775.
13529
13530 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
13531
13532         * mini.c: Fix solaris/x86 exception handling.
13533
13534         * Makefile.am: Get rid of $(ICU_LIBS).
13535
13536 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
13537
13538         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
13539         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
13540         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
13541
13542         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
13543
13544         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
13545         this function causes a SIGSEGV.
13546
13547 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
13548
13549         * mini.c: Remove unused solaris/x86 includes.
13550
13551 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
13552
13553         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
13554
13555 2006-06-20  Jb Evain  <jbevain@gmail.com>
13556
13557         * cpu-g4.md: fix max length of start_handler instruction.
13558
13559 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
13560         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
13561
13562 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
13563         * ssa.c: Fixed bug 78653 for SSA based deadce.
13564         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
13565         MonoInst.flags, used in SSA based deadce.
13566         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
13567         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
13568
13569 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
13570
13571         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
13572         it can end up using non executable memory on ppc64 systems
13573         running ppc32 userspace (fix from Johannes Berg).
13574
13575 2006-06-14  Dick Porter  <dick@ximian.com>
13576
13577         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
13578         4.1.1
13579
13580 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
13581         * mini.c: Made so that inline is locally disabled if it would
13582         trigger a .cctor, because too many apps depend on this behavior
13583         (which seems to be also the one of the MS CLR).
13584
13585 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
13586
13587         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
13588         No idea why this worked before.
13589
13590         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
13591         which branch to outer exception clauses since they could skip the
13592         inner finally clauses. Fixes #78633.
13593
13594         * exceptions.cs: Add a test for the above.
13595
13596         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
13597         Fixes #78629.
13598
13599         * iltests.il: Add a test for the above.
13600
13601 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
13602
13603         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
13604         after the end of a try bblock, to prevent asserts in mini_method_compile ().
13605
13606         * iltests.il: Add a test for the above.
13607
13608 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
13609
13610         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
13611         
13612         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
13613         methods as instrinsics.
13614
13615 2006-06-09  Wade Berrier <wberrier@novell.com>
13616
13617         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
13618         (simple-cee-ops.h ssapre-mini-ops.h)
13619
13620 2006-06-09  Neale Ferguson <neale@sinenomine.net>
13621
13622         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
13623         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
13624         instruction).
13625         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
13626         * cpu-s390x.md: Fix max. length values for a couple of instructions.
13627
13628 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
13629
13630         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
13631
13632 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
13633
13634         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
13635         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
13636         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
13637         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
13638         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
13639         of opcodes, so that bug 78549 should not happen again.
13640         * ssapre.c: Updated to use the renamed files.
13641
13642 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
13643
13644         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
13645         in OP_ATOMIC_EXCHANGE_I4.
13646
13647 2006-06-07  Wade Berrier <wberrier@novell.com>
13648
13649         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
13650         in mono_debugger_create_notification_function)
13651
13652 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
13653
13654         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
13655         
13656         * mini.c (type_from_stack_type): Disable some changes which do not
13657         seem to work.
13658
13659         * driver.c: Reenable opts.
13660
13661         * mini.h (MonoStackSlot): New structure to keep track of the verification state
13662         of the evaluation stack.
13663         
13664         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
13665         evaluation stack trace at entry to the bblock.
13666
13667         * mini.c (merge_stacks): New function to perform verification of stack merges.
13668         Turned off by default.
13669
13670         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
13671         STACK_MP.
13672         
13673 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
13674
13675         * local-propagation.c: Fixed bug 78549.
13676
13677 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
13678
13679         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
13680
13681 2006-06-02  Miguel de Icaza  <miguel@novell.com>
13682
13683         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
13684         tramp-arm.c, tramp-ia64.c
13685         (mono_debugger_create_notification_function): Update signature to
13686         new signature and use new protocol for creating the notification
13687         function.  
13688
13689         Should fix the build.
13690
13691 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
13692
13693         * exceptions-ppc.c (mono_jit_walk_stack)
13694         (ves_icall_get_frame_info): Fix the build
13695
13696 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
13697
13698         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
13699
13700 2006-05-31  Raja R Harinath  <rharinath@novell.com>
13701
13702         * il2tests.2.il: New file for generics CIL tests.  Add test for
13703         #78019.
13704         * Makefile.am: Update.
13705
13706         Fix #78019
13707         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
13708         to nullable types.
13709
13710 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
13711
13712         * aliasing.c: Fixed bug 78311.
13713
13714 2006-05-29  Martin Baulig  <martin@ximian.com>
13715
13716         * mini-exceptions.c (mono_find_jit_info): When computing the
13717         native offset, check whether we're actually inside the method's
13718         code; call mono_debug_print_stack_frame() to format the frame.
13719         (ves_icall_System_Exception_get_trace): Call
13720         mono_debug_print_stack_frame() to format the stack frame.
13721         (ves_icall_get_trace): Update to the new debugging API.
13722         (mono_jit_walk_stack_from_ctx): Likewise.
13723         (ves_icall_get_frame_info): Likewise.
13724
13725         * mini.c (get_method_from_ip): Use the new debugging API.
13726         (mono_print_method_from_ip): Likewise.
13727
13728         * exceptions-ppc.c
13729         (mono_jit_walk_stack): Use the new debugging API.
13730         (ves_icall_get_frame_info): Likewise.   
13731
13732 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
13733
13734         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
13735
13736 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
13737
13738         * mini.c: Added "limitator" to inline for debugging.
13739
13740 2006-05-24  Martin Baulig  <martin@ximian.com>
13741
13742         * debug-debugger.c (mono_debugger_init): Create a private,
13743         malloc()-based code manager for the notification function and
13744         intentionally leak it on exit.  This fixes the crash-on-exit race
13745         condition.
13746
13747         * tramp-amd64.c
13748         (mono_debugger_create_notification_function): Added
13749         `MonoCodeManager *' argument.
13750
13751         * tramp-x86.c
13752         (mono_debugger_create_notification_function): Added
13753         `MonoCodeManager *' argument.
13754
13755 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
13756
13757         * aliasing.c: Fixed 64 bit issue.
13758         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
13759         default since all known bugs are fixed (one more time!).
13760
13761 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
13762
13763         * mini.c: write barrier support.
13764
13765 2006-05-23  Martin Baulig  <martin@ximian.com>
13766
13767         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
13768         check at the top of the file.
13769
13770 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
13771
13772         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
13773         reverting changes without reason and without changelog entries.
13774
13775 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
13776
13777         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
13778         to a few opcodes. Fixes #78439.
13779
13780         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
13781         consistency with other archs.
13782
13783         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
13784
13785 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
13786
13787         * debug-debugger.c: fix the build.
13788
13789 2006-05-17  Martin Baulig  <martin@ximian.com>
13790
13791         * debug-debugger.c
13792         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
13793         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
13794         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
13795         (debugger_attach): Call GC_mono_debugger_add_all_threads().
13796
13797 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
13798
13799         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
13800
13801 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
13802
13803         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
13804         MONO_TYPE_GENERICINST.
13805         
13806         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
13807         MONO_TYPE_GENERICINST.
13808
13809 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
13810
13811         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
13812         #78325.
13813
13814 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
13815
13816         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
13817         mempool.
13818         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
13819
13820 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
13821
13822         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
13823         mono_trace_cleanup ().
13824
13825         * iltests.il: Fix problem with the newly added test.
13826
13827         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
13828         due to register constraints, free up the previous hreg. Fixes #78314.
13829
13830         * iltests.il: Add new test for #78314.  
13831
13832         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
13833         Interlocked.Add. Fixes #78312.
13834
13835         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
13836         
13837 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
13838
13839         * inssel.brg (mini_emit_virtual_call): Fix a warning.
13840
13841 2006-05-05  Martin Baulig  <martin@ximian.com>
13842
13843         * debug-mini.c (mono_debug_open_block): New method.
13844
13845         * mini-amd64.c
13846         (mono_arch_output_basic_block): Call mono_debug_open_block() at
13847         the beginning of each basic block.
13848
13849         * mini-x86.c
13850         (mono_arch_output_basic_block): Call mono_debug_open_block() at
13851         the beginning of each basic block.
13852
13853 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
13854
13855         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
13856         default until I understand why they break the build on amd64.
13857
13858 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
13859
13860         * mini.c (mini_cleanup): Call mono_cleanup ().
13861
13862         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
13863         errors.
13864
13865 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
13866
13867         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
13868         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
13869         default since all known bugs are fixed, and I cannot reproduce bug
13870         77944... I'm asking Matt Hargett to test again after this commit.
13871
13872 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
13873
13874         * mini-codegen.c: Fixed typo that thrashed inline.
13875
13876 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
13877
13878         * dominators.c (compute_dominators): Avoid using a worklist since
13879         it is not correct in some cases. Instead, iterate over all bblocks as
13880         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
13881
13882 2006-04-28  Miguel de Icaza  <miguel@novell.com>
13883
13884         * mini.c (mono_jit_compile_method_inner): Use
13885         mono_prepare_exception_from_error that resets the value
13886         internally.
13887
13888 2006-04-27  Miguel de Icaza  <miguel@novell.com>
13889
13890         * mini.c: Move the mini_loader_error_to_exception to metadata. 
13891         
13892 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
13893
13894         * aliasing.c: Fixed bug 78210.
13895
13896 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
13897
13898         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
13899         default until all their problems (or the ones they trigger) are fixed.
13900
13901 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
13902
13903         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
13904         
13905         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
13906         as loaded only after resolving patches since that could invoke the same method.
13907
13908         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
13909
13910         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
13911         functions.
13912
13913         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
13914         AOT loader.
13915
13916         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
13917         stack.
13918
13919         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
13920         made from AOT code through the PLT table.
13921
13922         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
13923         holding the plt offset when a call is made to the aot plt trampoline.
13924         
13925 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
13926
13927         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
13928         amd64 AOT support.
13929
13930         * Makefile.am (common_sources): Fix build breakage.
13931
13932         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
13933         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
13934         intra-assembly calls if possible.
13935         
13936         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
13937
13938         * mini-trampolines.c: Handle PLT entries.
13939
13940         * mini.c: Avoid creating a GOT var for calls.
13941
13942         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
13943         from mscorlib code.
13944
13945         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
13946         from mscorlib code.
13947
13948         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
13949         AOT code.       
13950
13951         * mini.h: Bump AOT file format version.
13952         
13953         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
13954         covers more cases.
13955
13956 2006-04-25  Martin Baulig  <martin@ximian.com>
13957
13958         * driver.c: Disable copyprop, consprop and inline when running
13959         inside the debugger.
13960
13961 2006-04-25  Martin Baulig  <martin@ximian.com>
13962
13963         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
13964         with `get_current_thread' and added `detach'.
13965         (MonoDebuggerMetadataInfo): Added `thread_size',
13966         `thread_tid_offset', `thread_stack_ptr_offset' and
13967         `thread_end_stack_offset'.
13968
13969 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
13970
13971         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
13972         aot-runtime.c.
13973
13974         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
13975         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
13976
13977         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
13978
13979         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
13980
13981         * aot.c: Add support for ADJUSTED_IID.  
13982
13983 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
13984
13985         * aot.c (emit_method_order): Don't align method_order_end.
13986
13987         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
13988         the interface ID changes.
13989
13990 2006-04-21  Dick Porter  <dick@ximian.com>
13991
13992         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
13993         cleaning up a thread.  Fixes the new part of bug 77470.
13994
13995 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
13996
13997         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
13998         to managed wrapper.
13999                      
14000 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
14001
14002         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
14003         
14004         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
14005         SIGSEGV. Fixes #78072.
14006
14007         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
14008         unregister our SIGABRT handler.
14009
14010 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
14011
14012         * mini.c: Disabled inline where it can alter the call stack in a
14013         way visible from managed code.
14014         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
14015         default.
14016
14017 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
14018
14019         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
14020         on other platforms. Fixes #78089.
14021
14022 2006-04-13  Martin Baulig  <martin@ximian.com>
14023
14024         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
14025         determine whether we're inside the debugger.
14026
14027         * debug-debugger.h
14028         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
14029
14030 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
14031
14032         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
14033         handler clauses. Fixes #78024.
14034
14035         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
14036         in the CALL_MEMBASE opcodes. Fixes #78088.
14037         (mono_arch_get_vcall_slot_addr): Ditto.
14038
14039 2006-04-10  Martin Baulig  <martin@ximian.com>
14040
14041         * debug-debugger.c: The thread handling code has now been moved
14042         into ../metadata/threads.c.
14043
14044 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
14045
14046         * driver.c (mono_main): Fix --with-gc=none build.
14047
14048         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
14049         (mono_spillvar_offset_float): Ditto.
14050         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
14051         hreg, not when its !global, since on ia64, there is a third category: stacked
14052         registers.      
14053
14054 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
14055
14056         * mini.c: set MonoInst->klass for load field address and a few other
14057         places.
14058
14059 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
14060
14061         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
14062
14063 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
14064
14065         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
14066         the branch opt changes.
14067
14068 2006-04-06  Dick Porter  <dick@ximian.com>
14069
14070         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
14071         
14072         * wapihandles.c (mini_wapi_seminfo): 
14073         * driver.c (mono_main): Add semaphore info option
14074
14075 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
14076
14077         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
14078         branch optimization changes. Fixes #78009.
14079
14080 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
14081
14082         * mini.c: ignore accessibility of methods in managed->native wrappers.
14083
14084 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
14085
14086         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
14087         
14088         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
14089
14090 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
14091
14092         * mini.c: Modify the branch optimizations to preserve the invariant that
14093         the entries inside the in_bb and out_bb arrays are unique.
14094         (mono_unlink_bblock): Avoid creation of new arrays.
14095
14096 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
14097
14098         * mini.c (mono_unlink_bblock): Fix regression caused by previous
14099         change (#77992).
14100
14101 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
14102
14103         * mini.c (optimize_branches): Remove the "optimizations" in
14104         the cbranch1/cbranch2 -> branch cases which were causing several
14105         problems in the past. Fixes #77986.
14106
14107 2006-03-31  Chris Toshok  <toshok@ximian.com>
14108
14109         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
14110         default optimizations :(
14111
14112 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
14113
14114         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
14115         branch.
14116
14117 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
14118
14119         * local-propagation.c: Added comments to structs and removed
14120         "Mono" prefixes from local tree mover types.
14121
14122 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
14123
14124         * Makefile.am (arch_sources): Define this for each architecture so 
14125         libmono_la_SOURCES is defined in one place.
14126
14127 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
14128
14129         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
14130         from handles/.
14131
14132 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
14133
14134         * driver.c: print the GC name supplied by configure.
14135
14136 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
14137
14138         * local-propagation.c: Added tree mover, and moved here all the
14139         local propagation code from mini.c
14140         * mini.c: Added support for treeprop, and moved all the local
14141         propagation code to local-propagation.c
14142         * mini.h: Added support for treeprop
14143         * driver.c: Added support for treeprop, enabled consprop, copyprop,
14144         treeprop, inline and deadce by default
14145         * Makefile.am: Added local-propagation.c
14146
14147 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
14148
14149         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
14150
14151 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
14152
14153         * debug-debugger.c: make it compile without the Boehm GC.
14154
14155 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
14156
14157         * mini.c: fixed issue with mismatch when an icall is registered
14158         with multiple names but same address.
14159
14160 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
14161
14162         * declsec.c, mini-exceptions.c: use write barrier to set reference
14163         fields of managed objects.
14164
14165 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
14166
14167         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
14168         (can_access_internals): Fix a warning.
14169
14170         * mini.c (print_method_from_ip): Rename this to 
14171         mono_print_method_from_ip so it gets exported.
14172
14173         * trace.c: Deal with strings inside StringBuilder's containing garbage
14174         and fix memory leaks. Fixes #77848.
14175
14176 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
14177
14178         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
14179         fixes #77787.
14180
14181 2006-03-16 Neale Ferguson <neale@sinenomine.net>
14182         
14183         * mini-s390.c: Remove OP_X86_TEST_NULL.
14184
14185 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
14186
14187         * mini.c: use the correct GetHashCode() for the moving collector.
14188
14189 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
14190
14191         * liveness.c: Regalloc spill cost tuning.
14192
14193 2006-03-15 Neale Ferguson <neale@sinenomine.net>
14194         
14195         * mini-s390x.h: Correct S390_LONG macro.
14196
14197         * mini-s390x.c: Cleanup unused code.
14198
14199 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
14200
14201         * jit-icalls.h: New file.
14202
14203         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
14204         icalls and include that instead of including jit-icalls.c.
14205
14206         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
14207         OP_X86 opcodes.
14208
14209 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
14210
14211         * mini.c: when checking for member accessibility, also check for
14212         friend assemblies and for explicit interface implementations.
14213
14214 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
14215
14216         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
14217
14218         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
14219
14220         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
14221         common cases are done first.    
14222
14223         * mini-ops.h: Only define platform specific opcodes on the given platform.
14224
14225         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
14226         branch.
14227         
14228 2006-03-14  Martin Baulig  <martin@ximian.com>
14229
14230         Revert Paolo's change from r57348:
14231
14232         * mini.h: don't use gboolean for bitfields.
14233         * mini.c: verifier changes for fields and methods accessibility.
14234
14235 2006-03-13  Neale Ferguson <neale@sinenomine.net>
14236
14237         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
14238
14239         * mini-s390x.c: Fix conv_r_un.
14240
14241         * cpu-s390, cpu-s390x.md: Fix lengths.
14242
14243 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
14244
14245         * mini.c: nested types have access to all the nesting
14246         levels, not just the enclosing types.
14247
14248 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
14249
14250         * mini.c: added a few more verification checks.
14251
14252 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
14253
14254         * liveness.c: Merge optimizations from the linear-il branch.
14255
14256 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
14257
14258         * mini-ia64.c (emit_call): Add a comment.
14259
14260         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
14261
14262         * tramp-ia64.c: Fix some warnings.
14263
14264 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
14265
14266         * mini.h: don't use gboolean for bitfields.
14267         * mini.c: verifier changes for fields and methods accessibility.
14268
14269 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
14270
14271         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
14272         lazy icall wrapper changes.
14273
14274         * dominators.c: Replace all the dominator algorithms with faster
14275         ones from the linear-il branch.
14276
14277         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
14278         the mempool.
14279
14280         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
14281         common cases are done first.
14282
14283         * mini-amd64.c: Fix some warnings.
14284
14285         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
14286         from the mempool.
14287
14288         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
14289         added code.
14290
14291         * mini.h: Add a missing prototype.
14292
14293 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
14294
14295         * mini.c: Compile icall wrappers lazily.
14296
14297         * mini-codegen.c: Use printf instead of g_print since its much faster.
14298
14299         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
14300         function.
14301
14302         * mini.c (optimize_branches): Cache the negative result from 
14303         remove_block_if_useless ().
14304
14305         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
14306         Also fix some bblock linking issues.
14307
14308         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
14309         assembly files.
14310
14311         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
14312
14313         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
14314         accessed fields first, for better cache behavior.
14315         
14316 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
14317
14318         * mini.c: speedup IList<T> array accesses.
14319
14320 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
14321
14322         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
14323         inline_costs counter. Fixes #77190.
14324
14325 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
14326
14327         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
14328         trace messages. Fixes #77706.
14329
14330 2006-03-04  Martin Baulig  <martin@ximian.com>
14331
14332         * tramp-amd64.c, tramp-x86.c
14333         (mono_debugger_create_notification_function): Use
14334         mono_global_codeman_reserve() to allocate a buffer at runtime and
14335         return it.
14336
14337         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
14338
14339         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
14340         notification function at runtime and then call `initialize' in the
14341         `MONO_DEBUGGER__debugger_info' vtable.
14342
14343 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
14344
14345         * iltests.il: Fix a visibility problem.
14346
14347 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
14348
14349         * driver.c, mini.c: add hooks for the counters API.
14350
14351 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
14352
14353         * driver.c: show disabled options.
14354
14355 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
14356
14357         * linear-scan.c: always use cost-driven selection.
14358
14359 2006-02-28  Raja R Harinath  <rharinath@novell.com>
14360
14361         * jit-icalls.c (helper_compile_generic_method): Revert change from
14362         2006-02-24.
14363
14364 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
14365
14366         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
14367
14368 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
14369
14370         * inssel.brg: style fixes, mostly to force the updated monoburg
14371         to run for people using svn.
14372
14373 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
14374
14375         * mini.c: match monoburg changes.
14376
14377 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
14378
14379         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
14380         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
14381         declaration in the header file.
14382
14383 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
14384
14385         * helpers.c: reduce relocations and mem usage.
14386
14387 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
14388
14389         * mini.h, mini-codegen.c: disable logging features if
14390         requested by configure.
14391
14392 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
14393
14394         * mini.c: tiny verifier changes.
14395
14396 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
14397
14398         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
14399         cpu-pentium.md: stack alignment changes for osx/x86,
14400         partially from Geoff Norton <gnorton@customerdna.com>.
14401
14402 2006-02-24  Raja R Harinath  <harinath@gmail.com>
14403
14404         * jit-icalls.c (helper_compile_generic_method): Update to changes
14405         in metadata/class.c.
14406
14407 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
14408         
14409         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
14410         
14411         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
14412         interface calls with large offsets.
14413
14414 2006-02-23  Raja R Harinath  <rharinath@novell.com>
14415
14416         * jit-icalls.c (helper_compile_generic_method): Document the
14417         special-case we depend on so that we can inflate the method twice
14418         with the same context with no bad side-effects.
14419
14420 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
14421
14422         * mini-x86.c, mini-amd64.c: fix for case when xen support
14423         is disabled.
14424
14425 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
14426
14427         * mini-x86.c, mini-amd64.c: generate code to access tls items
14428         in a faster way for Xen systems.
14429
14430 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
14431
14432         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
14433         updates and compilation fixes for the OSX/x86 port, mostly from
14434         Geoff Norton <gnorton@customerdna.com>.
14435
14436 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
14437
14438         * inssel.brg: faster interface call implementation
14439         to sync with the interface_offsets MonoVTable changes.
14440
14441 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
14442
14443         * mini.c: more verification checks.
14444
14445 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
14446
14447         * mini.c: added a few more verification checks.
14448
14449 2006-02-17      Neale Ferguson <neale@sinenomine.net>
14450
14451         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
14452         facility on the processor and use it if available.
14453
14454 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
14455
14456         * driver.c, aot.c, mini.c: throw exception if the IL code is
14457         invalid or unverifiable.
14458
14459 2006-02-17  Raja R Harinath  <rharinath@novell.com>
14460
14461         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
14462         m.StructField.
14463
14464 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
14465
14466         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
14467
14468 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
14469
14470         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
14471         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
14472         handling of instantiated generic valuetypes.
14473
14474 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
14475
14476         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
14477         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
14478         instead.
14479
14480         * generics.2.cs: Revert the nullable reftypes tests.
14481
14482 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
14483
14484         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
14485         using __builtin_frame_address (1) as it doesn't work in the presence
14486         of optimizations. Hopefully fixes #77273.
14487
14488         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
14489         -> generics.cs change as it doesn't work with some automake versions.
14490
14491 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
14492
14493         * mini.c: handle systems that sue a different way to
14494         retrieve the stack address of the current thread.
14495
14496 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
14497
14498         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
14499         it specially in the makefile.
14500
14501         * generics.2.cs: Add tests for nullable reference types.
14502
14503 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
14504
14505         * mini.c: always handle the case when mono_jit_init()
14506         is called in a thread different from the main thread,
14507         confusing libgc (bug #77309).
14508
14509 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
14510
14511         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
14512
14513 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
14514
14515         * mini.c: change optimize_branches () to use a single loop
14516         and introduce a new optimization to simplify some range checks.
14517
14518 2006-02-03  Martin Baulig  <martin@ximian.com>
14519
14520         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
14521         and merged with debugger_thread_manager_add_thread().
14522         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
14523         inform the debugger about the main thread.
14524
14525 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
14526
14527         * basic.cs: Add test for div.un/rem.un constant folding.
14528
14529 2006-02-03  Neale Ferguson <neale@sinenomine.net>
14530
14531         * cpu-s390x.md: correct int_xor_imm length
14532
14533 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
14534
14535         * generics.2.cs: New test for #77442.
14536
14537         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
14538         #77442.
14539
14540 2006-02-02  Martin Baulig  <martin@ximian.com>
14541
14542         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
14543         <mono/metadata/mono-debug-debugger.h>   
14544
14545         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
14546
14547 2006-02-02  Martin Baulig  <martin@ximian.com>
14548
14549         * debug-debugger.h: New header file for debug-debugger.c.
14550
14551         * debug-debugger.c: Big API cleanup; don't run the managed Main()
14552         function is a separate thread anymore; add support for attaching.
14553
14554 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
14555
14556         * tramp-x86.c: Fix a warning.
14557
14558 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
14559
14560         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
14561         on very large methods.
14562
14563         * aot.c (load_patch_info): Fix a warning.
14564
14565 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
14566
14567         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
14568         mini-ops.h: alu membase optimizations.
14569
14570 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
14571
14572         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
14573         to speedup StringBuilder.
14574
14575 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
14576
14577         * dominators.c (mono_compute_natural_loops): Fix detection of
14578         loop body start blocks.
14579
14580         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
14581
14582 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
14583
14584         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
14585         #75145.
14586
14587 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
14588
14589         * aliasing.c: Fixed aliasing issue on 64 bit archs.
14590
14591 2006-01-25  Martin Baulig  <martin@ximian.com>
14592
14593         * debug-debugger.c: Moved the `MonoDebuggerManager' and
14594         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
14595         started to cleanup this file a little bit.
14596
14597 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
14598
14599         * mini.c: optimize a codepath frequently happening in generics code.
14600
14601 2006-01-23  Martin Baulig  <martin@ximian.com>
14602
14603         * Makefile.am: Only compile debug-debugger.c on supported platforms.
14604
14605         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
14606         functions directly.
14607
14608         * driver.c: debug-debugger.c is only available if
14609         `MONO_DEBUGGER_SUPPORTED' is defined.   
14610
14611 2006-01-23  Martin Baulig  <martin@ximian.com>
14612
14613         * debug-debugger.c: Only enable this on platforms where the Mono
14614         Debugger is working (x86 and x86_64).
14615
14616 2006-01-21  Martin Baulig  <martin@ximian.com>
14617
14618         The Mono Debugger is now using the normal `mono' instead of the
14619         `mono-debugger-mini-wrapper' when executing managed code.
14620
14621         * debug-debugger.c: New file; previously known as
14622         debugger/wrapper/wrapper.c.
14623
14624         * debug-mini.c (mono_init_debugger): Removed.
14625
14626         * driver.c (mono_main): Added new `--inside-mdb' command line
14627         argument which is used when running inside the debugger.
14628
14629 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
14630
14631         * liveness.c (mono_analyze_liveness): Remove some unused data
14632         structures.
14633
14634 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
14635
14636         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
14637
14638 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
14639
14640         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
14641         depends on implementation details of monobitset.
14642
14643         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
14644         Fixes #77271.
14645
14646 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
14647
14648         * liveness.c: Update after monobitset changes.
14649
14650 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
14651
14652         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
14653
14654 2006-01-11 Neale Ferguson <neale@sinenomine.net>
14655
14656         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
14657
14658         * mini-s390x.c: Remove warning messages.
14659
14660 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
14661
14662         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
14663
14664 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
14665
14666         * generics.2.cs: Add ldelem/stelem_any test.
14667
14668 2006-01-10 Neale Ferguson <neale@sinenomine.net>
14669
14670         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
14671
14672 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
14673
14674         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
14675         
14676 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
14677
14678         * generics.2.cs: Reenable vtype tests.
14679
14680         * inssel-x86.brg: Remove an icorrect valuetype rule.
14681
14682 2006-01-06 Neale Ferguson <neale@sinenomine.net>
14683
14684         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
14685         initial support for OP_ABS.
14686
14687 2006-01-05 Neale Ferguson <neale@sinenomine.net>
14688
14689         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
14690
14691 2006-01-05 Neale Ferguson <neale@sinenomine.net>
14692
14693         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
14694         conversion and implement LADD/LSUB.
14695
14696         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
14697         architectures.
14698
14699 2006-01-05 Neale Ferguson <neale@sinenomine.net>
14700
14701         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
14702
14703         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
14704         architectures.
14705
14706 2006-01-05 Neale Ferguson <neale@sinenomine.net>
14707
14708         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
14709         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
14710         (stack walk problem).
14711
14712 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
14713
14714         * aot.c (mono_aot_load_method): Fix a warning.
14715
14716 2006-01-03  Neale Ferguson <neale@sinenomine.net>
14717
14718         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
14719
14720 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
14721
14722         * iltests.il: Add test for #77148.
14723
14724         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
14725         #77148.
14726
14727 2006-01-03  Neale Ferguson <neale@sinenomine.net>
14728
14729         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
14730
14731 2006-01-03  Neale Ferguson <neale@sinenomine.net>
14732
14733         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
14734         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
14735
14736         * basic-long.cs: Add lconv-to-r4/r8 tests.
14737
14738 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
14739
14740         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
14741
14742         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
14743         here as on other archs.
14744
14745 2005-12-29 Neale Ferguson <neale@sinenomine.net>
14746
14747         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
14748
14749 2005-12-29 Neale Ferguson <neale@sinenomine.net>
14750
14751         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
14752         
14753         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
14754
14755         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
14756         instrument_prolog; Add memory_barrier instruction.
14757
14758 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
14759
14760         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
14761
14762 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
14763
14764         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
14765
14766         * aliasing.c inssel.brg: Fix warnings.
14767
14768         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
14769         could skip initialization of some parts of memory.
14770
14771         * mini.c mini-ia64.c: Fix warnings.
14772
14773         * inssel-sparc.brg: Add an implementation of lneg which actually works.
14774
14775 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
14776
14777         * aliasing.c (mono_build_aliasing_information): Add a workaround for
14778         a crash seen on sparc.
14779
14780         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
14781         
14782         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
14783
14784 2005-12-21 Neale Ferguson <neale@sinenomine.net>
14785
14786         * mini-ops.h: Add s390_backchain instruction
14787
14788         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
14789
14790         * cpu-s390.md: Add s390_backchain instruction
14791
14792         * mini-s390.c: Significant ABI changes
14793
14794         * mini-s390.h: Cater for zero length structures
14795
14796 2005-12-20 Neale Ferguson <neale@sinenomine.net>
14797
14798         * mini-s390.c: ABI fixes
14799
14800         * inssel-s390.brg: Remove debug statements
14801
14802         * cpu-s390.md: Fix length of ATOMIC_xx operations
14803
14804 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
14805
14806         * basic-float.cs: Add float<->long conversion tests.
14807
14808 2005-12-16 Neale Ferguson <neale@sinenomine.net>
14809
14810         * mini-s390.c: Fix LOCALLOC processing.
14811
14812         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
14813
14814 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
14815
14816         * iltests.il: Add tests for some opcodes not covered by the other
14817         tests.
14818
14819 2005-12-15 Neale Ferguson <neale@sinenomine.net>
14820
14821         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
14822         register loading for Tail processing; Correct trace output.
14823
14824         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
14825
14826         * cpu-s390.md: Correct size of jmp instruction. 
14827
14828 2005-12-13 Neale Ferguson <neale@sinenomine.net>
14829
14830         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
14831
14832 2005-12-13 Neale Ferguson <neale@sinenomine.net>
14833
14834         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
14835           Bring s390 up to current level.
14836
14837 2005-12-12  Zltan Varga  <vargaz@gmail.com>
14838
14839         * generics.2.cs: Disable the newly added tests as they do not work yet.
14840         
14841         * generics.2.cs: Add valuetype tests.
14842
14843 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
14844
14845         * basic-long.cs: Add i4->u8 test.
14846
14847         * objects.cs: Add tests for JIT intrinsic.
14848
14849         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
14850         optimizations lost by a mistake.
14851
14852 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
14853
14854         * basic-long.cs: Remove a test moved to objects.cs.
14855
14856         * arrays.cs: Add more array tests.
14857
14858 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
14859
14860         * arrays.cs: Add new tests for multi-dimensional arrays.
14861
14862 2005-12-06  Raja R Harinath  <rharinath@novell.com>
14863
14864         * Makefile.am (test_sources2): Add generics.2.cs.
14865         (EXTRA_DIST): Add test_sources2.
14866
14867 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
14868
14869         Support for boxing and unboxing nullable types as well as the
14870         isinst operation on nullables, per the CLI ammendment.
14871
14872         * inssel.brg (CEE_ISINST): Special case for nullable
14873
14874         * mini.c (handle_unbox_nullable): new method
14875         (handle_box): Special case for nullable types
14876         (mono_method_to_ir): Call handle_unbox_nullable in correct
14877         places.
14878
14879         * generics.2.cs: New test suite
14880
14881         * Makefile.am: Support for regression tests with generics.
14882
14883 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
14884
14885         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
14886         allocated to registers. Fixes #76800.
14887
14888 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
14889
14890         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
14891
14892 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
14893
14894         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
14895         of platforms.
14896
14897 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
14898
14899         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
14900         objects.cs.
14901
14902         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
14903         
14904         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
14905 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
14906
14907         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
14908         single precision before storing to a single precision location.
14909
14910 2005-11-28  Raja R Harinath  <rharinath@novell.com>
14911
14912         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
14913
14914 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
14915
14916         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
14917         correct files.
14918
14919         * basic.cs: Remove test_0_byte_compares test which was moved to
14920         objects.cs a long time ago.
14921
14922 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
14923
14924         * aliasing.c: Fixed aliasing issue on 64 bit archs.
14925
14926 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
14927
14928         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
14929         handlers are called.
14930
14931         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
14932         throwing code.
14933
14934          * mini-ia64.c: Add support for the throw->branch exception 
14935         optimization.   
14936
14937         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
14938
14939 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
14940
14941         * mini.c: Enabled "fastpath" deadce :-)
14942         
14943 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
14944
14945         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
14946         alias analysis pass to support it.
14947         * mini.h: Likewise.
14948         * ssa.c: Likewise.
14949         * liveness.c: Likewise (liveness computation can use aliasing
14950         information to be more accurate).
14951         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
14952         moreover made so that "--compile-all" uses the given optimization
14953         flags and not the default ones.
14954         * aliasing.c: Alias analysis (new file).
14955         * aliasing.h: Likewise.
14956         * Makefile.am: added "aliasing.c" and "aliasing.h".
14957         
14958 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
14959
14960         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
14961         OP_L opcodes.
14962
14963 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
14964
14965         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
14966         fp >= end_of_stack exit condition, as it is not needed, and it might
14967         become true for fp eliminated frames.
14968
14969 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
14970
14971         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
14972         coded offsets.
14973
14974 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
14975
14976         * mini-arm.c: fixed alignment of doubles/longs to match
14977         the C ABI (bug #76635).
14978
14979 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
14980
14981         * aot.c: fix compilation with --enable-minimal=aot.
14982
14983 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
14984
14985         * mini-arm.c: fixed compatibility with the new
14986         floating point emulator package for compares.
14987
14988 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
14989
14990         * mini.c : reverted sig->pinvoke changes (r51396-51397).
14991
14992 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
14993
14994         * mini-exceptions.c (print_stack_frame): Output to stderr.
14995         (mono_handle_native_sigsegv): Ditto.
14996
14997 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
14998
14999         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
15000         OP_LCONV_TO_OVF_I implementation.
15001
15002         * mini-amd64.c: Add support for the throw->branch exception 
15003         optimization.
15004
15005         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
15006         when the catch clause catches a more general exception, i.e. Object.
15007
15008 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
15009
15010         * cpu-ia64.md: Remove unused opcodes.
15011
15012         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
15013         specific defines for architectures defining USE_SIGACTION.
15014
15015         * mini-ia64.c: Fix some warnings.
15016
15017         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
15018         version seemed to skip a frame.
15019
15020 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
15021
15022         * mini.c: Clean up the usage of sig->pinvoke flag. Now
15023         only calls which are made to native code use this flag.
15024
15025 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
15026
15027         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
15028         varargs methods as well.
15029         
15030         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
15031         which have save_lmf set. Reorganize methods prologs a bit.
15032
15033         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
15034         debugger to the proper place.
15035
15036 2005-10-29  Martin Baulig  <martin@ximian.com>
15037
15038         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
15039         when running inside the debugger until the debugger has support
15040         for it.
15041
15042 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
15043
15044         * mini.h: Fix a warning.
15045
15046 2005-10-24  Miguel de Icaza  <miguel@novell.com>
15047
15048         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
15049         we expose publicly, this returns the string.
15050
15051 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
15052
15053         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
15054         with fp elimination.
15055
15056 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
15057
15058         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
15059         native stacktrace using the glibc 'backtrace' function if available.
15060
15061 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
15062
15063         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
15064
15065         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
15066         handle SIGSEGVs received while in native code.
15067
15068         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
15069         code, call mono_handle_native_sigsegv which will abort the runtime
15070         after printing some diagnostics, instead of converting it into a
15071         confusing NullReferenceException.
15072
15073 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
15074
15075         * cpu-pentium.md: Remove unused opcodes.
15076
15077 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
15078
15079         * mini-amd64.h (MonoLMF): Add rsp field.
15080
15081         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
15082         the lmf too.
15083
15084 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
15085
15086         * mini-codegen.c (get_register_spilling): Fix some warnings.
15087
15088 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
15089
15090         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
15091         elimination during exception handling. Enable fp elimination by
15092         default.
15093
15094         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
15095         elimination.
15096
15097 2005-10-16  Martin Baulig  <martin@ximian.com>
15098
15099         * mini-exceptions.c
15100         (mono_debugger_run_finally): New public method for the debugger.
15101
15102 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
15103
15104         * debug-mini.c (mono_debug_init_method): Fix warning.
15105
15106         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
15107         the 'exname' parameter const to fix some warnings.
15108
15109 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
15110
15111         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
15112         introduced by the previous patch.
15113
15114 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
15115
15116         * basic-float.cs: Add test for precision of float arithmetic.
15117
15118         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
15119         when loading/storing single values from/to memory.
15120
15121         * mini.c (mono_jit_compile_method_with_opt): Create the function
15122         pointers in the correct domain.
15123
15124 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
15125
15126         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
15127         introduced by previous patch.
15128         
15129         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
15130         when out_filter_idx is NULL.
15131
15132         * mini-exceptions.c: Don't run filter clauses twice during exception
15133         handling. Fixes #75755.
15134
15135 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
15136
15137         * aot.c: Add support for ldflda wrappers.
15138
15139         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
15140         #75902.
15141
15142 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
15143
15144         * mini.c, mini.h: do not consider exception handlers blocks when
15145         setting up interface variables.
15146
15147 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
15148
15149         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
15150
15151 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
15152
15153         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
15154         causes a regression.
15155
15156         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
15157
15158 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
15159
15160         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
15161         of the OP_P definitions.
15162
15163         * TODO: Add a proposal for dealing with the CEE/OP mess.
15164
15165         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
15166         optimizations from the x86 port.
15167
15168         * cpu-amd64.md: Ditto.
15169
15170         * basic.cs basic-long.cs: Add tests.
15171
15172 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
15173
15174         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
15175         Patrik Torstensson's implementation of my exception-handling
15176         optimization idea, when the exception object is not used
15177         (bug #62150).
15178
15179 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
15180
15181         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
15182         of the mul_imm optimizations from the old jit.
15183
15184 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
15185
15186         * mini.c, liveness.c: patch by Patrik Torstensson and
15187         Zoltan Varga to improve performance in methods with
15188         exception clauses.
15189
15190 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
15191
15192         * driver.c: Remove 'Globalization' entry from --version.
15193
15194 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
15195
15196         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
15197         there is a profiler interested in JIT events.
15198
15199         * aot.c: Load profile files produced by the AOT profiling module, and
15200         reorder methods based on the profiling info. Add a 'method_order' table
15201         to the AOT file to make mono_aot_find_jit_info work with the reordered
15202         methods.
15203
15204         * mini.h: Bump AOT file version info.
15205
15206 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
15207
15208         * mini-arm.h: work around what looks like a gcc bug when optimizations
15209         are enabled.
15210
15211 2005-09-28  Raja R Harinath  <rharinath@novell.com>
15212
15213         * Makefile.am (AM_CFLAGS): Don't use += to append inside
15214         conditionals.  Use ...
15215         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
15216
15217 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
15218
15219         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
15220         to determine the amount of memory to copy when passing valuetypes.
15221
15222         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
15223         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
15224
15225 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
15226
15227         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
15228         information about aot.
15229
15230 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
15231
15232         * *.c: Replace the use of {Enter,Leave}CriticalSection with
15233         macros. This will allow a deadlock debugger to easily be plugged
15234         in.
15235
15236 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
15237
15238         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
15239
15240 2005-09-27  Raja R Harinath  <rharinath@novell.com>
15241
15242         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
15243         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
15244         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
15245         ($(arch_built)) [CROSS_COMPILING]: Error out.
15246
15247 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
15248
15249         * aot.c: Add support for the no_special_static flag for classes.
15250
15251 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
15252
15253         * Reapply reverted patches.
15254
15255         * *: Revert r50174 as well.
15256
15257         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
15258
15259 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
15260
15261         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
15262
15263 2005-09-23  Miguel de Icaza  <miguel@novell.com>
15264
15265         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
15266         part of the SIG_HANDLER_SIGNATURE.  
15267
15268 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
15269
15270         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
15271         statistics.
15272
15273         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
15274         introduced by previous patch.
15275
15276 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
15277
15278         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
15279         saved registers too.
15280
15281         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
15282         upon the information returned by get_call_info ().
15283         
15284         * mini-x86.c (add_float): Fix stack size calculation.
15285         (mono_arch_call_opcode): Rewrite this so it works based up the
15286         information returned by get_call_info ().
15287         (mono_arch_get_this_vret_args): Ditto.
15288
15289 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
15290
15291         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
15292         in cinfo to determine the registers which need to be used.
15293
15294 2005-09-20  Miguel de Icaza  <miguel@novell.com>
15295
15296         * driver.c (mono_main): Add --server and --desktop flags. 
15297
15298 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
15299
15300         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
15301         registers as global registers.
15302
15303         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
15304         longer needed with the new register allocator.
15305
15306         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
15307
15308         * cpu-ia64.md: Remove unused opcodes.
15309         
15310         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
15311         
15312 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
15313
15314         * cpu-amd64.md: Remove unused opcodes.
15315
15316         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
15317         needed with the new register allocator.
15318
15319         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
15320         reg-reg moves.
15321
15322 2005-09-16  Raja R Harinath  <rharinath@novell.com>
15323
15324         * Makefile.am (check-local): Don't invoke semdel-wrapper.
15325
15326 2005-09-16  Martin Baulig  <martin@ximian.com>
15327
15328         * exceptions-amd64.c
15329         (throw_exception): Don't call mono_debugger_throw_exception() if
15330         we're a rethrow - see the FIXME in the code.
15331
15332 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
15333
15334         * mini.c (mono_init_exceptions): This only works on some architectures.
15335         
15336 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
15337
15338         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
15339         on ia64.
15340
15341         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
15342
15343         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
15344         now in mini-exceptions.c.
15345
15346 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
15347
15348         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
15349         now in mini-exceptions.c.
15350
15351 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
15352
15353         * exceptions-x86.c: Applied patch from Patrik Torstensson 
15354         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
15355
15356         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
15357         code into mini-exceptions.c. Add some assertions to it.
15358
15359 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
15360
15361         * aot.c (emit_section_change): Applied patch from "The Software Team" 
15362         (<software@solmersa.com>). Fix as errors on windows.
15363
15364 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
15365
15366         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
15367         method info into the LMF.
15368
15369 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
15370         
15371         * mini-ia64.c: Add proper unwind info for method epilogs.
15372
15373         * exceptions-ia64.c: Add some code to help debugging.
15374         
15375         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
15376
15377         * mini-exceptions.c: Fix warning.
15378
15379 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
15380
15381         * mini.c: Really fix build.
15382
15383         * mini-x86.c mini-amd64.c: Fix build.
15384
15385 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
15386
15387         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
15388
15389         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
15390         some Interlocked methods as intrinsics.
15391
15392         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
15393         for Thread methods as well.
15394
15395         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
15396
15397         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
15398
15399         * mini-ia64.c mini-x86.c mini-amd64.c 
15400         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
15401         OP_MEMORY_BARRIER.
15402         
15403         * mini.c (mono_init_exceptions): Fix build breakage.
15404
15405 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
15406
15407         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
15408         of instructions. Use the new ia64_unw_op macros for emitting unwind
15409         info.
15410
15411         * mini.c (mono_init_exceptions): Initialize exception handling
15412         related trampolines at startup.
15413
15414 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
15415
15416         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
15417
15418 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
15419
15420         * mini.c: Handle type loading errors gracefully during compilation and
15421         throw the appropriate exception.
15422
15423 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
15424
15425         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
15426         for the mono binary.
15427
15428 2005-09-09  Martin Baulig  <martin@ximian.com>
15429
15430         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
15431         the release.
15432
15433 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
15434
15435         * mini-arm.h: use emulation for conv.r.un for the release.
15436
15437 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
15438
15439         * mini-arm.c, objects.cs: more fixes and tests for them.
15440
15441 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
15442
15443         * mini-arm.c: align structures to at least 4 bytes to be able
15444         to keep our current optimized memcpy.
15445
15446 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
15447
15448         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
15449
15450 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15451
15452         * mini.c: ignore SIGPIPE.
15453
15454 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
15455
15456         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
15457
15458         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
15459
15460 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
15461
15462         * mini.h: Add prototype for mono_allocate_stack_slots_full.
15463
15464 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
15465
15466         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
15467         exception handling support.
15468         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
15469         patch by Brian Koropoff <briank@marakicorp.com>).
15470
15471 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
15472
15473         * mini.c: revert another 'optimization' which breaks when
15474         items on the eval stack need to be saved at a basic block end
15475         (bug #75940).
15476
15477 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
15478
15479         * jit-icalls.c: for arrays, ensure we always provide
15480         lower bounds.
15481
15482 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
15483
15484         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
15485         
15486         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
15487
15488 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
15489
15490         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
15491         arguments in their original register.
15492
15493 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
15494
15495         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
15496         memset/memcpy.
15497
15498         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
15499         when ssapre is enabled.
15500
15501         * inssel-long.brg: Fix bug in previous patch.
15502
15503         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
15504         multiplication by a constant.
15505
15506 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
15507
15508         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
15509         icc.
15510
15511         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
15512         saving registers.
15513
15514 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
15515
15516         * inssel-arm.brg: apply changes tested by Brian Koropoff
15517         <briank@marakicorp.com>.
15518
15519 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
15520
15521         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
15522         
15523 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
15524
15525         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
15526         to the same register if dreg is just a base register.
15527         (print_ins): Improve printing of membase opcodes.
15528
15529         * inssel-x86.brg: Add optimized ldind(reg) rules.
15530
15531         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
15532
15533 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
15534
15535         * mini.c: when running under valgrind, set the stack bottom for
15536         the GC at the actual approximate stack for the app (fixes running
15537         mono with valgrind).
15538
15539 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
15540
15541         * mini.c: do no break at the first valuetype to init found
15542         (fixes bug #75791).
15543
15544 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
15545
15546         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
15547
15548 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
15549
15550         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
15551
15552 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
15553
15554         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
15555
15556 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
15557
15558         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
15559
15560         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
15561         code.
15562
15563         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
15564         code.
15565
15566         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
15567         methods.
15568
15569 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
15570
15571         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
15572
15573 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
15574
15575         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
15576         in the tail recursion optimization.
15577
15578         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
15579         debug info into the assembly file.
15580
15581         * iltests.il: Add test for filter regions.
15582
15583         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
15584         initial stack of filter regions. Fixes #75755.
15585
15586 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
15587
15588         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
15589         stack requirements.
15590
15591 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
15592
15593         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
15594         the check for an already compiled method on non-ia64 platforms.
15595         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
15596         proper domain.
15597
15598         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
15599
15600         * inssel-x86.brg: Add some optimized call rules.
15601
15602 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
15603
15604         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
15605         method here.
15606
15607         * mini.h mini-trampolines.c: Pass the trampoline argument to 
15608         mono_arch_patch_delegate_trampoline.
15609
15610         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
15611
15612         * mini-trampolines.c: Fix build.
15613
15614         * mini-amd64.h: Add delegate trampolines.
15615
15616         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
15617
15618         * inssel-amd64.brg: Add optimized call rules.
15619         
15620         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
15621
15622         * inssel-ia64.brg: Add optimized ldind(reg) rules.
15623
15624 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
15625
15626         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
15627         change.
15628
15629         * mini-ia64.c: Remove LMF fixmes.
15630
15631         * mini-ia64.h: Remove most fields from LMF.
15632
15633         * inssel-ia64.brg (stmt): Fix unaligned access errors.
15634
15635         * mini-trampolines.c: Add support for IA64 function descriptors.
15636
15637         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
15638         for IA64 function descriptors.
15639
15640 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
15641
15642         * tramp-arm.c: patch the vtable for virtual calls. Added
15643         support code to register/unregister the LMF.
15644         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
15645         more LMF work.
15646
15647 2005-08-19  Dick Porter  <dick@ximian.com>
15648
15649         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
15650         bit value if needed.
15651
15652 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
15653
15654         * mini.c (mini_get_method): Move handling of wrapper data here.
15655
15656         * mini.c (mono_method_to_ir): Add support for dynamic methods.
15657
15658         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
15659         virtual.
15660
15661         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
15662         bblock->code does not remain empty.
15663
15664 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
15665
15666         * arrays.cs: Add regression test for #75832.
15667
15668         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
15669         rules. Fixes #75832.
15670
15671         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
15672         instruction scheduling.
15673
15674 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
15675
15676         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
15677
15678 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
15679
15680         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
15681
15682         * mini-codegen.c: Fix VC build.
15683
15684         * cpu-pentium.md: Increase length of atomic_exhange_i4.
15685
15686 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15687
15688         * mini.h: fix signature for mono_register_opcode_emulation.
15689
15690 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
15691
15692         * mini.c: Get rid of most of the helper_sig_... constants using
15693         mono_create_icall_signature ().
15694
15695 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
15696
15697         * jit-icalls.c (helper_ldstr): New helper function.
15698
15699         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
15700
15701         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
15702         throw, load the string using a helper call instead of creating a string object.
15703
15704         * aot.c: Update after LDSTR changes.
15705
15706         * mini.h: Bump AOT file version.
15707         
15708         * aot.c: Save class size info into the AOT file. Print more statistics during
15709         compilation.
15710
15711         * mini.h: Bump AOT file version.
15712
15713         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
15714         ordering of disasm cases. Fixes #74957.
15715
15716 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
15717
15718         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
15719         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
15720         the generic code needed for the ARM port.
15721
15722 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
15723
15724         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
15725         inssel-arm.brg: more ARM features and fixes.
15726
15727 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
15728
15729         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
15730         ARM port work in progress.
15731
15732 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
15733
15734         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
15735
15736         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
15737
15738         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
15739
15740         * inssel.brg (mini_emit_memset): Add support for unaligned access.
15741
15742         * *-ia64.*: Ongoing IA64 work.
15743         
15744         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
15745
15746 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
15747
15748         * TODO: Remove out-of-data todo stuff.
15749
15750         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
15751         dead code.
15752
15753         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
15754
15755         * mini.h: Bump corlib version.
15756
15757 2005-07-27  Martin Baulig  <martin@ximian.com>
15758
15759         * mini-codegen.c
15760         (create_copy_ins): Added `const unsigned char *ip' argument; set
15761         `copy->cil_code' from it.
15762
15763 2005-07-27  Martin Baulig  <martin@ximian.com>
15764
15765         * mini-exceptions.c (mono_handle_exception): Don't call
15766         mono_debugger_handle_exception() for filters.
15767
15768 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
15769
15770         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
15771         as well.
15772
15773 2005-07-26  Martin Baulig  <martin@ximian.com>
15774
15775         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
15776
15777         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
15778         helper_compile_generic_method() if the method is actually virtual
15779         and non-final.
15780
15781 2005-07-26  Martin Baulig  <martin@ximian.com>
15782
15783         * mini.c
15784         (trampoline_code): Renamed to `mono_trampoline_code' and made it
15785         public; this is now accessed directly by the debugger.
15786         (mono_generic_trampoline_code): Removed.
15787
15788         * debug-mini.c
15789         (mono_debug_init_method): Also add interncalls and wrappers.
15790
15791 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
15792
15793         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
15794
15795 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
15796
15797         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
15798
15799 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
15800
15801         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
15802
15803 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
15804
15805         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
15806         getting TLS offsets on AMD64 too.
15807
15808 2005-07-20  Kornel Pal <kornelpal@hotmail.com>
15809
15810         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
15811
15812 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
15813
15814         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
15815         inssel-arm.brg, mini-arm.h: ARM port work in progress.
15816
15817 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
15818
15819         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
15820
15821         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
15822         to mini.c.
15823
15824         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
15825         mono_sparc_is_virtual_call ().
15826         
15827         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
15828
15829         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
15830         trampoline parameters.
15831
15832         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
15833         
15834         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
15835         to mono_arch_get_vcall_slot_addr.
15836
15837         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
15838         trampoline code.
15839
15840         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
15841
15842 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
15843
15844         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
15845
15846 2005-07-19  Martin Baulig  <martin@ximian.com>
15847
15848         * exceptions-amd64.c (throw_exception): Call
15849         mono_debugger_throw_exception() here like we're doing it on i386.
15850
15851 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
15852
15853         * mini-ia64.c: Add optimized TLS access support.
15854
15855 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
15856
15857         * mini-exceptions.c: Ongoing IA64 work.
15858
15859         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
15860
15861         * mini.c: Use the default optimization set when embedding. Fixes
15862         #75194.
15863
15864 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
15865
15866         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
15867         of trampolines to a separate file.
15868
15869         * mini-trampolines.c: New file.
15870
15871         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
15872         separate file.
15873         
15874         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
15875         amd64/ia64 code.
15876
15877         * mini-codegen.c: Fix cygwin build.
15878
15879 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
15880
15881         * mini.c: Add some minor changes needed by the IA64 port.
15882
15883         * *-ia64.*: Ongoing IA64 work.
15884
15885 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
15886
15887         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
15888         trampolines into arch-independent and arch-dependent parts.
15889
15890         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
15891
15892 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
15893
15894         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
15895
15896         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
15897         the xp-regalloc-branch for amd64.
15898
15899         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
15900         xp-regalloc-branch for x86.
15901
15902 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
15903
15904         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
15905
15906 2005-07-06  Martin Baulig  <martin@ximian.com>
15907
15908         * mini.c
15909         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
15910         (mono_jit_runtime_invoke): Likewise.
15911
15912 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
15913
15914         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
15915         on x86 too.
15916         
15917         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
15918         without loading their metadata. Reorganize the file format so exception handling+
15919         debug info is kept separate from normal method info. Create MonoJitInfo 
15920         structures for methods lazily.
15921
15922         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
15923         loading metadata.
15924         (x86_class_init_trampoline): Patch AOT class init trampolines too.
15925
15926         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
15927
15928         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
15929         in AOT code.
15930
15931         * mini.h: Bump AOT file version.
15932
15933 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
15934
15935         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
15936
15937 2005-07-01  Raja R Harinath  <rharinath@novell.com>
15938
15939         * Makefile.am (check-local): Call semdel-wrapper.
15940
15941 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
15942
15943         * mini-x86.c: Revert the last change as it seems to break the build..
15944
15945 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
15946
15947         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
15948         
15949         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
15950
15951 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
15952
15953         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
15954         outside of the macro, so strange stuff doesn't happen with gcc4
15955         (NEW_AOTCONST_TOKEN): Likewise.
15956
15957 2005-06-28  Martin Baulig  <martin@ximian.com>
15958
15959         * mini.c (mini_class_is_system_array): New static method; use this
15960         instead of `klass->parent == mono_defaults.array_class' everywhere
15961         since this also works for the new generic array class.
15962
15963 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
15964
15965         * inssel.brg: Remove warnings.
15966
15967 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
15968
15969         * mini-ia64.c: Ongoing IA64 work.
15970
15971         * basic-float.cs: Add float->i1 conversion test.
15972
15973         * iltests.il: Add conv.u4 test.
15974
15975 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
15976
15977         * inssel-long.brg: Fix bug caused by last change.
15978
15979 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
15980
15981         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
15982         BSDs.  Allows the x86 JIT to work on OSX86
15983
15984 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
15985
15986         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
15987         u4->i8 conversion.
15988
15989         * mini-ia64.c: Ongoing IA64 work.
15990
15991 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
15992
15993         * mini-ia64.c: Ongoing IA64 work.
15994
15995         * driver.c: Clean up jit_code_hash as well when using --regression.
15996
15997         * inssel-long.brg: Fix long->i4/u4 conversion rules.
15998
15999         * basic-long.cs: Add tests for long->u4 conversion.
16000
16001 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
16002
16003         * mini.c: Take mono_get_domainvar out of macros. This makes sure
16004         that we do not depend on undefined C behavior: the order stuff
16005         gets evaluated within an expression. Fixes mono when compiled on
16006         GCC 4.
16007
16008 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
16009
16010         * *-ia64.*: Ongoing IA64 work.
16011
16012         * aot.c: Lower memory usage while loading AOT methods.
16013
16014         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
16015
16016         * mini.h: Bump AOT file format version.
16017
16018 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
16019
16020         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
16021
16022 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
16023
16024         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
16025         not on callee assembly). Fixed some comments.
16026
16027 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
16028
16029         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
16030         it gets proper disassembly.
16031         (emit_method_info): Remove some dead code.
16032
16033         * mini.c (mini_method_compile): Allways allocate the GOT var in
16034         mono_method_to_ir for emulating opcodes.
16035
16036 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
16037
16038         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
16039         before freeing the code memory. Fixes #74990.
16040
16041         * objects.cs: Add regression test for #74992.
16042
16043         * liveness.c: Extend live ranges of arguments to the beginning of the
16044         method. Fixes #74992.
16045
16046         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
16047         so it points into the faulting instruction.
16048
16049 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
16050
16051         * jit-icalls.c (mono_imul_ovf): Add exception handling.
16052
16053         * *-ia64.*: Ongoing IA64 work.
16054
16055         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
16056
16057 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
16058
16059         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
16060
16061         * *-ia64.*: Ongoing IA64 work.
16062
16063 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
16064
16065         * basic-long.cs: Add tests for add/sub.ovf.
16066
16067         * basic.cs: Add tests for sub.ovf.
16068
16069         * *-ia64.*: Ongoing IA64 work.
16070
16071 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
16072
16073         * *-ia64.*: Ongoing IA64 work.
16074
16075         * basic.cs: Add conv.ovf.i4.un test.
16076
16077 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
16078
16079         * mini.c: (remove_block_if_useless) Fixed bug 75061.
16080         
16081 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16082
16083         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
16084
16085 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
16086
16087         * *-ia64.*: Ongoing IA64 work.
16088
16089 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16090
16091         * trace.[ch]:
16092         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
16093
16094 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
16095
16096         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
16097
16098 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
16099
16100         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
16101
16102         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
16103         of a call is callable by a near call.
16104
16105 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
16106
16107         * mini-ia64.c: Ongoing IA64 work.
16108
16109 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
16110
16111         * genmdesc.c: Make the generated array non-static.
16112
16113         * inssel-long.brg: Fix LSHR_IMM rule.
16114
16115         * *-ia64.*: Ongoing IA64 work.
16116
16117         * *-ia64.*: Ongoing IA64 work.
16118
16119 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
16120
16121         * *-ia64.*: Ongoing IA64 work.
16122
16123         * *-ia64.*: Ongoing IA64 work.
16124         
16125         * mini-ia64.c: Ongoing IA64 work.
16126
16127         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
16128
16129 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
16130
16131         * objects.cs basic-calls.cs: Move some tests to objects.cs.
16132         
16133         * objects.cs basic-long.cs: Move some tests to objects.cs.
16134
16135 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
16136
16137         * *-ia64.*: Ongoing IA64 work.
16138
16139         * iltests.il: Add a new test.
16140
16141         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
16142         newobj. Fixes #75042.
16143
16144 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
16145
16146         * *-ia64.*: Ongoing IA64 work.
16147         
16148         * *-ia64.*: Ongoing IA64 work.
16149         
16150         * *-ia64.*: Ongoing IA64 work.
16151
16152         * basic.cs objects.cs: Move tests accessing static variables as well.
16153
16154         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
16155
16156 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
16157
16158         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
16159
16160         * driver.c: Always print failed tests.
16161
16162         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
16163         frame pointer.
16164
16165         * *ia64*: Ongoing IA64 work.
16166
16167 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
16168
16169         * basic.cs: Add tests for add.ovf. Fix warnings.
16170
16171 2005-05-18  Miguel de Icaza  <miguel@novell.com>
16172
16173         * driver.c (mono_main): Avoid crash if no argument is passed to
16174         --break;  Do not use g_error, but f_printf.   And fix all other
16175         ocurrences of the same crash.
16176
16177 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
16178
16179         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
16180         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
16181         Fixes #74742.
16182
16183 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
16184
16185         * *-ia64.*: Add beginnings of IA64 backend.
16186
16187         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
16188
16189 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
16190
16191         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
16192         Fixes #74925.
16193
16194         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
16195
16196         * mini-amd64.c: Fix a warning.
16197
16198 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
16199
16200         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
16201         in float_neg. Fixes #74897.
16202
16203         * mini-amd64.c (emit_call): Fix another near call bug.
16204
16205 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
16206
16207         * declsec.c: Keep the appdomain information in the structure. Added a 
16208         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
16209         value gets overwritten).
16210         * declsec.h: Set the default MonoArray for the the stack to 6. Added
16211         an MonoAppDomain member to MonoSecurityFrame.
16212         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
16213         used in the stack walk. Now use a MonoArray which grow (double) when
16214         it gets full.
16215
16216 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
16217
16218         * mini.c: Re-enabled runtime cleanup, since running threads should
16219         now properly stop when exiting.
16220
16221 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
16222
16223         * mini-codegen.c: New file contaning the arch-independent local
16224         register allocator. Not used by any architectures yet.
16225
16226         * mini.h linear-scan.c: Merge some changes from the 
16227         mini-xp-local-regalloc branch.
16228
16229 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
16230
16231         * mini-amd64.c (emit_call): Fix calls to native functions when the
16232         runtime is compiled as a shared library. Fixes #74756.
16233
16234         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
16235         on a literal field. Fixes #74751.
16236
16237 2005-04-25  Raja R Harinath  <rharinath@novell.com>
16238
16239         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
16240
16241 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
16242
16243         * objects.cs: Add missing null casting test.
16244
16245 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
16246
16247         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
16248         in wrapper methods. Also rename 'address' variable to 'offset'.
16249
16250 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
16251
16252         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
16253         warnings.
16254         
16255         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
16256
16257         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
16258         work on windows.
16259
16260 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
16261
16262         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
16263
16264 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
16265
16266         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
16267         just the last bytes.
16268
16269 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
16270
16271         * aot.c (mono_compile_assembly): Fix warning.
16272
16273         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
16274         by the _MSC_VER stuff.
16275
16276 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
16277
16278         * inssel-long.brg: Fix #74588.
16279
16280         * cpu-amd64.md: Fix #74591.
16281
16282         * iltests.il: Add new regression tests.
16283
16284 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
16285
16286         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
16287         valuetype.
16288
16289 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
16290
16291         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
16292
16293         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
16294         from Bill Middleton <flashdict@gmail.com>.
16295
16296 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
16297
16298         * arrays.cs: Add new regression test. Fix warnings.
16299
16300 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
16301
16302         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
16303         and leakage in CKFINITE.
16304
16305         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
16306         this to a null op since it is called on amd64 too.
16307
16308         * exceptions-amd64.c (get_throw_trampoline): Align stack.
16309
16310         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
16311         body since this is not used on amd64.
16312         
16313         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
16314
16315         * mini-amd64.c: Remove obsolete fixmes.
16316
16317         * mini.c (print_method_from_ip): Fix debugging support.
16318
16319 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
16320
16321         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
16322         so that expressions that don't give much gain are not reduced.
16323         * ssapre.h: Likewise.
16324
16325 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
16326
16327         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
16328
16329         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
16330
16331         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
16332
16333 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
16334
16335         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
16336
16337         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
16338
16339 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
16340
16341         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
16342         stack touching.
16343
16344         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
16345
16346         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
16347
16348         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
16349
16350         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
16351         MONO_ARCH_USE_SIGACTION. Fixes #74252.
16352
16353         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
16354
16355         * mini-x86.c: Fix up stack overflow handling.   
16356
16357         * exceptions.cs: Add new regression test.
16358
16359 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
16360
16361         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
16362         mono_jit_thread_attach.
16363
16364         * mini.c (mono_method_to_ir): Verify called method is not abstract.
16365
16366 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
16367
16368         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
16369         avoid calling constructors using callvirt.
16370
16371         * inssel.brg: Fix #74073.
16372
16373 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
16374
16375         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
16376         compilation with non-GCC compilers.
16377         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
16378         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
16379
16380 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
16381
16382         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
16383         klass->interface_offsets (will likely fix bug#74073).
16384
16385 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
16386
16387         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
16388
16389 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
16390
16391         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
16392         to amd64_div_reg_size ().
16393         
16394         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
16395
16396 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
16397
16398         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
16399
16400 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
16401
16402         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
16403
16404 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
16405
16406         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
16407         
16408         * mini.c (mono_precompile_assembly): Load and precompile referenced
16409         assemblies as well. Fixes #74015.
16410
16411 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
16412
16413         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
16414
16415 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
16416
16417         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
16418         a lot of checks and (anyway) permissions cannot work until corlib is 
16419         loaded.
16420
16421 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
16422
16423         * mini-ppc.c: fixed ABI issue on sysv/ppc.
16424
16425 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
16426
16427         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
16428         calls (fixes bug#72824).
16429
16430 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
16431
16432         * mini.c: fix tail recursion elimination (see test in bug#73936).
16433
16434 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
16435
16436         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
16437         some fp functions in sse2 mode.
16438
16439 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
16440
16441         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
16442
16443 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
16444
16445         * mini.h mini.c: Add mono_get_jit_tls_key ().
16446
16447         * mini-x86.c: Enable fast TLS support on windows.
16448
16449 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
16450
16451         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
16452         * mini.c: Check for p/invoke method when generating code. If a
16453         p/invoke method, or it's class, isn't decorated with [Suppress
16454         UnmanagedCodeSecurity] then generate code to call System.Security.
16455         UnmanagedDemand (only if the security manager is active).
16456
16457 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
16458
16459         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
16460         last change as it seems to cause strange crashes.
16461         
16462 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
16463
16464         * *.c: handle unsafe function pointers where needed.
16465
16466 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
16467
16468         * mini.c (mono_jit_free_method): Remove the fixme too.
16469
16470 2005-03-15  Miguel de Icaza  <miguel@novell.com>
16471
16472         * mini.c: As discussed, make the code actually free the delegate
16473         thunk now, to enable the debugging of delegate problems, use
16474         MONO_DEBUG=1 when running Mono. 
16475
16476         This takes also care of parts of the leaks as seen by Joe.
16477
16478 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
16479
16480         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
16481         thread_tls_offset calculation.
16482
16483 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
16484
16485         * declsec.c: Reworked linkdemand checks for icall. The previous code
16486         was using the declaration code (untrusted) and didn't work as expected
16487         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
16488         specific case.
16489
16490 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
16491
16492         * iltests.il: Add new localloc test.
16493
16494         * mini-amd64.c: Handle large stack allocations the same way as on
16495         windows if stack overflow handling is working.
16496         
16497         * mini-amd64.c: Allocate the signal stack using mmap.
16498
16499         * mini.c (sigsegv_signal_handler): Fix reading of context.
16500
16501         * mini-exceptions.c: Fix up stack overflow handling.
16502
16503         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
16504
16505         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
16506
16507         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
16508
16509         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
16510
16511         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
16512         tramp_init functions as they are no longer needed.
16513
16514 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
16515
16516         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
16517         
16518         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
16519
16520         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
16521         
16522         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
16523         support that now.
16524
16525         * mini-ops.h: Add OP_LMUL_IMM.
16526
16527         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
16528         long mul/div opcodes as intrinsic.
16529
16530         * mini-amd64.c (emit_call): Handle the case when the callee might be
16531         an AOT method.
16532
16533 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
16534
16535         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
16536         extra safe.
16537         
16538         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
16539
16540         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
16541
16542 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
16543
16544         * mini.c (mono_codegen): Don't leak here, to help people running
16545         monogrind.
16546
16547 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
16548
16549         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
16550         conversions in sse2 mode.
16551
16552         * basic-float.cs: Add regression test.
16553         
16554         * mini-amd64.c: Reenable sse2.
16555
16556 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
16557
16558         * mini-amd64.c: Disable sse2 until some regressions are fixed.
16559
16560 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
16561
16562         * driver.c: Copyright text should include 2005.
16563         
16564 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
16565
16566         * cpu-amd64.md (load_membase): Fix more max lengths.
16567
16568 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
16569
16570         * cpu-amd64.md (load_membase): Fix max length.
16571
16572         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
16573
16574         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
16575
16576         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
16577         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
16578
16579         * basic-float.cs: Add rounding regression test.
16580
16581         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
16582
16583 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
16584
16585         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
16586         structures in registers for pinvoke wrappers.
16587
16588 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
16589
16590         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
16591
16592 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
16593
16594         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
16595         wrapper to mono_jit_thread_attach.
16596
16597         * mini.c (mini_jit_thread_attach): New jit icall.
16598
16599         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
16600         native->managed wrappers.
16601
16602         * exceptions.cs: Add new regression test.
16603
16604         * mini.c (optimize_branches): Check regions in the cbranch to throw
16605         block case as well. Fixes #73242.
16606
16607 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
16608
16609         * mini.c: thread safety fixes.
16610
16611 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
16612
16613         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
16614         patching stuff, since delegates use jump trampolines so there is
16615         no caller.
16616
16617         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
16618         jump trampolines.
16619         
16620         * tramp-amd64.c: Fix build.
16621
16622         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
16623         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
16624
16625         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
16626         Rename this to mono_arch....
16627         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
16628
16629         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
16630
16631         * mini-amd64.c (emit_call): If both the caller and the callee is
16632         guaranteed to have 32 bit addresses, emit a normal call.
16633
16634         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
16635
16636         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
16637         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
16638         method_ptr inside delegates.
16639
16640 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
16641
16642         * mini.c (mono_jit_free_method): Free the method info even if the native code is
16643         invalidated. Fixes #73001.
16644
16645         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
16646
16647         * mini-x86.c: Only use stdcall for pinvokes on windows.
16648
16649 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
16650
16651         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
16652         * mini-x86.c: remove unreliable __thread var offset detection,
16653         use the correct accessors and enable by default.
16654
16655 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
16656
16657         * mini.c (mono_jit_free_method): Fix memory leak.
16658
16659 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
16660
16661         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
16662
16663 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
16664
16665         * cpu-amd64.md: Fix lengths of atomic opcodes.
16666
16667 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
16668
16669         * driver.c: try to not imply using ICU is any good.
16670
16671 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
16672
16673         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
16674         functions as inline ops.
16675
16676         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
16677         some Interlocked functions as inline ops.
16678
16679         * mini.c (move_basic_block_to_end): Fix bug in last patch.
16680
16681         * mini.h (MonoBasicBlock): Reorganize fields a bit.
16682
16683         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
16684
16685         * mini.c: Add support for OP_NOT_TAKEN.
16686
16687         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
16688         structures in registers for pinvoke wrappers.
16689
16690         * mini-amd64.c: Fix warnings.
16691
16692 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
16693
16694         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
16695
16696         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
16697
16698         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
16699         address instead of loading the address from it.
16700
16701         * mini-x86.c: Add support for returning small structs in registers
16702         on Win32. Fixes part of #70864.
16703         
16704 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
16705
16706         * trace.c (get_token): Improve error checking.
16707
16708 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
16709
16710         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
16711
16712 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
16713  
16714         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
16715         it can be reused for MonoClass.
16716         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
16717         _LINKDEMAND.
16718
16719 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
16720
16721         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
16722         instead of a MonoReflectionMethod. The method information wasn't used
16723         when displaying SecurityException details (but will be now).
16724
16725 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
16726
16727         * Makefile.am : windows build fix.
16728
16729 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
16730
16731         * iltests.il: Add new regression test.
16732
16733         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
16734         #72522.
16735
16736 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
16737  
16738         * mini.c: Moved linkdemand check into helper function check_linkdemand
16739         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
16740         LDFTN, LDVIRTFTN).
16741
16742 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
16743
16744         * declsec.c: Added statistics counter for different kinds of 
16745         LinkDemands.
16746         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
16747         (and commented) declaration.
16748         * mini.c: Added statistics counter for security Demand code 
16749         generation. Added display of security statistics.
16750
16751 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
16752
16753         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
16754         Fix compilation errors under gcc-2.95.
16755
16756 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
16757
16758         * mini.c, driver.c: Use the new jit trampoline hashtable
16759
16760 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
16761
16762         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
16763
16764 2005-02-11  Martin Baulig  <martin@ximian.com>
16765
16766         * debug-mini.c (mono_debug_close_method): Free the line number array.
16767
16768 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
16769
16770         * aot.c: Break up large methods into smaller ones. Share GOT slots for
16771         icalls.
16772
16773         * mini.h: Bump AOT file format version. 
16774
16775 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
16776
16777         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
16778         APTC and P/Invoke.
16779         * declsec.h: Added macros to get/set lazyly initialized security 
16780         informations about assemblies. Added new enum for different type of
16781         possible LinkDemand violation. Added function to check LinkDemands.
16782         * mini.h: Added a field to MonoCompile to hold any security violation
16783         detected when JITting a method (so it can be thrown later).
16784         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
16785         and CEE_CALLVIRT. Added code to throw exception at the end of
16786         mini_method_compile (note: the exception is unhandled right now).
16787
16788 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
16789
16790         * mini.c, jit-icalls.c: use the managed implementation of
16791         memset for initobj and memset, to avoid managed <-> unmanaged
16792         transitions.
16793
16794 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
16795
16796         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
16797         optimization if it would need a GOT var.
16798
16799         * basic.cs: Add tests for constant propagation and switch statements.
16800
16801         * ssa.c: Fix out-of-range constant propagation and switch statements.
16802
16803 2005-02-09    <vargaz@freemail.hu>
16804
16805         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
16806
16807 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
16808
16809         * cpu-amd64.md (load_membase): Fix max length of load_membase.
16810
16811 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
16812
16813         * mini.c: update to new signature of mono_class_get_allocation_ftn().
16814
16815 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
16816
16817         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
16818         arithmetic operations.
16819
16820 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
16821
16822         * mini-ppc.c: add a workaround for broken user code that
16823         DllImports vararg functions with non-vararg signatures.
16824
16825 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
16826
16827         * mini.c (mono_jit_compile_method_inner): Add detection and a 
16828         meaningfull error message for assemblies written in Managed C++.
16829
16830         * tramp-amd64.c mini-amd64.h: Add support for 
16831         create_trampoline_from_token ().
16832
16833         * aot.c mini-x86.c abcremoval.c: Applied patch from
16834         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
16835
16836 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
16837
16838         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
16839         which takes a MonoImage/token as parameter instead of a MonoMethod.
16840
16841         * aot.c: Use the new trampoline for initializing vtables.
16842
16843         * aot.c: Add support for ldfld/stfld_remote wrappers.
16844
16845         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
16846         rules for compare <MEM>, IMM.
16847
16848         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
16849
16850         * aot.c: Handle inherited finalizers correctly.
16851
16852 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
16853
16854         * inssel.brg (stmt): Add a missing _setup_... ().
16855
16856         * aot.c: Save some parts of the class state to the AOT file and use it
16857         to recompute that state when a class is initialized.
16858
16859         * mini.c: Install AOT hooks into the runtime.
16860
16861         * mini.h: Bump AOT file format version.
16862         
16863         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
16864         Fixes #72148.
16865
16866         * iltests.il: Add new test.
16867
16868 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
16869
16870         * mini.c: fix typo.
16871
16872 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
16873
16874         * mini.c: setup the statistical profiler in the thread attach
16875         callback to cope with the new single thread code.
16876
16877 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
16878
16879         * mini-ppc.c: ensure we have enough room for the profiler
16880         calls (fixed bug#72084).
16881
16882 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
16883
16884         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
16885         it.
16886
16887 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
16888
16889         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
16890
16891 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
16892
16893         * ssapre.c: Fixed an issue with down safety (this allows IronPython
16894         to succesfully execute parrotbench).
16895         * ssapre.h: Likewise.
16896
16897 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
16898
16899         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
16900         variable for stores to method arguments (fixes a SSAPRE issue).
16901
16902 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
16903
16904         * mini.c: handle value types in dup, fixes gen-112.cs.
16905
16906 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
16907
16908         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
16909         sequence for calls in dynamic methods to avoid thunks.
16910
16911 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
16912
16913         * mini.c: correctly remove dynamic methods from the hashtable.
16914
16915 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
16916
16917         * driver.c: Disabled SSAPRE until fix the bug that appears
16918         in IronPython's parrotbench.
16919
16920 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
16921
16922         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
16923
16924         * mini.c (mono_method_to_ir): Revert the previous change.
16925         
16926         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
16927         when AOT compiling.
16928
16929         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
16930         mono_jit_info_table_find () etc. when running under valgrind.
16931
16932         * inssel.brg: Fix warnings.
16933
16934         * mini-exceptions.c: Fix warnings.
16935
16936 2005-01-31  Martin Baulig  <martin@ximian.com>
16937
16938         * driver.c (compile_all_methods_thread_main): Don't try to compile
16939         generic methods or anything which has type parameters.
16940
16941 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
16942
16943         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
16944
16945         * TestDriver.cs: Add --verbose flags.
16946
16947         * graph.c ssa.c: Fix 64 bit warnings.
16948         
16949         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
16950         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
16951         Fix 64 bit warnings.
16952
16953         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
16954         variable not spotted by gcc.
16955         
16956         * mini-amd64.c inssel-amd64.brg: Applied patch from  
16957         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
16958         X86_COMPARE_MEMBASE opcodes.
16959
16960         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
16961
16962 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
16963
16964         * *: MonoMethod->signature might be NULL now. You *MUST* use
16965         mono_method_signature.
16966
16967 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
16968
16969         * driver.c (compile_all_methods_thread_main): Compile the methods
16970         without invoking cctors.
16971
16972 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
16973
16974         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
16975         * basic-calls.cs: test for the above.
16976
16977 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
16978
16979         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
16980         MonoJitInfo changes.
16981
16982 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
16983
16984         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
16985         eagerly if it contains dynamic methods.
16986         
16987         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
16988
16989         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
16990         trace, it is now computed by an icall from trace_ips.
16991         
16992         * mini-exceptions.c: Fix a warning.
16993
16994 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
16995
16996         * mini-exceptions.c: don't bother getting stack trace info if
16997         it's not going to be used.
16998
16999 2005-01-27  Raja R Harinath  <rharinath@novell.com>
17000
17001         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
17002         ssapre-mini-ops.h.
17003
17004 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
17005
17006         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
17007
17008         * aot.c: Avoid calling mono_method_get_header () if not needed.
17009
17010         * mini.h: Bump AOT file format version.
17011         
17012         * mini.c (mono_emit_native_call): Allocate a GOT var here.
17013
17014         * mini.c (mono_print_tree): Print more info for calls.
17015
17016 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
17017
17018         * declsec.h: Remove warning by adding missing include for marshal.h
17019
17020 2005-01-26  Martin Baulig  <martin@ximian.com>
17021
17022         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
17023         `ip' twice.
17024
17025 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
17026
17027         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
17028         flags.
17029
17030         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
17031
17032         * aot.c (mono_compile_assembly): Fix a warning.
17033
17034 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
17035
17036         * declsec.c: Look for security attributes on the original MonoMethod 
17037         (and not the wrapped one). This fix permissions on icalls.
17038
17039 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
17040
17041         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
17042
17043         * mini.c (mono_allocate_stack_slots): Add a fixme.
17044
17045         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
17046
17047 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
17048
17049         * inssel.brg: optimize casts of sealed types (more
17050         optimizations waiting for fixes in remoting).
17051
17052 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
17053
17054         * inssel.brg (stmt): Add another dummy rule.
17055
17056         * driver.c: Fix warnings.
17057
17058         * driver.c (mono_main): If running under valgrind, instruct glib to use
17059         the system allocation functions so valgrind can track the memory
17060         allocated by the g_... functions.
17061
17062         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
17063
17064         * mini-ops.h: Add OP_DUMMY_STORE opcode.
17065
17066         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
17067
17068         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
17069         variables in try regions.
17070
17071         * mini.c (mini_method_compile): Don't disable optimizations on large
17072         methods when AOT compiling.
17073
17074         * mini.c (mono_allocate_stack_slots): New arch independent method to 
17075         allocate stack slots. Not yet used.
17076
17077 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
17078
17079         * debug-mini.c (mono_debug_close_method): Plug some leaks.
17080
17081 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
17082
17083         * mini-ppc.c: make the branch info relative as the code
17084         buffer can be reallocated.
17085
17086 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
17087
17088         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
17089         * driver.c: Removed the AOT/security restriction. Now initialize the
17090         security manager (in metadata) if --security is used.
17091         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
17092         rather than the pointer to declarative security, when AOT is used.
17093
17094 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
17095
17096         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
17097         basic blocks, reduced intrinsic exception throwing code size.
17098
17099 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
17100
17101         * driver.c (mini_usage): Reorder the usage screen.
17102
17103 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
17104
17105         * mini.c (mono_resolve_patch_target): Fix warning.
17106
17107 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
17108
17109         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
17110         previous patch.
17111
17112         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
17113
17114         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
17115         breaks the amd64 build.
17116
17117         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
17118         register allocation. Fixes #71454.
17119
17120         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
17121
17122         * arrays.cs: Add new regression test.   
17123
17124 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
17125
17126         * ssapre.c: Turned usage of snprintf to GString.
17127         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
17128         (I left it on by mistake in my previous commit).
17129
17130 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
17131
17132         * mini.c, cfold.c, basic-calls.cs: preserve side effects
17133         on cond branch optimization (fixes bug# 71515).
17134
17135 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
17136
17137         * abcremoval.c: Fixed bug 71062.
17138         * abcremoval.h: Likewise.
17139
17140 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
17141
17142         * mini.c: Added a new functionality to optimize_branches, the removal
17143         of useless basic blocks, and fixed some problem in the removal of
17144         critical edges; some utility functions added for both purposes.
17145         * ssapre.c: Added complex expression support, and fixed bug 70637.
17146         * ssapre.h: Likewise.
17147         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
17148         enabled in SSAPRE.
17149         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
17150         * driver.c: Re-enabled SSAPRE.
17151
17152 2005-01-19  Martin Baulig  <martin@ximian.com>
17153
17154         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
17155         the result of mono_get_method_constrained().
17156
17157 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
17158
17159         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
17160         manager.
17161
17162 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
17163
17164         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
17165         be detected.  Fixes #59296.
17166
17167 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
17168
17169         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
17170         which can happen. Fixes #71361.
17171
17172 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
17173
17174         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
17175         manager.
17176
17177 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
17178
17179         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
17180         appdomain-unload.exe to fail.
17181         
17182         * mini.c: Fix some memory leaks.
17183
17184 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
17185
17186         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
17187         Fixed bug and sped up some codepaths.
17188
17189 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
17190
17191         * mini.c: Fix some memory leaks.
17192
17193         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
17194         conversion.
17195
17196         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
17197
17198         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
17199         #71320.
17200
17201         * iltests.il: Add regression test for #71320.
17202
17203 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
17204
17205         * mini.c (mono_codegen): Fix installation of profiler hooks.
17206
17207         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
17208
17209 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
17210
17211         * mini.h, mini.c, cfold.c: optimize access to enum
17212         readonly fields, too. Eval conditional branches if possible
17213         to perform unreachable code removal in more cases.
17214
17215 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
17216
17217         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
17218
17219         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
17220         code manager.
17221
17222         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
17223         WinXP DEP. Fixes #71244.
17224
17225 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
17226
17227         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
17228
17229 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
17230
17231         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
17232
17233 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
17234
17235         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
17236         changes.
17237
17238         * mini.h: Bump AOT version.
17239
17240         * mini.h (MonoCompile): Change exvar to a hash table.
17241
17242         * mini.c: Allocate a separate exvar for each handler block.
17243
17244         * mini.c: Get rid of the computation of filter_lengths, its not needed.
17245
17246         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
17247         ex var with the pending exception and only throw if the two are equal.
17248         Fixes #68552.
17249         
17250         * exceptions.cs: Add tests for rethrow and nested catch clauses.
17251
17252         * mini-x86.c: Fix warnings.
17253
17254         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
17255         used by all the ports now.
17256
17257         * aot.c: Add write-symbols and save-temps options.
17258
17259 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
17260
17261         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
17262
17263 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
17264
17265         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
17266         operations.
17267
17268         * tramp-s390.c: Check vtable slot belongs to the domain.
17269
17270         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
17271         as per other platforms.
17272
17273         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
17274
17275 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
17276
17277         * driver.c: we don't run the Main() code in a subthread anymore.
17278
17279 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
17280
17281         * mini.c: added experimental rtc support in the statistical
17282         profiler: if the user has the permission, more accurate statistics
17283         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
17284         The MONO_RTC value must be restricted to what the linux rtc allows:
17285         power of two from 64 to 8192 Hz.
17286
17287 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
17288
17289         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
17290
17291 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
17292
17293         * mini-ppc.c: better icache flush for smp.
17294
17295 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
17296
17297         * mini-amd64.c (emit_move_return_value): Fix memory leak.
17298
17299         * mini-x86.c (get_call_info): Add the get_call_info () code from the
17300         amd64 port, not yet used.
17301
17302 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
17303
17304         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
17305         a struct type.
17306
17307 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
17308
17309         * driver.c: Added --security option to activate the security manager.
17310         Right now this will allow code generation for declarative demands and
17311         is disabled when AOT is specified.
17312         * mini.c: Add code generation for declarative security demands.
17313         * mini.h: Add mono_use_security_manager as an extern gboolean.
17314
17315 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
17316
17317         * aot.c (mono_compile_assembly): Speed up compilation a bit by
17318         emitting more dense assembly code.
17319
17320         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
17321         exception throwing stuff.
17322
17323 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
17324
17325         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
17326         dead code.
17327
17328         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
17329         left in by mistake.
17330
17331         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
17332         fixed.
17333
17334         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
17335
17336         * tramp-*.c: Only patch vtable slots if the object is in the current
17337         domain. Fixes appdomain-unload.exe.
17338
17339         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
17340         
17341         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
17342         x86 branch.
17343
17344 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
17345
17346         * mini.c (reverse_branch_op): New helper function.
17347
17348         * mini.c (optimize_branches): Run the new optimization only on 
17349         platforms which support it. Also reverse all kinds of branches.
17350
17351         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
17352
17353         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
17354         a throw statement.
17355
17356         * mini.c (optimize_branches): Reverse not-equals branches if the false
17357         bblock is a throw. This happens a lot of time with argument checking in
17358         corlib.
17359
17360         * mini.c (mono_codegen): Add support for placing basic blocks after
17361         the function epilogue.
17362
17363         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
17364         function epilogue.
17365         
17366 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
17367
17368         * mini.c (setup_stat_profiler): Only set this up if the platform
17369         supports ITIMER_PROF.
17370
17371 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
17372
17373         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
17374         previous patch.
17375
17376         * inssel.brg: Fix a warning.
17377
17378 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
17379
17380         * mini.c: added support for statistical profiler 
17381         (run with: --profile=default:stat).
17382
17383 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
17384
17385         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
17386
17387         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
17388
17389         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
17390         related to global registers from the amd64 port.
17391
17392 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
17393
17394         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
17395
17396         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
17397         with global registers.
17398         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
17399
17400         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
17401
17402 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
17403
17404         * debug-mini.c (encode_value): Fix off-by-one.
17405
17406         * aot.c (encode_value): Likewise.
17407
17408         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
17409
17410 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
17411
17412         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
17413         AOT.
17414
17415         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
17416         
17417         * aot.c (emit_method_info): Increase size of temp buffer.
17418
17419         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
17420         the AOT case.
17421
17422 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
17423
17424         * aot.c (emit_method_info): Fix build.
17425         
17426         * aot.c: Further rework of the AOT file format to reduce the size of
17427         the method info data.
17428
17429         * mini.h: Bump AOT file format version.
17430
17431 2004-12-27  Martin Baulig  <martin@ximian.com>
17432
17433         * mini.c (mini_get_method): New static method; call
17434         mono_get_method_full() and mono_get_inflated_method().
17435         (mono_method_to_ir): Use mini_get_method() instead of
17436         mono_get_method_full(). 
17437
17438 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
17439
17440         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
17441
17442 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
17443
17444         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
17445
17446         * inssel-amd64.brg: Add some optimization rules.
17447
17448 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
17449
17450         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
17451         standard not GC'd stuff is fine.
17452
17453 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
17454
17455         * aot.c: Rework the AOT file format to get rid of most of the global
17456         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
17457
17458         * mini.h: Bump AOT file format version.
17459         
17460 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
17461
17462         * mini.h: Bump AOT file format version.
17463
17464         * aot.c (mono_aot_is_got_entry): New function to determine if an 
17465         address is inside a GOT.
17466
17467         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
17468
17469         * cpu-pentium.md: Increase the maximum size of some instructions which
17470         might involve a got access.
17471         
17472         * mini.c (get_method_from_ip): Another debug helper function.
17473
17474         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
17475         when got var accesses are created during the decompose phase.
17476
17477         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
17478
17479         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
17480         argument mini_compile_method and to MonoCompile, and use this to
17481         determine whenever a given method is compiled for AOT. This allows the
17482         other methods compiled during AOT compilation to be free of AOT stuff,
17483         so the backends does not need to add special support for them by
17484         creating a fake GOT etc.
17485
17486         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
17487         longer needed.
17488
17489 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
17490
17491         * mini.c (mono_method_to_ir): It turns out that some of the
17492         x-appdomain wrappers are lax with types, so just ignore this for
17493         all wrappers.
17494
17495         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
17496         at the vtable->klass. If it is non-shared code we can just use the
17497         vtable.
17498
17499 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
17500
17501         * mini-ppc.c: access MonoDomain from tls, too.
17502
17503 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
17504
17505         * declsec.c: Removed unused variable (and related warning ;-)
17506
17507 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
17508
17509         * iltests.il: New test for LDELEMA on an array of ref types.
17510
17511         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
17512         all ldelema's on reftypes.
17513         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
17514         it was the wrong place to put it.
17515
17516         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
17517         register to pop to make this cleaner, at the request of Paolo.
17518
17519 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
17520
17521         * mini-ops.h (OP_GETHASHCODE): New op.
17522
17523         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
17524
17525         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
17526         operation.
17527
17528         For a microbenchmark, this reduces the cost of Hashtable.get_Item
17529         by 25%.
17530         
17531         * mini-x86.c (mono_arch_output_basic_block): Rather than
17532
17533         add ebp, 4
17534
17535         Emit
17536
17537         pop edx
17538
17539         The first is 3 bytes while the second is 1. This saves 36 kb on
17540         mscorlib, quite a big saving. When bootstraping mcs, I was able to
17541         see a small boost because of icache locality.
17542
17543         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
17544
17545 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
17546
17547         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
17548         started code sharing with the generic code.
17549
17550 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
17551
17552         * mini-ppc.c, cpu-g4.md: added code for direct access to
17553         tls data slots.
17554
17555 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
17556
17557         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
17558          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
17559         to OP_TLS_GET.
17560
17561 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
17562
17563         * declsec.c|h: Added functions to cache the declarative stack modifiers
17564         in MonoJitInfo and to create a security frame from a MonoJitInfo 
17565         structure.
17566         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
17567         created. Register internal calls for System.Security.SecurityFrame::
17568         _GetSecurityFrame and _GetSecurityStack.
17569         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
17570         the definitions for the new stack walk/callback mechanism.
17571         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
17572         first security frame for LinkDemands and InheritanceDemands) and
17573         GetSecurityStack for Demands. Both use the new mono_walk_stack code
17574         from lupus.
17575         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
17576         walk initialization (lupus).
17577
17578 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
17579
17580         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
17581         idiom.
17582         (handle_loaded_temps): Do not create a temporary variable for
17583         things that we know are temps. They will never be modified.
17584         (mono_spill_call): Set MONO_INST_IS_TEMP
17585         (mono_emulate_opcode): ditto
17586         (emit_tree): ditto
17587         (mono_method_to_ir.CEE_DUP): ditto
17588
17589 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
17590
17591         * mini.c (type_to_eval_stack_type): Make this handle the void type
17592         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
17593         (emit_tree): use ip_in_bb to special case some common idioms
17594         Update all callers to pass in the IP.
17595         (mono_method_to_ir): Make CEE_CALL* do the above as well.
17596
17597         This gives us a nice 2% speedup in mcs bootstrap.
17598
17599         * mini-x86.c (peephole_pass): Peephole pass to make
17600         mov  [foo], eax
17601         push [foo]
17602
17603         into
17604
17605         mov [foo], eax
17606         push eax
17607
17608         * mini.c (ip_in_bb): new method.
17609         (mono_method_to_ir): use this method rather than doing the hash
17610         lookup ourselves.
17611
17612         * linear-scan.c (mono_linear_scan): When expiring actives, you
17613         don't need to keep around variables that expire on this
17614         instruction. This makes it so that:
17615              a = b + 1
17616         will turn into:
17617              store (ebx add (ebx, 1))
17618         which will become
17619              add ebx, 1
17620
17621 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
17622
17623         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
17624         combination to avoid doing two copies. Fix up problems with previous
17625         patch.
17626
17627         * mini.c: Fix 64 bit warnings.
17628
17629         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
17630
17631 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
17632
17633         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
17634         changes from the x86 code.
17635
17636         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
17637
17638 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
17639
17640         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
17641         throwing code to reduce its size, unify the AOT and non-aot code and 
17642         get rid of relocations in the AOT case.
17643
17644         * mini-x86.h mini.c exceptions-x86.c 
17645         (mono_arch_get_throw_corlib_exception): New arch specific function to 
17646         raise corlib exceptions which doesn't require relocations in the 
17647         caller.
17648
17649         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
17650
17651 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
17652
17653         * mini.c (mono_emit_method_call): Only allocate the got var when it is
17654         needed.
17655
17656         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
17657         in the AOT case.
17658
17659 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
17660
17661         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
17662         with add function when used from Inc/dec atomic 
17663         functions. Re-enabled optimization on x86.
17664         * mini-ops.h: renamed atomic_add functions to
17665         allow _add to match the Interlocked::Add and
17666         _add_next to match Interlocked::Inc/Dec.
17667
17668 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
17669
17670         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
17671         linking of BBs to the end BB, and enabled SSAPRE also with
17672         consprop and copyprop (which was prevented by that bug).
17673
17674 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
17675
17676         * mini-x86.c: disabling the Interlocked optimizing code. 
17677
17678 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
17679
17680         * aot.c (load_aot_module): Move reading of got_addr after the AOT
17681         file version check.
17682         
17683 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
17684
17685         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
17686         interlocked optimization due lack of support on x86, rewrote 
17687         exchange to take into account that base may be in eax.
17688         
17689         xsp works again; activated Interlocked optimizing code.
17690         
17691 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
17692
17693         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
17694
17695 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
17696
17697         * mini-ops.h: Add new opcodes.
17698
17699         * mini.h: Add new patch types. Add got_var to MonoCompile.
17700
17701         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
17702         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
17703         make it work with all kinds of patchable code.
17704
17705         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
17706         address of the GOT, and referencing entries in the GOT.
17707
17708         * mini.c: Add code to load the GOT address if needed by an opcode.
17709
17710         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
17711         independent AOT code on the x86 using an elf-style Global Offset Table.
17712
17713 2004-12-14  Raja R Harinath  <rharinath@novell.com>
17714
17715         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
17716
17717 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17718
17719         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
17720         when running xsp.
17721
17722 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
17723
17724         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
17725         of Interlocked:Increment/Decrement/Add as inline ops.
17726         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
17727
17728 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
17729
17730         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
17731         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
17732
17733 2004-12-12  Duncan Mak  <duncan@ximian.com>
17734
17735         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
17736         again. `patch_info->table_size' is no longer valid after Zoltan's
17737         commit #37636.
17738
17739 2004-12-12  Martin Baulig  <martin@ximian.com>
17740
17741         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
17742         if we are the "real" method, ie. not an inlined method inside it.
17743
17744 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
17745
17746         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
17747         before we look in the special fields table. This fixes
17748         ../tests/thread-static-init.cs.
17749
17750 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17751
17752         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
17753         for Array get_Rank and get_Length. Fixes bug #70465.
17754
17755 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
17756
17757         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
17758         separate structure to reduce the size of MonoJumpInfo.
17759
17760 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
17761
17762         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
17763
17764 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
17765
17766         * mini.c (mini_get_inst_for_method): Changed to allow ports
17767         to return a MonoInst instead of opcode 
17768         (renamed mini_get_opcode_for_method to better reflect the new functionality)
17769         
17770         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
17771         Allow ports to return a created MonoInst instead of op-code, will enable
17772         new optimizations.
17773         (renamed mini_get_opcode_for_method to better reflected the functionality)
17774
17775 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
17776
17777         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
17778
17779 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
17780
17781         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
17782         Fixes #69985.
17783
17784 2004-12-08  Martin Baulig  <martin@ximian.com>
17785
17786         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
17787         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
17788
17789 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
17790
17791         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
17792         correctly.
17793
17794         * exceptions.cs: Disable some tests which depend on properties of x86 fp
17795         arithmetic.
17796
17797 2004-12-08  Raja R Harinath  <rharinath@novell.com>
17798
17799         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
17800
17801 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
17802
17803         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
17804         bug introduced by the previous patch.
17805
17806 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
17807
17808         * mini-ppc.c, objectc.cs: handle large structs passed by value
17809         (fixes bug #69972).
17810
17811 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
17812
17813         * mini-ppc.c: OP_ARGLIST implementation from
17814         Geoff Norton  <gnorton@customerdna.com>.
17815
17816 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
17817
17818         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
17819         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
17820
17821 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
17822
17823         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
17824
17825 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
17826
17827         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
17828         support.
17829
17830 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
17831
17832         * mini-sparc.c: Zero out localled-ed memory.
17833
17834         * iltests.il: Add tests for zeroing out localloc-ed memory.
17835
17836 2004-12-04  Martin Baulig  <martin@ximian.com>
17837
17838         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
17839         mono_method_get_signature_full().       
17840
17841 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
17842
17843         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
17844         and some utility functions (always for SSAPRE), integrated SSAPRE.
17845         * mini.h: Likewise.
17846         * driver.c: Added ssapre option.
17847         * ssa.c: Small fix on OP_ARG handling.
17848         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
17849         * Makefile.am: Likewise.
17850
17851 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
17852
17853         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
17854         now in the xp code.
17855
17856         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
17857         icall.
17858
17859 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
17860
17861         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
17862         
17863         * cpu-s390.md : Increase instruction length of oparglist.
17864
17865         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
17866
17867 2004-11-30  Martin Baulig  <martin@ximian.com>
17868
17869         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
17870         virtual generic methods.  We call a special helper_compile_generic_method()
17871         icall to retrieve the method from the vtable, inflate and compile
17872         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
17873
17874         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
17875
17876 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
17877
17878         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
17879
17880 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
17881
17882         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
17883         Fixes #69929.
17884
17885 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
17886
17887         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
17888         platforms with PIC aot.
17889
17890 2004-11-28  Martin Baulig  <martin@ximian.com>
17891
17892         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
17893         Fixes gen-112.cs.
17894
17895 2004-11-28  Martin Baulig  <martin@ximian.com>
17896
17897         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
17898         the result of mono_type_get_underlying_type() to check whether
17899         we're byref.
17900
17901 2004-11-26  Martin Baulig  <martin@ximian.com>
17902
17903         * mini.c
17904         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
17905         in the g_assert().
17906
17907 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
17908
17909         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
17910         the same way as the other arguments so they won't get clobbered.
17911
17912         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
17913         calls through R11 since it is clobbered by the trampoline code.
17914
17915 2004-11-26  Raja R Harinath  <rharinath@novell.com>
17916
17917         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
17918         pick up in-tree mscorlib.dll.
17919
17920 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
17921
17922         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
17923
17924         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
17925         runtime data/code are now stored in a table similar to the GOT in ELF. 
17926         This allows the code itself to be position independent.
17927
17928         * aot.c: Fix loading of referenced assemblies after the lazy assembly
17929         loading changes.
17930
17931         * aot.c: Attach ELF type (object/function) directives to all global
17932         symbols.
17933
17934         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
17935
17936         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
17937
17938         * mini-amd64.h: Turn on PIC AOT code.
17939
17940         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
17941         returning the offset within an OP_AOTCONST instruction where the GOT
17942         offset needs to be added.
17943
17944         * mini.h: Bump AOT file format version.
17945
17946 2004-11-25  Martin Baulig  <martin@ximian.com>
17947
17948         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
17949         uninflated generic methods.
17950
17951 2004-11-25  Martin Baulig  <martin@ximian.com>
17952
17953         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
17954
17955 2004-11-24  Martin Baulig  <martin@ximian.com>
17956
17957         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
17958         original klass (this only applies for generic instances).
17959
17960 2004-11-24  Martin Baulig  <martin@ximian.com>
17961
17962         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
17963         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
17964         that array).
17965
17966 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
17967
17968         * mini.c (mono_method_to_ir): Disable inlining for methods containing
17969         localloc. Fixes #69678.
17970
17971         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
17972         
17973 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
17974
17975         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
17976         used SSE registers on pinvoke calls. Fixes #69774.
17977
17978 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
17979
17980         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
17981         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
17982
17983 2004-11-23  Raja R Harinath  <rharinath@novell.com>
17984
17985         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
17986         Refer directly to the mcs/ tree.
17987
17988 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
17989
17990         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
17991         Check if a trampoline for a synchronized method is required. 
17992
17993 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
17994
17995         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
17996         with localloc if needed. Throe arithmetric exception in
17997         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
17998         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
17999
18000 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
18001
18002         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
18003         types before switching on type.  Fixes #69622.
18004
18005 2004-11-19  Raja R Harinath  <rharinath@novell.com>
18006
18007         * Makefile.am (check-local): New.  Integrate into 'make check'.
18008         (MCS,RUNTIME): Define using in-tree mono and mcs.
18009         (ILASM): New.
18010         (%.exe): Use $(ILASM).
18011
18012 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
18013
18014         * mini-ppc.c: adjust initial prolog size (bug #69691).
18015
18016 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
18017
18018         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
18019         #69664.
18020
18021 2004-11-17  Raja R Harinath  <rharinath@novell.com>
18022
18023         * Makefile.am (clean-local): Rename from 'clean'.
18024
18025 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18026
18027         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
18028         to mono_arch_is_int_overflow. 
18029         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
18030         SIGFPE events.
18031
18032 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
18033
18034         * declsec.c|h: New files to support declarative security attributes.
18035         Added function to check if a method has (applicable) security.
18036         * mini.c|h: Add check for declarative security attributes in
18037         mono_method_check_inlining.
18038         * Makefile.am: Added declsec.c and declsec.h to the build.
18039
18040 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
18041
18042         * mini.c, mini.h: update to keep dynamic code info per-domain.
18043
18044 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
18045
18046         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
18047         (mini_init): Get rid of it from here too.
18048
18049 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
18050
18051         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
18052         implemented OP_RETHROW (patch by Geoff Norton
18053         <gnorton@customerdna.com>).
18054
18055 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
18056
18057         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
18058         between appdomains.  Fixes appdomain-unload on PPC.
18059
18060 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
18061
18062         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
18063         mini-exceptions.c: handle the new wrapper types.
18064         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
18065         token value as a MonoClass* when compiling a wrapper.
18066         mono_jit_create_remoting_trampoline now takes an additional
18067         MonoRemotingTarget parameter.
18068         
18069 2004-11-10  Martin Baulig  <martin@localhost>
18070
18071         * mini.c (mono_method_to_ir): Use `generic_container->context'
18072         rather than creating a new one.
18073
18074 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18075
18076         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
18077
18078         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
18079
18080 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
18081
18082         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
18083         the experimental aot cache stuff.
18084
18085 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
18086
18087         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
18088         mini-exceptions.c: update to exception clause structure changes.
18089
18090 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
18091
18092         * exceptions-x86.c (throw_exception): Fix warnings.
18093
18094         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
18095         for OP_RETHROW.
18096
18097 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
18098
18099         * exceptions-sparc.c (get_throw_exception): Really fix this.
18100
18101 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
18102
18103         * tramp-*.c: we no longer support icalls without wrappers, so
18104         a bit of code can be removed here
18105
18106 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
18107
18108         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
18109         patch.
18110
18111         * cpu-sparc.md: Add op_rethrow.
18112
18113         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
18114
18115         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
18116
18117         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
18118         * mini-ops.h: Add OP_RETHROW.
18119
18120         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
18121
18122         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
18123
18124 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
18125         
18126         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
18127         Makes the output much easier to read
18128
18129 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
18130
18131         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
18132         prevents another huge leak when compiling with ssa. Secondly, the
18133         performance of doing this rather than freeing the lists is much
18134         better. GList does a lock every time you allocate a list link,
18135         so that it can use a memory pool. So, it is better to just use
18136         a memory pool of our own.
18137         
18138         * ssa.c, linear-scan.c: replace g_list_remove_link with
18139         g_list_delete.  The remove one does not free the GList, so we were
18140         leaking memory. On -O=all --compile-all with corlib, this cut down
18141         3 MB of allocations.
18142
18143 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
18144
18145         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
18146
18147         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
18148
18149         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
18150         into a new function mono_create_jit_trampoline ().
18151
18152 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
18153
18154         * trace.c (get_spec): Allow tracing of classes without a namespace.
18155
18156 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
18157
18158         * mini.c: Fix pointer overwrite in mini_method_compile.
18159
18160 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
18161
18162         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
18163         The darwin ABI needs some special handling for 1 and 2 byte structs
18164         Lets use lbz/lhz instead of lwz everywhere.
18165         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
18166         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
18167         Use stb/sth for the former, and put the latter always on stack instead of in
18168         argument registers.
18169
18170 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
18171
18172         * trace.c (is_filenamechar): Add '_'.
18173
18174 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
18175
18176         * mini-s390.c: Fix prolog length to allow for large trace requirements.
18177
18178         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
18179
18180 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
18181
18182         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
18183         depends on libmonogc. Fixes #68805.
18184
18185 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
18186
18187         * mini.c (mono_jit_free_method): Provide extra information for
18188         this error.  Currently this leaks, but will be turned into a
18189         developer option in the future.
18190
18191 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
18192
18193         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
18194
18195 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
18196
18197         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
18198         boundary. Fixes reading of PATCH_INFO_R4 and R8.
18199         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
18200
18201 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
18202
18203         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
18204         trampolines for AOT code.
18205
18206 2004-10-22    <vargaz@freemail.hu>
18207
18208         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
18209         constructed types. Fixes #68136.
18210
18211 2004-10-21  Martin Baulig  <martin@ximian.com>
18212
18213         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
18214         if it returns true, unwind the stack to the call instruction.
18215
18216 2004-10-21    <vargaz@freemail.hu>
18217
18218         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
18219
18220         * mini.h: Bump AOT version number.
18221
18222         * objects.cs: Add another test for unbox trampolines.
18223
18224         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
18225         valuetype methods.
18226
18227 2004-10-20    <vargaz@freemail.hu>
18228
18229         * driver.c: Add SHARED to the set of optimizations tested.
18230
18231         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
18232
18233         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
18234         used by CEE_NEWARR.
18235
18236         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
18237
18238 2004-10-20  Martin Baulig  <martin@ximian.com>
18239
18240         * mini-exceptions.c (mono_handle_exception): Call
18241         mono_debugger_handle_exception() to tell the debugger about
18242         catch/finally clauses.
18243
18244 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
18245
18246         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
18247
18248         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
18249         #68447.
18250
18251 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
18252
18253         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
18254         methods as their native size, fixed bug #57543, #57545.
18255         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
18256         This saves a temporary register and mullw call down into 1 (minor perf
18257         increase for cases like sum = sum * 5;  This use to translate into:
18258             li r11,5
18259             mullw r28,r28,r11
18260         It now translates to
18261             mulli r28,r28,5
18262
18263 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
18264
18265         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
18266         #68388.
18267
18268 2004-10-11  Martin Baulig  <martin@ximian.com>
18269
18270         * mini.c (mono_method_to_ir): If we're a generic method, get the
18271         MonoGenericContainer from our MonoMethodNormal and create a
18272         MonoGenericContext from it.
18273
18274 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
18275
18276         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
18277
18278         * basic-long.cs: Add test for checked i8->i2 cast.
18279
18280 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
18281
18282         * inssel-ppc.brg: added a couple of speedup rules.
18283
18284 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
18285
18286         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
18287         to speed up rebuilds.
18288
18289 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18290
18291         * mini-s390.c: Minor fix to OP_OR_IMM.
18292
18293 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
18294
18295         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
18296         better. Fixes appdomain-unload.exe on sparc.
18297
18298 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
18299
18300         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
18301         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
18302         see bug 67324.
18303
18304 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
18305
18306         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
18307
18308 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
18309
18310         * mini.c: Always generate a field read/write wrapper for members
18311         of the class MarshalByRefObject since the actual instance could
18312         be a CBO.
18313
18314 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
18315
18316         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
18317
18318 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
18319
18320         * driver.c mini.h trace.c: Move the setting of the main assembly into
18321         a separate function called mono_trace_set_assembly () and call it after
18322         actually loading the main assembly. Fixes #66872.
18323
18324 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
18325
18326         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
18327         using the code manager.
18328
18329 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
18330
18331         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
18332
18333 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
18334
18335         * cpu-amd64.md: Fix bug in previous patch.
18336         
18337         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
18338         #66650.
18339
18340 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
18341
18342         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
18343         mini-exceptions.c: updates for changed stack walk interface.
18344
18345 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18346
18347         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
18348
18349 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
18350
18351         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
18352
18353 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
18354
18355         * driver.c (mini_regression_list): Do not call mono_assembly_close 
18356         since assemblies can't be unloaded.
18357         
18358 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
18359
18360         * cpu-amd64.md: Fix more instruction lengths.
18361
18362         * cpu-amd64.md: Fix lengths of some instructions.
18363
18364 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
18365
18366         * inssel.brg: Make the array ldelema check aot friendly.
18367
18368 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
18369
18370         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
18371
18372         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
18373
18374 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
18375
18376         * mini-x86.c: Fix build.
18377
18378         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
18379         mono_type_get_underlying_type () helper function to simplify code.
18380         
18381 2004-09-09  Martin Baulig  <martin@ximian.com>
18382
18383         * mini-amd64.c: Don't access `type->data.klass' directly, call
18384         mono_class_from_mono_type() instead since the type may be a
18385         generic instance.
18386
18387 2004-09-09  Martin Baulig  <martin@ximian.com>
18388
18389         * mini-amd64.c (get_call_info): Fix support for generic instances.
18390         (add_valuetype): Use mono_class_from_mono_type() to get the class
18391         since we can be a generic instance.
18392
18393 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
18394
18395         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
18396
18397 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
18398
18399         * liveness.c: reset spill costs on each scan: bug 62107
18400
18401 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
18402
18403         * exceptions-sparc.c (mono_arch_find_jit_info): remove
18404         unnecessary line that doesn't compile
18405
18406 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
18407
18408         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
18409         trampolines, make them call an error function so people can fix their
18410         code.
18411
18412 2004-09-06  Martin Baulig  <martin@ximian.com>
18413
18414         * mini.c (mono_method_to_ir): When initializing locals, handle a
18415         generic instances like a valuetype if it's a valuetype and like a
18416         class if it's a class.
18417
18418 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
18419
18420         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
18421         stack. Fixes #64674.
18422
18423         * exceptions.cs: Add test for unwinding of call arguments.
18424
18425 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
18426
18427         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
18428         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
18429         set the carry/borrow flag). The sparc and s390 implementations
18430         can now use optimized versions (and simplify the code). ppc bugfixes.
18431
18432 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
18433
18434         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
18435
18436 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
18437
18438         * inssel-amd64.brg: Remove leftover 32 bit rule.
18439
18440         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
18441
18442 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
18443
18444         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
18445         mono_arch_find_jit_info functions into a new function. Fix a memory
18446         leak.
18447
18448         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
18449         refactored code.
18450         
18451 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
18452
18453         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
18454         as well.
18455         
18456         * exceptions.cs: Add array size tests.
18457
18458         * mini.c: Allocate a separate icall wrapper for each arity of 
18459         mono_array_new_va. Fixes #59509.
18460
18461         * exceptions.cs: Add testcase for 64578.
18462
18463         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
18464
18465         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
18466         
18467 2004-09-02  Martin Baulig  <martin@ximian.com>
18468
18469         * mini.c (mono_method_to_ir): When initializing the locals, call
18470         handle_initobj() on the generic instance itself, not its
18471         underlying type.
18472
18473 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
18474
18475         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
18476         MonoJitInfo for dynamic methods.
18477
18478         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
18479
18480         * mini.c: Add support for freeing JIT data for dynamic methods.
18481         
18482 2004-09-01  Martin Baulig  <martin@ximian.com>
18483
18484         * mini-x86.c (is_regsize_var): Added support for generic
18485         instances.
18486         (mono_arch_emit_prolog): Make this compile again, use
18487         `x86_push_imm_template (code)'.
18488
18489 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18490
18491         * mini-x86.c: make all push_imm instructions that get
18492         patched always emit the long form
18493
18494 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
18495
18496         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
18497         in a per-domain hash.
18498
18499         * mini-amd64.c (merge_argument_class_from_type): Handle generic
18500         types.
18501
18502 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
18503
18504         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
18505         work.
18506         
18507         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
18508         work.
18509
18510         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
18511         Beginnings of SSE2 support.
18512
18513         * exceptions.cs: Add more tests for checked int<->uint casts.
18514
18515 2004-08-28  Martin Baulig  <martin@ximian.com>
18516
18517         * mini-x86.c (mono_arch_instrument_epilog): Added support for
18518         generic instances.
18519
18520         * mini.c
18521         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
18522         Handle generic instances recursively.
18523
18524 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
18525
18526         * iltests.il: test for conv.u8 on a constant
18527
18528 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
18529
18530         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
18531         LCONV_x4 (shrun_32 (membase)).
18532
18533 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
18534
18535         * inssel-x86.brg: c&p rules for push/setret of long
18536
18537 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
18538
18539         * inssel-x86.brg: c&p rules for compare (base, regvar) and
18540         compare (regvar, base)
18541
18542         * inssel-x86.brg: more burg love
18543
18544         * inssel.brg: more cleanup
18545
18546         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
18547
18548 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
18549
18550         * basic-long.cs, basic-calls.cs: new tests for optimization.
18551
18552 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
18553
18554         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
18555         patch.
18556
18557 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
18558
18559         * mini-amd64.c (read_tls_offset_from_method): Add another case.
18560         
18561 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
18562
18563         * inssel.brg (mini_emit_memcpy): use 
18564         NO_UNALIGNED_ACCESS to disable memcpy optimization
18565
18566 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
18567
18568         * mini-amd64.c: Handle generic types in various places.
18569
18570         * mini.c (mono_method_to_ir): Handle generic types in init locals.
18571
18572 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
18573
18574         * mini.c (handle_box): Fix warning.
18575
18576         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
18577
18578         * mini-amd64.h: Enable the emit_state optimization.
18579
18580         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
18581
18582         * mini-amd64.c: Add some new 64 bit peephole opts.
18583
18584         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
18585
18586         * cpu-amd64.md: sreg1 of div instructions must be %rax.
18587
18588         * mini-amd64.c: Register allocator fixes.
18589
18590         * mini.c: Add an optimization to emit_state to avoid allocation of new
18591         registers on some platforms.
18592
18593 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
18594
18595         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
18596
18597         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
18598         allocation. Fixes #63085.
18599
18600         * basic-long.cs: Add new regression test.
18601
18602         * mini-amd64.c: Register allocator improvements.
18603
18604 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
18605
18606         * mini-amd64.c (read_tls_offset_from_method): Add another code
18607         sequence.
18608
18609         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
18610         instruction sequence for nullifying class init trampolines.
18611
18612         * objects.cs: Add new regalloc test.
18613
18614         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
18615
18616 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
18617
18618         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
18619         
18620         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
18621         arguments.
18622
18623         * driver.c: Fix profiling after TLS changes.
18624         
18625         * driver.c (mono_main): Set mono_stats.enabled if needed.
18626
18627         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
18628         CEE_BOX.
18629
18630 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
18631
18632         * mini-x86.c: use a 1 op rather than a 2 op tls access
18633         instruction -> faster.
18634
18635 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
18636
18637         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
18638         x86 backend.
18639
18640 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
18641
18642         * exceptions-sparc.c (throw_exception): fix typo
18643
18644 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
18645
18646         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
18647         set tree->dreg correctly with tls. Allow any
18648         register to be used.
18649
18650         * mini-x86.c (read_tls_offset_from_method): add new code
18651         generation pattern seen with GCC.
18652
18653
18654 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
18655
18656         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
18657         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
18658         exceptions-sparc.c: fix some performance issues in exception
18659         handling and setting of the stack trace for exceptions that were
18660         already thrown.
18661
18662 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
18663
18664         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
18665         x86 backend.
18666         
18667         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
18668         registers.
18669
18670 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
18671
18672         This patch inlines tls access, when possible.
18673         
18674         * mini.h: new arch functions for TLS intrinsics.
18675         All platforms updated with a stub.
18676
18677         * mini.c: use the new intrinsics
18678
18679         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
18680         arch specific intrinsic for tls variables
18681
18682 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
18683
18684         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
18685         under windows.
18686
18687 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
18688
18689         * mini.c: thread local allocation
18690
18691 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
18692
18693         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
18694
18695         * Makefile.am: Link against the static version of libmonogc.
18696         
18697         * Makefile.am: Link the static versions of the convenience libraries
18698         into the mono executable.
18699
18700         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
18701
18702 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
18703
18704         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
18705         on integer overflow.
18706
18707         * mini-amd64.c: Reorganize function call code.
18708
18709         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
18710
18711 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
18712
18713         * inssel-x86.brg: use xor eax,eax.
18714         
18715         * basic.cs: new tests
18716
18717 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
18718
18719         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
18720         in exception throwing code.
18721         
18722 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
18723
18724         * inssel-x86.brg: use xor esi,esi.
18725
18726 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
18727
18728         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
18729         can trace methods compiled during mini_init () too.
18730
18731         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
18732         CEE_CONV_U4.
18733
18734 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
18735
18736         * Makefile.am: static link on x86 (r=zoltan)
18737
18738 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
18739
18740         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
18741         code since it causes some programs to fail.
18742
18743 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
18744
18745         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
18746
18747 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
18748
18749         * mini.c: ovfops_op_map - add STACK_OBJ case for
18750         CONV_I 
18751         * basic.cs: add test_0_pin_string as test
18752         case for above.
18753
18754 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
18755
18756         * Makefile.am: build C# if srcdir != builddir
18757
18758 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
18759
18760         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
18761         fall-through blocks.
18762
18763 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
18764
18765         * driver.c: enable loop by default again and include abcrem in -O=all.
18766
18767 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
18768
18769         * iltests.il: Add some localloc tests.
18770
18771         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
18772
18773         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
18774         Fixes #62574.
18775
18776         * inssel-amd64.brg: Add some optimizations.
18777
18778         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
18779         for gcc-3.4.
18780
18781         * Makefile.am: Statically link mono against libmono on AMD64.
18782         
18783         * mini-amd64.c inssel-amd64.brg: Optimizations.
18784
18785 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
18786
18787         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
18788
18789         * tramp-amd64.c: Patch calling code in trampolines.
18790
18791 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
18792
18793         * mini-amd64.c: pinvoke struct passing fixes.
18794
18795 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
18796
18797         * mini-sparc.c: redo change, make mono_arch_cpu_init call
18798         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
18799
18800 2004-08-05  Duncan Mak  <duncan@ximian.com>
18801
18802         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
18803         CEE_LDELEM_ANY.
18804
18805 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
18806
18807         * mini-amd64.c (emit_move_return_value): Move return value for normal
18808         calls too.
18809
18810 2004-08-05  Martin Baulig  <martin@ximian.com>
18811
18812         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
18813         `type->type'; just modify `type' itself when dealing with enums
18814         and generic instances.
18815         (check_call_signature): Make `simple_type' a `MonoType *'.
18816
18817 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
18818
18819         * mini.c: Use OP_PADD to add offsets to addresses.
18820
18821         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
18822
18823 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
18824
18825         * mini-sparc.c (mono_arch_emit_epilog): fix check
18826         for folding last op into restore instruction
18827
18828 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
18829
18830         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
18831         helper methods using the code manager.
18832         
18833         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
18834
18835         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
18836
18837 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18838         
18839         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
18840           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
18841
18842         * mini-s390.c: fix tail processing
18843
18844 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
18845
18846         * mini-ppc.c: mul.ovf.un exception name fix.
18847
18848 2004-08-03  Martin Baulig  <martin@ximian.com>
18849
18850         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
18851         instances; before jumping to `handle_enum', also modify `ptype'.
18852
18853 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
18854
18855         * cpu-sparc.md: fcall maximal length too small.
18856
18857 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
18858
18859         * mini-amd64.c mini.h: Add initial support for passing/returning 
18860         structures to/from pinvoked methods.
18861
18862 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
18863
18864         * mini-ppc.c: reg allocator fix.
18865
18866 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
18867
18868         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
18869
18870         * inssel.brg: Optimize memset on 64 bit machines.
18871
18872         * mini-amd64.c: Fix some vararg cases.
18873
18874 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18875
18876         * mini-s390.c: Corrected macro in emit_float_to_int
18877
18878         * s390-abi.cs: Tests to exercise the s390 ABI
18879
18880 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
18881
18882         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
18883         caller saved regs.
18884
18885         * basic.cs: Add a test for add.ovf.un.
18886
18887 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
18888
18889         * mini-sparc.c: add case for OP_IDIV_UN
18890
18891 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
18892
18893         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
18894         
18895         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
18896
18897 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
18898
18899         * basic.cs: regression tests.
18900
18901         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
18902         regressions.
18903
18904 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
18905
18906         * basic.cs: Add a new test.
18907
18908         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
18909         and AOT. Various fixes and optimizations.
18910
18911         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
18912
18913 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
18914
18915         * mini-ppc.c: make sure temp regs are not used for global reg
18916         allocation.
18917
18918 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
18919
18920         * cpu-sparc.md: conv_i8 fix for 64bits
18921
18922         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
18923
18924 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
18925         
18926         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
18927         add opcode for cmp BYTE PTR [eax], imm.
18928
18929         * inssel.brg: Make memcpy and memset takes bases.
18930
18931 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
18932
18933         * *-amd64.*: More AMD64 work.
18934         
18935 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
18936
18937         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
18938         add a compare-not-equal opcode.
18939         
18940 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
18941
18942         * mini.c: Use mono_init_from_assembly instead of mono_init.
18943         
18944 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
18945
18946         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
18947
18948         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
18949
18950         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
18951
18952         * inssel.brg: 64 bit fixes.
18953
18954         * mini.h (MonoCallInst): Add some AMD64 specific data.
18955
18956         * mini.h: Add some OP_P opcodes.
18957
18958 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
18959
18960         * basic.cs: tests for 61797 and 61740
18961
18962 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
18963
18964         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
18965         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
18966
18967 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
18968
18969         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
18970
18971         * *-amd64*.*: Ongoing AMD64 work.
18972
18973 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
18974
18975         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
18976
18977         * *-amd64*: Ongoing AMD64 work.
18978
18979         * mini-arch.h: Add AMD64 support.
18980
18981         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
18982
18983         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
18984
18985         * mini-ops.h: Add new opcodes.
18986
18987         * Makefile.am: Add AMD64 support.
18988
18989         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
18990         rules into the inssel-long*.brg files.
18991
18992         * *-amd64.*: Add beginnings of AMD64 backend.
18993
18994 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
18995
18996         * mini.c (print_dfn): commenting out the code that prints
18997         the cil. With -O=deadce, this makes -v -v crash.
18998         
18999         * cpu-pentium.md: make checkthis have a length of 2
19000
19001 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
19002
19003         * mini-sparc.h: fix implementations of __builtin
19004         functions for Sun compiler for V9.
19005
19006 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
19007
19008         * mini.c: use the new stelem.ref wrapper
19009         * exceptions.cs, arrays.cs: new stelem.ref tests
19010
19011 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
19012
19013         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
19014         new XSP should work with these changes).
19015
19016 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
19017         
19018         * inssel-{long32,x86,}.brg: trivial optimizations.
19019         
19020 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
19021
19022         * mini.c: load value when emitting box operation in
19023         constrained calls.
19024
19025 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
19026
19027         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
19028         is one byte shorter than cmp DWORD PTR [eax], 0.
19029
19030 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
19031
19032         * inssel-ppc.brg: arguments on the stack are always
19033         relative to the stack pointer (spotted by Neale Ferguson).
19034
19035 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19036
19037         * exceptions-x86.c: delay appending the method name to the trace until
19038         after mono_jit_info_table_find is called, as this gets the real
19039         MonoMethod.
19040
19041 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
19042
19043         * aot.c: register roots
19044
19045 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
19046
19047         * aot.c : I could just use PLATFORM_WIN32 flag.
19048
19049 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
19050
19051         * aot.c : Reverting the previous fix. This time it broke linux build.
19052
19053 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
19054
19055         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
19056
19057 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
19058
19059         * mini.c (handle_stack_args): Remove some more debugging code.
19060         
19061         * mini.c (handle_stack_args): Remove debug output left in by mistake.
19062
19063         * driver.c mini.h aot.c: Allow additional options to be specified with
19064         --aot and pass them to mono_compile_assembly.
19065
19066         * aot.c: Add experimental code to AOT compile all loaded assemblies
19067         on demand and save the code into a cache in the filesystem.
19068
19069         * aot.c: Add support for more wrapper methods.
19070         
19071         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
19072         58863.
19073
19074         * cpu-*.md: Remove removed opcodes.
19075
19076         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
19077         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
19078         related icalls to marshal.c.
19079
19080 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
19081
19082         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
19083
19084         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
19085
19086         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
19087
19088 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
19089         * liveness.c: If liveness is recomputated we need to reset the information
19090         for each variable. This way, if the liveness range has been narrowed
19091         by optimizations that happened after the last computation, we can return
19092         a smaller range.
19093         
19094         For example, if you have
19095         
19096         {
19097                 int i = 0;
19098                 
19099                 // Tons of code that does not affect i
19100                 
19101                 i = foo ();
19102                 ...
19103         }
19104         
19105         i = 0 is dead code and will be removed by SSA. However, when
19106         linear scan gets to the code, i will still appear to be live
19107         throughout the entire block. This prevents good register allocation.
19108
19109 2004-07-06  Martin Baulig  <martin@ximian.com>
19110
19111         * debug-mini.c (mono_debug_init_method): Allow
19112         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
19113         (mono_debug_add_icall_wrapper): New method.
19114
19115         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
19116
19117 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
19118
19119         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
19120         optimization.
19121
19122 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
19123
19124         * aot.c (mono_aot_load_method): Fix loading of debug info.
19125
19126 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
19127
19128         * aot.c: Add logging support.
19129
19130 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
19131
19132         * mini.h: Add prototype for mono_print_method_from_ip.
19133
19134         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
19135
19136         * inssel.brg: 64 bit fixes.
19137
19138         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
19139         inssel-long32.brg.
19140
19141         * Makefile.am: Add SPARC64 support.
19142
19143 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
19144
19145         * aot.c: Fix alignment problems on 32 bit platforms.
19146
19147 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
19148
19149         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
19150         SPARC64.
19151
19152         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
19153         problems.
19154
19155         * mini.h: Bump AOT file version. Some 64 bit fixes.
19156
19157 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
19158
19159         * inssel-sparc.brg: Add new rule to avoid register moves.
19160
19161         * inssel.brg: Add ldind_to_load_membase helper function.
19162
19163 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
19164
19165         * mini.c: OffsetToStringData intrinsic.
19166         
19167 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
19168
19169         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
19170
19171         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
19172         regression tests.
19173
19174         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
19175 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
19176
19177         * mini.c: reinstated mono_compile_get_interface_var()
19178         on x86, too, since the change breaks the Gtk# build there as well.
19179
19180 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19181
19182         * driver.c: remove loop from the default optimizations: it seems to
19183         interact badly with some of the other options (see bug #60613).
19184
19185 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
19186
19187         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
19188         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
19189
19190 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
19191
19192         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
19193         vararg-using methods.
19194
19195 2004-06-21  Martin Baulig  <martin@ximian.com>
19196
19197         * mini/mini-exceptions.c
19198         (mono_handle_exception): Added `gpointer original_ip' argument.
19199         After calling mono_unhandled_exception(), call
19200         mono_debugger_unhandled_exception() and if that returns true,
19201         restore the context and return.
19202
19203 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
19204
19205         * mini-ppc.c: prefer the use of relative branches so
19206         they won't need to be patched in aot code (patch from Patrick Beard).
19207
19208 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
19209
19210         * aot.c: patch from Patrick Beard to make the output assembly
19211         more correct for the MacOSX assembler. Small tweak to
19212         generate sane images on Linux/PPC, too.
19213
19214 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19215
19216         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
19217         case until bug #59509 is fixed (shows up in #60332).
19218
19219 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
19220
19221         * mini.c: make sure the needed wrappers are compiled, too, with
19222         precomp.
19223
19224 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
19225
19226         * driver.c: remove NPTL reference in --version output.
19227
19228 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19229
19230         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
19231         generate valid assembly for the Mach-O assembler.
19232
19233 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
19234
19235         * driver.c: don't include abcrem in the all optimization specifier
19236         since it slows down jit compilation too much for now.
19237
19238 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
19239
19240         * mini.c: use BIGMUL only if both operands have the same signage.
19241         * iltests.il: Test for bug 60056. (errors related to signage in
19242         BIGMUL).
19243
19244         r=lupus.
19245
19246 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
19247
19248         * mini.c, aot.c: memory leak fixes.
19249
19250 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
19251
19252         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
19253
19254 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
19255
19256         * Makefile.am: remove the -static hack completely, it links in
19257         statically glib as well.
19258
19259 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
19260
19261         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
19262         * exceptions.cs: make it compile with new mcs/csc.
19263
19264 2004-06-03 Massimiliano Mantione <massi@ximian.com>
19265         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
19266         and added relevant test case.
19267
19268 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
19269
19270         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
19271         regressions in gtk-sharp.
19272
19273 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
19274
19275         * exceptions.cs: New regression tests.
19276
19277         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
19278
19279 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
19280
19281         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
19282
19283 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
19284
19285         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
19286
19287         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
19288
19289 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
19290
19291         * mini.c (mono_jit_runtime_invoke): Init class in this
19292         method instead of trusting mono_jit_compile_method to
19293         do the work (because wrappers can be in object class)
19294
19295 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
19296
19297         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
19298
19299         * basic-long.cs: New regression test.
19300
19301 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
19302
19303         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
19304         and div/rem checks.
19305
19306 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
19307
19308         * Makefile.am: fix miguel's change to build mono statically against
19309         libmono (track build dependencies).
19310
19311 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
19312
19313         * cfold.c: Some glib versions do not have G_MININT32.
19314
19315 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
19316
19317         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
19318         with precision of tan, atan, sin and cos, and implemented related
19319         regressions tests (fixes bug 54467, but one new problem appeared and
19320         is not fixed yet).
19321
19322 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
19323
19324         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
19325
19326         * exceptions.cs: Add test for constant folding && division by zero.
19327
19328         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
19329         since driver.c is in libmono too, so the optimization was useless.
19330
19331         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
19332         variable to driver.c so the compiler can emit more efficient code to
19333         access them.
19334
19335 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19336
19337         * Makefile.am: don't distribute generated inssel.[ch] files.
19338
19339 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
19340
19341         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
19342         into the default appdomain. Fixes #58707.
19343
19344         * jit-icalls.c: Remove the broken approximation for truncl, doing
19345         no conversion is better.
19346
19347         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
19348         Fixes #58863.
19349
19350 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
19351
19352         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
19353         of the mcrxr instruction which is not available on some processors
19354         even if it's documented to be. Implement add and sub overflow correctly
19355         (still not complete for long unsigned). Speed up icalls a bit.
19356
19357 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
19358
19359         * mini.c (mono_jit_compile_method_with_opt): Make sure that
19360         we run .cctor in the current domain instead of target_domain.
19361         
19362         Fixes bug #58558, .cctor not being called in -O=shared.
19363
19364 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
19365
19366         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
19367
19368 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
19369
19370         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
19371         which can be done with an imm8, do it that way.
19372         (mono_arch_output_basic_block): ditto for a jmp
19373         (mono_arch_emit_prolog): Computate maximum offset of a label.
19374
19375 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
19376
19377         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
19378         now tries to allocate prefered physical reg's for virtual
19379         regs. This reduces the number of emited spills/loads with
19380         20-30% on our core assemblies.
19381
19382 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
19383
19384         * jit-icalls.c: truncl() is not needed and trunc() is
19385         the correct thing to do anyway (bug #58287).
19386
19387 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
19388
19389         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
19390         if available.
19391
19392 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
19393
19394         * driver.c: enable loop optimizations by default.
19395
19396 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
19397
19398         * mini-x86.c: fix calc of max loop size when aligning loops start.
19399
19400 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
19401
19402         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
19403         the stack.
19404
19405 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
19406
19407         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
19408         should set carry.
19409
19410         * basic-long.cs: Add tests for add/subtract of immediates with carry.
19411
19412         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
19413         
19414         * mini.c (inline_method): Allways inline some wrappers even if the cost
19415         is too large. Fixes #58785.
19416
19417         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
19418         
19419 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
19420
19421         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
19422         (crichton@gimp.org). Beginning of support for sparc/linux.
19423
19424         * mini-sparc.c: Optimize retrieval of LMF address.
19425
19426 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
19427
19428         * exceptions-ppc.c:  handle alloca in methods with clauses.
19429
19430 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
19431
19432         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
19433
19434 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
19435
19436         * mini.c: Delegate most of the abort signal work to 
19437           mono_thread_request_interruption, which also handles Stop and Suspend
19438           states.
19439
19440 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
19441
19442         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
19443         supports the save/restore lmf opcodes.
19444
19445 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
19446
19447         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
19448         by gcc-3.4 as well.
19449
19450         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
19451
19452 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
19453
19454         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
19455         methods which contain array accesses.
19456
19457         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
19458         boundaries. Fixes #58537.
19459
19460         * iltests.il: Add regression test for #58537.
19461
19462 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
19463
19464         * mini-x86.c (mono_arch_local_regalloc): Last part of
19465         fix for bug #58633 (releasing register to early).
19466
19467 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
19468
19469         * basic-long.cs: Add new regression test.
19470
19471 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
19472
19473         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
19474         register too early on the chain.
19475
19476 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
19477
19478         * mini.c (create_helper_signature): Use a helper function to reduce
19479         the code which needs to be written. Also set the calling convention of
19480         icalls on windows. Fixes #57840.
19481
19482 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
19483
19484         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
19485         exceptions-ppc.c: added helper function to get the instruction address
19486         from a signal handler context.
19487
19488 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
19489
19490         * helpers.c: use g_get_tmp_dir. Invokes happyness 
19491         from gonzalo.
19492
19493 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
19494
19495         * helpers.c: Add new env variable to pass args to objdump.
19496         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
19497
19498 2004-05-17  Radek Doulik  <rodo@ximian.com>
19499
19500         * Makefile.am (common_sources): added abcremoval.h so it get
19501         disted and daily mono packages on go-mono.com will build again
19502
19503 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
19504
19505         * abcremoval.c: Fixed coding style, added copyright header.
19506
19507         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
19508
19509         * mini.h: Added prototype for abc removal main function.
19510
19511         * build_relations_propagation_table.pl: Added copyright header.
19512
19513 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
19514
19515         * basic-long.cs: reg test for complex ceq_long bug.
19516
19517 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
19518
19519         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
19520         reg in long and clob case (bug #58343). Fixed/added comments.
19521
19522 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
19523
19524         * mini.c (mono_jit_runtime_invoke): Follow new convention
19525         of calling the invoke method with an function pointer.
19526
19527 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
19528
19529         * ChangeLog: Fix author of memory leak patch.
19530
19531 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
19532
19533         * Makefile.am: fix make dist as well...
19534
19535
19536 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
19537
19538         * cfold.c: Made so that conversions from pointer to int4 are no-ops
19539         on archs where pointers are 4 bytes long.
19540
19541         * Makefile.am: Added abcremoval.c source file.
19542
19543         * abcremoval.c: Added abcremoval.c.
19544
19545         * abcremoval.h: Added abcremoval.h.
19546
19547         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
19548
19549         * inssel.brg: Enabled bounds check removal.
19550
19551         * mini.c: Added support for abcrem optimization.
19552
19553         * mini.h: Added abcrem optimization label.
19554
19555         * driver.c: Added support for abcrem optimization.
19556
19557         * propagated_relations_table.def: Added propagated_relations_table.def.
19558
19559 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
19560
19561         * mini.c, cfold.c: fix style.
19562
19563 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
19564
19565         * mini.c: handle issue with the low-level implementation of
19566         some long opcodes (bug #54209).
19567
19568 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
19569
19570         * basic.cs: test for my new cmov stuff.
19571
19572 2004-05-13      Patrik Torstensson
19573
19574         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
19575         opt and added peephole documentation.
19576
19577 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
19578
19579         * tramp-ppc.c: rewrote the generic trampoline code.
19580
19581 2004-05-11      Patrik Torstensson
19582
19583         * mini-x86.c: optimize long shl/shr asm code (one less branch)
19584
19585 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
19586
19587         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
19588
19589         * mini.h mini.c dominators.c: Applied patch from Derek Woo
19590         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
19591
19592         * mini.c: Add new icalls for AsAny marshalling.
19593
19594 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
19595
19596         * tramp-ppc.c, mini-ppc.c: more cleanups.
19597
19598 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19599
19600         * mini.c: no warnings.
19601
19602 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19603
19604         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
19605
19606 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
19607
19608         * mini.c: In the thread abort signal handler, if the thread is in the
19609         process of being stoped, don't throw the Abort exception, just stop the
19610         thread.
19611
19612 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
19613
19614         * tramp-ppc.c: removed old code.
19615
19616 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19617
19618         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
19619         do some simple speed optimizations on ppc.
19620
19621 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
19622
19623         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
19624         and large offsets in load/store.
19625
19626 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
19627
19628         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
19629         it causes regressions.
19630
19631 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
19632
19633         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
19634         support.
19635
19636 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
19637
19638         * jit-icalls.c: remove warnings.
19639         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
19640         speedups for unsafe code.
19641
19642 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
19643
19644         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
19645
19646 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
19647
19648         * basic-calls.cs: Add new regression test.
19649
19650         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
19651         more portable.
19652
19653         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
19654
19655         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
19656         is no longer used.
19657
19658 2004-05-06      Patrik Torstensson
19659
19660         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
19661         long reg allocation in any reg (not only eax:edx) and implemented 
19662         long shl/shr ops in asm instead of helpers.
19663
19664 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
19665
19666         * mini-sparc.h: Fix warnings.
19667
19668         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
19669         stack.
19670
19671         * mini-exceptions.c (mono_handle_exception): Call the filter in a
19672         separate statement for clarity.
19673
19674         * mini-sparc.c: Update status.
19675
19676 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
19677
19678         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
19679         here.
19680
19681 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
19682
19683         * inssel-ppc.brg: another small pre-release workaround:
19684         we don't do overflow detection for long_sub_un.
19685
19686 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
19687
19688         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
19689         (also works around a weird ppc bug: 57957).
19690
19691 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
19692
19693         * tramp-ppc.c: trampoline fixes.
19694
19695 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
19696
19697         * mini-ppc.c: fixed typos.
19698
19699 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
19700
19701         * mini-ppc.c, exceptions-ppc.c: more code saves registers
19702         at the top of the stack. Fixed typos. Use a frame registers
19703         for all the methods with exception clauses.
19704
19705 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
19706
19707         * exceptions-ppc.c: restore fp registers.
19708
19709 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
19710
19711         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
19712         order from the stack top (moved the stack room to save the
19713         return value for trace after the param area). Fixed corruption
19714         in restoring registers on unwind.
19715
19716 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
19717
19718         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
19719
19720 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
19721
19722         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
19723         and prolog/epilog for methods that use it. Allow
19724         enough param area room for varargs methods. Fix miguel's
19725         breakage in exception handling.
19726
19727 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
19728
19729         * Makefile.am: run genmdesc only on current arch.
19730
19731 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19732
19733         * exceptions-x86.c:
19734         * mini-x86.h: fix the build on windows.
19735
19736 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
19737
19738         * 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.
19739
19740         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
19741
19742         * mini-exceptions.c: New file.
19743         
19744         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
19745         Move some parts of the x86 exception handling code to an 
19746         arch-independent file so it can be shared with other ports.
19747
19748 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
19749
19750         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
19751
19752 2004-04-26  David Waite  <mass@akuma.org>
19753
19754         * driver.c: remove comma from end of enumeration declaration
19755
19756 2004-04-26  Jackson Harper  <jackson@ximian.com>
19757
19758         * driver.c: parse config file before loading first assembly. This
19759         allows the user gac to be enabled/disabled. 
19760         
19761 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
19762
19763         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
19764         simpler mechanism: we do not care what is encoded initially
19765         (branch absolute or relative), we care about the code and its
19766         target.  I kept the old code for reference for now.
19767
19768         The new code tries first to determine if the jump is anywhere in
19769         the -/+32 absolute meg range, if it succeeds, it encodes using the
19770         absolute branch;  If not, it tried to find something in the
19771         relative range, if not, it uses the handle_thunk code. 
19772
19773 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
19774
19775         * exceptions-ppc.c: use the correct ip register on macosx.
19776
19777 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
19778
19779         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
19780
19781 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
19782
19783         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
19784         Raise exception on integer divide by zero by hand since the hw
19785         doesn't support it. Handle NaNs in FP compares.
19786
19787 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
19788
19789         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
19790         code reducing duplication between the platforms and enabled
19791         signal exception handling (on linux for now).
19792
19793 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
19794
19795         * exceptions-ppc.c: more macosx support.
19796
19797 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19798
19799         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
19800
19801 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
19802
19803         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
19804
19805 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
19806
19807         * iltests.il: more tests.
19808
19809 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
19810
19811         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
19812         vars as well.
19813
19814 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
19815
19816         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
19817
19818 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
19819
19820         * liveness.c: Mark variables as volatile in all basic blocks reachable
19821         from exception clauses.
19822
19823 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
19824
19825         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
19826         inlining.
19827
19828 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
19829
19830         * iltests.il, basic.cs: more tests for regalloc.
19831
19832 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
19833
19834         * iltests.il: Some tests for register allocation modifications
19835         I have locally.
19836
19837 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
19838
19839         * exceptions.cs: Add regression test for bug #56782.
19840
19841         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
19842         original stack trace if an exception is rethrown. Fixes #56782. Oh,
19843         the beauty of fixing the same thing in 5 different files...
19844
19845 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
19846
19847         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
19848         methods.
19849
19850 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
19851
19852         * mini.c: Add support for STRWLPARRAY marshalling convention.
19853
19854 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
19855
19856         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
19857         to init the context to setup the regs pointer).
19858
19859 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
19860
19861         * exceptions-ppc.c: more exceptions work.
19862
19863 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
19864
19865         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
19866         not allowed.
19867
19868 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
19869
19870         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
19871         can use the memory directly.
19872
19873         * cpu-pentium.md: Update documentation from a post from Zoltan. 
19874
19875         add x86_add_membase, x86_sub_membase, x86_mul_membase
19876
19877 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
19878
19879         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
19880         GENERAL_REGS they were also hardcoded for all PPC ports.
19881
19882         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
19883
19884         Remove hard-coded limit for floating point registers, use
19885         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
19886
19887         Notice that in MacOS X calling conventions you can fit a lot more
19888         floating point values in registers, so I should update the PInvoke
19889         test to excercise the passing of floating point values on the
19890         stack (currently broken).
19891         
19892 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
19893
19894         * tramp-ppc.c (create_trampoline_code): Added
19895         JUMP_TRAMPOLINE_SIZE. 
19896         (ppc_magic_trampoline): Follow the pattern from
19897         x86_magic_trampoline: if code is set to zero, return. 
19898         (create_trampoline_code): Always pass MonoMethod to the jump
19899         trampoline, before it was passing a null.
19900         (mono_arch_create_jump_trampoline): Implement the jump stub, could
19901         share the code with mono_arch_create_jit_trampoline. 
19902
19903         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
19904         implemented.
19905         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
19906         implemented.  
19907
19908         * cpu-g4.md: Added length for jmp instruction, the worst case
19909         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
19910         for save_lmf).
19911
19912 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
19913
19914         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
19915
19916 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
19917
19918         * mini.c: Only set bblock->real_offset when adding a new bblock, and
19919         before each IL instruction.
19920
19921         * mini.c (CEE_BOX): Fix warnings.
19922
19923 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19924
19925         * mini.c: removed a few unused vars and extra whitespace.
19926
19927 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
19928
19929         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
19930         checks.
19931         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
19932         index.
19933         (OP_GETCHR): use the above
19934         (CEE_LDELEMA): use the above.
19935
19936         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
19937         version of the generic impl.
19938         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
19939         (CEE_LDELEMA): use the above.
19940
19941 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
19942
19943         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
19944         Fixes #56317.
19945
19946         * iltests.il: Added new regression test for #56317.
19947
19948 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
19949
19950         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
19951         under NetBSD. Fixes #56450.
19952
19953         * liveness.c (update_gen_kill_set): Fix previous patch.
19954
19955 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19956
19957         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
19958
19959 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
19960
19961         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
19962         ldsfld and ldsflda.
19963
19964         * inssel-sparc.brg: Add more optimizations.
19965
19966         * mini-sparc.c: Replace multiply/divide with shifts if possible.
19967
19968 2004-04-01  Martin Baulig  <martin@ximian.com>
19969
19970         * mini.c (handle_box): New static function; moved the
19971         implementation of CEE_BOX here.
19972         (mono_method_to_ir): Added `constrained_call' variable.
19973         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
19974         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
19975         mono_method_get_constrained() to get the method.
19976
19977 2004-04-01  Martin Baulig  <martin@ximian.com>
19978
19979         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
19980         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
19981         (mono_method_to_ir): We don't need these macros anymore since
19982         mono_class_get_full() already takes care of it. 
19983
19984 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19985
19986         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
19987         use @function (as doesn't accept #function here) and check the return
19988         value of system and stop if fails.
19989
19990 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19991
19992         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
19993
19994 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
19995
19996         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
19997
19998         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
19999
20000         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
20001         #56223.
20002
20003         * basic-long.cs: Add test for negation of Int64.MinValue.
20004
20005 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
20006
20007         * mini-sparc.c: Update status.
20008
20009         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
20010
20011         * exceptions-sparc.c: Fix return value in filters.
20012
20013         * inssel-sparc.brg: Fix register allocation in some rules.
20014
20015 2004-03-28  Martin Baulig  <martin@ximian.com>
20016
20017         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
20018         if neccessary.  
20019
20020 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
20021
20022         * mini-x86.c (mono_arch_patch_code): Fix warnings.
20023         
20024         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
20025         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
20026         remove unused conv_u4 opcode.
20027
20028         * mini-x86.c: Remove valgrind workaround since it slows down things
20029         even when mono is not run under valgrind.
20030
20031 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
20032
20033         * mini-sparc.c: Update status.
20034
20035         * inssel-sparc.brg: Add some optimizations.
20036
20037         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
20038         future delay slot filling. Add support for varargs, tail calls and JMP.
20039
20040         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
20041         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
20042
20043         * inssel.brg: Fix register allocation in OP_ARGLIST.
20044
20045         * inssel.brg: Fix warnings.
20046
20047 2004-03-25  Martin Baulig  <martin@ximian.com>
20048
20049         * mini.c (inflate_generic_field): Removed.
20050         (mini_get_method): Removed, use mono_get_method_full(),
20051         (mini_get_class): Removed, use mono_class_get_full().
20052         (mono_method_to_ir): Pass our generic context to
20053         mono_field_from_token().        
20054
20055 2004-03-25  Martin Baulig  <martin@ximian.com>
20056
20057         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
20058         of a `MonoMethod *'.
20059         (mini_get_method): Take a `MonoGenericContext *' instead
20060         of a `MonoMethod *'.
20061         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
20062         a new local variable called `generic_context' which holds the
20063         current `MonoGenericContext *'; use it to lookup things.
20064
20065 2004-03-24  Martin Baulig  <martin@ximian.com>
20066
20067         * mini.c (mini_get_class): New static method; if we're inside a
20068         generic instance, inflate the class if neccessary.
20069         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
20070
20071 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
20072
20073         * iltests.il: New regression test for #55976.
20074
20075         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
20076         #55976.
20077
20078 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
20079
20080         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
20081         output.
20082
20083 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
20084
20085         * liveness.c: Consider SSA stores as well as loads when making vars
20086         volatile.
20087
20088         * exceptions.cs: New regression tests for register allocation.
20089         
20090 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
20091
20092         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
20093         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
20094           domain lock only to protect puntual access to data structures.
20095           Added access lock for sighash, jit_icall_hash_name, 
20096           jit_icall_hash_addr and domain->code_mp.
20097
20098 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
20099
20100         * driver.c: Print SIGSEGV handling method.
20101
20102         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
20103
20104         * mini.c (setup_jit_tls_data): Handle case when this is called
20105         multiple times for a thread.
20106
20107         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
20108         is different from fbxx_un. Fixes #54303. Also use constants instead of
20109         magic numbers in a lot of places.
20110
20111 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
20112
20113         * exceptions.cs: Fix cctor test when --regression is used.
20114
20115 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
20116
20117         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
20118         for Linux/ppc.
20119
20120 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
20121
20122         * inssel-ppc.brg: fixed register assignments for some rules.
20123
20124 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
20125
20126         * exceptions.cs: Add test for exceptions in static constructors.
20127
20128         * mini.c (mono_jit_compile_method_with_out): Move the calling of
20129         static constructors outside the domain lock. Fixes #55720.
20130
20131 2004-03-17  Martin Baulig  <martin@ximian.com>
20132
20133         * mini.c (get_generic_field_inst): Removed, this'll never happen.
20134         (inflate_generic_field): Take the `MonoMethod *' instead of the
20135         `MonoClass *' and added support for generic method.
20136         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
20137         have a `field->parent->gen_params', only inflate the field if it's
20138         an open constructed type.
20139
20140 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
20141
20142         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
20143         exception object instead of the preconstructed ones.
20144
20145 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20146
20147         * mini.c: reverted changed to sigsegv_signal_handler commited
20148         accidentally in the previous patch.
20149
20150 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20151
20152         * mini.c:
20153         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
20154         running --aot with an old assembly.
20155
20156 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
20157
20158         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
20159         point values.
20160
20161         * mini-sparc.c: Add support for v9 branches with prediction.
20162
20163 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
20164
20165         * mini.c (mini_init): #warning is GNUC only
20166
20167         * mini-sparc.h: implement __builtin_frame_address
20168         and __builtin_return_address for Sun C compiler
20169
20170 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
20171
20172         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
20173
20174 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
20175
20176         * basic-calls.cs: Add test for unaligned byref long argument passing.
20177
20178         * mini-ops.h: Add sparcv9 compare and branch instructions.
20179
20180         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
20181         v9 instructions if we have a v9 cpu.
20182
20183         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
20184         registers for global allocation.
20185
20186         * exceptions-sparc.c: Fixes.
20187         
20188 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
20189
20190         * liveness.c (mono_analyze_liveness): Optimized version.
20191
20192         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
20193
20194         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
20195         sparc work.
20196
20197         * basic-float.cs basic-calls.cs: New regression tests.
20198
20199 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
20200
20201         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
20202         sigaltstack implementation.
20203
20204         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
20205         
20206         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
20207         stuff if SIGSEGV_ON_ALTSTACK is not defined.
20208
20209 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
20210
20211         * mini.c: Fix warnings.
20212         
20213         * mini.c (mono_resolve_patch_target): New function which contains the
20214         arch independent part of the patching process.
20215
20216         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
20217         patching code to a separate function.
20218
20219 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
20220
20221         * mini.c (add_signal_handler): ifdef out on Windows
20222
20223 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
20224
20225         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
20226         cpu-sparc.md: Add exception handling support + other fixes.
20227
20228         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
20229         typed GC detection in --version.
20230
20231         * basic.cs exceptions.cs: New regression tests.
20232
20233         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
20234         the arch specific code can store data during a compilation.
20235
20236         * mini-ops.h: Add OP_SETFRET.
20237
20238         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
20239         function, register a separate icall for each arity, so the icalls can
20240         get a wrapper.
20241         
20242         * mini.c (mono_print_tree): Print negative offsets in a more readable
20243         form.
20244         
20245         * mini.c: Make signal handling work on sparc.
20246         
20247         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
20248
20249         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
20250
20251         * jit-icalls.c: Emulate truncl by aintl on solaris.
20252
20253         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
20254
20255 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
20256
20257         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
20258
20259 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
20260
20261         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
20262         a MarshalByRef type, inline a method that performs the check, taking into
20263         account that the object can be a proxy. Also implemented tow new opcodes:
20264         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
20265         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
20266         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
20267
20268 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
20269
20270         * mini-ppc.c: if a relative branch displacement is too big
20271         but it points to and area reachable with an absolute branch, 
20272         avoid the thunks.
20273
20274 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
20275
20276         * mini.c: optimize small copies in cpblk.
20277
20278 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
20279
20280         * basic-calls.cs basic-float.cs: New regression tests.
20281
20282         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
20283         negative offsets from %fp. Implement localloc. Fix local register 
20284         allocation. Fix the case when the this argument needs to be saved to
20285         the stack. Implement some missing opcodes.
20286
20287 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
20288
20289         * mini.c (mini_method_compile): Reenable global regalloc in methods
20290         with exception handlers.
20291
20292         * linear-scan.c (mono_varlist_sort): Fix warning.
20293
20294         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
20295
20296         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
20297         regalloc costs.
20298
20299         * liveness.c: Make all variables uses in exception clauses volatile, to
20300         prevent them from being allocated to registers. Fixes #42136.
20301
20302 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
20303
20304         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
20305         causes regressions.
20306
20307         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
20308         argument to mono_arch_regalloc_cost.
20309
20310         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
20311         precisely.
20312
20313 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
20314
20315         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
20316         Make the cost of allocating a variable to a register arch dependent.
20317
20318         * basic-calls.cs: Fix compilation of tests.
20319         
20320         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
20321         helper function to cut back on the number of #ifdefs needed.
20322
20323         * mini-ppc.c: Fix compilation.
20324
20325         * basic-calls.cs: New regression tests.
20326
20327         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
20328
20329         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
20330         of l0 since that is callee saved.
20331
20332         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
20333         to virtual calls.
20334
20335         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
20336         of delay instruction.
20337
20338         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
20339
20340         * mini.h (MonoCallInst): Add 'virtual' flag.
20341
20342         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
20343
20344 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
20345
20346         * *.cs: New regression tests.
20347
20348         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
20349         work.
20350
20351         * mini.c (mono_runtime_install_handlers): Fix build.
20352
20353         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
20354         'signal_stack_size' members.
20355
20356         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
20357         alternate signal stack.
20358
20359         * exceptions-x86.c: Add stack overflow handling.
20360
20361         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
20362         functions to arch independent code.
20363
20364         * mini.c (mono_print_tree): Print more detailed info for load_membase
20365         opcodes.
20366         
20367 2004-02-23  Martin Baulig  <martin@ximian.com>
20368
20369         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
20370
20371 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
20372
20373         * mini-x86.c: fixed reg allocation for div/rem.
20374
20375 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
20376
20377         * driver.c (mono_main): Report some configuratio options on --version.
20378
20379 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
20380
20381         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
20382         low in the address space. Correctly flush memory in thunks where we
20383         output native code.
20384
20385 2004-02-20  Martin Baulig  <martin@ximian.com>
20386
20387         * mini.c (mini_get_method): New static method; inflate all generic
20388         methods and methods in open generic instances.
20389         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
20390         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
20391
20392 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
20393
20394         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
20395
20396         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
20397
20398 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
20399
20400         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
20401
20402         * mini-sparc.c (flushi mono_arch_output_basic_block): make
20403         it compile using Sun's compiler.
20404
20405 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
20406
20407         * 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.
20408
20409         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
20410
20411 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
20412
20413         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
20414         code.
20415         * mini-ppc.c: handle calls outside of the allowed range with thunks
20416         allocated using the code manager.
20417         * tramp-ppc.c: use the code manager to hold generated native code.
20418         Fixed the magic trampoline to just patch vtable entries.
20419
20420 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
20421
20422         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
20423         independent file.
20424
20425 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
20426
20427         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
20428         PPC.
20429
20430         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
20431         if we have a working __thread implementation.
20432
20433         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
20434         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
20435
20436 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
20437
20438         * mini-x86.c: Fix compilation under gcc 2.
20439         
20440 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
20441
20442         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
20443         contains a call to the wrapped function.
20444
20445         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
20446         OP_<CALL>_IMM opcodes, and use them under X86.
20447         
20448         * mini.c (mono_jit_find_compiled_method): Fix warning.
20449
20450         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
20451
20452         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
20453
20454         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
20455         functionality to mini.c.
20456
20457         * mini.c (mono_create_jump_trampoline): New function to create a jump
20458         trampoline. Return a compiled method instead of a trampoline if it
20459         exists. Add a cache for jump trampolines.
20460
20461         * mini.c (mono_jit_find_compiled_method): New function to return a
20462         compiled method if it exists.
20463
20464         * mini-x86.c: Call mono_create_jump_trampoline instead of 
20465         mono_arch_create_jit_trampoline.
20466
20467         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
20468         a jump trampoline. Fixes #52092.
20469         
20470 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
20471
20472         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
20473         which is not up-to-date. Add check_corlib_version () instead.
20474
20475         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
20476         have to call it.
20477         
20478         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
20479         since newer valgrind versions do not need it.
20480
20481         * mini.c (mono_jit_compile_method_with_opt): New helper function to
20482         compile a method with a given set of optimizations.
20483
20484         * mini.c: Compile icall wrappers on-demand instead of at startup.
20485
20486         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
20487         wrapper for an icall.
20488
20489 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
20490
20491         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
20492         #54063.
20493
20494         * iltests.il: Add test for non-empty stack before switch instruction.
20495
20496 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
20497
20498         * mini.c: Add support for new stringbuilder marshalling conventions.
20499
20500         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
20501
20502 2004-02-01  Martin Baulig  <martin@ximian.com>
20503
20504         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
20505         in `ginst->mtype_argv'.
20506
20507 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
20508
20509         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
20510         facilitate grepping.
20511
20512 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
20513
20514         * mini.c: fixed buglet in initobj generic implementation for references.
20515
20516 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
20517
20518         * Makefile.am: make the version script conditional.
20519         * jit-icalls.c: handle missing truncl().
20520
20521 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
20522
20523         * exceptions.cs: Add more tests for double->int conversion.
20524
20525         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
20526         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
20527
20528 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
20529
20530         * driver.c: make --verbose --version emit an error
20531         if the loaded corlib doesn't match the runtime version.
20532
20533 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
20534
20535         * mini-ppc.h: export ppc_patch().
20536         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
20537         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
20538         on par or better than on MacOSX.
20539
20540 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
20541
20542         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
20543         mono_lookup_pinvoke_call.
20544
20545         * mini-x86.c: Under windows, the default pinvoke calling convention is
20546         stdcall. Fixes #52834.
20547
20548         * mini.c (optimize_branches): Add an upper bound to the number of
20549         iterations to prevent infinite loops on strange loops. Fixes #53003.
20550
20551 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
20552
20553         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
20554         and ISINST. Fixes #52093.
20555
20556         * objects.cs (test_0_vector_array_cast): New tests.
20557         
20558 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
20559
20560         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
20561         checking in Array.Set ().
20562
20563         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
20564         #52590.
20565
20566         * object.cs (test_0_multi_array_cast): New regression test.
20567
20568 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
20569
20570         * exceptions-ppc.c: fix build on Linux/PPC.
20571
20572 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
20573
20574         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
20575         running under valgrind.
20576         (x86_magic_trampoline): Fix build bustage.
20577
20578         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
20579         negative values as well. This is needed for the encoding of the line number
20580         info, since sometimes the line numbers are not in increasing order.
20581
20582 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
20583
20584         * cpu-pentium.md (localloc): Increase the size of the localloc 
20585         instruction since it is a loop under Win32.
20586
20587         * debug-mini.c (record_line_number): Get rid of unneccesary memory
20588         allocation.
20589
20590 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
20591
20592         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
20593         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
20594         Max Horn (max@quendi.de). Fix file names in comments.
20595
20596 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
20597
20598         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
20599         avoid stack overflow.
20600         (replace_usage): Avoid uninitialized variable warnings.
20601
20602         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
20603         and taking the address of valuetype variables.
20604
20605 2004-01-03  Patrik Torstensson
20606
20607         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
20608         for other purposes than FP later on.
20609
20610 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
20611
20612         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
20613         of tail calls.
20614
20615 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
20616
20617         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
20618
20619 2003-12-30  Patrik Torstensson <p@rxc.se>
20620
20621         * mini-x86.h: Decreased number of availiable fp regs.
20622         Solves corner cases with FP spilling.
20623
20624 2003-12-23  Patrik Torstensson <p@rxc.se>
20625
20626         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
20627         for floating point stack tracking / spilling on x86. 
20628         Fixes bug #49012.
20629         
20630         * basic-float.cs: added float mul overflow test.
20631
20632 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
20633
20634         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
20635
20636 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
20637
20638         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
20639         supports for cond branches that overflow the immediate
20640         overflow offset. mcs can compile simple programs.
20641
20642 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
20643
20644         * exceptions-ppc.c: exception handling support wip:
20645         finally handlers get run on exception.
20646
20647 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
20648
20649         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
20650         profiling.
20651
20652 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
20653
20654         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
20655         initial support for stack walking and unwinding.
20656
20657 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
20658
20659         * driver.c (mono_main): Make corlib-out-of-sync message more 
20660         descriptive. Also remove verify_corlib call.
20661
20662 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
20663
20664         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
20665         not overlap with other call's arguments, too.
20666
20667 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
20668
20669         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
20670         move to arch-specific code the choice of arch-specific
20671         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
20672         * mini.c: ensure emulation calls will not interleave
20673         with other calls.
20674
20675 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
20676
20677         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
20678         the magic trampoline stack frame is dropped before executing
20679         the new method.
20680
20681 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
20682
20683         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
20684         and integer to fp conversions. Added support for overflowing
20685         arguments on the stack. Reserve a couple more registers as temps.
20686         Added support for aot compilation (as output still needs to be
20687         tweaked, though).
20688
20689 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
20690
20691         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
20692         Don't overwrite return register in some corner cases.
20693
20694 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
20695
20696         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
20697         static constructors when AOT compiling.
20698
20699         * driver.c (mono_main): Call mono_check_corlib_version.
20700
20701 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
20702
20703         * cpu-g4.md, basic.cs: fixed div target register.
20704
20705 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
20706
20707         * mini-ppc.c, basic.cs: shl_imm fix with test.
20708
20709 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
20710
20711         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
20712         structures by value. Misc fixes.
20713         * objects.cs: more tests.
20714
20715 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
20716
20717         * mini-ppc.c: lconv.ovf.i implemented.
20718
20719 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20720
20721         * mini.c:
20722         (mini_init): don't error out if someone already called g_thread_init.
20723
20724 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
20725
20726         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
20727         to be any type per the spec. Fix abnormal memory usage when
20728         the same object is repeatedly thrown.
20729
20730 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
20731
20732         * mini.c: check for overruns in IL code.
20733
20734 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
20735
20736         * TODO: Add/remove some todo entries.
20737
20738 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
20739
20740         * driver.c (mono_main): Call mono_verify_corlib.
20741
20742 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
20743
20744         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
20745         This has been moved to mini.c
20746         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
20747         type being casted is marshalbyref it could be a proxy, so instead of
20748         emitting the type check code, emit a call to a runtime method that will
20749         perform the check by calling CanCastTo if needed.
20750
20751 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
20752
20753         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
20754         methods with large stack frames under Win32.
20755
20756 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
20757
20758         * Makefile.am: Distribute regression tests.
20759
20760         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
20761         at the end instead of inserting each variable into the sorted list.
20762
20763         * linear-scan.c (mono_varlist_sort): New helper function.
20764         
20765 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
20766
20767         * mini.c: ensure arguments and locals are within bounds.
20768
20769 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
20770
20771         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
20772         related fixes.
20773
20774 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
20775
20776         * mini.c (mono_cprop_copy_values): Fix crash.
20777
20778         * aot.c: Set verbosity back to 0.
20779         
20780 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
20781
20782         * regalloc.c: complete memory leak fix by Laurent Morichetti
20783         (l_m@pacbell.net).
20784
20785 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
20786
20787         * driver.c (main_thread_handler): Revert the previous patch.
20788
20789         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
20790         under valgrind.
20791
20792         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
20793         memory from the memory pool.
20794
20795         * driver.c (main_thread_handler): Turn on all optimizations when
20796         --aot is used.
20797
20798         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
20799         an array for better performance.
20800
20801         * regalloc.c (mono_regstate_assign): Fix memory leak.
20802
20803         * debug-mini.c (mono_debug_serialize_debug_info): New function to
20804         serialize the debug info.
20805
20806         * debug-mini.c (mono_debug_add_aot_method): New function to load the
20807         debug info from the serialized representation.
20808
20809         * aot.c: Save debug info into the generated file and load it when 
20810         loading a method.
20811
20812         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
20813
20814 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
20815
20816         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
20817         More FP-related fixes.
20818
20819 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
20820
20821         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
20822         and register allocation buglet. Hello world now runs.
20823
20824 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
20825
20826         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
20827         * tramp-ppc.c: fixed class init trampoline.
20828         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
20829
20830 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
20831
20832         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
20833         mini.c: more ppc changes/fixes.
20834
20835 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
20836
20837         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
20838         Also optimize the case when the arguments are the same in the caller 
20839         and in the callee.
20840
20841         * iltests.il: Add tests for tail calls with valuetype arguments.
20842
20843 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
20844
20845         * mini-ppc.c: fixes for struct return type.
20846
20847 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
20848
20849         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
20850         mono_spillvar_offset() to arch-specific code.
20851
20852 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
20853
20854         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
20855
20856 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
20857
20858         * exceptions-x86.c: Fix stack space leaks.
20859         
20860         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
20861         registers from the lmf if the method has save_lmf set.
20862
20863 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
20864
20865         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
20866         of icall wrappers into InvokeInDomain, since these are now per-domain.
20867
20868 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
20869
20870         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
20871         make some opcode emulation and intrinsic ops enabled/disabled 
20872         according to the architecture. More fixes.
20873
20874 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
20875
20876         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
20877
20878 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
20879
20880         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
20881         arch-specific handling for 'this' and struct return type to
20882         arch-specific code.
20883
20884 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20885
20886         * aot.c: prevent divide by zero error when reporting (it happened with
20887         Accessibility.dll).
20888
20889 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
20890
20891         * mini.h (inst_switch): Remove unused macro.
20892
20893 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20894
20895         * aot.c:
20896         (load_aot_module): free 'info->methods' and 'info' properly. No more
20897         "free(): invalid pointer blah" messages when you have an old aot
20898         compiled assembly.
20899
20900 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
20901
20902         * jit-icalls.c, mini.c: Added support for context static fields.
20903
20904 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
20905
20906         * mini.c (mono_method_blittable): Methods which set LastError are not 
20907         blittable either. Fixes #51108.
20908         
20909 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
20910
20911         * mini.c: flush icache.
20912         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
20913
20914 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
20915
20916         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
20917
20918 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
20919
20920         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
20921         safe on IA32.
20922
20923         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
20924         vararg calls.
20925
20926         * inssel.brg (CEE_MKREFANY): Fix AOT case.
20927
20928 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
20929
20930         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
20931         instruction when the result is discarded.
20932
20933         * iltests.il (test_0_div_regalloc): New regression test.
20934
20935         * arrays.cs: Fix compilation error.
20936
20937 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
20938
20939         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
20940         float rules to inssel-x86.brg: sane architectures with FP registers
20941         don't need to implement these rules.
20942
20943 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
20944
20945         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
20946
20947 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
20948
20949         * mini.h, inssel-long32.brg: fixed endianess issues in int64
20950         implementation of 32 bit systems.
20951
20952 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
20953
20954         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
20955         (Jeroen Zwartepoorte).
20956
20957 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
20958
20959         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
20960         the caller and the callee matches.
20961         
20962         * mini.c (mono_method_to_ir): Add comment.
20963
20964         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
20965         signbit is missing on some platforms.
20966
20967 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
20968
20969         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
20970
20971         * mini.c (setup_jit_tls_data): Call the new function.
20972         
20973         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
20974
20975         * mini-x86.c: Add experimental support for fast access to the lmf
20976         structure under NPTL/Linux 2.6.x.
20977
20978 2003-11-06  Martin Baulig  <martin@ximian.com>
20979
20980         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
20981         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
20982         the debugger.
20983
20984 2003-11-02  Martin Baulig  <martin@ximian.com>
20985
20986         * mini.c (inflate_generic_field): New static method.
20987         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
20988         generic instance and the field is declared in a generic type, call
20989         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
20990
20991 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
20992
20993         * mini.h mini.c (mono_method_same_domain): New function to return
20994         whenever the caller and the callee are in the same domain.
20995
20996         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
20997
20998 2003-10-30  Martin Baulig  <martin@ximian.com>
20999
21000         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
21001         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
21002         method parameters.
21003         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
21004         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
21005
21006 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
21007
21008         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
21009         propagation.
21010
21011         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
21012         object here, so it is in the correct appdomain etc.
21013
21014 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
21015
21016         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
21017         already done.
21018         (mono_method_to_ir): Avoid freeing the type created returned from
21019         mono_type_create_from_typespec, since it is put into an internal cache
21020         by the function. Fixes pointer.exe.
21021
21022         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
21023         trampolines for icalls and pinvokes as well. Fixes #33569.
21024
21025 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
21026
21027         * mini.c: Update after appdomain changes.
21028
21029         * mini.c (mono_jit_compile_method_inner): Allways compile native
21030         method wrappers in the root domain, since there can only be one
21031         instance of them, whose address is stored in method->info.
21032
21033 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
21034
21035         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
21036         environment variable. Instead detect automatically whenever running
21037         under valgrind using the magic macro RUNNING_ON_VALGRIND from
21038         valgrind.h.
21039
21040 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
21041
21042         * trace.c, trace.h: New files that implement the new trace option
21043         parsing. 
21044
21045         * driver.c: Document new --trace options.
21046
21047         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
21048         mini-x86.c: Apply:
21049
21050         -       if (mono_jit_trace_calls)
21051         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
21052
21053         * mini.h: prototypes.
21054         
21055 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
21056
21057         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
21058
21059         * mini.c inssel.brg: Implement typedefbyref opcodes.
21060
21061         * mini.c (mono_jit_compile_method): Remove unused local variable.
21062
21063         * mini.c (mono_jit_compile_method_inner): Ditto.
21064         
21065 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
21066
21067         * tramp-x86.c (x86_class_init_trampoline): Fix build.
21068         
21069         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
21070
21071 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
21072
21073         * mini.c (mono_no_aot): Remove unused global variable.
21074
21075         * mini.c: Thread safety fixes.
21076
21077 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
21078
21079         * mini.c (mono_create_class_init_trampoline): Add a lock around
21080         class_init_hash_addr.
21081
21082         * arrays.cs (test_0_newarr_emulation): Add new regression test for
21083         #30073.
21084
21085         * mini.c: Decompose the NEWARR instruction before decomposing its
21086         arguments. Fixes #30073.
21087
21088 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
21089
21090         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
21091         convention.
21092
21093 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
21094
21095         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
21096
21097         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
21098
21099         * driver.c: Add support for compiling icall wrappers to --compile.
21100
21101 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
21102
21103         * inssel.brg: The empty value in class->interface_offsets is -1, not
21104         0. Fixes #49287.
21105
21106 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
21107
21108         * objects.cs: New test for 'is' operator on an array of interfaces.
21109
21110 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
21111
21112         * tramp-ppc.c: update trampoline code to support jumps
21113         and class initialization.
21114
21115 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
21116
21117         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
21118
21119         * inssel.brg (OP_UNBOXCAST): Fix #46027.
21120
21121         * inssel.brg (OP_UNBOX): Remove unused rule.
21122
21123         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
21124         region instead of one for each method. Fixes #47813.
21125
21126 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
21127
21128         * exceptions.cs (test_0_nested_finally): New regression test for
21129         nested exception handlers.
21130
21131         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
21132
21133         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
21134
21135         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
21136         inlining.
21137
21138         * mini.c (mono_method_check_inlining): Make the inlining limit 
21139         configurable by an environment variable.
21140         
21141         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
21142
21143         * mini.h: Bump AOT file version.
21144
21145         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
21146         token, store the image along with the token, since the token might not 
21147         refer to the same image as the method containing the relocation, 
21148         because of inlining.
21149
21150 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
21151
21152         * mini.c (mono_precompile_assemblies): New function to compile
21153         all methods in all loaded assemblies.
21154
21155         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
21156
21157         * regalloc.h regalloc.c (MonoRegState): Change the type of 
21158         iassign and fassign to int*, since they can contain large negative
21159         values if the register is spilled. Also added some comments. Fixes
21160         #45817.
21161
21162         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
21163         under Win32. Fixes #42964.
21164
21165 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
21166
21167         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
21168
21169         * aot.c: Added support for AOT compiling methods which contain calls
21170         to wrappers. Currently, only remoting-invoke-with-check wrappers are
21171         handled.
21172         
21173         * driver.c (compile_all_methods): Run the compilation in a thread
21174         managed by mono. Fixes #44023.
21175
21176         * mini.c (mono_codegen): Print full method name in verbose output.
21177
21178         * mini-x86.c (mono_arch_patch_code): Fix warning.
21179         
21180         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
21181         jumps, since the method we are jumping to might be domain-specific.
21182
21183         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
21184
21185 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
21186
21187         * inssel.brg: string chars are unsigned.
21188
21189 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
21190
21191         * TODO: New todo item.
21192
21193         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
21194         which calls mono_runtime_class_init and patches the call site to
21195         avoid further calls.
21196         (mono_arch_create_class_init_trampoline): New arch specific function 
21197         to create a class init trampoline.
21198         (create_trampoline_code): Generalized so it can create
21199         class init trampolines as well.
21200
21201         * mini.c (helper_sig_class_init_trampoline): New helper variable.
21202         (mono_create_class_init_trampoline): New function to create and cache
21203         class init trampolines.
21204         (mono_find_class_init_trampoline_by_addr): New function to lookup the
21205         vtable given the address of a class init trampoline. Used by the
21206         patching process.
21207         (mono_codegen): Generate a call to a trampoline instead of
21208         mono_runtime_class_init in LDSFLD[A].
21209         (mono_codegen): Add relocations for the new trampoline.
21210         
21211         * mini.h mini-x86.c aot.c: Added a new relocation type: 
21212         MONO_PATCH_INFO_CLASS_INIT.
21213
21214         * mini.h: Bump AOT version number.
21215
21216         * aot.c: Create a copy of the loaded code instead of using the original
21217         so methods which call each other will be close in memory, improving
21218         cache behaviour.
21219         
21220         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
21221         patch since it breaks the regression tests.
21222         
21223         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
21224         for the register saving instruction sequence since the 
21225         frame_state_for function in glibc 2.3.2 don't seem to detect it.
21226
21227 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
21228
21229         * TODO: Fix todo item && remove another.
21230
21231 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
21232
21233         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
21234         previous checkin.
21235
21236         * aot.c: Moved the check for MONO_LASTAOT into the initialization
21237         function of the module.
21238
21239         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
21240         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
21241         --no-aot command line option.
21242
21243 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
21244
21245         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
21246         by Bernie Solomon (bernard@ugsolutions.com).
21247
21248         * inssel.brg: Refactor the interface offset table related code into
21249         its separate functions and add support for the AOT case.
21250
21251 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
21252
21253         * aot.c (mono_aot_get_method_inner): Fix memory leak.
21254         
21255         * aot.c: Added mono_aot_verbose variable and made all debugging
21256         output depend on the value of this variable.
21257
21258         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
21259         method_label and info_label.
21260
21261         * mini.h mini-x86.c aot.c: Added a new relocation type 
21262         MONO_PATCH_INFO_IID for klass->interface_id.
21263
21264         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
21265         the MonoJitInfo structure.
21266
21267         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
21268         a non-root appdomain in shared mode.
21269
21270 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
21271
21272         * aot.c: make aot loader less verbose. Remove free of unused variable.
21273
21274 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
21275
21276         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
21277
21278         * .cvsignore: Added *.dll.
21279
21280         * mini.c (mono_print_tree_nl): New function callable while debugging.
21281
21282         * mini.c (mono_print_code): Export this.
21283
21284         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
21285         patched code.
21286
21287 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
21288
21289         * mini.h (MonoCompile): Added 'jit_info' field.
21290
21291         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
21292         the cfg structure, since it is needed by the AOT compiler.
21293
21294         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
21295
21296         * aot.c: A major rewrite. Changes include:
21297         - save exception tables for methods which have them.
21298         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
21299         to g_module_symbol.
21300         - reworked the file format so it is now much smaller and needs
21301         fewer relocation entries.
21302         
21303 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
21304
21305         * aot.c (load_aot_module): Fix build bustage on platforms without
21306         Boehm GC.
21307
21308 2003-09-04  Martin Baulig  <martin@ximian.com>
21309
21310         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
21311
21312 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
21313
21314         * TODO: Some new optimization ideas.
21315
21316         * aot.c: Move AOT module loading logic here from mono_assembly_open.
21317
21318         * aot.c: Save the optimization flags used to compile the code into
21319         the AOT module.
21320
21321         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
21322         support emitting domain specific code.
21323         
21324         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
21325         no longer domain neutral. It can be made domain neutral by compiling 
21326         with --optimize=shared.
21327
21328         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
21329         between appdomains.
21330
21331         * driver.c mini.h mini.c: New --no-aot debugging option which disables
21332         loading of AOT code.
21333
21334         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
21335         
21336         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
21337         if there is no domain neutrality information.
21338
21339 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
21340
21341         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
21342         format version into the generated library.
21343
21344         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
21345         callee method into the caller since one of them could be shared.
21346
21347         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
21348         system exceptions from AOT code now works.
21349
21350         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
21351         method if it is domain neutral and the callee is not.
21352
21353         * graph.c (cfg_emit_one_loop_level): Fix warning.
21354
21355 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
21356
21357         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
21358         last checkin.
21359
21360 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
21361
21362         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
21363         is needed  by code which is executed before mono_runtime_init ().
21364         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
21365         
21366         * mini.c (mono_thread_abort): Fix warning.
21367         (mono_jit_compile_method): Call static constructor in the AOT case too.
21368
21369         * aot.c (mono_compile_assembly): Fix warning.
21370
21371 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21372
21373         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
21374
21375 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
21376
21377         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
21378
21379         * cpu-pentium.md: Fix the length of call opcodes so they include the
21380         ESP restoring instruction. Fixes #47968.
21381
21382 2003-08-28  Martin Baulig  <martin@ximian.com>
21383
21384         * mini-x86.c (mono_arch_call_opcode): Added support for
21385         MONO_TYPE_GENERICINST.
21386
21387         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
21388
21389 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
21390
21391         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
21392         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
21393
21394         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
21395         metadata_section.
21396
21397 2003-08-26  Martin Baulig  <martin@ximian.com>
21398
21399         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
21400         when reporting an error, set this to the actual error location.
21401         (mono_method_to_ir): Report the correct error location if
21402         get_basic_blocks() returned an error.
21403
21404 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
21405
21406         * mini.c (mono_type_blittable): OBJECT is not blittable.
21407         (mono_method_blittable): Methods which have marshalling descriptors
21408         are not blittable either. Fixes #47842.
21409
21410 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
21411
21412         * driver.c mini.c: Use an environment variable instead of a global 
21413         variable. Also fix the build.
21414
21415         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
21416         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
21417         reporting this. 
21418
21419         * driver.c mini.c: Added --with-valgrind option to turn off some
21420         code which prevents mono from running under valgrind.
21421
21422         * mini.c (mono_emit_call_args): Fixed warning.
21423
21424         * mini.c (mono_emulate_opcode): Fixed warning.
21425
21426 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
21427
21428         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
21429         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
21430         regalloc.c, regalloc.h: specify available registers in arch-specific
21431         code and support floats in the regallocator (patch by Laurent Morichetti 
21432         <l_m@pacbell.net>)
21433
21434 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
21435
21436         * mini.c: mono_thread_current() can be called only after
21437         mono_runtime_init(): rearrange code to not call it early on.
21438
21439 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
21440
21441         * mini.c: allocate jump tables in the code mempools.
21442
21443 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
21444
21445         * mini.c, mini.h: make sure per-thread data allocated by the jit is
21446         freed.
21447
21448 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
21449
21450         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
21451         12 to 16.  This fixes bug #47453.
21452
21453
21454 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
21455
21456         * mini-ppc.c: fixed indexed load and unsigned compares.
21457
21458 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
21459
21460         * mini.c: reenabled installation of handler for
21461           thread abort signal.
21462
21463 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
21464
21465         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
21466         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
21467         until it's fixed and actually useful.
21468
21469 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
21470
21471         * inssel-long32.brg: couple more opcodes implemented.
21472
21473 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
21474         
21475         * mini-sparc.c: Even more opcodes implemeted.
21476
21477 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
21478
21479         * mini-sparc.c: More opcodes implemented.
21480
21481 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
21482
21483         * mini-sparc.c: More opcodes implemented.
21484
21485 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
21486
21487         * inssel-sparc.brg: Add some needed rules.  Direct
21488         copy from PPC.
21489         * Makefile.am: Use inssel-sparc.brg
21490         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
21491         an assert happy for now.
21492
21493 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
21494
21495         * mini-sparc.c: Fixed compile errors.
21496         * exceptions-sparc.c: Same.  We now produce a mono binary 
21497         on sparc-linux.  Yea.
21498
21499 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
21500
21501         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
21502         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
21503         They compile, but do not work.
21504
21505 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
21506
21507         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
21508         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
21509         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
21510         (ct@gentoo.org).
21511
21512 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
21513
21514         * mini.c: more opcodes implemented and better support for generics.
21515
21516 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
21517
21518         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
21519         * mini.c, mini.h: first cut at generics support: some new instructions 
21520         added and changed the behaviour of some of the existing ones.
21521
21522 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
21523
21524         * mini.c: Removed definition of metadata_shared mutex here.
21525
21526 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
21527
21528         * mini-x86.c: make vararg calls work for instance methods.
21529
21530 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
21531
21532         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
21533         returns the arguments in a separte list, now.
21534
21535 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
21536
21537         * aot.c, mini.c: updates for array type representation changes.
21538
21539 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
21540
21541         * mini.c: register function to perform jit shutdown.
21542
21543 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
21544
21545         * mini.c: use a faster allocator if possible.
21546
21547 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
21548
21549         * aot.c: some cleanups and portability changes.
21550
21551 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
21552
21553         * mini.c: use faster allocation for CEE_BOX if possible.
21554
21555 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
21556
21557         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
21558         Moved inlined mempcy code to its own function so that is can be
21559         reused. Added an inline memset function as well (optimized initobj).
21560         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
21561
21562 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
21563
21564         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
21565
21566 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
21567
21568         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
21569         arch code can setup the cpu for CLR execution, if needed.
21570         We use it on x86 to set the precision of FP operations.
21571
21572 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
21573
21574         * mini.c: disable some optimizations if we can guess they'll cost too
21575         much for a given method.
21576
21577 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
21578
21579         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
21580         
21581 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
21582         * mini.h mini.c mini-x86.c: Added instruction level coverage 
21583         info collection support.
21584
21585 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
21586
21587         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
21588         is now implemented in the profiling API. Get rid of a couple of
21589         unnecessary global variables.
21590
21591 2003-06-15  Nick Drochak <ndrochak@gol.com>
21592
21593         * basic-long.cs: tests for negative values for bigmul, and unsigned.
21594         * cpu-g4.md: add op_bigmul and op_bigmul_un
21595         * cpu_pentium.md: add op_bigmul_un
21596         * inssel-long32.brg: add rule for unsigned bigmul
21597         * mini-ops.h: define OP_BIGMUL_UN
21598         * mini-x86.c: THE BUG: handle (un)signed properly
21599         * mini.c: choose unsigned opcode if needed.
21600         This set of patches fixes bug #44291
21601
21602 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
21603
21604         * mini.c (optimize_branches): improved to handle all kinds of
21605         conditional branches.
21606
21607 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
21608
21609         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
21610         don't raise exceptions.
21611
21612 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
21613
21614         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
21615         to arch-specific files.
21616
21617 2003-06-09  Martin Baulig  <martin@ximian.com>
21618
21619         * Makefile.am (libs): Added $(LIBGC_LIBS).
21620
21621 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
21622
21623         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
21624         and OP_ATAN (fixes bug#44293).
21625
21626 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
21627
21628         * Makefile.am, mini-x86.c: rename cpu description array to
21629         pentium_desc, since some compilers define the 'pentium' preprocessor
21630         symbol.
21631
21632 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
21633
21634         * mini.c (mini_select_instructions): add explicit branch if the
21635         following block is not the false target of a conditional branch -
21636         we need this with any optimization that reorder or remove bblocks
21637
21638         * mini.c (optimize_branches): bug fixes
21639
21640 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
21641
21642         * mini.c (mono_method_to_ir): inline static readonly fields
21643
21644         * ssa.c (fold_tree): start cfold support for long (very simple
21645         cases only)
21646
21647         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
21648
21649 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
21650
21651         * inssel.brg: fixed memcpy (bug #44219).
21652
21653 2003-06-05  Dick Porter  <dick@ximian.com>
21654
21655         * driver.c: Set the glib log levels to not abort if g_message
21656         recurses.
21657
21658         g_set_prgname() has to happen before mini_init() so that the
21659         process handle gets the info.
21660         
21661 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
21662
21663         * driver.c: add intrins to the default optimizations to get wider
21664         exposure.
21665
21666 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
21667
21668         * mini.h: some large basic blocks will overflow a 16-bit
21669         integers for symbolic registers.
21670
21671 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
21672
21673         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
21674         (mono_arch_output_basic_block): fix bug 43499 
21675
21676 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
21677
21678         * mini.c: kill duplicated definition of mono_debug_format.
21679
21680 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
21681
21682         * mini-x86.c, arrays.cs: fixed register allocation bug.
21683
21684 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
21685
21686         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
21687
21688         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
21689
21690 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21691
21692         * mini.c:
21693         (print_method_from_ip): also print source location information if
21694         available.
21695
21696 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
21697
21698         * mini.c (mono_find_block_region): bug fix in region code
21699         (mini_method_compile): enable removing unreachable code again, but
21700         only in methods without exception clauses.
21701
21702 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
21703
21704         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
21705         Implemented arglist opcode and handling of TypedReference type.
21706         Fixed x86 call convention when a structure is returned.
21707         Minimal support for calling static vararg methods.
21708
21709 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
21710
21711         * mini.c (mini_method_compile):  always remove unreachable code,
21712         because the code in them may be inconsistent  (access to dead
21713         variables for example).
21714
21715 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
21716
21717         * driver.c, debug-mini.c: warning fixes.
21718
21719 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
21720
21721         * Makefile.am, jit.h, mini.h: install header for embedding mono.
21722
21723 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
21724
21725         * mini.c: thread-static fields are registered in mono_class_vtable(),
21726         so ensure the function is called before checking for them.
21727
21728 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
21729
21730         * mini.c (optimize_branches): fix for bug 43586
21731
21732         * jit-icalls.c (mono_llmult_ovf): added an additional check for
21733         overflow (fixes Bug #43639)
21734
21735 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
21736
21737         * mini.c, objects.cs: allow the use of stobj for primitive types.
21738
21739 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
21740
21741         * mini.c: be less strict about argument checking until we support
21742         running the verifier.
21743
21744 2003-05-27  Nick Drochak <ndrochak@gol.com>
21745
21746         * basic-long.cs: tests for (ulong)int * (ulong)int also
21747         * mini.c: use the same trick for (ulong)int * (ulong)int
21748
21749 2003-05-27  Nick Drochak <ndrochak@gol.com>
21750
21751         * basic-long.cs: add regression test for (long)int * (long)int
21752         * cpu-pentium.md: add op_bigmul specification
21753         * inssel-long32.brg: add OP_BIGMUL rule
21754         * mini-ops.h: add OP_BIGMUL
21755         * mini-x86.c: register allocator: handle case where src1 needs to be
21756         in EAX.
21757         * mini.c: substitute special BIGMUL opcode in the tree for 
21758         (long)int * (long)int
21759
21760 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
21761
21762         * jit-icalls.c: call the type ctor on field access if needed.
21763
21764 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
21765
21766         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
21767         to a method (including results of ldelema, bug#43207).
21768
21769 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
21770
21771         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
21772         colors to show exception handler blocks.
21773
21774         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
21775         (fix for pinvoke7.cs).
21776
21777 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
21778
21779         * mini.h, mini.c: ensure correct initialization order for types that
21780         require it. Prepare for lazy compilation of jit icall wrappers.
21781         Provide a name for opcode emulation to reduce unneeded mallocing.
21782
21783 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
21784
21785         * mini-x86.c: better register restoring code and profiling
21786         support for tail calls.
21787
21788 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
21789
21790         * mini.h, driver.c: prepare for leaf methods optimization.
21791
21792 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
21793
21794         * mini.c: get targets of branches before converting a method.
21795
21796 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
21797
21798         * mini.c (optimize_branches): added some experimental code (disbaled) 
21799
21800 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
21801
21802         * mini.c (optimize_branches): fix branch to branch optimization 
21803
21804         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
21805
21806         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
21807
21808         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
21809
21810         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
21811         if needed.
21812
21813 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
21814
21815         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
21816         enable use of interface variables again.
21817
21818         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
21819         I1 to registers because there is no simply way to sign extend 8bit
21820         quantities in caller saved registers on x86.
21821
21822         * inssel-float.brg: set costs of some rules to 2 so
21823         that monobure always select the arch. specific ones if supplied,
21824         regardless of the order we pass the files to monoburg.
21825
21826 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
21827
21828         * mini.c, mini-x86.c: since the magic trampoline for jumps
21829         can't patch the code directly, we do it as soon as the
21830         method gets compiled.
21831
21832 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
21833
21834         * mini-x86.c, mini.h: introduce a new patching method
21835         to support CEE_JMP and tail calls.
21836         * mini.c: obey tail.call. Don't precompile methods target
21837         of CEE_JMP.
21838         * tramp-x86.c: new trampoline code to handle methods
21839         reached through a jump.
21840
21841 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
21842
21843         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
21844         bit values to registers
21845
21846 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
21847
21848         * mini.c (mono_compile_get_interface_var): share interface
21849         variables if possible.
21850
21851 2003-05-16  Martin Baulig  <martin@ximian.com>
21852
21853         * debug-mini.c (mono_init_debugger): New function to initialize
21854         the debugger.  This is not in the debugger since it needs to
21855         access some of mini's internals.
21856
21857 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
21858
21859         * mini.c (mono_method_to_ir): inlining fixes/cleanups
21860
21861 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
21862
21863         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
21864         for value type handling.
21865
21866 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
21867
21868         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
21869         (mono_method_check_inlining): enable inlining of all kinds of wrappers
21870
21871 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
21872
21873         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
21874           the constructor through a proxy.
21875
21876 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
21877
21878         * jit-icalls.c, inssel.brg: fixes to array element address
21879         calculations.
21880
21881 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
21882
21883         * mini-x86.c (is_regsize_var): allocate pointer to registers
21884
21885 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
21886
21887         * driver.c: fixed typo, added intrins to the set of optimizations
21888         tested with regressions.
21889
21890 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
21891
21892         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
21893         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
21894         test case.
21895
21896 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
21897
21898         * inssel.brg: remove some common pop instructions without side effects
21899
21900 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
21901
21902         * inssel-x86.brg: fixed thinko in int to double conversions.
21903
21904 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
21905
21906         * mini.c, jit-icalls.c: added runtime thread-static variable support.
21907
21908 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
21909
21910         * inssel-long32.brg: two more missing instructions.
21911
21912 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
21913
21914         * mini.c (mono_emit_call_args): set the cil_code for all arguments
21915         if not already set.
21916
21917 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
21918
21919         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
21920         correctly.
21921
21922         * basic-float.cs: Added tests for negative zero.
21923
21924 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
21925
21926         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
21927         a couple of missing operations for long casts, with test cases.
21928
21929 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21930
21931         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
21932
21933 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
21934
21935         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
21936         code size estimation.
21937
21938 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
21939
21940         * mini.c (mono_jit_create_remoting_trampoline): make it work with
21941         abstract methods (fix bug 42542)
21942
21943         * aot.c: add ability to handle array types
21944         
21945 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
21946
21947         * mini.c: Call the _specific versions of the object allocation
21948         functions if possible.
21949
21950 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
21951
21952         * driver.c: call setlocale ().
21953
21954 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
21955
21956         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
21957         windows build.
21958
21959 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
21960
21961         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
21962
21963         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
21964         wrappers (fix bug 42122)
21965
21966 2003-05-04  Martin Baulig  <martin@ximian.com>
21967
21968         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
21969
21970         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
21971         s/mini_set_defaults/mono_set_defaults/g.
21972
21973 2003-05-04  Martin Baulig  <martin@ximian.com>
21974
21975         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
21976
21977 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
21978
21979         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
21980         (reported by Don Roberts).
21981
21982 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
21983
21984         * mini.c: temporarily work around two bugs for this release.
21985
21986 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
21987
21988         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
21989         that contains -export-dynamic and it makes using the ld script
21990         useless.
21991         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
21992
21993 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
21994
21995         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
21996         specific cpu.
21997
21998 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
21999
22000         * mini.c: make sure leave calls all the needed finally blocks,
22001         even when the target jumps out of multiple exception clauses.
22002
22003 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
22004
22005         * ldscript, Makefile.am: add linker script to reduce the number of
22006         exported symbols (should also fix the issues with libwine defining
22007         some of the same symbols in io-layer).
22008
22009 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
22010
22011         * driver.c (mini_main): Avoid assertion when no file name is given on 
22012         the command line.
22013
22014 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
22015
22016         * driver.c: added --version/-V command line option.
22017         Added the inline optimization in the regression tests.
22018
22019 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
22020
22021         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
22022         to the type in the method signature (fixes bug#42134).
22023
22024 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
22025
22026         * mini.c: when inlining, check this is not null only when needed (bug #42135).
22027
22028 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
22029
22030         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
22031
22032 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22033
22034         * driver.c: fixed bug #42100.
22035
22036 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
22037
22038         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
22039
22040 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
22041
22042         * mini.c: moved most of the code required to do inlining to its own
22043         function so it can be reused. Inline also ctors if appropriate.
22044
22045 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
22046
22047         * Makefile.am: Link with -export-dynamic so shared libs loaded by
22048         the runtime can call mono API functions.
22049
22050 2003-04-27  Martin Baulig  <martin@ximian.com>
22051
22052         * debug-mini.c (mono_debug_init_method): Added
22053         `guint32 breakpoint_id' argument; if the method has a breakpoint,
22054         send a notification to the debugger.
22055
22056         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
22057         running in the Mono Debugger, just pass the breakpoint number to
22058         mono_debug_init_method().
22059
22060         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
22061
22062 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
22063
22064         * mini.c: allow some more unsafe compares.
22065
22066 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
22067
22068         * mini-x86.c, Makefile.am: make distcheck works (partially from
22069         a patch by Richard Lee <r.h.lee@attbi.com>).
22070         * regset.c, regset.h: removed, they are unused.
22071
22072 2003-04-25  Dick Porter  <dick@ximian.com>
22073
22074         * driver.c: Usage reports the name as 'mono' not 'mini'
22075         * exceptions-x86.c: Build and run on freebsd
22076
22077 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
22078
22079         * Makefile.am: install the program with the 'mono' name and
22080         the library as libmono instead of mini and libmini.
22081
22082 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
22083
22084         * driver.c: provide the APIs for the embedding interface of the old jit.
22085
22086 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
22087
22088         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
22089
22090 2003-04-23  Martin Baulig  <martin@ximian.com>
22091
22092         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
22093
22094         * driver.c: Added `--debug' command line argument to enable
22095         debugging support.
22096
22097 2003-04-23  Martin Baulig  <martin@ximian.com>
22098
22099         * debug.[ch]: Removed.  The code is now in
22100         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
22101
22102         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
22103         last six months.
22104
22105 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
22106
22107         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
22108
22109 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22110
22111         * mini.c:
22112         (mini_cleanup): moved mono_runtime_cleanup call after the call to
22113         mono_domain_finalize.
22114         (mini_method_compile): use mono_method_profile* if the the option is
22115         enabled.
22116
22117 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
22118
22119         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
22120         methods with their wrapper.
22121
22122         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
22123         methods with their wrapper.
22124
22125         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
22126         their wrapper.
22127
22128         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
22129         wrapper.
22130
22131         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
22132         methods.
22133
22134 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
22135
22136         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
22137
22138 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
22139
22140         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
22141         of the mempool. This is slightly faster and uses less memory
22142
22143 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
22144
22145         * mini.c: avoid O(n) allocation for variables.
22146
22147 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
22148
22149         * mini.c: handle items on the stack after inlining methods.
22150
22151 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
22152
22153         * mini.c: make the method->opcode optimization dependent
22154         on MONO_OPT_INSTRINS and do it lazily.
22155
22156 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
22157
22158         * driver.c: print overall results at the end of regression run.
22159
22160 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
22161
22162         * inssel.brg: don't overwrite symbolic registers.
22163
22164 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
22165
22166         * inssel-x86.brg: fix conversion from long to float.
22167
22168 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
22169
22170         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
22171
22172 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
22173
22174         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
22175
22176         * driver.c: Added --print-vtable option as in the old JIT.
22177
22178 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
22179
22180         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
22181
22182 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
22183
22184         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
22185
22186 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
22187
22188         * mini.c regalloc.c regalloc.h: Fix memory leak.
22189
22190 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
22191
22192         * aot.c (mono_aot_get_method): register all used strings
22193
22194 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
22195
22196         * mini.c: always intern strings references with ldstr at compile time.
22197
22198 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
22199
22200         * Makefile.am: add BUILT_SOURCES.
22201
22202 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
22203
22204         * driver.c: give a better error message when the assembly to execute
22205         doesn't have an entry point.
22206
22207 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
22208
22209         * Makefile.am: added hack for automake
22210
22211         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
22212         correct sematics.
22213
22214         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
22215
22216 22003-04-07  Martin Baulig  <martin@ximian.com>
22217
22218         * Makefile.am: Added Makefile.am.
22219
22220         * debugger-main.c: Removed, this is now in the debugger where it
22221         belongs.
22222
22223         * mini.pc.in: Call this package `mini' for the moment.
22224
22225
22226
22227
22228
22229
22230
22231
22232
22233
22234
22235
22236
22237
22238