2009-10-29 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / ChangeLog
1 2009-10-29  Zoltan Varga  <vargaz@gmail.com>
2
3         * mini-x86.c (mono_arch_output_basic_block): Fix % 1. Fixes #550970.
4
5         * basic.cs: Add a test.
6
7         * method-to-ir.c (mono_method_to_ir): Use EMIT_NEW_LOAD_MEMBASE_TYPE to
8         load vtypes instead if OP_LOADV_MEMBASE in the implementation of
9         CONSTRAINED. Fixes #550964.
10
11         * generics.cs: Add a test.
12
13 2009-10-28  Mark Probst  <mark.probst@gmail.com>
14
15         * mini-posix.c (add_signal_handler): Use
16         mono_gc_get_suspend_signal() instead of GC_get_suspend_signal().
17
18 2009-10-28 Jerry Maine <crashfourit@gmail.com>
19
20         Contributed under the terms of the MIT/X11 license by
21         Jerry Maine <crashfourit@gail.com>.
22
23         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions): Added code to detect
24         sse4a for simd intrinsics.
25
26         * mini-amd64.c (mono_arch_cpu_enumerate_simd_versions): Added code to detect
27         sse4a for simd intrinsics.
28
29 2009-10-27  Zoltan Varga  <vargaz@gmail.com>
30
31         * ir-emit.h method-to-ir.c: Change a few _IMM macros to assign to inst_imm
32         instead of inst_p1 which is not the same on ILP32 platforms.
33
34 2009-10-24  Zoltan Varga  <vargaz@gmail.com>
35
36         * mini-ppc.c (mono_arch_emit_prolog): Load the current got address,
37         not the mscorlib one before calling mono_get_lmf_addr.
38
39         * tramp-ppc.c (mono_arch_create_trampoline_code_full): Fix the storing
40         of the ip to the LMF.
41
42         * method-to-ir.c (mono_method_to_ir): Fix the handling of the
43         immediate in the op->op_imm optimization.
44
45         * mini-ppc.c: Add a 'vtregs' field to ArgInfo to make the code easier to
46         understand. VTypes now work, but are not abi compliant, as they are
47         split into 4 byte parts instead of 8.
48         (emit_memcpy): Fix the unrolled case to work on the PS3.
49
50         * mini-ppc.c (get_delegate_invoke_impl): Fix this for the PS3.
51
52         * aot-compiler.c (mono_compile_assembly): Make the autoreg option
53         the default when static linking.
54
55         * mini-ppc.c (mono_arch_emit_prolog): Fix handling of I8 arguments.
56
57         * aot-compiler.c: Add an autoreg option to automatically register
58         statically linked aot modules using ELF .ctors.
59
60         * genmdesc.pl: Add __ppc64__ to allowed defines.
61
62 2009-10-25  Zoltan Varga  <vargaz@gmail.com>
63
64         * mini-posix.c (add_signal_handler): Delay the GC suspend signal while
65         executing a SIGSEGV handler on an altstack, since libgc can't handle that.
66
67 2009-10-24  Mark Probst  <mark.probst@gmail.com>
68
69         * exceptions-x86.c (mono_arch_find_jit_info): Fix build.
70
71 2009-10-24  Zoltan Varga  <vargaz@gmail.com>
72
73         * mini-exceptions.c (mini_jit_info_table_find): Add an 'out_domain' argument
74         which will contain the domain where the method was found.
75
76         * exceptions-<ARCH>.c mini-exceptions.c: Update callers of
77         mini_jit_info_table_find ().
78
79         * aot-compiler.c (xdebug_end_emit): Remove so stray debug code.
80
81         * branch-opts.c (mono_if_conversion): Avoid running deadce if it is disabled.
82
83 2009-10-22  Zoltan Varga  <vargaz@gmail.com>
84
85         * mini-x86.c (mono_arch_emit_prolog): Disable aot for methods with save_lmf
86         set, its not supported yet.
87
88 2009-10-22  Zoltan Varga  <vargaz@gmail.com>
89
90         * aot-runtime.c (mono_aot_get_method): Avoid asserting if a array generic
91         iface wrapper is not found.
92         (mono_aot_get_method): Ditto for GetGenericValueImpl.
93
94 2009-10-21  Zoltan Varga  <vargaz@gmail.com>
95
96         * aot-runtime.c (mono_aot_get_method): Fix support for the IList<T> wrappers,
97         which have a different name.
98
99         * aot-runtime.c (mono_aot_get_method): Special case the array generic iface
100         wrappers and Array.GetGenericValueImpl ().
101
102         * aot-compiler.c: Avoid emitting some wrappers which are not needed anymore
103         because of the change above.
104
105         * generics.cs: Add a test for full aot + generic array ifaces.
106
107 2009-10-19  Sebastien Pouliot  <sebastien@ximian.com>
108
109         * aot-compiler.c (emit_plt): Remove duplicate 'debug_sym' variable 
110         that hides the previous one.
111
112 2009-10-18  Zoltan Varga  <vargaz@gmail.com>
113
114         * aot-compiler.c (can_marshal_struct): Allow some System.dll structs to be
115         marshalled. Fixes #541623.
116
117 2009-10-16  Zoltan Varga  <vargaz@gmail.com>
118
119         * aot-compiler.c (emit_extra_methods): Remove some asserts which are not needed.
120
121 2009-10-15  Zoltan Varga  <vargaz@gmail.com>
122
123         * mini.c (mono_op_imm_to_op): Handle OP_AND/OR/XOR_IMM.
124
125 2009-10-14  Massimiliano Mantione  <massi@ximian.com>
126
127         * mini-posix.c (sigprof_signal_handler):
128         Implemented support for building stat call chans in different ways.
129
130 2009-10-14  Massimiliano Mantione  <massi@ximian.com>
131
132         * mini-exceptions.c (mono_find_jit_info):
133         Also check that a jit info has been found (fixes a profiler crash).
134
135 2009-10-14  Massimiliano Mantione  <massi@ximian.com>
136
137         * mini.c (mono_codegen):
138         Call mono_profiler_code_buffer_new with correct code address.
139
140 2009-10-14  Zoltan Varga  <vargaz@gmail.com>
141
142         * driver.c (mono_main): Change the date in the copyright.
143
144 2009-10-14  Mark Probst  <mark.probst@gmail.com>
145
146         * method-to-ir.c (mono_method_to_ir): Don't use a managed array
147         allocator in shared generic code for open classes, because we
148         can't get those classes' vtables.  We need to make managed
149         allocators not depend on the vtable at compile-time to solve this.
150
151 2009-10-13  Martin Baulig  <martin@ximian.com>
152
153         * debug-mini.c (mono_debugger_trampoline_compiled): Add
154         `const guint8 *trampoline' argument; send both the old and the new
155         notification.
156
157 2009-09-30  Zoltan Varga  <vargaz@gmail.com>
158
159         * aot-compiler.c (add_wrappers): Add a runtime invoke wrapper which is used by
160         mono_runtime_capture_context () without calling mono_runtime_invoke ().
161         (can_marshal_struct): Skip structures with auto layout.
162
163         * tramp-arm.c (GEN_TRAMP_SIZE): Increase this by 4.
164
165 2009-10-02  Zoltan Varga  <vargaz@gmail.com>
166
167         * mini-sparc.c (mono_arch_emit_setret): Emit long return values using OP_LMOVE.
168         (mono_arch_create_vars): Instead of allocating a stack slot by hand, allocate
169         a variable to hold the stack slot used by the int<->float conversion opcodes.
170
171         * mini-sparc.c (mono_arch_build_imt_thunk): Implement support for fail_tramp.
172
173 2009-10-04  Zoltan Varga  <vargaz@gmail.com>
174
175         * aot-compiler.c (add_generic_class): Only add GetGenericValueImpl wrappers
176         when using full-aot.
177
178 2009-10-06  Zoltan Varga  <vargaz@gmail.com>
179
180         * aot-compiler.c (add_generic_class): Add an instance of GenericComparer<T> for
181         each instance of Comparer<T>.
182
183         * generics.cs: Add a new test.
184
185 2009-10-09  Zoltan Varga  <vargaz@gmail.com>
186
187         * driver.c (parse_debug_options): Add a 'gdb' option.
188
189         * mini.c (mini_parse_debug_options): Add a 'gdb' option.
190
191         * image-writer.c: Add support for emitting the image into a memory buffer.
192
193         * dwarfwriter.c: Add support for sharing one IL file between multiple images.
194
195         * aot-compiler.c: Add support for registering debug info with GDB using the
196         new JIT debugging interface in GDB 7.0. It can be turned on by setting
197         MONO_XDEBUG to 'gdb'.
198
199 2009-10-10  Zoltan Varga  <vargaz@gmail.com>
200
201         * aot-compiler.c (mono_save_trampoline_xdebug_info): Implement this for the
202         gdb mode.
203
204 2009-10-11  Zoltan Varga  <vargaz@gmail.com>
205
206         * aot-compiler.c (mono_save_xdebug_info): Emit a symbol for the method which
207         can be used to set breakpoints in gdb.
208
209         * image-writer.c (bin_writer_emit_writeout): Add support for setting the text
210         segment to an absolute address.
211
212 2009-10-13  Mark Probst  <mark.probst@gmail.com>
213
214         * method-to-ir.c: Use the managed array allocator method if
215         available.
216
217 2009-10-13  Bill Holmes  <billholmes54@gmail.com>
218
219         * aot-compiler.c : Fix the MSVC builds
220
221         Code is contributed under MIT/X11 license.
222
223 2009-10-13  Zoltan Varga  <vargaz@gmail.com>
224
225         * aot-compiler.c (mono_save_xdebug_info): Group methods into groups of 10 to
226         avoid registering 1 symbol file per method with gdb.
227
228 2009-09-29  Zoltan Varga  <vargaz@gmail.com>
229
230         * mini-sparc.c: Fix the handling of enums with base type long.
231
232         * mini-sparc.c (mono_arch_output_basic_block): Fix IREM_UN_IMM.
233
234         * mini-sparc.c (mono_arch_allocate_vars): Use mono_class_from_mono_type ()
235         instead of using type->data.klass as the later doesn't work with generics.
236
237 2009-09-25  Mark Probst  <mark.probst@gmail.com>
238
239         * method-to-ir.c, mini.h, mini-alpha.c, mini-amd64.c, mini-arm.c,
240         mini-hppa.c, mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c,
241         mini-s390x.c, mini-sparc.c, mini-x86.c: Thread.get_CurrentThread
242         works differently now and we don't handle it in the JIT anymore.
243
244         * mini.c, mini-exceptions.c, mini-posix.c, debug-debugger.c,
245         debug-mini.c, tramp-amd64.c, tramp-x86.c: Changes resulting from
246         the Thread class split.
247
248 2009-09-25  Zoltan Varga  <vargaz@gmail.com>
249
250         * driver.c: Don't run tests with the obsolete treeprop optimization.
251
252         * mini-sparc.c (mono_arch_create_vars): Make the component vars of a long ret
253         variable volatile. Fixes #541577.
254
255         * basic-calls.cs: Add a new test.
256
257         * basic-long.cs: Remove tests which are now in basic-calls.cs.
258
259 2009-09-24  Zoltan Varga  <vargaz@gmail.com>
260
261         * dwarfwriter.c (emit_debug_info_end): Disable this as it doesn't seem to
262         work/required with recent iphone sdk versions.
263
264         * aot-compiler.c (add_wrappers): Generate PtrToStructure wrappers for more
265         structures.
266
267         * decompose.c (mono_decompose_vtype_opts): Avoid reading uninitialized memory
268         in the VCALL decomposition code.
269
270 2009-09-22  Zoltan Varga  <vargaz@gmail.com>
271
272         * mini-ia64.c (mono_arch_output_basic_block): Fix ISHR/ISHR_IMM.
273
274         * basic.cs: Add a test.
275
276         * mini-ia64.c (mono_arch_build_imt_thunk): Implement support the virtual
277         generic invokes.
278
279         * mini-exceptions.c (mini_jit_info_table_find): New helper function which
280         searches all the domains of the current thread.
281
282         * exceptions-<ARCH>.c: Use it. Fixes #539394.
283
284 2009-09-21  Zoltan Varga  <vargaz@gmail.com>
285
286         * exceptions-arm.c (mono_arm_throw_exception): Set ctx->ebp to fp instead of sp
287         so catching exceptions thrown in the same method works. Fixes exception17.exe.
288
289         * tramp-arm.c (mono_arch_create_trampoline_code_full): Store NULL into lmf->method
290         for non-jit trampolines.
291
292         * mini.c (mono_jit_runtime_invoke): Allow string ctors with dyn runtime invoke.
293
294         * aot-compiler.c (add_wrappers): Ditto.
295
296         * mini-arm.c: Implement support for passing vtypes and floats, and increase
297         the size of the param area used by dyn_call to 6 which covers the majority of
298         methods.
299
300         * mini.c aot-compiler.c: Allow dyn_call for string methods except ctors.
301
302         * mini-arm.c: Implement support for passing/receiving
303         longs and receiving floats in the dyn_call code.
304
305         * mini-amd64.c: Implement support for receiving vtypes in registers in
306         the dyn_call code.
307
308         * mini.c mini-amd64.c: Implement partial support for passing vtypes in
309         the dyn_call code.
310
311 2009-09-20  Zoltan Varga  <vargaz@gmail.com>
312
313         * mini-arm.c (get_call_info): Return more precise information in
314         ArgInfo->regtype.
315         (dyn_call_supported): Use the information in CallInfo.
316
317         * mini-arm.c: Enable support for returning vtypes in the dyn_call code.
318
319         * mini.c mini-amd64.c: Enable support for returning vtypes in the dyn_call
320         code.
321
322         * mini-arm.c: Update after the dyn_call api changes.
323
324         * mini.c (mini_create_jit_domain_info): Register a destructor function
325         for the runtime_invoke_hash.
326
327         * mini-amd64.c (mono_arch_get_dyn_call_args): Rename this to
328         'mono_arch_dyn_call_start'. Pass the pointer to the return value buffer to
329         this function.
330         (mono_arch_get_dyn_call_ret): Rename this to 'mono_arch_dyn_call_finish'.
331         (dyn_call_supported): Simplify this by using get_call_info ().
332         (mono_arch_dyn_call_free): New destructor function.
333
334         * generics.cs: Remove a printf.
335
336         * method-to-ir.c (mono_method_to_ir): Allocate some param area for DYN_CALL.
337
338         * mini-arm.c: Add support for enum return values and passing a few arguments
339         on the stack.
340         
341         * mini.c (mono_jit_runtime_invoke): Add support for enum return values to
342         dyn invoke.
343
344         * mini-amd64.c (mono_arch_get_dyn_call_ret): Ditto.
345
346         * aot-compiler.c (add_wrappers): Add a few restrictions for the use of
347         the dynamic invoke wrappers.
348
349         * mini-arm.c: Implement OP_DYN_CALL for arm.
350
351         * aot-compiler.c (add_wrappers): Avoid aot-ing runtime invoke wrappers
352         supported by the dynamic runtime invoke wrapper.
353
354         * aot-compiler.c aot-runtime.c: Add support for encoding the dynamic
355         runtime invoke wrapper.
356
357         * mini.c (mono_jit_runtime_invoke): Use the dynamic runtime invoke wrappers
358         if possible when running with full-aot.
359
360         * mini-ops.h: Add OP_DYN_CALL opcode.
361
362         * mini-amd64.c method-to-ir.c: Add infrastructure for making method calls
363         with dynamic arguments lists similar to libffi.
364
365 2009-09-19  Zoltan Varga  <vargaz@gmail.com>
366
367         * method-to-ir.c: Fix the previous change on 64 bit platforms.
368         
369         * method-to-ir.c: Applied patch from Rodrigo Kumpera. Allow an i8 argument
370         to NEWARR.
371
372         * iltests.il.in: Add a new test.
373         
374 2009-09-18  Zoltan Varga  <vargaz@gmail.com>
375
376         * aot-compiler.c (add_generic_instances): Add more instances of
377         GenericEqualityComparer.
378
379 2009-09-18  Rodrigo Kumpera  <rkumpera@novell.com>
380
381         * mini.c: Add asserts for mono_class_vtable calls that are not meant to fail.
382
383 2009-09-18  Rodrigo Kumpera  <rkumpera@novell.com>
384
385         * method-to-ir.c: Handle failures from mono_class_vtable. Added some
386         comments on some functions that now can fail.
387
388 2009-09-17  Andrew Jorgensen  <ajorgensen@novell.com>
389
390         * Makefile.am: Add Info.plist to EXTRA_DIST
391
392 2009-09-16  Zoltan Varga  <vargaz@gmail.com>
393
394         * method-to-ir.c (mono_method_to_ir): Allow AOT for CEE_LDTOKEN in
395         static synchronized wrappers. Fixes #539500.
396
397 2009-09-14  Rodrigo Kumpera  <rkumpera@novell.com>
398
399         * jit-icalls.c (mono_class_static_field_address): handle vtable failure
400         properly.
401
402 2009-09-16  Zoltan Varga  <vargaz@gmail.com>
403
404         * mini-exceptions.c (mono_handle_exception_internal): Store the computed
405         lmf before calling filter clauses as well. Fixes #539550.
406
407         * exceptions.cs: Add a test.
408         
409 2009-09-14  Zoltan Varga  <vargaz@gmail.com>
410
411         * aot-compiler.c (add_generic_class): Add instances of
412         Array.GetGenericValueImpl as well.
413
414         * Makefile.am (fullaotcheck): Copy and aot more assemblies so linq
415         can be tested too.
416
417         * generics.cs: Add a fullaot linq test.
418
419 2009-09-10  Zoltan Varga  <vargaz@gmail.com>
420
421         * aot-compiler.c (arch_emit_static_rgctx_trampoline): Don't clobber argument
422         reg r1 on arm.
423
424 2009-09-10  Bill Holmes  <billholmes54@gmail.com>
425
426         * mini-trampolines.c (mono_delegate_trampoline) : Call
427           mono_cominterop_get_invoke if the delegate target object
428           is a COM object.
429
430         Code is contributed under MIT/X11 license.
431
432 2009-09-09  Sebastien Pouliot  <sebastien@ximian.com>
433
434         * method-to-ir.c: For CoreCLR throw a SecurityException if an 
435         internal call is defined outside platform code. Reduce code 
436         duplication with existing [Method|Field]AccessException
437
438 2009-09-08  Rodrigo Kumpera  <rkumpera@novell.com>
439
440         * mini-x86.c (mono_arch_emit_call): Don't reduce stack usage by 4
441         if the return value is a small struct passed on regs.
442
443 2009-09-09  Zoltan Varga  <vargaz@gmail.com>
444
445         * cpu-arm.md mini-arm.c: Remove unused opcodes.
446
447         * mini-codegen.c: Enable the cpu description validation for arm.
448
449 2009-09-08  Zoltan Varga  <vargaz@gmail.com>
450
451         * basic-calls.cs: Move the test_0_float_load_and_store_with_big_offset ()
452         test which depends on structs to objects.cs.
453         
454         * basic-calls.cs: Remove calls to Console.WriteLine and throws, since those
455         require object model related stuff working.
456
457         * cpu-x86.md mini-x86.c: Remove more unused opcodes.
458
459         * mini-ops.h: Fix OP_BIGMUL instruction descriptions.
460
461         * mini-codegen.c (mono_local_regalloc): Validate the cpu description 
462         against the instruction metadata in mini-ops.h. amd64 only for now.
463
464         * mini-ops.h: Fix some instruction descriptions.
465
466         * mini-ops.h mini-x86.c mini-amd64.c cpu-<ARCH>.md: Remove some
467         unused instructions.
468
469 2009-09-06  Zoltan Varga  <vargaz@gmail.com>
470
471         * exceptions.cs: Add a new test.
472
473 2009-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
474
475         * mini-x86.c (needs_stack_frame): OSX requires full frames to keep proper alignment.
476
477 2009-09-06  Zoltan Varga  <vargaz@gmail.com>
478
479         * mini-llvm.c (mono_llvm_emit_method): Add a few more missing casts,
480         skip empty phi opcodes.
481         
482         * mini-llvm.c (mono_llvm_emit_method): Handle unsigned volatile variables
483         correctly by zero extending after loads. Skip methods containing calls
484         to the monitor enter/exit trampolines.
485
486         * tramp-x86.c (mono_arch_create_trampoline_code): Align the stack
487         when calling mono_thread_force_interruption_checkpoint ().
488
489         * mini.c (mini_method_compile): Disable llvm when AOT compiling.
490
491         * tramp-amd64.c (mono_arch_patch_callsite): Add support for 32 bit ->
492         64 bit thunks.
493         (mono_arch_nullify_class_init_trampoline): Read 'buf' instead of 'code'.
494
495         * mini-llvm.c (mono_llvm_emit_method): Add a few missing conversions so a 
496         bootstrap could run.
497
498 2009-09-04  Zoltan Varga  <vargaz@gmail.com>
499
500         * mini.c (mini_init): Set callbacks.get_runtime_build_info ().
501
502 2009-09-03  Zoltan Varga  <vargaz@gmail.com>
503
504         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass the start
505         of the method to
506         mono_breakpoint_clean_code () when using LLVM as the prologues generated by
507         LLVM might be very short.
508
509         * mini-x86.c (mono_arch_output_basic_block): Maintain stack alignment
510         in OP_THROW/RETHROW.
511
512         * exceptions-x86.c: Rewrite the throw trampolines so they maintain stack
513         alignment on osx.
514
515 2009-09-03  Zoltan Varga  <vargaz@gmail.com>
516
517         * mini-amd64.c (mono_arch_get_vcall_slot): Pass the start of the method to
518         mono_breakpoint_clean_code () when using LLVM as the prologues generated by
519         LLVM might be very short.
520
521 2009-09-01  Zoltan Varga  <vargaz@gmail.com>
522
523         * exceptions-x86.c (throw_exception): Fix the previous change by substracting
524         the alignment for the value of sp.
525
526 2009-09-01  Geoff Norton  <gnorton@novell.com>
527
528         * mini.c (mono_get_lmf_addr): Fix jit_thread_attach for native to 
529         managed wrappers in full aot.
530
531 2009-08-31  Zoltan Varga  <vargaz@gmail.com>
532
533         * exceptions-x86.c (get_throw_exception): Align the stack on osx.
534
535 2009-08-28  Zoltan Varga  <vargaz@gmail.com>
536
537         * mini-llvm-cpp.cpp mini-llvm.c: Update to latest llvm api.
538
539 2009-08-25  Zoltan Varga  <vargaz@gmail.com>
540
541         * aot-compiler.c (emit_exception_debug_info): Emit ei->flags too.
542
543         * aot-runtime.c (decode_exception_debug_info): Decode ei->flags from the
544         saved info.
545
546         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
547
548         * aot-runtime.c aot-compiler.c: Emit exception causes fully so we don't
549         depend on the info MonoMethodHeader which could be missing in IL stripped
550         assemblies.
551
552 2009-08-25  Zoltan Varga  <vargaz@gmail.com>
553
554         * mini-arm.c (add_general): Fix the passing of 64 bit values on darwin, where
555         they are only 4 byte aligned.
556
557 2009-08-21  Zoltan Varga  <vargaz@gmail.com>
558
559         * mini-arm.c (mono_arch_allocate_vars): Use FP as the frame pointer as
560         was done previously, since using SP causes too many problems.
561
562         * exceptions-arm.c: Fix the handling of sp/fp so unwinding through
563         frames without a frame pointer works.
564
565         * mini-arm.c (mono_arch_get_global_int_regs): Avoid using V5 as a
566         global register in methods with calls, since the calls can go through
567         a static rgctx trampoline which doesn't save it.
568
569 2009-08-19  Zoltan Varga  <vargaz@gmail.com>
570
571         * mini-arm.c (mono_arch_context_get_int_reg): Handle SP as well.
572
573 2009-08-18  Zoltan Varga  <vargaz@gmail.com>
574
575         * aot-compiler.c (add_generic_instances): Fix the net 1.1 build.
576
577 2009-08-18  Christian Hergert  <chris@dronelabs.com>
578
579         * method-to-ir.c: Fix warnings for uninitialized variables.
580
581 2009-08-18  Christian Hergert  <chris@dronelabs.com>
582
583         * mini-exceptions.c:
584         * aot-compiler.c: Fix printf warnings.
585
586 2009-08-18  Zoltan Varga  <vargaz@gmail.com>
587
588         * aot-compiler.c (add_generic_instances): Add string[] wrapper methods.
589         Add GetGenericValueImpl<string>.
590         
591         * aot-compiler.c (add_generic_instances): Add instances of
592         GenericEqualityComparer<T> for primitive types. Only emit the array
593         wrappers into the mscorlib image.
594
595 2009-08-15  Zoltan Varga  <vargaz@gmail.com>
596
597         * aot-runtime.c (load_method): Rename 'aot_module' -> 'amodule'. Allocate
598         the methods_loaded array using amodule->info->nmethods.
599
600         * mini.h (MonoAotFileInfo): Add an 'nmethods' field.
601         (MONO_AOT_FILE_VERSION): Bump this.
602
603         * aot-compiler.c: Emit more generic instances allowing some parts of linq
604         to work.
605
606         * aot-runtime.c (mono_aot_get_unwind_info): Handle the case when the
607         MonoJitInfo doesn't belong to its methods aot image.
608
609 2009-08-14  Zoltan Varga  <vargaz@gmail.com>
610
611         * mini-arm.c (mono_arch_allocate_vars): Use SP as the default frame reg.
612
613         * mini-arm.c: Fix warnings.
614         
615         * mini-arm.c (mono_arm_emit_load_imm): Only emit a movt if needed.
616
617         * mini-arm.c (mono_arm_emit_load_imm): Use movt/movw if the cpu
618         supports it.
619
620 2009-08-12  Zoltan Varga  <vargaz@gmail.com>
621
622         * aot-compiler.c (arch_emit_imt_thunk): Rework the arm code to
623         avoid clobbering IP.
624
625         * mini-trampolines.c (mono_magic_trampoline): Allocate a local to
626         hold the trampoline argument, so its initial value is available during
627         debugging.
628
629 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
630
631         * exceptions-arm.c:
632         * exceptions-hppa.c:
633         * mini.c:
634         * exceptions-s390x.c:
635         * exceptions-mips.c:
636         * exceptions-ppc.c:
637         * exceptions-sparc.c:
638         * exceptions-alpha.c:
639         * aot-runtime.c:
640         * mini-trampolines.c:
641         * exceptions-x86.c:
642         * exceptions-s390.c: add and use #define's instead of sizeof()
643         for MonoJitInfo and MonoJitInfoTable.
644
645 2009-08-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
646
647         * tramp-arm.c:
648         * tramp-amd64.c:
649         * tramp-ppc.c:
650         * tramp-x86.c: use a #define instead of sizeof() for a few
651         structures that use a zero-length array.
652
653 2009-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
654
655         * method-to-ir.c (mono_method_to_ir/CEE_CONSTRAINED_): Handle the
656         case when the method is dynamic. Fixes #529238.
657
658 2009-08-06  Zoltan Varga  <vargaz@gmail.com>
659
660         * mini.c (mono_jit_compile_method_inner): Throw an exception instead
661         of asserting when a method is JIT compiled in full-aot mode.
662
663 2009-08-03  Jerry Maine  <crashfourit@gmail.com>
664         
665         Contributed under the terms of the MIT/X11 license by
666         Jerry Maine <crashfourit@gail.com>.
667         
668         * fixed wrong dates in changelog.
669
670 2009-08-03  Jerry Maine  <crashfourit@gmail.com>
671         
672         Contributed under the terms of the MIT/X11 license by
673         Jerry Maine <crashfourit@gail.com>.
674
675         * basic-simd.cs: added test for packed double square root.
676         * cpu-amd64.md: added opcode info for packed double square root.
677         * cpu-x86.md: added opcode info for packed double square root.
678         * mini-ops.h: added IR opcode for packed double square root.
679         * mini-x86.c: added IR to native translation code for packed double square root.
680         * mini-amd64.c: removed todo for packed double square root.
681         * simd-intrinsics.c: added method to IR opcode converstion for
682         packed double square root.
683
684 2009-08-03 Jerry Maine <crashfourit@gmail.com>
685
686         Contributed under the terms of the MIT/X11 license by
687         Jerry Maine <crashfourit@gail.com>.
688
689         * mini-amd64.c: Added a change to help tell the difference as 
690         to what perpose the xmm register is being used--mainly to help
691         with debuging.
692         * mini-amd64.h: Changed callee regs to use 15 out of 16 
693         (one used for special cases) xmm registers for both fp
694         and simd ops. Added define to turn on new feature in the regalloc
695         that allows fp and simd ops to share the xmm regs happily.
696         * codegen.c: Added code to detect for which perpose an xmm reg is
697         being used (fp or simd) and to translate back and forth to the
698         correct logical reg bank (fp or simd) for 'spill load's.
699
700 2009-08-03 Jerry Maine <crashfourit@gmail.com>
701
702         Contributed under the terms of the MIT/X11 license by
703         Jerry Maine <crashfourit@gail.com>.
704
705         * basic-simd.cs: Added tests for stressing the regalloc when running with
706         16 simd regs and when simd and fp ops share the same reg bank.
707
708 2009-08-01  Mark Probst  <mark.probst@gmail.com>
709
710         * method-to-ir.c (mini_emit_stobj): If we call mono_value_copy()
711         in shared generic code, we might have to look up the class in the
712         RGCTX.  If we use the class directly, compute its GC descriptor.
713
714 2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>
715
716         * mini.c (mono_jit_runtime_invoke): Fix a warning.
717
718 2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>
719
720         * mini.c (mono_jit_runtime_invoke): Initialize the class and
721         check for errors. Fixed the case when the class with the Main
722         method is broken.
723
724 2009-07-31 Jerry Maine <crashfourit@gmail.com>
725
726         Contributed under the terms of the MIT/X11 license by
727         Jerry Maine <crashfourit@gail.com>.
728
729         * cpu-amd64.md: Fixed simple bug in machine discrition file.
730
731 2009-07-31  Zoltan Varga  <vargaz@gmail.com>
732
733         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_IREM_UN_IMM.
734
735 2009-08-30  Rodrigo Kumpera  <rkumpera@novell.com>
736
737         * method-to-ir.c: Fix naming of stelem and ldelem.
738
739 2009-07-30  Zoltan Varga  <vargaz@gmail.com>
740
741         * driver.c (main_thread_handler): Check that the assembly loaded
742         matches the filename when doing AOT.
743
744 2009-07-30  Mark Probst  <mark.probst@gmail.com>
745
746         * mini.c: get_ip_from_sigctx installer has been removed, so don't
747         call it anymore.
748
749         * mini-x86.h, mini-amd64.h, mini-ppc.h: UCONTEXT macros moved (to
750         utils/mono-sigcontext.h).
751
752         * exceptions-amd64.c: Use the UCONTEXT_GREGS macro instead of an
753         #ifdef.
754
755 2009-07-29  Massimiliano Mantione  <massi@ximian.com>
756
757         * mini.c (mono_codegen):
758         Call profiler hook to keep track of method code buffers.
759
760 2009-07-27  Mark Probst  <mark.probst@gmail.com>
761
762         * method-to-ir.c: Invoke write barriers for the
763         Interlocked.(Compare)Exchange JIT intrinsics.
764
765 2009-07-26  Raja R Harinath  <harinath@hurrynot.org>
766
767         * Makefile.am (version.h): Fix issues when built out of tree.
768         Remove some redundant 'grep's piped through 'sed's.
769
770 Fri Jul 24 17:28:37 CEST 2009 Steven Munroe  <munroesj@us.ibm.com>
771
772         This patch is contributed under the terms of the MIT/X11 license
773
774         * mini-ppc.c (mono_arch_output_basic_block):
775         (OP_STOREI1_MEMBASE_REG): Handle 32-bit offsets combining addis
776         for bits 32-47 with signed load/store diplacements for bits
777         48-63.  Use prefered base/offset order for indexed form.
778         (OP_STOREI2_MEMBASE_REG, OP_STORE_MEMBASE_REG): Same.
779         (OP_LOAD_MEMBASE, OP_LOADI4_MEMBASE, OP_LOADU4_MEMBASE,
780         OP_LOADI1_MEMBASE, OP_LOADU1_MEMBASE, OP_LOADU2_MEMBASE,
781         OP_LOADI2_MEMBASE): Same.
782         (OP_STORER8_MEMBASE_REG, OP_LOADR8_MEMBASE,
783         OP_STORER4_MEMBASE_REG, OP_LOADR4_MEMBASE): Same.
784         (OP_STOREI1_MEMINDEX): Use prefered base/offset order for
785         indexed form.
786         (OP_STOREI2_MEMINDEX, OP_STORE_MEMINDEX): Same.
787         (OP_LOAD_MEMINDEX, OP_LOADI4_MEMINDEX, OP_LOADU4_MEMINDEX,
788         OP_LOADU2_MEMINDEX, OP_LOADI2_MEMINDEX, OP_LOADU1_MEMINDEX,
789         OP_LOADI1_MEMINDEX): Same
790         (OP_LOADR4_MEMINDEX, OP_LOADR8_MEMINDEX, OP_STORER4_MEMINDEX,
791         OP_STORER8_MEMINDEX): Same
792         (OP_JMP): Use addis/addi sequence for int cfg->stack_usage
793         computations.
794         (mono_arch_emit_prolog): Handle 32-bit offsets combining addis
795         for bits 32-47 with signed load/store diplacements for bits
796         48-63.  Use prefered base/offset order for indexed form.
797
798 Fri Jul 24 16:57:12 CEST 2009 Steven Munroe  <munroesj@us.ibm.com>
799
800 This patch is contributed under the terms of the MIT/X11 license
801
802         * mini-ppc.c: Define PPC_MOVE_FPR_GPR and PPC_ISA_64.
803         (mono_arch_get_vcall_slot): Fx pointer to int cast warning.
804         (mono_arch_decompose_opts): Make OP_ICONV_TO_R4 and
805         OP_ICONV_TO_R8 decompose conditional on !PPC_ISA_64.
806         (mono_arch_output_basic_block) [OP_JMP]: Use ppc_load32 for
807         cfg->stack_usage to avoid size warnings.
808         (mono_arch_output_basic_block) [__mono_ppc64__]: Replace
809         store/load sequence with mffgpr if PPC_MOVE_FPR_GPR is true.
810         (mono_arch_output_basic_block) [!__mono_ppc64__]: For
811         OP_ICONV_TO_R4 or OP_ICONV_TO_R8 and PPC_ISA_64 use fcfid
812         to convert.
813         (mono_arch_emit_prolog): Move mono_emit_unwind_op_def_cfa 
814         after code varible is initialized.
815         Add g_assert ppc_is_imm16 for ainfo->offset. Handle
816         ainfo->size == 8 when ainfo->offset !ppc_is_imm16.
817         (mono_arch_emit_epilog): 
818         Move Use ppc_load32 for cfg->stack_usage to avoid size
819         warnings.
820
821 2009-07-24  Mark Probst  <mark.probst@gmail.com>
822
823         * method-to-ir.c: The write barrier doesn't do the store anymore,
824         so we have always to emit it.  Also, emit the wbarrier after the
825         store.
826
827 2009-07-24  Zoltan Varga  <vargaz@gmail.com>
828
829         * mini-arm.c (mono_arch_get_delegate_invoke_impls): Add a trampoline
830         for argument count 3 too.
831
832 2009-07-23  Zoltan Varga  <vargaz@gmail.com>
833
834         * mini.c (mono_jit_compile_method_with_opt): Add an 'ex' argument to let
835         the caller handle the exceptions.
836         (mono_jit_runtime_invoke): Handle exceptions thrown while compiling the
837         method. Fixes #524498.
838
839 2009-07-22  Geoff Norton  <gnorton@novell.com>
840
841         * mini-exceptions.c: Fix build on ia64.
842
843 2009-07-22  Mark Probst  <mark.probst@gmail.com>
844
845         * mini-exceptions.c (ves_icall_get_frame_info): Use write
846         barriers.
847
848 2009-07-21  Zoltan Varga  <vargaz@gmail.com>
849
850         * mini-arm.c (mono_arch_emit_prolog): Fix thread attaching in aot
851         code.
852
853 2009-07-20  Zoltan Varga  <vargaz@gmail.com>
854
855         * basic-simd.cs (Main): Pass args to the test driver.
856
857 2009-07-20  Geoff Norton  <gnorton@novell.com>
858
859         * mini-x86.h: Fix the x86 version guards to use Apple's
860         properly defined macros.
861
862 2009-07-20  Geoff Norton  <gnorton@novell.com>
863
864         * mini-x86.c: Fix --trace on darwin-x86 and other systems which require
865         aligned access.
866
867 2009-07-20  Zoltan Varga  <vargaz@gmail.com>
868
869         * mini.c (mono_jit_runtime_invoke): Speed this up by adding a hash to
870         MonoJitDomainInfo which maps MonoMethod's to a structure containing all
871         the information which is needed for invokes, so only one locking+hash table
872         lookup is needed.
873
874         * aot-compiler.c: Add a 'tool-prefix' option to be used when cross-compiling.
875         
876         * aot-compiler.c (add_generic_instances): Emit instances of 
877         GenericComparer<T> for primitive types.
878
879 2009-07-19 Rodrigo Kumpera  <rkumpera@novell.com>
880
881         * mini-posix.c: Fix linux build.
882
883 2009-07-19  Geoff Norton  <gnorton@novell.com>
884
885         * mini.h: Add prototypes for mono_runtime_syscall_fork and
886         mono_gdb_render_native_backtraces
887         * mini-darwin.c: Apple's syscall(SYS_fork) is very weird on x86,
888         so we implement the sane semantics to the runtime here
889         (mono_gdb_render_native_backtraces).  Apple also uses an ancient gdb
890         so we need to call it differently (mono_gdb_render_native_backtraces)
891         * mini-posix.c: Move the old semantics from mini.c to the prototypes
892         here for default implementations.
893         * mini.c: Refactor mono_handle_native_sigsegv so that we can properly
894         support Apple's weird syscall (SYS_fork) implementation and not busy
895         loop in abort() on native crashes on OSX anymore.
896
897 2009-07-18  Zoltan Varga  <vargaz@gmail.com>
898
899         * aot-runtime.c (load_method): Change the handling of the
900         MONO_LASTAOT env variable so MONO_LASTAOT=0 means that no aot methods
901         are used.
902
903         * mini.c (mono_patch_info_equal): Really fix the handling of RGCTX_FETCH.
904
905 2009-07-17  Zoltan Varga  <vargaz@gmail.com>
906
907         * mini.c (mono_patch_info_equal): Revert the last change for now as it
908         seems to break the aot tests.
909         
910         * mini.c (mono_patch_info_equal): Fix the handling of 
911         MONO_PATCH_INFO_RGCTX_FETCH.
912
913 2009-07-16  Zoltan Varga  <vargaz@gmail.com>
914
915         * unwind.c: Use TARGET_AMD64 instead of __x86_64__.
916
917         * mini.c (mono_patch_info_hash): Fix the handling of 
918         MONO_PATCH_INFO_INTERNAL_METHOD.
919         (mono_patch_info_equal): Ditto.
920
921 2009-07-16  Zoltan Varga  <vargaz@gmail.com>
922
923         * mini-llvm.c (mono_llvm_emit_method): Use module instead of ctx->module
924         in a few places.
925         
926         * mini-llvm.c: Add some infrastructure for AOT support.
927
928 2009-07-15  Zoltan Varga  <vargaz@gmail.com>
929
930         * mini-llvm-cpp.c: Update to the latest llvm api.
931         
932         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Set the EnablePrettyStackTrace
933         option to false to prevent llvm from installing signal handlers which
934         trip up the gc.
935         
936 2009-07-15 Rodrigo Kumpera  <rkumpera@novell.com>
937
938         * cpu-x86.md:
939         * cpu-amd64.md: Revert previous change as those instructions
940         take 2 separate arguments. Remember to read the arch docs more
941         carefully next time.
942
943 2009-07-15  Zoltan Varga  <vargaz@gmail.com>
944
945         * mini-llvm-cpp.cpp (mono_llvm_build_alloca): Update to latest llvm api.
946
947 Wed Jul 15 17:20:27 CEST 2009 Paolo Molaro <lupus@ximian.com>
948
949         * mini-ppc.c: exploit multiple load/store units if available (rest of
950         the change from Steven Munroe (<munroesj@us.ibm.com>) first patch at 
951         http://bugzilla.novell.com/show_bug.cgi?id=487846).
952
953 Wed Jul 15 16:24:57 CEST 2009 Paolo Molaro <lupus@ximian.com>
954
955         * mini-ppc.c: integrate most of Steven Munroe (<munroesj@us.ibm.com>)
956         first patch at http://bugzilla.novell.com/show_bug.cgi?id=487846.
957
958 2009-07-14 Rodrigo Kumpera  <rkumpera@novell.com>
959
960         * cpu-x86.md: Fix missing clobbering from trancendental simd
961         ops.
962
963         * cpu-amd64.md: Same.
964
965 2009-07-14 Jerry Maine <crashfourit@gmail.com>
966
967         Contributed under the terms of the MIT/X11 license by
968         Jerry Maine <crashfourit@gail.com>.
969
970         * basic-simd.cs: Added tests for single and doulble indexers.
971
972         * cpu-amd64.md: Added simd opcode information.
973
974         * mini-amd64.c: Added IR to native simd generation code.
975         Added simd register names and function that returns them.
976
977         * mini-amd64.h: Added marcos to turn on simd code compilation in
978         amd64. Added max simd register count marco. Added caller/callee
979         register mask marcos. Added marcos to use simd register bank.
980
981         * mini.h: Added helper marco for shufling dwords and simple
982         floats.
983
984 2009-07-14  Zoltan Varga  <vargaz@gmail.com>
985
986         * mini-llvm-cpp.cpp: Update to latest llvm SVN api.
987
988         * Makefile.am (mono_LDADD): Pass LLVM_LDFLAGS to the linked.
989
990         * unwind.c (mono_unwind_get_ops_from_fde): Make this return
991         the length of the native code as well.
992
993         * basic-simd.cs: Add a test for #521662.
994
995 Mon Jul 13 17:58:50 CEST 2009 Paolo Molaro <lupus@ximian.com>
996
997         * mini-ppc.c: fixed bug introduced by Steven's TLS changes.
998
999 2009-07-13  Mark Probst  <mark.probst@gmail.com>
1000
1001         * mini.c: Register function for getting the IP from a signal
1002         context with metadata.
1003
1004 2009-07-13  Zoltan Varga  <vargaz@gmail.com>
1005
1006         * method-to-ir.c (mono_method_to_ir): When calling a gshared method,
1007         call a generic class init trampoline if needed. Fixes #519336.
1008
1009         * generics.cs: Add a test.
1010         
1011 2009-07-09  Mark Probst  <mark.probst@gmail.com>
1012
1013         * method-to-ir.c: When doing a call which might be remote from
1014         shared generic code to other shared code with open type arguments,
1015         get the remoting invoke wrapper from the RGCTX and do an indirect
1016         call to it.
1017
1018 2009-07-03  Zoltan Varga  <vargaz@gmail.com>
1019
1020         * mini-trampolines.c (get_unbox_trampoline): Add an rgctx trampoline
1021         after the unbox trampoline in the full-aot case.
1022
1023 2009-07-02  jonas echterhoff <jonas@unity3d.com>
1024         
1025         * mini.c: Move initialization of jit_mutex before debugger initialization
1026         
1027         to avoid crashes.
1028         
1029         
1030         * Info.plist: added Info.plist and link flag to enable the mono executable
1031         to access other processes. Requires codesigning of the executable to work.
1032         
1033         * mdb-debug-info32-darwin.s: The same as mdb-debug-info32.s, changed to 
1034         
1035         compile on OS X.
1036         
1037
1038 2009-06-30  Zoltan Varga  <vargaz@gmail.com>
1039
1040         * driver.c (mini_regression): Handle loading errors. Fixes #508869.
1041
1042 2009-06-29  Zoltan Varga  <vargaz@gmail.com>
1043
1044         * mini-exceptions.c (get_generic_context_from_stack_frame): Fix the case
1045         when the generic instance is an instantiation of a subclass of the
1046         methods class. Fixes #517166.
1047
1048 2009-06-26  Zoltan Varga  <vargaz@gmail.com>
1049
1050         * mini-amd64.c (mono_arch_emit_prolog): Fix thread attaching in AOTed
1051         code.
1052
1053         * mini.c (mono_jit_thread_attach): Allow domain to be NULL for calls from
1054         AOTed code.
1055
1056         * CMakeLists.txt: Add minimal support for installation.
1057
1058 2009-06-25  Zoltan Varga  <vargaz@gmail.com>
1059
1060         * aot-compiler.c (emit_and_reloc_code): Factor out the code to
1061         determine whenever a method is directly callable to a separate function.
1062
1063         * mini-<ARCH>.c tramp-<ARCH>.c: Remove needless casts and add new
1064         needed ones as a result of the previous change.
1065
1066         * mini-<ARCH>.c tramp-<ARCH>.c: Use mgreg_t* as the
1067         type of register arrays.
1068
1069         * mini-trampolines.c tramp-<ARCH>.c aot-runtime.c: Use mgreg_t* as the
1070         type of register arrays.
1071
1072 2009-06-24  Jerry Maine  <crashfourit@gmail.com>
1073         
1074         Contributed under the terms of the MIT/X11 license by
1075         Jerry Maine <crashfourit@gail.com>.
1076
1077         * mini-amd64.c: Added code to convert simd IR to native amd64 sse.
1078
1079 2009-06-24  Zoltan Varga  <vargaz@gmail.com>
1080
1081         * aot-compiler.c (emit_plt): Define debug labels for most plt entries.
1082
1083 2009-06-24  Neale Ferguson <neale@sinenomine.net>
1084
1085         * mini-s390x.c: Correct LCONV_TO_Ix and ICONV_TO_Ix routines. Fix leave_method
1086         dump of structure return value. Fix some formatting.
1087         * cpu-s390x.md: Fix lengths of instruction sequences.
1088         * mini-s390.c: Minor formatting changes.
1089
1090 2009-06-24  Zoltan Varga  <vargaz@gmail.com>
1091
1092         * mini-x86.h: Applied patch from Romain Tartiere (romain@blogreen.org).
1093         Use sigaction on freebsd as well.
1094
1095 2009-06-23  Zoltan Varga  <vargaz@gmail.com>
1096
1097         * mini.h: Don't define MONO_ARCH_HAVE_TLS_GET to 0, as some code
1098         uses #ifdef on it.
1099         
1100         * mini.c (mini_init): Revert a change which breaks cross-compilation.
1101
1102 2009-06-22  Mark Probst  <mark.probst@gmail.com>
1103
1104         * mini-ppc.c, cpu-ppc.md: Enable TLS on Darwin/G4.
1105
1106 2009-06-22  Mark Probst  <mark.probst@gmail.com>
1107
1108         * mini.c, mini.h: Tell the runtime whether we support MONO_TLS.
1109
1110 2009-06-20  Martin Baulig  <martin@ximian.com>
1111
1112         * debug-mini.c
1113         (MonoDebuggerThreadFlags): New enum typedef.
1114         (MonoDebuggerThreadInfo): Added `guint32 thread_flags'.
1115         (mono_debugger_thread_created): Added `gpointer func' argument;
1116         initialize the new `thread_flags' field.
1117
1118 2009-06-18  Martin Baulig  <martin@ximian.com>
1119
1120         * debug-debugger.h (MonoDebuggerRuntimeFlags): New enum typedef.
1121         (MonoDebuggerInfo): Renamed the `dummy' field info `runtime_info'.
1122
1123         * debug-debugger.c
1124         (mini_debugger_set_attach_ok): New function; sets the attach-ok
1125         flag in `MONO_DEBUGGER__info.runtime_info'.
1126
1127         * driver.c
1128         (mono_main): Call mini_debugger_set_attach_ok() if generics
1129         sharing is disabled.
1130
1131 2009-06-22  Zoltan Varga  <vargaz@gmail.com>
1132
1133         * aot-compiler.c (add_wrappers): Fix a warning.
1134
1135         * mini-ppc.c tramp-ppc.c exceptions-ppc.c aot-compiler.c: Update after
1136         the ppc load/store macro changes.
1137
1138 2009-06-21  Zoltan Varga  <vargaz@gmail.com>
1139
1140         * tramp-ppc.c (mono_arch_patch_plt_entry): Implement this.
1141
1142         * aot-compiler.c (mono_compile_assembly): Sanitize the plt symbol too,
1143         not just the got symbol.
1144
1145         * mini-ppc.c aot-compiler.c unwind.c: Implement generation of unwind info
1146         on ppc.
1147
1148         * aot-compiler.c unwind.c: Add infrastructure for unwind support on
1149         ppc.
1150         
1151         * aot-compiler.c: Remove some fixmes.
1152
1153         * driver.c (mono_main): Print a helpful message when cross-compiling.
1154
1155         * mini.c (mini_init): Disable signal handlers when cross-compiling.
1156
1157         * method-to-ir.c (initialize_array_data): Do the optimization if the
1158         target byte order is little endian, instead of the host byte order.
1159
1160         * aot-compiler.c: Emit sizes for most symbols, only emit runtime-invoke
1161         wrappers into the mscorlib image, Emit a unique plt symbol for each
1162         image, emit symbols for plt entries.
1163
1164         * image-writer.c (img_writer_emit_symbol_size): New function to emit
1165         a .size directive.
1166         
1167 2009-06-20  Zoltan Varga  <vargaz@gmail.com>
1168
1169         * aot-compiler.c (add_wrappers): Avoid calling 
1170         mono_marshal_get_type_info () since it can assert for some types.
1171
1172         * method-to-ir.c (mono_method_to_ir): Disable aot when some forms of 
1173         ldtoken are used inside wrappers.
1174
1175         * helpers.c: Add support for prefixing tools with the arch name.
1176
1177         * mini.h (OP_LOADR_MEMBASE): New opcodes to load/store pointer sized
1178         quantities when using ilp32.
1179
1180         * mini-codegen.c: Use OP_LOADR_MEMBASE/OP_STORER_MEMBASE for loading/storing
1181         spill slots. Use sizeof(mgreg_t) for the spill slot size.
1182
1183         * image-writer.c: Use .long on ilp32.
1184
1185         * aot-compiler.c: Use 32 bit loads on ilp32.
1186         
1187 2009-06-19  Zoltan Varga  <vargaz@gmail.com>
1188
1189         * tramp-ppc.c (mono_arch_create_trampoline_code): Fix the ppc build.
1190
1191         * mini-ops.h: Use TARGET_POWERPC define for consistency.
1192
1193         * patch-info.h: Add 'MSCORLIB_GOT_ADDR' patch type.
1194
1195         * aot-compiler.c aot-runtime.c: Put the mscorlib got address into the 
1196         second got slot of every aot image.
1197         
1198         * aot-compiler.c aot-runtime.c mini-trampolines.c: Add support for
1199         aot on platforms with function pointers.
1200
1201         * mini-ppc.h mini-ppp.c cpu-ppc.md exceptions-ppc.c tramp-ppc.c: Add
1202         support for aot/full aot on ppc/ppc64.
1203         
1204         * tramp-<ARCH>.c (mono_arch_patch_plt_entry): Add 'got' and 'regs'
1205         arguments which are needed on ppc.
1206
1207         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Add 'regs'
1208         argument.
1209
1210         * mini-trampolines.c aot-runtime.c: Update after the above changes.
1211         
1212         * liveness.c (BITS_PER_CHUNK): Use MONO_BITSET_BITS_PER_CHUNK.
1213
1214         * regalloc2.c (BITS_PER_CHUNK): Ditto.  
1215
1216         * aot-compiler.c (emit_got_info): Fix reading unused memory.
1217
1218         * ir-emit.h (alloc_dreg): Add a 'return -1' to quiet some compilers.
1219
1220 2009-06-17  Geoff Norton  <gnorton@novell.com>
1221
1222         * aot-compiler.c: Ensure we dont try to close a null dwarf writer.
1223
1224 2009-06-17  Zoltan Varga  <vargaz@gmail.com>
1225
1226         * dwarfwriter.c (mono_dwarf_writer_create): Add an 'appending' parameter
1227         to control whenever the dwarf writer is in xdebug or aot mode.
1228         (emit_class_dwarf_info): Use a separate abbrev for structures without
1229         children.
1230
1231         * aot-compiler.c: Pass the appending parameter to 
1232         mono_dwarf_writer_create ().
1233
1234         * branch-opts.c (mono_merge_basic_blocks): Fix the case when bbn
1235         falls through to its next bblock. Fixes #513931.
1236
1237         * iltests.il: Add a test.
1238
1239         * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Emit some line number
1240         infor even if emit_line is FALSE, as the apple linker seems to require it.
1241
1242         * image-writer.c (asm_writer_emit_symbol_diff): Call get_label ().
1243
1244         * dwarfwriter.c (emit_cie): Emit a separate symbol for the cie start, as
1245         gcc does.
1246         (emit_fde): Ditto.
1247
1248 2009-06-15  Zoltan Varga  <vargaz@gmail.com>
1249
1250         * exceptions-mips.c (mono_arch_get_throw_exception_by_name): Fix the
1251         mips build.
1252
1253 2009-06-13  Zoltan Varga  <vargaz@gmail.com>
1254
1255         * mini.h (struct MonoBasicBlock): Add 'has_jump_table' and 
1256         'has_call_handler' fields.
1257
1258         * method-to-ir.c (mono_method_to_ir): Set them if needed.
1259
1260         * branch-opts.c (mono_merge_basic_blocks): Avoid iterating through the
1261         first bblock if not needed. Fixes #512790.
1262         
1263 2009-06-11  Zoltan Varga  <vargaz@gmail.com>
1264
1265         * aot-compiler.c (mono_compile_assembly): Fix a warning.
1266         
1267         * aot-compiler.c (add_wrappers): Don't emit remoting-invoke-with-check
1268         wrappers.
1269
1270         * aot-runtime.c (mono_aot_get_method): Use the original method's code for
1271         remoting-invoke-with-check wrappers, which are not needed when running with
1272         full-aot, since it doesn't support remoting.
1273         
1274 2009-06-10  Zoltan Varga  <vargaz@gmail.com>
1275
1276         * aot-compiler.c (emit_got_info): Don't emit offsets for the plt got entries.
1277
1278         * aot-compiler.c aot-runtime.c: Don't emit the first got offset in the
1279         method info, it is not used anymore.
1280
1281         * mini.h: Bump AOT file format version.
1282         
1283         * aot-compiler.c (arch_emit_plt_entry): Make the arm plt entries one
1284         word smaller.
1285
1286         * aot-runtime.c (mono_aot_get_plt_info_offset): Update after the
1287         change above.
1288         
1289         * tramp-arm.c (mono_arch_patch_plt_entry): Ditto.
1290
1291         * mini.h: Bump AOT file format version.
1292         
1293 2009-06-10  Zoltan Varga  <vargaz@gmail.com>
1294
1295         * image-writer.c (asm_writer_emit_symbol_diff): Disable the 
1296         TARGET_ASM_APPLE stuff for now, as it doesn't seem to work on the
1297         iphone.
1298
1299         * mini-arm.c (mono_arch_output_basic_block): Fix the implementation
1300         of CKFINITE and FBGE for VFP.
1301
1302 2009-06-09  Zoltan Varga  <vargaz@gmail.com>
1303
1304         * aot-compiler.c: Don't align code to 16 bytes on arm.
1305         
1306         * aot-compiler.c (emit_method_code): Emit the unbox trampolines right
1307         before the methods they belong to.
1308
1309         * aot-runtime.c (mono_aot_plt_resolve): Avoid creating trampolines in
1310         the full-aot case if possible, since the trampoline will be called right 
1311         away.
1312
1313         * aot-compiler.c (mono_compile_assembly): Decrease the number of full aot
1314         trampolines to 1024 after the change above.
1315
1316         * aot-compiler.c (arch_emit_specific_trampoline): Rework the arm
1317         trampoline to save 8 bytes per trampoline.
1318
1319         * tramp-arm.c (mono_arch_create_trampoline_code_full): Update after the
1320         change above.
1321
1322 2009-06-08  Zoltan Varga  <vargaz@gmail.com>
1323
1324         * aot-compiler.c: Use acfg->temp_prefix instead of .L to prefix labels.
1325
1326 2009-06-08  Martin Baulig  <martin@ximian.com>
1327
1328         * debug-mini.c
1329         (MonoDebuggerExceptionAction): Moved into debug-mini.h.
1330         (_mono_debugger_throw_exception): Don't make this static.
1331         (_mono_debugger_unhandled_exception): Likewise.
1332         (mono_debugger_handle_exception): Moved to mini-exceptions.c
1333
1334         * debug-mini.c
1335         (MonoDebuggerExceptionAction): Moved here from debug-mini.c.
1336         (_mono_debugger_throw_exception): Add function prototype.
1337         (_mono_debugger_unhandled_exception): Likewise.
1338
1339         * mini-exceptions.c
1340         (mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
1341         arg; return the first exception handler if the exception is caught
1342         and we're running inside the debugger.
1343         (mono_debugger_handle_exception): Moved here from debug-mini.c;
1344         improve exception handle inside runtime-invoke, check whether the
1345         exception is actually caught in the method being invoked and not
1346         by the runtime-invoke-wrapper.
1347
1348 2009-06-08  Zoltan Varga  <vargaz@gmail.com>
1349
1350         * image-writer.c: Improve support for the osx assembler.
1351
1352         * dwarfwriter.c: Avoid the usage of subsections if the assembler doesn't
1353         support them.
1354
1355 2009-06-08  Martin Baulig  <martin@ximian.com>
1356
1357         * debug-mini.c
1358         (MonoDebuggerExceptionAction): Moved into debug-mini.h.
1359         (_mono_debugger_throw_exception): Don't make this static.
1360         (_mono_debugger_unhandled_exception): Likewise.
1361         (mono_debugger_handle_exception): Moved to mini-exceptions.c
1362
1363         * debug-mini.c
1364         (MonoDebuggerExceptionAction): Moved here from debug-mini.c.
1365         (_mono_debugger_throw_exception): Add function prototype.
1366         (_mono_debugger_unhandled_exception): Likewise.
1367
1368         * mini-exceptions.c
1369         (mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
1370         arg; return the first exception handler if the exception is caught
1371         and we're running inside the debugger.
1372         (mono_debugger_handle_exception): Moved here from debug-mini.c;
1373         improve exception handle inside runtime-invoke, check whether the
1374         exception is actually caught in the method being invoked and not
1375         by the runtime-invoke-wrapper.
1376
1377 2009-06-07  Zoltan Varga  <vargaz@gmail.com>
1378
1379         * image-writer.c (append_subsection): Don't align subsections of the
1380         debug_line section as a workaround.
1381
1382         * dwarfwriter.c: Emit line number info in the AOT case as well.
1383
1384 2009-06-06  Steven Munroe  <munroesj@us.ibm.com>
1385
1386         This patch is contributed under the terms of the MIT/X11 license
1387
1388        * mini-ppc.c (mono_arch_emit_exceptions): Change assert to
1389        code_len <= code_size
1390
1391 2009-06-06  Zoltan Varga  <vargaz@gmail.com>
1392
1393         * mini-mips.c (mips_emit_exc_by_name): Fix the mips build.
1394
1395 2009-06-04  Zoltan Varga  <vargaz@gmail.com>
1396
1397         * aot-compiler.c aot-runtime.c: Delete references to static rgctx
1398         invoke wrappers, we now use trampolines instead.
1399
1400 2009-06-04  Mark Probst  <mark.probst@gmail.com>
1401
1402         * mini-darwin.c: The exception thread must not be registered with
1403         the GC.
1404
1405 2009-06-04  Mark Probst  <mark.probst@gmail.com>
1406
1407         * mini-gc.c: Disable the code because it makes SGen crash.
1408
1409 2009-06-03  Zoltan Varga  <vargaz@gmail.com>
1410
1411         * aot-compiler.c (mono_compile_assembly): Handle file open errors gracefully
1412         instead of asserting.
1413
1414 2009-05-31  Zoltan Varga  <vargaz@gmail.com>
1415
1416         * aot-compiler.c (mono_compile_assembly): Move the creation of the
1417         output file after the code has been compiled.
1418
1419 2009-05-30  Zoltan Varga  <vargaz@gmail.com>
1420
1421         * tramp-ppc.c (mono_arch_get_static_rgctx_trampoline): Fix 64 bit support.
1422
1423 2009-05-31  Zoltan Varga  <vargaz@gmail.com>
1424
1425         * aot-compiler.c aot-runtime.c: Get rid of the shared/non-shared got
1426         entries distinction to simplify the code.
1427
1428         * mini.h: Bump AOT file format version.
1429         
1430 2009-05-28  Zoltan Varga  <vargaz@gmail.com>
1431
1432         * objects.cs: Fix the signature of one of the tests.
1433
1434         * mini.c (mini_create_ftnptr): New helper function, moved here from
1435         object.c.
1436         (mini_get_addr_from_ftnptr): Ditto.
1437         (mini_init): Install the new helpers.
1438
1439 2009-05-28  Martin Baulig  <martin@ximian.com>
1440
1441         Correctly initialize the debugger when embedding Mono.
1442
1443         * mdb-debug-info32.s, mdb-debug-info64.s: Add a global variable
1444         `MONO_DEBUGGER__using_debugger' to the `.mdb_debug_info' section;
1445         see documentation in mini_debug_running_inside_mdb().
1446
1447         * debug-debugger.c
1448         (mini_debug_running_inside_mdb): New function to check whether
1449         we're running inside mdb.
1450
1451         * mini.c (mini_init): Call mini_debugger_init() if we're running
1452         inside the debugger.
1453
1454         * driver.c (mono_main): Moved the call to mini_debugger_init()
1455         into mini_init() to make this work when embedding Mono.
1456
1457         * debug-debugger.c (mini_debugger_init): Warn about duplicate
1458         calls to mini_debugger_init().
1459
1460         * mini.h: Rename mono_debugger_init() -> mini_debugger_init(),
1461         mono_debugger_main() -> mini_debugger_main() and put them inside a
1462         `MONO_DEBUGGER_SUPPORTED' conditional.
1463
1464 2009-05-26 Rodrigo Kumpera  <rkumpera@novell.com>
1465
1466         * mini-trampolines.c: Kill mono_find_delegate_trampoline_by_addr as
1467         this is no longer in use.
1468         * mini.h: Same.
1469
1470 2009-05-26  Zoltan Varga  <vargaz@gmail.com>
1471
1472         * mini-sparc.c (add_outarg_load): Fix the sparc build.
1473
1474         * aot-compiler.c (emit_method_code): Always write out C style symbols for
1475         methods.
1476
1477 2009-05-27  Martin Baulig  <martin@ximian.com>
1478
1479 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
1480
1481         * mini-x86.c (mono_arch_output_basic_block): Fix the precision of
1482         long_conv_to_r_un to 64 bits.
1483
1484         * cpu-x86.md: Increase the instruction size due to the changes.
1485
1486         * iltests.il.in: Add regression test.
1487
1488         Fixes #467201.
1489
1490 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
1491
1492         * objects.cs: Move the previous test from basic.cs to here.
1493
1494 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
1495
1496         * basic.cs: Add regression test for #506915.
1497
1498 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
1499
1500         * method-to-ir.c (mono_method_to_ir): When doing the ldobj+stobj
1501         optimization we must check the bb of the first byte of stobj as
1502         it's the only one set in cil_offset_to_bb.
1503
1504         Fixes #506915.  
1505
1506 2009-05-25  Zoltan Varga  <vargaz@gmail.com>
1507
1508         * image-writer.c: Fix pointer directive on ppc64.
1509
1510 2009-05-24  Zoltan Varga  <vargaz@gmail.com>
1511
1512         * image-writer.c (asm_writer_emit_section_change): Avoid using
1513         .bss subsections on ppc too.
1514
1515 2009-05-23  Zoltan Varga  <vargaz@gmail.com>
1516
1517         * image-writer.c: Fix the definition of TARGET_ASM_....
1518         
1519         * image-writer.c: Fix the emission of assembler directives in the last
1520         change.
1521
1522         * mini-ppc.c (mono_arch_emit_exceptions): Increase the size of the
1523         exception throwing code to accomodate ppc64.
1524
1525         * tramp-ppc.c (mono_arch_get_nullified_class_init_trampoline): Increase the
1526         size to work on ppc64 too.
1527
1528         * mini-ppc.h (MonoCompileArch): Enable static rgctx trampolines on ppc64
1529         too.
1530
1531         * image-writer.c: Clean up the #ifdef hell a bit by adding defines for
1532         the assembler dialect instead of using platform specific defines.
1533
1534 2009-05-22  Geoff Norton  <gnorton@novell.com>
1535
1536         * mini-arm.c (get_call_info): If a structure is split between the stack
1537         and argument registers, we should not advance the stack pointer by the entire
1538         native size, but just by the amount that spilled.
1539
1540 2009-05-22  Zoltan Varga  <vargaz@gmail.com>
1541
1542         * mini-arm.c (get_call_info): Handle structures with alignment requirements
1543         correctly.
1544
1545 2009-05-21  Zoltan Varga  <vargaz@gmail.com>
1546
1547         * aot-compiler.c (emit_extra_methods): Encode direct runtime invoke
1548         wrappers normally.
1549         
1550         * aot-compiler.c (add_extra_method): Fix up the collection of extra
1551         methods so wrapper don't get added twice.
1552         (add_generic_instances): Don't add methods of arrays.
1553
1554         * generics.cs: Mark one test as !FULLAOT.
1555
1556 2009-05-21 Rodrigo Kumpera  <rkumpera@novell.com>
1557
1558         * mini-x86.c (emit_move_return_value): Remove unused vars.
1559
1560 2009-05-21 Rodrigo Kumpera  <rkumpera@novell.com>
1561
1562         * mini-x86.c (mono_arch_emit_call): The decompose code now supports
1563         decomposing 8 bytes structs into a LCALL.
1564
1565         * mini-x86.c (emit_move_return_value): We no longer push the vtype
1566         pointer for where to store the returned regs.
1567
1568         * decompose.c (mono_decompose_vtype_opts): Fix the comment to properly
1569         state the concern.
1570
1571         Fixes #471747, #471751 and #4734530 (in fact, it's a bunch of dups).
1572
1573 2009-05-20  Miguel de Icaza  <miguel@novell.com>
1574
1575         * aot-runtime.c (mono_aot_init): Use g_getenv to work on systems
1576         without getenv.
1577
1578 2009-05-21  Zoltan Varga  <vargaz@gmail.com>
1579
1580         * aot-compiler.c (add_wrappers): Add StructureToPtr/PtrToStructure wrappers.
1581
1582         * basic.cs: Move the test_2_cprop_bug () test to generics.cs as it involves
1583         generics.
1584
1585 2009-05-20 Rodrigo Kumpera  <rkumpera@novell.com>
1586
1587         * local-propagation.c (mono_local_cprop): Avoid local propagation
1588         across paired add/sub if the first instruction dest reg is it's
1589         source reg. For example:
1590
1591         int_add_imm R12 <- R12 [1] clobbers: 1
1592         int_sub_imm R42 <- R12 [1] clobbers: 1
1593
1594         The cprop pass would wrongly const prop + 1 to int_sub_imm which doesn't
1595         maintain the math identify.
1596
1597         Fixes #505375.
1598
1599 2009-05-20  Andreia Gaita  <avidigal@novell.com>
1600
1601         * Makefile.am: avoid going on the network just to get the revision,
1602         use git log instead
1603
1604 2009-05-19  Massimiliano Mantione  <massi@ximian.com>
1605
1606         Fixed estimate for short branches on amd64 (they were off mark, and
1607         enabling call prolog-epilog instrumentations caused assertions).
1608         * mini.h (struct MonoBasicBlock): added max_length field to hold the
1609         estimate for the maximum length of this basic block.
1610         * mini-amd64.c:
1611         - mono_arch_emit_prolog: compute max_length for each basic block
1612           (instead of max_offset), and inflate size estimate also for entry bb
1613           in case of code instrumentation.
1614         - mono_arch_output_basic_block: get rid of "cpos" (the current
1615           estimated "position" in the code), and always use "offset" instead,
1616           which is accurate; at the beginning of the function quickly recompute
1617           max_offset for all the remaining blocks, starting from the current
1618           cfg->code_len (which is correct, and not estimated) and using the
1619           estimated block lengths computed previously.
1620
1621 2009-05-17  Zoltan Varga  <vargaz@gmail.com>
1622
1623         * exceptions-ppc.c: Remove the caching from the trampoline creation 
1624         functions, it is already done in the caller.
1625
1626         * mini-trampolines.c (mono_llvm_vcall_trampoline): Fix the llvm build.
1627
1628         * mini-ppc.h mini-arm.h mini-x86.h mini-amd64.h: Add 
1629         MONO_ARCH_GSHARED_SUPPORTED define.
1630
1631         * mini.c (mini_init): Use the MONO_ARCH_GSHARED_SUPPORTED define.
1632
1633         * mini-arm.c mini.c: Get rid of the unused mono_arch_fixup_jinfo ()
1634         function.
1635
1636 2009-05-16  Zoltan Varga  <vargaz@gmail.com>
1637
1638         * jit-icalls.c (mono_helper_compile_generic_method): Get rid of the 
1639         call to mono_marshal_get_rgctx_invoke ().
1640
1641         * mini.c method-to-ir.c mini-trampolines.c: Get rid of the usage of
1642         mono_marshal_get_static_rgctx_invoke (), all platforms which support
1643         gshared use the static rgctx trampolines now.
1644         
1645         * mini.c (mini_init): Call mono_set_generic_sharing_supported () if the
1646         platform supports it.
1647
1648 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
1649
1650         * mini-arm.c (mono_arch_allocate_vars): Correctly save R5 when using AOT.
1651
1652         * aot-compiler.c (emit_method_code): Avoid duplicate labels for methods.
1653
1654 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
1655
1656         * mini-ppc.c (mono_arch_emit_exceptions): Nullify the processed patches.
1657
1658         * tramp-ppc.c (mono_arch_nullify_class_init_trampoline): Implement this
1659         for ppc.
1660
1661 2009-05-15  Massimiliano Mantione  <massi@ximian.com>
1662
1663         Made it possible for mono_arch_instrument_epilog to preserve
1664         argument registers, otherwise instrumenting the "epilogue" before
1665         a tail call would clobber them.
1666         * mini.h: Added "mono_arch_instrument_epilog_full" prototype, which
1667         if like mono_arch_instrument_epilog but with an additional parameter
1668         that states if argument registers must be preserved.
1669         * mini.c: implemented mono_arch_instrument_epilog as a call to
1670         mono_arch_instrument_epilog_full without asking to preserve argument
1671         registers (this makes the existing code work as usual).
1672         * mini-amd64.c:
1673         - mono_arch_instrument_epilog: add parameter to transform it into
1674         mono_arch_instrument_epilog_full, and preserve argument registers
1675         when required.
1676         - mono_arch_output_basic_block, OP_TAILCALL case: call
1677         mono_arch_instrument_epilog_full.
1678         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
1679         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c, mini-x86.c:
1680         only transformed mono_arch_instrument_epilog into
1681         mono_arch_instrument_epilog_full.
1682
1683 2009-05-15  Geoff Norton  <gnorton@novell.com>
1684
1685         * mini-darwin.c: This works on arm now.
1686
1687 2009-05-14  Geoff Norton  <gnorton@novell.com>
1688
1689         * jit.h, driver.c: Allow full-aot to be decided programatically by the
1690         embedding api.
1691
1692 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
1693
1694         * aot-compiler.c (emit_method_code): Skip a few more characters in the debug
1695         label names.
1696
1697         * mini-trampolines.c (mono_magic_trampoline): Handle static rgctx invoke
1698         wrappers during full aot mode correctly.
1699
1700         * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle shared generic
1701         methods correctly.
1702
1703         * aot-compiler.c (mono_aot_method_hash): Use our internal version of
1704         mono_metadata_type_hash ().
1705
1706 2009-05-14  Massimiliano Mantione  <massi@ximian.com>
1707
1708         * mini.h, mini-codegen.c, mini-alpha.c, mini-amd64.c, mini-arm.c,
1709         mini-hppa.h, mini-hppa.c, mini-ia64.c, mini-mips.h, mini-mips.c,
1710         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c, mini-886.c:
1711         Removed MONO_INST_BRLABEL from the instruction flags, and the
1712         remaining code that used it, because we do not support branches inside
1713         basic blocks (and branch target labels) anymore.
1714         * Makefile.am: As part of the above cleanup, remove reference to
1715         BURG files which don't exist anymore.
1716
1717 2009-05-14  Zoltan Varga  <vargaz@gmail.com>
1718
1719         * image-writer.c (asm_writer_emit_local_symbol): Make this a nop on
1720         osx.
1721
1722         * mini-mips.c mini-mips.h exceptions-mips.c: Transition the mips backend
1723         to use mono_arch_throw_corlib_exception.
1724
1725         * mini-ppc.c mini-ppc.h exceptions-ppc.c: Use 
1726         mono_arch_throw_corlib_exception for throwing corlib exceptions.
1727
1728         * aot-runtime.c (decode_patch): Allocate the data for R4/R8 from the
1729         domain mempool.
1730
1731         * mini.c (mono_patch_info_dup_mp): Copy the table of switch targets too.
1732
1733         * aot-compiler.c: Emit a local symbol prefixed with the assembly name 
1734         for the got to make debugging easier and to avoid confusing it with the
1735         system got.
1736         
1737         * aot-compiler.c (emit_method_code): Emit a C style symbol for each
1738         method so a breakpoint can be set when using gdb.
1739
1740 2009-05-13  Zoltan Varga  <vargaz@gmail.com>
1741
1742         * aot-compiler.c (mono_aot_method_hash): Implement this properly based
1743         on mono_method_get_imt_slot ().
1744
1745         * aot-runtime.c (find_extra_method_in_amodule): Get rid of the
1746         num_decodes variables.
1747
1748         * aot-compiler.c (mono_aot_method_hash): Revert part of the last
1749         change as it doesn't seem to work.
1750         
1751         * aot-compiler.c (mono_aot_method_hash): Improve the hashing of
1752         wrappers.
1753
1754 2009-05-12  Zoltan Varga  <vargaz@gmail.com>
1755
1756         * aot-compiler.c mini.c mini-amd64.h mini-arm.h: Kill 
1757         MONO_ARCH_FULL_AOT_IMT_SUPPORTED define, both platforms now support imt.
1758
1759         * mini.c (mini_init): Install mono_aot_get_imt_thunk as the IMT thunk
1760         builder when using full aot.
1761
1762         * mini-amd64.c (mono_arch_build_imt_thunk): Don't handle the full-aot case
1763         here, it is already handled.
1764         
1765         * mini-arm.c (mono_arch_emit_imt_argument): Pass the dynamic imt arg
1766         correctly for IMT.
1767
1768         * aot-compiler.c (arch_emit_imt_thunk): Implement this for ARM.
1769
1770         * mini-arm.h: Enable IMT for full aot.
1771         
1772         * aot-compiler.c (mono_compile_assembly): Don't emit imt thunk if the
1773         arch doesn't support it.
1774
1775         * mini.c (mini_init): Don't disable IMT for full aot if the
1776         architecture supports it.
1777
1778         * mini.h (MonoAotTrampoline): New enum containing the different types
1779         of 'numerous' trampolines.
1780         (MONO_AOT_FILE_VERSION): Bump this.
1781
1782         * aot-compiler.c aot-runtime.c: Unify the handling of specific and
1783         static rgctx trampolines. Add support for full-aot IMT thunks.
1784
1785         * mini-amd64.h: Enable IMT for full aot.
1786
1787         * TestDriver.cs: Add a CategoryAttribute class and an --exclude option
1788         to exclude tests belonging to a category.
1789
1790         * generics.cs: Mark some tests with a !FULLAOT category.
1791
1792         * Makefile.am (fullaotcheck): Run tests with --exclude !FULLAOT. Include
1793         generics tests.
1794
1795 2009-05-11  Zoltan Varga  <vargaz@gmail.com>
1796
1797         * aot-compiler.c (emit_and_reloc_code): Move the implementation of
1798         MONO_PATCH_INFO_GOT_OFFSET to a separate arch-specific function.
1799         (emit_plt): Fix a warning.
1800
1801 2009-05-10  Zoltan Varga  <vargaz@gmail.com>
1802
1803         * aot-compiler.c aot-runtime.c: Fix the build by moving is_shared_got_patch
1804         back into aot-compiler.c to a place where the other functions shared by
1805         the runtime and aot compiler are.
1806         
1807         * aot-compiler.c aot-runtime.c: Emit the got addr using a separate symbol,
1808         as done previously, instead of in MonoAotFileInfo, since pointers might have
1809         alignment requirements.
1810
1811         * mini.h: Bump AOT file format version.
1812
1813 2009-05-10  Miguel de Icaza  <miguel@novell.com>
1814
1815         * aot-runtime.c (mono_aot_is_shared_got_patch): Move this routine
1816         that is used at runtime from the aot-compiler.c, this makes it
1817         work on setups that remove the AOT compiler from the output
1818         image. 
1819
1820 2009-05-09  Zoltan Varga  <vargaz@gmail.com>
1821
1822         * tramp-ppc.c (mono_arch_get_static_rgctx_trampoline): Implement this for
1823         PPC.
1824
1825         * mini-ppc.h: Enable static rgctx trampolines for ppc.
1826
1827         * mini-<ARCH>.h: Kill the MONO_ARCH_ENABLE_EMIT_STATE_OPT define.
1828
1829         * decompose.c (mono_decompose_long_opts): Move the ppc/sparc specific 
1830         stuff to mono_arch_decompose_long_opts ().
1831         (mono_decompose_opcode): Remove some dead code.
1832
1833 2009-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
1834
1835         * method-to-ir.c (mono_method_to_ir): Fix boostrap of non amd64 builds
1836         cmethod can be null for quite a some reasons.
1837
1838 2009-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
1839
1840         * method-to-ir.c (mono_method_to_ir): Fix non amd64 builds.
1841
1842 2009-05-08  Zoltan Varga  <vargaz@gmail.com>
1843
1844         * aot-compiler.c (arch_emit_got_access): Fix the aot-not-supported build.
1845
1846 2009-05-08  Zoltan Varga  <vargaz@gmail.com>
1847
1848         * method-to-ir.c (mono_emit_call_args): Add a 'tail' flag argument.
1849         (mono_method_to_ir): Use MONO_ARCH_USE_OP_TAIL_CALL macro to determine
1850         whenever to make tail calls using OP_TAIL_CALL. Enable support for tail
1851         calls returning structures by addr on amd64.
1852
1853         * mini-amd64.h (MONO_ARCH_USE_OP_TAIL_CALL): New arch-specific macro.
1854
1855         * iltests.il.in: Restructure the tail call tests a bit.
1856         
1857 2009-05-07  Zoltan Varga  <vargaz@gmail.com>
1858
1859         * aot-compiler.c (add_wrappers): Add remoting-invoke-with-check wrappers
1860         for virtual methods too.
1861
1862 2009-05-06  Raja R Harinath  <harinath@hurrynot.org>
1863
1864         * method-to-ir.c (mono_method_to_ir): Revert change of 2009-05-02
1865         due to regression in verifying System.dll.
1866
1867 2009-05-06  Zoltan Varga  <vargaz@gmail.com>
1868
1869         * debug-mini.c (mono_debugger_method_has_breakpoint): Allow breakpoints
1870         in dynamic methods.
1871
1872         * dwarfwriter.c (emit_class_dwarf_info): Add support for generic
1873         instances.
1874
1875         * aot-compiler.c aot-runtime.c: Use our own hash function instead of
1876         g_str_hash () which can change.
1877
1878         * driver.c (mini_regression): Disable optimizations not supported by
1879         the cpu. Fixes #500019.
1880
1881         * aot-runtime.c (mono_aot_get_unwind_info): Fix the --enable-minimal=aot
1882         build.
1883
1884 2009-05-06  Zoltan Varga  <vargaz@gmail.com>
1885
1886         * mini-llvm.c (mono_llvm_emit_method): Update the OP_TLS_GET implementation
1887         to the latest LLVM code.
1888
1889 2009-05-05  Zoltan Varga  <vargaz@gmail.com>
1890
1891         * genmdesc.pl (load_opcodes): Fix this after the TARGET_... changes.
1892
1893 2009-05-04  Zoltan Varga  <vargaz@gmail.com>
1894
1895         * mini-llvm.c (mono_llvm_emit_method): Implement TLS support on 
1896         x86/amd64.
1897
1898         * aot-compiler.c (encode_patch_list): Simplify this considerably as we are
1899         no longer saving offsets, so just save the patch types along with the other
1900         info.
1901         * aot-runtime.c (load_patch_info): Update after the changes to 
1902         encode_patch_list ().
1903         (decode_got_entry): Removed, merged into load_patch_info ().
1904         (is_shared_got_patch): Removed, call the same function from
1905         aot-compiler.c.
1906
1907         * mini.h: Bump aot file format version.
1908         
1909         * aot-compiler.c aot-runtime.c: Resurrect static linking support. Kill the
1910         half-finished no-dlsym code.
1911
1912         * aot-runtime.c (load_method): Kill the old and bit-rotten use_loaded_code
1913         option.
1914
1915         * mini-<ARCH>.h mini-trampolines.c aot-runtime.c: Kill the 
1916         MONO_ARCH_HAVE_CREATE_TRAMPOLINE_FROM_TOKEN define.
1917
1918 2009-05-02  Zoltan Varga  <vargaz@gmail.com>
1919
1920         * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Increase the
1921         buffer length to work with AOT code.
1922
1923         * method-to-ir.c (mono_method_to_ir): Handle loading errors in the
1924         ldfld/stfld opcodes.
1925
1926         * exceptions-x86.c (mono_arch_get_throw_exception_by_name): Simplify this
1927         as it is not used.
1928
1929         * mini-llvm.c mini-x86.c: Implement 32 bit and x86 support.
1930
1931         * ssa.c (mono_ssa_compute): Don't skip I8 values when using LLVM.
1932
1933         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Update to the latest
1934         LLVM API.
1935
1936         * mini.c (mini_method_compile): Set the from_llvm flag in MonoJitInfo
1937         if needed. Don't decompose long operations when using llvm.
1938
1939 2009-05-01  Zoltan Varga  <vargaz@gmail.com>
1940
1941         * aot-compiler.c aot-runtime.c: Use mono_pagesize () instead of the
1942         PAGESIZE constant.
1943
1944         * aot-runtime.c (load_aot_module): Get rid of another mprotect call.
1945
1946 2009-05-03  Martin Baulig  <martin@ximian.com>
1947
1948         * debug-debugger.c (debugger_insert_source_breakpoint): Don't call
1949         mono_debugger_insert_method_breakpoint() since the class init
1950         handler we're inserting at the top of the method already gives us
1951         a notification.
1952
1953 2009-04-30  Zoltan Varga  <vargaz@gmail.com>
1954
1955         * decompose.c (mono_decompose_long_opts): Move the implementation of LNEG
1956         to mono_arch_decompose_long_opts () for x86 and arm.
1957
1958 2009-04-29  Zoltan Varga  <vargaz@gmail.com>
1959
1960         * mini-codegen.c (mono_regstate_alloc_int): Use __x86_64__ instead of
1961         TARGET_AMD64 here.
1962
1963 2009-04-28  Zoltan Varga  <vargaz@gmail.com>
1964
1965         * *.h *.c: Use TARGET_<ARCH> defines instead of __<arch>__ defines in the
1966         JIT code.
1967
1968 2009-04-26  Zoltan Varga  <vargaz@gmail.com>
1969
1970         * aot-runtime.c (mono_aot_create_specific_trampoline): Add a stat for the
1971         number of trampolines used in full-aot mode.
1972
1973         * aot-compiler.c: Add an ntrampolines option to set the number of 
1974         trampolines emitted in full-aot mode.
1975
1976 2009-04-27  Zoltan Varga  <vargaz@gmail.com>
1977
1978         * mini-llvm.c (mono_llvm_emit_method): Implement OP_CHECK_THIS using
1979         a volatile load. Get rid of get_tempname (), llvm assigns names
1980         automatically.
1981
1982         * mini-llvm-cpp.cpp (mono_llvm_build_volatile_load): New instruction
1983         builder function.
1984
1985         * mini-llvm.c (mono_llvm_emit_method): Don't call LLVMGetParam on
1986         a value.
1987
1988         * abcremoval.c (REPORT_ABC_REMOVAL): Don't output messages at verbose
1989         level 1.
1990
1991         * mini-codegen.c (mono_local_regalloc): Prevent sreg1/dreg to be allocated
1992         to the same register as a fixed sreg2. Fixes #497271.
1993
1994         * iltests.il.in: Add a new test.
1995
1996 2009-04-26  Zoltan Varga  <vargaz@gmail.com>
1997
1998         * mini-amd64.c: Use moves instead of pushes for passing arguments on the
1999         stack, since pushes complicate exception handling.
2000
2001         * exceptions-amd64.c (mono_arch_find_jit_info): Don't pop the arguments of
2002         the stack if they are passed using moves.
2003
2004         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add an assert.
2005
2006         * method-to-ir.c (mono_method_to_ir): Disable fast virtual generic methods
2007         when using llvm.
2008
2009         * mini-llvm.c (mono_llvm_emit_method): Call jit icall wrappers, not the 
2010         icalls themselves. Convert arguments of FCOMPARE. Convert the destination
2011         of FMOVE if it is an R4.
2012
2013 2009-04-25  Zoltan Varga  <vargaz@gmail.com>
2014
2015         * mini-ops.h: Add OP_LLVM_OUTARG_VT opcode.
2016
2017         * mini.h (LLVMCallInfo): New structure to store calling convention 
2018         information for the LLVM back end similar to the CallInfo structures in 
2019         the back-ends.
2020
2021         * mini-amd64.c (mono_arch_get_llvm_call_info): New arch function to return
2022         call information in a format usable by LLVM.
2023         (mono_arch_emit_call): Move the LLVM handling code to mono_llvm_emit_call ().
2024
2025         * method-to-ir.c (mono_emit_call_args): Emit calls using 
2026         mono_llvm_emit_call () when compiling using LLVM.
2027
2028         * mini-llvm.c: Implement support for passing/receiving valuetypes. Add
2029         comments to all functions. Fix memory leaks. Add a public init/cleanup
2030         function.
2031
2032         * mini.c: Call the llvm init/cleanup functions in mini_init()/cleanup().
2033
2034         * method-to-ir.c (handle_array_new): Disable llvm when calling the vararg
2035         mono_array_new_va () jit icall.
2036         
2037 Fri Apr 24 16:44:08 CEST 2009 Paolo Molaro <lupus@ximian.com>
2038
2039         * Makefile.am, genmdesc.c, genmdesc.pl: tiny refactor to allow
2040         multiple machine description files to be specified.
2041         * mini-ops.h: fixes for cross-compilation.
2042
2043 2009-04-22  Miguel de Icaza  <miguel@novell.com>
2044
2045         * aot-runtime.c (make_writable): Use mono_mprotect to simplify
2046         some porting work.
2047
2048 2009-04-22  Zoltan Varga  <vargaz@gmail.com>
2049
2050         * method-to-ir.c (mono_method_to_ir): Force init_locals to be TRUE
2051         to prevent asserts in various passes. Fixes #497220.
2052
2053 2009-04-21  Zoltan Varga  <vargaz@gmail.com>
2054
2055         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove
2056         a racy assert.
2057
2058         * aot-compiler.c aot-runtime.c: Emit the unwind info into a separate
2059         table to avoid duplicates.
2060
2061         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
2062         
2063         * aot-compiler.c (emit_method_code): Avoid writing symbols if the nodebug
2064         option is used.
2065
2066 2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>
2067
2068         * mini.c (mini_method_verify): Fail fulltrust code if the exception
2069         is for method or field access.
2070
2071 2009-04-20  Zoltan Varga  <vargaz@gmail.com>
2072
2073         * mini-llvm-cpp.cpp (mono_llvm_dump_value): New helper function to print
2074         a Value to stdout.
2075
2076         * mini-llvm.c (mono_llvm_emit_method): Use it.
2077         
2078         * mini-llvm.c (type_to_llvm_type): Fix the mapping of enums.
2079         (mono_llvm_emit_method): Add support for CAS. Fix handling of CSET opcodes
2080         on volatile values.
2081
2082         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add support for 
2083         synchronized methods.
2084
2085         * mini.c (mini_method_compile): Disable LLVM for dynamic methods.
2086
2087         * mini.c (mini_method_compile): Enable ABCREM when running with LLVM.
2088
2089         * mini-llvm.c (mono_llvm_emit_method): Add support for OP_LOADI4_MEM/
2090         OP_LOADI8_MEM.
2091
2092         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Add a MONO_LLVM env variable
2093         allowing some options to be set dynamically.
2094
2095 2009-04-19  Zoltan Varga  <vargaz@gmail.com>
2096
2097         * mini-llvm.c (mono_llvm_emit_method): Handle compares followed by an
2098         unconditional branch.
2099
2100         * mini.h (MonoTrampolineType): Add new trampoline type 
2101         'MONO_TRAMPOLINE_LLVM_VCALL' which handles virtual calls made from LLVM
2102         compiled code.
2103
2104         * mini-trampolines.c (mono_llvm_vcall_trampoline): New C trampoline 
2105         function.
2106
2107         * mini-trampolines.c (mono_create_llvm_vcall_trampoline): New trampoline
2108         creation function.
2109
2110         * mini.c (mini_init): Avoid using the common vtable trampoline when LLVM
2111         is enabled. Instead, use the llvm vcall trampoline.
2112         
2113         * mini-trampolines.c (mono_get_vcall_slot_addr): New helper function.
2114
2115         * mini-trampolines.c tramp-amd64.c tramp-x86.c: Use it.
2116         
2117         * mini-<ARCH>.c: Get rid of the identical mono_arch_get_vcall_slot_addr ()
2118         functions.
2119
2120         * mini-<ARCH>.h mini-trampolines.c mini.c: Get rid of 
2121         MONO_ARCH_COMMON_VTABLE_TRAMPOLINE, it is supported by all archs.
2122
2123         * mini-ia64.c (mono_arch_lowering_pass): Null out the sregs of the
2124         OP_IA64_CSET opcode.
2125
2126         * mini.c: Fix a warning.
2127
2128         * mini-llvm.c (mono_llvm_emit_method): Convert arguments of SWITCH and
2129         THROW to the appropriate llvm type.
2130
2131 2009-04-18  Zoltan Varga  <vargaz@gmail.com>
2132
2133         * mini.c (mini_method_compile): Add statistics for methods JITted
2134         with/without LLVM.
2135
2136 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
2137
2138         * method-to-ir.c: Fix the computation of ins_sreg_counts for ia64
2139         OP_IA64_CMP_<cond>_IMM opcodes.
2140
2141 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
2142
2143         * mini-llvm.c (emit_cond_system_exception): Implement throwing of
2144         corlib exceptions.
2145
2146         * dwarfwriter.c (mono_dwarf_writer_emit_method): Handle --regression
2147         correctly.
2148
2149         * mini-llvm.c (type_to_llvm_type): Avoid accessing t->data.klass for
2150         GENERICINST.
2151
2152 2009-04-17  Atsushi Enomoto  <atsushi@ximian.com>
2153
2154         * mini-exceptions.c : add thread id to EXCEPTION trace message.
2155
2156 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
2157
2158         * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Fix AOT
2159         support.
2160
2161         * tramp-x86.c (mono_arch_get_unbox_trampoline): Implement static
2162         rgctx invoke trampolines for x86.
2163
2164         * mini-x86.c (mono_arch_output_basic_block): Add a few nops before
2165         indirect calls to simplify get_vcall_slot_addr (). Fixes #494567.
2166         (mono_arch_get_vcall_slot): Simplify this.
2167
2168 2009-04-16  Zoltan Varga  <vargaz@gmail.com>
2169
2170         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Move the calls to
2171         mono_debug_add_delegate_trampoline () to get_delegate_invoke_impl ().
2172
2173 2009-04-14  Zoltan Varga  <vargaz@gmail.com>
2174
2175         * aot-compiler.c tramp-arm.c mini-arm.c: Implement static rgctx 
2176         trampolines for ARM. Add full-aot support for delegate invokes for ARM.
2177
2178         * mini-trampolines.c (mono_magic_trampoline): Fix the build.
2179
2180         * liveness.c (visit_bb): Remove a needless assert.
2181
2182 2009-04-13  Zoltan Varga  <vargaz@gmail.com>
2183
2184         * mini-trampolines.c (mono_create_delegate_trampoline): Delegate the
2185         full aot support to the arch specific code.
2186
2187         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Add full-aot support.
2188
2189         * aot-compiler.c (emit_trampolines): Emit delegate invoke impl trampolines.
2190
2191         * aot-compiler.c (emit_named_code): Rename this to 'emit_trampoline'.
2192         
2193         * mini-amd64.c (mono_arch_get_delegate_invoke_impls): New function to
2194         collect information about the delegate invoke impl trampolines.
2195
2196         * mini.h (MonoAotTrampInfo): New structure collecting the information needed
2197         to save trampolines during full-aot mode.
2198
2199         * mini-trampolines.c (mono_create_static_rgctx_trampoline): New trampoline
2200         creation function which returns a trampoline which sets the rgctx
2201         argument.
2202         (mono_magic_trampoline): Use the rgctx trampoline instead of an rgctx
2203         wrapper if possible.
2204         (mono_delegate_trampoline): Ditto.
2205
2206         * mini.c (mono_jit_runtime_invoke): Ditto.
2207
2208         * tramp-amd64.c: Add an implemention of static rgctx trampolines for AMD64.
2209         
2210         * aot-compiler.c aot-runtime.c: Add support for static rgctx trampolines.
2211
2212         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
2213         
2214 2009-04-12  Zoltan Varga  <vargaz@gmail.com>
2215
2216         * mini-ia64.c (mono_arch_lowering_pass): Use NULLIFY_INS instead of
2217         just setting the opcode to OP_NOP.
2218
2219 2009-04-11  Zoltan Varga  <vargaz@gmail.com>
2220
2221         * mini.c (mini_method_compile): Put the last change inside an 
2222         #ifdef MONO_ARCH_HAVE_LIVERANGE_OPS.
2223         
2224         * mini.c (mini_method_compile): Disable sharing of stack slots/registers
2225         and extend live ranges to cover the whole method when using xdb.
2226
2227         * jit-icalls.c (ldvirtfn_internal): Avoid creating rgctx wrappers here,
2228         do it in the trampolines.
2229
2230         * mini-trampolines.c (mono_magic_trampoline): Add an rgctx wrapper if
2231         needed.
2232
2233         * mini-trampolines.c (mono_delegate_trampoline): Ditto.
2234         
2235         * method-to-ir.c (mono_method_to_ir): Avoid using the fast virtual method
2236         call code in full-aot mode since IMT is disabled there.
2237         (mono_method_to_ir): Inline ldfld wrappers which return structures too, the
2238         new JIT no longer has that restriction.
2239
2240         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
2241
2242         * aot-compiler.c (emit_extra_methods): Emit the wrapper method names in
2243         a more compact format.
2244         (mono_aot_wrapper_name): New function to return a unique name for a
2245         wrapper method, also used by the AOT runtime.
2246
2247         * aot-runtime.c (find_extra_method_in_amodule): Update after the changes to
2248         aot-compiler.c.
2249
2250         * aot-compiler.c (add_generic_class): Add the helper methods from T[]
2251         when a ICollection<T> etc is encountered.
2252         (add_generic_instances): Process method arguments/locals too.
2253         (emit_trampolines): Emit unbox trampolines for extra methods too. Shorten
2254         trampoline names.
2255
2256         * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle extra methods too.
2257         
2258 2009-04-10  Zoltan Varga  <vargaz@gmail.com>
2259
2260         * aot-compiler.c: Disable the AOT compiler if the JIT is disabled.
2261
2262         * dwarfwriter.c (emit_type): Emit byref to reference types as 'int' for now.
2263
2264         * decompose.c (mono_decompose_opcode): Make this return a MonoInst*
2265         representing the result of the decomposition. Nullify instructions
2266         instead of setting them to OP_NOP since nops can't have registers
2267         set.
2268
2269 2009-04-09  Zoltan Varga  <vargaz@gmail.com>
2270
2271         * aot-compiler.c (mono_compile_assembly): Split this huge function into
2272         smaller parts. Add 'nodebug' option to prevent generation of DWARF debug
2273         info. Strip 'mapping symbols' on ARM.
2274
2275         * iltests.il.in (test_0_fconv_to_i): Disable this on ARM too.
2276         
2277         * genmdesc.pl: Applied patch by Martin Fuzzey (mfuzzey@parkeon.com). Sync
2278         this with the native genmdesc.
2279
2280 2009-04-08  Bill Holmes  <billholmes54@gmail.com>
2281
2282         * aot-runtime.c:  Fixing the MSVC build.
2283
2284         Code is contributed under MIT/X11 license.
2285
2286 2009-04-08  Zoltan Varga  <vargaz@gmail.com>
2287
2288         * mini-llvm.c (mono_llvm_emit_method): Pass i1/i2 arguments as i4 since 
2289         JITted code depends on it.
2290
2291 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
2292
2293         * aot-compiler.c: Use new MonoGenericParam accessors.
2294
2295 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
2296
2297         Reduce memory usage and improve correctness wrt MonoGenericParam
2298         * aot-runtime.c (decode_klass_ref): Simplify generic parameter
2299         handing.  Avoid allocating MonoGenericParams, but use the ones in
2300         the container itself.
2301
2302 2009-04-07  Miguel de Icaza  <miguel@novell.com>
2303
2304         * tasklets.c: Return exceptions in the out argument.
2305
2306 2009-04-08  Zoltan Varga  <vargaz@gmail.com>
2307
2308         * mini-llvm.c (mono_llvm_emit_method): Fix alignment in the LOCALLOC_IMM
2309         opcode. Use pointer types in more places instead of casting them to 
2310         integers.
2311
2312         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Create a pass manager to run
2313         optimizations.
2314         (mono_llvm_optimize_method): New helper function to optimize a method.
2315
2316         * method-to-ir.c (mono_emit_widen_call_res): Extract the call result 
2317         widening code so it could be called from more places.
2318         (mono_method_to_ir): Call mono_emit_widne_call_res () in several more
2319         code paths in the call opcodes.
2320
2321 Mon Apr 6 14:19:54 CEST 2009 Paolo Molaro <lupus@ximian.com>
2322
2323         * exceptions-amd64.c, mini-amd64.h: amd64 support code for continuations.
2324
2325 2009-04-06  Zoltan Varga  <vargaz@gmail.com>
2326
2327         * dwarfwriter.c: Use _ to separate class name 
2328         components as gdb can't handle '.'. Represent reference variables
2329         as 'class <NAME>&'.
2330         
2331         * mini.h (MonoCompile): Add locals_min_stack_offset/locals_max_stack_offset.
2332
2333         * mini-amd64.c (mono_arch_allocate_vars): Save min/max stack offset.
2334         
2335         * mini-gc.c: New file, contains the SGEN GC related parts of the JIT.
2336
2337         * gc-test.cs: New file with GC stack marking tests.
2338         
2339         * mini-arm.c (mono_arch_output_basic_block): Fix int->float conversion of
2340         negative numbers for vfp.
2341
2342         * basic-float.cs: Add a test.
2343         
2344 Mon Apr 6 14:12:10 CEST 2009 Paolo Molaro <lupus@ximian.com>
2345
2346         * exceptions-x86.c, mini-x86.h: x86 support code for continuations.
2347
2348 Mon Apr 6 14:09:53 CEST 2009 Paolo Molaro <lupus@ximian.com>
2349
2350         * tasklets.h, tasklets.c, mini.h, mini.c, Makefile.am: arch-indep
2351         part of tasklet/continuation support.
2352
2353 2009-04-05  Zoltan Varga  <vargaz@gmail.com>
2354
2355         * mini-llvm.c (mono_llvm_emit_method): Move the handling of
2356         amd64 opcodes inside an ifdef.
2357
2358         * dwarfwriter.c: Emit inheritance information for classes, emit fields
2359         of complex types.
2360         
2361         * dwarfwriter.c (emit_type): Emit the class info for classes.
2362
2363 2009-04-04  Zoltan Varga  <vargaz@gmail.com>
2364
2365         * Makefile.am (AM_CXXFLAGS): Add GLIB_CFLAGS to this.
2366
2367         * mini-llvm-cpp.h: New header file for mini-llvm-cpp.cpp.
2368
2369         * mini-llvm.c: Remove unused fields from EmitContext, fix memory leaks.
2370
2371         * ssa.c (mono_ssa_compute): Fix some memory leaks.
2372
2373 2009-04-03  Zoltan Varga  <vargaz@gmail.com>
2374
2375         * mini.c mini-amd64.c method-to-ir.c: Use COMPILE_LLVM in a few more places.
2376
2377         * mini-llvm.c: Update comments.
2378
2379         * mini.h (COMPILE_LLVM): New macro.
2380
2381         * decompose.c (mono_decompose_opcode): Use the COMPILE_LLVM macro.
2382
2383         * ssa.c (mono_ssa_compute): Ditto.
2384         
2385         * unwind.c (mono_unwind_get_ops_from_fde): New helper function to extract
2386         the unwind ops from a DWARF FDE.
2387
2388         * mini-llvm.c: Implement generation of unwind info for LLVM compiled
2389         methods by extracting the dwarf unwind ops from the unwind info generated
2390         by LLVM.
2391         
2392         * mini-llvm.c (mono_llvm_emit_method): Enable support for non-IMT virtual
2393         calls.
2394
2395         * mini-amd64.c (mono_arch_get_vcall_slot): Handle more kinds of the SIB
2396         addressing modes.
2397
2398 2009-04-02  Zoltan Varga  <vargaz@gmail.com>
2399
2400         * Makefile.am (llvm_sources): Enable this.
2401
2402         * mini.c (mini_method_compile): Add support for compiling with LLVM, 
2403         failing back to the JIT if something cannot be handled.
2404
2405         * mini-amd64.c (mono_arch_emit_call): Emit the arguments more simple when
2406         compiling with LLVM.
2407
2408         * decompose.c (mono_decompose_opcode): Avoid decomposing some opcodes when
2409         compiling with LLVM.
2410
2411         * method-to-ir.c (mono_method_to_ir): Avoid decomposing SWITCH when 
2412         compiling with LLVM.
2413
2414         * mini-ops.h: Add a few opcodes needed by LLVM.
2415
2416         * dwarfwriter.c (mono_dwarf_writer_emit_method): Avoid crashes if the method
2417         has no unwind info.
2418
2419         * mini-llvm.c mini-llvm-cpp.cpp: New files containing the experimental llvm
2420         backend.
2421
2422         * mini-arm.c (mono_arch_output_basic_block): Fix the ARM_FPU_NONE build.
2423
2424         * mini-arm.h mini-arm.c cpu-arm.md: Finish VFP support.
2425
2426 2009-04-01  Mark Probst  <mark.probst@gmail.com>
2427
2428         * regalloc.h, mini-codegen.c: Make vassign members gint32 to fix
2429         ridiculously large methods.
2430
2431 2009-03-31  Martin Baulig  <martin@ximian.com>
2432
2433         * debug-debugger.c (debugger_remove_breakpoint): Call
2434         mono_debugger_remove_class_init_callback ().
2435
2436 2009-03-31  Zoltan Varga  <vargaz@gmail.com>
2437
2438         * aot-compiler.c (mono_compile_assembly): Call img_writer_emit_start ()
2439         right before emitting code, not at the start.
2440
2441         * mini.c (mono_postprocess_patches): Extract this into a separate function
2442         from mono_codegen ().
2443
2444         * ssa.c (mono_ssa_compute): Set ins->klass for every PHI node, handle
2445         byref types correctly.
2446
2447 2009-03-30  Zoltan Varga  <vargaz@gmail.com>
2448
2449         * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix a crash introduced
2450         by the last change.
2451
2452 2009-03-29  Zoltan Varga  <vargaz@gmail.com>
2453
2454         * mini-amd64.c (mono_arch_output_basic_block): Emit a few nops before 
2455         indirect calls, this avoids problems where get_vcall_slot () would get
2456         confused by the native code for the instruction preceeding the call.
2457         (mono_arch_get_vcall_slot): Simplify this.
2458         (mono_arch_emit_imt_argument): Remove this, it is no longer needed.
2459
2460         * mini-ops.h: Fix the definitions of the OP_IA64 opcodes, since the local
2461         register allocator now seems to depend on them instead of the data in
2462         cpu-<ARCH>.md.
2463
2464         * mini.c (mini_method_compile): Throw the correct type of exception if
2465         mono_method_get_header () fails because of a loading error.
2466
2467 2009-03-28  Zoltan Varga  <vargaz@gmail.com>
2468
2469         * mini.c (mini_method_compile): Clear the loader error if the method
2470         header cannot be decoded.
2471
2472         * mini-trampolines.c (mono_magic_trampoline): Handle generic virtual 
2473         interface methods on proxies correctly.
2474
2475         * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix handling of the
2476         this argument for vtype methods. Add precise liveness info for arguments.
2477
2478         * mini-codegen.c (mono_print_ins_index): Print the vreg of the
2479         LIVERANGE_START/END opcodes.
2480
2481         * method-to-ir.c (mono_spill_global_vars): Fix liverange calculation
2482         for arguments and values in registers.
2483
2484 2009-03-27  Zoltan Varga  <vargaz@gmail.com>
2485
2486         * method-to-ir.c (mono_method_to_ir): Disable tail calls for calls which
2487         return a valuetype. Fixes #487518.
2488
2489         * iltests.il: Add a test.
2490         
2491         * aot-compiler.c: Use mono_thread_create () to create helper threads.
2492
2493         * mini-trampolines.c (mono_delegate_trampoline): Handle static delegates
2494         closed over a null reference correctly.
2495
2496 2009-03-26  Zoltan Varga  <vargaz@gmail.com>
2497
2498         * method-to-ir.c (mono_handle_global_vregs): Fix support for ternary ops.
2499
2500 2009-03-25  Mark Probst  <mark.probst@gmail.com>
2501
2502         * mini-codegen.c (mono_local_regalloc): Don't let sregs get
2503         allocated to the same registers as fixed sregs.
2504
2505 2009-03-24  Mark Probst  <mark.probst@gmail.com>
2506
2507         * mini-ops.h: New ternary ATOMIC_CAS ops replace the old
2508         ATOMIC_CAS_IMM ops.
2509
2510         * method-to-ir.c: Handle more cases for
2511         Interlocked.CompareExchange.
2512
2513         * cpu-x86.md, mini-x86.c, mini-x86.h, cpu-amd64.md, mini-amd64.c,
2514         mini-amd64.h, cpu-ppc.md, cpu-ppc64.md, mini-ppc.c, mini-ppc.h:
2515         ATOMIC_CAS implementations for x86, AMD64, PPC and PPC64.
2516
2517 2009-03-23  Zoltan Varga  <vargaz@gmail.com>
2518
2519         * aot-runtime.c (decode_method_ref): Fix a warning.
2520
2521         * unwind.c (mono_unwind_frame): Ditto.  
2522
2523 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
2524
2525         * aot-compiler.c (arch_emit_unbox_trampoline): Fix the binary writer support.
2526         (mono_compile_assembly): Enable the binary writer for full-aot as well.
2527
2528         * image-writer.c (do_reloc): Add support for the JUMP24 relocation,
2529         fix the handling of large values in the ALU_PC_G0_NC relocation.
2530
2531 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
2532
2533         * local-propagation.c method-to-ir.c local-propagation.c: Fix warnings.
2534
2535 2009-03-22  Mark Probst  <mark.probst@gmail.com>
2536
2537         * method-to-ir.c (mono_spill_global_vars): Support for ternary
2538         ops.
2539
2540 2009-03-22  Mark Probst  <mark.probst@gmail.com>
2541
2542         * method-to-ir.c: MINI_OP3 needs a comma.
2543
2544         * method-to-ir.c, mini.h, mini.c: Remove
2545         mono_init_op_sreg_counts ().
2546
2547 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
2548
2549         * mini-arm.c (mono_arch_output_basic_block): Fix aot support in
2550         OP_JMP.
2551         
2552         * mini-arm.c (mono_arch_build_imt_thunk): Disable the !fail_tramp
2553         assertion.
2554
2555         * mini-ops.h: Fix arguments of the MEMINDEX opcodes.
2556
2557         * mini-amd64.c (mono_arch_build_imt_thunk): Simplify the fail handling
2558         code somewhat.
2559
2560 2009-03-21  Mark Probst  <mark.probst@gmail.com>
2561
2562         * cfold.c, cprop.c, decompose.c, genmdesc.c, helpers.c, ir-emit.h,
2563         liveness.c, local-propagation.c, method-to-ir.c, mini-codegen.c,
2564         mini.c, mini.h, simd-intrinsics.c, ssa.c: Support for ternary IR
2565         operations.
2566
2567 2009-03-20  Zoltan Varga  <vargaz@gmail.com>
2568
2569         * driver.c: Change location of gc_wrapper.h.
2570
2571         * method-to-ir.c (mono_find_block_region): Handle try clauses nested
2572         inside finally clauses correctly. Fixes #485721.
2573
2574         * mini.c (mono_find_spvar_for_region): This needs to handle try regions
2575         after the change above.
2576
2577         * exceptions.cs: Add a test.
2578         
2579 2009-03-19  Zoltan Varga  <vargaz@gmail.com>
2580
2581         * unwind.c (mono_unwind_ops_encode): Increase the size of the encode buffer.
2582
2583         * mini-amd64.c (mono_arch_emit_epilog): Remove the encoding of stack size
2584         into cfg->used_int_regs, it is not needed with the dwarf unwinder.
2585         (mono_arch_compute_omit_fp): Remove the emit_epilog () workaround.
2586
2587         * mini-amd64.c (mono_arch_compute_omit_fp): Add another check to avoid hitting
2588         the stack_alloc_size < (1 << 16) assertion in emit_prolog ().
2589
2590 2009-03-19  Sebastien Pouliot  <sebastien@ximian.com>
2591
2592         * method-to-ir.c: Allow CoreCLR to throw FieldAccessException. 
2593         Simplify logic for ensure_method_is_allowed_to_call_method. 
2594         Handle wrappers on callers.
2595
2596 2009-03-19  Zoltan Varga  <vargaz@gmail.com>
2597
2598         * Makefile.am (fullaotcheck): Don't run the generics tests, some of
2599         them don't run yet.
2600
2601         * basic-simd.cs: Fix the names of some test methods.
2602
2603 2009-03-18  Geoff Norton  <gnorton@novell.com>
2604
2605         * mini.c: Only chain sigfpe if it wasn't generated in mangaed code.
2606
2607 2009-03-18  Zoltan Varga  <vargaz@gmail.com>
2608
2609         * dwarfwriter.c (token_handler): Fix a crash caused by the last change.
2610
2611 2009-03-17  Jb Evain  <jbevain@novell.com>
2612
2613         * driver.c: remove now uneeded call to mono_gc_base_init before
2614         mono_profiler_load.
2615
2616 2009-03-17  Jb Evain  <jbevain@novell.com>
2617
2618         * dwarfwriter.c (token_handler): handle more cases.
2619
2620 2009-03-17  Sebastien Pouliot  <sebastien@ximian.com> 
2621
2622         * method-to-ir.c: Remove more dead code (that was required only
2623         because of method_is_safe). Fix compiler warnings.
2624
2625 2009-03-17  Sebastien Pouliot  <sebastien@ximian.com>
2626
2627         * method-to-ir.c: Remove unneeded/useless method_is_safe
2628         http://lists.ximian.com/archives/public/mono-devel-list/2009-March/031404.html
2629
2630 2009-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
2631
2632         * mini.c (mini_method_compile): Print the method been compiled with
2633         verbose level 1 instead of 3 as this helps a lot debugging JIT crashes
2634         for people not familiar with the runtime.
2635
2636 2009-03-17  Zoltan Varga  <vargaz@gmail.com>
2637
2638         * mini-exceptions.c (get_generic_info_from_stack_frame): Avoid returning
2639         a managed object which is later put into a GList. Return its class instead.
2640
2641         * mini.c (mono_allocate_stack_slots_full): Avoid sharing ref and non-ref
2642         stack slots when using sgen.
2643
2644 2009-03-16  Zoltan Varga  <vargaz@gmail.com>
2645
2646         * dwarfwriter.c (emit_line_number_info): Really fix the eglib build.
2647
2648 2009-03-14  Zoltan Varga  <vargaz@gmail.com>
2649
2650         * local-propagation.c (reg_is_softreg_no_fpstack): Use >= instead of
2651         > so it works on the first vreg as well.
2652
2653 2009-03-13  Zoltan Varga  <vargaz@gmail.com>
2654
2655         * dwarfwriter.c (emit_line_number_info): Disable an assert which seems to
2656         trigger randomly.
2657
2658         * aot-compiler.c: Get rid of xdebug_lock (), use the loader lock instead.
2659         
2660         * dwarfwriter.c (emit_line_number_info): Fix eglib build as eglib doesn't
2661         implement GArray.
2662
2663 2009-03-12  Zoltan Varga  <vargaz@gmail.com>
2664
2665         * dwarfwriter.c (emit_line_number_info): Optimize the computation of the
2666         native->IL offset mapping.
2667
2668 2009-03-11  Zoltan Varga  <vargaz@gmail.com>
2669
2670         * mini-amd64.c (mono_arch_output_basic_block): Fix % 1. Fixes #484323.
2671
2672         * basic.cs: Add a test.
2673
2674 2009-03-11  Mark Probst  <mark.probst@gmail.com>
2675
2676         * mini-x86.c (mono_arch_output_basic_block): Use different
2677         registers in case the ones we want to overwrite are used by the
2678         other operand.  Fixes regression in #480807.
2679
2680 2009-03-10  Zoltan Varga  <vargaz@gmail.com>
2681
2682         * aot-compiler.c (mono_compile_assembly): Make the output less verbose.
2683
2684         * dwarfwriter.c (emit_line_number_info): The line number info for
2685         IL code was off by one. Fix that.
2686
2687         * mini-s390x.c: Fix support for vtypes whose addresses are passed on the
2688         stack.
2689
2690 2009-03-09  Mark Probst  <mark.probst@gmail.com>
2691
2692         Contributed under the terms of the MIT/X11 license by Steven
2693         Munroe <munroesj@us.ibm.com>.
2694
2695         * mini-ppc.c: Correct handling of OP_LOADI4_MEMINDEX for ppc64.
2696         Fixes #483462.
2697
2698 2009-03-08  Zoltan Varga  <vargaz@gmail.com>
2699
2700         * dwarfwriter.c (token_handler): Decode method references in non-wrappers
2701         as well.
2702
2703 2009-03-06  Zoltan Varga  <vargaz@gmail.com>
2704
2705         * method-to-ir.c (mono_method_to_ir): Check for type load exceptions in
2706         the delegate ctor handling code. Fixes #482638.
2707         
2708         * method-to-ir.c (mini_emit_memset): Fix the handling of size '3'. Fixes
2709         #481458.
2710
2711         * iltests.il.in: Add a test.
2712         
2713         * mini-darwin.c (mono_chain_signal): Remove this, it is already in
2714         mini-posix.c.
2715
2716 2009-03-05  Mark Probst  <mark.probst@gmail.com>
2717
2718         * mini-trampolines.c (mono_create_jump_trampoline): If the method
2719         is shared generic code, return the trampoline, even if the method
2720         has already been compiled.  Fixes #479763.
2721
2722         * mini.c, mini.h: New function
2723         mono_jit_find_compiled_method_with_jit_info() which is the same as
2724         mono_jit_find_compiled_method() but also returns the jit info.
2725
2726 2009-03-05  Mark Probst  <mark.probst@gmail.com>
2727
2728         * method-to-ir.c (mono_method_to_ir): Only force the vtable var
2729         for methods which actually have one.  For all other methods, make
2730         sure the this argument var is live the whole method.
2731
2732         * mini.c (mini_method_compile): Every shared method has a
2733         this/vtable/mrgctx info.  Fixes #480807.
2734
2735 2009-03-05  Mark Probst  <mark.probst@gmail.com>
2736
2737         * mini-ppc.c (mono_arch_build_imt_thunk): Add support for mixed
2738         generic/imt thunks where some entries branch through the vtable,
2739         while other entries branch directly.
2740
2741 2009-03-05  Zoltan Varga  <vargaz@gmail.com>
2742
2743         * mini-darwin.c (mono_chain_signal): Define this to fix the build.
2744
2745         * mini-windows.c: Ditto.
2746         
2747         * mini.c (mono_jit_runtime_invoke): Speed up the invoking of parameterless
2748         ctors.
2749
2750 2009-03-04  Zoltan Varga  <vargaz@gmail.com>
2751
2752         * dwarfwriter.c (emit_line_number_info): Add some debug code to help track
2753         down an assert.
2754
2755 2009-03-04  Mark Probst  <mark.probst@gmail.com>
2756
2757         * method-to-ir.c: Don't inline methods that use JMP.  Fixes
2758         #481403.
2759
2760 2009-03-04  Mark Probst  <mark.probst@gmail.com>
2761
2762         * exceptions-x86.c: Include debug-mini.h - fixes build.
2763
2764 2009-03-04  Martin Baulig  <martin@ximian.com>
2765
2766         * debug-mini.c: Clean up the exception API and add documentation.
2767         (mono_debugger_handle_exception): New public method; this is
2768         called when throwing an exception or encountering an unhandled one.
2769         (mono_debugger_call_exception_handler): Formerly known as
2770         mono_debugger_handle_exception(); this is used to tell the
2771         debugger that we're about to invoke an exception handler.
2772
2773 2009-03-04  Martin Baulig  <martin@ximian.com>
2774
2775         * debug-mini.c (mono_debugger_runtime_invoke): Moved here from
2776         ../metadata/mono-debug-debugger.c; save and reset exception state.
2777
2778 2009-03-02  Martin Baulig  <martin@ximian.com>
2779
2780         * debug-mini.c: Moved the debugger exception handling here from
2781         ../metadata/mono-debug-debugger.c.
2782
2783         * debug-mini.h
2784         (MonoDebuggerExceptionAction): New exception typedef.
2785
2786         * debug-mini.c
2787         (MonoDebuggerThreadInfo): Added `MonoObject *last_exception'.
2788
2789         * exceptions-amd64.c
2790         (mono_amd64_throw_exception): Use the new debugger exception
2791         handling code.
2792
2793         * mini-exceptions.c
2794         (mono_handle_exception_internal): Don't call
2795         mono_debugger_unhandled_exception() here.
2796
2797 2009-03-03  Zoltan Varga  <vargaz@gmail.com>
2798
2799         * mini.c aot-compiler.c: Update after the changes to 
2800         mono_marshal_get_runtime_invoke ().
2801
2802         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): 
2803         Virtual generic methods might not have method->slot set, work around
2804         that.
2805
2806         * generics.cs: Add a test.
2807
2808 2009-03-02  Geoff Norton  <gnorton@novell.com>
2809
2810         * mini.c:
2811         * driver.c: Allow signal chaining of SIGFPE as well.
2812
2813 2009-03-02  Zoltan Varga  <vargaz@gmail.com>
2814
2815         * mini-trampolines.c (mono_generic_virtual_remoting_trampoline): Update
2816         this since it now receives the method not its generic context in the
2817         IMT reg.
2818
2819         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for mixed
2820         generic/imt thunks where some entries branch through the vtable, while
2821         other entries branch directly.
2822
2823         * mini-x86.c (mono_arch_build_imt_thunk): Ditto.
2824
2825         * method-to-ir.c (mono_method_to_ir): Enable fast virtual generic call 
2826         support for interface methods as well.
2827
2828         * mini-trampolines.c: Add support for virtual generic methods in interfaces
2829         using the normal IMT thunks.
2830
2831         generics.cs: Add new tests.
2832         
2833         * method-to-ir.c (mono_method_to_ir): Pass the method instead of
2834         the generic inst to the generic imt thunks. This fixes AOT support, 
2835         improves consistency with the normal IMT thunks, and makes it easier to
2836         add support for interface generic virtual methods later.
2837
2838         * mini-trampolines.c (mono_magic_trampoline): Ditto.    
2839         
2840 2009-02-28  Zoltan Varga  <vargaz@gmail.com>
2841
2842         * driver.c (mono_set_signal_chaining): New public API function to enable
2843         signal chaining on POSIX platforms.
2844
2845         * mini-posix.c mini.c: Applied a variant of a patch by Simon Rowland 
2846         (si@lindenlab.com) to implement signal chaining. The original patch was
2847         contributed under the MIT X/11 license:
2848         https://bugzilla.novell.com/show_bug.cgi?id=318894
2849
2850 2009-02-27  Zoltan Varga  <vargaz@gmail.com>
2851
2852         * iltests.il.in (test_0_implicit_float_to_double_conversion): Disable this
2853         too until it can be made to run on amd64.
2854
2855 2009-02-26  Zoltan Varga  <vargaz@gmail.com>
2856
2857         * mini-x86.c (mono_arch_get_this_arg_from_call): Avoid expensive calls
2858         to  get_generic_context_from_code () + get_call_info () if possible.
2859
2860 2009-02-25  Zoltan Varga  <vargaz@gmail.com>
2861
2862         * mini-exceptions.c (mono_handle_native_sigsegv): Implement the
2863         suspend-on-sigsegv functionality.
2864
2865         * mini.c (mini_parse_debug_options): Add a new 'suspend-on-sigsegv' option
2866         to suspend when a native SIGSEGV is received. This is useful for debugging
2867         crashes which don't happen under gdb, since a live process contains more
2868         information than a core file.
2869
2870         * mini-exceptions.c (mono_print_thread_dump): Use 
2871         MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX instead of platform defines.
2872
2873         * mini-x86.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): New define.
2874
2875         * mini-amd64.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): Ditto.
2876         
2877         * basic-float.cs: Disable the tests which currently fail on amd64.
2878
2879         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass a non-null 
2880         value to mono_arch_patch_callsite () to fix crashes.
2881         
2882         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix a warning.
2883
2884 2009-02-23  Zoltan Varga  <vargaz@gmail.com>
2885
2886         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Replace the
2887         nop code by patching the call address to point to the nullified class init
2888         trampoline, as the former does not seem to be safe on SMP machines.
2889
2890 2009-02-23  Mark Probst  <mark.probst@gmail.com>
2891
2892         * mini-ops.h: Fix the argument types for a few x86 opcodes where
2893         they were wrong.
2894
2895 2009-02-23  Zoltan Varga  <vargaz@gmail.com>
2896
2897         * basic-float.cs basic-calls.cs: Fix warnings.
2898
2899 2009-02-22  Mark Probst  <mark.probst@gmail.com>
2900
2901         * tramp-ppc.c (mono_arch_create_trampoline_code): Store the
2902         correct frame pointer in the LMF.  Should fix #478394.
2903
2904 2009-02-22  Zoltan Varga  <vargaz@gmail.com>
2905
2906         * Makefile.am (fullaotcheck): Copy Mono.Simd.dll as well.
2907
2908         * image-writer.c: Make the binary writer less verbose.
2909
2910 2009-02-21  Zoltan Varga  <vargaz@gmail.com>
2911
2912         * method-to-ir.c (mono_method_to_ir): Don't assert if string ctors
2913         are called from runtime invoke wrappers.
2914
2915 2009-02-20  Zoltan Varga  <vargaz@gmail.com>
2916
2917         * cpu-ppc.md (store_memindex): Increase the size of this.
2918
2919 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
2920
2921         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
2922
2923         * cpu-x86.md: Fix the sizes for long_conv_to_r_un and long_conv_to_r_un_2.
2924
2925         * mini-x86.c (mono_arch_output_basic_block): Use only 64bits of precision for
2926         OP_LCONV_TO_R_UN.
2927
2928         Last fix for of #467201.
2929
2930
2931 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
2932
2933         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
2934
2935         * cpu-x86.md: Fix the sizes for fcall(_reg,_membase), long_conv_to_r4_2
2936         and long_conv_to_r8_2:
2937
2938         Fixed part of #467201.
2939
2940 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
2941
2942         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
2943
2944         * mini-x86.c (mono_arch_output_basic_block): Adjust precision of int to float
2945         conversion to 32 bits.
2946
2947         * cpu-x86.md: Increase the size of int_conv_to_r4.
2948
2949         * basic-float.cs: Add a test for this.
2950
2951         Fixed part of #467201.
2952
2953 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
2954
2955         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
2956
2957         * mini-x86.c (mono_arch_output_basic_block): Adjust precision of long to double
2958         conversion to 64 bits.
2959
2960         * basic-float.cs: Add a test for this.
2961
2962         Fixed part of #467201.
2963
2964 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
2965
2966         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
2967
2968         * mini-x86.c (emit_move_return_value): Don't reduce precision of functions returning float.
2969         This behavior is compatible with MS.
2970
2971         * iltest.il.in: Add a test for this.
2972
2973         Fixed part of #467201.
2974
2975 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
2976
2977         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
2978
2979         * mini-x86.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_R4, it must
2980         change the precision of the value.
2981
2982         * cpu-x86.md: Define len for float_conv_to_r4.
2983
2984         * basic-float.cs: Add a test for this.
2985
2986         Fixed part of #467201.
2987
2988 2009-02-19 Rodrigo Kumpera  <rkumpera@novell.com>
2989
2990         * mini.c: Adjust locking order to the new semantics where the loader lock
2991         comes first.
2992
2993 2009-02-18  Rodrigo Kumpera  <rkumpera@novell.com>
2994
2995         * aot-runtime.c:
2996         * mini-amd64.c:
2997         * mini-arm.c:
2998         * mini-ia64.c:
2999         * mini-mips.c:
3000         * mini-ppc.c:
3001         * mini-sparc.c:
3002         * mini-trampolines.c:
3003         * mini-x86.c:
3004         * mini.c:
3005         * tramp-alpha.c:
3006         * tramp-amd64.c:
3007         * tramp-arm.c:
3008         * tramp-hppa.c:
3009         * tramp-ia64.c:
3010         * tramp-mips.c:
3011         * tramp-ppc.c:
3012         * tramp-s390.c:
3013         * tramp-s390x.c:
3014         * tramp-sparc.c:
3015         * tramp-x86.c: Use mono_domain_code_* functions instead of using MonoDomain::code_mp directly.
3016
3017 2009-02-18  Zoltan Varga  <vargaz@gmail.com>
3018
3019         * mini-codegen.c (mono_local_regalloc): Remove a ! from if (!dest_sreg1)
3020         as it is incorrect.
3021
3022 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
3023
3024         * aot-compiler.c (add_generic_class): Only add rgctx invoke wrappers
3025         for cctors if needed.
3026
3027 2009-02-17  Mark Probst  <mark.probst@gmail.com>
3028
3029         * mini-ppc.c: Fix build on Darwin.
3030
3031 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
3032
3033         * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Use 2 as the DWARF
3034         version instead of 3 as valgrind doesn't like version 3.
3035
3036         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
3037
3038         * aot-compiler.c (mono_aot_method_hash): New function to return a hash
3039         usable for hashing methods.
3040         (emit_extra_methods): Use the new hash to avoid putting every method in the
3041         same hash bucket.
3042
3043         * aot-runtime.c (find_extra_method_in_amodule): Use the new hash.
3044
3045         * aot-runtime.c (can_method_ref_match_method): New function to quickly check
3046         whenever a method ref could match a method.
3047         
3048         * aot-runtime.c (load_image): Revert the previous change, it causes an AOT
3049         test to fail.
3050         
3051         * aot-runtime.c (find_extra_method_in_amodule): Add a cache for decoded 
3052         methods refs.
3053
3054         * aot-runtime.c (load_image): Pass our basedir to mono_assembly_load.
3055
3056         * aot-compiler.c (emit_exception_debug_info): Bump the maximum size of
3057         the encoding buffer.
3058
3059         * method-to-ir.c (mono_method_check_inlining): Avoid calling 
3060         mono_method_get_header () on inflated methods as an optimization.
3061
3062 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
3063
3064         * ssa.c (fold_ins): Fix another crash if the instruction following the
3065         switch was optimized away.
3066
3067 2009-02-16  Mark Probst  <mark.probst@gmail.com>
3068
3069         Contributed under the terms of the MIT/X11 license by Steven
3070         Munroe <munroesj@us.ibm.com>.
3071
3072         * mini-ppc.c, mini-ppc.h: Implement TLS for PPC64.
3073
3074 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
3075
3076         * mini.c method-to-ir.c mini-trampolines.c aot-runtime.c: Remove locking
3077         around the mono_domain_alloc calls, it is now done by the functions
3078         themselves.
3079
3080         * aot-compiler.c (compile_method): Only add wrappers referenced by
3081         the method if compiling with full AOT.
3082         (mono_compile_assembly): Error out if --aot=full is specified on
3083         a platform where it is not supported.
3084
3085         * aot-compiler.c (emit_trampolines): Emit generic class init trampolines
3086         on ARM too.
3087
3088         * tramp-arm.c (mono_arch_create_generic_class_init_trampoline_full): Add
3089         AOT support.
3090
3091         * aot-runtime.c (load_named_code): Handle 
3092         mono_arm_throw_exception_by_token.
3093
3094         * mini-arm.h: Add declaration of mono_arm_throw_exception_by_token.
3095
3096         * image-writer.c (asm_writer_emit_pointer_unaligned): Make this really
3097         unaligned.
3098
3099         * Makefile.am (fullaotcheck): Exit if a test fails.
3100
3101         * aot-compiler.c (mono_compile_assembly): Use the ASM writer for full aot
3102         on ARM.
3103         (mono_compile_assembly): Handle the assembler failing.
3104
3105         * image-writer.c (asm_writer_emit_section_change): Handle ARM gas not
3106         accepting subsections of .bss.
3107
3108         * ssa.c (visit_inst): Fix a crash if the instruction following a switch
3109         was optimized away.
3110
3111         * aot-compiler.c: Remove some unused includes.
3112         
3113         * aot-compiler.c (MonoAotCompile): Remove some unused fields which are
3114         now in MonoImageWriter.
3115
3116         * mini-x86.c (mono_arch_get_vcall_slot): Handle yet another
3117         code sequence which matches a non-virtual call. Fixes #472654.
3118
3119 2009-02-15  Zoltan Varga  <vargaz@gmail.com>
3120
3121         * aot-compiler.c: Use xdebug_lock ()/unlock () macros for locking in the
3122         xdebug code.
3123         
3124         * aot-compiler.c: Make the xdebug code not depend on the AOT compiler,
3125         use the image/dwarf writers directly.
3126
3127         * image-writer.c (struct _MonoImageWriter): Remove the unused 'image'
3128         field.
3129
3130         * aot-compiler.c (MonoAotCompile): Remove fields which are now in
3131         MonoDwarfWriter.
3132
3133         * image-writer.h: Fix some typos.
3134
3135         * dwarfwriter.h dwarfwriter.c: New files.
3136         
3137         * aot-compiler.c: Extract the DWARF info writing functionality into a 
3138         separate module.
3139
3140         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add a 'out_unwind_ops'
3141         argument to return unwind info.
3142
3143         * tramp-arm.c (mono_arch_create_trampoline_code_full): Ditto.
3144
3145         * aot-compiler.c: Emit unwind info for trampolines in full-aot mode.
3146         
3147         * aot-runtime.c (decode_method_ref): Add a case for 
3148         MONO_AOT_METHODREF_WRAPPER_NAME.
3149
3150         * mini.h: Add constants for the magic numbers used in encode_method_ref ()
3151         for AOT.
3152
3153         * aot-compiler.c (encode_method_ref): Use the new constants.
3154
3155         * aot-runtime.c (decode_method_ref): Ditto.
3156
3157         * aot-compiler.c (compile_method): For generic icalls, queue the wrapper to
3158         be compiled, not the icall itself.
3159
3160 2009-02-14  Zoltan Varga  <vargaz@gmail.com>
3161
3162         * aot-runtime.c (find_extra_method_in_amodule): Avoid decoding wrapper names
3163         using decode_method_ref ().
3164
3165         * method-to-ir.c (mini_emit_ldelema_1_ins): If the array index is a long,
3166         convert it to an in32. Fixes #475859.
3167
3168         * arrays.cs: Add a test.
3169
3170 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
3171
3172         * mini-s390x.c (mono_arch_output_basic_block): Fix the shift amounts in 
3173         OP_LCONV_TO_U2.
3174
3175         * basic-long.cs: Add a test.
3176
3177 2009-02-12  Mark Probst  <mark.probst@gmail.com>
3178
3179         * mini-x86.c, mini-x86.h: Very simple frame pointer removal.  We
3180         remove the frame pointer in leaf methods which don't receive any
3181         arguments, don't throw exceptions and don't do dynamic stack
3182         allocations.
3183
3184 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
3185
3186         * mini-amd64.c (mono_arch_build_imt_thunk): Fix size calculation after
3187         the fail_tramp changes. Hopefully fixes #475132.
3188
3189 2009-02-12  Rodrigo Kumpera  <rkumpera@novell.com>
3190
3191         * method-to-ir.c (mono_emit_method_call_full): Use mono_metadata_signature_dup_mempool
3192         instead of mono_metadata_signature_dup_full.
3193
3194 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
3195
3196         * ssa.c (fold_ins): Use MONO_IS_JUMP_TABLE () and MONO_JUMP_TABLE_FROM_INS ()
3197         for processing jump tables. Fixes #473787.
3198
3199 2009-02-11  Mark Probst  <mark.probst@gmail.com>
3200
3201         * mini-generic-sharing.c: mini_method_get_context() just calls
3202         mono_method_get_context_general() now.
3203
3204         * mini.c, mini.h: Moved get_object_generic_inst(),
3205         construct_object_context_for_method() and
3206         mono_domain_lookup_shared_generic() to metadata/generic-sharing.c.
3207
3208 2009-02-11  Zoltan Varga  <vargaz@gmail.com>
3209
3210         * branch-opts.c (mono_if_conversion): Handle the case where the merged 
3211         basic block fell through to its successor bblock without a branch. Fixes
3212         #474718.
3213
3214         * iltests.il.in: Add a test.
3215         
3216         * aot-compiler.c (encode_method_ref): Encode methods of array types.
3217         (can_encode_patch): We can now handle arrays of generic parameters and
3218         array methods.
3219
3220         * aot-runtime.c (decode_method_ref_2): Handle methods of array types.
3221
3222         * aot-compiler.c aot-runtime.c: Emit the size of specific trampolines into
3223         the AOT file to avoid some #ifdefs in aot-runtime.c
3224
3225         * mini.h: Bump AOT file format version.
3226
3227 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
3228
3229         * Makefile.am (fullaotcheck): Make this run the tests.
3230
3231         * aot-compiler.c: Make the printing of skipped methods runtime configurable.
3232
3233 2009-02-10  Mark Probst  <mark.probst@gmail.com>
3234
3235         * mini-x86.c (mono_arch_context_get_int_reg): Handle all registers
3236         individually.  Fixes #473482.
3237
3238 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
3239
3240         * mini-arm.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
3241
3242 2009-02-09  Jeffrey Stedfast  <fejj@novell.com>
3243
3244         * aot-compiler.c (arch_emit_plt_entry): Fixed to compile.
3245         (mono_compile_assembly): Hush compile warnings about
3246         uninitialized [tmp_]outfile_name variables in the !use_bin_writer
3247         code path.
3248
3249 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
3250
3251         * exceptions-arm.c (mono_arch_find_jit_info): Fix aot support.
3252
3253         * mini-arm.c: Checkin unwind related changes missing from an earlier commit.
3254
3255         * aot-compiler.c: Fix arm support.
3256
3257         * image-writer.c: Move the R_ARM constants to image-writer.h. Export a
3258         img_writer_emit_unset_mode () function.
3259
3260         * unwind.c (mono_unwind_get_dwarf_data_align): New helper function.
3261         (mono_unwind_get_dwarf_pc_reg): Ditto.
3262
3263         * aot-compiler.c (emit_dwarf_abbrev): Another large reorganization.
3264         Move almost all platform specific code to a set of arch_ functions, 
3265         and document them to ease porting.
3266         
3267         * aot-compiler.c (mono_xdebug_init): Fix xdebug support.
3268
3269         * image-writer.h image-writer.c: New files, extracted from aot-compiler.c.
3270
3271         * aot-compiler.c: Extract the image writing functionality into a separate
3272         module to reduce the size of this file.
3273
3274 2009-02-09  Geoff Norton  <gnorton@novell.com>
3275
3276         * mini-s390.c: Fix the signature of emit_sig_cookie.
3277
3278 2009-02-09  Zoltan Varga  <vargaz@gmail.com>
3279
3280         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_IMAGE.
3281
3282         * aot-runtime.c (is_shared_got_patch): Ditto.
3283
3284         * aot-runtime.c (load_named_code): Cope with the fact that 
3285         decode_got_entry () won't decode the patch fully if its corresponding got
3286         entry is already filled.
3287         
3288         * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): 
3289         Initialize *ji.
3290         (mono_arch_create_monitor_exit_trampoline_full): Ditto.
3291
3292         * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): Use 'code'
3293         as the moving pointer instead of 'buf' for consistency with the rest of the
3294         codebase.
3295         (mono_arch_create_monitor_exit_trampoline): Ditto.
3296
3297         * aot-compiler.c (emit_trampolines): Add throw_pending_exception/
3298         generic_class_init trampolines.
3299         (add_generic_class): Extract some code from add_generic_instances () into a
3300         separate function so it can be called from other places too.
3301         (compile_method): Call add_generic_class () for the classes of inflated methods
3302         referenced by the method.
3303         (can_encode_patch): Allow references to generic parameters.
3304
3305         * aot-runtime.c: Add support the patches required by the new trampolines.
3306         
3307         * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Add full-aot
3308         support.
3309
3310         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline_full): Add
3311         full-aot support.
3312
3313         * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Rename
3314         this from get_throw_pending_exception, make the signature full aot compatible.
3315
3316         * Makefile.am (fullaotcheck): New target to run full-aot tests.
3317
3318         * method-to-ir.c (inline_method): Save/Restore cfg->ret_var_set too.
3319
3320         * exceptions.cs: Add a test.
3321
3322 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
3323
3324         * unwind.c (mono_unwind_frame): Eliminate the data_align_factor argument,
3325         use the DWARF_DATA_ALIGN constant instead.
3326
3327         * exception-<ARCH>.c: Update after the above change.
3328
3329         * exceptions-arm.c (mono_arch_find_jit_info): Transition this to use the
3330         dwarf unwinder.
3331
3332         * mini-arm.c: Enable the dwarf unwinder.
3333
3334         * mini-trampolines.c (mono_magic_trampoline): Use mono_class_get_vtable_entry ()
3335         instead of mono_class_setup_vtable ().
3336
3337 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
3338
3339         * exceptions-x86.c (mono_arch_find_jit_info): Transition this to use the
3340         dwarf unwinder.
3341
3342         * mini-x86.h: Enable the dwarf unwinder.
3343
3344 2009-02-06  Raja R Harinath  <harinath@hurrynot.org>
3345
3346         Fix mcs/tests/test-7.cs
3347         * mini-amd64.c (mono_arch_allocate_vars): Revert change from
3348         2009-02-03.
3349
3350 2009-02-06  Zoltan Varga  <vargaz@gmail.com>
3351
3352         * mini.c (print_jit_stats): Remove some unused statistics.
3353
3354 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
3355
3356         * aot-compiler.c (emit_klass_info): Update after MonoClass changes.
3357
3358 2009-02-05  Mark Probst  <mark.probst@gmail.com>
3359
3360         * jit-icalls.c (mono_helper_compile_generic_method): Don't inflate
3361         the method we get from mono_object_get_virtual_method() because
3362         that function does it properly, now.
3363
3364 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
3365
3366         * unwind.c (mono_unwind_ops_encode): Handle offsets greater than 32 between
3367         opcodes. Fixes #472775.
3368
3369 2009-02-05  Mark Probst  <mark.probst@gmail.com>
3370
3371         * mini-exceptions.c (ves_icall_get_frame_info): Account for the
3372         fact that mono_find_jit_info() sometimes returns the context
3373         corresponding to the jit info in new_ctx.  Fixes #472600.
3374
3375 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
3376
3377         * method-to-ir.c mini-hppa.c mini.c trace.c mini-s390x.c aot-compiler.c
3378         mini-s390.c: Use mono_class_enum_basetype () instead of accessing
3379         klass->enum_basetype directly.
3380
3381         * aot-compiler.c (emit_class_dwarf_info): Add support for all possible
3382         enum subtypes.
3383
3384         * unwind.c: Avoid 0 sized arrays.
3385
3386 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
3387
3388         * mini-exceptions.c (mono_setup_altstack): Use a more reasonable altstack
3389         size on systems with 64k pages. Fixes #471389.
3390
3391 2009-02-04  Mark Probst  <mark.probst@gmail.com>
3392
3393         Contributed under the terms of the MIT/X11 license by Steven
3394         Munroe <munroesj@us.ibm.com>.
3395
3396         * mini-ppc.c (mono_arch_output_basic_block): Generate better code
3397         for LOADI4_MEMBASE.  Use addi instead of addic if it's not
3398         necessary.
3399
3400 2009-02-04  Mark Probst  <mark.probst@gmail.com>
3401
3402         Contributed under the terms of the MIT/X11 license by Steven
3403         Munroe <munroesj@us.ibm.com>.
3404
3405         * exceptions-ppc.c (mono_arch_get_restore_context): Code size
3406         comparison fix.
3407
3408         * tramp-ppc.c (mono_arch_create_generic_class_init_trampoline):
3409         The trampoline can be longer on PPC64.
3410
3411 2009-02-04  Mark Probst  <mark.probst@gmail.com>
3412
3413         Contributed under the terms of the MIT/X11 license by Steven
3414         Munroe <munroesj@us.ibm.com>.
3415
3416         * mini-ppc.c: Compiler warning fixes and trivial code
3417         simplifications.
3418
3419 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
3420
3421         * method-to-ir.c (mono_spill_global_vars): Fix problems caused by reading
3422         ins->dreg which could be a hardware register, not a vreg.
3423
3424         * aot-compiler.c (emit_method_dwarf_info): Ditto.
3425         
3426         * mini.h (MonoCompile): Remove vreg_to_var_num array, it is no longer used.
3427         (struct MonoMethodVar): Add a vreg field, holding the vreg of variable.
3428
3429         * mini.c (mono_compile_create_var_for_vreg): Set var->vreg.
3430         
3431         * mini-amd64.c (mono_arch_output_basic_block): Avoid reading cfg->varinfo[..]
3432         ->dreg, that is not the vreg we are looking for.
3433
3434         * mini-amd64.h mini-x86.h: Enable MONO_ARCH_LIVENESS_OPS again.
3435
3436         * mini-x86.c (mono_arch_output_basic_block): Add support for LIVERANGE_START/
3437         LIVERANGE_END.
3438
3439         * method-to-ir.c (mono_spill_global_vars): Add an assert to help track down
3440         strange crashes.
3441
3442 2009-02-03  Zoltan Varga  <vargaz@gmail.com>
3443
3444         * mini-x86.c (mono_arch_emit_prolog): Emit unwind info.
3445
3446         * aot-compiler.c (emit_line_number_info): Fix line number emission when
3447         the line diff is 0.
3448
3449         * aot-compiler.c: Add xdebug support on x86.
3450
3451         * unwind.c: Add x86 support.
3452         
3453         * aot-compiler.c (emit_exception_debug_info): Control the emission of
3454         unwind info using a new MONO_ARCH_HAVE_XP_UNWIND define.
3455
3456         * mini.c (mini_method_compile): Ditto.
3457         
3458         * mini-amd64.c (mono_arch_allocate_vars): Avoid setting cfg->ret->dreg to
3459         the variable index.
3460
3461         * aot-compiler.c: Add emit_push_section ()/emit_pop_section () helper functions
3462         which mimic .push_section/.pop_section in GAS.
3463         
3464         * aot-compiler.c: Emit precise live range information for variables.
3465
3466         * mini-amd64.c (mono_arch_output_basic_block): Add OP_LIVERANGE_START/END.
3467
3468         * method-to-ir.c (mono_spill_global_vars): Compute the instructions marking
3469         the live ranges of variables, and emit OP_LIVERANGE_START/END opcodes for
3470         them.
3471
3472         * mini-ops.h: Add OP_LIVERANGE_START/END opcodes to mark
3473         the live ranges of variables.
3474
3475         * mini.h (struct MonoMethodVar): Add two fields containing the live range
3476         of the variable in terms of native offsets.
3477
3478 2009-02-03  Rodrigo Kumpera  <rkumpera@novell.com>
3479
3480         * arrays.cs: Test for Get/SetValue of array with negate lower bounds.
3481         
3482 2009-02-02  Mark Probst  <mark.probst@gmail.com>
3483
3484         Contributed under the terms of the MIT/X11 license by Steven
3485         Munroe <munroesj@us.ibm.com>.
3486
3487         * exceptions-ppc.c (restore_regs_from_context): Correct operand
3488         order (offset then base reg) for ppc_load_multiple_regs.
3489         (emit_save_saved_regs) Correct operand order for
3490         ppc_store_multiple_regs.
3491         (mono_arch_get_call_filter): Correct operand order for
3492         ppc_load_multiple_regs.
3493
3494         * mini-ppc.c (emit_memcpy): Fix operand order for
3495         ppc_load_reg_update and ppc_store_reg_update.
3496         (mono_arch_output_basic_block): Correct operand order for ppc_lha.
3497         (mono_arch_emit_epilog): Correct operand order for
3498         ppc_load_multiple_regs.
3499
3500         * tramp-ppc.c (mono_arch_create_trampoline_code): Correct operand
3501         order for ppc_store_multiple_regs and ppc_load_multiple_regs.
3502
3503 2009-02-02  Mark Probst  <mark.probst@gmail.com>
3504
3505         * cpu-ppc64.md: Fixed storer4_memindex length.
3506
3507 2009-02-02  Zoltan Varga  <vargaz@gmail.com>
3508
3509         * aot-compiler.c (emit_line_number_info): Optimize the size of the emitted
3510         line number info.
3511         
3512         * aot-compiler.c (emit_line_number_info): Optimize this.
3513
3514 2009-02-01  Zoltan Varga  <vargaz@gmail.com>
3515
3516         * aot-compiler.c: Disassemble tokens in the IL disassembly.
3517         
3518         * aot-compiler.c: Add debug info for methods without debug info by
3519         emitting an IL file and having the line number info referencing that file.
3520
3521         * aot-compiler.c: Optimize the size of the generated line number info.
3522
3523         * aot-compiler.c: Emit line number info in xdebug mode.
3524
3525         * aot-compiler.c (mono_save_xdebug_info): Receive a MonoCompile instead of a
3526         million arguments.
3527
3528 2009-01-31  Zoltan Varga  <vargaz@gmail.com>
3529
3530         * aot-compiler.c (emit_method_dwarf_info): Emit names for local variables.
3531
3532         * driver.c (mono_main): Enable debugging support automatically if XDEBUG
3533         is used.
3534
3535 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
3536
3537         * basic-calls.cs: Test for the weird crash found on arm.
3538         
3539 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
3540
3541         * cpu-arm.md: Increase the size of storer8_membase_reg and
3542         loadr8_membase_reg to 24 bytes to accomodate the extra add.
3543
3544         * mini-arm.c (mono_arch_output_basic_block): Under FPA, when emitting
3545         OP_STORER8_MEMBASE_REG and OP_LOADR8_MEMBASE_REG, add the original
3546         reg to LR otherwise we'll be loading/storing from just the offset.
3547
3548 2009-01-30  Miguel de Icaza  <miguel@novell.com>
3549
3550         Question: if we are storing gint32's inside the "*native_offset",
3551         should we change the signature to "gint32 *native_offset" to
3552         ensure that we do not have type definition problems?
3553         
3554         * mini-exceptions.c (ves_icall_get_frame_info): Cast the gint32 to
3555         an int * as this is what the other function expects, causes
3556         problems with Freescale's compiler that defined int32_t to be a
3557         long and makes int incompatible 
3558
3559 2009-01-30  Miguel de Icaza  <miguel@novell.com>
3560
3561         * Rename generic-sharing.c to mini-generic-sharing.c to avoid the
3562         filename conflict with bjam.
3563
3564 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
3565
3566         * cpu-arm.md: Increase the size of storer8_membase_reg to 20 bytes
3567         as it might use decomposed ops.
3568
3569 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
3570
3571         * jit-icalls.c (mono_imul_ovf): Fix one of the literals.
3572
3573         * mini.c (mini_init): Emulate mul.ovf opcodes if MONO_ARCH_EMULATE_MUL_OVF
3574         is defined.
3575
3576         * mini-arm.h (MONO_ARCH_EMULATE_MUL_OVF): New define.
3577
3578         * mini-arm.c (mono_arch_build_imt_thunk): Rewrite this to allow large vtable
3579         offsets.
3580
3581         * mini-arm.c (mono_arch_context_get_int_reg): Adapt this to the "clever"
3582         way registers are stored in MonoContext on arm.
3583
3584         * unwind.c: Rewrite the handling of the cached_info array to use hazard pointers
3585         instead of locking so mono_get_cached_unwind_info () becomes signal safe.
3586
3587         * mini.c (mini_init): Emuate OP_FCONV_TO_I when using soft float.
3588
3589         * mini-arm.c (emit_load_volatile_arguments): Avoid an unneccesary assert.
3590
3591         * mini.c (mini_init): Register mono_isfinite.
3592
3593         * jit-icalls.c (mono_isfinite): New jit icall.
3594
3595         * method-to-ir.c (mono_decompose_soft_float): Add support for OP_CKFINITE.
3596         
3597         * exceptions-arm.c (mono_arch_find_jit_info): When unwinding using the LMF,
3598         set esp to ARMREG_FP instead of R12, since R12 stores the value of sp for
3599         the parent frame.
3600
3601 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
3602
3603         * exceptions-arm.c (mono_arch_find_jit_info): The frame layout on arm have
3604         separate frame and stack pointers, so we must use FP to find the register
3605         spill area.
3606         The FP reg is retrieved from the MonoContext::regs array.
3607
3608 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
3609
3610         * mini-arm.c (mono_arch_output_basic_block): Emit two cond ops for OP_FBGE
3611         as FPA requires it.
3612
3613 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
3614
3615         * mini-arm.c (mono_arch_emit_setret): Emit OP_FMOVE for methods that
3616         return R4 and R8 when not running under softfloat.
3617
3618         Fixes basic-calls.exe
3619
3620 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
3621
3622         * mini-arm.c: Implement some overflow opcodes.
3623
3624 2009-01-29  Miguel de Icaza  <miguel@novell.com>
3625
3626         * ssa.c: handle another alloca.h
3627
3628         * mini-exceptions.c (mono_handle_native_sigsegv): Do not use
3629         PLATFORM_WIN32 for detecting if we have sigaction.   Instead use
3630         MONO_ARCH_USE_SIGACTION. 
3631
3632         * aot-runtime.c, mini-exceptions.c: Replace platform define with
3633         capability defines.
3634
3635         * method-to-ir.c (mono_method_to_ir): Type cast fix on some platforms.
3636
3637         * mini-ppc.h (MONO_ARCH_USE_SIGACTION): Do not define this for all
3638         PPC targets as sigaction does not exist on all platforms, define
3639         this on a per-platform basis.
3640
3641         Instead of erroring out if the platform is not defined, include
3642         mini-ppc-os.h, and expect that the OS specific setting provides
3643         the required information.   
3644
3645 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
3646
3647         * aot-compiler.c: Fix --enable-minimal=aot.
3648
3649 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
3650
3651         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Fix the
3652         previous change.
3653
3654 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
3655
3656         * exceptions-arm.c: Fix warnings.
3657
3658         * tramp-arm.c aot-compiler.c unwind.h unwind.c: Implement xdebug support for
3659         ARM.
3660
3661         * mini-x86.c: Fix --enable-minimal=jit build.
3662
3663         * mini.c: Really fix --enable-minimal=jit build.
3664         
3665         * mini.c (construct_object_context_for_method): Move this outside
3666         the DISABLE_JIT block to fix the --enable-minimal=jit build.
3667
3668         "Backported" of r124984 from 2.0 branch.
3669         
3670         * aot-compiler.c aot-runtime.c: Add full-aot support delegate BeginInvoke/EndInvoke.
3671
3672         "Backport" of r124977 + r124978 from 2.0 branch.
3673         
3674         * exceptions-arm.c (mono_arm_throw_exception_by_token): New helper function
3675         to avoid calling mono_exception_from_token () from the throw trampoline.
3676         (mono_arch_get_throw_exception_generic): call throw_exception_by_token
3677         for throwing corlib exceptions, this fixes full-aot support for corlib
3678         exceptions.
3679
3680         * aot-compiler.c (compile_method): Make a copy of cfg->locals to fix the build.
3681
3682 2009-01-29  Miguel de Icaza  <miguel@novell.com>
3683
3684         * mini-darwin.c, mini-windows.c, mini-posix.c: Commit the first
3685         part of the changes to split the code in mini into operating
3686         system specific files.
3687
3688         This patch was done by copying mini.c to the respective files to
3689         preserve SVN history.
3690
3691 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
3692
3693         * aot-compiler.c (emit_method_dwarf_info): Add minimal support for locals.
3694
3695 2009-01-28  Zoltan Varga  <vargaz@gmail.com>
3696
3697         * method-to-ir.c (mono_method_to_ir): Avoid generic sharing for calls made to
3698         remoting-invoke-with-check wrappers of shared methods.
3699
3700         * mini.c (print_jit_stats): Print out major gc count/time for libgc too.
3701
3702 2009-01-27  Mark Probst  <mark.probst@gmail.com>
3703
3704         * method-to-ir.c (emit_stloc_ir): Only apply the reg-reg move
3705         optimization if the top of stack is the last instruction in the
3706         bblock.  Otherwise it might have been used after its definition.
3707         Fixes #469742.
3708
3709 2009-01-27  Zoltan Varga  <vargaz@gmail.com>
3710
3711         * mini-trampolines.c (mono_magic_trampoline): Print out the caller
3712         method as well when get_vcall_slot () fails to match a code sequence.
3713
3714         * mini-arm.c: Fix the android build, which doesn't have
3715         __aeabi_read_tp.
3716
3717 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
3718
3719         * mini-s390x.c: Remove a stray declaration of emit_sig_cookie () to fix
3720         the s390x build.
3721
3722 2009-01-26  Rodrigo Kumpera  <rkumpera@novell.com>
3723
3724         * unwind.c (mono_unwind_cleanup): Don't crash if cached_info is NULL.
3725
3726 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
3727
3728         * mini.c (mini_method_compile): Save the unwind info generated by the JIT
3729         and put its id into jinfo->used_regs. This is only used on amd64,
3730         which is currently the only platform generating unwind info.
3731
3732         * exceptions-amd64.c: Instead of unwinding based on a register mask, use
3733         the dwarf unwinder. This is required to correctly handle async exceptions
3734         like thread abort and stack overflows, which can happen while a method
3735         is in the middle of its prolog or epilog.
3736         
3737         * aot-runtime.c (mono_aot_get_unwind_info): New helper function to obtain
3738         the unwind info belonging to an AOTed method.
3739
3740         * aot-compiler.c aot-runtime.c: Save/Load the unwind info emitted by the JIT
3741         into cfg->unwind_ops.
3742         
3743         * unwind.c (mono_unwind_frame): Use <= instead of < for the loop exit check.
3744
3745         * mini.c (mini_init): Call mono_unwind_init ().
3746         (mini_cleanup): Call mono_unwind_cleanup ().
3747
3748         * unwind.c: Add functions for managing a set of unwind info entries, allowing
3749         unwind info to be shared between methods.
3750
3751         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info for the registers
3752         saved in the LMF.
3753
3754         * exceptions-amd64.c (mono_arch_exceptions_init): Call 
3755         get_throw_pending_exception () to avoid initialization races.
3756
3757         * mini-exceptions.c (mono_exceptions_init): Call an arch specific
3758         mono_arch_exceptions_init () function.
3759
3760         * mini.h (MONO_INST_NEW): Remove duplicate setting of cil_code.
3761
3762 2009-01-25  Zoltan Varga  <vargaz@gmail.com>
3763
3764         * mini.c (mono_get_domain_intrinsic): New helper function.
3765         (mono_get_thread_intrinsic): Ditto.
3766
3767         * mini-arm.c mini-ia64.c: Use the new helper functions.
3768         
3769         * method-to-ir.c (mono_method_to_ir): Fix the comment for
3770         the last constrained_call change, since it is needed in the non-AOT
3771         case as well.
3772
3773         * mini-arm.c: Implement OP_TLS_GET on arm eabi linux.
3774         
3775         * mini-arm.c (mono_arch_emit_prolog): Add an inlined version of 
3776         mono_get_lmf_addr () on arm eabi linux.
3777
3778 2009-01-24  Zoltan Varga  <vargaz@gmail.com>
3779
3780         * mini-amd64.c (mono_arch_get_vcall_slot): Handle yet another
3781         code sequence which matches a non-virtual call.
3782
3783 2009-01-23  Mark Probst  <mark.probst@gmail.com>
3784
3785         * mini-ppc.c (mono_arch_context_get_int_reg): Allow access to the
3786         stack pointer (r1).
3787
3788 2009-01-23  Zoltan Varga  <vargaz@gmail.com>
3789
3790         * aot-compiler.c aot-runtime.c: Treat delegate-invoke wrappers similarly to
3791         runtime-invoke wrappers, since they are also shared based on signature.
3792
3793 2009-01-22  Mark Probst  <mark.probst@gmail.com>
3794
3795         * mini-exceptions.c (ves_icall_get_frame_info): Fetch the generic
3796         info from the (correct) context.
3797
3798 2009-01-22  Zoltan Varga  <vargaz@gmail.com>
3799
3800         * unwind.c (mono_unwind_frame): Remove a stray g_free ().
3801         
3802         * unwind.c (mono_unwind_frame): New function to unwind through a frame
3803         using dwarf unwinding info. Not yet used.
3804
3805         * mini.c (mini_init): When using xdebug, disable freeing of domains.
3806
3807 2009-01-21  Mark Probst  <mark.probst@gmail.com>
3808
3809         * mini-ppc.c (mono_arch_delegate_invoke_impl): Return function
3810         descriptors.
3811
3812         * mini-trampolines.c (mono_delegate_trampoline): Remove the PPC64
3813         special case and handle mono_arch_delegate_invoke_impl() returning
3814         function descriptors.
3815
3816         * tramp-ppc.c (mono_arch_create_trampoline_code): Delegate
3817         trampolines return function descriptors, too.
3818
3819 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
3820
3821         * method-to-ir.c (handle_alloc): Avoid generic instances in the
3822         out_of_line optimization.
3823
3824 2009-01-21  Martin Baulig  <martin@ximian.com>
3825
3826         * mini.h
3827         (MonoCompile): Added `disable_deadce_vars' to disable removing
3828         unused variables.
3829
3830         * mini.c
3831         (mini_method_compile): Set `cfg->disable_deadce_vars' when running
3832         inside the debugger.
3833
3834         * liveness.c (mono_analyze_liveness): Don't remove any unused
3835         variables if `cfg->disable_deadce_vars' is set.
3836
3837 2009-01-21  Mark Probst  <mark.probst@gmail.com>
3838
3839         * method-to-ir.c: Only apply exception constructor optimization if
3840         the the method actually belongs to an exception class.  Fixes
3841         #467456.
3842
3843 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
3844
3845         * mini-trampolines.c (mono_delegate_trampoline): Put back the previous
3846         change inside a #ifdef __mono_ppc64__.
3847
3848         * aot-compiler.c (compile_method): Remove the previous limitation.
3849
3850         * method-to-ir.c (method-to-ir.c): Add support for the constrained prefix
3851         on type variables in AOTed code.
3852         
3853         * aot-compiler.c (compile_method): Skip generic methods having type 
3854         constraints on their generic parameters.
3855
3856         * aot-compiler.c (compile_method): Check for methods which cannot be
3857         encoded inside RGCTX_FETCH patches as well.
3858
3859         * mini-exceptions.c (mono_print_thread_dump): Fix the windows
3860         build.
3861
3862 2009-01-20  Mark Probst  <mark.probst@gmail.com>
3863
3864         * method-to-ir.c: Force the vtable variable in shared generic code
3865         for the case that they might show up on a stack trace where they
3866         are needed.
3867
3868         * mini-exceptions.c: Save and use generic sharing info as well as
3869         IP in stack traces to resolve shared generic instantiations.
3870
3871 2009-01-20  Zoltan Varga  <vargaz@gmail.com>
3872
3873         * mini-trampolines.c (mono_delegate_trampoline): Revert the change which
3874         added a mono_get_addr_from_ftnptr () as it breaks the ia64 build.
3875
3876 2009-01-20  Mark Probst  <mark.probst@gmail.com>
3877
3878         * method-to-ir.c: Do generic sharing for array constructors.
3879
3880 2009-01-20  Rodrigo Kumpera  <rkumpera@novell.com>
3881
3882         * mini-exceptions.c (mono_print_thread_dump): Add information
3883         about the thread state using wapi_current_thread_desc.
3884
3885 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
3886
3887         * basic-simd.cs: Tests for the new constructors. 
3888
3889 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
3890
3891         * mini-ops.h: Added OP_EXPAND_*
3892
3893         * cpu-x86.md: Same.
3894
3895         * mini-x86.c (mono_arch_output_basic_block): Same.
3896         
3897         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for single element constructors.
3898
3899 2009-01-19  Zoltan Varga  <vargaz@gmail.com>
3900
3901         * iltests.il.in: Add a test for #467385.
3902
3903 2009-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
3904
3905         * mini.c (mini_thread_cleanup): Don't cleanup TLS storage if the
3906         thread been cleaned up is not the same currently in execution.
3907
3908         Fixes appdomain-unload crashes on windows, osx and linux variants
3909         without the __thread keyword.
3910
3911 2009-01-18  Zoltan Varga  <vargaz@gmail.com>
3912
3913         * mini-arm.c (mono_arch_flush_icache): Applied patch from Koushik Dutta
3914         (koush@koushikdutta.com). Implement this for android.
3915
3916         * helpers.c (mono_disassemble_code): Avoid assembler errors if the id
3917         begins with a digit.
3918
3919         * method-to-ir.c: Call mono_gc_get_write_barrier () instead of
3920         mono_marshal_get_write_barrier ().
3921
3922 2009-01-17  Rodrigo Kumpera  <rkumpera@novell.com>
3923
3924         * decompose.c (mono_decompose_vtype_opts): Fix the decomposition
3925         of OP_VCALL_* ops for 8 bytes vtypes on 32 bits archs and platorms
3926         that pass them on a register pair.
3927
3928         This affects windows, OSX and FreeBSD. The mono/tests/handleref.exe
3929         test was crashing due to that.
3930
3931 Fri Jan 16 15:21:21 CET 2009 Paolo Molaro <lupus@ximian.com>
3932
3933         * exceptions-ppc.c: tweaks from malc (OV-Soft) to fix the size of the
3934         trampoline code. Include ucontext.h only if available.
3935
3936 2009-01-15  Mark Probst  <mark.probst@gmail.com>
3937
3938         * mini.c: mono_domain_lookup_shared_generic() takes an open method
3939         and doesn't check whether it's sharable, like it was before
3940         removing the shared generics hash.  This brings IronPython
3941         performance back to what it was before that change.
3942
3943 2009-01-14  Mark Probst  <mark.probst@gmail.com>
3944
3945         * method-to-ir.c: Handle delegate invocation optimization earlier,
3946         otherwise it would be handled (much more slowly) by the
3947         final/sealed optimization.
3948
3949 2009-01-13  Zoltan Varga  <vargaz@gmail.com>
3950
3951         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes when the current thread or
3952         domain is not set. Fixes #465864.
3953
3954 2009-01-12  Mark Probst  <mark.probst@gmail.com>
3955
3956         * method-to-ir.c: Don't stop sharing of generic methods with catch
3957         clauses - we already handle those.
3958
3959 2009-01-12  Mark Probst  <mark.probst@gmail.com>
3960
3961         * mini.c, mini.h: lookup_generic_method() is now
3962         mono_domain_lookup_shared_generic() and uses the jit_code_hash,
3963         making the shared_generics_hash obsolete.
3964
3965 2009-01-12  Mark Probst  <mark.probst@gmail.com>
3966
3967         * mini-ppc.c, exceptions-ppc.c, cpu-ppc.md, cpu-ppc64.md: Don't
3968         use the red zone.  Make room on the stack first and then use it,
3969         not the other way around.
3970
3971 2009-01-12  Zoltan Varga  <vargaz@gmail.com>
3972
3973         * mini.c (mini_init): Call mono_xdebug_init ().
3974
3975         * aot-compiler.c (mono_xdebug_init): Make this non-static.
3976
3977 2009-01-11  Zoltan Varga  <vargaz@gmail.com>
3978
3979         * TestDriver.cs: Add an --iter argument to run tests multiple times.
3980
3981         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Emit debug info for
3982         trampolines.
3983
3984         * aot-compiler.c (mono_save_trampoline_xdebug_info): New function to emit
3985         debug+unwind info for trampolines.
3986
3987         * mini.c (mono_create_unwind_op): New helper function.
3988
3989         * unwind.h: Add macros for emitting unwind ops without a MonoCompile.
3990
3991 2009-01-10  Zoltan Varga  <vargaz@gmail.com>
3992
3993         * aot-compiler.c: Fix the build.
3994
3995 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
3996
3997         * Makefile.am: Update dtrace-prelink.sh location.
3998
3999 2009-01-08  Zoltan Varga  <vargaz@gmail.com>
4000
4001         * method-to-ir.c (mono_method_to_ir): Fix the check for the mscorlib ldstr 
4002         optimization. Fixes #464520.
4003
4004 2009-01-07  Bill Holmes  <billholmes54@gmail.com>
4005
4006         * mini-amd64.c : Adding code to save/restore non-volatile registers
4007            on Winx64.
4008
4009         * exceptions-amd64.c : Adding code to save/restore non-volatile 
4010           registers on Winx64.
4011
4012         Contributed under MIT/X11 license.
4013
4014 2009-01-07  Zoltan Varga  <vargaz@gmail.com>
4015
4016         * mini-arm.c (mono_arch_flush_icache): Use __GNUC_PREREQ instead of checking
4017         __GNUC_MINOR__ which can break when the major version changes.
4018
4019 2009-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
4020
4021         * basic-simd.cs: Add tests for usage of the sizeof opcode.
4022
4023 2009-01-07  Geoff Norton  <gnorton@novell.com>
4024
4025         * helpers.c:  Allow mono -v -v -v to work on darwin.
4026
4027 2009-01-05  Bill Holmes  <billholmes54@gmail.com>
4028
4029         * mini-amd64.c (mono_arch_get_vcall_slot) : Handle an additional instruction
4030           pattern. 
4031
4032         Contributed under MIT/X11 license.
4033
4034 2009-01-05  Zoltan Varga  <vargaz@gmail.com>
4035
4036         * mini.c (mono_allocate_stack_slots_full2): Use mono_class_from_mono_type
4037         instead of directly accessing type->data.klass. Fixes #462016.
4038         (mono_allocate_stack_slots_full): Ditto.
4039
4040         * mini-arm.c (mono_arch_flush_icache): Applied patch from Riku Voipio 
4041         <novell@kos.to>. Fix cache flush on kernels without OLDABI compat option.
4042
4043         * aot-compiler.c (emit_plt): Fix ARM build.
4044
4045 2009-01-04  Zoltan Varga  <vargaz@gmail.com>
4046
4047         * branch-opts.c (mono_if_conversion): Optimize this using ins->prev.
4048         
4049         * branch-opts.c (mono_if_conversion): Fix an assert introduced by the last
4050         change.
4051
4052         * branch-opts.c (mono_if_conversion): Use branch->inst_true_bb/inst_false_bb
4053         instead of bblock->out_bb [0]/[1], the two might not be the same. Fixes
4054         #463357.
4055
4056         * iltests.il.in: Add a regression test.
4057
4058 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
4059
4060         * mini-codegen.c (mono_print_ins_index): Pretty print XPHI and VPHI.
4061
4062 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
4063
4064         * basic-simd.cs: Add a regression test for #462457.
4065
4066 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
4067
4068         * mini-ops.h: Add a definition of XPHI.
4069
4070         * mini.h (MONO_IS_PHI): Make is aware of simd instrincs. 
4071
4072         * ssa.c (op_phi_to_move): Handle XPHI.
4073
4074         * ssa.c (mono_ssa_compute): Generate a XPHI for simd intrinsics instead of VPHI.
4075
4076         Fixes #462457
4077
4078 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
4079
4080         * method-to-ir.c (mono_emit_rgctx_calli): Fix a warning.
4081
4082 2008-12-31  Geoff Norton  <gnorton@novell.com>
4083
4084         * mini-ppc.c: The prolog size allocated can be too small for darwin
4085         ppc32 under certain circumstances.  Also fix a small logic bug.
4086
4087 2008-12-29  Zoltan Varga  <vargaz@gmail.com>
4088
4089         * mini.c (mono_jit_compile_method_inner): Avoid holding the domain lock
4090         while loading AOT methods.
4091
4092         * mini-exceptions.c: Check jit_tls->class_cast_from instead of class_cast_to
4093         since only the former is nulled out after a successful cast. This prevents
4094         crashes with rethrown exceptions when using --debug=casts.
4095
4096 2008-12-24  Mark Probst  <mark.probst@gmail.com>
4097
4098         * mini.h: New macro for checking whether a method is final,
4099         i.e. whether the method or its class is marked final.
4100
4101         * method-to-ir.c: Use the new macro for all final-checks
4102         consistently.  Fixes the crash in the System.ServiceModel tests.
4103
4104 2008-12-23  Mark Probst  <mark.probst@gmail.com>
4105
4106         * mini-exceptions.c (get_exception_catch_class): Corrected another
4107         overly strict assertion.
4108
4109 2008-12-23  Mark Probst  <mark.probst@gmail.com>
4110
4111         * mini-ppc.c (mono_arch_build_imt_thunk): Save and restore r11.
4112         Clobbering it is not allowed because the caller might use it as
4113         the vtable register in the interface call.
4114
4115 2008-12-19  Mark Probst  <mark.probst@gmail.com>
4116
4117         * mini-exceptions.c (get_exception_catch_class): Corrected an
4118         overly strict assertion.
4119
4120 2008-12-18  Mark Mason  <mmason@upwardaccess.com>
4121         
4122         * method-to-ir.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P or sizeof(gpointer) when appropriate.
4123
4124         * mini.h: Move typedef to mgreg_t up above include of mini-arch.h
4125
4126         * local-propogation.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P when appropriate
4127
4128         * cpu-mips.md: correct lengths for certain long_ opcodes.
4129
4130         * mini-mips.h: Only emulate long operations when SIZEOF_REGISTER==4. Add missing func decl.
4131
4132         * 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().
4133         
4134 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
4135
4136         * exceptions-mips.c (mono_arch_find_jit_info): decode sd instructions as well when looking for registers.
4137         
4138 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
4139         
4140         * mini-mips.c (mono_arch_output_basic_block): OP_JUMP_TABLE stores patch type in inst_c1, not inst_i1.
4141         
4142 2008-12-16  Rodrigo Kumpera  <rkumpera@novell.com>
4143
4144         * branch-opts.c (remove_block_if_useless): Even if BB0 falls through, don't add a br to the
4145         next basic block.
4146         
4147 2008-12-16  Mark Mason  <mmason@upwardaccess.com>
4148
4149         * 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
4150
4151         * 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)
4152         
4153 2008-12-15  Mark Mason  <mmason@upwardaccess.com>
4154         
4155         * trace.c (mono_trace_enter_method): correctly handle arguments smaller than the stack slot size on big endian systems.
4156         
4157 2008-12-14  Zoltan Varga  <vargaz@gmail.com>
4158
4159         * liveness.c (mono_analyze_liveness): Avoid eliminating the 'this' var in
4160         gshared code. Fixes #458947.
4161
4162         * generics.cs: Add a test.
4163
4164 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
4165         
4166         * method-to-ir.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4167         
4168         * mini-mips.c: first pass n32 code generation.
4169
4170         * mini-mips.h: datatypes and defines for n32 support.
4171
4172         * exceptions-mips.c: first pass n32 code generation.
4173         
4174         * tramp-mips.c: first pass n32 code generation.
4175         
4176         * cpu-mips.md: add long_ opcodes.
4177         
4178 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
4179
4180         * liveness.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4181
4182         * cfold.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4183         
4184         * local-propogation.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4185         
4186         * regalloc2.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4187
4188         * mini.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4189
4190         * mini-codegen.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4191
4192         * ssa.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4193
4194         * decompose.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4195
4196         * helpers.c: for mips/n32, don't pass -mips32 to objdump
4197
4198 2008-12-12  Zoltan Varga  <vargaz@gmail.com>
4199
4200         * mini-arm.c tramp-arm.c: Fix calls to mono_arch_flush_icache.
4201
4202 2008-12-12  Andres G. Aragoneses  <aaragoneses@novell.com>
4203
4204         * driver.c: Sync --help-trace with man page (EXPR,EXPR).
4205
4206 2008-12-12  Mark Probst  <mark.probst@gmail.com>
4207
4208         * mini-ppc.h, exceptions-ppc.c, tramp-ppc.c: Create function
4209         descriptors for helper functions directly in front of the code.
4210
4211 2008-12-11  Mark Probst  <mark.probst@gmail.com>
4212
4213         * method-to-ir.c: Removed an unnecessary assertion.
4214
4215 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
4216
4217         * method-to-ir.c: Merge SGEN changes from the old JIT.
4218
4219 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
4220
4221         * driver.c (compile_all_methods_thread_main): Handle failure of
4222         mono_get_method ().
4223
4224 2008-12-10  Mark Probst  <mark.probst@gmail.com>
4225
4226         * mini-ppc.c: Merged with mini-ppc64.c.
4227
4228         * mini-ppc.h: Define PPC_MINIMAL_PARAM_AREA_SIZE on all targets.
4229
4230         * Makefile.am: Use the same sources for PPC and PPC64.
4231
4232         * mini-ppc64.c: Removed.
4233
4234 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
4235
4236         * branch-opts.c (remove_block_if_useless): Extract fall through detection
4237         code to mono_bb_is_fall_through.
4238         
4239         * branch-opts.c (mono_remove_critical_edges): Same.
4240
4241 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
4242
4243         * ssa.c (fold_ins): branch opt can kill dummy switch ops so we can't
4244         expect that an OP_BR_REG will be there.
4245
4246 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
4247
4248         * branch-opts.c (remove_block_if_useless): Use MONO_IS_BRANCH_OP instead of checking
4249         for the many branch ops. The original check miss OP_BR_REG.
4250
4251         Fixes #457574.
4252         
4253 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
4254
4255         * mini-mips.h mini-mips.c exceptions-mips.c tramp-mips.c: first round of changes necessary to eventually support n32.
4256
4257 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
4258
4259         * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
4260         while holding the aot lock.
4261
4262 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
4263
4264         * mini-mips.c (mono_arch_output_basic_block): use mfc1/lwc1 instead of mfc1d/ldc1
4265         
4266 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
4267
4268         * mini.c (mini_cleanup) : Adding a call to cominterop_release_all_rcws 
4269           to release all runtime callable wrappers held by the runtime.
4270
4271         Contributed under MIT/X11 license.
4272
4273 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
4274
4275         * tramp-amd64.c (mono_arch_create_trampoline_code_full) : Increase the code size for
4276           for Winx64.
4277
4278         Contributed under MIT/X11 license.
4279
4280 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
4281
4282         * aot-runtime.c (decode_exception_debug_info): Acquire the domain
4283         lock when calling mono_domain_alloc (). Hopefully fixes #415608.
4284
4285 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
4286
4287         * cpu-mips.md: fix ckfinite length
4288
4289         * mini-mips.c: at least recognize n32 ABI when used (not yet supported)
4290         (mono_arch_lowering_pass): cleanup, rearrange for clarity
4291         (mono_arch_output_basic_block): implement OP_CKFINITE, add more asserts
4292         
4293 2008-12-08  Mark Mason   <mmason@upwardaccess.com>
4294
4295         * exceptions-mips.c (mono_arch_find_jit_info): init new_ctx with ctx, dont' call setup_context.
4296         
4297 2008-12-08  Geoff Norton  <gnorton@novell.com>
4298
4299         * tramp-amd64.c: r120895 stores RAX, so we need to increase the window
4300         size by 8 bytes as well.
4301
4302 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4303
4304         * basic-simd.cs: Fix method names for Vector16b.
4305         
4306 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4307
4308         * basic-simd.cs: Fix method names for Vector16sb.
4309
4310 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4311
4312         * basic-simd.cs: Fix method names for Vector8us.
4313         
4314 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4315
4316         * basic-simd.cs: Fix method names for Vector8s.
4317         
4318 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4319
4320         * basic-simd.cs: Fix method names for Vector4ui.
4321
4322 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4323
4324         * basic-simd.cs: Fix method names for Vector2l.
4325
4326 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4327
4328         * basic-simd.cs: Fix method names for Vector2d.
4329
4330 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4331
4332         * simd-intrinsics.c (mono_emit_simd_intrinsics): Add support for intrinsics
4333         that are extension methods.
4334
4335 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4336
4337         * basic-simd.cs: Fix method names for Vector4f.
4338
4339 2008-12-08  Zoltan Varga  <vargaz@gmail.com>
4340
4341         * mini-exceptions.c (mono_print_thread_dump): Mark threadpool threads
4342         as such. Fixes #456669.
4343
4344 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
4345
4346         * mini-mips.c (mono_arch_emit_call): narrow float arguments when passing as args.
4347         
4348 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
4349
4350         * mini-mips.c (mono_arch_lowering_pass): don't handle OP_ICONV_TO_R* or OP_R*CONST
4351         (mono_arch_emit_setret): use OP_MIPS_CVTSD to return SP floats
4352         (mono_arch_output_basic_block): simplify FP load/store, handle OP_MIPS_FBLT_UN
4353         (mips_adjust_stackframe): handle FP spills
4354                 
4355         * mini-ops.h: add mips_mtc1_s2
4356         
4357         * cpu-mips.md: add mips_mtc1_s2
4358         
4359 2008-12-07  Zoltan Varga  <vargaz@gmail.com>
4360
4361         * unwind.c: New file, move the unwind info encoding functions here from
4362         aot-compiler.c, so they could be used at runtime too.
4363
4364 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
4365
4366         * mini-mips.c (mono_arch_lowering_pass): handle OP_IMUL_IMM as well
4367         (mono_arch_output_basic_block): fix OP_LOCALLOC code generation
4368         
4369 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
4370
4371         * mini-mips.c: cleanup warnings
4372         (mono_arch_lowering_pass): handle OP_LOCALLOC_IMM
4373         (mips_adjust_stackframe): handle case of taking the address of stack locals
4374         
4375 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
4376
4377         * aot-compiler.c: Implement a few functions missing from the asm writer.
4378         (emit_method_code): Only write symbols for methods when using the bin
4379         writer, since the assembler can't deal with the characters in our method
4380         names.
4381
4382         * aot-compiler.c (is_plt_patch): ICALL_ADDR is also a plt patch.
4383
4384         * method-to-ir.c (mono_method_to_ir): Transform aotconst+calli into a direct
4385         call.
4386
4387         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Rework the code
4388         a bit to also restore %rax.
4389
4390 2008-12-05  Mark Probst  <mark.probst@gmail.com>
4391
4392         * mini-ppc.c: Some simple merges from mini-ppc64.c.
4393
4394 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
4395
4396         * ssa.c (mono_ssa_compute): Only add an implicit reference at start for
4397         arguments.
4398
4399 2008-12-05  Mark Probst  <mark.probst@gmail.com>
4400
4401         * exceptions-ppc.c: Merged with exceptions-ppc64.c.
4402
4403         * mini-ppc.c, mini-ppc.h: Remove PPC_STACK_ALIGNMENT and use
4404         MONO_ARCH_FRAME_ALIGNMENT.  Struct for PPC64 function descriptors.
4405
4406         * exceptions-ppc64.c: Removed.
4407
4408         * Makefile.am: Use exceptions-ppc.c instead of exceptions-ppc64.c.
4409
4410 2008-12-05  Mark Probst  <mark.probst@gmail.com>
4411
4412         * tramp-ppc.c, mini-ppc.c, mini-ppc.h: Merged tramp-ppc.c with
4413         tramp-ppc64.c.
4414
4415         * Makefile.am: Use tramp-ppc.c instead of tramp-ppc64.c.
4416
4417         * tramp-ppc64.c: Removed.
4418
4419 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
4420
4421         * aot-compiler.c (add_generic_instances): Skip non-generic classes in
4422         the TYPESPEC table.
4423
4424 2008-12-05  Mark Probst  <mark.probst@gmail.com>
4425
4426         * mini-ppc.h: Merged mini-ppc64.h with mini-ppc.h.
4427
4428         * exceptions-ppc64.c, tramp-ppc64.c, mini-arch.h, Makefile.am: Use
4429         mini-ppc.h instead of mini-ppc64.h.
4430
4431         * mini-ppc64.h: Removed.
4432
4433 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
4434
4435         * mini-mips.c: introduce USE_LDC_SDC: use ldc1/sdc1 to load/store doubles, disabled by default
4436         
4437         * mini-mips.c (mono_arch_emit_outarg_vt): fix offset calculation for memcpy in structure passing.
4438         
4439 2008-12-05  Mark Probst  <mark.probst@gmail.com>
4440
4441         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c:
4442         Removed FIRST/LAST_[GF]REG macros, to make merging PPC64 with PPC
4443         code easier.
4444
4445 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
4446
4447         * basic-simd.cs: Tests for operator == and != on  Vector8us and Vector16b.
4448
4449 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
4450
4451         * simd-intrinsics.c: Add support for operator == and != to Vector8(u)s and Vector16(s)b.
4452
4453 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
4454
4455         * basic-simd.cs: Tests for operator == and != on Vector4f.
4456
4457 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
4458
4459         * simd-intrinsics.c (simd_intrinsic_emit_equality): Adapt to support Vector4f.
4460
4461         * simd-intrinsics.c: Kill useless enum.
4462
4463 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
4464
4465         * cpu-mips.md: add long_conv_to_ovf_i4_2
4466         * mini-mips.c: update/add various _OVF_ opcodes to fix test failures
4467
4468 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
4469
4470         * mini-mips.c: ifdef protect automatic promotions of R4 to R8.
4471         
4472         * mini-mips.c (mono_arch_emit_setret): handle R4 case with FCONV_TO_R4 instead of FMOVE
4473
4474 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
4475
4476         * mini-mips.c (mono_arch_output_basic_block): fix codegen for OP_OR_IMM/OP_IOR_IMM
4477         
4478 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
4479
4480         * basic-simd.cs: Add tests for new methods.
4481
4482 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
4483
4484         * simd-intrinsics.c: Add support for operator == and !=
4485         on Vector4(u)i.
4486
4487         * simd-methods.h: Add SN_op_Inequality and SN_op_Equality.
4488
4489 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
4490
4491         * simd-intrinsics.c: Remove ExtractByteMask intrinsics.
4492
4493 2008-12-04  Zoltan Varga  <vargaz@gmail.com>
4494
4495         * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
4496
4497         * mini.c (mono_resolve_patch_target): Allow pinvoke methods in 
4498         MONO_PATCH_INFO_ICALL_ADDR.
4499
4500         * aot-runtime.c (MonoAotFileInfo): Correct order of fields.
4501
4502         * aot-compiler.c: Resurrect full-aot support.
4503
4504 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
4505
4506         * mini-mips.c (mono_arch_lowering_pass): handle OP_COMPARE and OP_ICOMPARE
4507         
4508 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
4509
4510         * mini-mips.c (mono_arch_output_basic_block): fix OP_IREM_UN code generation
4511         
4512 2008-12-03  Rodrigo Kumpera  <rkumpera@novell.com>
4513
4514         * basic-simd.cs: Fix tests to work under ppc.
4515         Remove tests for methods that will be removed.
4516
4517 2008-12-03  Mark Probst  <mark.probst@gmail.com>
4518
4519         * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
4520         generic type (via a typedef or typeref) correctly.
4521
4522 2008-12-03  Zoltan Varga  <vargaz@gmail.com>
4523
4524         * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
4525         diagnose an assertion failure.
4526
4527 2008-12-02  Mark Probst  <mark.probst@gmail.com>
4528
4529         * tramp-ppc64.c (mono_arch_create_rgctx_lazy_fetch_trampoline):
4530         Fix trampoline size.
4531
4532         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: A few floating point
4533         conversion opcodes are implemented natively instead via emulation.
4534
4535 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
4536
4537         * cpu-mips.md: remove mips_xori
4538
4539         * mini-ops.h:  remove mips_xori
4540
4541         * mini-mips.h: replace OP_MIPS_XORI with OP_IXOR
4542
4543         * mini-mips.c (mono_arch_decompose_long_opts): Add ladd_imm, lsub, lsub_imm, lneg, lsub_ovf, lsub_ovf_un.
4544         
4545         * mini-mips.c (mono_arch_lowering_pass, mono_arch_output_basic_block): fix IXOR handling
4546         
4547 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
4548
4549         * cpu-mips.md: fix instruction lengths.
4550
4551         * mini-mips.h: define MONO_ARCH_NO_IOV_CHECK
4552
4553         * mini-mips.c: move most instruction rewriting into decompose_ops. Implement conditional branches and exceptions. Fix jump table patch handling. Implement add/sub OVF.
4554
4555         * mini-ops.h: fix slti / sltiu op profiles.
4556         
4557 2008-12-02  Martin Baulig  <martin@ximian.com>
4558
4559         * method-to-ir.c (mono_method_to_ir): Disable debugging
4560         information for the init locals block to make the debugger stop
4561         after all locals have been initalized.
4562
4563 2008-12-02  Martin Baulig  <martin@ximian.com>
4564
4565         * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
4566         running inside the debugger.
4567
4568 2008-12-01  Zoltan Varga  <vargaz@gmail.com>
4569
4570         * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
4571         is enabled.
4572
4573         * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the 
4574         alu->alu imm optimization which only shows if deadce is disabled.
4575
4576         * aot-compiler.c: Rename the function names for the binary and asm writers
4577         so they can coexist in the same process. Rework the xdebug code to use the
4578         asm writer. This avoids the need to call into the runtime to dump the
4579         debugging info. Add more debugging info for types.
4580
4581         * mini-<ARCH>.h: Kill MONO_ARCH_HAVE_NORMALIZE_OPCODES define.
4582
4583         * genmdesc.c genmdesc.pl mini.h: Don't put the CEE_ opcodes into the
4584         cpu description tables, they can't occur in cpu-<ARCH>.md.
4585
4586         * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
4587         the stack in CEE_LDFLDA. Fixes #450542.
4588
4589         * generics.cs: Add a new test.
4590
4591 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
4592
4593         * mini-ops.h: updated MIPS opcodes
4594         * mini-mips.c: decompose long opts
4595         * mini-mips.h: decompose long opts
4596         
4597 2008-11-29  Mark Mason   <mmason@upwardaccess.com>
4598
4599         * cpu-mips.md: fix length on int_rem_un
4600         * mini-mips.c (mips_stackframe_adjust): fix insertion of spillvars region in MIPS stackframes.
4601         
4602 2008-11-29  Zoltan Varga  <vargaz@gmail.com>
4603
4604         * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
4605
4606         * mini-codegen.c (mono_print_ins_index): Handle OP_VOIDCALL_MEMBASE.
4607
4608 2008-11-29  Martin Baulig  <martin@ximian.com>
4609
4610         * mini-exceptions.c (mono_handle_native_sigsegv): Check
4611         mono_debug_using_mono_debugger() in addition to the
4612         `no_gdb_backtrace' flag in the `MonoDebugOptions'.
4613
4614 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
4615
4616         * mini-ops.h: updated more MIPS opcodes
4617         * mini-mips.c: FP compare/branch working again, clean up last of CEE_ -> OP_ mappings
4618         * cpu-mips.md: Added MIPS versions of new FP compare/branch opcodes.
4619         
4620 2008-11-28  Mark Probst  <mark.probst@gmail.com>
4621
4622         * mini-ppc64.c: Patch the RGCTX fetch trampoline correctly.
4623
4624 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
4625
4626         * mini-mips.c (mono_arch_emit_call): adding missing conversion to fp single when passing in integer arg register.
4627         * mini-mips.c (mips_adjust_stackframe): compensate for spill-down logic.
4628         * mini-ops.h: correct selected mips opcode entries
4629         
4630 2008-11-28  Mark Probst  <mark.probst@gmail.com>
4631
4632         * mini-ppc64.c, mini-ppc64.h: Enable generalized IMT thunks and
4633         make them work.
4634
4635 2008-11-28  Mark Probst  <mark.probst@gmail.com>
4636
4637         * mini-ppc64.h, tramp-ppc64.c: Make generic code sharing work.
4638
4639 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
4640
4641         * method-to-ir.c, mini-trampolines.c: protect IMG code with #ifdef MONO_ARCH_HAVE_IMT to fix compile errors.
4642         * mini-mips.c: Fixup stackframe assignments after allocation of spillvars.
4643         * mini-mips.h: disable IMT
4644         * tramp-mips.c (mono_arch_get_vcall_slot): fix offset extraction
4645         
4646 2008-11-28  Mark Probst  <mark.probst@gmail.com>
4647
4648         * mini-ppc64.c, mini-ppc64.h: Don't emulate long ops.
4649
4650 2008-11-28  Mark Probst  <mark.probst@gmail.com>
4651
4652         * mini-ppc64.c, exceptions-ppc64.c: Several fixes.
4653
4654 2008-11-28  Zoltan Varga  <vargaz@gmail.com>
4655
4656         * method-to-ir.c (handle_isinst): Use PCONST instead of ICONST for
4657         consistency.
4658
4659 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
4660
4661         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
4662         for Set/GetVector aligned versions.
4663
4664 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
4665
4666         * basic-simd.cs: Add tests for Get/SetVector.
4667
4668 2008-11-27  Mark Probst  <mark.probst@gmail.com>
4669
4670         * mini.c: Removed g_slist_append_mempool().  Now in
4671         metadata/mempool.c.
4672
4673 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
4674
4675         * simd-intrinsics.c (mono_emit_vector_ldelema): Extract the element
4676         size properly and make the bounds check optional.
4677
4678         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
4679         for SetVector and IsAligned.
4680
4681 2008-11-27  Zoltan Varga  <vargaz@gmail.com>
4682
4683         * mini.c: Remove unused mono_normalize_opcodes () function.
4684
4685 2008-11-26  Mark Probst  <mark.probst@gmail.com>
4686
4687         * method-to-ir.c (mini_emit_inst_for_method): Small fix: we're
4688         using the new atomic add ops now.
4689
4690         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Implemented atomic
4691         add.
4692
4693 2008-11-26  Mark Probst  <mark.probst@gmail.com>
4694
4695         * mini-ppc64.c: Several fixes.
4696
4697 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
4698
4699         * cpu-mips.md: added jump_table
4700         * mini-mips.c: added jump_table. Eliminate compare-imm when lowering. Remove dead function.             
4701
4702 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
4703
4704         * mini-mips.c, mini-mips.h, tramp-mips.c, cpu-mips.md: Initial upgrade of MIPS port to new IR.
4705
4706 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
4707
4708         * mini-ops.h: corrected a handful of MIPS opcodes.
4709
4710 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
4711
4712         * aot-compiler.c: MIPS to use ELF writer
4713
4714 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
4715
4716         * mini-codegen.c: remove MIPS specific assert.
4717
4718 2008-11-25  Mark Probst  <mark.probst@gmail.com>
4719
4720         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Several
4721         fixes.  PPC64 now passes most of the runtime regressions.
4722
4723 2008-11-24  Zoltan Varga  <vargaz@gmail.com>
4724
4725         * regalloc2.c: Distinguish between use/def positions. Optimize the creation of
4726         volatile intervals a bit.
4727
4728 2008-11-24  Mark Probst  <mark.probst@gmail.com>
4729
4730         * basic-long.cs: New test case.
4731
4732 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
4733
4734         * mini.c (mini_method_compile): Disable globalra for large methods for 
4735         now.
4736
4737         * regalloc2.c (order_moves): Add fp support.
4738
4739         * branch-opts.c (mono_remove_critical_edges): Split non-critical edges whose
4740         source bblock ends with an OP_BR_REG.
4741
4742         * ratests.cs: Add a new test.
4743
4744 2008-11-23  Mark Probst  <mark.probst@gmail.com>
4745
4746         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c: Disable generic code
4747         sharing.  PPC64 now passes generics.exe.
4748
4749 2008-11-23  Mark Probst  <mark.probst@gmail.com>
4750
4751         * mini-ppc64.c: Several fixes.  PPC64 now runs iltests.exe.
4752
4753 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
4754
4755         * exceptions-x86.c (mono_arch_find_jit_info): Avoid reading uninitialized
4756         memory when mono_jit_info_table_find () can't find the method in the
4757         LMF case.
4758
4759         * aot-compiler.c (mono_save_xdebug_info): Emit complete debug info for
4760         AOTed code too.
4761         
4762         * aot-compiler.c (mono_save_xdebug_info): Make this work with the assembly
4763         writer too.
4764
4765 2008-11-23  Mark Probst  <mark.probst@gmail.com>
4766
4767         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, cpu-ppc64.md:
4768         Several fixes.  PPC64 now runs exceptions.exe and
4769         devirtualization.exe.
4770
4771 2008-11-22  Mark Probst  <mark.probst@gmail.com>
4772
4773         * mini-ppc64.c, tramp-ppc64.c: Small fixes.  PPC64 now runs
4774         arrays.exe and basic-math.exe.
4775
4776 2008-11-22  Mark Probst  <mark.probst@gmail.com>
4777
4778         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c,
4779         cpu-ppc64.md: Several fixes.  PPC64 now runs objects.exe.
4780
4781 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
4782
4783         * simd-intrinsics.c: Add support ArrayExtension intrinsics.
4784
4785 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
4786
4787         * method-to-ir.c: Move bounds checking macros to ir-emit.h
4788
4789         * ir-emit.h: Move macros from method-to-ir.c to here.
4790
4791 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
4792
4793         * mini-ops.h: Correct the long simd ops to use LREG.
4794
4795 2008-11-21  Zoltan Varga  <vargaz@gmail.com>
4796
4797         * mini-ops.h: Correct the dreg type of OP_LOADI8_MEMBASE.
4798         
4799         * mini-ops.h: Correct the dreg type of a few long opcodes.
4800
4801         * mini-amd64.h: Applied patch from Mihai Chelaru <kefren@ngnetworks.ro>.
4802         Add netbsd support.
4803
4804 Fri Nov 21 12:52:23 CET 2008 Paolo Molaro <lupus@ximian.com>
4805
4806         * mini-ppc.c: remove negative stack references in epilog
4807         for platforms that don't support the red zone.
4808
4809 2008-11-21  Mark Probst  <mark.probst@gmail.com>
4810
4811         * mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved floating
4812         point regs.  Now PPC64 passes basic-calls.exe.
4813
4814 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4815
4816         * basic-simd.cs: Add tests for accessors of Vector2l.
4817
4818 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4819
4820         * mini-ops.h: Added OP_INSERTX_I8_SLOW,.
4821
4822         * mini-x86.c (mono_arch_decompose_long_opts): Decompose OP_INSERTX_I8_SLOW.
4823         
4824         * simd-intrinsics.c: Add support for Vector2l and Vector2ul.
4825
4826 2008-11-21  Mark Probst  <mark.probst@gmail.com>
4827
4828         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes.  Now
4829         PPC64 passes basic-long.exe.
4830
4831 2008-11-20  Mark Probst  <mark.probst@gmail.com>
4832
4833         * decompose.c: Decompose carry and overflow add on PPC64 like on
4834         other 64 bit archs.  Don't decompose sub at all on PPC64.
4835
4836         * mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c, cpu-ppc64.md:
4837         Several fixes and new opcodes.  Now PPC64 runs (but doesn't pass)
4838         basic-long.exe.
4839
4840 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4841
4842         * basic-simd.cs: Add tests for accessors of Vector2d.
4843
4844 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4845
4846         * mini-ops.h: Added OP_INSERTX_R8_SLOW,.
4847
4848         * cpu-x86.md: Same.
4849
4850         * mini-x86.c (mono_arch_output_basic_block): Same.
4851         
4852         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector2d.
4853
4854 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4855
4856         * basic-simd.cs: Add tests for accessors of Vector4f.
4857
4858 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4859
4860         * mini-ops.h: Added OP_INSERTX_R4_SLOW,.
4861
4862         * cpu-x86.md: Same.
4863
4864         * mini-x86.c (mono_arch_output_basic_block): Same.
4865         
4866         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4f.
4867
4868 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4869
4870         * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
4871
4872 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4873
4874         * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
4875
4876         * cpu-x86.md: Same.
4877
4878         * mini-x86.c (mono_arch_output_basic_block): Same.
4879         
4880         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
4881
4882 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4883
4884         * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
4885
4886 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4887
4888         * simd-intrinsics.c: Enable setters for Vector16sb.
4889
4890 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4891
4892         * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
4893
4894         * cpu-x86.md: Same.
4895
4896         * mini-x86.c (mono_arch_output_basic_block): Same.
4897         
4898         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
4899
4900 2008-11-19  Rodrigo Kumpera  <rkumpera@novell.com>
4901
4902         * simd-intrinsics.c: Implement setter for Vector8us.
4903
4904 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
4905
4906         * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
4907         for dead variables.
4908
4909 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
4910
4911         * mini-ppc.c: remove references to the red zone in the prolog
4912         (for systems that don't support it).
4913
4914 2008-11-19  Mark Probst  <mark.probst@gmail.com>
4915
4916         * cpu-ppc64.md: Fixed a few instruction lengths.
4917
4918         * mini-ppc64.c: Don't emit SETLRET.  PPC64 passes basic-float.exe,
4919         now.
4920
4921 2008-11-19  Mark Probst  <mark.probst@gmail.com>
4922
4923         * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes.  PPC64 passes
4924         basic.exe now.
4925
4926 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
4927
4928         * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
4929
4930 2008-11-18  Rodrigo Kumpera  <rkumpera@novell.com>
4931
4932         * mini-ops.h: Added OP_INSERT_I2.
4933
4934         * cpu-x86.md: Same.
4935
4936         * mini-x86.c (mono_arch_output_basic_block): Same.
4937         
4938         * simd-intrinsics.c: Implement setter for Vector8s.
4939
4940         * simd-methods.h: Add the names of get setters of Vector8s.
4941
4942 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
4943
4944         * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
4945         
4946         * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
4947         parameters.
4948
4949         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
4950
4951 2008-11-18  Mark Probst  <mark.probst@gmail.com>
4952
4953         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
4954         for PPC64.  An empty program runs now.
4955
4956 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
4957
4958         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
4959
4960         * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
4961         a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
4962         info for JITted code is emitted into a shared library, loadable into gdb.
4963
4964 2008-11-18  Mark Probst  <mark.probst@gmail.com>
4965
4966         * Makefile.am: Changes to build PPC64.
4967
4968         * mini-arch.h: Include mini-ppc64.h on PPC64.
4969
4970 2008-11-18  Mark Probst  <mark.probst@gmail.com>
4971
4972         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
4973         in PPC code up to r119147.
4974
4975 2008-11-18  Mark Probst  <mark.probst@gmail.com>
4976
4977         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
4978         cpu-ppc64.md: Changes for PPC64.
4979
4980         Based on code submitted by andreas.faerber@web.de at
4981         https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
4982         X11/MIT license.
4983
4984 2008-11-18  Mark Probst  <mark.probst@gmail.com>
4985
4986         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
4987         cpu-ppc64.md: Copied from the corresponding PPC files from
4988         r118846.
4989
4990 2008-11-18  Scott Peterson  <lunchtimemama@novell.com>
4991
4992         * mini-ops.h: Added OP_ROUND.
4993
4994         * cpu-x86.md: Added round.
4995
4996         * mini-x86.c: Added support for intrinsicing Math.Round (double).
4997
4998         * basic-math.cs: Added test_0_round to test rounding.
4999
5000         Contributed under MIT/X11 license.
5001
5002 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
5003
5004         * aot-compiler.c : Fix the Winx64 build.
5005
5006         Contributed under MIT/X11 license.
5007
5008 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
5009
5010         * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
5011         in OP_EXTRACT_R8 to avoid possible stack corruption.
5012
5013 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
5014
5015         * mini-ops.h: Added OP_EXTRACT_R8/I8.
5016
5017         * cpu-x86.md: Added extract_r8.
5018
5019         * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
5020         
5021         * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
5022         a couple of OP_EXTRACT_I4.
5023
5024         * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
5025
5026         * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
5027
5028 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
5029
5030         * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
5031         and not 4.1. 
5032
5033 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
5034
5035         * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
5036         trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
5037
5038         * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
5039         are not needed any more.
5040
5041         * mini.h: Remove the unused INS_LIST macros.
5042
5043         * mini.c (mini_method_compile): Remove a disable globalra case which is no
5044         longer needed.
5045
5046         * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
5047         ir-emit.h.
5048
5049         * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
5050         mono_alloc_ireg () instead.
5051
5052         * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
5053         macros.
5054
5055         * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
5056         on amd64.
5057
5058         * aot-runtime.c (load_aot_module): Disable AOT when running under
5059         CAS.
5060
5061         * mini-amd64.h: Change the monitor fastpath defines to check for
5062         !PLATFORM_WIN32 so they work on *bsd too.
5063
5064         * mini.h mini.c mini-hhpa.c: Remove more unused code.
5065
5066         * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
5067
5068         * mini.h (MonoCompile): Remove new_ir flag.
5069
5070         * regalloc.h regalloc.c: Remove unused code.
5071
5072         * cpu-*.md: Remove more unused opcodes.
5073
5074         * simple-cee-ops.h simple-mini-ops.h: Removed.
5075
5076         * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
5077         
5078 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
5079
5080         * aliasing.h: Removed.
5081
5082         * *.c: Remove references to aliasing.h and inssel.h.
5083
5084         * mini.c: Remove additional unused functions.
5085
5086         * mini-ops.h cpu-*.md: Remove unused opcodes.
5087
5088 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
5089
5090         Remove the old JIT code.
5091
5092         * inssel*.brg: Removed.
5093
5094         * ssa.c abcremoval.c aliasing.c: Removed.
5095
5096         * ssa2.c: Renamed to ssa.c.
5097
5098         * abcremoval2.c: Renamed to abcremoval.c.
5099
5100         * *.c: Removed all !cfg->new_ir code.
5101
5102         * mini-<ARCH>.c: Removed mono_arch_call_opcode (), 
5103         mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
5104
5105         * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
5106         
5107 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
5108
5109         * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
5110         to simplify the code and cut back on the number of global symbols in the AOT
5111         file.
5112         
5113         * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
5114
5115 2008-11-15  Zoltan Varga  <vargaz@gmail.com>
5116
5117         * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
5118         with the got/got_info tables.
5119
5120         * mini.h: Bump AOT file format version.
5121         
5122         * unwind.h: New file, contains definitions for stack unwinding.
5123
5124         * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
5125         to cfg->unwind_ops.
5126         
5127         * aot-compiler.c: Generalize the emitting of unwind information to use the
5128         information in cfg->unwind_ops.
5129
5130         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
5131
5132         * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
5133         AOT method frames. Enable writing symbols for methods by default.
5134
5135 2008-11-14  Rodrigo Kumpera  <rkumpera@novell.com>
5136
5137         * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
5138         and make it work with vectors of element sizes 1, 2 and 4.
5139
5140         * simd-intrinsics.c: Enable getter for all vectors with element size
5141         1, 2 or 4.
5142
5143         * simd-methods.h: Add the names of other getters.
5144
5145         * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
5146
5147         * cpu-x86.md: Same.
5148
5149         * mini-x86.c: Same.
5150
5151 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
5152
5153         * mini-ppc.h: portability fix.
5154
5155 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
5156
5157         * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
5158         buggy and will overwrite it.
5159
5160 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
5161
5162         * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
5163         Use it to emit local symbols for all methods so AOTed methods show up with
5164         their full name in gdb/valgrind output.
5165
5166 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
5167
5168         * mini-ppc.c: portability fixes.
5169
5170 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
5171
5172         * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
5173         entries out of the if (!generic_shared...) code so it is always done.
5174         (mono_class_init_trampoline): Do the patching when running under valgrind
5175         too, newer versions of valgrind have no problems with it.
5176
5177 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
5178
5179         * aot-compiler.c (emit_writeout): Rework this to make it easier to add
5180         further sections.
5181
5182 2008-11-13  Mark Probst  <mark.probst@gmail.com>
5183
5184         * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
5185         filters.
5186
5187 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
5188
5189         * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui. 
5190
5191 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
5192
5193         * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
5194
5195         * cpu-x86.md: Same.
5196
5197         * mini-x86.c: Same.
5198
5199         * simd-intrinsics.c: Same.
5200
5201 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
5202
5203         * simd-intrinsics.c: Enable constructor intrinsics for all types.
5204
5205 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
5206
5207         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
5208         to work with more Vector types.
5209
5210 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
5211
5212         * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
5213         store the elemens directly instead of using and intermediate.
5214
5215 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
5216
5217         * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
5218
5219         * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
5220         to preserve %eax for aot plt trampolines.
5221
5222         * aot-compiler.c (compile_method): Don't skip synchronized methods.
5223         (encode_method_ref): Flag synchronized methods so they won't go through
5224         the AOT trampoline.
5225
5226         * aot-compiler.c: Additional work to support AOTing synchronized methods/
5227         wrappers.
5228
5229         * cpu-ia64.md (jmp): Increase max length.
5230
5231 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
5232
5233         * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
5234         open generic classes.
5235
5236         * aot-compiler.c: Enable the ELF writer on ELF platforms.
5237
5238         * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
5239         box+brtrue optimization since it causes test failures on x86.
5240
5241 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
5242
5243         * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
5244
5245         * cpu-x86.md: Same.
5246
5247         * mini-x86.c: Same.
5248
5249         * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
5250         for simd ctor values. 
5251
5252         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
5253         instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
5254
5255 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
5256
5257         * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
5258         LogicalRightShift.
5259
5260         * simd-instrincs.c: Same.
5261
5262         * basic-simd.cs: Same.
5263
5264 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
5265
5266         * ratests.cs: Add more tests.
5267
5268         * regalloc2.c (add_spill_code): Handle more corner cases.
5269
5270 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
5271
5272         * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
5273         (update_liveness): Avoid holes in the liveness ranges of hregs if they are
5274         both the source an destination of an instruction.
5275
5276 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
5277
5278         * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
5279         wapihandles.c: more portability changes.
5280
5281 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
5282
5283         * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
5284         * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
5285         safe to execute in a signal handler and the kernel provides better
5286         the info in /proc/self/smaps. Avoid the assert on sigaction during
5287         cleanup.
5288
5289 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
5290
5291         * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
5292         do the bblock linking hack if it is actually needed.
5293
5294         * Makefile.am (patch-libtool): New helper target to patch libtool to speed
5295         up linking.
5296
5297         * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
5298         crash problem is fixed.
5299
5300         * branch-opts.c (mono_remove_critical_edges): Link up newly added
5301         bblocks.
5302
5303         * mini.c (mini_method_compile): Compute unreachable bblocks properly even
5304         for catch clauses.
5305         (mini_method_compile): Set the starting value of next_vreg to 
5306         MAX_IREGS + MAX_FREGS when using globalra.
5307
5308         * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
5309         filter clauses with BB_EXCEPTION_HANDLER.
5310
5311         * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
5312
5313 2008-11-10  Mark Probst  <mark.probst@gmail.com>
5314
5315         * mini-x86.c (mono_arch_get_argument_info): Don't align argument
5316         space for stdcall.  Fixes regressions on Win32.
5317
5318 2008-11-10  Zoltan Varga  <vargaz@gmail.com>
5319
5320         * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
5321         bblocks.
5322         (linear_scan): Remove an assert which doesn't seem to be needed.
5323
5324         * local-propagation.c (mono_local_deadce): Avoid a call to
5325         MONO_DELETE_INS which would screw up the instruction linking.
5326
5327         * mini.c (mono_decompose_op_imm): Make this work with globalra.
5328
5329         * regalloc2.c: Upgrade to work the current JIT code.
5330
5331 2008-11-09  Zoltan Varga  <vargaz@gmail.com>
5332
5333         * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
5334         case.
5335
5336         * aot-runtime.c: Remove some dead code.
5337
5338         * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
5339         consistency.
5340         (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
5341
5342         * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
5343         trampolines using sscanf since atoi doesn't work on large unsigned values.
5344
5345         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): 
5346         Initialize code_size.
5347
5348 2008-11-08  Mark Probst  <mark.probst@gmail.com>
5349
5350         * method-to-ir.c (mini_emit_inst_for_method): Make
5351         Interlocked.CompareExchange work for Int arguments on 32 bit
5352         archs, as well.
5353
5354 2008-11-07  Mark Probst  <mark.probst@gmail.com>
5355
5356         * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
5357
5358 2008-11-06  Bill Holmes  <billholmes54@gmail.com>
5359
5360         * main.c Fix MSVC build.
5361
5362         Contributed under MIT/X11 license.
5363
5364 2008-11-06  Mark Probst  <mark.probst@gmail.com>
5365
5366         * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
5367         alignment larger than 8 bytes are aligned correctly, too.
5368
5369         * mini.c: Honor the min_align field of MonoClass when laying out
5370         the stack.
5371
5372 2008-11-06  Zoltan Varga  <vargaz@gmail.com>
5373
5374         * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
5375
5376         * aot-compiler.c (emit_plt): Fix a warning.
5377         
5378         * aot-compiler.c: Implement ARM support in the binary writer.
5379
5380 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
5381
5382         * basic-simd.cs: Add test for getter with byref arg.
5383         Fix the naming of a few tests.
5384         Add missing checks to a test.
5385
5386 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
5387
5388         * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
5389
5390         * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
5391         most of the full-aot support for monitor enter/exit trampolines.
5392
5393         * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
5394         enter/exit trampoline creation functions.
5395
5396         * Makefile.am: Fix the generation of buildver.h so it is not invoked during
5397         make dist.
5398
5399 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
5400
5401         * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
5402         incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
5403         implement the needed functionality without adding crap to the runtime.
5404
5405 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
5406
5407         * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
5408         non-x86 builds.
5409
5410         * mini.c (mono_build_date): New global version holding the build date in
5411         string format.
5412         
5413         * Makefile.am (buildver.c): Generate a file containing the build date.
5414
5415         * main.c: Set the build date from the generated file.
5416
5417         * mini.c (mono_get_runtime_build_info): New helper function returning build
5418         information in a string format.
5419         
5420         * driver.c (mono_main): Print the build date in --version.
5421
5422         * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
5423         file when the bind-to-runtime-version option is used.
5424
5425 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
5426
5427         * simd-intrinsics.c: Fix bug when using getters and byref args. 
5428
5429 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
5430
5431         * simd-methods.h: Rename prefetch methods.
5432
5433         * simd-intrinsics.c: Same.      
5434
5435 2008-11-05  Mark Probst  <mark.probst@gmail.com>
5436
5437         * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
5438         sizes.
5439
5440 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
5441
5442         * aot-compiler.c: Use the bundled elf header files instead of depending on
5443         the system one.
5444         
5445         * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
5446         mempool.
5447
5448         * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
5449         on every call.
5450
5451 2008-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
5452
5453         * cpu-x86.md: Add store nta ops.
5454
5455         * mini-ops.h: Same.
5456
5457         * mini-x86.c: Same.
5458
5459         * mini.h: Add an enum for simd prefetch modes.
5460
5461         * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
5462         of store. Use the changed code to support store nta.
5463
5464         * simd-intrinsics.c: Add prefetch ops for all vector types.
5465
5466 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
5467
5468         * aot-compiler.c: Add an option for JIT compiling the methods by multiple 
5469         threads.
5470         
5471         * aot-compiler.c: Use statically allocated buffers for constructing symbol 
5472         names.
5473
5474         * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
5475         trampolines.
5476
5477 2008-11-04  Mark Probst  <mark.probst@gmail.com>
5478
5479         * mini-x86.c: Fixed commit.
5480
5481 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
5482
5483         * aot-compiler.c (emit_plt): Align the plt section only on x86.
5484
5485 2008-11-04  Mark Probst  <mark.probst@gmail.com>
5486
5487         * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
5488         and MONITOR_EXIT, for the ASM fastpaths.
5489
5490         * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
5491         available.
5492
5493         * mini.c, patch-info.h: Signature and patch infos for
5494         Monitor.Enter/Exit trampolines.
5495
5496         * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
5497
5498         * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
5499         Monitor.Enter/Exit ASM fastpath for Linux.
5500
5501 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
5502
5503         * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
5504
5505         * objects.cs: Add a new test.
5506         
5507         * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
5508
5509         * aot-runtime.c (load_method): Run class initialization in the PLT case even
5510         if MONO_LOG_LEVEL is set.
5511
5512         * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
5513
5514         * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
5515
5516         * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
5517         
5518         * aot-compiler.c: Change the relocation code to use virtual addresses instead
5519         of file offsets. Align the sections belonging to the data segment to 
5520         PAGESIZE.
5521
5522 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
5523
5524         * aot-compiler.c: Simplify the elf writer by depending on the definitions in
5525         elf.h. Port it to amd64.
5526
5527 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
5528
5529         * driver.c: Enable SIMD by default.
5530
5531 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
5532
5533         * cpu-x86.md: Add prefetch op.
5534
5535         * mini-ops.h: Same.
5536
5537         * mini-x86.c: Same.
5538
5539         * mini.h: Add an enum for simd prefetch modes.
5540
5541         * simd-methods.h: Add prefetch function names.
5542
5543         * simd-intrinsics.c: Add prefetch ops for all vector types.
5544
5545 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
5546
5547         * aot-compiler.c (emit_bytes): Speed this up a little.
5548
5549 2008-11-02  Zoltan Varga  <vargaz@gmail.com>
5550
5551         * aot-compiler.c: Add JIT time etc. statistics.
5552         
5553         * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
5554
5555         * mini.h (MonoCompile): Add 'got_offset' field.
5556
5557         * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
5558         method_got_offsets array.
5559
5560         * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
5561         wrappers.
5562
5563         * aot-compiler.c (compile_method): Add generic method instances referenced
5564         by the method to the list of methods to be compiled, this is required so if
5565         A<T> references B<T>, and another assembly references A<int>, then it will
5566         also get a copy of B<int>.
5567
5568         * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
5569         when checking for monitor enter/exit.
5570
5571 2008-10-30  Mark Probst  <mark.probst@gmail.com>
5572
5573         * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
5574         for Monitor.Enter and Monitor.Exit if enabled.
5575
5576         * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
5577         Solaris.
5578
5579 2008-10-30  Zoltan Varga  <vargaz@gmail.com>
5580
5581         * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
5582         of an OP_MOVE. Fixes #440046.
5583
5584         * basic-long.cs: Add a new test.
5585
5586 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
5587
5588         * mini.h: Add synchronization note for the managed counter-part.
5589
5590         * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
5591         returns the simd caps of the current cpu.
5592
5593 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
5594
5595         * basic-simd.cs: Remove Console.WriteLine.
5596
5597 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
5598
5599         * basic-simd.cs: New tests for Vector2ul.
5600
5601 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
5602
5603         * simd-intrinsics.c: Add new vector type Vector2ul.
5604
5605 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
5606
5607         * basic-simd.cs: New tests for Vector2l.
5608
5609 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
5610
5611         * cpu-x86.md: Add long version of most packed int ops.
5612
5613         * mini-ops.h: Same.
5614
5615         * mini-x86.h: Same.
5616
5617         * simd-intrinsics.c: Add new vector type Vector2l.
5618
5619 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
5620
5621         * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
5622
5623         * simd-methods.h: Remove SN_op_BitwiseXor.
5624
5625 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
5626
5627         * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
5628         alignment.
5629
5630 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
5631
5632         * basic-simd.cs: Test for Vector2d.
5633
5634         * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
5635         value.
5636
5637 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
5638
5639         * cpu-x86.md: Add double version of all packed float ops.
5640
5641         * mini-ops.h: Same.
5642
5643         * mini-x86.h: Same.
5644
5645         * simd-intrinsics.c: Add new vector type Vector2d.
5646
5647         * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
5648
5649         * simd-methods.h: Add Duplicate.
5650
5651 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
5652
5653         * basic-simd.cs: Test for packing with signed saturation.
5654
5655 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
5656
5657         * aot-compiler.c (add_generic_instances): Add all methods of generic instances
5658         found in the TYPESPEC table.
5659
5660 2008-10-26  Zoltan Varga  <vargaz@gmail.com>
5661
5662         * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
5663         too.
5664
5665         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
5666
5667         * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
5668         instead of the RVA, since the RVA can be changed by tools like the cil 
5669         stripper.
5670
5671         * method-to-ir.c (mono_method_to_ir2): Ditto.
5672
5673         * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
5674         (deserialize_variable): Ditto.
5675
5676 2008-10-25  Martin Baulig  <martin@ximian.com>
5677
5678         * debug-mini.c (write_variable): Use
5679         `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
5680
5681 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
5682
5683         * cpu-x86.md: Add unsigned variants of packd and packw.
5684
5685         * mini-ops.h: Same.
5686
5687         * mini-x86.h: Emit the right instruction for packd and packw.
5688         Add unsigned variants of packd and packw.
5689
5690         * simd-intrinsics.c: Packd and packw were used in place of their
5691         unsigned variants. Change that.
5692         Add intrinsics for (Signed)PackWithSignedSaturation.
5693
5694         * simd-methods.h: Add (Signed)PackWithSignedSaturation.
5695
5696 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
5697
5698         * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
5699
5700 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
5701
5702         * mini-ops.h: Remove dword packed add/sub with saturation ops.
5703
5704         * cpu-x86.md: Remove dword packed add/sub with saturation ops.
5705
5706         * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
5707         sse instructions.
5708
5709         * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
5710
5711 2008-10-24  Mark Probst  <mark.probst@gmail.com>
5712
5713         * method-to-ir.c, mini.c: Special casing for the synchronized
5714         wrapper for the ldtoken+GetTypeFromHandle case.
5715
5716 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
5717
5718         * mini.c (mono_replace_ins): Move this to branch-opts.c.
5719
5720         * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
5721         created/split bblocks.
5722
5723 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
5724
5725         * mini-ops.h: Add packed signed mul high.
5726         
5727         * cpu-x86.md: Same.
5728
5729         * mini-x86.c (mono_arch_output_basic_block): Same.
5730
5731         * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
5732
5733         * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
5734
5735 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
5736
5737         * basic-simd.cs: Tests for Vector16sb.
5738
5739 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
5740
5741         * inssel.brg (stmt): Fix OP_HARD_NOP rule.
5742
5743 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
5744
5745         * mini-ops.h: Add packed signed min, max and compare greater.
5746         
5747         * cpu-x86.md: Same.
5748
5749         * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
5750         saturation.
5751
5752         * simd-methods.h: Add CompareGreaterThan.
5753
5754         * simd-methods.h: Remove CompareEquals.
5755
5756         * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
5757
5758         * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
5759
5760         * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
5761         CompareEqual.
5762
5763 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
5764
5765         * basic-simd.cs: Fix tests due to change in the API.
5766
5767 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
5768
5769         * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
5770
5771 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
5772
5773         * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
5774
5775         * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
5776         inst_offset as this has invalid values for LDADDR.
5777
5778 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
5779
5780         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
5781
5782         * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
5783
5784 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
5785
5786         * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
5787         for accessing field->data.
5788
5789 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
5790
5791         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
5792
5793 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
5794
5795         * simd-methods.h: Add SignedPackWithUnsignedSaturation.
5796
5797         * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
5798
5799 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
5800
5801         * dominators.c (mono_compute_natural_loops): Allocate GList enties
5802         from the cfg mempool.
5803
5804 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
5805
5806         * basic-simd.cs: Tests for new methods in Vector8us.
5807
5808 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
5809
5810         * mini-ops.h: Add multiply and store high.
5811         
5812         * cpu-x86.md: Same.
5813
5814         * mini-x86.c (mono_arch_output_basic_block): Same.
5815
5816         * simd-methods.h: Same.
5817
5818         * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
5819         and CompareEqual.
5820
5821 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
5822
5823         * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
5824         mono_class_setup_vtable ().
5825
5826         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
5827         mono_class_get_vtable_entry () for accessing klass->vtable.
5828
5829         * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
5830
5831         * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
5832         found.
5833
5834         * method-to-ir.c (mono_save_token_info): Don't save references made from
5835         wrappers.
5836
5837         * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
5838         of generic instances.
5839
5840         * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
5841
5842 2008-10-19  Mark Probst  <mark.probst@gmail.com>
5843
5844         * cpu-ppc.md, mini-ppc.c: The length of the code generated for
5845         OP_JMP depends on the method signature.  Calculate it properly.
5846
5847 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
5848         
5849         * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
5850         called directly.
5851
5852         * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
5853         instances.
5854         (emit_extra_methods): Add another table mapping method indexes to 
5855         offsets in the extra_method_info table.
5856
5857         * mini.h: Bump AOT file format version.
5858         
5859         * aot-runtime.c: Merge most of the code from mono_aot_get_method
5860         and mono_aot_get_method_from_token () into one function.
5861
5862 2008-10-19  Mark Probst  <mark.probst@gmail.com>
5863
5864         * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
5865         separate counter.
5866
5867 2008-10-18  Zoltan Varga  <vargaz@gmail.com>
5868
5869         * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
5870         methods.
5871
5872         * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
5873         disable_aot.
5874
5875         * mini.c (mono_patch_info_equal): Compare the generic context as well.
5876
5877         * mini.h: Bump aot file format version.
5878
5879         * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
5880         AOT file can contain native code for methods which are not in the METHOD
5881         table. Generate code for non-sharable generic instances of generic methods
5882         found in the METHODSPEC table.
5883         
5884         * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
5885         encoding generic type handles.
5886
5887         * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
5888         (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
5889
5890         * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
5891         macros + MONO_ADD_INS.
5892
5893         * mini.c (mono_jump_info_token_new2): New function which takes a generic
5894         context as well.
5895
5896         * mini.h (MonoJumpInfoToken): Include fields for a generic context.
5897
5898         * mini.h: Bump aot file format version.
5899
5900         * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
5901
5902 2008-10-17  Mark Probst  <mark.probst@gmail.com>
5903
5904         * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
5905         platforms, with definable stack alignment value.  Set to 16 now
5906         for all platforms.
5907
5908         * mini.c, mini.h, driver.c: Command line option for disabling
5909         stack alignment.
5910
5911 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
5912
5913         * basic-simd.cs: Tests for new methods in Vector4ui.
5914
5915 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
5916
5917         * mini-ops.h: Add packed int shuffle.
5918         
5919         * cpu-x86.md: Same.
5920
5921         * mini-x86.c (mono_arch_output_basic_block): Same.
5922
5923         * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
5924         extract mask, max, min, shuffle.
5925
5926         * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
5927
5928 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
5929
5930         * basic-simd.cs: Tests for new methods in Vector8us.
5931
5932 2008-10-17  Mark Probst  <mark.probst@gmail.com>
5933
5934         * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
5935         RuntimeTypeHandle, not a TypedReference.
5936
5937 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
5938
5939         * simd-intrinsics.c: remove relocations.
5940
5941 2008-10-17  Zoltan Varga  <vargaz@gmail.com>
5942
5943         * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM 
5944         optimizations from the x86 backend.
5945
5946 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
5947
5948         * simd-methods.h, simd-intrinsics.c: debloat method names and
5949         prepare for no relocations.
5950
5951 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
5952
5953         * mini-ops.h: Add packed min/equal and sum of absolute differences.
5954         
5955         * cpu-x86.md: Same.
5956
5957         * mini-x86.c (mono_arch_output_basic_block): Same.
5958
5959         * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
5960         extract mask, max, min and sum of absolute differences.
5961
5962         * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
5963         method name.
5964
5965 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
5966
5967         * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
5968         Renamed one test for consistency.
5969
5970 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
5971
5972         * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
5973         fix to the code that deal with other blocks.
5974
5975 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
5976
5977         * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
5978
5979 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
5980
5981         * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
5982         that deals with vreg interference. Explicitly check for OP_LDADDR to be
5983         able to process the source reg.
5984
5985 2008-10-16  Martin Baulig  <martin@ximian.com>
5986
5987         * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
5988
5989         * inssel.brg: Add `OP_HARD_NOP'.
5990
5991         * mini.h (MonoCompile): Added `keep_cil_nops' flag.
5992
5993         * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
5994         `OP_HARD_NOP' instruction when running inside the debugger.
5995
5996         * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
5997         `OP_HARD_NOP' instruction when running inside the debugger.
5998
5999 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
6000
6001         * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
6002         now works. The issue with the regalloc tripping up no longer
6003         happens.
6004
6005         * simd-intrinsics.c (load_simd_vreg): Same.
6006
6007 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
6008         
6009         * basic-simd.cs: Tests for new Vector8ui methods.
6010
6011 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
6012
6013         * simd-intrinsics.c (get_simd_vreg): Simplify code and test
6014         only for type. This fixes crashes where MonoInst::klass is checked
6015         for ops of type != VTYPE or OBJ.
6016
6017         * simd-intrinsics.c (load_simd_vreg): Same.
6018
6019 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
6020
6021         * mini-ops.h: Add ops for packed shuffle/max/avg and
6022         extract mask.
6023         
6024         * cpu-x86.md: Same.
6025
6026         * mini-x86.c (mono_arch_output_basic_block): Same.
6027
6028         * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
6029         extract mask.
6030
6031         * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
6032         to emit extract mask op.
6033
6034         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
6035         to emit word shuffles.
6036
6037 2008-10-15  Mark Probst  <mark.probst@gmail.com>
6038
6039         * mini.c (mono_allocate_stack_slots_full): Align stack frame to
6040         the largest alignment needed by a variable, but at least
6041         sizeof(gpointer).
6042
6043 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
6044
6045         * basic-simd.cs: Tests for the fixes in the last commit.
6046
6047 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
6048
6049         * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
6050         no longer handles STACK_PTR input.
6051
6052         * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
6053
6054         * simd-intrinsics.c (load_simd_vreg): New function that works like 
6055         get_simd_vreg   but handles STACK_PTR input.
6056
6057         * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
6058         as the input can be an arbitrary pointer.
6059
6060         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
6061         LDADDR local optimization directly otherwise use a store op.
6062
6063 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
6064
6065         * basic-simd.cs: Tests for dup low and dup high.
6066
6067 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
6068
6069         * mini-ops.h: Add dup low and dup high ops.
6070         
6071         * cpu-x86.md: Same.
6072
6073         * mini-x86.c (mono_arch_output_basic_block): Same.
6074
6075         * simd-intrinsics.c (vector4f_intrinsics): Same.
6076
6077 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
6078
6079         * basic-simd.cs: Tests for recently added functionality.
6080
6081 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
6082
6083         * mini-ops.h: Add remaining sse1 fp ops.
6084         
6085         * cpu-x86.md: Add remaining sse1 fp ops.
6086
6087         * mini-x86.c (mono_arch_output_basic_block): Same.
6088
6089         * mini.h: Add enum for simd FP compare conditions.
6090
6091         * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
6092
6093         * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
6094         so the backed can generate the appropriate op.
6095
6096 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
6097         This patch squeese one more byte from the SimdIntrinsc struct.
6098
6099         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
6100         a a shift amount intead of simply or'ing it.
6101
6102         * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
6103
6104         * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
6105         byte so we can have an aditional flags field without increasing struct size.
6106
6107         * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
6108         against the simd_supported_versions bitmask.
6109
6110         * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
6111
6112 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
6113
6114         * mini.c: remove rawbuffer code (the only use here is unsafe because
6115         it takes locks during signal handling and the kernel now provides much
6116         better info in proc/pid/smaps these days).
6117
6118 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
6119
6120         * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
6121         OP_X86_PUSH_OBJ. Fixes #434620.
6122
6123         * objects.cs: Add a test.
6124         
6125 2008-10-12  Rodrigo Kumpera  <rkumpera@novell.com>
6126
6127         * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
6128         that the packuswb/packusdw don't work with unsigned numbers for what
6129         would be negative numbers in signed format.
6130
6131         * cpu-x86.md: Add doubleword forms of many ops and packing ones.
6132         Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
6133
6134         * mini-ops.h: Add doubleword forms of many ops and packing ones.
6135
6136         * mini-x86.c: Emit doubleword forms of many ops and packing ones.
6137
6138         * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
6139
6140         * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
6141
6142         * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
6143         add more ops.
6144
6145         * simd-intrinsics.c (simd_version_name): New function, returns the name of the
6146         version as the enum in mini.h.
6147
6148         * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
6149         for sse3 ops, check the simd_version field if present. This way the code
6150         works with all versions of sse.
6151
6152 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
6153
6154         * simd-intrinsics.c: Fixed intrinsic name typo.
6155
6156         * mini.h: Added missing simd exported function.
6157
6158         * basic-simd.cs: Added tests for Vector4ui.
6159         Fixed broken test for Vector16b.
6160
6161 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
6162
6163         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
6164         the max length to 64.
6165
6166 2008-10-10  Mark Probst  <mark.probst@gmail.com>
6167
6168         * method-to-ir.c: Only do the fast virtual generic method call for
6169         non-wrapper methods.
6170
6171         * mini.h, mini-trampolines.c: The new generic virtual remoting
6172         trampoline handles virtual method calls via the vtable (as done by
6173         the fast virtual generic method calls) to remoting proxies.
6174
6175         * mini.c (mono_jit_create_remoting_trampoline): For generic
6176         methods reate a generic virtual remoting trampoline.
6177
6178         * mini-amd64.h: Enable fast virtual generic method calls again.
6179
6180 2008-10-10  Mark Probst  <mark.probst@gmail.com>
6181
6182         * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
6183         restore registers when doing tail calls.
6184
6185 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
6186
6187         * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
6188         Vector4ui.
6189
6190 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
6191
6192         * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
6193
6194 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
6195
6196         * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
6197
6198 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
6199
6200         * basic-simd.cs: Retrofit for API changes.
6201
6202 2008-10-10  Mark Probst  <mark.probst@gmail.com>
6203
6204         * mini-ppc.c: Handle integer stack arguments for tail calls.
6205
6206 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
6207
6208         * optflags-def.h: Removed sse3 optimization.
6209
6210         * driver.c: Same.
6211
6212         * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
6213         sse3.
6214
6215         * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
6216
6217         * mini.h: Added enumeration with simd versions.
6218
6219         * simd-intrinsics.c (emit_intrinsics): Use the new static var
6220         for detecting SSE3.
6221
6222         * simd-intrinsics.c: Added mono_simd_intrinsics_init.
6223
6224         * mini.c (mini_init): Call mono_simd_intrinsics_init.
6225
6226 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
6227
6228         * basic-simd.cs: Added tests for Vector8u and Vector16u.
6229
6230         * basic-simd.cs: Fixed test naming.
6231
6232 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
6233
6234         * mini-ops.h: Added ops for packed and saturated math, shifts
6235         and packing/unpacking.
6236
6237         * cpu-x86.md: Added descriptors for the above ops.
6238
6239         * mini-x86.c: Added code to emmit the above ops.
6240
6241         * simd-intrinsics.c: Added support for Vector16u and Vector8u.
6242
6243 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
6244
6245         * aot-compiler.c (compile_method): Enable AOT for generic code.
6246
6247         * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
6248
6249 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
6250
6251         * mini.c: add a workaround for a common screwup that ends up blamed
6252         to mono (other processes blocking signal delivery).
6253
6254 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
6255
6256         * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
6257         in the LDFLD/STFLD opcodes. Fixes #432673.
6258
6259         * iltests.il.in: Add a new test.
6260
6261 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
6262
6263         * mini-arm.c: attach the thread in unmanaged->managed transitions
6264         using delegates (bug #433148).
6265
6266 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
6267
6268        * basic-simd.cs: Use new ShuffleSel constants.
6269
6270 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
6271
6272         * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
6273
6274         * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
6275         only disable simd intrinsics if no sse2 is detected.
6276
6277         * optflags-def.h: Added sse3.
6278
6279         * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
6280         is disabled.
6281
6282 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
6283
6284         * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
6285         when adding delegate-invoke wrappers.
6286
6287 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
6288
6289         * Makefile.am: Reenable the simd tests.
6290
6291 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
6292
6293         * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
6294           add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
6295           other vreg is allocated to that hreg.
6296
6297         Contributed under MIT/X11 license.
6298
6299 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
6300
6301         * Makefile.am: Disable the simd tests for now as Mono.Simd is not
6302         yet checked in.
6303
6304 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
6305
6306         * basic-simd.cs: New test suite for SIMD intrinsics.
6307
6308         * Makefile.am: Added new tests.
6309
6310 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
6311
6312         * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
6313
6314         * mini-ops.h: Same.
6315
6316         * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
6317
6318         * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
6319         using SSE2 aware opcodes.
6320
6321         * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
6322         is enabled, this code path is only reachable if conversion ops are emmited after
6323         mono_method_to_ir.
6324
6325         * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
6326
6327         This optimization saves 6 bytes per conversion against the old version.
6328
6329 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
6330
6331         * aot-compiler.c (compile_method): Don't skip methods referencing 
6332         generic methods without a corresponding entry in token_info_hash, since
6333         encode_method_ref () can handle all generic methods now.
6334
6335         * method-to-ir.c (mono_save_token_info): Don't save the token info if a 
6336         generic context is set.
6337         
6338         * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
6339         generic sharing of LDTOKEN.
6340
6341 2008-10-06  Mark Probst  <mark.probst@gmail.com>
6342
6343         * mini-amd64.h: Temporarily disabled fast virtual generic method
6344         calls because it breaks the System.Runtime.Remoting tests.
6345
6346 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
6347
6348         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
6349
6350         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
6351         so inlining actually works.
6352         (check_inline_caller_method_name_limit): Ditto.
6353
6354 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
6355
6356         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
6357         64 bit safety (from Olaf Hering and Andreas Farber).
6358
6359 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
6360         
6361         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
6362         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
6363         unused virtual call support code.
6364
6365         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
6366         
6367         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
6368         which can't use aot trampolines.
6369         (decode_patch): Don't create aot trampolines for methods which can't use
6370         them.
6371
6372         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
6373         use aot trampolines.
6374
6375         * mini.h: Bump AOT image format version.
6376         
6377 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
6378
6379         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
6380         to save_token_info () since cmethod is inflated for constrained calls.
6381
6382         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
6383
6384 2008-10-04  Andreas Farber  <andreas.faerber@web.de>
6385
6386         * Makefile.am: Add build rules for ppc64.
6387         This avoids the build failing at pedump with unresolved symbols
6388         due to lack of arch_sources. Instead it will now fail earlier
6389         due to lack of cpu-ppc64.md.
6390
6391         Contributed under MIT/X11 license.
6392
6393 2008-10-04  Mark Probst  <mark.probst@gmail.com>
6394
6395         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
6396         tail calls.
6397
6398         * iltests.il.in: Add test case for tail call with many arguments.
6399
6400 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
6401
6402         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
6403         to the fast virtual generic method code until the aot case is fixed.
6404
6405 2008-10-03  Mark Probst  <mark.probst@gmail.com>
6406
6407         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
6408
6409 2008-10-03  Mark Probst  <mark.probst@gmail.com>
6410
6411         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
6412         thunks.
6413
6414 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
6415         
6416         * simd-intrinsics.c: Forgot to add this one.
6417
6418         * mini-codegen.c: Fix macro in case SIMD is not supported.
6419
6420 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
6421         
6422         This patch land initial JIT support for simd intrinsics.
6423
6424         * mini-x86.h: Added new define to make --enable_minimal work on x86.
6425
6426         * Makefile.am: Added simd-intrinsics.c
6427
6428         * simd-intrinsics.c: New file with simd instrinsic related
6429         code.
6430
6431         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
6432
6433         * cpu-x86.md: Add simd related instructions.
6434
6435         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
6436
6437         * driver.c: Added two new --regression variants.
6438
6439         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
6440
6441         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
6442
6443         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
6444         extract some complicated logic to helper functions.
6445
6446         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
6447
6448         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
6449
6450         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
6451         the specialized simplification pass.
6452
6453         * method-to-ir.c (mono_spill_global_vars): Use new macro.
6454
6455         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
6456
6457         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
6458         table.
6459
6460         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
6461         if MONO_ARCH_NEED_SIMD_BANK is defined.
6462
6463         * mini-ops.h: Added the new simd ops.
6464
6465         * mini-x86.c: Added mono_arch_xregname.
6466
6467         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
6468
6469         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
6470
6471         * mini-x86.h: Define simd related MONO_ARCH macros.
6472
6473         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
6474
6475         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
6476
6477         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
6478         MONO_CLASS_IS_SIMD to deal with simd related IR.
6479
6480         * mini.h (MonoInst): Added spill_var to the backend union.
6481
6482         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
6483
6484         * mini.h: Added forward declarations of the new simd fuctions.
6485
6486         * optflags-def.h: Added new optimization names SIMD.
6487
6488         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
6489
6490         * regalloc.h: Added support for working with 3 register banks.
6491
6492         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
6493
6494         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
6495
6496 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
6497
6498         * mini-exceptions.c: remove 64 bit related ifdef clutter.
6499
6500 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
6501
6502         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
6503         instead of one on 64 bit systems.
6504
6505         * method-to-ir.c: Remove unused includes.
6506
6507 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
6508
6509         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
6510         cfg->used_int_regs, since the two are different on arm.
6511
6512 2008-10-02  Mark Probst  <mark.probst@gmail.com>
6513
6514         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
6515         mono_method_get_vtable_index() to get the vtable index.
6516
6517 2008-10-02  Mark Probst  <mark.probst@gmail.com>
6518
6519         * method-to-ir.c (mono_method_to_ir2): Don't create native
6520         wrappers for array methods, because they're never called (and if
6521         they were called they wouldn't work).
6522
6523 2008-10-02  Mark Probst  <mark.probst@gmail.com>
6524
6525         * method-to-ir.c (mono_method_to_ir2): Array methods are
6526         special-cased and must not be invoked indirectly via the (M)RGCTX
6527         when generic sharing is turned on.  Fixes #431413.
6528
6529 2008-10-01  Mark Probst  <mark.probst@gmail.com>
6530
6531         * method-to-ir.c: When generic sharing is active, call
6532         non-interface virtual generic methods via the standard trampoline.
6533
6534         * mini-trampolines.c: Handle virtual generic shared methods.
6535
6536         * mini.h, mini-x86.c, mini-x86.h: New argument for
6537         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
6538         method thunks and which is the trampoline to call if the lookup
6539         fails.  Enable the virtual generic method thunk for x86.
6540
6541         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
6542         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
6543         argument but assert that it's NULL, because these archs don't yet
6544         implement the virtual generic method thunk.  Changes in the IMT
6545         thunk data structures.
6546
6547 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
6548
6549         * aot-compiler.c (emit_globals): Avoid invalid characters in
6550         the static linking symbol.
6551
6552         * objects.cs: Add a test for the range check optimization. Fix warnings.
6553
6554         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
6555         optimization from the current JIT.
6556
6557         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
6558         later in decompose_array_access_opts () to allow more optimizations.
6559
6560         * method-to-ir.c (mono_handle_soft_float): Rename this to 
6561         mono_decompose_soft_float () for consistency.
6562
6563         * mini-ops.h: Fix arguments of OP_STRLEN.
6564
6565         * method-to-ir.c (save_cast_details): Extract the cast details saving code
6566         into a separate function.
6567         (reset_cast_details): Ditto.
6568         (handle_unbox): Save cast details. Fixes #431254.
6569
6570         * method-to-ir.c: Remove some obsolete FIXMEs.
6571
6572 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
6573
6574         * ir-emit.h (alloc_dreg): Write a warning before crashing.
6575
6576 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
6577
6578         * mini-codegen.c: More work on macros to make them
6579         ready for multiple regbanks.
6580
6581 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
6582
6583         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
6584
6585         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
6586
6587 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
6588
6589         * mini-codegen.c (mono_spillvar_offset): Proper support for
6590         multiple regbanks.
6591
6592 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
6593
6594         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
6595         the stack overflow changes.
6596
6597 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
6598
6599         * mini-codegen.c: Make all bank macros depend on reg_bank.
6600
6601         * mini-codegen.c (mono_local_regalloc): Make free mask
6602         initialization regbank aware.
6603
6604 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
6605
6606         * mini-codegen.c (mono_local_regalloc): Extract callee
6607         mask selection to a function and make it regbank aware.
6608
6609 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
6610
6611         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
6612         code to deal with many regbanks.
6613
6614 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
6615
6616         * mini-codegen.c: More fp->regbank changes.
6617
6618 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
6619
6620         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
6621         of a hardcoded constant.
6622
6623 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
6624
6625         * method-to-ir.c (type_from_stack_type): Fix typo.
6626
6627 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
6628
6629         * mini-ia64.c (emit_move_return_value): Convert float return values to
6630         double.
6631
6632         * objects.cs: Add a new test.
6633         
6634         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
6635         VARARG methods to fix an assert later.
6636
6637         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
6638         end so it at least compiles.
6639
6640 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
6641
6642         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
6643
6644 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
6645
6646         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
6647         optimization to a new function (emit_optimized_ldloca_ir) and enable
6648         it for both ldloca and ldloca_s.
6649
6650 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
6651
6652         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
6653         gshared CASTCLASS code.
6654
6655         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
6656         amd64, where the libc stack unwinder encounters stack frames referring to
6657         native code in unmapped memory.
6658
6659         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
6660         sharing.
6661
6662         * generics.cs: Add new test.
6663
6664 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
6665
6666         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
6667         add a check that one of the ARM_FPU_ constants is defined.
6668
6669         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
6670         
6671         * mini-exceptions.c: Fix build on non-altstack platforms.
6672
6673         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
6674         sharing of vtypes.
6675
6676         * ir-emit.h: Add a comment to NEW_PCONST.
6677
6678         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
6679
6680         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
6681
6682         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
6683         after the changes to MonoJitDomainInfo.
6684
6685 2008-09-27  Mark Probst  <mark.probst@gmail.com>
6686
6687         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
6688
6689 2008-09-27  Mark Probst  <mark.probst@gmail.com>
6690
6691         * mini-ppc.c: Compiler warning fixes.
6692
6693 2008-09-27  Mark Probst  <mark.probst@gmail.com>
6694
6695         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
6696         for pinvokes.
6697
6698 2008-09-27  Mark Probst  <mark.probst@gmail.com>
6699
6700         * exceptions-ppc.c, mini-ppc.h: Compile
6701         mono_arch_handle_altstack_exception() on Darwin, too.
6702
6703 2008-09-27  Mark Probst  <mark.probst@gmail.com>
6704
6705         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
6706         work on archs which don't have generic sharing implemented, only
6707         without the vtable_arg.
6708
6709 2008-09-26  Mark Probst  <mark.probst@gmail.com>
6710
6711         * mini.c: Added comment explaining why delegate ctor icall
6712         wrappers are compiled.
6713
6714 2008-09-26  Mark Probst  <mark.probst@gmail.com>
6715
6716         * mini.c: Don't produce trampolines to delegate ctor icall
6717         wrappers but compile them upfront.
6718
6719 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
6720
6721         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
6722         runtime-set function when going back to managed code. Currently this
6723         is used to set back the protection on the soft ovf pages and/or to
6724         throw the stack overflow exception that happened in unmanaged code.
6725
6726 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
6727
6728         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
6729         runtime-set function when going back to managed code. Currently this
6730         is used to set back the protection on the soft ovf pages and/or to
6731         throw the stack overflow exception that happened in unmanaged code.
6732
6733 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
6734
6735         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
6736         the support code for restoring stack protection after stack overflows
6737         that happen in unmanaged code. Don't set the exec permission on the
6738         soft overflow area.
6739
6740 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
6741
6742         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
6743         delegate->method_ptr is set. Fixes #428054.
6744
6745 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
6746
6747         * tests.cs: Rename to ratests.cs.
6748
6749         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
6750         emit_get_rgctx_... functions.
6751
6752 2008-09-25  Mark Probst  <mark.probst@gmail.com>
6753
6754         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
6755
6756 2008-09-25  Mark Probst  <mark.probst@gmail.com>
6757
6758         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
6759         before asserting that method is sharable.
6760
6761 2008-09-25  Mark Probst  <mark.probst@gmail.com>
6762
6763         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
6764         whether method needs a static RGCTX wrapper used instead of
6765         complex conditions.
6766
6767         * generic-sharing.c, mini.h: A few functions moved to
6768         metadata/generic-sharing.c.
6769
6770 2008-09-25  Mark Probst  <mark.probst@gmail.com>
6771
6772         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
6773         Generic code sharing for value types, which essentially means
6774         treating value type methods like static methods.  The RGCTX is
6775         passed in the same way.
6776
6777 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
6778
6779         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
6780         opcode when creating multi-dimensional arrays of open types.
6781
6782         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
6783         open generic types.
6784
6785         * generics.cs: Add a test.
6786
6787         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
6788
6789 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
6790
6791         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
6792
6793         * mini.c (mini_method_compile): Set it when running under the debugger. 
6794
6795         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
6796         vreg optimization if the flag is set.
6797
6798         * driver.c (mono_main): Add --attach= option to pass options to
6799         the attach agent.
6800
6801         * mini.c (sigquit_signal_handler): Start the attach agent.
6802
6803         * ssapre.c: Disable this to save space since it is not yet ported to
6804         linear IR.
6805
6806         * regalloc2.c: Disable this to save space.
6807
6808         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
6809
6810 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
6811
6812         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
6813         the -v option useful again.
6814
6815 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
6816
6817         * mini-amd64.c (mono_arch_output_basic_block): Add support for
6818         --break-at-bb.
6819
6820         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
6821         arrays of arrays. Fixes #428406.
6822
6823         * method-to-ir.c (mini_emit_castclass): Ditto.
6824
6825         * objects.cs: Add new test.
6826         
6827 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
6828
6829         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
6830         was wrong at it choked against target_type_is_incompatible for byref types.
6831
6832 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
6833
6834         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
6835         places.
6836
6837 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
6838
6839         * mini-exceptions.c: update a few more exceptions-related counters.
6840
6841 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
6842
6843         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
6844         new functions to allocate from persistent mempools.
6845
6846 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
6847
6848         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
6849         multiple register banks in the future.
6850
6851         * mini-codegen.c (mono_local_regalloc): Fix a warning.
6852
6853 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
6854
6855         * mini.c (type_to_eval_stack_type): Remove duplicated function.
6856
6857         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
6858
6859         * mini.h: Export type_to_eval_stack_type.
6860
6861         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
6862         is only ins->klass of byref types.
6863
6864 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
6865
6866         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
6867         (mini_emit_memcpy2): Ditto.
6868
6869         * mini-amd64.c: Fix a warning.
6870
6871 2008-09-21  Mark Probst  <mark.probst@gmail.com>
6872
6873         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
6874         linking.
6875
6876 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
6877
6878         * method-to-ir.c: Extract stloc micro-optimization to a
6879         function and apply it to all cases.
6880
6881 2008-09-19  Mark Probst  <mark.probst@gmail.com>
6882
6883         * method-to-ir.c: Don't fail generic code sharing in cases we
6884         already support.
6885
6886 2008-09-18  Mark Probst  <mark.probst@gmail.com>
6887
6888         * mini-ppc.c: Handle structs in tailcalls on Darwin.
6889
6890 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
6891
6892         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
6893         implementation.
6894
6895 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
6896
6897         * trace.c: make tracing more useful and correct, with per-thread
6898         id and indent info.
6899
6900 2008-09-15  Mark Probst  <mark.probst@gmail.com>
6901
6902         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
6903         doing a method call and the argument is an R4.
6904
6905 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
6906
6907         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
6908         generic methods.
6909
6910 2008-09-13  Mark Probst  <mark.probst@gmail.com>
6911
6912         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
6913
6914 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
6915
6916         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
6917         (MONO_JUMP_TABLE_FROM_INS): Ditto.
6918
6919 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
6920
6921         * driver.c: Add a --agent argument (not supported yet) to load managed
6922         agent assemblies before loading the main assembly, similarly to how the
6923         Java VM handles agents.
6924
6925 2008-09-11  Mark Probst  <mark.probst@gmail.com>
6926
6927         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
6928         function to do stack layout of local variables.
6929
6930 2008-09-11  Mark Probst  <mark.probst@gmail.com>
6931
6932         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
6933         calculation.
6934
6935 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
6936
6937         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
6938         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
6939         JIT if DISABLE_JIT is defined.
6940
6941         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
6942         defined.
6943
6944 2008-09-10  Mark Probst  <mark.probst@gmail.com>
6945
6946         * iltests.il.in: Disable the fconv test on PPC (the result is
6947         undefined according to ECMA).
6948
6949 2008-09-10  Mark Probst  <mark.probst@gmail.com>
6950
6951         * iltests.il.in: Enable tail call tests for PPC.
6952
6953         * mini.h: Add variable for storing incoming valuetype argument
6954         addresses for tail calls.
6955
6956         * mini-ppc.c: Implement valuetype arguments and return values for
6957         tailcalls on Linux.
6958
6959 2008-09-09  Mark Probst  <mark.probst@gmail.com>
6960
6961         * mini-ppc.c: Partially implement tail calls (struct arguments and
6962         return values not supported).
6963
6964         * method-to-ir.c: Enable tail calls on PPC.
6965
6966 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
6967
6968         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
6969         runtime-invoke wrappers to work around the problem of them getting
6970         assigned to a random class.
6971
6972         * aot-runtime.c (mono_aot_get_method): Ditto.
6973         
6974 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
6975
6976         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
6977         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
6978
6979 2008-09-07  Mark Probst  <mark.probst@gmail.com>
6980
6981         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
6982         until they're implemented properly.
6983
6984         * exceptions-ppc.c: Use arch-independent exception-handling code
6985         instead of custom one.
6986
6987         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
6988         for Linear IR.
6989
6990         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
6991
6992         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
6993         applies when __powerpc__ is defined.
6994
6995 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
6996
6997         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
6998         methods to their code to avoid computing the full name of wrappers and
6999         doing a lookup in a string hash table.
7000
7001 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
7002
7003         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
7004         we identify bblocks before method_to_ir () is ran.
7005
7006         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
7007         Also avoid optimizing branches pointing to themselves.
7008
7009         * mini.c (mini_method_compile): Ditto. Fixes #422947.
7010
7011 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
7012
7013         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
7014
7015 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
7016
7017         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
7018         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
7019         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
7020         'buf'.
7021
7022         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
7023         jumped to the same entry in plt_jump_table.
7024
7025 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
7026
7027         * method-to-ir.c (initialize_array_data): Handle field with RVA from
7028         dynamic images.
7029
7030 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
7031
7032         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
7033         other assignment can be if converted. Saves 1.5% on corlib size and fixes
7034         #421807.
7035
7036 2008-08-29  Geoff Norton  <gnorton@novell.com>
7037
7038         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
7039         segment, and doesn't properly handle .space as .text.  Fixes
7040         AOT Mach/ARM
7041
7042 2008-08-29  Geoff Norton  <gnorton@novell.com>
7043
7044         * mini.c: Disable the mach exception handler when running on 
7045         ARM
7046
7047 2008-08-29  Geoff Norton  <gnorton@novell.com>
7048
7049         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
7050         globals on Darwin/ARM
7051
7052 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
7053
7054         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
7055         since too many things depend on it. Instead, call 
7056         mono_runtime_set_no_exec ().
7057         
7058         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
7059         the new JIT.
7060
7061         * aot-compiler.c: Add an 'asm-only' AOT option.
7062
7063         * mini.c: Avoid initializing the runtime when doing AOT compilation.
7064                 
7065         * aot-compiler.c (compile_method): Disable gshared support for now as it
7066         doesn't yet work.
7067
7068 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
7069
7070         * mini-amd64.h : Fix a compiler warning.
7071
7072         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
7073           Changed to use a callback function to retrieve the unwind info.
7074           This avoids problems observed when code blocks were removed by
7075           unloading an app domain.
7076
7077         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
7078           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
7079           to work properly.
7080
7081         Contributed under MIT/X11 license.
7082
7083 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
7084
7085         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
7086           case to keep the stack aligned to 8.
7087
7088         Contributed under MIT/X11 license.
7089
7090 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
7091
7092         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
7093         avoid repeated linear searches.
7094
7095 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
7096
7097         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
7098         methods it can't handle.
7099         
7100         * aot-compiler.c (add_method): Avoid adding a method twice.
7101         (add_wrappers): Add runtime invoke wrappers for all methods.
7102
7103         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
7104         function to create an aot-compatible version of this trampoline.
7105
7106         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
7107
7108 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
7109
7110         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
7111
7112         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
7113         with a generic sharing failure.
7114
7115         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
7116
7117         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
7118         CEE_RETHROW. Fixes #419634.
7119
7120         * mini.c (mono_method_to_ir): Ditto.
7121
7122         * exceptions.cs: Add a new test.
7123         
7124         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
7125         to mono_type_stack_size_internal () since some callers might not pass in
7126         an rgctx.
7127
7128         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
7129         instrument_prolog. Fixes #419878.
7130
7131         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
7132         doubles in soft float mode volatile.
7133
7134 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
7135
7136         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
7137
7138         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
7139         to handle soft float correctly.
7140
7141         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
7142         the fast path.
7143
7144         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
7145
7146         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
7147         to sp, since the generics catch code requires it.
7148
7149         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
7150         copying.
7151
7152         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
7153         mono_arch_emit_imt_argument ().
7154
7155         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
7156
7157         * mini-arm.c tramp-arm.c: Generic sharing updates.
7158
7159 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
7160
7161         * mini-arm.c: Fix the arm build.
7162
7163         * generic-sharing.c (mini_type_get_underlying_type): New helper function
7164         handling enums, generic instances and generic sharing.
7165         (mini_type_stack_size_full): Ditto.
7166
7167         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
7168         
7169         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
7170
7171         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
7172
7173         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
7174         trampolines.
7175
7176         * mini-arm.c: Various small generic sharing changes.
7177
7178         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
7179         this for x86.
7180         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
7181         custom code.
7182
7183         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
7184         helper function to return a generic class init trampoline.
7185
7186         * method-to-ir.c mini.c: Use it.
7187         
7188         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
7189         arch-specfic function to return a generic class init trampoline.
7190
7191         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
7192         the GENERIC_CLASS_INIT custom code.
7193
7194         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
7195         a fatal error, not a sharing failure.
7196
7197         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
7198         needed.
7199
7200         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
7201         trampoline argument from MONO_ARCH_VTABLE_REG.
7202
7203         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
7204         order of the arguments to the C trampoline: pass 'slot' as the trampoline
7205         argument, and pass the vtable in VTABLE_REG.
7206
7207         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
7208         order of the arguments to the C trampoline: pass 'slot' as the trampoline
7209         argument, and pass the vtable in VTABLE_REG.
7210         (mono_arch_create_trampoline_code_full): Remove some special casing for
7211         the rgctx fetch trampoline.
7212
7213         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
7214         Fixes #419273.
7215
7216         * iltests.il: Add a test for it.
7217
7218 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
7219
7220         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
7221
7222         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
7223         no longer needed.
7224
7225         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
7226         use mono_jit_info_table_find () to avoid recursion.
7227         (mono_delegate_trampoline): Add a sync wrapper here.
7228
7229         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
7230         here.
7231
7232         * mini.c (mono_method_to_ir): Ditto.
7233         
7234         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
7235         add_sync_wrapper argument. Don't add a sync wrapper here.
7236         (mono_create_jump_trampoline): Don't add a sync wrapper here.
7237
7238         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
7239         
7240 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
7241
7242         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
7243           of nonvolatile registers back from MonoContext to CONTEXT.
7244
7245         Contributed under MIT/X11 license.
7246
7247 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
7248
7249         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
7250           arguments on Winx64 there are only 4 argument registers.  For this
7251           logic to work the last argument must be pulled from the stack.  
7252
7253         Contributed under MIT/X11 license.
7254
7255 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
7256
7257         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
7258
7259         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
7260         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
7261         encode/decode_method_ref ().
7262
7263         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
7264
7265         * aot-runtime.c (decode_patch): Ditto.  
7266
7267         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
7268         MONO_PATCH_INFO_METHOD.
7269
7270         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
7271         MonoGenericJitInfo.
7272
7273         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
7274         MonoGenericJitInfo.
7275
7276         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
7277
7278         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
7279         one from the caller.
7280
7281         * aot-runtime.c (decode_generic_inst): New function to decode and
7282         return a interned generic inst.
7283         (decode_klass_ref): Use it.
7284         (decode_method_ref): Ditto.
7285
7286         * aot-compiler.c (emit_exception_debug_info): Save 
7287         jinfo->has_generic_jit_info too.
7288
7289 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
7290
7291         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
7292
7293         * iltests.il.in: Add a test for fconv_to_i.
7294
7295         * liveness.c: Disable the liveness2 pass for now to save space.
7296
7297         * regalloc2.c: Include mempool-internals.h to fix warnings.
7298
7299         * aot-compiler.c (encode_method_ref): Encode the context of generic
7300         instance methods.
7301
7302         * aot-runtime.c (decode_method_ref): Inflate generic methods using
7303         the context saved in the aot file.
7304
7305         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
7306
7307         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
7308
7309         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
7310         volatile so they won't be optimized away.
7311
7312 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
7313
7314         * ssa.c:
7315         * ssa2.c:
7316         * mini.c:
7317         * regalloc2.c:
7318         * dominators.c: Remove duplicated functions that now are in
7319         mempool-internals.h.
7320
7321 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
7322
7323         * aot-compiler.c: Fix warnings.
7324
7325         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
7326
7327         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
7328
7329         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
7330         as the patch type.
7331
7332         * mini.c (mono_resolve_patch_target): Ditto.
7333         
7334         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
7335         (encode_klass_ref): Add support for encoding VARs/MVARs.
7336
7337         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
7338
7339         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
7340         the handling of the got entries into a separate 'decode_got_entry' function.
7341         Add support for RGCTX_FETCH.
7342
7343         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
7344         clobbered by the trampoline code.
7345
7346         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
7347         not clobbered by the indirect calling code.
7348
7349 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
7350
7351         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
7352         to fix the build.
7353
7354 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
7355
7356         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
7357         signature using the compilation mempool otherwise we would leak it.
7358
7359 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
7360
7361         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
7362         mono_emit_abs_call ().
7363
7364         * patch-info.h: Add GENERIC_CLASS_INIT.
7365
7366         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
7367
7368         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
7369         as their target as a near call.
7370
7371         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
7372         ABS handling code.
7373         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
7374
7375         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
7376         call to a runtime function described by a patch.
7377
7378         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
7379         mono_emit_abs_call, this has the advantage that the ABS handling code in
7380         mono_codegen () can handle them both, and can handle other stuff in the
7381         future without additional code.
7382
7383         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
7384         entry.
7385         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
7386         abs addresses.
7387
7388         * mini.h: Add missing bblock related prototypes.
7389
7390         * mini.h (MonoCompile): Remove unused reverse_inst_list and
7391         reverse_inst_list_len fields.
7392
7393         * mini.c: Refactor this file a bit by moving branch optimizations to 
7394         branch-opts.c.
7395
7396         * method-to-ir.c: Merge generic sharing changes missed earlier.
7397
7398         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
7399
7400         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
7401         shared patches. Process METHODCONST as a shared patch.
7402
7403         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
7404         as it crashes on the 2.0 mscorlib.
7405
7406         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
7407         to cause crashes.
7408         
7409         * aot-compiler.c: Use is_plt_patch () in a few additional places.
7410         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
7411         by IMT.
7412
7413         * aot-compiler.c: Reorganize the got handling code to be a bit more
7414         understandable.
7415
7416 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
7417
7418         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
7419         mono_patch_info_equals/hash, and use it to massively simplify
7420         get_plt_index ().
7421
7422         * mini.c (mono_patch_info_hash): Simplify this and add support for
7423         more patch types.
7424
7425         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
7426
7427         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
7428         handling code, since an offset is not enough to identify a trampoline.
7429
7430         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
7431
7432 2008-08-17  Mark Probst  <mark.probst@gmail.com>
7433
7434         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
7435
7436         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
7437
7438         * mini-ops.h: Argument and result types for OVF_CARRY ops.
7439
7440         * decompose.c: PPC decompositions for various ops.
7441
7442         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
7443
7444 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
7445
7446         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
7447         call the generic trampoline code using a call, instead of a jump, to
7448         remove some special casing from the generic trampoline code.
7449
7450         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
7451         (mono_codegen): Ditto.
7452
7453         * aot-compiler.c aot-runtime.c: Ditto.
7454
7455         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
7456
7457         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
7458         helper function to find the offset corresponding to a lazy fetch trampoline.
7459
7460         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
7461         when doing generic sharing.
7462
7463         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
7464         places.
7465         
7466         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
7467         mini-trampolines.c to be with the other trampoline creation functions.
7468
7469         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
7470         as it is equal to method->signature in most cases, add a 
7471         mono_emit_method_call_full variant which takes a signature and an imt
7472         argument as well.
7473
7474 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
7475
7476         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
7477         to this function, since it could be computed easily from the method 
7478         argument.
7479         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
7480         more.
7481
7482         * method-to-ir.c mini.c: Remove references to 
7483         compile_generic_method_wo_context.
7484
7485         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
7486         generic method calls.
7487         
7488         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
7489         dimensional non-szarrays.
7490
7491         * mini.c (mini_init): Register mono_array_new_1.
7492
7493         * jit-icalls.c (mono_array_new_1): New jit icall.
7494
7495         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
7496         pointing to the method.
7497
7498         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
7499         method addresses belonging to METHOD_JUMP patches in the 
7500         jump_target_got_slot_hash.
7501         (mono_aot_load_method): Ditto.
7502
7503         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
7504         METHOD_JUMP patches.
7505
7506         * mini.c (mini_create_jit_domain_info): New helper function which 
7507         initializes/frees domain->runtime_info.
7508         (mini_free_jit_domain_info): Ditto.
7509         (mini_init): Install the domain hook functions with the runtime.
7510
7511         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
7512         information maintained by the JIT.
7513
7514         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
7515         insertion into jump_table_hash into mono_codegen (), also implement proper
7516         locking.
7517
7518         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
7519         tail calls, it is already done by the aot code.
7520         
7521         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
7522         mechanism on amd64.
7523
7524         * iltests.il.in: Make the jmp test a bit more complex.
7525
7526         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
7527         generic instances which doesn't have a token.
7528
7529         * aot-runtime.c (decode_method_ref): Ditto.
7530         
7531         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
7532         can handle this case now.
7533         (handle_box): Ditto.
7534
7535 2008-08-15  Geoff Norton  <gnorton@novell.com>
7536
7537         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
7538         debugging check.
7539
7540 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
7541
7542         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
7543         calling generic methods.
7544
7545         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
7546
7547         * aot-runtime.c (decode_patch_info): Ditto.
7548
7549         * mini.c (mono_resolve_patch_target): Ditto.
7550         
7551         * patch-info.h: Add METHOD_RGCTX.
7552
7553         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
7554
7555 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
7556
7557         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
7558         arguments in registers.
7559
7560         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
7561         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
7562
7563         * mini.c (mini_method_compile): Abort aot compilation for generic
7564         methods if generic sharing is disabled.
7565         
7566         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
7567         an mrgctx.
7568
7569         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
7570         requiring an mrgctx.
7571
7572         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
7573         store instructions when converting a vcall to a normal call.
7574
7575         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
7576         mono_arch_find_jit_info.
7577
7578 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
7579
7580         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
7581         avoid calling mono_method_full_name () for every method even if the
7582         env var is not set.
7583         (check_inline_caller_method_name_limit): Ditto.
7584
7585 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
7586
7587         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
7588         assemblies in one run.
7589
7590         * aot-compiler.c (mono_compile_assembly): Only print out a count of
7591         skipped methods if it is not 0.
7592
7593         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
7594
7595 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
7596
7597         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
7598           MONO_ARCH_HAVE_UNWIND_TABLE.
7599
7600         Contributed under MIT/X11 license.
7601
7602 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
7603
7604         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
7605           from default optimizaton list on Winx64.
7606
7607         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
7608
7609         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
7610           the LMF from the MonoJitTlsData structure.
7611
7612         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
7613
7614         Contributed under MIT/X11 license.
7615
7616 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
7617
7618         * mini.c (sigsegv_signal_handler): Fix the build.
7619
7620         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
7621         assembly->aot_module.
7622
7623         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
7624         hash table. This simplifies and speeds up a lot of code, and fixes support
7625         for .netmodules.
7626
7627         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
7628         with the runtime.
7629
7630         * mini-exceptions.c: Ditto.
7631         
7632         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
7633         'native_offset' argument, since these are computed in the 
7634         mono_find_jit_info () function.
7635
7636         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
7637         is used by exceptions-ppc.c.
7638
7639         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
7640         mono_arch_find_jit_info ().
7641         
7642         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
7643         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
7644         generic code in mini-exceptions.c.
7645
7646 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
7647
7648         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
7649
7650         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
7651         
7652         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
7653         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
7654         called while holding the loader lock. Fixes #415608.
7655         (mono_aot_get_method_from_token_inner): Ditto.
7656
7657 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
7658
7659         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
7660         to reduce differences between this and the generic implementation in
7661         mini-exceptions.c.
7662         (ves_icall_get_frame_info): Ditto.
7663
7664         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
7665
7666         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
7667         longer neccesarry.
7668
7669         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
7670         mono_arch_get_call_filter () and make it non-static, for consistency with the
7671         other architectures.
7672
7673 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
7674
7675         * mini.c:
7676         * local-propagation.c:
7677         * mini-x86.c: Correct the name of arch defines.
7678
7679 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
7680
7681         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
7682         NO_EMULATE_LONG_SHIFT_OPS define.
7683
7684 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
7685
7686         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
7687         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
7688
7689         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
7690         MACH fixes. Merged from the 2.0 branch.
7691
7692         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
7693
7694         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
7695         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
7696
7697         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
7698
7699         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
7700         mono_marshal_get_native_wrapper () signature changes.
7701
7702 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
7703
7704         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
7705         conversion bug under arm.
7706
7707 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
7708
7709         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
7710
7711         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
7712         with overflow checking.
7713
7714 2008-08-05  Marek Habersack  <mhabersack@novell.com>
7715
7716         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
7717         to the genmdesc.pl file
7718
7719 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
7720
7721         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
7722         arg_array in the soft-float versions of the LOAD/STORE macros.
7723
7724         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
7725         implementation.
7726
7727         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
7728
7729 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
7730
7731         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
7732         a float HFA. Fixes #413621.
7733
7734 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
7735
7736         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
7737         frame_size to args_size. Fixes build.
7738
7739 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
7740
7741         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
7742         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
7743
7744         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
7745         the stack are not unaligned. Fixes #413247.
7746         
7747 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
7748
7749         * mini.c: update jitted methods performance counters.
7750
7751 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
7752
7753         * mini-exceptions.c: increase the exceptions thrown performance
7754         counter in mono_handle_exception ().
7755
7756 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
7757
7758         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
7759         can work with netmodules.
7760
7761 2008-07-28  Geoff Norton  <gnorton@novell.com>
7762
7763         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
7764         regression tests.
7765
7766 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
7767
7768         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
7769         correct place.
7770
7771 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
7772
7773         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
7774           The float param registers and other param registers must be the 
7775           same index on Windows x64.
7776
7777         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
7778           ArgValuetypeAddrInIReg argument case.  Setting the argument
7779           op to OP_VTARG_ADDR (OP_REGOFFSET)).
7780
7781         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
7782           variable computed above as the copy length for arguments of storage
7783           type ArgValuetypeAddrInIReg.
7784
7785         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
7786           ArgValuetypeAddrInIReg argument case.  This case will rely on
7787           mono_arch_emit_outarg_vt to emit the correct code later in the process.
7788
7789         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
7790           a 32 byte stack allocation for all calls.  We will omit the adjustment for
7791           jump and tail call instructoins as they do not follow the typical call behavior.
7792
7793         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
7794           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
7795           local variable and pass the local variable by reference to the called method.
7796
7797         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
7798           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
7799           of a struct is passed in a register it must be saved with the other
7800           volatile argument on the stack.
7801
7802         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
7803           frame pointer the stack adjustment value must be saved to the unwind 
7804           info structure.
7805
7806         Contributed under MIT/X11 license.
7807
7808 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
7809
7810         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
7811         which got lost in the merge.
7812
7813 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
7814
7815         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
7816         build.
7817
7818         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
7819         
7820         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
7821         icalls, since they won't be patched.
7822
7823         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
7824         different code sequence when running under valgrind to prevent some valgrind
7825         errors.
7826
7827         * iltests.il.in: Add new regression test.
7828
7829         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
7830         end with a throw.
7831
7832         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
7833         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
7834
7835         * iltests.il.in: Add new test.
7836
7837         * aot-compiler.c: Fix some warnings.
7838
7839         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
7840         Fixes #412494.
7841
7842 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
7843
7844         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
7845         (mini_usage_jitdeveloper): Add a missing --wapi option.
7846
7847 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
7848
7849         * mini-codegen.c: Simplify the is_fp macros.
7850         (free_up_ireg): Remove, use free_up_reg instead.
7851         (free_up_reg): Fix the fp case.
7852
7853 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
7854
7855         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
7856         lowered earlier.
7857
7858         * exceptions-x86.c: Merge some changes which seemed to have got lost
7859         in the linear-ir merge.
7860
7861         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
7862
7863         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
7864         long vreg volatile even if the variable was already created.
7865
7866         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
7867         volatile variables.
7868
7869 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
7870
7871         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
7872
7873         * mini.c (mono_jit_compile_method_inner): Add support for 
7874         MONO_EXCEPTION_BAD_IMAGE.
7875
7876         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
7877         mini_method_get_context () returns NULL. Fixes #356531.
7878
7879         * mini.c (mono_method_to_ir): Ditto.
7880         
7881         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
7882         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
7883
7884 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
7885
7886         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
7887         in the LDFTN implementation.
7888
7889 2008-07-25  Mark Probst  <mark.probst@gmail.com>
7890
7891         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
7892         code, patch calls to icalls, too, even if they're not in the
7893         shared generic code hash.  Fixes #411962.
7894
7895 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
7896
7897         * cpu-x86.md: Increase the length of the fcall opcodes.
7898
7899         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
7900         calls returning floats.
7901
7902         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
7903         on NEWARR.
7904         
7905         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
7906         missed earlier.
7907
7908         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
7909         into the domain->method_code_hash.
7910
7911         * aot-compiler.c: Fix win32 build.
7912
7913         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
7914         
7915         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
7916         gshared NEWARR implementation.
7917
7918         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
7919
7920         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
7921         can be used outside of method_to_ir.
7922
7923         * mini.h (MonoCompile): Add arg_types field.
7924
7925         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
7926         
7927         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
7928         the values of the local arg_array and param_types array.
7929
7930 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
7931
7932         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
7933         got accesses might only get generated later when NEWOBJ is decomposed.
7934         
7935         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
7936         looking up the native code of the target method when a delegate is called
7937         for the first time.
7938
7939         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
7940         optimization.
7941
7942         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
7943
7944         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
7945         AOT work on platforms without a working dlsym implementation.
7946
7947         * mini.h: Bump AOT image format version.
7948         
7949 2008-07-24  Mark Probst  <mark.probst@gmail.com>
7950
7951         * mini-exceptions.c: Free a MonoType with
7952         mono_metadata_free_type() instead of g_free().
7953
7954         * aot-runtime.c: Free a MonoType.
7955
7956 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
7957
7958         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
7959         optimization.
7960
7961         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
7962         fp stack on x86.
7963
7964 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
7965         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
7966         profiler hook.
7967
7968 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
7969
7970         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
7971         NEWOBJ calls on valuetypes.
7972
7973         * iltests.il.in: Add new test.
7974
7975         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
7976
7977 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
7978
7979         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
7980         is no longer needed.
7981
7982         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
7983         non register sized integer arguments.
7984         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
7985         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
7986         emit_memcpy2 ().
7987
7988         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
7989         CEE_MONO_RETOBJ.
7990         
7991         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
7992         two a binop with different sized arguments is emitted.
7993
7994         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
7995         instruction in the ins==NULL case.
7996
7997 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
7998
7999         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
8000
8001         * mini-x86.c: Fix osx build.
8002
8003         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
8004         opcodes as well.
8005
8006         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
8007         instruction for non int sized variables.
8008
8009         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
8010         implementation.
8011
8012 2008-07-23  Robert Jordan  <robertj@gmx.net>
8013
8014         * method-to-ir.c: Fix MSVC build.
8015
8016 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
8017
8018         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
8019         a non int sized type, widen it to an int since newer versions of gcc seem to
8020         generate code which needs this.
8021
8022         * ssa2.c abcremoval2.c: Fix warnings.
8023
8024         * *: Merge the Linear IR branch.
8025
8026         The original branch is at trunk/branches/vargaz/mini-linear-il, and
8027         the ChangeLog file there describes all the changes done over the years. 
8028         Further documentation can be found at www.mono-project.com/Linear_IL.
8029
8030 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
8031
8032         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
8033           The float param registers and other param registers must be the 
8034           same index on Windows x64.
8035
8036         Contributed under MIT/X11 license.
8037
8038 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
8039
8040         * mini.c: Make the previous fix GC safe.
8041
8042 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
8043
8044         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
8045
8046 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
8047
8048         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
8049           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
8050           ArgValuetypeAddrInIReg instead.
8051
8052         Contributed under MIT/X11 license.
8053
8054 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
8055
8056         * mini-codegen.c (get_register_spilling): Fix a warning.
8057
8058 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
8059
8060         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
8061         for types which the initialization fails. Raises the provided exception
8062         at the right stop after cleanup.
8063
8064 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
8065
8066         * aot-compiler.c: Free most of the memory allocated during compilation.
8067
8068         * mini.c (mini_parse_debug_options): Fix a leak.
8069         
8070         * mini.c (mini_method_compile): Don't add the method to the jit info tables
8071         during aot compilation.
8072
8073 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
8074
8075         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
8076         it has too much register pressure.
8077
8078 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
8079
8080         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
8081
8082 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
8083
8084         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
8085         on x86.
8086
8087         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
8088         on amd64 similar to the way it is done on arm.
8089
8090         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
8091
8092         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
8093         consistency, normalize error messages, avoid loading aot-only modules in
8094         normal mode.
8095
8096         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
8097         for consistency.
8098
8099         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
8100
8101 2008-07-11  Martin Baulig  <martin@ximian.com>
8102
8103         * debug-debugger.h
8104         (MonoDebuggerInfo): Add `interruption_request'.
8105
8106 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
8107
8108         * aot-compiler.c (emit_plt): Remove some dead code.
8109
8110         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
8111
8112         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
8113         return the plt info offset belonging to a given plt entry.
8114
8115         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
8116         mono_aot_get_plt_info_offset.
8117         
8118         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
8119         similar to the amd64 code by makeing jumps through a separate jump table 
8120         instead of embedding the jump addresses into the code.
8121
8122 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
8123
8124         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
8125         method.
8126
8127 2008-07-10  Martin Baulig  <martin@ximian.com>
8128
8129         * mini.c (mini_method_compile): Disable generics sharing when
8130         running in the debugger.
8131
8132 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
8133
8134         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
8135
8136         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
8137         the local register allocator from running out of registers on x86 when 
8138         using aot.
8139
8140 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
8141
8142         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
8143         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
8144         C4146.
8145
8146         Contributed under MIT/X11 license.
8147
8148 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
8149
8150         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
8151         speed up the assembler.
8152
8153 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
8154
8155         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
8156         support.
8157
8158         * mini.c: Move the soft float handling macros a bit earlier, add 
8159         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
8160         place.
8161
8162         * mini.h: Add prototype for mono_arch_fixup_jinfo.
8163
8164         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
8165         read-only to help catch code allocation requests.
8166         
8167         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
8168         and turn it off when using --aot-only or when compiling with --aot=full.
8169
8170         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
8171         jump table for switches from the normal domain mempool, not the code
8172         manager.
8173
8174         * mini-trampolines.c (get_unbox_trampoline): New function to return an
8175         unbox trampoline which handles aot-only mode too.
8176
8177         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
8178         an AOTed unbox trampoline.
8179
8180         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
8181
8182 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
8183
8184         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
8185         ""
8186
8187         Contributed under MIT/X11 license.
8188
8189 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
8190
8191         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
8192           the unwind information for the method at the end of the allocated block.
8193           
8194         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
8195           MonoCompileArch to hold the unwind info for SEH on Winx64
8196         
8197         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
8198           frame pointer info for the method being compiled.
8199           
8200         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
8201           the call to mono_exception_from_token.
8202           
8203         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
8204           storing the method prolog information in a format that the Winx64 SEH can understand.  This
8205           information is stored a the end of the method block because it is all 32-bit offset based.
8206
8207         Contributed under MIT/X11 license.
8208
8209 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
8210
8211         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
8212
8213         * wapihandles.c: Fix warnings.
8214
8215         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
8216         mode.
8217
8218         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
8219         mono_jit_compile_method in aot-only mode since that calls the type 
8220         initializer.
8221         
8222         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
8223         get_delegate_invoke_impl in aot-only mode.
8224
8225         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
8226
8227 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
8228
8229         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
8230
8231         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
8232         is on by default.
8233
8234         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
8235
8236         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
8237         init trampoline from the AOT file as well.
8238
8239         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
8240         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
8241         code.
8242
8243         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
8244         mono_init.
8245
8246         * exceptions-amd64.c: Add _full variants for the remaining exception code
8247         creation functions as well, allow emission of relocatable code, remove
8248         caching since that is now done by the caller.
8249
8250         * mini-exceptions.c: Add _full variants for the remaining exception code
8251         creation functions as well, add aot-only support.
8252
8253         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
8254         if we can determine a proper token for them.
8255         (add_wrappers): Add a few more wrappers.
8256         (emit_method_code): Remove some dead code.
8257         (emit_trampolines): Emit exception code too.
8258
8259         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
8260
8261         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
8262         mono_array_new_va which avoids varargs.
8263
8264         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
8265
8266         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
8267         mono_arch_create_specific_trampoline () in all places.
8268
8269         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
8270         a bit so it can be used for other things as well.
8271         
8272         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
8273         on demand as well.
8274
8275         * exceptions-amd64.c: Rename the caching from the exception code creation
8276         functions, it is done by the caller instead.
8277         
8278         * exceptions-amd64.c: Change the signature of the exception code creation 
8279         functions to allow the creation of relocatable code later.
8280
8281         * mini-exceptions.c: Add a set of functions to query the various 
8282         runtime-generated exception functions.
8283
8284         * mini.c mini-exceptions.c: Use the newly added functions instead of the
8285         mono_arch_.. () functions.
8286         
8287 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
8288
8289         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
8290
8291         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
8292
8293         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
8294         (mini_get_vtable_trampoline): Ditto.
8295
8296         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
8297         code in the AOT case by returning the code size and a list of relocations to
8298         the caller.
8299
8300         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
8301
8302 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
8303
8304         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
8305           clean the stack.
8306
8307         Contributed under MIT/X11 license.
8308
8309 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
8310
8311         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
8312         so the buffer size can be computed correctly. Fixes #404735.
8313
8314         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
8315         normally as cfg->debug_info is already freed.
8316
8317 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
8318
8319         * mini-amd64.c: For calls returning vtypes in registers, don't store
8320         the return address on the stack, instead allocate a separate local for
8321         it. Fixes #404729.
8322
8323 2008-07-05  Mark Probst  <mark.probst@gmail.com>
8324
8325         * mini-trampolines.c, mini.h: Add an argument to
8326         mono_create_jit_trampoline_in_domain() for turning off the adding
8327         of the sync wrapper.
8328
8329         * mini.c: Use the JIT trampoline without sync instead of
8330         ldftn_nosync in static RGCTX invoke wrappers so that the call can
8331         be patched.
8332
8333 2008-07-04  Mark Probst  <mark.probst@gmail.com>
8334
8335         * driver.c: Turn on GSHARED optimization by default.
8336
8337 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
8338
8339         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
8340         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
8341
8342         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
8343         create a variant of the generic trampoline code callable from AOTed trampolines.
8344
8345         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
8346         trampoline code callable from AOTed trampolines.
8347
8348         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
8349
8350 2008-07-04  Mark Probst  <mark.probst@gmail.com>
8351
8352         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
8353         pass-through manner.
8354
8355         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
8356         and don't fail sharing for them anymore.
8357
8358         * mini-exceptions.c: Handle exceptions in shared generic methods.
8359
8360         * generic-sharing.c: When checking the context of a generic
8361         method, also check its class's context.  Don't treat wrappers as
8362         sharable.
8363
8364         * mini-trampolines.c: Some code factored out to
8365         metadata/generic-sharing.c.  Handle the MRGCTX case.
8366
8367         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
8368         we must deal with the method being of another instantiation of the
8369         class.  Add static rgctx invoke wrappers to generic methods.
8370
8371 2008-07-04  Mark Probst  <mark.probst@gmail.com>
8372
8373         * mini.c: Provide all jit infos of generic shared methods with a
8374         generic jit info.
8375
8376         * mini-exceptions.c: Handle the new situation that a generic info
8377         might be available, but not info about the this/vtable/mrgctx
8378         variable.
8379
8380 2008-07-03  Mark Probst  <mark.probst@gmail.com>
8381
8382         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
8383         generic methods.
8384
8385 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
8386
8387         * dominators.c (check_dominance_frontier): Fix a warning.
8388
8389         * mini.h: Add some missing prototypes.
8390
8391         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
8392
8393         * driver.c (mono_jit_init_version): Correct the comments since the first
8394         argument should be the name of the root domain, not a filename.
8395
8396         * aot-runtime.c (make_writable): Error out if this is called while running
8397         with --aot-only.
8398         (load_aot_module): Ditto.
8399
8400         * aot-compiler.c: Really fix the computation of method indexes.
8401
8402         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
8403         optimizations as this is no longer called frequently.
8404
8405         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
8406         method and the invoke impl code and pass it to the delegate trampoline instead of
8407         just the delegate class.
8408
8409 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
8410
8411         * aot-compiler.c: Fixup the computation of method indexes.
8412         (add_wrappers): Create the base methods of the runtime invoke wrappers using
8413         the method builder infrastructure.
8414
8415         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
8416         has no header.
8417
8418         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
8419         mode, load the method right away instead of creating a trampoline.
8420
8421         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
8422
8423         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
8424         some checks a bit.
8425
8426 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
8427
8428         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
8429         (mono_aot_load_method): Use method_index instead of method->token.
8430
8431         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
8432         can handle icalls etc. properly.
8433
8434         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
8435
8436         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
8437
8438         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
8439         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
8440         JIT_ICALL_ADDR patch type.
8441
8442         * patch-info.h: Add JIT_ICALL_ADDR patch type.
8443
8444         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
8445         request flag.
8446         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
8447
8448         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
8449
8450 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
8451
8452         * mini.c: Use domain->jit_code_hash_lock for controlling access to
8453         domain->jit_code_hash.
8454
8455 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
8456
8457         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
8458
8459 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
8460
8461         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
8462         get_this_arg_from_call, let it compute it when needed.
8463
8464         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
8465         gsctx from code only when needed.
8466
8467         * mini-trampolines.c (get_generic_context): Rename this to 
8468         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
8469         it can be called by the arch backends.
8470
8471         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
8472
8473 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
8474
8475         * driver.c (mono_main): Add experimental --aot-only command line option.
8476
8477         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
8478         set.
8479
8480 2008-06-26  Kornel Pal  <kornelpal@gmail.com>
8481
8482         * driver.c (DllMain): Remove mono_module_handle.
8483
8484         Contributed under MIT/X11 license.
8485
8486 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
8487
8488         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
8489         for emitting methods which are not in the source assembly. Detect and report
8490         failure of assembling+linking.
8491         
8492         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
8493
8494         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
8495
8496 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
8497
8498         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
8499
8500 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
8501
8502         * mini.h: Remove some obsolete prototypes.
8503
8504         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
8505
8506 2008-06-24  Mark Probst  <mark.probst@gmail.com>
8507
8508         * mini.c (get_object_generic_inst): Variable-sized arrays are not
8509         supported by Visual Studio, so use alloca().
8510
8511 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
8512
8513         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
8514         Fixes #402585.
8515
8516 2008-06-23  Mark Probst  <mark.probst@gmail.com>
8517
8518         * mini.c: Fail sharing of a generic method if it contains an open
8519         catch clause (because we don't pass MRGCTXs yet).
8520
8521 2008-06-23  Mark Probst  <mark.probst@gmail.com>
8522
8523         * mini.c: When compiling a method with generic sharing, insert the
8524         method instantiated with an all-Object generic context into the
8525         jit info table, instead of the context of the first instantiation
8526         of the method we happen to compile.
8527
8528 2008-06-18  Martin Baulig  <martin@ximian.com>
8529
8530         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
8531         `major_version' and `minor_version'.
8532
8533 2008-06-17  Mark Probst  <mark.probst@gmail.com>
8534
8535         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
8536         mono_method_is_generic_sharable_impl() takes an additional
8537         argument specifying whether to treat type variables as reference
8538         types.
8539
8540 2008-06-17  Mark Probst  <mark.probst@gmail.com>
8541
8542         * mini.h: Removed obsolete prototypes.
8543
8544 2008-06-17  Mark Probst  <mark.probst@gmail.com>
8545
8546         * mini.c: Don't fail generic sharing for initobj and sizeof - we
8547         already handle them.
8548
8549 2008-06-17  Mark Probst  <mark.probst@gmail.com>
8550
8551         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
8552         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
8553         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
8554         tramp-x86.c: Added a MonoGenericContext* argument to
8555         mono_arch_get_unbox_trampoline() so that it can call other
8556         functions which require it.
8557
8558 2008-06-17  Mark Probst  <mark.probst@gmail.com>
8559
8560         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
8561         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
8562         mono_arch_get_this_arg_from_call() takes a
8563         MonoGenericSharingContext* as well.
8564
8565 2008-06-17  Mark Probst  <mark.probst@gmail.com>
8566
8567         * mini.c: Factor out code for emitting unbox into emit_unbox() and
8568         implement generic sharing of unbox.
8569
8570 2008-06-17  Mark Probst  <mark.probst@gmail.com>
8571
8572         * mini.c: Don't compute the vtable to determine whether a field is
8573         special static, because it might not work for open types.
8574
8575 2008-06-17  Mark Probst  <mark.probst@gmail.com>
8576
8577         * mini.c: Removed the unused token_type and token_source arguments
8578         from get_runtime_generic_context_ptr().
8579
8580 2008-06-17  Marek Habersack  <mhabersack@novell.com>
8581
8582         * mini.c (ADD_BINOP): fix the build
8583
8584 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
8585
8586         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
8587         a widening op.
8588
8589 2008-06-16  Mark Probst  <mark.probst@gmail.com>
8590
8591         * mini.h: Removed class relations enum that's not used anymore.
8592
8593 2008-06-16  Mark Probst  <mark.probst@gmail.com>
8594
8595         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
8596
8597         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
8598         the lazy fetch trampoline access code.
8599
8600 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
8601
8602         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
8603
8604 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
8605
8606         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
8607
8608         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
8609
8610         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
8611
8612 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
8613
8614         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
8615         intrinsics.
8616
8617         * mini-ops.h: Add MIN/MAX_UN opcodes.
8618
8619         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
8620         intrinsics.
8621
8622         * basic-math.cs: Add more min/max tests.
8623
8624         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
8625
8626 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8627
8628         * mini.c: Small fix in the prologue of emit_castclass.
8629
8630 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
8631
8632         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
8633
8634         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
8635         do not work even for unsigned types. Fixes #400014.
8636
8637         * basic-math.cs: Add regression tests for unsigned Min/Max.
8638
8639 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8640
8641         * mini.c: Added additional context_used argument to several
8642         functions, which will be needed for sharing generic methods.  Use
8643         GET_RGCTX macro wherever appropriate.  Declare only one
8644         context_used in mono_method_to_ir().
8645
8646 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8647
8648         * mini.c, generic-sharing.c: Removed generic class relations.
8649
8650         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
8651         functions due to MRGCTX changes.
8652
8653 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8654
8655         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
8656         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
8657         with calculated IMT.
8658
8659         * mini.c: Generic sharing of calls via generic interfaces.
8660
8661         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
8662         generic method with non-constant MonoGenericContext*.  Instead,
8663         the context is taken out of the method itself.
8664
8665 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8666
8667         * mini.c: Generic sharing of ldvirtftn.
8668
8669 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8670
8671         * mini.c: Generic sharing of ldftn.
8672
8673 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8674
8675         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
8676
8677 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8678
8679         * mini.c: Generic sharing of the special case of ldtoken followed
8680         by a call to GetTypeFromHandle.
8681
8682 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8683
8684         * mini.c: Generic sharing of box for nullable types.
8685
8686 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
8687
8688         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
8689         are passed on the stack. Fixes #324807.
8690
8691 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
8692
8693         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
8694         for the ArgValuetypeAddrInIReg case.
8695
8696         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
8697         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
8698
8699         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
8700         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
8701         local variable and pass the local variable by reference to the called method.
8702           
8703         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
8704         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
8705
8706         Contributed under MIT/X11 license.
8707
8708 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
8709
8710         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
8711
8712         * debug-mini.c (mono_debug_print_vars): Release memory after printing
8713         everything.
8714
8715 2008-06-10  Martin Baulig  <martin@ximian.com>
8716
8717         * debug-mini.c
8718         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
8719
8720 2008-06-09  Kornel Pal  <kornelpal@gmail.com>
8721
8722         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
8723         possible error when no arguments are passed.
8724
8725         Contributed under MIT/X11 license.
8726
8727 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
8728
8729         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
8730         where the file name is NULL.
8731
8732 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
8733
8734         * mini.c: Fix s390 build.
8735
8736 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
8737
8738         * trace.c (mono_trace_parse_options): Fix warnings.
8739
8740         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
8741
8742 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
8743
8744         * mini.c (remove_block_if_useless): Avoid printing the method name.
8745         
8746         * mini.c: Remove needless setting of ins->cil_code which is now done by 
8747         MONO_INST_NEW.
8748
8749         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
8750         LMF. Not yet used.
8751
8752         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
8753         translated code after it has been patched.
8754
8755 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
8756
8757         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
8758         avoid problems during code patching on SMP systems.
8759         (emit_call): Avoid adding a patch info which is already added by 
8760         emit_call_body.
8761         (mono_arch_emit_exceptions): Ditto.
8762
8763 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
8764
8765         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
8766         MONO_TYPE_ISSTRUCT already checks for it.
8767
8768 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
8769
8770         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
8771           structs with floats on Winx64 the float registers are not used.  
8772           The integer registers are always used..
8773         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
8774           only one register will be used and only if the size of the struct 
8775           is 1,2,4, or 8 bytes.
8776
8777         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
8778           to work for Winx64.
8779
8780         Contributed under MIT/X11 license.
8781
8782 2008-06-05  Martin Baulig  <martin@ximian.com>
8783
8784         * debug-debugger.c (debugger_lookup_class): Also call
8785         mono_class_setup_methods() here; we're only called from RTI.
8786
8787 2008-06-05  Andreas Farber  <andreas.faerber@web.de>
8788
8789         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
8790         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
8791         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
8792         Post-process object files and add dtrace-generated object, if necessary.
8793
8794         Contributed under MIT/X11 license.
8795
8796 2008-06-04  Mark Probst  <mark.probst@gmail.com>
8797
8798         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
8799         element class.
8800
8801         * mini.c: Generic sharing for unbox.any and castclass.
8802
8803 2008-06-04  Mark Probst  <mark.probst@gmail.com>
8804
8805         * mini.c: Ignore tailcall prefix in shared generic code and when
8806         doing calls which require a vtable/rgctx argument.
8807
8808 2008-06-04  Mark Probst  <mark.probst@gmail.com>
8809
8810         * mini.c: Don't free the JIT info.
8811
8812         * driver.c: Changes in the JIT info table testing code.
8813
8814 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
8815
8816         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
8817         interruption. Fix some warnings.
8818
8819         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
8820         interruption_checkpoint.
8821
8822 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
8823
8824         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
8825         from embedding applications.
8826
8827 2008-06-02  William Holmes  <billholmes54@gmail.com>
8828
8829         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
8830           reserving 32 bytes on the stack when making calls. 
8831
8832         Contributed under MIT/X11 license.
8833
8834 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
8835
8836         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
8837         the linear IL branch.
8838
8839         * driver.c: Print out more information for --version on arm.
8840
8841 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
8842
8843         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
8844         bb_exit instead, since out of line bblocks might not actually be emitted
8845         out-of-line.
8846         
8847         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
8848         maximum epilog size for out of line bblocks if tracing is enabled.
8849
8850         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
8851
8852 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
8853
8854         * arrays.cs: Regression tests for allocating arrays with negative sizes.
8855
8856 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
8857
8858         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
8859         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
8860         opcodes.
8861
8862 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
8863
8864         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
8865         the 'value' to store is a constant.
8866
8867         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
8868
8869         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
8870         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
8871
8872 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
8873
8874         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
8875         for accessing method->generic_container.
8876
8877 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
8878
8879         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
8880         
8881         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
8882
8883         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
8884
8885         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
8886         fails.
8887
8888 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
8889
8890         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
8891
8892         * mini.c: Handle the case when mono_class_vtable () fails.
8893
8894 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
8895         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
8896         the stat profiler.
8897
8898 2008-05-22  Mark Probst  <mark.probst@gmail.com>
8899
8900         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
8901         together with domain sharing.
8902
8903 2008-05-22  Mark Probst  <mark.probst@gmail.com>
8904
8905         * mini.c: Treat callvirts to final methods like non-virtual calls
8906         when doing generic sharing, i.e. look them up in the runtime
8907         generic context.
8908
8909 2008-05-22  Mark Probst  <mark.probst@gmail.com>
8910
8911         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
8912         with computed types (for generic sharing).
8913
8914         * mini.c: Generic sharing for mkrefany and refanyval.
8915
8916 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
8917
8918         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
8919         possible.
8920
8921         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
8922         the generic sharing code.
8923         
8924         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
8925         when needed.
8926
8927 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
8928
8929         * mini.h: Remove the declaration of mono_aot_init_vtable ().
8930
8931 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
8932
8933         * driver.c: updated copyright date
8934
8935 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
8936
8937         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
8938         needed.
8939
8940 2008-05-19  Martin Baulig  <martin@ximian.com>
8941
8942         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
8943         pointing to the new `_mono_debug_using_mono_debugger' variable.
8944
8945         * driver.c
8946         (mono_main): Check mono_debug_using_mono_debugger() rather than
8947         the `MONO_INSIDE_MDB' environment variable to check whether we're
8948         inside the debugger.
8949
8950 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
8951
8952         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
8953         argument.
8954
8955 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
8956
8957         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
8958
8959         * mini.c: Added mini_assembly_can_skip_verification. This
8960         function checks if the assembly requested to skip verification. 
8961         Fixes part of #387274.
8962
8963 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
8964
8965         * mini.c (mini_get_method): Disable the check for open generic classes when
8966         using generic sharing.
8967
8968         * generics.cs: Add a test for #387034.
8969
8970         * mini.c (mini_get_method): Check whenever the method class is an open generic
8971         type, and return NULL in that case, causing a verification error. Fixes
8972         #384123.
8973
8974 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
8975
8976         * driver.c (mono_main): Revert r102623. The right
8977         thing to do is to enable the verifier under verifiable
8978         unless a --security flag was passed.
8979
8980         We need this non-trivial behavior for --verify-all otherwise
8981         mcs-compileall won't be able to use it. As it needs everything to
8982         be verified under validil.
8983
8984 2008-05-06  Martin Baulig  <martin@ximian.com>
8985
8986         Fix #383749.
8987
8988         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
8989         (mono_debugger_thread_cleanup): Likewise.
8990         (mono_debugger_extended_notification): Likewise.
8991
8992 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
8993
8994         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
8995         against both inflated and non-inflated methods. We need to check against the
8996         generic definition for cases where the instantiated method is not visible.
8997         We need to check against the inflated types for cases where the instantiation
8998         changes any super type. This fixes #382986.
8999
9000         Note that this doesn't need to be applied to other parts of mono_method_to_ir
9001         that check for visibiliy as generic params only appears as the type subject
9002         of tokens on call opcodes. Field manipulation and ldftn must always
9003         target an exact type.
9004
9005 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
9006
9007         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
9008         if no related --security flag is passed.
9009
9010 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
9011
9012         * mini-arch.h: Prepare support for ppc64.
9013
9014         Contributed under MIT/X11 license.
9015
9016 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
9017
9018         * aot-runtime.c: Prepare support for ppc64.
9019
9020         Contributed under MIT/X11 license.
9021
9022 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
9023
9024         * mini-ops.h: Prepare support for ppc64.
9025
9026         Contributed under MIT/X11 license.
9027
9028 2008-05-04  Andreas Farber  <andreas.faerber@web.de>
9029
9030         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
9031
9032         Contributed under MIT/X11 license.
9033
9034 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
9035
9036         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
9037         assemblies, since aot_name is not a full path, causing us to load MS.NET 
9038         assemblies on windows.
9039
9040 ?2008-04-28  Kornel Pal  <kornelpal@gmail.com>
9041
9042         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
9043         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
9044         * main.c: Use UTF-8 encoded command line instead of Windows default code
9045         page on Windows to support Unicode.
9046         * driver.c (DllMain): New function for mixed-mode assembly support.
9047         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
9048         export __stdcall functions without decoration.
9049
9050         Contributed under MIT/X11 license.
9051
9052 2008-04-28  Mark Probst  <mark.probst@gmail.com>
9053
9054         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
9055         saving it very early.
9056
9057 2008-04-28  Mark Probst  <mark.probst@gmail.com>
9058
9059         * mini.h, mini.c: Lots of code for accessing the old RGCTX
9060         deleted.  The only way to access the new RGCTX is via the
9061         trampline.
9062
9063         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
9064         vtable instead of the RGCTX to static methods.
9065
9066         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
9067         accessing the new RGCTX.
9068
9069         * generic-sharing.c: There is no separation between self, type
9070         arguments and other types in the RGCTX anymore.
9071
9072 2008-04-25  Jonathan Chambers <joncham@gmail.com>
9073
9074         * mini-amd64.c (add_general): Remove previous stack adjustment.
9075         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
9076         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
9077         for 32 bytes of stack space reserved for all calls.
9078         
9079         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
9080         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
9081         adjustment.
9082         
9083         Code contributed under MIT/X11 license.
9084
9085 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
9086
9087         * mini.c (mini_method_verify): Only verify non-inflated methods, check
9088         against the root definition, peeling out method and type instantiations.
9089         Cache verify success results, code that fails verification is still
9090         checked multiple times.
9091
9092 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
9093
9094         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
9095
9096 2008-04-23  Jonathan Chambers <joncham@gmail.com>
9097
9098         * mini-amd64.c (add_general): Always increment stack on Win64.
9099         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
9100         on Win64.
9101         
9102         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
9103         stack based argument handling on Win64.
9104         
9105         Code contributed under MIT/X11 license.
9106
9107 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
9108
9109         * Makefile.am (version.h): Add support for git-svn.
9110
9111 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
9112
9113         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
9114         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
9115         avoiding allocations and libc functions which might deadlock.
9116         
9117         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
9118         'no-gdb-backtrace' option is set.
9119
9120         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
9121
9122         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
9123
9124 2008-04-21  Martin Baulig  <martin@ximian.com>
9125
9126         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
9127         and `get_lmf_addr'; `notification_address' is no longer a pointer.
9128
9129 2008-04-21  Martin Baulig  <martin@ximian.com>
9130
9131         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
9132         `thread_vtable', `event_handler_ptr' and `event_handler'.
9133
9134 2008-04-21  Martin Baulig  <martin@ximian.com>
9135
9136         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
9137         allows delayed initialization of the `executable_code_buffer' when
9138         attaching.
9139
9140 2008-04-21  Martin Baulig  <martin@ximian.com>
9141
9142         * mini.h (mono_debugger_create_notification_function): Removed.
9143         * tramp-*.c (mono_debugger_create_notification_function): Removed.
9144
9145         * mdb-debug-info64.s
9146         (MONO_DEBUGGER__notification_function): Added this in the .text section.
9147
9148         * mdb-debug-info32.s
9149         (MONO_DEBUGGER__notification_function): Added this in the .text section.
9150
9151         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
9152         currently only works on x86 and x86_64, so don't create it on ppc.
9153
9154 2008-04-21  Martin Baulig  <martin@ximian.com>
9155
9156         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
9157
9158         * mini.c
9159         (mini_method_compile): In the fp elimination check, check
9160         `debug_options.mdb_optimizations' in addition to
9161         mono_debug_using_mono_debugger().       
9162
9163         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
9164         disable some JIT optimizations which are only disabled when
9165         running inside the debugger.
9166         Added `--help-debug' option to describe the debugging options.
9167         (parse_debug_options): New static function to parse the `--debug'
9168         options, so we can easily add more stuff in future.
9169
9170 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
9171
9172         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
9173         the method has no body.
9174
9175 2008-04-19  Jonathan Chambers <joncham@gmail.com>
9176
9177         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
9178         assembly is not allowed in MSVC 64-bit compiler. 
9179         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
9180         as we get floating point exceptions everywhere.
9181         
9182         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
9183         correctly align arguments for call to throw_exception.
9184         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
9185         
9186         Code contributed under MIT/X11 license.
9187
9188 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
9189
9190         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
9191
9192 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
9193
9194         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
9195
9196         * mini-amd64.c (NEW_INS): Set cil_code.
9197
9198         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
9199         from mini-amd64.c so all debugger related logic is in one place.
9200
9201         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
9202         later won't have a random ip assigned to them.
9203
9204 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
9205
9206         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
9207         the arch specific function initializes code_size.
9208         (mono_create_delegate_trampoline): Ditto.
9209
9210         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
9211         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
9212         platforms.
9213
9214         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
9215         running under the debugger.
9216
9217         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
9218         debugger.
9219
9220         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
9221         debugger. Also move the disabling of optimizations here from driver.c.
9222         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
9223         debugger.
9224
9225         * mini.h (MonoCompile): Add a few new flags.
9226
9227 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
9228
9229         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
9230         so the cil_code field of created MonoInst's is properly set.
9231         (mini_select_instructions): Ditto.
9232
9233         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
9234         (MONO_INST_NEW_CALL): Ditto.
9235
9236         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
9237         in many places so the ins->cil_code field is properly initialized.
9238
9239         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
9240         place.
9241
9242 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
9243
9244         * mini.c (mini_method_compile): Print a different message when compiling a 
9245         shared method.
9246         
9247         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
9248         > 1.
9249
9250 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
9251
9252         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
9253         SSE2 instructions.
9254
9255         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
9256         
9257 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
9258
9259         * mini.c (handle_stack_args): Make this return void since its return value was
9260         never used. Also set cfg->unverifiable for invalid IL instead of calling
9261         G_BREAKPOINT ().
9262
9263 2008-04-10  Mark Probst  <mark.probst@gmail.com>
9264
9265         * mini.c: Make sure "this" is live in catch clauses with type
9266         variables in shared generic code.
9267
9268 2008-04-08  Mark Probst  <mark.probst@gmail.com>
9269
9270         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
9271         generic_class_is_reference_type() to ensure the proper behaviour
9272         when sharing generic code and the type in question is a type
9273         argument.
9274
9275 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
9276
9277         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
9278         race conditions when printing thread dumps. Fixes #377738.
9279
9280 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
9281         
9282         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
9283         shows up when both MonoInst arguments can cause aliasig.
9284         There is likely no way in the current JIT to trigger this problem, but
9285         it showed up in the development of generics sharing, when in a new
9286         opcode both args of an OP_GROUP can be aliases (addresses of a local).
9287         When the generics sharing code will be committed, its tests will be
9288         valid also for this bug.
9289
9290 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
9291
9292         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
9293         PATCH_INFO_METHOD.
9294
9295         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
9296         NULL.
9297
9298 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
9299
9300         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
9301         use a more detailed exception message for InvalidCastException.
9302
9303         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
9304
9305         * driver.c (mono_main): Add --debug=casts option to turn on better 
9306         InvalidCastException message details.
9307
9308         * mini.c (mini_get_debug_options): New helper function to return the address of
9309         the debug_options variable.
9310
9311         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
9312         the jit_tls TLS variable.
9313
9314         * mini.c (mono_jit_tls): New TLS variable.
9315
9316         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
9317         option is used.
9318
9319 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
9320
9321         * mini.h: Removed verifer related stuff. This code was moved to verify.c
9322
9323         * mini.c: Removed verifer related stuff, code moved to verify.c.
9324
9325         * driver.c: Using code from verify.c instead of mini.c.
9326
9327 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
9328
9329         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
9330         longer valid.
9331
9332 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
9333
9334         * mini.c (check_for_method_verify): Enabling verification of
9335         corlib if mono_verify_all is set. Bugs in the verifier preventing that
9336         have been fixed.
9337
9338 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
9339
9340         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
9341         caller saved registers as well.
9342         
9343         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
9344         saved registers as well.
9345
9346 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
9347
9348         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
9349
9350         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
9351         code.
9352
9353 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
9354
9355         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
9356         to get_call_info.
9357         (get_call_info): Take a gsctx argument instead of 'cfg'.
9358
9359 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
9360
9361         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
9362         mono_verify_all is set.
9363
9364         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
9365
9366         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
9367
9368 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
9369
9370         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
9371         an exception.
9372
9373         * driver.c mini.c mini.h: Add a --verify-all development option to test the
9374         verifier and the code generated by the compiler.
9375
9376 2008-03-25  Mark Probst  <mark.probst@gmail.com>
9377
9378         * mini.c: Generic sharing of the non-nullable case of the box
9379         instruction.
9380
9381 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
9382
9383         * inssel.brg: Fix the build.
9384
9385         * iltests.il.in: Add a test for lconv.ovf.u8.un.
9386
9387 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
9388
9389         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
9390         Array:Address. Fixes #372410.
9391
9392         * iltests.il.in: New tests for readonly prefix.
9393
9394 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
9395
9396         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
9397         mini-trampolines.c.
9398
9399         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
9400         mini-exceptions.c.
9401
9402         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
9403         
9404         * mini.c (mono_decompose_op_imm): New helper function.
9405
9406         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
9407         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
9408         return value.
9409
9410         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
9411         mono_arch_output_basic_block. Fix warnings.
9412
9413         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
9414         for now.
9415
9416 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
9417
9418         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
9419         since the extra frame is now detected automatically inside the loop.
9420
9421         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
9422         opts which are now in mono_peephole_ins ().
9423         
9424         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
9425
9426         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
9427         frames and skip duplicate managed-to-native frames. Fixes #367665.
9428
9429         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
9430         opts which are now in mono_peephole_ins ().
9431         (mono_arch_peephole_pass_2): Ditto.
9432
9433         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
9434
9435         * mini-codegen.c (mono_peephole_ins): New helper function containing the
9436         arch independent peephole optimizations.
9437
9438         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
9439         opts which are now in mono_peephole_ins ().
9440
9441         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
9442         
9443         * mini-s390.c (mono_arch_output_basic_block): Fix build.
9444
9445         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
9446         pattern.
9447
9448         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
9449         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
9450         opcode. 
9451
9452 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
9453
9454         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
9455         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
9456         return value.
9457
9458         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
9459         mono_arch_output_basic_block. Fix warnings.
9460
9461 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
9462
9463         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
9464         conv.ovf.u.un.
9465
9466 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
9467
9468         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
9469         conv.ovf.u.un.
9470
9471         * iltests.il: Add new tests.
9472
9473 2008-03-20  Kornel Pal  <kornelpal@gmail.com>
9474
9475         * mini.c: Removed Windows version macros.
9476
9477 2008-03-20  Mark Probst  <mark.probst@gmail.com>
9478
9479         * generic-sharing.c: Put reflection types in the extensible part
9480         of the runtime generic context.
9481
9482         * mini.c: Generic sharing of the GetTypeHandle special case of the
9483         ldtoken instruction.
9484
9485 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
9486
9487         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
9488
9489         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
9490         
9491         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
9492         consistency with the other version on the linear IR branch.
9493
9494         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
9495
9496         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
9497
9498         * iltests.il.in: Add new tests.
9499
9500 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
9501
9502         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
9503
9504         * iltests.il.in: Add new tests.
9505
9506 2008-03-19  Mark Probst  <mark.probst@gmail.com>
9507
9508         * mini.c: Two variables with the same name were declared in
9509         nesting contexts and one wasn't initialized.  Fixed.
9510
9511 2008-03-19  Mark Probst  <mark.probst@gmail.com>
9512
9513         * mini.c: Generic sharing of the initobj instruction.
9514
9515 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
9516
9517         * mini.c: make the test to optimize ldtoken from typeof() more
9518         precise.
9519
9520 2008-03-18  Mark Probst  <mark.probst@gmail.com>
9521
9522         * mini.c: Generic sharing of the initobj instruction for reference
9523         types.
9524
9525 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
9526
9527         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
9528         the mono_breakpoint_clean_code() code to perform bound checks.
9529
9530 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
9531
9532         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
9533         mono_arch_patch_callsite() to include the start of the managed method
9534         to be able to perform bound checks.
9535
9536 2008-03-17  Mark Probst  <mark.probst@gmail.com>
9537
9538         * mini.c: Generic sharing for the isinst instruction.
9539
9540 2008-03-17  Mark Probst  <mark.probst@gmail.com>
9541
9542         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
9543         inssel-long32-mips.brg: Added opcodes for doing indirect calls
9544         with the runtime generic context argument.
9545
9546         * mini.c: Share calls to several types of unsharable methods by
9547         putting the address of the method code in the runtime generic
9548         context and doing an indirect call.
9549
9550         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
9551         to switches.
9552
9553 2008-03-16  Mark Probst  <mark.probst@gmail.com>
9554
9555         * generic-sharing.c: Change due to a change in the runtime genric
9556         context API.
9557
9558 2008-03-15  Martin Baulig  <martin@ximian.com>
9559
9560         * tramp-x86.c
9561         (mono_arch_nullify_class_init_trampoline): Add call to
9562         mono_breakpoint_clean_code() to make things work when running
9563         inside the debugger.
9564
9565         * tramp-amd64.c
9566         (mono_arch_nullify_class_init_trampoline): Add call to
9567         mono_breakpoint_clean_code() to make things work when running
9568         inside the debugger.
9569
9570 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
9571
9572         * inssel-long.brg (reg): Fix 64 bit build.
9573
9574 2008-03-14  Mark Probst  <mark.probst@gmail.com>
9575
9576         * mini.c, mini.h: Share static generic code by passing it an
9577         implicit argument pointing to the runtime generic context.
9578
9579         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
9580         inssel-long32-mips.brg: New opcodes for calling shared static,
9581         which need to be passed the runtime generic context.
9582
9583         * mini-amd64.c, mini-x86.c: Save the runtime generic context
9584         argument on the stack in the prologue if needed.  New function for
9585         finding the runtime generic context argument from the registers
9586         saved by the trampoline.
9587
9588         * mini-amd64.h, mini-x86.h: Specify which register to use for the
9589         runtime generic context argument.
9590
9591         * tramp-amd64.c: Also restore the register used for the runtime
9592         generic context argument.
9593
9594         * mini-trampoline.c: Resolve shared static calls by consulting the
9595         runtime generic context via the new argument.
9596
9597         * generic-sharing.c: Add an argument to sharability-checking
9598         functions that specifies whether type variables should be treated
9599         as sharable type arguments.
9600
9601         * inssel-x86.brg: Removed a superfluous, buggy rule.
9602
9603         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
9604         to switches.
9605
9606 2008-03-14  Martin Baulig  <martin@ximian.com>
9607
9608         * debug-debugger.c (main_thread_handler): Call
9609         mono_runtime_run_main() without sending any notifications.
9610
9611         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
9612
9613 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
9614
9615         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
9616
9617 2008-03-14  Mark Probst  <mark.probst@gmail.com>
9618
9619         * tramp-x86.c: Fixed register restore offsets in the trampoline
9620         code for ECX and EDX.
9621
9622 2008-03-12  Geoff Norton  <gnorton@novell.com>
9623
9624         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
9625         different ucontext_t implementations.
9626         * exceptions-arm.c: Use the above defines to get exceptions working on 
9627         iPhone (based on a patch by Luke Howard lukeh@padl.com)
9628         * mini-arm.c: Implement iPhone icache support (based on a patch by
9629         Luke Howard lukeh@padl.com)
9630
9631 2008-03-12  Mark Probst  <mark.probst@gmail.com>
9632
9633         * mini.c: Enable generic sharing of calls to non-static
9634         non-interface non-generic non-value-type methods.
9635
9636         * mini-trampolines.c: Resolve calls from shared generic code.
9637
9638 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
9639
9640         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
9641
9642         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
9643
9644 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
9645
9646         * mini.c: some fixes for the AOT compiler.
9647
9648 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
9649
9650         * cpu-amd64.md: Add clob:1 to some float opcodes.
9651
9652 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
9653
9654         * mini.h: Added MiniVerifierMode enumeration.
9655
9656         * mini.c: Added mini_verifier_set_mode to control
9657         the usage of the new verifier.
9658
9659         * mini.c (mono_method): Integrated the new verifier.
9660
9661         * driver.c: Extended --security option with validil and
9662         verifiable options to activate the new verifier.
9663
9664 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
9665
9666         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
9667         optimization to ctors taking 0 or 2 arguments too.
9668
9669         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
9670         a bit.
9671
9672         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
9673
9674         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
9675
9676 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
9677
9678         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
9679         non-aot case as well.
9680
9681         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
9682
9683         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
9684         changes.
9685
9686         * aot-compiler.c (encode_patch): Ditto.
9687
9688         * mini.h (G_MININT32): Fix the definition of this.
9689
9690 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
9691
9692         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
9693
9694         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
9695
9696 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
9697
9698         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
9699         methods returning vtypes in registers.
9700         (mono_arch_allocate_vars): Ditto.
9701
9702         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
9703
9704         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
9705
9706         * generics.cs: Add a test from the linear IR branch.
9707
9708         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
9709
9710         * mini.c (inline_method): Cache failed inline attempts.
9711
9712 2008-03-04  Mark Probst  <mark.probst@gmail.com>
9713
9714         * mini.c: For shared methods of generic classes put the location
9715         of "this" into the MonoGenericJitInfo.
9716
9717         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
9718         register out of a MonoContext by register number.  Add the generic
9719         sharing context as an argument to mono_arch_find_this_argument().
9720
9721         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
9722         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
9723         for new arch function.
9724
9725         * mini-exception.c: Handle open exception clauses in shared
9726         generic code.
9727
9728         * mini-trampolines.c: Supply additional argument to
9729         mono_arch_find_this_argument().
9730
9731 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
9732
9733         * Makefile.am (regtests): Run the bench.exe tests last.
9734
9735 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
9736
9737         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
9738         a bit.
9739
9740 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
9741
9742         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
9743         with MS.
9744
9745         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
9746         
9747         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
9748
9749         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
9750         whose class has no cctor.
9751
9752         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
9753
9754 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
9755
9756         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
9757         unverified.
9758
9759 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
9760
9761         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
9762         to be in sync with the code on the linear IR branch.
9763
9764         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
9765
9766         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
9767
9768 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
9769
9770         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
9771
9772         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
9773
9774         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
9775
9776         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
9777
9778         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
9779         
9780         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
9781         body.
9782
9783 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
9784
9785         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
9786         OP_LOADR4_MEMBASE emission.
9787
9788         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
9789         (mono_spillvar_offset_float): Ditto.
9790
9791         * mini-mips.c (mono_arch_emit_prolog): Ditto.
9792
9793         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
9794         emission.
9795
9796         * basic-long.cs: Add regression tests for them.
9797
9798         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
9799         use.
9800         (mono_arch_allocate_vars): Fix representation of single-precision float
9801         argument.
9802         (mono_arch_output_basic_block): Ditto.
9803
9804         * inssel-mips.brg: Ditto, remove duplicate items.
9805
9806         * mini-mips.c (emit_load_volatile_arguments): New function to handle
9807         arguments of tail calls as on other platforms.
9808         (mono_arch_output_basic_block): Handle tail calls.
9809
9810         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
9811         register.
9812
9813         * objects.cs (test_5_pass_static_struct): Add test for it.
9814
9815         Contributed under MIT/X11 license.
9816
9817 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
9818
9819         * Makefile.am: Use gmcs for compiling the regression tests.
9820
9821         * *.2.cs *.2.il: Rename to *.cs and *.il.
9822
9823 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
9824
9825         * regalloc.h: Make the vassign array smaller.
9826
9827         * mini.c (mini_method_compile): Remove an unused field in cfg.
9828
9829         * mini-codegen.c: Add a bunch of micro optimizations.
9830
9831 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
9832
9833         * regalloc.h: Remove some unused fields.
9834
9835 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
9836
9837         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
9838
9839         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
9840
9841 2008-02-22  Mark Probst  <mark.probst@gmail.com>
9842
9843         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
9844
9845         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
9846         trampoline: Fetch an entry from the runtime generic context.  If
9847         it's NULL, jump to the actual trampoline to fill the runtime
9848         generic context.  Otherwise, return it.
9849
9850         * mini.c: Call the lazy fetch trampoline to get entries out of the
9851         runtime generic context.
9852
9853         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
9854         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
9855         tramp-sparc.c: Stubs for the lazy fetch trampoline.
9856
9857 2008-02-21  Mark Probst  <mark.probst@gmail.com>
9858
9859         * mini.c: Fetch data out of the extensible part of the runtime
9860         generic context instead of calling a helper function.
9861
9862         * generic-sharing.c: Some functions moved into
9863         metadata/generic-sharing.c.  Helper function for fetching other
9864         types now checks and asserts against extensible rgctx (just for
9865         debugging purposes - the helper function isn't called anymore
9866         unless for debugging).
9867
9868 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
9869
9870         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
9871         for tail calls up to the point that the tests in iltests.exe run. Also add a
9872         dummy CKFINITE implementation.
9873         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
9874         needed for trampoline LMF frames.
9875
9876         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
9877         trampoline LMF frames.
9878
9879 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
9880
9881         * mini.c (inline_method): clean any pending loader error when inlining fail.
9882         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
9883
9884 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
9885
9886         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
9887
9888         * aot-runtime.c (decode_patch_info): Ditto.
9889
9890         * mini.c (mono_resolve_patch_target): Ditto.
9891         
9892         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
9893         icall wrappers.
9894
9895         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
9896         
9897         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
9898         if it references an icall address.
9899
9900 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
9901
9902         * cpu-s390x.md: Remove some more unused opcodes.
9903         
9904         * cpu-s390x.md: Remove some unused opcodes.
9905
9906         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
9907         mono_op_imm_to_op ().
9908
9909         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
9910         instead of a switch statement.
9911         
9912         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
9913         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
9914
9915         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
9916         
9917         * mini-codegen.c: Remove unused mono_regstate2_... functions.
9918
9919         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
9920         -1.
9921
9922 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
9923
9924         * driver.c (mono_main): Improve error reporting when an assembly cannot be
9925         opened. Fixes #362607.
9926
9927         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
9928
9929         * iltests.il.in: Add a test for static methods in interfaces.
9930
9931 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
9932
9933         * genmdesc.c (build_table): Fix a crash on older glib versions.
9934
9935         * cpu-sparc.md: Remove some unused opcodes.
9936         
9937         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
9938         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
9939
9940         * cpu-amd64.md: Remove some unused opcodes.
9941
9942         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
9943         like the other opcodes.
9944
9945 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
9946
9947         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
9948
9949         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
9950
9951         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
9952         variables 'cfg' instead of 'm' for consistency.
9953
9954         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
9955
9956         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
9957         argument holding the vtype return address, to avoid the ambigious use of
9958         cfg->ret for this purpose.
9959
9960         * mini.c (NEW_RETLOADA): Use vret_addr if set.
9961
9962         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
9963         
9964         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
9965         new mono_print_ins () function which only takes one argument.
9966
9967 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
9968
9969         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
9970         macro arguments.
9971
9972 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
9973
9974         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
9975
9976         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
9977
9978         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
9979         opcodes and other small changes.
9980
9981         * mini-ops.h: Add some new opcodes from the linear IR branch.
9982
9983         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
9984
9985         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
9986         opcodes, use the REG_MEMBASE opcodes instead.
9987         
9988         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
9989         opcodes, use the REG_MEMBASE opcodes instead.
9990         
9991         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
9992         linear IR branch.
9993
9994         * mini.c (mono_op_imm_to_op): New helper function.
9995
9996         * mini-ops.h: Add some opcodes from linear IR branch.
9997
9998 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
9999
10000         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
10001         <tsv@solvo.ru>.
10002
10003 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
10004
10005         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
10006         OP_ICONV_TO_R4/R8.
10007
10008         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
10009
10010 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
10011
10012         * aot-compiler.c (emit_method_code): Add an assert.
10013
10014         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
10015         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
10016         methods.
10017
10018 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
10019
10020         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
10021         some load/store opcodes so they are consistent. 
10022         (mono_arch_emit_prolog): Simplify some code.
10023
10024         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
10025
10026         * objects.cs: Add tests for large argument offsets on ARM.
10027
10028         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
10029         stack offsets. Fixes #359651.
10030
10031         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
10032
10033         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
10034
10035         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
10036
10037         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
10038
10039         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
10040
10041         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
10042         rid of CEE_CONV_R_UN.
10043
10044         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
10045
10046 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
10047
10048         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
10049
10050         * mini.c (mono_normalize_opcodes): Add some more opcodes.
10051
10052         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
10053
10054         * cpu-amd64.md: Remove some unused opcodes.
10055
10056         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
10057
10058         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
10059
10060         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
10061         arch specific functions for its parts. Call the peephole pass after local
10062         regalloc so the prolog can compute a more accurate max_offset.
10063         
10064         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
10065         the corresponding OP_I/OP_L opcodes.
10066
10067         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
10068
10069         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
10070
10071 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
10072
10073         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
10074         as they are handled in mini.c.
10075
10076         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
10077         
10078         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
10079         case since it is handled in mini.c.
10080
10081         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
10082
10083         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
10084
10085         * *.c: Use the new opcodes in the IR and back end code.
10086
10087         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
10088
10089         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
10090
10091 2008-02-06  Mark Probst  <mark.probst@gmail.com>
10092
10093         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
10094         an assert because it has a race condition.
10095
10096 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
10097
10098         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
10099
10100         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
10101
10102         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
10103
10104         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
10105         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
10106
10107 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
10108
10109         * cpu-amd64.md (move): Correct the maximum size of move.
10110
10111 2008-02-05  Mark Probst  <mark.probst@gmail.com>
10112
10113         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
10114         the generic class init trampoline to return quickly if the class
10115         is already inited.
10116
10117 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
10118
10119         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
10120         issues where an 32 bit callsite cannot be patched by a 64 bit address.
10121
10122 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
10123
10124         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
10125         branch.
10126
10127 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
10128
10129         * objects.cs: Add some soft-float tests.
10130
10131         * mini.c: Fix a couple more soft-float issues.
10132
10133         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
10134
10135         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
10136         avoid a REX prefix.
10137
10138 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
10139
10140         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
10141         exception happens while compiling a virtual method.
10142
10143 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
10144
10145         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
10146         
10147         * mini-sparc.c: Fix build.
10148
10149         * mini-sparc.c (get_call_info): Add support for generic sharing.
10150
10151         * mini-exceptions.c: Add a FIXME.
10152
10153 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
10154
10155         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
10156         altstack handling code.
10157
10158         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
10159         
10160         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
10161
10162         * mini-s390.c: Add support for generic sharing.
10163
10164         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
10165         Fix CAS on s390.
10166         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
10167
10168         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
10169
10170         * mini-s390x.c: Add support for generic sharing.
10171         
10172         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
10173         Fix CAS on ia64.
10174         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
10175
10176         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
10177         can be used since it takes a 16 bit signed immediate.
10178
10179         * inssel-s390x.brg: Fix OP_SETRET.
10180
10181         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
10182
10183         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
10184
10185         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
10186
10187         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
10188
10189         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
10190         in one place.
10191
10192         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
10193         stuff.
10194
10195         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
10196         of the unused mono_arch_patch_delegate_trampoline stuff.
10197
10198 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
10199
10200         * basic-long.cs: Move the fp related tests to basic-float.cs.
10201
10202         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
10203
10204         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
10205
10206         * basic-calls.cs: Add a test for proper float argument passing.
10207
10208         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
10209         if the context corresponds to an exception received through a signal.
10210
10211         * exceptions.cs: Add a test for nullref handling at the start of a try
10212         clause.
10213
10214         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
10215
10216         * jit-icalls.c (mono_break): New JIT icall.
10217
10218         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
10219
10220         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
10221
10222 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
10223
10224         * cpu-*.md: Get rid of unused opcodes.
10225
10226         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
10227
10228         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
10229         by all platforms.
10230
10231         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
10232         define.
10233
10234         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
10235         the arch independent trampoline code in mini-trampolines.c.
10236
10237         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
10238
10239         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
10240
10241         * mini-s390.h: Remove an unused define.
10242         
10243         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
10244         the arch independent trampoline code in mini-trampolines.c.
10245
10246         * mini-arm.c (mono_arch_emit_prolog): Fix build.
10247
10248 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
10249
10250         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
10251
10252         * mini-s390.c (mono_arch_emit_prolog): Fix build.
10253
10254         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
10255
10256         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
10257
10258         * cpu-amd64.md: Use smaller sizes for int opcodes.
10259
10260         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
10261
10262         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
10263         objects.cs.
10264
10265         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
10266         debugging.
10267
10268         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
10269         instead of though a pointer to save an indirection when accessing elements of
10270         the array.
10271
10272         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
10273         some typos.
10274         (NOT_IMPLEMENTED): New helper macro.
10275         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
10276         of a bb.
10277
10278         * *.c: Use the new helper macro.
10279
10280 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
10281
10282         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
10283
10284 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
10285
10286         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
10287         stack slots.
10288
10289 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
10290
10291         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
10292         profiling is enabled.
10293         
10294         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
10295         the end.
10296         (mono_arch_emit_prolog): Add more first bblock optimizations.
10297
10298         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
10299         in order if possible.
10300         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
10301         bblock, since the arguments are still in their original registers.
10302
10303         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
10304
10305 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
10306
10307         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
10308         as well.
10309
10310         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
10311         offset 0.
10312
10313         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
10314
10315         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
10316         process async exceptions received while in unmanaged code.
10317
10318         * mini.c (mini_init): Install a callback with the runtime which will be called
10319         when a thread receives an async exception while in unmanaged code.
10320
10321         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
10322
10323         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
10324
10325 2008-01-16  Wade Berrier  <wberrier@novell.com>
10326
10327         * cpu-g4.md:
10328         * cpu-arm.md:
10329         * cpu-s390x.md:
10330         fix build
10331
10332 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
10333
10334         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
10335         compilation with sun cc.
10336
10337         * cpu-*.md: Fix the build.
10338
10339         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
10340
10341         * mini-amd64.h: Add some comments to the MonoLMF structure.
10342
10343         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
10344         
10345         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
10346         in the LMF structure if possible. This saves two instructions in the
10347         managed->native wrappers.
10348
10349         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
10350
10351 2008-01-16  Mark Probst  <mark.probst@gmail.com>
10352
10353         * generic-sharing.c: New type argument lookup code which uses the
10354         runtime generic context template.
10355
10356 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
10357
10358         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
10359
10360         * mini-arm.c (add_general): Fix arm eabi parameter passing.
10361         (mono_arch_output_basic_block): Fix localloc implementation.
10362
10363         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
10364
10365         * mini-ia64.c (peephole_pass): Fix ia64 build.
10366
10367         * mini-amd64.c (peephole_pass): Fix a warning.
10368         
10369         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
10370         at a constant offset from sp/fp.
10371
10372         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
10373         instead of obtaining it from *lmf in the managed method case.
10374
10375 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
10376
10377         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
10378
10379 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
10380
10381         * mini.h (MonoInstList): New type.
10382         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
10383         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
10384         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
10385         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
10386         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
10387         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
10388         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
10389         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
10390         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
10391         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
10392         MONO_INST_LIST_FOR_EACH_ENTRY,
10393         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
10394         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
10395         mono_inst_list_first, mono_inst_list_last,
10396         mono_inst_list_next, mono_inst_list_prev): New instruction
10397         list handling interfaces.
10398         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
10399         list head 'ins_list'.
10400         (MonoInst): Replace next pointer with list head 'node'.
10401         (MonoCallInst): Make 'out_args' a MonoInstList.
10402         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
10403         (MonoCompile): Delete reverse_inst_list and
10404         reverse_inst_list_len.
10405         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
10406         mono_arch_lowering_pass, mono_arch_local_regalloc,
10407         mono_arch_output_basic_block, mono_arch_emit_prolog):
10408         Convert to new instruction lists.
10409         (insert_after_ins): Delete.
10410         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
10411         instruction lists.
10412         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
10413         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
10414         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
10415         mono_emulate_opcode, mono_emit_load_got_addr,
10416         inline_method, mono_method_to_ir, mono_print_bb_code,
10417         print_dfn, decompose_pass, nullify_basic_block,
10418         replace_out_block_in_code, remove_block_if_useless,
10419         merge_basic_blocks, move_basic_block_to_end,
10420         try_unsigned_compare, optimize_branches, mono_print_code,
10421         mini_select_instructions, remove_critical_edges): Likewise.
10422         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
10423         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
10424         mono_arch_output_basic_block, mono_arch_emit_prolog):
10425         Likewise.
10426         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
10427         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
10428         mono_arch_output_basic_block): Likewise.
10429         (inst_list_prepend, insert_after_ins): Delete.
10430         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
10431         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
10432         instruction lists.
10433         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
10434         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
10435         mono_arch_emit_prolog): Likewise.
10436         * cfold.c (mono_constant_fold): Likewise.
10437         * liveness.c (visit_bb, mono_analyze_liveness,
10438         optimize_initlocals): Likewise.
10439         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
10440         * graph.c (mono_draw_code_cfg): Likewise.
10441         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
10442         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
10443         mono_ssa_cprop): Likewise.
10444         * abcremoval (get_relations_from_previous_bb, process_block):
10445         Likewise.
10446         * local-propagation (mono_cprop_invalidate_values,
10447         mono_local_cprop_bb): Likewise.
10448         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
10449         peephole_pass, mono_arch_output_basic_block,
10450         mono_arch_emit_prolog): Likewise.
10451         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
10452         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
10453         mono_arch_emit_prolog): Likewise.
10454         (insert_after_ins): Delete.
10455         * aliasing.c (print_code_with_aliasing_information,
10456         mono_build_aliasing_information, mono_aliasing_deadce):
10457         Convert to new instruction lists.
10458         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
10459         peephole_pass, NEW_INS, mono_arch_lowering_pass,
10460         mono_arch_local_regalloc, mono_arch_output_basic_block):
10461         Likewise.
10462         (insert_after_ins): Delete.
10463         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
10464         peephole_pass, mono_arch_output_basic_block): Convert to
10465         new instruction lists.
10466         * mini-codegen (InstList, inst_list_prepend,
10467         insert_after_ins): Delete.
10468         (insert_before_ins, get_register_force_spilling,
10469         get_register_spilling, free_up_ireg, free_up_reg,
10470         create_copy_ins, create_spilled_store, alloc_int_reg,
10471         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
10472         to new instruction lists.
10473         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
10474         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
10475         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
10476         (insert_after_ins): Delete.
10477         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
10478         mono_arch_local_regalloc, mono_arch_output_basic_block,
10479         mono_arch_call_opcode): Convert to new instruction lists.
10480         (insert_after_ins): Delete.
10481         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
10482         peephole_pass, mono_arch_output_basic_block,
10483         mono_arch_emit_prolog): Convert to new instruction lists.
10484
10485 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
10486
10487         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
10488
10489         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
10490         Fixes #353182.
10491
10492         * Makefile.am (version.h): Make this work with non-bash shells.
10493
10494 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
10495
10496         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
10497
10498 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
10499
10500         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
10501         the InitializeArray optimization.
10502
10503 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
10504
10505         * mini.c driver.c: Don't include os/gc_wrapper.h.
10506
10507 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
10508
10509         * mini.c (print_jit_stats): Print GC statistics if available.
10510
10511 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
10512
10513         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
10514
10515 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
10516
10517         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
10518
10519 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
10520
10521         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
10522         
10523         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
10524
10525         * driver.c (mono_main): Ditto.
10526
10527 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
10528
10529         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
10530
10531         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
10532         in the vtable can't be encoded.
10533         (compile_method): Ditto.
10534
10535 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
10536
10537         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
10538         defined.
10539
10540         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
10541         lmf->rbp.
10542
10543         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
10544         the top LMF entry belongs to the current method.
10545
10546         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
10547
10548 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
10549
10550         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
10551         
10552         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
10553
10554         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
10555
10556         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
10557
10558         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
10559
10560         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
10561         implementation.
10562
10563         * basic-float.cs: Add an ulong->double cast test.
10564
10565 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
10566
10567         * mini.c (mono_method_to_ir): Fix a warning.
10568
10569 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
10570
10571         * mini-ops.h: Add OP_SWITCH.
10572
10573         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
10574         CEE_SWITCH in back-end code, use OP_SWITCH instead.
10575
10576 2007-12-11  Geoff Norton  <gnorton@novell.com>
10577
10578         * mini-s390x.c: Minor change to the MAX() define to allow
10579         it to compile with other gcc versions.
10580
10581 2007-12-11  Geoff Norton  <gnorton@novell.com>
10582
10583         * cpu-s390x.md:
10584         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
10585
10586 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
10587
10588         exceptions-arm.c (mono_arch_get_restore_context): Restore
10589         the frame pointer.
10590
10591         exceptions-arm.c (throw_exception): Save the frame pointer.
10592         This is a partial fix for #323747. Only the client side is
10593         fixed.
10594
10595 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
10596
10597         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
10598         was using an unrelated variable to log the class which
10599         needed the cctor to be called. This was crashing on arm.
10600
10601 2007-12-09  Robert Jordan  <robertj@gmx.net>
10602
10603         * mini-x86.c (mono_arch_emit_epilog):
10604         Consider all kinds of 64-bit types. Fixes #323114.
10605
10606 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
10607
10608         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
10609
10610 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
10611
10612         * mini-amd64.c (peephole_pass): Add a missing instruction check.
10613
10614 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
10615
10616         * mini.c: run type ctor before allocating an object, not only
10617         when running it's constructor method (fixes at least part of bug #342507).
10618
10619 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
10620         
10621         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
10622         
10623         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
10624         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
10625         function.
10626
10627         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
10628         mono_generic_class_init_trampoline () the same as it is done with the other
10629         trampolines.
10630
10631         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
10632         aot-runtime.c aot-compiler.c: Implement AOT support.    
10633
10634 2007-12-07  Mark Probst  <mark.probst@gmail.com>
10635
10636         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
10637         build for archs which don't have the vtable trampoline defined
10638         yet.
10639
10640 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
10641
10642         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
10643
10644         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
10645
10646         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
10647
10648         * tramp-<ARCH>.c: Use the new helper function.
10649
10650 2007-12-07  Mark Probst  <mark.probst@gmail.com>
10651
10652         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
10653         trampoline call, which takes a vtable argument.
10654
10655         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
10656         OP_TRAMPCALL_VTABLEs like other calls.
10657
10658         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
10659         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
10660         call.  Implemented a support function which fetches the vtable
10661         from a register set.
10662
10663         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
10664         Implemented a generic class init trampoline, using the
10665         OP_TRAMPCALL_VTABLE opcode.
10666
10667         * mini.c: Implemented static field access when sharing generic
10668         code.  This implies initing the class using the new
10669         OP_TRAMPCALL_VTABLE call.
10670
10671 2007-12-07  Mark Probst  <mark.probst@gmail.com>
10672
10673         * mini.c: Don't compile methods with sharing enabled if their
10674         classes are disabled for sharing.
10675
10676 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
10677
10678         * inssel.brg: Add a missing sign extension to the GETCHR and array access
10679         opcodes. Fixes #346563.
10680
10681         * objects.cs: Add a new test.
10682
10683         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
10684
10685         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
10686         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
10687
10688 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
10689
10690         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
10691
10692 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
10693
10694         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
10695         code stream.
10696
10697 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
10698
10699         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
10700
10701         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
10702         optimization in the AOT case.
10703         
10704 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
10705
10706         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
10707         
10708         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
10709
10710         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
10711
10712         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
10713
10714         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
10715         is created by the inlined delegate ctor.
10716
10717         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
10718
10719         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
10720
10721 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
10722
10723         * cpu-x86.md: Fix the length of ckfinite.
10724
10725 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
10726
10727         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
10728         
10729         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
10730         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
10731
10732         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
10733
10734         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
10735         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
10736
10737 2007-11-28  Martin Baulig  <martin@ximian.com>
10738
10739         * mini-x86.c
10740         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
10741         after creating the trampoline.
10742
10743 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
10744
10745         * aot-runtime.c (load_aot_module): Check runtime version if needed.
10746
10747         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
10748         the same version.
10749
10750         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
10751         instead of the calling method to help AOT.
10752
10753         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
10754
10755 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
10756
10757         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
10758         is defined.
10759
10760 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
10761
10762         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
10763         
10764         * aot-compiler.c (compile_method): Correct check for generic method definitions.
10765         (encode_method_ref): No need to handle generic method definitions specially.
10766
10767         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
10768
10769         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
10770         decode_klass_info.
10771
10772         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
10773         encode_klass_info.
10774         (compile_method): Enable generic sharing.
10775
10776 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
10777
10778         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
10779         (mini_method_compile): Add preliminary support for AOTing shared generic code.
10780
10781         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
10782         generic code.
10783
10784         * mini-trampolines.c: Fix a warning.
10785
10786         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
10787         NEW_PCONST.
10788         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
10789         (generic_class_is_reference_type): Remove unused function.
10790
10791         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
10792         in the generic vtable trampoline case.
10793
10794         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
10795         
10796         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
10797         return an AOT method based on a vtable slot.
10798
10799         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
10800
10801         * mini.c (mini_get_vtable_trampoline): Export this.
10802
10803 2007-11-22  Martin Baulig  <martin@ximian.com>
10804
10805         * debug-debugger.h
10806         (MonoDebuggerInfo): Move `debugger_version' up.
10807
10808 2007-11-22  Martin Baulig  <martin@ximian.com>
10809
10810         * mini-amd64.c
10811         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
10812
10813         * mini-trampolines.c
10814         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
10815         after compiling the method.
10816
10817 2007-11-20  Martin Baulig  <martin@ximian.com>
10818
10819         * debug-mini.c
10820         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
10821         (mono_debugger_remove_breakpoint): Likewise.
10822         (mono_debugger_check_breakpoints): Likewise.
10823
10824         * debug-debugger.c: Implement the new breakpoint interface here.
10825
10826 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
10827
10828         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
10829         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
10830
10831         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
10832
10833 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
10834
10835         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
10836
10837         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
10838         mini.c.
10839
10840         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
10841         mini.c.
10842
10843         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
10844         returning a vtype in a register.
10845
10846         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
10847         here from the arch specific code.
10848
10849         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
10850         mini.c.
10851
10852         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
10853         (mono_arch_emit_prolog): Increment maximum prolog size.
10854
10855         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
10856         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
10857
10858         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
10859         MonoGenericSharingContext.
10860
10861         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
10862         MonoGenericSharingContext. Allocate memory from the cfg mempool.
10863
10864 2007-11-15  Mark Probst  <mark.probst@gmail.com>
10865
10866         * mini.c, mini.h, generic-sharing.c: Functions for producing code
10867         which extract fields out of the runtime generic context.  Full
10868         sharing of the NEWARR opcode.
10869
10870 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
10871
10872         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
10873         --enable-minimal=ssa.
10874
10875 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
10876
10877         * mini-trampolines.c (mono_delegate_trampoline): Update after 
10878         mono_marshal_get_delegate_invoke () signature change.
10879
10880 2007-11-13  Mark Probst  <mark.probst@gmail.com>
10881
10882         * mini.c: Removed the shared context in favor of the generic
10883         sharing context.  Allocate the MonoJitInfo structure with room for
10884         the generic sharing context if it's needed.
10885
10886         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
10887         domain-internals.h now.
10888
10889         * mini-x86.c: Pass the generic sharing context to get_call_info ().
10890
10891         * generic-sharing.c: Several changes for working without a shared
10892         context and instead operating on open types instead.
10893
10894 2007-11-12  David S. Miller  <davem@davemloft.net>
10895
10896        * inssel-sparc.brg: Fix double instruction emit.
10897
10898 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
10899
10900         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
10901         Get/Set/Address methods.
10902         
10903         * mini.c debug-debugger.c mini-trampolines.c: Update after 
10904         mono_marshal_get_delegate_invoke signature change.
10905
10906 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
10907
10908         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
10909         This can happens with dynamic methods. Fixes the other bug in #322722.
10910
10911 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
10912
10913         * tramp-arm.c (mono_arch_patch_callsite): Support patching
10914         BX call sequence.
10915
10916         * mini-arm.c (arm_patch): Implement patching of BX call
10917         sequence. Fixes one of the bugs in #322722.
10918
10919 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
10920
10921        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
10922        under Linux.  We only need to flush every 32-byte cache line.    
10923
10924 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
10925
10926         * mini.c:
10927         move_basic_block_to_end: Add branches when needed, eventually creating
10928         a new BB.
10929         optimize_branches: added a parameter that tells if it's ok to create
10930         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
10931         and avoid calling move_basic_block_to_end when it's not ok.
10932         Fixes bug 318677.
10933
10934 2007-11-07  Mark Probst  <mark.probst@gmail.com>
10935
10936         * mini.c: Abort inlining call to InitializeArray if something
10937         looks wrong.  Let the icall handle it, which now has proper safety
10938         checks.
10939
10940 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
10941
10942         * mini.c (mono_spill_call): add support for soft-float.
10943
10944         * mini.c (mono_method_to_ir): add support for soft-float
10945         to inlined functions that return float.
10946
10947         * mini.c (mono_method_to_ir): add support for soft-float
10948         to cee_stsfld opcode on float fields.
10949
10950 2007-11-05  Geoff Norton  <gnorton@novell.com>
10951
10952         * mini-x86.h: Fix the structure access for X86 Leopard.
10953
10954
10955 2007-11-05  Martin Baulig  <martin@ximian.com>
10956
10957         * mini-trampolines.c
10958         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
10959         after compiling the method to notify the debugger.
10960
10961 2007-11-05  Martin Baulig  <martin@ximian.com>
10962
10963         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
10964
10965 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
10966
10967         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
10968         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
10969
10970 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
10971
10972         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
10973         native-to-managed wrappers.
10974         
10975 2007-11-01  Geoff Norton  <gnorton@novell.com>
10976
10977         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
10978         members.
10979
10980 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
10981
10982         * mini.c, mini-x86.c: when getting back from unmanaged code
10983         to managed via a marshaled delegate we also need to set the
10984         right domain.
10985
10986 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
10987
10988         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
10989         for amd64.
10990
10991 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
10992
10993         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
10994         let the debugger or other external agents to tell the JIT when
10995         a sw breakpoint has been inserted in the code that the JIT needs
10996         to be able to inspect.
10997
10998 2007-10-31  Martin Baulig  <martin@ximian.com>
10999
11000         * debug-debugger.h
11001         (MonoDebuggerInfo): Remove `runtime_class_init'.
11002
11003 2007-10-30  Martin Baulig  <martin@ximian.com>
11004
11005         * debug-mini.h
11006         (mono_debugger_thread_created): Added `MonoThread *' argument.
11007         (mono_debugger_extended_notification): New public method.
11008         (mono_debugger_trampoline_compiled): New public method.
11009
11010         * debug-mini.c
11011         (MonoDebuggerThreadInfo): Added `thread' and
11012         `extended_notifications' fields.
11013
11014         * debug-debugger.c
11015         (debugger_executable_code_buffer): New static variable.
11016
11017         * debug-debugger.h
11018         (MonoDebuggerInfo): Added `executable_code_buffer',
11019         `executable_code_buffer_size', `breakpoint_info_area',
11020         `breakpoint_table' and `breakpoint_table_size'.
11021
11022 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
11023
11024         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
11025         that IP  either is an unused value or the vtable pointer. IMT 
11026         calls use vtable + offset now. Reduced by almost half the size
11027         of IMT entries.
11028
11029 2007-10-26  Jonathan Chambers <joncham@gmail.com>
11030
11031         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
11032         defines to access param registers. Replace long usage with
11033         gsize as sizeof(long) != sizeof(void*) on Win64.
11034
11035         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
11036         on Win64. Fix intrinsic, use _AddressOfReturnAddress
11037         instead of non-existant _GetAddressOfReturnAddress.
11038
11039         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
11040         param registers. Save/restore %rdi and %rsi in MonoLMF.
11041
11042         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
11043         param registers. Modify (throw_exception) signature to take 
11044         %rdi and %rsi on Win64. 
11045
11046         Code is contributed under MIT/X11 license.
11047
11048 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
11049
11050         * helpers.c: unlink debugging output files.
11051
11052 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
11053
11054         * mini.c: Move mono_create_ftnptr () to object.c.
11055
11056 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
11057
11058         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
11059         optional. This function can now be used to disassemble code generated
11060         outside the JIT such as trampolines and IMT thunks.
11061
11062         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
11063
11064         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
11065         vtable pointer from a ldr instruction.
11066
11067         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
11068         new IMT call sequence.
11069
11070         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
11071         call sequence for interface invocations.
11072
11073         * mini-arm.c (mono_arch_emit_imt_argument): added, required
11074         for imt support. This function is empty since IMT on ARM requires no
11075         special handling on the IR side.
11076
11077         * mini-arm.c (mono_arch_find_imt_method): added, required for
11078         imt support.
11079
11080         * mini-arm.c (mono_arch_find_this_argument): added, required
11081         for imt support.
11082
11083         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
11084         a ldr instruction to load a value stored in the code stream.
11085
11086         * mini-arm.c (mono_arch_build_imt_thunk):added, required
11087         for imt support.
11088
11089
11090 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
11091
11092         * mini.c (mini_init): Install the jump trampoline callback.
11093
11094 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
11095
11096         * mini-trampolines.c: handle synchronized methods with the common
11097         vtable trampoline (bug #335601).
11098
11099 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
11100
11101         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
11102
11103         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
11104         64 bit platforms.
11105
11106         * mini-ia64.h mini-ia64.c: Add support for IMT.
11107
11108         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
11109         prolog. Fixes #331958.
11110
11111 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
11112
11113         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
11114
11115 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
11116
11117         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
11118         trampoline.
11119
11120 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
11121
11122         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
11123         trampoline.
11124
11125 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
11126
11127         * mini-x86.c, mini-x86.h: x86 support for the common vtable
11128         trampoline.
11129
11130 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
11131
11132         * mini-trampolines.c: changed the magic rampoline to understand
11133         the common vtable trampoline method: the method to invoke is
11134         determined by the vtable displacement of the call.
11135
11136 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
11137
11138         * mini.c, mini.h: register the common vtable trampoline if the
11139         architecture supports it.
11140
11141 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
11142
11143         * cpu-amd64.md: use the correct max length for tls_get.
11144
11145 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
11146
11147         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
11148         CEE_STELEM_ANY. Fixes #333696.
11149
11150 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
11151
11152         * exceptions-x86.c: provide more graceful handling of the case where
11153         we followed a bogus function pointer from managed code (bug #332866).
11154
11155 2007-10-11  Mark Probst  <mark.probst@gmail.com>
11156
11157         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
11158         replaces the generic_shared flag and will carry more information
11159         in the future.
11160
11161         * generic-sharing.c: Added mini_type_stack_size() which allows
11162         allows open types if given a generic sharing context.
11163         mini_get_basic_type_from_generic() takes a
11164         MonoGenericSharingContext* instead of a MonoCompile* now.
11165
11166         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
11167         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
11168         mini-sparc.c, mini-x86.c: Trivial changes required by the two
11169         changes above.  Just passing arguments through to the right
11170         places.
11171
11172 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
11173
11174         * mini-arm.c: unify the call emission to emit_code_seq().
11175
11176 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
11177
11178         * tramp-arm.c: reduced the trampoline size.
11179
11180 2007-10-10  Mark Probst  <mark.probst@gmail.com>
11181
11182         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
11183         variable handling out of arch-specific code.
11184
11185 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
11186
11187         * mini-arm.c: implemented fast delegate dispatch.
11188
11189 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
11190
11191         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
11192         that fp elimination is turned off if the space required by locals is too
11193         big. Fixes #331958.
11194
11195 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
11196
11197         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
11198         ARM to the new style trampoline.
11199
11200 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
11201
11202         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
11203
11204         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
11205
11206 2007-10-09  Martin Baulig  <martin@ximian.com>
11207
11208         * debug-debugger.h
11209         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
11210         `field_info_offset_offset'.     
11211
11212 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
11213
11214         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
11215         removed more internal usage of the r11 register and made it available
11216         to the register allocator.
11217
11218 2007-10-08  Mark Probst  <mark.probst@gmail.com>
11219
11220         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
11221         when sharing generics and treat type variables as references.
11222
11223 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
11224
11225         * mini-ppc.c: started removing the internal uses of register r11
11226         to eventually allow the register allocator to manage it as an
11227         additional available register.
11228
11229 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
11230
11231         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
11232
11233 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
11234
11235         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
11236         specific trampolines as they are not performance critical as a jump
11237         target (maybe align as before only for AOT code?). This saves about
11238         200 KB of native code on x86 for monodevelop startup.
11239
11240 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
11241
11242         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
11243         monodevelop startup.
11244
11245 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
11246
11247         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
11248
11249         * mini-sparc.h mini-sparc.c: Implement IMT support.
11250
11251         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
11252         its smaller and doesn't clobber sparc_g1.
11253
11254         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
11255
11256 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
11257
11258         * mini-ppc.c: optimized the size of the IMT thunks a bit.
11259
11260 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
11261
11262         * mini-ppc.c: implemented fast delegate invocation.
11263
11264 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
11265
11266         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
11267
11268 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
11269
11270         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
11271         code to the new style trampoline in preparation for IMT support.
11272
11273 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
11274
11275         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
11276         systems already. This also reduces the specific trampiline sizes and
11277         prepares for the use of r12 as the IMT identifier register.
11278
11279 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
11280
11281         * mini-mips.h: endianess fix (simplified from a patch by
11282         Thomas Kunze <thommy@tabao.de>, bug #323737).
11283
11284 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
11285
11286         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
11287         to access ucontext fields and enable netbsd support
11288         (partially from Magnus Henoch <mange@freemail.hu>).
11289
11290 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
11291
11292         * genmdesc.pl: patch from Henryk Plotz <henryk@openmoko.org> to
11293         use the preprocessor from the CPP env var if it is set.
11294
11295 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
11296
11297         * mini-trampolines.c: fixed an assertion and moved it earlier in the
11298         code, before interface_offset gets used.
11299
11300 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
11301
11302         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
11303         mono_class_setup_vtable () before accessing klass->vtable.
11304
11305 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
11306
11307         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
11308         hackish.
11309
11310 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
11311
11312         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
11313         IMT slots (this saves hundreds of KB of memory in programs like
11314         IronPython and Monodevelop).
11315
11316 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
11317
11318         * mini.c: print the delegate counter.
11319
11320 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
11321
11322         * mini-x86.c: make it easier to enable the debugging code for IMT
11323         slots.
11324
11325 2007-09-28  Martin Baulig  <martin@ximian.com>
11326
11327         * debug-debugger.h
11328         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
11329         `mono_method_klass_offset' and `mono_method_token_offset'.
11330
11331 2007-09-20  Mark Probst  <mark.probst@gmail.com>
11332
11333         * mini.c: First generics sharing implementation.  Can only share
11334         in very simple cases.  If sharing doesn't work it falls back to
11335         dedicated compilation.
11336
11337         * mini.h: Flag in MonoCompile to specify whether generic
11338         compilation is shared.  Flags enum for marking which generic inst
11339         of a context is used.  Prototypes for helper functions.
11340
11341         * generic-sharing.c: Helper functions for generic method sharing.
11342
11343         * optflags-def.h: Optimization flag (gshared) for enabling generic
11344         method sharing added.
11345
11346         * Makefile.am: generic-sharing.c added.
11347
11348 2007-09-19 Daniel Nauck <dna@mono-project.de>
11349
11350         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
11351
11352 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
11353         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
11354         fixes bug 325507.
11355
11356 2007-09-19  Martin Baulig  <martin@ximian.com>
11357
11358         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
11359         mono_debug_cleanup() is now part of mono_cleanup().
11360
11361 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
11362
11363         * driver.c (mono_main): Fix a warning.
11364
11365 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
11366
11367         * aot-compiler.c: Optimize various parts when processing large assemblies.
11368         Fixes ##325568.
11369
11370         * mini.c (mono_patch_info_hash): Improve hash function.
11371
11372 2007-09-14  Jonathan Chambers <joncham@gmail.com>
11373
11374         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
11375         
11376         Code is contributed under MIT/X11 license.
11377
11378 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
11379
11380         * mini.c (mini_init): Fix a leak.
11381
11382         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
11383
11384 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
11385
11386         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
11387
11388 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
11389
11390         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
11391
11392 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
11393
11394         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
11395         variance tests.
11396
11397         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
11398
11399         * mini.c (handle_alloc): Enable managed allocators in AOT code.
11400
11401         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
11402
11403         * aot-runtime.c (decode_patch_info): Ditto.
11404
11405 2007-09-12  Jonathan Chambers <joncham@gmail.com>
11406
11407         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
11408         static case. Cache delegates in architecture specific code, 
11409         based on number of parameters.
11410         
11411         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
11412         in architecture specific code, based on number of parameters.
11413         
11414         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
11415         caching happen in architecture specific code now.
11416         
11417         Code is contributed under MIT/X11 license.
11418
11419 2007-09-12  Jonathan Chambers <joncham@gmail.com>
11420
11421         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
11422         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
11423         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
11424
11425         Code is contributed under MIT/X11 license.
11426
11427 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
11428         * mini.c: (mono_thread_abort) Fixed bug #82416.
11429
11430 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
11431
11432         * mini.: hook the new managed GC allocation feature into the JIT.
11433
11434 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
11435
11436         * mini.c: implementation for the new runtime tls opcode.
11437
11438 2007-09-11  Martin Baulig  <martin@ximian.com>
11439
11440         * debug-debugger.h
11441         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
11442         `mono_method_inflated_offset'.
11443
11444 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
11445
11446         * driver.c mini.h mini.c: Add a new devel command line option for injecting
11447         async exceptions into a method.
11448
11449         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
11450         purpose of testing whenever the unwinder works at every instruction.
11451
11452 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
11453
11454         * mini.c: check accessibility of method used in ldftn (fixes
11455         bug #82635).
11456
11457 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
11458
11459         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
11460
11461         * inssel.brg: Fix a warning.
11462
11463 2007-09-03  Martin Baulig  <martin@ximian.com>
11464
11465         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
11466         now takes the `main_method' as argument.
11467
11468 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
11469
11470         * cpu-sparc.md (endfilter): Add missing src1:i argument.
11471
11472 2007-08-30  Jonathan Chambers <joncham@gmail.com>
11473
11474         * driver.c: include the cil-coff.h header on Windows.
11475         
11476         Code is contributed under MIT/X11 license.
11477
11478 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
11479
11480         * mini.c, driver.c: don't include the cil-coff.h header.
11481
11482 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
11483
11484         * mini.c: flag places that needs fixes fo soft-float support.
11485
11486 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
11487
11488         * mini.h, inssel-float.brg: fix soft-float constant loads on big
11489         endian systems (partially from Dean Jenkins, bug #81924).
11490
11491 2007-08-28  Mark Probst  <mark.probst@gmail.com>
11492
11493         * mini.c (check_linkdemand): Remove embedded reference object in
11494         call to LinkDemandSecurityException.
11495         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
11496         with an IntPtr instead of a reference object.
11497
11498 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
11499
11500         * mini.c (handle_initobj): Handle alignment properly.
11501
11502         * inssel.brg (mini_emit_memset): Ditto. 
11503
11504         * inssel.brg (mini_emit_memcpy): Ditto. 
11505
11506         * inssel-sparc.brg: Ditto.              
11507
11508         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
11509
11510 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
11511
11512         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
11513         exceptions raised in unmanaged code. Fixes part of #82594.
11514
11515 2007-08-24  Mark Probst  <mark.probst@gmail.com>
11516
11517         * mini.c (mono_method_to_ir), declsec.c
11518         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
11519
11520 2007-08-22  Martin Baulig  <martin@ximian.com>
11521
11522         * debug-mini.h
11523         (MonoDebuggerThreadInfo): New typedef.
11524         (mono_debugger_thread_table): New global variable.
11525         (mono_debugger_thread_created): New public function.
11526         (mono_debugger_thread_cleanup): New public function.
11527
11528         * debug-debugger.h
11529         (MonoDebuggerInfo):
11530         - removed `get_current_thread' and `lookup_assembly'.
11531         - removed `data_table'.
11532         - added `thread_table'.
11533
11534         * mini.c
11535         (mono_thread_start_cb): Call mono_debugger_thread_created().
11536         (mono_thread_attach_cb): Likewise.
11537         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
11538         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
11539         initial domain.
11540
11541         * driver.c (mono_main): Move mono_debug_init() up, before calling
11542         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
11543
11544 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
11545
11546         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
11547         together when passing several arguments of type double (gives a small
11548         speedup and saves a few bytes of generated code).
11549
11550 2007-08-20  Jb Evain  <jbevain@novell.com>
11551
11552         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
11553
11554 2007-08-20  Jb Evain  <jbevain@novell.com>
11555
11556         * mini.c (mono_method_to_ir): throw MethodAccessException
11557         and FieldAccessException instead of InvalidProgramException.
11558
11559 2007-08-20  Mark Probst  <mark.probst@gmail.com>
11560
11561         * mini.c: CoreCLR security checks.
11562
11563         * mini.h: Removed MonoSecurityMode (moved to
11564         metadata/security-manager.h) and mono_security_mode global var
11565         (replaced by set/get functions in security-manager.h).
11566
11567         * driver.c: Added "core-clr-test" security mode for testing.  Used
11568         set-function for setting security mode.
11569
11570 2007-08-17  Mark Probst  <mark.probst@gmail.com>
11571
11572         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
11573         the new jit_info_table.
11574
11575         * driver.c: Test code for the new jit_info_table (enabled by the
11576         define MONO_JIT_INFO_TABLE_TEST).
11577
11578 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
11579
11580         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
11581         detection of call <REG> instruction sequence. Fixes build on freebsd.
11582
11583 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
11584
11585         * mini-exceptions.c: Fix a warning.
11586
11587 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
11588
11589         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
11590         stack overflow handling code on amd64 too.
11591
11592         * mini-exceptions.c (mono_setup_altstack): Make this use 
11593         mono_thread_get_stack_bounds ().
11594
11595         * mini-x86.h: Disable sigaltstack on solaris x86.
11596
11597 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
11598
11599         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
11600
11601 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
11602
11603         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
11604
11605 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
11606
11607         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
11608
11609         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
11610
11611 2007-08-03  Neale Ferguson <neale@sinenomine.net>
11612
11613         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
11614         due to alignment.
11615
11616 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
11617
11618         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
11619         to be emitted (bug #82281).
11620
11621 2007-08-01  Martin Baulig  <martin@ximian.com>
11622
11623         Merged the `debugger-dublin' branch.
11624
11625         * debug-debugger.h (MonoDebuggerInfo):
11626         Removed the `old_*' compatibility entries.
11627         Added `debugger_version' and `data_table'.
11628         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
11629         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
11630
11631         * debug-mini.c
11632         (MiniDebugMethodBreakpointInfo): Add `address_list'.
11633         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
11634         instead of a `gconstpointer'.
11635         (mono_debugger_insert_method_breakpoint): Return a
11636         `MonoDebugMethodAddressList *'.
11637
11638 2007-06-28  Martin Baulig  <martin@ximian.com>
11639
11640         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
11641
11642 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
11643
11644         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
11645         __builtin_frame_address () since it is broken on older gcc versions.
11646
11647 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
11648
11649         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
11650         on the stack overflow handling and made the managed stack overflows
11651         catchable in most cases using soft guard pages.
11652         * exceptions-x86.c: added code to restore the protection in the soft
11653         guard pages at the end of exception handling.
11654
11655 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
11656
11657         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
11658
11659 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
11660
11661         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
11662         exception handling.
11663
11664 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
11665
11666         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
11667         signal handling support until it has been ported to the new mechanism.
11668         * mini.c: fixed stack overflow detection and use the new
11669         architecture code  to handle signals on the altstack.
11670
11671 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
11672
11673         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
11674         stack overflows on the alt stack.
11675
11676 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
11677
11678         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
11679         stack overflows on the alt stack.
11680
11681 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
11682
11683         * exceptions-ppc.c: cleanup preparing for altstack support.
11684
11685 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
11686
11687         * exceptions-arm.c: cleanup preparing for altstack support.
11688
11689 2007-07-27  Mark Probst  <mark.probst@gmail.com>
11690
11691         * mini.c (print_jit_stats): Output hazard pointer stats.
11692
11693 2007-07-26  Mark Probst  <mark.probst@gmail.com>
11694
11695         * driver.c, mini.c: Replaced security mode flags with a single
11696         enum variable.
11697
11698 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
11699
11700         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
11701
11702 2007-07-25  Mark Probst  <mark.probst@gmail.com>
11703
11704         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
11705         (which doesn't do anything yet) for activating Core CLR
11706         (Silverlight) security.
11707
11708 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
11709
11710         * mini-codegen.c: work around a possible gcc bug on arm.
11711
11712 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
11713
11714         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
11715         message for platforms that don't support AOT compilation.
11716
11717 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
11718
11719         * mini.h, mini.c, driver.c: temporary smcs hack.
11720
11721 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
11722
11723         * mini-arm.h, mini-arm.c: arm EABI fixes.
11724
11725 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
11726
11727         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
11728         case.
11729
11730         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
11731         trampolines taking a method argument.
11732
11733         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
11734
11735         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
11736         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
11737
11738         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
11739         JIT compilation throws an exception. Fixes #82050.
11740
11741 2007-07-19  Mark Probst  <mark.probst@gmail.com>
11742
11743         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
11744         with the MONO_EXCEPTION_ defines.
11745
11746 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
11747
11748         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
11749         #82117.
11750         
11751         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
11752         the cause of an assertion.
11753
11754 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
11755
11756         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
11757         removed.
11758
11759 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
11760
11761         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
11762         assert. Should fix #82103.
11763
11764 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
11765
11766         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
11767         here too. Fixes #82095.
11768
11769         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
11770         addresses.
11771
11772         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
11773
11774         * mini-amd64.h: Enable IMT for amd64.
11775         
11776         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
11777
11778 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
11779
11780         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
11781
11782 2007-07-12  Mark Probst  <mark.probst@gmail.com>
11783
11784         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
11785         as soon as check_linkdemand sets an exception_type.
11786
11787 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
11788
11789         * mini-x86.c: fixed offsets for IMT call sequence.
11790         * mini-x86.h: enable IMT again.
11791
11792 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
11793
11794         * trace.c (mono_trace_enter_method): Decode MonoType too.
11795
11796         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
11797
11798         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
11799
11800         * mini-amd64.c: Add preliminary IMT implementation.
11801         
11802 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
11803
11804         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
11805         understand the new IMT-base interface invocation (thanks to
11806         Daniel Nauck for the report and the remote debugging session).
11807
11808 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
11809
11810         * mini-x86.c: size and speed optimizations for the IMT bsearch.
11811
11812 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
11813
11814         * Makefile.am (aotcheck): Make this actually use the AOTed code.
11815
11816 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
11817
11818         * mini-trampolines.c: implement AOT IMT support.
11819         * mini-x86.h: enable IMT support for wider testing.
11820
11821 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
11822
11823         * inssel.brg (emit_imt_argument): Add aot support here.
11824
11825         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
11826
11827 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
11828
11829         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
11830         of the IMT implementation, partially from massi, with my
11831         implementation of the bsearch sequence. Disabled by default until
11832         the AOT code is implemented.
11833
11834 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
11835
11836         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
11837
11838         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
11839
11840 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
11841
11842         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
11843         arch-independent IMT JIT code from Massimiliano
11844         Mantione (massi@ximian.com) with small cleanups from me.
11845
11846 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
11847
11848         * Makefile.am: fix svn invocation to get the svn revision to be
11849         independent of the local language (build fix).
11850
11851 2007-07-09  Mark Probst  <mark.probst@gmail.com>
11852
11853         * mini.c (inline_method): Reset cfg->exception_type if the
11854         inlining is aborted.  Fixes: 82049.
11855
11856 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
11857
11858         * mini.c: remove assert from exception handling code when exception_ptr
11859         is not set.
11860
11861 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
11862
11863         * mini.c (mono_codegen): Add an assert.
11864
11865         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
11866         enter and leave code.
11867         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
11868
11869 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
11870
11871         * mini-ppc.c: fixed memory corruption for localloc(0)
11872         (bug #81852).
11873
11874 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
11875         
11876         * mini.c: Fix warnings.
11877
11878 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
11879
11880         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
11881         to emit better double->int conversions.
11882
11883 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
11884
11885         * mini.c: the provided Min/Max optimizations are valid for unisgned
11886         ints.
11887
11888 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
11889
11890         * 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
11891
11892 2007-06-28  Miguel de Icaza  <miguel@novell.com>
11893
11894         * mini.c (mono_running_on_valgrind): Add support for reporting the
11895         method and  its boundaries to valgrind.
11896
11897 2007-06-28  Martin Baulig  <martin@ximian.com>
11898
11899         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
11900
11901 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
11902
11903         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
11904
11905         * generic.2.cs: Add new test case.
11906
11907 2007-06-25  Martin Baulig  <martin@ximian.com>
11908
11909         Merged the `debugger-dublin' branch.
11910
11911         * debug-mini.c
11912         (mono_debugger_insert_method_breakpoint): New public method.
11913         (mono_debugger_remove_method_breakpoint): Likewise.
11914         (mono_debugger_check_breakpoints): New static method.
11915         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
11916
11917         * debug-debugger.h (MonoDebuggerInfo):
11918         Renamed (to keep backward compatibility in the vtable):
11919         `insert_breakpoint' -> `old_insert_breakpoint'.
11920         `remove_breakpoint' -> `old_remove_breakpoint'.
11921         `create_string' -> `old_create_string'.
11922         `lookup_class' -> `old_lookup_class'.
11923         `lookup_type' -> removed; changed into a dummy field.
11924         `lookup_assembly' -> `old_lookup_assembly'.
11925         Added (same functionality, but different signature):
11926         `create_string', `lookup_class', `lookup_assembly'
11927         Added new:
11928         `get_method_addr_or_bpt', `remove_method_breakpoint',
11929         `runtime_class_init'.
11930
11931         * debug-debugger.c: Merged the `debugger-dublin' branch.
11932
11933 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
11934
11935         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
11936         well.
11937         (peephole_pass): Likewise.
11938
11939 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
11940
11941         * driver.c: hopefully make setaffinity work also for ancient
11942         versions of linux.
11943
11944 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
11945
11946         * driver.c : win32 build fix.
11947
11948 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
11949
11950         * driver.c: check for the MONO_NO_SMP env var and bind to a single
11951         processor if it is set.
11952
11953 2007-06-21  Martin Baulig  <martin@ximian.com>
11954
11955         * debug-mini.h: New file.
11956
11957         * debug-mini.c
11958         (mono_debugger_insert_breakpoint_full): Moved here from
11959         ../metadata/mono-debug-debugger.c.
11960         (mono_debugger_remove_breakpoint): Likewise.
11961         (mono_debugger_breakpoint_callback): Likewise.
11962
11963 2007-06-15  Raja R Harinath  <rharinath@novell.com>
11964
11965         * jit-icalls.c (mono_helper_compile_generic_method): Update to
11966         changes in MonoGenericClass.
11967
11968 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
11969
11970         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
11971
11972 2007-06-14  Raja R Harinath  <rharinath@novell.com>
11973
11974         * jit-icalls.c (mono_helper_compile_generic_method): Update to
11975         removal of MonoGenericMethod.
11976
11977 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
11978
11979         * mini-exceptions.c: hooks for the exception events profiling API.
11980
11981 2007-06-14  Randolph Chung  <tausq@debian.org>
11982
11983         * Makefile.ma: Add hppa target.
11984         * mini-arch.h: Include mini-hppa.h
11985         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
11986         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
11987         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
11988
11989 2007-06-14  Randolph Chung  <tausq@debian.org>
11990
11991         * inssel.brg: Add rules for "chained" compare-branch operations so that
11992         a single compare op can affect multiple branches.  Adjust cost for
11993         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
11994         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
11995         cost for some rules so that they can more easily be overridden by
11996         per-arch rules (with fixes from lupus).
11997         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
11998
11999 2007-06-13  Randolph Chung  <tausq@debian.org>
12000
12001         * mini-ops.h: Reorder branch ops so that they match the order of the
12002         corresponding CEE_* ops.  The code expects them this way.
12003         Add new ops for HPPA target.
12004         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
12005
12006 2007-06-13  Randolph Chung  <tausq@debian.org>
12007
12008         * mini-exceptions.c: Handle cases where the stack grows towards
12009         larger addresses.
12010         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
12011
12012 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
12013
12014         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
12015         counter.
12016         * driver.c: explain where a non-matching corlib is found.
12017
12018 2007-06-13  Mark Probst  <mark.probst@gmail.com>
12019
12020         * mini.c (print_jit_stats): Output dynamic code allocation stats.
12021
12022 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
12023
12024         * mini-exceptions.c: Generate a method profile leave event during
12025         an exception to ensure that the profiler gets notified.
12026
12027 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
12028
12029         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
12030         branch.
12031
12032         * cpu-amd64.md: Add long_and/or/xor opcodes.
12033
12034 2007-06-06  Wade Berrier  <wberrier@novell.com>
12035
12036         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
12037         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
12038         length of instruction shr_imm (expected 8, got 10)
12039
12040 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
12041
12042         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
12043
12044 2007-06-06  Mark Probst  <mark.probst@gmail.com>
12045
12046         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
12047         MonoInternalHashTable again (fixed bug in the internal hash table
12048         code).
12049
12050 2007-06-06  Mark Probst  <mark.probst@gmail.com>
12051
12052         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
12053         Have to figure out what makes it crash the SWF regression.
12054
12055 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
12056
12057         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
12058
12059 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
12060
12061         * mini.c: optimize out the type check when storing null in a
12062         reference array.
12063
12064 2007-06-04  Mark Probst  <mark.probst@gmail.com>
12065
12066         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
12067         MonoInternalHashTable.
12068
12069 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
12070
12071         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
12072         signed integer methods.
12073
12074 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
12075
12076         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
12077         permanently since the current approach doesn't work.
12078
12079 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
12080
12081         * inssel.brg (stmt): Only call delegate->invoke_impl if 
12082         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
12083
12084 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
12085
12086         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
12087         the sreg2==rdx case.
12088         
12089         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
12090         account if it contains a rex prefix.
12091         (peephole_pass): Handle OP_FMOVE as well.
12092
12093 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
12094
12095         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
12096         as it causes regressions.
12097
12098 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
12099
12100         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
12101         static case as well.
12102
12103         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
12104
12105         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
12106         (mono_arch_get_this_arg_from_call): Ditto.
12107
12108         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
12109
12110         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
12111         invoke_impl field.
12112
12113         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
12114         (mono_arch_get_this_arg_from_call): Ditto.
12115
12116         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
12117         
12118         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
12119         try to create optimized invoke code and use that for further invocations. 
12120         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
12121
12122         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
12123
12124 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
12125
12126         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
12127         sealed classes or methods.
12128         *devirtualization.cs: tests for the new optimization
12129
12130 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
12131
12132         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
12133         by the update_volatile () function.
12134
12135 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
12136
12137         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
12138         require it.
12139
12140         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
12141
12142 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
12143
12144         * mini.c: Add configure checks for header files.
12145         * mini-x86.c: Add configure checks for header files.
12146         * trace.c: Add configure checks for header files.
12147         * aot-runtime.c: Add configure checks for header files.
12148         * aot-compiler.c: Add configure checks for header files.
12149         * driver.c: Add configure checks for header files.
12150         * mini-codegen.c: Add configure checks for header files.
12151         
12152         Code is contributed under MIT/X11 license.
12153
12154 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
12155
12156         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
12157         icompare_imm -128 + op_iclt. Fixes #81703.
12158
12159 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
12160
12161         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
12162
12163 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
12164
12165         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
12166         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
12167         so that all isinst checks now use "interface_bitmap".
12168
12169 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
12170
12171         * cpu-amd64.md (jmp): Fix a warning.
12172
12173         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
12174
12175         * basic.cs: Add new regression test.
12176
12177         * basic.cs: Remove test which is now in basic-long.cs.
12178
12179         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
12180
12181         * basic-long.cs: Add new test.
12182         
12183 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
12184
12185         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
12186
12187 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
12188
12189         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
12190
12191         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
12192         places.
12193         
12194         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
12195         throwing code a bit.
12196
12197         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
12198         the exception throwing code a bit.
12199
12200         * mini-x86.c (get_call_info): Allocate result from a mempool.
12201
12202 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
12203
12204         * aot-compiler.c (find_typespec_for_class): Fix the assert.
12205
12206         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
12207
12208         * mini.h (MonoCompile): Add 'token_info_hash' field.
12209
12210         * mini.c: Save token->method associations during compilation so the AOT 
12211         compiler can use it.
12212         
12213         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
12214         which reference generic classes and methods.
12215
12216 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
12217
12218         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
12219
12220         * aot-compiler.c (compile_method): Fix a typo in a comment.
12221
12222         * aot-runtime.c (decode_cached_class_info): Skip generic types.
12223
12224         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
12225         everything generic.
12226
12227         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
12228
12229 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
12230
12231         * mini.h (MonoCompile): Add 'args' field.
12232
12233         * mini.c (mono_compile_create_vars): Store variables representing the arguments
12234         into cfg->args.
12235
12236         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
12237
12238 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
12239
12240         * mini.c (mono_compile_get_interface_var): Remove this unused function.
12241
12242         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
12243
12244         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
12245         opcodes for some opcodes.
12246
12247         * mini.h *.brg *.c: Use the new opcodes.
12248
12249 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
12250
12251         * mini.h: Bumped aot revision.
12252
12253         * inssel.brg: modified code generation of type checks for interfaces
12254         to use the new "MonoClass.interface_bitmap" instead of the old
12255         "MonoClass.interface_offsets".
12256
12257 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
12258
12259         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
12260
12261 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
12262
12263         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
12264         64 bit platforms.
12265
12266 2007-04-27  Neale Ferguson <neale@sinenomine.net>
12267
12268         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
12269
12270 2007-04-27  Wade Berrier  <wberrier@novell.com>
12271
12272         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
12273         mini.h) to fix build.
12274
12275 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
12276
12277         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
12278         
12279         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
12280         causes the corlib unit tests to fail.
12281
12282 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
12283
12284         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
12285
12286         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
12287
12288         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
12289         opcodes to the comparison relations.
12290
12291         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
12292         opcodes to their types.
12293         
12294         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
12295
12296         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
12297         it in cfg->arch.cinfo.
12298
12299         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
12300
12301         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
12302         cfg->cil_offset_to_bb.
12303
12304 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
12305
12306         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
12307         created becase of initlocals.
12308
12309 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
12310
12311         * mini-alpha.c cpu-alpha.md: More alpha port work from 
12312         Sergey Tikhonov <tsv@solvo.ru>.
12313
12314 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
12315
12316         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
12317
12318 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
12319
12320         * cpu-s390.md (break): Correct the length of break instruction.
12321
12322 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
12323
12324         * mini.c: fix a couple of soft-float issues and comments.
12325
12326 2007-04-15  Miguel de Icaza  <miguel@novell.com>
12327
12328         * trace.c (is_filenamechar): - is also a filename char.
12329
12330 2007-04-15  Neale Ferguson <neale@sinenomine.net>
12331
12332         * mini-s390.c: Correct checking for enum type in return value processing.
12333
12334 2007-04-14  Raja R Harinath  <rharinath@novell.com>
12335
12336         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
12337         (version.h): Makefile is in the build directory.
12338
12339 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
12340
12341         * mini-amd64.h: fix for assertion failure on Solaris/amd64
12342
12343 2007-04-11  Martin Baulig  <martin@ximian.com>
12344
12345         * mini.c (can_access_member): Fix handling of generic classes;
12346         fixes #81259.
12347
12348 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
12349
12350         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
12351
12352 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
12353
12354         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
12355
12356 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
12357
12358         * mini-codegen.c: make sure the right spill amount is
12359         used for fp or integer registers (fixes the float_sub_spill() on ppc).
12360
12361 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
12362
12363         * mini-ppc.c: fixes for the fp_branch_nan test.
12364
12365 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
12366
12367         * basic.cs: Comment out new test which still fails on ia64.
12368
12369 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
12370
12371         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
12372
12373 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
12374
12375         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
12376
12377 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
12378
12379         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
12380         on 64 bit machines. Fixes part of #80738.
12381
12382         * basic.cs: Add regression test.
12383
12384 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
12385
12386         * inssel.brg basic.cs: Revert previous change to fix build.
12387
12388         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
12389         platforms.
12390         
12391         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
12392
12393         * basic.cs: Add new regression test.
12394
12395 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
12396
12397         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
12398         many arguments.
12399
12400 2007-03-16  Neale Ferguson <neale@sinenomine.net>
12401
12402         * cpu-s390x.md: Correct length of break instruction.
12403
12404 2007-03-16  Neale Ferguson <neale@sinenomine.net>
12405
12406         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
12407         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
12408
12409 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
12410
12411         * *.c: Begin WIN64 port.
12412         * mini.c:  Use correct register in profiler.
12413         * mini-amd64.c: No inline assembly on Win64.
12414         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
12415         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
12416         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
12417         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
12418         mono_arch_ip_from_context for Win64.
12419         
12420         Contributed under MIT/X11 license.
12421
12422 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
12423
12424         * exceptions-amd64.c (seh_handler): Ditto.
12425
12426         * exceptions-x86.c (seh_handler): Fix a memory leak.
12427
12428 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
12429
12430         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
12431         mini-s390x.c: fixed peephole optimizations to deal
12432         correctly with 1 and 2 byte reload avoidance.
12433
12434 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
12435
12436         * cpu-s390.md, cpu-s390x.md: update localloc length.
12437
12438 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
12439
12440         * cpu-g4.md: added missing descriptions.
12441
12442 2007-03-14  Miguel de Icaza  <miguel@novell.com>
12443
12444         *  Makefile.am: Add support so the tail tests are not executed on
12445         PowerPC as that is a known limitation of the PowerPC port.
12446
12447 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
12448
12449         * runmdesc.bat:  Move to msvc directory.
12450         
12451 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
12452
12453         * runmdesc.bat:  Run executable that was produced by the current
12454         target and sent via an argument.
12455         
12456 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
12457
12458         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
12459         #81102.
12460
12461         * generics.2.cs: Add regression test.
12462
12463 2007-03-09  Wade berrier  <wberrier@novell.com>
12464
12465         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
12466
12467 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
12468
12469         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
12470         AOT code depends on this.
12471
12472 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
12473
12474         * mini.c: more precise tracking of types in the eval stack
12475         (part of fix for bug #81044).
12476
12477 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
12478
12479         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
12480
12481         * aot-compiler.c (encode_patch): Remove an obsolete comment.
12482
12483 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
12484
12485         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
12486
12487         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
12488
12489 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
12490
12491         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
12492         a pointer on 64 bit systems. Fixes #80190.
12493
12494         * iltests.il: Add new regression test.
12495
12496 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
12497
12498         * mini.c: inline a constant for Environment.IsRunningOnWindows.
12499
12500 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
12501
12502         * trace.c: Remove an erroneous alignemnt check when tracing.
12503           Fixes --trace on OSX86.
12504
12505 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
12506
12507         * mini-$(arch).h: initialize SP in context for all the archs.
12508
12509 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
12510
12511         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
12512         regressions in the thread tests.
12513
12514 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
12515
12516         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
12517         - fixed implementation of LOCALLOC opcode
12518         - implemented non-un compare for floats
12519         - code cleanup
12520         - implementation of FDIV and CKFINITE opcodes
12521         - fixes for latest mono updates
12522         - additional arch opcodes
12523
12524 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
12525
12526         * Makefile.am: simplify and merge rules for cross-compilation.
12527
12528 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
12529
12530         * local-propagation.c: Actually *apply* the fix for bug 80591...
12531
12532 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
12533
12534         * mini-exceptions.c: backuot part of the last change
12535         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
12536
12537 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
12538         * inssel.brg: Fix bug 59286.
12539
12540
12541 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
12542
12543         * mini-exceptions.c: patch from Zoltan to correctly check for
12544         stack boundaries (using the stack register, not the frame register),
12545         fixes bugs #80724, #79717.
12546
12547 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
12548
12549         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
12550         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
12551
12552         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
12553         presence of frame pointer elimination.
12554
12555 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
12556         
12557         * mini-x86.h: NetBSD UCONTEX_REG defines.
12558
12559 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
12560
12561         * inssel-amd64.brg: Fix amd64 build.
12562
12563 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
12564
12565         * mini.h: remove extern to workaround what looks likes gcc bug 26905
12566         on amd64.
12567
12568 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
12569
12570         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
12571         ends.
12572
12573         * mini-<ARCH>.c: Use mono_is_regsize_var ().
12574
12575 2007-01-30 Mark Mason <mason@broadcom.com>
12576
12577            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
12578            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
12579            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
12580            beginning support for CEE_JMP [not quite working yet]
12581            * tramp-mips.c: LMF handling now works
12582         
12583 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
12584
12585         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
12586
12587         * mini.h (NULLIFY_INS): New macro.
12588
12589 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
12590
12591         * mini.c: statistical profiler fix for windows, patch
12592         from Tor Lillqvist (tml@novell.com).
12593
12594 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
12595         * local-propagation.c: Fix bug 80591.
12596
12597 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
12598
12599         * Makefile.am: put back the --export-dynamic option as with
12600         the previous gmodule flags (thanks to Robert Jordan).
12601
12602 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
12603
12604         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
12605
12606         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
12607         simplify and speed up the local register allocator. Also rename some fields
12608         like iassign->vassign.
12609         
12610         * regalloc.c: Remove some functions which are no longer used since their
12611         inlined version is in mini-codegen.c.
12612         
12613         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
12614
12615         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
12616
12617 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
12618
12619         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
12620         narrowing. Fixes #80622.
12621
12622         * iltests.il: Add new regresssion test. 
12623
12624 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
12625
12626         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
12627         debug-debugger.c, debug-debugger.h: warning fixes.
12628         * driver.c: updated copyright year and made it fit in one line.
12629
12630 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
12631
12632         * aot-runtime.c: updated to use mono-dl instead of gmodule.
12633
12634 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
12635
12636         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
12637
12638         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
12639
12640         * iltests.il: Add new test for bug #80507.
12641
12642 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
12643
12644         * mini-arm.h: use soft-float also on vfp for now.
12645
12646 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
12647
12648         * mini.c: fix some more soft-float issues.
12649
12650 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
12651
12652         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
12653
12654 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
12655         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
12656         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
12657         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
12658
12659 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
12660
12661         * mini-arm.c: typo fix.
12662
12663 2007-01-23  Neale Ferguson <neale@sinenomine.net>
12664
12665         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
12666
12667 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
12668
12669         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
12670         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
12671
12672         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
12673
12674         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
12675
12676         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
12677         
12678         * inssel.brg: Fix a warning.
12679
12680         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
12681
12682         * abcremoval.c ssa.c ssapre.c: Update after this change.
12683         
12684         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
12685
12686         * dominators.c (df_set): Use mono_bitset_union_fast.    
12687
12688 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
12689
12690         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
12691         mini-codegen.c: reduce relocations and memory usage for the cpu
12692         description.
12693
12694 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
12695
12696         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
12697
12698         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
12699         to reduce their size.
12700
12701 2007-01-19 Mark Mason <mason@broadcom.com>
12702
12703         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
12704         * mini-mips.c: more configuration macros, support long conditional branches, additional
12705         asserts, fix epilog instrumentation.
12706         * mini-mips.h: use standard stack walk
12707         * cpu-mips.md: increase size of div, rem and conditional branches
12708         
12709 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
12710
12711         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
12712         to cpu spec data.
12713
12714 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
12715
12716         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
12717         (compile_method): Ditto.
12718
12719         * aot-runtime.c (decode_klass_info): Ditto.
12720
12721         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
12722         needed by the code generated by inssel.brg. Also fix a warning.
12723
12724 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
12725
12726         * mini.c: deal with enums that become genericinsts by
12727         being nested in a generic class (bug #79956).
12728
12729 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
12730
12731         * mini.c: match the generic definition to check for
12732         private access with generic types (bug #78431).
12733
12734 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
12735
12736         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
12737         to make life easier for people cross-compiling that insist on not
12738         using scratchbox.
12739
12740 2007-01-17 Mark Mason <mason@broadcom.com>
12741
12742         * inssel-long.brg: patch to deal with mips missing flags
12743         * inssel-long32-mips.brg: implement overflow checks
12744         * insset-mips.brg: implement overflow checks
12745         * mini-mips.h: implement conditional exception handling
12746         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
12747           Remove unused code, minor cleanups.
12748         * exceptions-mips.c: minor cleanups
12749         * mini-ops.h: add mips conditional exception ops
12750         * cpu-mips.md: add mips conditional exception ops
12751
12752         
12753 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
12754
12755         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
12756         to deal with mips missing of flags.
12757
12758 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
12759
12760         * exceptions-ppc.c: execute fault handlers.
12761
12762 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
12763
12764         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
12765
12766 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
12767
12768         * mini.c: handle also floating point values in initialize_array.
12769
12770 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
12771
12772         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
12773         array initialization and make it conditional on the intrins option.
12774
12775 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
12776
12777         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
12778         relocations and put the patch info names close to the enum definition.
12779
12780 2007-01-15 Mark Mason <mason@broadcom.com>
12781
12782         * basic.cs, exceptions.cs: break up large tests to increase debugability.
12783
12784 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
12785
12786         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
12787
12788 2007-01-12  Raja R Harinath  <rharinath@novell.com>
12789
12790         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
12791
12792 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
12793
12794         * Makefile.am: distribute the mips sources.
12795
12796 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
12797
12798         * mini-codegen.h: handle bug #80489 here, by excluding ecx
12799         directly.
12800
12801 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
12802
12803         * cpu-x86.md: back out for now as this triggers other regressions.
12804
12805 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
12806
12807         * cpu-x86.md: force src1 and dest regpair for long shift instructions
12808         to eax:edx, so ecx can't get allocated to them (bug #80489).
12809
12810 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
12811
12812         * mini.c, mini-exceptions.c: enabled running fault handlers
12813         (bug #80469).
12814
12815 2007-01-03  Miguel de Icaza  <miguel@novell.com>
12816
12817         * driver.c: If nothing fail, do not use the string "failed",
12818         because it makes it very annoying to view test result logs on the
12819         web. 
12820
12821 2006-12-30  Miguel de Icaza  <miguel@novell.com>
12822
12823         * debug-debugger.c (mono_debugger_main): Rename "main" to
12824         "main_method" to prevent a warning.
12825
12826         Remove a warning for unused field.
12827
12828 2006-12-28  Martin Baulig  <martin@ximian.com>
12829
12830         * debug-debugger.c
12831         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
12832
12833 2006-12-22  Martin Baulig  <martin@ximian.com>
12834
12835         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
12836         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
12837         seperate `.mdb_debug_info' section, so we can access it from the
12838         debugger even if the binary is stripped.
12839
12840         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
12841         from the `.mdb_debug_info' here to prevent the linker from
12842         removing that section.
12843
12844         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
12845         mdb-debug-info64.s.
12846
12847 2006-12-19  Robert Jordan  <robertj@gmx.net>
12848
12849         * mini-x86: enable the code to return small structures in
12850         registers for FreeBSD as well. Fixes bug #80278.
12851         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
12852
12853 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
12854
12855         * mini-x86.c: align the stack when calling the profiler
12856         function instrumenting the prolog (on OSX).
12857
12858 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
12859
12860         * mini.c: emit a break opcode where Debugger.Break () is called.
12861
12862 2006-12-13  Miguel de Icaza  <miguel@novell.com>
12863
12864         * mini.c (mono_method_to_ir): Provide useful information on this
12865         assert, to prevent others from debugging like I did.
12866
12867 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
12868
12869         * mini.c: enable code which was incorrectly commented
12870         (bug #80235).
12871
12872 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
12873
12874         * mini-x86.c: enable on OSX, too, the code to return small
12875         structures in registers.
12876
12877 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
12878
12879         * mini-x86.c: remove the use of the dynamic code manager here, too.
12880
12881 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
12882
12883         * mini.h, debug-debugger.c, tramp-*.c: fixed 
12884         mono_debugger_create_notification_function() to use
12885         mono_global_codeman_reserve () instead of a dynamic code manager.
12886
12887 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
12888
12889         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
12890         ves_array_element_address() jit icall and use a generated
12891         managed method instead (which is about 4 times faster for a rank 3
12892         array access).
12893
12894 2006-11-29  Mark Mason  <mason@broadcom.com>
12895
12896         * basic-calls.cs: additional tests for passing
12897         structures as function arguments.
12898
12899 2006-11-29  Mark Mason  <mason@broadcom.com>
12900
12901         * mini-mips.h: disable custom exception handling
12902         * mini-mips.c: throw/rethrow should use jalr to call
12903         exception stubs.  Fixed bug with passing structures
12904         by value. More support for tracing floating point
12905         functions.
12906
12907 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
12908
12909         * mini.c: fixed typo in the soft-float ldind.r4 handling
12910         (bug #80086).
12911
12912 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
12913
12914         * mini.c, mini.h, driver.c: added --runtime command line
12915         option to select a different runtime than the autodetected one.
12916         * jit.h: added API for embedders to initialize with a specific
12917         runtime version.
12918
12919 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
12920
12921         * mini.c: handle also boxing of r4 values (bug #80024).
12922
12923 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
12924
12925         * mini-ppc.c: force indirect calls until we reserve
12926         enough address space for all the generated code.
12927
12928 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
12929
12930         * exceptions-arm.c: workaround bugs in the libc definition
12931         of struct ucontext.
12932
12933 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
12934
12935         * inssel.brg: fixes from me and Mark Mason.
12936
12937 2006-11-23  Dick Porter  <dick@ximian.com>
12938
12939         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
12940         semaphore display now we've fixed the initial value
12941
12942 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
12943
12944         * inssel.brg: partially revert the last change to fix the build.
12945
12946 2006-11-21  Mark Mason  <mason@broadcom.com>
12947
12948         * inssel.brg: Add and use compare-and-branch macros to support
12949         architectures that do not have condition code registers (ie. MIPS).
12950         * *-mips.{c,brg,md}: Fix copyright statements
12951
12952 2006-11-20  Mark Mason  <mason@broadcom.com>
12953
12954         * Makefile.am: remove mini-codegen.c from list of MIPS sources
12955         * mini.c: Allow GET_CONTEXT to be specified by the arch port
12956         * mini.h: Added declaration for mono_print_ins()
12957         * mini-codegen.c: added ins_spec initializer for MIPS
12958         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
12959         vreg to be virtual and hreg to be non-virtual.
12960         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
12961         is not yet working/implemented correctly.
12962         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
12963         non-static, fixup calls to print_ins() from other parts in the file.
12964
12965 2006-11-20  Mark Mason  <mason@broadcom.com>
12966
12967         * basic-calls.cs: added tests for passing structures as arguments
12968         to calls.
12969
12970 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
12971
12972         * inssel-long32.brg: optimize signed division by power of two.
12973
12974 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
12975
12976         * mini-arm.c: added support for interworking with thumb code
12977         (mono must be still be built using the ARM instruction encoding).
12978
12979 2006-11-19  Miguel de Icaza  <miguel@novell.com>
12980
12981         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
12982         verifier has different rules for it.   Fixes a few verifier issues
12983         in the test suite.
12984
12985         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
12986         at the end, so people know what happened.
12987
12988 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
12989
12990         * brach-opts.c: in optimize_exception_target() make sure we
12991         are in a catch clause (fixes bug #79871).
12992
12993 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
12994
12995         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
12996         more soft-float support fixes.
12997
12998 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
12999
13000         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
13001         that are passed half on the stack and half in registers.
13002
13003 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
13004
13005         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
13006         more mips integration work from Mark E Mason 
13007         <mark.e.mason@broadcom.com>.
13008
13009 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
13010
13011         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
13012         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
13013         tramp-mips.c: added sources for the mips port, not
13014         integrated in the build yet. Contributed by
13015         Mark E Mason <mark.e.mason@broadcom.com>.
13016
13017 2006-11-14  Neale Ferguson <neale@sinenomine.net>
13018
13019         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
13020
13021 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
13022
13023         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
13024         put the soft-float rules in its own file since it seems to
13025         break s390 compilation.
13026
13027 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
13028
13029         * mini-arm.c: fixed wrnings.
13030
13031 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
13032
13033         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
13034         inssel-arm.brg: ARM support for soft-float.
13035
13036 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
13037
13038         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
13039         loads and stores of 32 bit fp values.
13040
13041 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
13042
13043         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
13044
13045         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
13046         works. Fixes #79852 and #79463.
13047
13048 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
13049
13050         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
13051         more soft-float support WIP and fixes.
13052
13053 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
13054
13055         * mini-arm.c: some VFP updates.
13056
13057 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
13058
13059         * mini-exceptions.c: 0 is a valid local var offset in some
13060         architectures, don't assert (bug #78508).
13061
13062 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
13063
13064         * exceptions-arm.c: fixed off by one error in stack walk code.
13065
13066 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
13067
13068         * mini.h, mini.c: more precise tracking of type load exceptions.
13069
13070 2006-11-03  Robert Jordan  <robertj@gmx.net>
13071
13072         * Makefile.am: [WIN32] Add monow.exe target.
13073         * driver.c: [WIN32] Don't detach the console when debugging.
13074         Fixes bug #79797.
13075         
13076 2006-10-30  Miguel de Icaza  <miguel@novell.com>
13077
13078         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
13079
13080 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
13081
13082         * aot-compiler.c (emit_method_info): Add a case missed earlier.
13083
13084         * driver.c (mini_regression): Fix --regression with AOT.
13085
13086         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
13087
13088 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
13089
13090         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
13091
13092         * mini-sparc.h: Don't use sigaction on sparc/linux.
13093
13094         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
13095
13096         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
13097
13098         * mini-exceptions.c: Add proper include files for getpid ().
13099
13100 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
13101
13102         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
13103         address instead of a MonoJitInfo* to avoid decoding the exception info for the
13104         method.
13105
13106         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
13107         name cache to reduce its size.
13108
13109         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
13110
13111 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
13112
13113         * mini-x86.c: Save/restore the current LMF structure more efficiently using
13114         the mono_lmf TLS variable.
13115
13116         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
13117         trampoline lmf frames.  
13118
13119         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
13120
13121 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
13122
13123         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
13124         the mono_lmf TLS variable.
13125
13126         * mini-exceptions.c: Access the LMF structure through accessors.
13127
13128         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
13129         variable instead of in jit_tls->lmf.
13130
13131         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
13132         
13133         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
13134         trampoline lmf frames.
13135
13136         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
13137
13138 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
13139
13140        * mini.c trace.c mini-x86.c: Revert these too.
13141         
13142        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
13143        signature change.
13144
13145 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
13146
13147         * genmdesc.c: removed now dead code.
13148
13149 2006-10-09  Robert Jordan <robertj@gmx.net>
13150
13151         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
13152
13153 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
13154
13155         * mini.h: do not leave gaps in the opcode values.
13156
13157 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
13158
13159         * jit-icalls.h: flag functions as internal here, too.
13160
13161 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
13162
13163         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
13164         functions with the internal attribute.
13165
13166 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
13167
13168         * aot-compiler.c: fclose the file descriptor in the profile read loop.
13169
13170 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
13171
13172         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
13173         for soft-float.
13174
13175 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
13176
13177         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
13178         tail calls as on other platforms.
13179
13180         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
13181
13182         * iltests.il: Add a few tailcall tests.
13183
13184 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
13185
13186         * driver.c: fix loop for old compilers (bug #79521).
13187
13188 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
13189
13190         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
13191
13192         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
13193
13194         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
13195         metadata without any code.
13196
13197         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
13198         more precise debugging information using gdb.
13199
13200 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
13201
13202         * inssel-ia64.brg: Make the helper methods static.
13203
13204 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
13205
13206         * inssel-x86.brg: make the helper methods static.
13207
13208 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
13209
13210         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
13211
13212 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
13213
13214         * mini.c: updates for monoburg changes.
13215         * inssel.brg: make a few helper functions static as they should.
13216
13217 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
13218
13219         * Makefile.am: Move mini-codegen.c to common_sources.
13220
13221 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
13222
13223         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
13224         instructions.
13225         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
13226         mini-ppc.h: port to use the common local register allocator.
13227
13228 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
13229
13230         * mini.h: Remove the comment too then.
13231
13232 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
13233
13234         * mini.h: put back backend.data which is to be used shortly and
13235         doesn't increase the size of MonoInst. If any 64 bit arch aligned
13236         pointers on 4 byte boundaries it'd have much bigger issues running
13237         and you can ifdef it out anyway.
13238
13239 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
13240
13241         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
13242         MonoInst size by 4 bytes on 64 bit machines.
13243
13244 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
13245
13246         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
13247         replacement with more meaningful field names. Arch maintainers, please
13248         check the assigned names are good enough for your arch.
13249
13250 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
13251
13252         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
13253         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
13254
13255 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
13256
13257         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
13258         relocations and memory requirements, put the optimization flags
13259         definitions in their own file.
13260
13261 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
13262
13263         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
13264
13265         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
13266
13267 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
13268
13269         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
13270
13271 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
13272
13273         * inssel.brg: use the correct function to get the size of an item
13274         in an array, given an element class.
13275         * aot-compiler.c: do not access class->class_size directly.
13276
13277 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
13278
13279         * mini.h, debug-mini.c: added a debugging function to print
13280         info about local variables and arguments in a jitted method.
13281
13282 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
13283
13284         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
13285
13286         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
13287
13288 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
13289
13290         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
13291         inner and outer loops when passing vtypes.
13292
13293 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
13294
13295         * mini-ppc.c: take into account the cpu errata for cache flushing
13296         which caused some random errors (bug #79381).
13297
13298 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
13299
13300         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
13301         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
13302
13303 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
13304
13305         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
13306         loaded.
13307
13308         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
13309         freebsd ports tree.
13310
13311         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
13312         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
13313
13314         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
13315         displacement.
13316
13317 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
13318
13319         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
13320
13321 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
13322
13323         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
13324         macro does not have to be changed during debugging.
13325
13326         * 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>.
13327
13328         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
13329
13330         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
13331         
13332         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
13333         MONO_ARCH_NO_EMULATE_MUL is defined.
13334
13335         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
13336
13337         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
13338
13339         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
13340
13341         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
13342         
13343 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
13344
13345         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
13346         stuff to mini-exceptions.c where it is used.
13347
13348         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
13349         setup code, the real one is in mini-exceptions.c.
13350
13351         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
13352         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
13353         some changes from the freebsd ports tree.
13354
13355         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
13356         constants.
13357         
13358         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
13359
13360 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
13361
13362         * mini.c: on Linux, check for /proc to be mounted
13363         (bug# 79351, novell bug#201204).
13364
13365 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
13366
13367         * mini.c: handle cases where pthread_attr_getstack() behaves
13368         incorrectly (bug #78096).
13369
13370 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
13371
13372         * mini-arm.c: support larger stack frames (bug #79272).
13373
13374 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
13375
13376         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
13377
13378         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
13379         tokens.
13380
13381         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
13382         mono_class_from_name () to find a class from its name.
13383
13384         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
13385
13386 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
13387
13388         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
13389
13390 2006-09-05  Kornel Pal  <kornelpal@gmail.com>
13391
13392         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
13393
13394 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
13395
13396         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
13397         callinfo->trampoline.
13398
13399         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
13400         fixes #79271.
13401         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
13402         future.
13403
13404 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
13405
13406         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
13407
13408 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
13409
13410         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
13411         stats.method_trampolines, it is already done by the generic trampoline code.
13412
13413         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
13414         
13415 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
13416
13417         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
13418
13419         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
13420
13421         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
13422
13423         * mini.c (print_jit_stats): Print mscorlib mempool size too.
13424         
13425         * mini.c (print_jit_stats): Print new stats.
13426
13427         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
13428
13429 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
13430
13431         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
13432         Address on two dimensional arrays. Fixes #78729.
13433
13434         * mini.h (MonoCompile): Add a 'skip_visibility' field.
13435
13436         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
13437         a method.
13438
13439         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
13440
13441         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
13442         #79130.
13443         
13444         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
13445         a race condition.
13446         (mini_get_ldelema_ins): Ditto.
13447
13448 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
13449
13450         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
13451         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
13452         Fixes #79213.
13453
13454 2006-08-29 Neale Ferguson <neale@sinenomine.net>
13455
13456         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
13457         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
13458
13459         * exceptions-s390x.c: Cosmetic change.
13460
13461         * tramp-s390.c: Fix warning.
13462
13463         * cpu-s390.md: Correct length of mul_imm.
13464
13465 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
13466
13467         * aot-compiler.c: added binary writer with ELF backend
13468         implementation (only on Linux/x86 for now).
13469
13470 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
13471
13472         * Makefile.am: Don't run net 2.0 AOT tests.
13473
13474         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
13475         (mono_compile_assembly): Skip net 2.0 assemblies as well.
13476
13477         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
13478
13479 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
13480
13481         * aot-compiler.c: simplified and refactored the asm-writing code
13482         to allow different backends.
13483
13484 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
13485
13486         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
13487
13488         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
13489         little. Share patches of type TYPE_FROM_HANDLE as well.
13490
13491         * mini.c (mono_patch_info_equal): New helper function.
13492         (mono_patch_info_hash): Ditto.
13493
13494         * aot-compiler.c (emit_method_code): Fix s390 build.
13495
13496         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
13497         is not handled because it is stored as a flag and not as a type ctor. Fixes
13498         #79016.
13499
13500 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
13501
13502         * aot-compiler.c: Fix computation of GOT slot statistics.
13503         
13504         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
13505         Also remove support for not PIC AOT.
13506
13507         * mini.h: Bump AOT file format version.
13508
13509         * objects.cs: Add a test for #78990.
13510
13511         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
13512         (peter.dettman@iinet.net.au). Fixes #79087.
13513
13514         * basic-long.cs: Add a test for the above.
13515
13516 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
13517
13518         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
13519         
13520         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
13521         code somewhat.
13522
13523 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
13524
13525         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
13526         exceptions.
13527
13528 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
13529
13530         * mini.c: Don't verify COM proxy invoke calls
13531         
13532
13533 2006-08-10  Dick Porter  <dick@ximian.com>
13534
13535         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
13536         which process is holding semaphores locked.
13537
13538 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
13539
13540         * mini-ia64.c mini-amd64.c: Fix #79027.
13541
13542         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
13543
13544         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
13545
13546         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
13547         implicit arguments in a vararg call. Fixes #79027.
13548
13549 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
13550
13551         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
13552         (mono_get_array_new_va_signature): Ditto.
13553
13554 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
13555
13556         * aot-runtime.c: Call init_plt lazily.
13557
13558         * inssel-long.brg: Fix unsigned long->int conversion.
13559
13560         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
13561
13562         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
13563         that most data is now in the .rss/.data section.
13564
13565 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
13566
13567         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
13568
13569         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
13570
13571         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
13572
13573         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
13574
13575         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
13576         virtual call. Fixes #79010.
13577
13578         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
13579         and use the result as the this argument in the real call.
13580
13581         * generics.2.cs: Add a new test for #79010.
13582         
13583 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
13584
13585         * mini-x86.c: Fix a warning.
13586
13587         * aot-compiler.c: Add a bunch of statistics.
13588
13589         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
13590
13591 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
13592
13593         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
13594
13595 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
13596
13597         * 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>.
13598
13599 2006-07-13  Miguel de Icaza  <miguel@novell.com>
13600
13601         * mini.c (mono_method_to_ir): Obtain the original method in the
13602         CIL stream and use this to perform validation.
13603
13604         Fixed: #78816
13605
13606 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
13607
13608         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
13609         (mono_arch_call_opcode): Ditto.
13610
13611         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
13612         #78826.
13613
13614         * mini.c (mono_patch_info_dup_mp): New helper function.
13615         
13616         * aot-compiler.c (compile_method): Fix some of the memory allocated during
13617         compilation. Fixes #78827.
13618
13619 2006-07-18  Kornel Pal  <kornelpal@gmail.com>
13620
13621         * declsec.c: Use original security informations for
13622           MONO_WRAPPER_MANAGED_TO_MANAGED.
13623
13624 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
13625
13626         * mini.c: Allow Com Interop methods/classes and
13627         don't verify COM wrapper calls
13628         
13629
13630 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
13631
13632         * inssel-long32.brg: Fix long->i4 checked conversion.
13633
13634         * exceptions.cs: Add a test for the above.
13635
13636 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
13637
13638         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
13639
13640         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
13641         leaks.
13642
13643         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
13644         #78775.
13645
13646 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
13647
13648         * mini.c: Fix solaris/x86 exception handling.
13649
13650         * Makefile.am: Get rid of $(ICU_LIBS).
13651
13652 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
13653
13654         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
13655         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
13656         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
13657
13658         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
13659
13660         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
13661         this function causes a SIGSEGV.
13662
13663 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
13664
13665         * mini.c: Remove unused solaris/x86 includes.
13666
13667 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
13668
13669         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
13670
13671 2006-06-20  Jb Evain  <jbevain@gmail.com>
13672
13673         * cpu-g4.md: fix max length of start_handler instruction.
13674
13675 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
13676         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
13677
13678 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
13679         * ssa.c: Fixed bug 78653 for SSA based deadce.
13680         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
13681         MonoInst.flags, used in SSA based deadce.
13682         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
13683         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
13684
13685 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
13686
13687         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
13688         it can end up using non executable memory on ppc64 systems
13689         running ppc32 userspace (fix from Johannes Berg).
13690
13691 2006-06-14  Dick Porter  <dick@ximian.com>
13692
13693         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
13694         4.1.1
13695
13696 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
13697         * mini.c: Made so that inline is locally disabled if it would
13698         trigger a .cctor, because too many apps depend on this behavior
13699         (which seems to be also the one of the MS CLR).
13700
13701 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
13702
13703         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
13704         No idea why this worked before.
13705
13706         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
13707         which branch to outer exception clauses since they could skip the
13708         inner finally clauses. Fixes #78633.
13709
13710         * exceptions.cs: Add a test for the above.
13711
13712         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
13713         Fixes #78629.
13714
13715         * iltests.il: Add a test for the above.
13716
13717 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
13718
13719         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
13720         after the end of a try bblock, to prevent asserts in mini_method_compile ().
13721
13722         * iltests.il: Add a test for the above.
13723
13724 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
13725
13726         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
13727         
13728         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
13729         methods as instrinsics.
13730
13731 2006-06-09  Wade Berrier <wberrier@novell.com>
13732
13733         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
13734         (simple-cee-ops.h ssapre-mini-ops.h)
13735
13736 2006-06-09  Neale Ferguson <neale@sinenomine.net>
13737
13738         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
13739         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
13740         instruction).
13741         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
13742         * cpu-s390x.md: Fix max. length values for a couple of instructions.
13743
13744 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
13745
13746         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
13747
13748 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
13749
13750         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
13751         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
13752         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
13753         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
13754         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
13755         of opcodes, so that bug 78549 should not happen again.
13756         * ssapre.c: Updated to use the renamed files.
13757
13758 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
13759
13760         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
13761         in OP_ATOMIC_EXCHANGE_I4.
13762
13763 2006-06-07  Wade Berrier <wberrier@novell.com>
13764
13765         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
13766         in mono_debugger_create_notification_function)
13767
13768 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
13769
13770         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
13771         
13772         * mini.c (type_from_stack_type): Disable some changes which do not
13773         seem to work.
13774
13775         * driver.c: Reenable opts.
13776
13777         * mini.h (MonoStackSlot): New structure to keep track of the verification state
13778         of the evaluation stack.
13779         
13780         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
13781         evaluation stack trace at entry to the bblock.
13782
13783         * mini.c (merge_stacks): New function to perform verification of stack merges.
13784         Turned off by default.
13785
13786         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
13787         STACK_MP.
13788         
13789 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
13790
13791         * local-propagation.c: Fixed bug 78549.
13792
13793 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
13794
13795         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
13796
13797 2006-06-02  Miguel de Icaza  <miguel@novell.com>
13798
13799         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
13800         tramp-arm.c, tramp-ia64.c
13801         (mono_debugger_create_notification_function): Update signature to
13802         new signature and use new protocol for creating the notification
13803         function.  
13804
13805         Should fix the build.
13806
13807 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
13808
13809         * exceptions-ppc.c (mono_jit_walk_stack)
13810         (ves_icall_get_frame_info): Fix the build
13811
13812 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
13813
13814         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
13815
13816 2006-05-31  Raja R Harinath  <rharinath@novell.com>
13817
13818         * il2tests.2.il: New file for generics CIL tests.  Add test for
13819         #78019.
13820         * Makefile.am: Update.
13821
13822         Fix #78019
13823         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
13824         to nullable types.
13825
13826 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
13827
13828         * aliasing.c: Fixed bug 78311.
13829
13830 2006-05-29  Martin Baulig  <martin@ximian.com>
13831
13832         * mini-exceptions.c (mono_find_jit_info): When computing the
13833         native offset, check whether we're actually inside the method's
13834         code; call mono_debug_print_stack_frame() to format the frame.
13835         (ves_icall_System_Exception_get_trace): Call
13836         mono_debug_print_stack_frame() to format the stack frame.
13837         (ves_icall_get_trace): Update to the new debugging API.
13838         (mono_jit_walk_stack_from_ctx): Likewise.
13839         (ves_icall_get_frame_info): Likewise.
13840
13841         * mini.c (get_method_from_ip): Use the new debugging API.
13842         (mono_print_method_from_ip): Likewise.
13843
13844         * exceptions-ppc.c
13845         (mono_jit_walk_stack): Use the new debugging API.
13846         (ves_icall_get_frame_info): Likewise.   
13847
13848 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
13849
13850         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
13851
13852 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
13853
13854         * mini.c: Added "limitator" to inline for debugging.
13855
13856 2006-05-24  Martin Baulig  <martin@ximian.com>
13857
13858         * debug-debugger.c (mono_debugger_init): Create a private,
13859         malloc()-based code manager for the notification function and
13860         intentionally leak it on exit.  This fixes the crash-on-exit race
13861         condition.
13862
13863         * tramp-amd64.c
13864         (mono_debugger_create_notification_function): Added
13865         `MonoCodeManager *' argument.
13866
13867         * tramp-x86.c
13868         (mono_debugger_create_notification_function): Added
13869         `MonoCodeManager *' argument.
13870
13871 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
13872
13873         * aliasing.c: Fixed 64 bit issue.
13874         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
13875         default since all known bugs are fixed (one more time!).
13876
13877 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
13878
13879         * mini.c: write barrier support.
13880
13881 2006-05-23  Martin Baulig  <martin@ximian.com>
13882
13883         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
13884         check at the top of the file.
13885
13886 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
13887
13888         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
13889         reverting changes without reason and without changelog entries.
13890
13891 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
13892
13893         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
13894         to a few opcodes. Fixes #78439.
13895
13896         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
13897         consistency with other archs.
13898
13899         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
13900
13901 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
13902
13903         * debug-debugger.c: fix the build.
13904
13905 2006-05-17  Martin Baulig  <martin@ximian.com>
13906
13907         * debug-debugger.c
13908         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
13909         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
13910         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
13911         (debugger_attach): Call GC_mono_debugger_add_all_threads().
13912
13913 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
13914
13915         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
13916
13917 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
13918
13919         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
13920         MONO_TYPE_GENERICINST.
13921         
13922         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
13923         MONO_TYPE_GENERICINST.
13924
13925 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
13926
13927         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
13928         #78325.
13929
13930 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
13931
13932         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
13933         mempool.
13934         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
13935
13936 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
13937
13938         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
13939         mono_trace_cleanup ().
13940
13941         * iltests.il: Fix problem with the newly added test.
13942
13943         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
13944         due to register constraints, free up the previous hreg. Fixes #78314.
13945
13946         * iltests.il: Add new test for #78314.  
13947
13948         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
13949         Interlocked.Add. Fixes #78312.
13950
13951         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
13952         
13953 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
13954
13955         * inssel.brg (mini_emit_virtual_call): Fix a warning.
13956
13957 2006-05-05  Martin Baulig  <martin@ximian.com>
13958
13959         * debug-mini.c (mono_debug_open_block): New method.
13960
13961         * mini-amd64.c
13962         (mono_arch_output_basic_block): Call mono_debug_open_block() at
13963         the beginning of each basic block.
13964
13965         * mini-x86.c
13966         (mono_arch_output_basic_block): Call mono_debug_open_block() at
13967         the beginning of each basic block.
13968
13969 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
13970
13971         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
13972         default until I understand why they break the build on amd64.
13973
13974 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
13975
13976         * mini.c (mini_cleanup): Call mono_cleanup ().
13977
13978         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
13979         errors.
13980
13981 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
13982
13983         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
13984         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
13985         default since all known bugs are fixed, and I cannot reproduce bug
13986         77944... I'm asking Matt Hargett to test again after this commit.
13987
13988 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
13989
13990         * mini-codegen.c: Fixed typo that thrashed inline.
13991
13992 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
13993
13994         * dominators.c (compute_dominators): Avoid using a worklist since
13995         it is not correct in some cases. Instead, iterate over all bblocks as
13996         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
13997
13998 2006-04-28  Miguel de Icaza  <miguel@novell.com>
13999
14000         * mini.c (mono_jit_compile_method_inner): Use
14001         mono_prepare_exception_from_error that resets the value
14002         internally.
14003
14004 2006-04-27  Miguel de Icaza  <miguel@novell.com>
14005
14006         * mini.c: Move the mini_loader_error_to_exception to metadata. 
14007         
14008 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
14009
14010         * aliasing.c: Fixed bug 78210.
14011
14012 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
14013
14014         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
14015         default until all their problems (or the ones they trigger) are fixed.
14016
14017 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
14018
14019         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
14020         
14021         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
14022         as loaded only after resolving patches since that could invoke the same method.
14023
14024         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
14025
14026         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
14027         functions.
14028
14029         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
14030         AOT loader.
14031
14032         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
14033         stack.
14034
14035         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
14036         made from AOT code through the PLT table.
14037
14038         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
14039         holding the plt offset when a call is made to the aot plt trampoline.
14040         
14041 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
14042
14043         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
14044         amd64 AOT support.
14045
14046         * Makefile.am (common_sources): Fix build breakage.
14047
14048         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
14049         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
14050         intra-assembly calls if possible.
14051         
14052         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
14053
14054         * mini-trampolines.c: Handle PLT entries.
14055
14056         * mini.c: Avoid creating a GOT var for calls.
14057
14058         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
14059         from mscorlib code.
14060
14061         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
14062         from mscorlib code.
14063
14064         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
14065         AOT code.       
14066
14067         * mini.h: Bump AOT file format version.
14068         
14069         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
14070         covers more cases.
14071
14072 2006-04-25  Martin Baulig  <martin@ximian.com>
14073
14074         * driver.c: Disable copyprop, consprop and inline when running
14075         inside the debugger.
14076
14077 2006-04-25  Martin Baulig  <martin@ximian.com>
14078
14079         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
14080         with `get_current_thread' and added `detach'.
14081         (MonoDebuggerMetadataInfo): Added `thread_size',
14082         `thread_tid_offset', `thread_stack_ptr_offset' and
14083         `thread_end_stack_offset'.
14084
14085 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
14086
14087         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
14088         aot-runtime.c.
14089
14090         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
14091         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
14092
14093         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
14094
14095         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
14096
14097         * aot.c: Add support for ADJUSTED_IID.  
14098
14099 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
14100
14101         * aot.c (emit_method_order): Don't align method_order_end.
14102
14103         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
14104         the interface ID changes.
14105
14106 2006-04-21  Dick Porter  <dick@ximian.com>
14107
14108         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
14109         cleaning up a thread.  Fixes the new part of bug 77470.
14110
14111 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
14112
14113         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
14114         to managed wrapper.
14115                      
14116 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
14117
14118         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
14119         
14120         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
14121         SIGSEGV. Fixes #78072.
14122
14123         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
14124         unregister our SIGABRT handler.
14125
14126 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
14127
14128         * mini.c: Disabled inline where it can alter the call stack in a
14129         way visible from managed code.
14130         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
14131         default.
14132
14133 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
14134
14135         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
14136         on other platforms. Fixes #78089.
14137
14138 2006-04-13  Martin Baulig  <martin@ximian.com>
14139
14140         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
14141         determine whether we're inside the debugger.
14142
14143         * debug-debugger.h
14144         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
14145
14146 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
14147
14148         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
14149         handler clauses. Fixes #78024.
14150
14151         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
14152         in the CALL_MEMBASE opcodes. Fixes #78088.
14153         (mono_arch_get_vcall_slot_addr): Ditto.
14154
14155 2006-04-10  Martin Baulig  <martin@ximian.com>
14156
14157         * debug-debugger.c: The thread handling code has now been moved
14158         into ../metadata/threads.c.
14159
14160 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
14161
14162         * driver.c (mono_main): Fix --with-gc=none build.
14163
14164         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
14165         (mono_spillvar_offset_float): Ditto.
14166         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
14167         hreg, not when its !global, since on ia64, there is a third category: stacked
14168         registers.      
14169
14170 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
14171
14172         * mini.c: set MonoInst->klass for load field address and a few other
14173         places.
14174
14175 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
14176
14177         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
14178
14179 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
14180
14181         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
14182         the branch opt changes.
14183
14184 2006-04-06  Dick Porter  <dick@ximian.com>
14185
14186         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
14187         
14188         * wapihandles.c (mini_wapi_seminfo): 
14189         * driver.c (mono_main): Add semaphore info option
14190
14191 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
14192
14193         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
14194         branch optimization changes. Fixes #78009.
14195
14196 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
14197
14198         * mini.c: ignore accessibility of methods in managed->native wrappers.
14199
14200 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
14201
14202         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
14203         
14204         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
14205
14206 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
14207
14208         * mini.c: Modify the branch optimizations to preserve the invariant that
14209         the entries inside the in_bb and out_bb arrays are unique.
14210         (mono_unlink_bblock): Avoid creation of new arrays.
14211
14212 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
14213
14214         * mini.c (mono_unlink_bblock): Fix regression caused by previous
14215         change (#77992).
14216
14217 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
14218
14219         * mini.c (optimize_branches): Remove the "optimizations" in
14220         the cbranch1/cbranch2 -> branch cases which were causing several
14221         problems in the past. Fixes #77986.
14222
14223 2006-03-31  Chris Toshok  <toshok@ximian.com>
14224
14225         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
14226         default optimizations :(
14227
14228 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
14229
14230         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
14231         branch.
14232
14233 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
14234
14235         * local-propagation.c: Added comments to structs and removed
14236         "Mono" prefixes from local tree mover types.
14237
14238 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
14239
14240         * Makefile.am (arch_sources): Define this for each architecture so 
14241         libmono_la_SOURCES is defined in one place.
14242
14243 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
14244
14245         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
14246         from handles/.
14247
14248 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
14249
14250         * driver.c: print the GC name supplied by configure.
14251
14252 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
14253
14254         * local-propagation.c: Added tree mover, and moved here all the
14255         local propagation code from mini.c
14256         * mini.c: Added support for treeprop, and moved all the local
14257         propagation code to local-propagation.c
14258         * mini.h: Added support for treeprop
14259         * driver.c: Added support for treeprop, enabled consprop, copyprop,
14260         treeprop, inline and deadce by default
14261         * Makefile.am: Added local-propagation.c
14262
14263 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
14264
14265         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
14266
14267 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
14268
14269         * debug-debugger.c: make it compile without the Boehm GC.
14270
14271 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
14272
14273         * mini.c: fixed issue with mismatch when an icall is registered
14274         with multiple names but same address.
14275
14276 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
14277
14278         * declsec.c, mini-exceptions.c: use write barrier to set reference
14279         fields of managed objects.
14280
14281 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
14282
14283         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
14284         (can_access_internals): Fix a warning.
14285
14286         * mini.c (print_method_from_ip): Rename this to 
14287         mono_print_method_from_ip so it gets exported.
14288
14289         * trace.c: Deal with strings inside StringBuilder's containing garbage
14290         and fix memory leaks. Fixes #77848.
14291
14292 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
14293
14294         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
14295         fixes #77787.
14296
14297 2006-03-16 Neale Ferguson <neale@sinenomine.net>
14298         
14299         * mini-s390.c: Remove OP_X86_TEST_NULL.
14300
14301 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
14302
14303         * mini.c: use the correct GetHashCode() for the moving collector.
14304
14305 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
14306
14307         * liveness.c: Regalloc spill cost tuning.
14308
14309 2006-03-15 Neale Ferguson <neale@sinenomine.net>
14310         
14311         * mini-s390x.h: Correct S390_LONG macro.
14312
14313         * mini-s390x.c: Cleanup unused code.
14314
14315 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
14316
14317         * jit-icalls.h: New file.
14318
14319         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
14320         icalls and include that instead of including jit-icalls.c.
14321
14322         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
14323         OP_X86 opcodes.
14324
14325 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
14326
14327         * mini.c: when checking for member accessibility, also check for
14328         friend assemblies and for explicit interface implementations.
14329
14330 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
14331
14332         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
14333
14334         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
14335
14336         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
14337         common cases are done first.    
14338
14339         * mini-ops.h: Only define platform specific opcodes on the given platform.
14340
14341         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
14342         branch.
14343         
14344 2006-03-14  Martin Baulig  <martin@ximian.com>
14345
14346         Revert Paolo's change from r57348:
14347
14348         * mini.h: don't use gboolean for bitfields.
14349         * mini.c: verifier changes for fields and methods accessibility.
14350
14351 2006-03-13  Neale Ferguson <neale@sinenomine.net>
14352
14353         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
14354
14355         * mini-s390x.c: Fix conv_r_un.
14356
14357         * cpu-s390, cpu-s390x.md: Fix lengths.
14358
14359 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
14360
14361         * mini.c: nested types have access to all the nesting
14362         levels, not just the enclosing types.
14363
14364 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
14365
14366         * mini.c: added a few more verification checks.
14367
14368 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
14369
14370         * liveness.c: Merge optimizations from the linear-il branch.
14371
14372 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
14373
14374         * mini-ia64.c (emit_call): Add a comment.
14375
14376         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
14377
14378         * tramp-ia64.c: Fix some warnings.
14379
14380 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
14381
14382         * mini.h: don't use gboolean for bitfields.
14383         * mini.c: verifier changes for fields and methods accessibility.
14384
14385 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
14386
14387         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
14388         lazy icall wrapper changes.
14389
14390         * dominators.c: Replace all the dominator algorithms with faster
14391         ones from the linear-il branch.
14392
14393         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
14394         the mempool.
14395
14396         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
14397         common cases are done first.
14398
14399         * mini-amd64.c: Fix some warnings.
14400
14401         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
14402         from the mempool.
14403
14404         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
14405         added code.
14406
14407         * mini.h: Add a missing prototype.
14408
14409 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
14410
14411         * mini.c: Compile icall wrappers lazily.
14412
14413         * mini-codegen.c: Use printf instead of g_print since its much faster.
14414
14415         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
14416         function.
14417
14418         * mini.c (optimize_branches): Cache the negative result from 
14419         remove_block_if_useless ().
14420
14421         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
14422         Also fix some bblock linking issues.
14423
14424         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
14425         assembly files.
14426
14427         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
14428
14429         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
14430         accessed fields first, for better cache behavior.
14431         
14432 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
14433
14434         * mini.c: speedup IList<T> array accesses.
14435
14436 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
14437
14438         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
14439         inline_costs counter. Fixes #77190.
14440
14441 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
14442
14443         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
14444         trace messages. Fixes #77706.
14445
14446 2006-03-04  Martin Baulig  <martin@ximian.com>
14447
14448         * tramp-amd64.c, tramp-x86.c
14449         (mono_debugger_create_notification_function): Use
14450         mono_global_codeman_reserve() to allocate a buffer at runtime and
14451         return it.
14452
14453         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
14454
14455         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
14456         notification function at runtime and then call `initialize' in the
14457         `MONO_DEBUGGER__debugger_info' vtable.
14458
14459 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
14460
14461         * iltests.il: Fix a visibility problem.
14462
14463 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
14464
14465         * driver.c, mini.c: add hooks for the counters API.
14466
14467 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
14468
14469         * driver.c: show disabled options.
14470
14471 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
14472
14473         * linear-scan.c: always use cost-driven selection.
14474
14475 2006-02-28  Raja R Harinath  <rharinath@novell.com>
14476
14477         * jit-icalls.c (helper_compile_generic_method): Revert change from
14478         2006-02-24.
14479
14480 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
14481
14482         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
14483
14484 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
14485
14486         * inssel.brg: style fixes, mostly to force the updated monoburg
14487         to run for people using svn.
14488
14489 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
14490
14491         * mini.c: match monoburg changes.
14492
14493 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
14494
14495         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
14496         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
14497         declaration in the header file.
14498
14499 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
14500
14501         * helpers.c: reduce relocations and mem usage.
14502
14503 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
14504
14505         * mini.h, mini-codegen.c: disable logging features if
14506         requested by configure.
14507
14508 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
14509
14510         * mini.c: tiny verifier changes.
14511
14512 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
14513
14514         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
14515         cpu-pentium.md: stack alignment changes for osx/x86,
14516         partially from Geoff Norton <gnorton@customerdna.com>.
14517
14518 2006-02-24  Raja R Harinath  <harinath@gmail.com>
14519
14520         * jit-icalls.c (helper_compile_generic_method): Update to changes
14521         in metadata/class.c.
14522
14523 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
14524         
14525         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
14526         
14527         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
14528         interface calls with large offsets.
14529
14530 2006-02-23  Raja R Harinath  <rharinath@novell.com>
14531
14532         * jit-icalls.c (helper_compile_generic_method): Document the
14533         special-case we depend on so that we can inflate the method twice
14534         with the same context with no bad side-effects.
14535
14536 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
14537
14538         * mini-x86.c, mini-amd64.c: fix for case when xen support
14539         is disabled.
14540
14541 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
14542
14543         * mini-x86.c, mini-amd64.c: generate code to access tls items
14544         in a faster way for Xen systems.
14545
14546 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
14547
14548         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
14549         updates and compilation fixes for the OSX/x86 port, mostly from
14550         Geoff Norton <gnorton@customerdna.com>.
14551
14552 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
14553
14554         * inssel.brg: faster interface call implementation
14555         to sync with the interface_offsets MonoVTable changes.
14556
14557 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
14558
14559         * mini.c: more verification checks.
14560
14561 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
14562
14563         * mini.c: added a few more verification checks.
14564
14565 2006-02-17      Neale Ferguson <neale@sinenomine.net>
14566
14567         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
14568         facility on the processor and use it if available.
14569
14570 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
14571
14572         * driver.c, aot.c, mini.c: throw exception if the IL code is
14573         invalid or unverifiable.
14574
14575 2006-02-17  Raja R Harinath  <rharinath@novell.com>
14576
14577         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
14578         m.StructField.
14579
14580 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
14581
14582         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
14583
14584 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
14585
14586         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
14587         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
14588         handling of instantiated generic valuetypes.
14589
14590 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
14591
14592         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
14593         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
14594         instead.
14595
14596         * generics.2.cs: Revert the nullable reftypes tests.
14597
14598 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
14599
14600         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
14601         using __builtin_frame_address (1) as it doesn't work in the presence
14602         of optimizations. Hopefully fixes #77273.
14603
14604         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
14605         -> generics.cs change as it doesn't work with some automake versions.
14606
14607 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
14608
14609         * mini.c: handle systems that sue a different way to
14610         retrieve the stack address of the current thread.
14611
14612 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
14613
14614         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
14615         it specially in the makefile.
14616
14617         * generics.2.cs: Add tests for nullable reference types.
14618
14619 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
14620
14621         * mini.c: always handle the case when mono_jit_init()
14622         is called in a thread different from the main thread,
14623         confusing libgc (bug #77309).
14624
14625 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
14626
14627         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
14628
14629 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
14630
14631         * mini.c: change optimize_branches () to use a single loop
14632         and introduce a new optimization to simplify some range checks.
14633
14634 2006-02-03  Martin Baulig  <martin@ximian.com>
14635
14636         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
14637         and merged with debugger_thread_manager_add_thread().
14638         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
14639         inform the debugger about the main thread.
14640
14641 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
14642
14643         * basic.cs: Add test for div.un/rem.un constant folding.
14644
14645 2006-02-03  Neale Ferguson <neale@sinenomine.net>
14646
14647         * cpu-s390x.md: correct int_xor_imm length
14648
14649 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
14650
14651         * generics.2.cs: New test for #77442.
14652
14653         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
14654         #77442.
14655
14656 2006-02-02  Martin Baulig  <martin@ximian.com>
14657
14658         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
14659         <mono/metadata/mono-debug-debugger.h>   
14660
14661         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
14662
14663 2006-02-02  Martin Baulig  <martin@ximian.com>
14664
14665         * debug-debugger.h: New header file for debug-debugger.c.
14666
14667         * debug-debugger.c: Big API cleanup; don't run the managed Main()
14668         function is a separate thread anymore; add support for attaching.
14669
14670 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
14671
14672         * tramp-x86.c: Fix a warning.
14673
14674 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
14675
14676         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
14677         on very large methods.
14678
14679         * aot.c (load_patch_info): Fix a warning.
14680
14681 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
14682
14683         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
14684         mini-ops.h: alu membase optimizations.
14685
14686 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
14687
14688         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
14689         to speedup StringBuilder.
14690
14691 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
14692
14693         * dominators.c (mono_compute_natural_loops): Fix detection of
14694         loop body start blocks.
14695
14696         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
14697
14698 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
14699
14700         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
14701         #75145.
14702
14703 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
14704
14705         * aliasing.c: Fixed aliasing issue on 64 bit archs.
14706
14707 2006-01-25  Martin Baulig  <martin@ximian.com>
14708
14709         * debug-debugger.c: Moved the `MonoDebuggerManager' and
14710         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
14711         started to cleanup this file a little bit.
14712
14713 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
14714
14715         * mini.c: optimize a codepath frequently happening in generics code.
14716
14717 2006-01-23  Martin Baulig  <martin@ximian.com>
14718
14719         * Makefile.am: Only compile debug-debugger.c on supported platforms.
14720
14721         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
14722         functions directly.
14723
14724         * driver.c: debug-debugger.c is only available if
14725         `MONO_DEBUGGER_SUPPORTED' is defined.   
14726
14727 2006-01-23  Martin Baulig  <martin@ximian.com>
14728
14729         * debug-debugger.c: Only enable this on platforms where the Mono
14730         Debugger is working (x86 and x86_64).
14731
14732 2006-01-21  Martin Baulig  <martin@ximian.com>
14733
14734         The Mono Debugger is now using the normal `mono' instead of the
14735         `mono-debugger-mini-wrapper' when executing managed code.
14736
14737         * debug-debugger.c: New file; previously known as
14738         debugger/wrapper/wrapper.c.
14739
14740         * debug-mini.c (mono_init_debugger): Removed.
14741
14742         * driver.c (mono_main): Added new `--inside-mdb' command line
14743         argument which is used when running inside the debugger.
14744
14745 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
14746
14747         * liveness.c (mono_analyze_liveness): Remove some unused data
14748         structures.
14749
14750 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
14751
14752         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
14753
14754 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
14755
14756         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
14757         depends on implementation details of monobitset.
14758
14759         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
14760         Fixes #77271.
14761
14762 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
14763
14764         * liveness.c: Update after monobitset changes.
14765
14766 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
14767
14768         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
14769
14770 2006-01-11 Neale Ferguson <neale@sinenomine.net>
14771
14772         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
14773
14774         * mini-s390x.c: Remove warning messages.
14775
14776 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
14777
14778         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
14779
14780 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
14781
14782         * generics.2.cs: Add ldelem/stelem_any test.
14783
14784 2006-01-10 Neale Ferguson <neale@sinenomine.net>
14785
14786         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
14787
14788 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
14789
14790         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
14791         
14792 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
14793
14794         * generics.2.cs: Reenable vtype tests.
14795
14796         * inssel-x86.brg: Remove an icorrect valuetype rule.
14797
14798 2006-01-06 Neale Ferguson <neale@sinenomine.net>
14799
14800         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
14801         initial support for OP_ABS.
14802
14803 2006-01-05 Neale Ferguson <neale@sinenomine.net>
14804
14805         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
14806
14807 2006-01-05 Neale Ferguson <neale@sinenomine.net>
14808
14809         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
14810         conversion and implement LADD/LSUB.
14811
14812         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
14813         architectures.
14814
14815 2006-01-05 Neale Ferguson <neale@sinenomine.net>
14816
14817         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
14818
14819         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
14820         architectures.
14821
14822 2006-01-05 Neale Ferguson <neale@sinenomine.net>
14823
14824         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
14825         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
14826         (stack walk problem).
14827
14828 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
14829
14830         * aot.c (mono_aot_load_method): Fix a warning.
14831
14832 2006-01-03  Neale Ferguson <neale@sinenomine.net>
14833
14834         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
14835
14836 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
14837
14838         * iltests.il: Add test for #77148.
14839
14840         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
14841         #77148.
14842
14843 2006-01-03  Neale Ferguson <neale@sinenomine.net>
14844
14845         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
14846
14847 2006-01-03  Neale Ferguson <neale@sinenomine.net>
14848
14849         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
14850         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
14851
14852         * basic-long.cs: Add lconv-to-r4/r8 tests.
14853
14854 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
14855
14856         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
14857
14858         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
14859         here as on other archs.
14860
14861 2005-12-29 Neale Ferguson <neale@sinenomine.net>
14862
14863         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
14864
14865 2005-12-29 Neale Ferguson <neale@sinenomine.net>
14866
14867         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
14868         
14869         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
14870
14871         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
14872         instrument_prolog; Add memory_barrier instruction.
14873
14874 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
14875
14876         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
14877
14878 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
14879
14880         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
14881
14882         * aliasing.c inssel.brg: Fix warnings.
14883
14884         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
14885         could skip initialization of some parts of memory.
14886
14887         * mini.c mini-ia64.c: Fix warnings.
14888
14889         * inssel-sparc.brg: Add an implementation of lneg which actually works.
14890
14891 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
14892
14893         * aliasing.c (mono_build_aliasing_information): Add a workaround for
14894         a crash seen on sparc.
14895
14896         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
14897         
14898         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
14899
14900 2005-12-21 Neale Ferguson <neale@sinenomine.net>
14901
14902         * mini-ops.h: Add s390_backchain instruction
14903
14904         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
14905
14906         * cpu-s390.md: Add s390_backchain instruction
14907
14908         * mini-s390.c: Significant ABI changes
14909
14910         * mini-s390.h: Cater for zero length structures
14911
14912 2005-12-20 Neale Ferguson <neale@sinenomine.net>
14913
14914         * mini-s390.c: ABI fixes
14915
14916         * inssel-s390.brg: Remove debug statements
14917
14918         * cpu-s390.md: Fix length of ATOMIC_xx operations
14919
14920 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
14921
14922         * basic-float.cs: Add float<->long conversion tests.
14923
14924 2005-12-16 Neale Ferguson <neale@sinenomine.net>
14925
14926         * mini-s390.c: Fix LOCALLOC processing.
14927
14928         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
14929
14930 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
14931
14932         * iltests.il: Add tests for some opcodes not covered by the other
14933         tests.
14934
14935 2005-12-15 Neale Ferguson <neale@sinenomine.net>
14936
14937         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
14938         register loading for Tail processing; Correct trace output.
14939
14940         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
14941
14942         * cpu-s390.md: Correct size of jmp instruction. 
14943
14944 2005-12-13 Neale Ferguson <neale@sinenomine.net>
14945
14946         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
14947
14948 2005-12-13 Neale Ferguson <neale@sinenomine.net>
14949
14950         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
14951           Bring s390 up to current level.
14952
14953 2005-12-12  Zltan Varga  <vargaz@gmail.com>
14954
14955         * generics.2.cs: Disable the newly added tests as they do not work yet.
14956         
14957         * generics.2.cs: Add valuetype tests.
14958
14959 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
14960
14961         * basic-long.cs: Add i4->u8 test.
14962
14963         * objects.cs: Add tests for JIT intrinsic.
14964
14965         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
14966         optimizations lost by a mistake.
14967
14968 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
14969
14970         * basic-long.cs: Remove a test moved to objects.cs.
14971
14972         * arrays.cs: Add more array tests.
14973
14974 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
14975
14976         * arrays.cs: Add new tests for multi-dimensional arrays.
14977
14978 2005-12-06  Raja R Harinath  <rharinath@novell.com>
14979
14980         * Makefile.am (test_sources2): Add generics.2.cs.
14981         (EXTRA_DIST): Add test_sources2.
14982
14983 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
14984
14985         Support for boxing and unboxing nullable types as well as the
14986         isinst operation on nullables, per the CLI ammendment.
14987
14988         * inssel.brg (CEE_ISINST): Special case for nullable
14989
14990         * mini.c (handle_unbox_nullable): new method
14991         (handle_box): Special case for nullable types
14992         (mono_method_to_ir): Call handle_unbox_nullable in correct
14993         places.
14994
14995         * generics.2.cs: New test suite
14996
14997         * Makefile.am: Support for regression tests with generics.
14998
14999 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
15000
15001         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
15002         allocated to registers. Fixes #76800.
15003
15004 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
15005
15006         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
15007
15008 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
15009
15010         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
15011         of platforms.
15012
15013 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
15014
15015         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
15016         objects.cs.
15017
15018         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
15019         
15020         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
15021 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
15022
15023         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
15024         single precision before storing to a single precision location.
15025
15026 2005-11-28  Raja R Harinath  <rharinath@novell.com>
15027
15028         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
15029
15030 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
15031
15032         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
15033         correct files.
15034
15035         * basic.cs: Remove test_0_byte_compares test which was moved to
15036         objects.cs a long time ago.
15037
15038 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
15039
15040         * aliasing.c: Fixed aliasing issue on 64 bit archs.
15041
15042 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
15043
15044         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
15045         handlers are called.
15046
15047         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
15048         throwing code.
15049
15050          * mini-ia64.c: Add support for the throw->branch exception 
15051         optimization.   
15052
15053         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
15054
15055 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
15056
15057         * mini.c: Enabled "fastpath" deadce :-)
15058         
15059 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
15060
15061         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
15062         alias analysis pass to support it.
15063         * mini.h: Likewise.
15064         * ssa.c: Likewise.
15065         * liveness.c: Likewise (liveness computation can use aliasing
15066         information to be more accurate).
15067         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
15068         moreover made so that "--compile-all" uses the given optimization
15069         flags and not the default ones.
15070         * aliasing.c: Alias analysis (new file).
15071         * aliasing.h: Likewise.
15072         * Makefile.am: added "aliasing.c" and "aliasing.h".
15073         
15074 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
15075
15076         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
15077         OP_L opcodes.
15078
15079 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
15080
15081         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
15082         fp >= end_of_stack exit condition, as it is not needed, and it might
15083         become true for fp eliminated frames.
15084
15085 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
15086
15087         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
15088         coded offsets.
15089
15090 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
15091
15092         * mini-arm.c: fixed alignment of doubles/longs to match
15093         the C ABI (bug #76635).
15094
15095 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
15096
15097         * aot.c: fix compilation with --enable-minimal=aot.
15098
15099 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
15100
15101         * mini-arm.c: fixed compatibility with the new
15102         floating point emulator package for compares.
15103
15104 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
15105
15106         * mini.c : reverted sig->pinvoke changes (r51396-51397).
15107
15108 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
15109
15110         * mini-exceptions.c (print_stack_frame): Output to stderr.
15111         (mono_handle_native_sigsegv): Ditto.
15112
15113 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
15114
15115         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
15116         OP_LCONV_TO_OVF_I implementation.
15117
15118         * mini-amd64.c: Add support for the throw->branch exception 
15119         optimization.
15120
15121         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
15122         when the catch clause catches a more general exception, i.e. Object.
15123
15124 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
15125
15126         * cpu-ia64.md: Remove unused opcodes.
15127
15128         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
15129         specific defines for architectures defining USE_SIGACTION.
15130
15131         * mini-ia64.c: Fix some warnings.
15132
15133         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
15134         version seemed to skip a frame.
15135
15136 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
15137
15138         * mini.c: Clean up the usage of sig->pinvoke flag. Now
15139         only calls which are made to native code use this flag.
15140
15141 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
15142
15143         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
15144         varargs methods as well.
15145         
15146         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
15147         which have save_lmf set. Reorganize methods prologs a bit.
15148
15149         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
15150         debugger to the proper place.
15151
15152 2005-10-29  Martin Baulig  <martin@ximian.com>
15153
15154         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
15155         when running inside the debugger until the debugger has support
15156         for it.
15157
15158 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
15159
15160         * mini.h: Fix a warning.
15161
15162 2005-10-24  Miguel de Icaza  <miguel@novell.com>
15163
15164         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
15165         we expose publicly, this returns the string.
15166
15167 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
15168
15169         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
15170         with fp elimination.
15171
15172 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
15173
15174         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
15175         native stacktrace using the glibc 'backtrace' function if available.
15176
15177 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
15178
15179         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
15180
15181         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
15182         handle SIGSEGVs received while in native code.
15183
15184         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
15185         code, call mono_handle_native_sigsegv which will abort the runtime
15186         after printing some diagnostics, instead of converting it into a
15187         confusing NullReferenceException.
15188
15189 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
15190
15191         * cpu-pentium.md: Remove unused opcodes.
15192
15193 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
15194
15195         * mini-amd64.h (MonoLMF): Add rsp field.
15196
15197         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
15198         the lmf too.
15199
15200 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
15201
15202         * mini-codegen.c (get_register_spilling): Fix some warnings.
15203
15204 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
15205
15206         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
15207         elimination during exception handling. Enable fp elimination by
15208         default.
15209
15210         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
15211         elimination.
15212
15213 2005-10-16  Martin Baulig  <martin@ximian.com>
15214
15215         * mini-exceptions.c
15216         (mono_debugger_run_finally): New public method for the debugger.
15217
15218 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
15219
15220         * debug-mini.c (mono_debug_init_method): Fix warning.
15221
15222         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
15223         the 'exname' parameter const to fix some warnings.
15224
15225 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
15226
15227         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
15228         introduced by the previous patch.
15229
15230 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
15231
15232         * basic-float.cs: Add test for precision of float arithmetic.
15233
15234         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
15235         when loading/storing single values from/to memory.
15236
15237         * mini.c (mono_jit_compile_method_with_opt): Create the function
15238         pointers in the correct domain.
15239
15240 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
15241
15242         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
15243         introduced by previous patch.
15244         
15245         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
15246         when out_filter_idx is NULL.
15247
15248         * mini-exceptions.c: Don't run filter clauses twice during exception
15249         handling. Fixes #75755.
15250
15251 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
15252
15253         * aot.c: Add support for ldflda wrappers.
15254
15255         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
15256         #75902.
15257
15258 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
15259
15260         * mini.c, mini.h: do not consider exception handlers blocks when
15261         setting up interface variables.
15262
15263 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
15264
15265         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
15266
15267 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
15268
15269         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
15270         causes a regression.
15271
15272         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
15273
15274 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
15275
15276         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
15277         of the OP_P definitions.
15278
15279         * TODO: Add a proposal for dealing with the CEE/OP mess.
15280
15281         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
15282         optimizations from the x86 port.
15283
15284         * cpu-amd64.md: Ditto.
15285
15286         * basic.cs basic-long.cs: Add tests.
15287
15288 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
15289
15290         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
15291         Patrik Torstensson's implementation of my exception-handling
15292         optimization idea, when the exception object is not used
15293         (bug #62150).
15294
15295 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
15296
15297         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
15298         of the mul_imm optimizations from the old jit.
15299
15300 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
15301
15302         * mini.c, liveness.c: patch by Patrik Torstensson and
15303         Zoltan Varga to improve performance in methods with
15304         exception clauses.
15305
15306 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
15307
15308         * driver.c: Remove 'Globalization' entry from --version.
15309
15310 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
15311
15312         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
15313         there is a profiler interested in JIT events.
15314
15315         * aot.c: Load profile files produced by the AOT profiling module, and
15316         reorder methods based on the profiling info. Add a 'method_order' table
15317         to the AOT file to make mono_aot_find_jit_info work with the reordered
15318         methods.
15319
15320         * mini.h: Bump AOT file version info.
15321
15322 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
15323
15324         * mini-arm.h: work around what looks like a gcc bug when optimizations
15325         are enabled.
15326
15327 2005-09-28  Raja R Harinath  <rharinath@novell.com>
15328
15329         * Makefile.am (AM_CFLAGS): Don't use += to append inside
15330         conditionals.  Use ...
15331         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
15332
15333 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
15334
15335         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
15336         to determine the amount of memory to copy when passing valuetypes.
15337
15338         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
15339         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
15340
15341 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
15342
15343         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
15344         information about aot.
15345
15346 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
15347
15348         * *.c: Replace the use of {Enter,Leave}CriticalSection with
15349         macros. This will allow a deadlock debugger to easily be plugged
15350         in.
15351
15352 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
15353
15354         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
15355
15356 2005-09-27  Raja R Harinath  <rharinath@novell.com>
15357
15358         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
15359         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
15360         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
15361         ($(arch_built)) [CROSS_COMPILING]: Error out.
15362
15363 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
15364
15365         * aot.c: Add support for the no_special_static flag for classes.
15366
15367 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
15368
15369         * Reapply reverted patches.
15370
15371         * *: Revert r50174 as well.
15372
15373         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
15374
15375 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
15376
15377         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
15378
15379 2005-09-23  Miguel de Icaza  <miguel@novell.com>
15380
15381         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
15382         part of the SIG_HANDLER_SIGNATURE.  
15383
15384 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
15385
15386         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
15387         statistics.
15388
15389         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
15390         introduced by previous patch.
15391
15392 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
15393
15394         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
15395         saved registers too.
15396
15397         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
15398         upon the information returned by get_call_info ().
15399         
15400         * mini-x86.c (add_float): Fix stack size calculation.
15401         (mono_arch_call_opcode): Rewrite this so it works based up the
15402         information returned by get_call_info ().
15403         (mono_arch_get_this_vret_args): Ditto.
15404
15405 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
15406
15407         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
15408         in cinfo to determine the registers which need to be used.
15409
15410 2005-09-20  Miguel de Icaza  <miguel@novell.com>
15411
15412         * driver.c (mono_main): Add --server and --desktop flags. 
15413
15414 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
15415
15416         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
15417         registers as global registers.
15418
15419         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
15420         longer needed with the new register allocator.
15421
15422         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
15423
15424         * cpu-ia64.md: Remove unused opcodes.
15425         
15426         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
15427         
15428 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
15429
15430         * cpu-amd64.md: Remove unused opcodes.
15431
15432         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
15433         needed with the new register allocator.
15434
15435         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
15436         reg-reg moves.
15437
15438 2005-09-16  Raja R Harinath  <rharinath@novell.com>
15439
15440         * Makefile.am (check-local): Don't invoke semdel-wrapper.
15441
15442 2005-09-16  Martin Baulig  <martin@ximian.com>
15443
15444         * exceptions-amd64.c
15445         (throw_exception): Don't call mono_debugger_throw_exception() if
15446         we're a rethrow - see the FIXME in the code.
15447
15448 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
15449
15450         * mini.c (mono_init_exceptions): This only works on some architectures.
15451         
15452 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
15453
15454         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
15455         on ia64.
15456
15457         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
15458
15459         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
15460         now in mini-exceptions.c.
15461
15462 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
15463
15464         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
15465         now in mini-exceptions.c.
15466
15467 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
15468
15469         * exceptions-x86.c: Applied patch from Patrik Torstensson 
15470         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
15471
15472         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
15473         code into mini-exceptions.c. Add some assertions to it.
15474
15475 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
15476
15477         * aot.c (emit_section_change): Applied patch from "The Software Team" 
15478         (<software@solmersa.com>). Fix as errors on windows.
15479
15480 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
15481
15482         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
15483         method info into the LMF.
15484
15485 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
15486         
15487         * mini-ia64.c: Add proper unwind info for method epilogs.
15488
15489         * exceptions-ia64.c: Add some code to help debugging.
15490         
15491         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
15492
15493         * mini-exceptions.c: Fix warning.
15494
15495 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
15496
15497         * mini.c: Really fix build.
15498
15499         * mini-x86.c mini-amd64.c: Fix build.
15500
15501 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
15502
15503         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
15504
15505         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
15506         some Interlocked methods as intrinsics.
15507
15508         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
15509         for Thread methods as well.
15510
15511         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
15512
15513         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
15514
15515         * mini-ia64.c mini-x86.c mini-amd64.c 
15516         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
15517         OP_MEMORY_BARRIER.
15518         
15519         * mini.c (mono_init_exceptions): Fix build breakage.
15520
15521 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
15522
15523         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
15524         of instructions. Use the new ia64_unw_op macros for emitting unwind
15525         info.
15526
15527         * mini.c (mono_init_exceptions): Initialize exception handling
15528         related trampolines at startup.
15529
15530 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
15531
15532         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
15533
15534 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
15535
15536         * mini.c: Handle type loading errors gracefully during compilation and
15537         throw the appropriate exception.
15538
15539 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
15540
15541         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
15542         for the mono binary.
15543
15544 2005-09-09  Martin Baulig  <martin@ximian.com>
15545
15546         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
15547         the release.
15548
15549 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
15550
15551         * mini-arm.h: use emulation for conv.r.un for the release.
15552
15553 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
15554
15555         * mini-arm.c, objects.cs: more fixes and tests for them.
15556
15557 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
15558
15559         * mini-arm.c: align structures to at least 4 bytes to be able
15560         to keep our current optimized memcpy.
15561
15562 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
15563
15564         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
15565
15566 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15567
15568         * mini.c: ignore SIGPIPE.
15569
15570 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
15571
15572         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
15573
15574         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
15575
15576 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
15577
15578         * mini.h: Add prototype for mono_allocate_stack_slots_full.
15579
15580 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
15581
15582         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
15583         exception handling support.
15584         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
15585         patch by Brian Koropoff <briank@marakicorp.com>).
15586
15587 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
15588
15589         * mini.c: revert another 'optimization' which breaks when
15590         items on the eval stack need to be saved at a basic block end
15591         (bug #75940).
15592
15593 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
15594
15595         * jit-icalls.c: for arrays, ensure we always provide
15596         lower bounds.
15597
15598 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
15599
15600         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
15601         
15602         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
15603
15604 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
15605
15606         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
15607         arguments in their original register.
15608
15609 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
15610
15611         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
15612         memset/memcpy.
15613
15614         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
15615         when ssapre is enabled.
15616
15617         * inssel-long.brg: Fix bug in previous patch.
15618
15619         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
15620         multiplication by a constant.
15621
15622 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
15623
15624         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
15625         icc.
15626
15627         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
15628         saving registers.
15629
15630 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
15631
15632         * inssel-arm.brg: apply changes tested by Brian Koropoff
15633         <briank@marakicorp.com>.
15634
15635 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
15636
15637         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
15638         
15639 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
15640
15641         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
15642         to the same register if dreg is just a base register.
15643         (print_ins): Improve printing of membase opcodes.
15644
15645         * inssel-x86.brg: Add optimized ldind(reg) rules.
15646
15647         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
15648
15649 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
15650
15651         * mini.c: when running under valgrind, set the stack bottom for
15652         the GC at the actual approximate stack for the app (fixes running
15653         mono with valgrind).
15654
15655 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
15656
15657         * mini.c: do no break at the first valuetype to init found
15658         (fixes bug #75791).
15659
15660 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
15661
15662         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
15663
15664 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
15665
15666         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
15667
15668 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
15669
15670         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
15671
15672 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
15673
15674         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
15675
15676         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
15677         code.
15678
15679         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
15680         code.
15681
15682         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
15683         methods.
15684
15685 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
15686
15687         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
15688
15689 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
15690
15691         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
15692         in the tail recursion optimization.
15693
15694         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
15695         debug info into the assembly file.
15696
15697         * iltests.il: Add test for filter regions.
15698
15699         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
15700         initial stack of filter regions. Fixes #75755.
15701
15702 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
15703
15704         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
15705         stack requirements.
15706
15707 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
15708
15709         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
15710         the check for an already compiled method on non-ia64 platforms.
15711         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
15712         proper domain.
15713
15714         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
15715
15716         * inssel-x86.brg: Add some optimized call rules.
15717
15718 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
15719
15720         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
15721         method here.
15722
15723         * mini.h mini-trampolines.c: Pass the trampoline argument to 
15724         mono_arch_patch_delegate_trampoline.
15725
15726         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
15727
15728         * mini-trampolines.c: Fix build.
15729
15730         * mini-amd64.h: Add delegate trampolines.
15731
15732         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
15733
15734         * inssel-amd64.brg: Add optimized call rules.
15735         
15736         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
15737
15738         * inssel-ia64.brg: Add optimized ldind(reg) rules.
15739
15740 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
15741
15742         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
15743         change.
15744
15745         * mini-ia64.c: Remove LMF fixmes.
15746
15747         * mini-ia64.h: Remove most fields from LMF.
15748
15749         * inssel-ia64.brg (stmt): Fix unaligned access errors.
15750
15751         * mini-trampolines.c: Add support for IA64 function descriptors.
15752
15753         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
15754         for IA64 function descriptors.
15755
15756 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
15757
15758         * tramp-arm.c: patch the vtable for virtual calls. Added
15759         support code to register/unregister the LMF.
15760         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
15761         more LMF work.
15762
15763 2005-08-19  Dick Porter  <dick@ximian.com>
15764
15765         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
15766         bit value if needed.
15767
15768 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
15769
15770         * mini.c (mini_get_method): Move handling of wrapper data here.
15771
15772         * mini.c (mono_method_to_ir): Add support for dynamic methods.
15773
15774         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
15775         virtual.
15776
15777         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
15778         bblock->code does not remain empty.
15779
15780 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
15781
15782         * arrays.cs: Add regression test for #75832.
15783
15784         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
15785         rules. Fixes #75832.
15786
15787         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
15788         instruction scheduling.
15789
15790 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
15791
15792         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
15793
15794 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
15795
15796         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
15797
15798         * mini-codegen.c: Fix VC build.
15799
15800         * cpu-pentium.md: Increase length of atomic_exhange_i4.
15801
15802 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15803
15804         * mini.h: fix signature for mono_register_opcode_emulation.
15805
15806 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
15807
15808         * mini.c: Get rid of most of the helper_sig_... constants using
15809         mono_create_icall_signature ().
15810
15811 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
15812
15813         * jit-icalls.c (helper_ldstr): New helper function.
15814
15815         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
15816
15817         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
15818         throw, load the string using a helper call instead of creating a string object.
15819
15820         * aot.c: Update after LDSTR changes.
15821
15822         * mini.h: Bump AOT file version.
15823         
15824         * aot.c: Save class size info into the AOT file. Print more statistics during
15825         compilation.
15826
15827         * mini.h: Bump AOT file version.
15828
15829         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
15830         ordering of disasm cases. Fixes #74957.
15831
15832 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
15833
15834         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
15835         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
15836         the generic code needed for the ARM port.
15837
15838 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
15839
15840         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
15841         inssel-arm.brg: more ARM features and fixes.
15842
15843 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
15844
15845         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
15846         ARM port work in progress.
15847
15848 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
15849
15850         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
15851
15852         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
15853
15854         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
15855
15856         * inssel.brg (mini_emit_memset): Add support for unaligned access.
15857
15858         * *-ia64.*: Ongoing IA64 work.
15859         
15860         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
15861
15862 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
15863
15864         * TODO: Remove out-of-data todo stuff.
15865
15866         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
15867         dead code.
15868
15869         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
15870
15871         * mini.h: Bump corlib version.
15872
15873 2005-07-27  Martin Baulig  <martin@ximian.com>
15874
15875         * mini-codegen.c
15876         (create_copy_ins): Added `const unsigned char *ip' argument; set
15877         `copy->cil_code' from it.
15878
15879 2005-07-27  Martin Baulig  <martin@ximian.com>
15880
15881         * mini-exceptions.c (mono_handle_exception): Don't call
15882         mono_debugger_handle_exception() for filters.
15883
15884 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
15885
15886         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
15887         as well.
15888
15889 2005-07-26  Martin Baulig  <martin@ximian.com>
15890
15891         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
15892
15893         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
15894         helper_compile_generic_method() if the method is actually virtual
15895         and non-final.
15896
15897 2005-07-26  Martin Baulig  <martin@ximian.com>
15898
15899         * mini.c
15900         (trampoline_code): Renamed to `mono_trampoline_code' and made it
15901         public; this is now accessed directly by the debugger.
15902         (mono_generic_trampoline_code): Removed.
15903
15904         * debug-mini.c
15905         (mono_debug_init_method): Also add interncalls and wrappers.
15906
15907 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
15908
15909         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
15910
15911 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
15912
15913         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
15914
15915 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
15916
15917         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
15918
15919 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
15920
15921         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
15922         getting TLS offsets on AMD64 too.
15923
15924 2005-07-20  Kornel Pal <kornelpal@hotmail.com>
15925
15926         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
15927
15928 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
15929
15930         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
15931         inssel-arm.brg, mini-arm.h: ARM port work in progress.
15932
15933 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
15934
15935         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
15936
15937         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
15938         to mini.c.
15939
15940         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
15941         mono_sparc_is_virtual_call ().
15942         
15943         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
15944
15945         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
15946         trampoline parameters.
15947
15948         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
15949         
15950         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
15951         to mono_arch_get_vcall_slot_addr.
15952
15953         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
15954         trampoline code.
15955
15956         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
15957
15958 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
15959
15960         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
15961
15962 2005-07-19  Martin Baulig  <martin@ximian.com>
15963
15964         * exceptions-amd64.c (throw_exception): Call
15965         mono_debugger_throw_exception() here like we're doing it on i386.
15966
15967 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
15968
15969         * mini-ia64.c: Add optimized TLS access support.
15970
15971 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
15972
15973         * mini-exceptions.c: Ongoing IA64 work.
15974
15975         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
15976
15977         * mini.c: Use the default optimization set when embedding. Fixes
15978         #75194.
15979
15980 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
15981
15982         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
15983         of trampolines to a separate file.
15984
15985         * mini-trampolines.c: New file.
15986
15987         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
15988         separate file.
15989         
15990         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
15991         amd64/ia64 code.
15992
15993         * mini-codegen.c: Fix cygwin build.
15994
15995 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
15996
15997         * mini.c: Add some minor changes needed by the IA64 port.
15998
15999         * *-ia64.*: Ongoing IA64 work.
16000
16001 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
16002
16003         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
16004         trampolines into arch-independent and arch-dependent parts.
16005
16006         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
16007
16008 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
16009
16010         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
16011
16012         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
16013         the xp-regalloc-branch for amd64.
16014
16015         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
16016         xp-regalloc-branch for x86.
16017
16018 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
16019
16020         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
16021
16022 2005-07-06  Martin Baulig  <martin@ximian.com>
16023
16024         * mini.c
16025         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
16026         (mono_jit_runtime_invoke): Likewise.
16027
16028 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
16029
16030         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
16031         on x86 too.
16032         
16033         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
16034         without loading their metadata. Reorganize the file format so exception handling+
16035         debug info is kept separate from normal method info. Create MonoJitInfo 
16036         structures for methods lazily.
16037
16038         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
16039         loading metadata.
16040         (x86_class_init_trampoline): Patch AOT class init trampolines too.
16041
16042         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
16043
16044         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
16045         in AOT code.
16046
16047         * mini.h: Bump AOT file version.
16048
16049 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
16050
16051         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
16052
16053 2005-07-01  Raja R Harinath  <rharinath@novell.com>
16054
16055         * Makefile.am (check-local): Call semdel-wrapper.
16056
16057 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
16058
16059         * mini-x86.c: Revert the last change as it seems to break the build..
16060
16061 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
16062
16063         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
16064         
16065         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
16066
16067 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
16068
16069         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
16070         outside of the macro, so strange stuff doesn't happen with gcc4
16071         (NEW_AOTCONST_TOKEN): Likewise.
16072
16073 2005-06-28  Martin Baulig  <martin@ximian.com>
16074
16075         * mini.c (mini_class_is_system_array): New static method; use this
16076         instead of `klass->parent == mono_defaults.array_class' everywhere
16077         since this also works for the new generic array class.
16078
16079 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
16080
16081         * inssel.brg: Remove warnings.
16082
16083 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
16084
16085         * mini-ia64.c: Ongoing IA64 work.
16086
16087         * basic-float.cs: Add float->i1 conversion test.
16088
16089         * iltests.il: Add conv.u4 test.
16090
16091 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
16092
16093         * inssel-long.brg: Fix bug caused by last change.
16094
16095 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
16096
16097         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
16098         BSDs.  Allows the x86 JIT to work on OSX86
16099
16100 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
16101
16102         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
16103         u4->i8 conversion.
16104
16105         * mini-ia64.c: Ongoing IA64 work.
16106
16107 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
16108
16109         * mini-ia64.c: Ongoing IA64 work.
16110
16111         * driver.c: Clean up jit_code_hash as well when using --regression.
16112
16113         * inssel-long.brg: Fix long->i4/u4 conversion rules.
16114
16115         * basic-long.cs: Add tests for long->u4 conversion.
16116
16117 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
16118
16119         * mini.c: Take mono_get_domainvar out of macros. This makes sure
16120         that we do not depend on undefined C behavior: the order stuff
16121         gets evaluated within an expression. Fixes mono when compiled on
16122         GCC 4.
16123
16124 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
16125
16126         * *-ia64.*: Ongoing IA64 work.
16127
16128         * aot.c: Lower memory usage while loading AOT methods.
16129
16130         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
16131
16132         * mini.h: Bump AOT file format version.
16133
16134 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
16135
16136         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
16137
16138 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
16139
16140         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
16141         not on callee assembly). Fixed some comments.
16142
16143 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
16144
16145         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
16146         it gets proper disassembly.
16147         (emit_method_info): Remove some dead code.
16148
16149         * mini.c (mini_method_compile): Allways allocate the GOT var in
16150         mono_method_to_ir for emulating opcodes.
16151
16152 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
16153
16154         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
16155         before freeing the code memory. Fixes #74990.
16156
16157         * objects.cs: Add regression test for #74992.
16158
16159         * liveness.c: Extend live ranges of arguments to the beginning of the
16160         method. Fixes #74992.
16161
16162         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
16163         so it points into the faulting instruction.
16164
16165 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
16166
16167         * jit-icalls.c (mono_imul_ovf): Add exception handling.
16168
16169         * *-ia64.*: Ongoing IA64 work.
16170
16171         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
16172
16173 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
16174
16175         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
16176
16177         * *-ia64.*: Ongoing IA64 work.
16178
16179 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
16180
16181         * basic-long.cs: Add tests for add/sub.ovf.
16182
16183         * basic.cs: Add tests for sub.ovf.
16184
16185         * *-ia64.*: Ongoing IA64 work.
16186
16187 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
16188
16189         * *-ia64.*: Ongoing IA64 work.
16190
16191         * basic.cs: Add conv.ovf.i4.un test.
16192
16193 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
16194
16195         * mini.c: (remove_block_if_useless) Fixed bug 75061.
16196         
16197 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16198
16199         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
16200
16201 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
16202
16203         * *-ia64.*: Ongoing IA64 work.
16204
16205 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16206
16207         * trace.[ch]:
16208         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
16209
16210 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
16211
16212         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
16213
16214 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
16215
16216         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
16217
16218         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
16219         of a call is callable by a near call.
16220
16221 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
16222
16223         * mini-ia64.c: Ongoing IA64 work.
16224
16225 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
16226
16227         * genmdesc.c: Make the generated array non-static.
16228
16229         * inssel-long.brg: Fix LSHR_IMM rule.
16230
16231         * *-ia64.*: Ongoing IA64 work.
16232
16233         * *-ia64.*: Ongoing IA64 work.
16234
16235 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
16236
16237         * *-ia64.*: Ongoing IA64 work.
16238
16239         * *-ia64.*: Ongoing IA64 work.
16240         
16241         * mini-ia64.c: Ongoing IA64 work.
16242
16243         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
16244
16245 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
16246
16247         * objects.cs basic-calls.cs: Move some tests to objects.cs.
16248         
16249         * objects.cs basic-long.cs: Move some tests to objects.cs.
16250
16251 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
16252
16253         * *-ia64.*: Ongoing IA64 work.
16254
16255         * iltests.il: Add a new test.
16256
16257         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
16258         newobj. Fixes #75042.
16259
16260 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
16261
16262         * *-ia64.*: Ongoing IA64 work.
16263         
16264         * *-ia64.*: Ongoing IA64 work.
16265         
16266         * *-ia64.*: Ongoing IA64 work.
16267
16268         * basic.cs objects.cs: Move tests accessing static variables as well.
16269
16270         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
16271
16272 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
16273
16274         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
16275
16276         * driver.c: Always print failed tests.
16277
16278         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
16279         frame pointer.
16280
16281         * *ia64*: Ongoing IA64 work.
16282
16283 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
16284
16285         * basic.cs: Add tests for add.ovf. Fix warnings.
16286
16287 2005-05-18  Miguel de Icaza  <miguel@novell.com>
16288
16289         * driver.c (mono_main): Avoid crash if no argument is passed to
16290         --break;  Do not use g_error, but f_printf.   And fix all other
16291         ocurrences of the same crash.
16292
16293 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
16294
16295         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
16296         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
16297         Fixes #74742.
16298
16299 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
16300
16301         * *-ia64.*: Add beginnings of IA64 backend.
16302
16303         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
16304
16305 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
16306
16307         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
16308         Fixes #74925.
16309
16310         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
16311
16312         * mini-amd64.c: Fix a warning.
16313
16314 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
16315
16316         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
16317         in float_neg. Fixes #74897.
16318
16319         * mini-amd64.c (emit_call): Fix another near call bug.
16320
16321 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
16322
16323         * declsec.c: Keep the appdomain information in the structure. Added a 
16324         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
16325         value gets overwritten).
16326         * declsec.h: Set the default MonoArray for the the stack to 6. Added
16327         an MonoAppDomain member to MonoSecurityFrame.
16328         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
16329         used in the stack walk. Now use a MonoArray which grow (double) when
16330         it gets full.
16331
16332 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
16333
16334         * mini.c: Re-enabled runtime cleanup, since running threads should
16335         now properly stop when exiting.
16336
16337 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
16338
16339         * mini-codegen.c: New file contaning the arch-independent local
16340         register allocator. Not used by any architectures yet.
16341
16342         * mini.h linear-scan.c: Merge some changes from the 
16343         mini-xp-local-regalloc branch.
16344
16345 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
16346
16347         * mini-amd64.c (emit_call): Fix calls to native functions when the
16348         runtime is compiled as a shared library. Fixes #74756.
16349
16350         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
16351         on a literal field. Fixes #74751.
16352
16353 2005-04-25  Raja R Harinath  <rharinath@novell.com>
16354
16355         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
16356
16357 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
16358
16359         * objects.cs: Add missing null casting test.
16360
16361 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
16362
16363         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
16364         in wrapper methods. Also rename 'address' variable to 'offset'.
16365
16366 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
16367
16368         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
16369         warnings.
16370         
16371         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
16372
16373         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
16374         work on windows.
16375
16376 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
16377
16378         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
16379
16380 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
16381
16382         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
16383         just the last bytes.
16384
16385 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
16386
16387         * aot.c (mono_compile_assembly): Fix warning.
16388
16389         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
16390         by the _MSC_VER stuff.
16391
16392 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
16393
16394         * inssel-long.brg: Fix #74588.
16395
16396         * cpu-amd64.md: Fix #74591.
16397
16398         * iltests.il: Add new regression tests.
16399
16400 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
16401
16402         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
16403         valuetype.
16404
16405 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
16406
16407         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
16408
16409         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
16410         from Bill Middleton <flashdict@gmail.com>.
16411
16412 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
16413
16414         * arrays.cs: Add new regression test. Fix warnings.
16415
16416 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
16417
16418         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
16419         and leakage in CKFINITE.
16420
16421         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
16422         this to a null op since it is called on amd64 too.
16423
16424         * exceptions-amd64.c (get_throw_trampoline): Align stack.
16425
16426         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
16427         body since this is not used on amd64.
16428         
16429         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
16430
16431         * mini-amd64.c: Remove obsolete fixmes.
16432
16433         * mini.c (print_method_from_ip): Fix debugging support.
16434
16435 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
16436
16437         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
16438         so that expressions that don't give much gain are not reduced.
16439         * ssapre.h: Likewise.
16440
16441 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
16442
16443         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
16444
16445         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
16446
16447         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
16448
16449 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
16450
16451         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
16452
16453         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
16454
16455 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
16456
16457         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
16458         stack touching.
16459
16460         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
16461
16462         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
16463
16464         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
16465
16466         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
16467         MONO_ARCH_USE_SIGACTION. Fixes #74252.
16468
16469         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
16470
16471         * mini-x86.c: Fix up stack overflow handling.   
16472
16473         * exceptions.cs: Add new regression test.
16474
16475 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
16476
16477         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
16478         mono_jit_thread_attach.
16479
16480         * mini.c (mono_method_to_ir): Verify called method is not abstract.
16481
16482 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
16483
16484         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
16485         avoid calling constructors using callvirt.
16486
16487         * inssel.brg: Fix #74073.
16488
16489 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
16490
16491         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
16492         compilation with non-GCC compilers.
16493         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
16494         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
16495
16496 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
16497
16498         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
16499         klass->interface_offsets (will likely fix bug#74073).
16500
16501 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
16502
16503         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
16504
16505 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
16506
16507         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
16508         to amd64_div_reg_size ().
16509         
16510         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
16511
16512 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
16513
16514         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
16515
16516 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
16517
16518         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
16519
16520 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
16521
16522         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
16523         
16524         * mini.c (mono_precompile_assembly): Load and precompile referenced
16525         assemblies as well. Fixes #74015.
16526
16527 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
16528
16529         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
16530
16531 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
16532
16533         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
16534         a lot of checks and (anyway) permissions cannot work until corlib is 
16535         loaded.
16536
16537 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
16538
16539         * mini-ppc.c: fixed ABI issue on sysv/ppc.
16540
16541 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
16542
16543         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
16544         calls (fixes bug#72824).
16545
16546 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
16547
16548         * mini.c: fix tail recursion elimination (see test in bug#73936).
16549
16550 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
16551
16552         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
16553         some fp functions in sse2 mode.
16554
16555 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
16556
16557         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
16558
16559 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
16560
16561         * mini.h mini.c: Add mono_get_jit_tls_key ().
16562
16563         * mini-x86.c: Enable fast TLS support on windows.
16564
16565 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
16566
16567         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
16568         * mini.c: Check for p/invoke method when generating code. If a
16569         p/invoke method, or it's class, isn't decorated with [Suppress
16570         UnmanagedCodeSecurity] then generate code to call System.Security.
16571         UnmanagedDemand (only if the security manager is active).
16572
16573 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
16574
16575         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
16576         last change as it seems to cause strange crashes.
16577         
16578 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
16579
16580         * *.c: handle unsafe function pointers where needed.
16581
16582 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
16583
16584         * mini.c (mono_jit_free_method): Remove the fixme too.
16585
16586 2005-03-15  Miguel de Icaza  <miguel@novell.com>
16587
16588         * mini.c: As discussed, make the code actually free the delegate
16589         thunk now, to enable the debugging of delegate problems, use
16590         MONO_DEBUG=1 when running Mono. 
16591
16592         This takes also care of parts of the leaks as seen by Joe.
16593
16594 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
16595
16596         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
16597         thread_tls_offset calculation.
16598
16599 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
16600
16601         * declsec.c: Reworked linkdemand checks for icall. The previous code
16602         was using the declaration code (untrusted) and didn't work as expected
16603         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
16604         specific case.
16605
16606 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
16607
16608         * iltests.il: Add new localloc test.
16609
16610         * mini-amd64.c: Handle large stack allocations the same way as on
16611         windows if stack overflow handling is working.
16612         
16613         * mini-amd64.c: Allocate the signal stack using mmap.
16614
16615         * mini.c (sigsegv_signal_handler): Fix reading of context.
16616
16617         * mini-exceptions.c: Fix up stack overflow handling.
16618
16619         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
16620
16621         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
16622
16623         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
16624
16625         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
16626
16627         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
16628         tramp_init functions as they are no longer needed.
16629
16630 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
16631
16632         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
16633         
16634         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
16635
16636         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
16637         
16638         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
16639         support that now.
16640
16641         * mini-ops.h: Add OP_LMUL_IMM.
16642
16643         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
16644         long mul/div opcodes as intrinsic.
16645
16646         * mini-amd64.c (emit_call): Handle the case when the callee might be
16647         an AOT method.
16648
16649 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
16650
16651         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
16652         extra safe.
16653         
16654         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
16655
16656         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
16657
16658 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
16659
16660         * mini.c (mono_codegen): Don't leak here, to help people running
16661         monogrind.
16662
16663 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
16664
16665         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
16666         conversions in sse2 mode.
16667
16668         * basic-float.cs: Add regression test.
16669         
16670         * mini-amd64.c: Reenable sse2.
16671
16672 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
16673
16674         * mini-amd64.c: Disable sse2 until some regressions are fixed.
16675
16676 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
16677
16678         * driver.c: Copyright text should include 2005.
16679         
16680 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
16681
16682         * cpu-amd64.md (load_membase): Fix more max lengths.
16683
16684 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
16685
16686         * cpu-amd64.md (load_membase): Fix max length.
16687
16688         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
16689
16690         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
16691
16692         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
16693         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
16694
16695         * basic-float.cs: Add rounding regression test.
16696
16697         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
16698
16699 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
16700
16701         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
16702         structures in registers for pinvoke wrappers.
16703
16704 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
16705
16706         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
16707
16708 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
16709
16710         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
16711         wrapper to mono_jit_thread_attach.
16712
16713         * mini.c (mini_jit_thread_attach): New jit icall.
16714
16715         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
16716         native->managed wrappers.
16717
16718         * exceptions.cs: Add new regression test.
16719
16720         * mini.c (optimize_branches): Check regions in the cbranch to throw
16721         block case as well. Fixes #73242.
16722
16723 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
16724
16725         * mini.c: thread safety fixes.
16726
16727 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
16728
16729         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
16730         patching stuff, since delegates use jump trampolines so there is
16731         no caller.
16732
16733         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
16734         jump trampolines.
16735         
16736         * tramp-amd64.c: Fix build.
16737
16738         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
16739         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
16740
16741         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
16742         Rename this to mono_arch....
16743         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
16744
16745         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
16746
16747         * mini-amd64.c (emit_call): If both the caller and the callee is
16748         guaranteed to have 32 bit addresses, emit a normal call.
16749
16750         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
16751
16752         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
16753         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
16754         method_ptr inside delegates.
16755
16756 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
16757
16758         * mini.c (mono_jit_free_method): Free the method info even if the native code is
16759         invalidated. Fixes #73001.
16760
16761         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
16762
16763         * mini-x86.c: Only use stdcall for pinvokes on windows.
16764
16765 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
16766
16767         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
16768         * mini-x86.c: remove unreliable __thread var offset detection,
16769         use the correct accessors and enable by default.
16770
16771 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
16772
16773         * mini.c (mono_jit_free_method): Fix memory leak.
16774
16775 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
16776
16777         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
16778
16779 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
16780
16781         * cpu-amd64.md: Fix lengths of atomic opcodes.
16782
16783 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
16784
16785         * driver.c: try to not imply using ICU is any good.
16786
16787 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
16788
16789         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
16790         functions as inline ops.
16791
16792         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
16793         some Interlocked functions as inline ops.
16794
16795         * mini.c (move_basic_block_to_end): Fix bug in last patch.
16796
16797         * mini.h (MonoBasicBlock): Reorganize fields a bit.
16798
16799         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
16800
16801         * mini.c: Add support for OP_NOT_TAKEN.
16802
16803         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
16804         structures in registers for pinvoke wrappers.
16805
16806         * mini-amd64.c: Fix warnings.
16807
16808 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
16809
16810         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
16811
16812         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
16813
16814         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
16815         address instead of loading the address from it.
16816
16817         * mini-x86.c: Add support for returning small structs in registers
16818         on Win32. Fixes part of #70864.
16819         
16820 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
16821
16822         * trace.c (get_token): Improve error checking.
16823
16824 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
16825
16826         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
16827
16828 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
16829  
16830         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
16831         it can be reused for MonoClass.
16832         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
16833         _LINKDEMAND.
16834
16835 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
16836
16837         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
16838         instead of a MonoReflectionMethod. The method information wasn't used
16839         when displaying SecurityException details (but will be now).
16840
16841 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
16842
16843         * Makefile.am : windows build fix.
16844
16845 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
16846
16847         * iltests.il: Add new regression test.
16848
16849         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
16850         #72522.
16851
16852 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
16853  
16854         * mini.c: Moved linkdemand check into helper function check_linkdemand
16855         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
16856         LDFTN, LDVIRTFTN).
16857
16858 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
16859
16860         * declsec.c: Added statistics counter for different kinds of 
16861         LinkDemands.
16862         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
16863         (and commented) declaration.
16864         * mini.c: Added statistics counter for security Demand code 
16865         generation. Added display of security statistics.
16866
16867 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
16868
16869         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
16870         Fix compilation errors under gcc-2.95.
16871
16872 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
16873
16874         * mini.c, driver.c: Use the new jit trampoline hashtable
16875
16876 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
16877
16878         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
16879
16880 2005-02-11  Martin Baulig  <martin@ximian.com>
16881
16882         * debug-mini.c (mono_debug_close_method): Free the line number array.
16883
16884 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
16885
16886         * aot.c: Break up large methods into smaller ones. Share GOT slots for
16887         icalls.
16888
16889         * mini.h: Bump AOT file format version. 
16890
16891 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
16892
16893         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
16894         APTC and P/Invoke.
16895         * declsec.h: Added macros to get/set lazyly initialized security 
16896         informations about assemblies. Added new enum for different type of
16897         possible LinkDemand violation. Added function to check LinkDemands.
16898         * mini.h: Added a field to MonoCompile to hold any security violation
16899         detected when JITting a method (so it can be thrown later).
16900         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
16901         and CEE_CALLVIRT. Added code to throw exception at the end of
16902         mini_method_compile (note: the exception is unhandled right now).
16903
16904 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
16905
16906         * mini.c, jit-icalls.c: use the managed implementation of
16907         memset for initobj and memset, to avoid managed <-> unmanaged
16908         transitions.
16909
16910 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
16911
16912         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
16913         optimization if it would need a GOT var.
16914
16915         * basic.cs: Add tests for constant propagation and switch statements.
16916
16917         * ssa.c: Fix out-of-range constant propagation and switch statements.
16918
16919 2005-02-09    <vargaz@freemail.hu>
16920
16921         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
16922
16923 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
16924
16925         * cpu-amd64.md (load_membase): Fix max length of load_membase.
16926
16927 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
16928
16929         * mini.c: update to new signature of mono_class_get_allocation_ftn().
16930
16931 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
16932
16933         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
16934         arithmetic operations.
16935
16936 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
16937
16938         * mini-ppc.c: add a workaround for broken user code that
16939         DllImports vararg functions with non-vararg signatures.
16940
16941 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
16942
16943         * mini.c (mono_jit_compile_method_inner): Add detection and a 
16944         meaningfull error message for assemblies written in Managed C++.
16945
16946         * tramp-amd64.c mini-amd64.h: Add support for 
16947         create_trampoline_from_token ().
16948
16949         * aot.c mini-x86.c abcremoval.c: Applied patch from
16950         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
16951
16952 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
16953
16954         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
16955         which takes a MonoImage/token as parameter instead of a MonoMethod.
16956
16957         * aot.c: Use the new trampoline for initializing vtables.
16958
16959         * aot.c: Add support for ldfld/stfld_remote wrappers.
16960
16961         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
16962         rules for compare <MEM>, IMM.
16963
16964         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
16965
16966         * aot.c: Handle inherited finalizers correctly.
16967
16968 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
16969
16970         * inssel.brg (stmt): Add a missing _setup_... ().
16971
16972         * aot.c: Save some parts of the class state to the AOT file and use it
16973         to recompute that state when a class is initialized.
16974
16975         * mini.c: Install AOT hooks into the runtime.
16976
16977         * mini.h: Bump AOT file format version.
16978         
16979         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
16980         Fixes #72148.
16981
16982         * iltests.il: Add new test.
16983
16984 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
16985
16986         * mini.c: fix typo.
16987
16988 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
16989
16990         * mini.c: setup the statistical profiler in the thread attach
16991         callback to cope with the new single thread code.
16992
16993 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
16994
16995         * mini-ppc.c: ensure we have enough room for the profiler
16996         calls (fixed bug#72084).
16997
16998 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
16999
17000         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
17001         it.
17002
17003 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
17004
17005         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
17006
17007 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
17008
17009         * ssapre.c: Fixed an issue with down safety (this allows IronPython
17010         to succesfully execute parrotbench).
17011         * ssapre.h: Likewise.
17012
17013 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
17014
17015         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
17016         variable for stores to method arguments (fixes a SSAPRE issue).
17017
17018 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
17019
17020         * mini.c: handle value types in dup, fixes gen-112.cs.
17021
17022 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
17023
17024         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
17025         sequence for calls in dynamic methods to avoid thunks.
17026
17027 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
17028
17029         * mini.c: correctly remove dynamic methods from the hashtable.
17030
17031 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
17032
17033         * driver.c: Disabled SSAPRE until fix the bug that appears
17034         in IronPython's parrotbench.
17035
17036 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
17037
17038         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
17039
17040         * mini.c (mono_method_to_ir): Revert the previous change.
17041         
17042         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
17043         when AOT compiling.
17044
17045         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
17046         mono_jit_info_table_find () etc. when running under valgrind.
17047
17048         * inssel.brg: Fix warnings.
17049
17050         * mini-exceptions.c: Fix warnings.
17051
17052 2005-01-31  Martin Baulig  <martin@ximian.com>
17053
17054         * driver.c (compile_all_methods_thread_main): Don't try to compile
17055         generic methods or anything which has type parameters.
17056
17057 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
17058
17059         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
17060
17061         * TestDriver.cs: Add --verbose flags.
17062
17063         * graph.c ssa.c: Fix 64 bit warnings.
17064         
17065         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
17066         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
17067         Fix 64 bit warnings.
17068
17069         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
17070         variable not spotted by gcc.
17071         
17072         * mini-amd64.c inssel-amd64.brg: Applied patch from  
17073         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
17074         X86_COMPARE_MEMBASE opcodes.
17075
17076         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
17077
17078 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
17079
17080         * *: MonoMethod->signature might be NULL now. You *MUST* use
17081         mono_method_signature.
17082
17083 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
17084
17085         * driver.c (compile_all_methods_thread_main): Compile the methods
17086         without invoking cctors.
17087
17088 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
17089
17090         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
17091         * basic-calls.cs: test for the above.
17092
17093 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
17094
17095         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
17096         MonoJitInfo changes.
17097
17098 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
17099
17100         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
17101         eagerly if it contains dynamic methods.
17102         
17103         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
17104
17105         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
17106         trace, it is now computed by an icall from trace_ips.
17107         
17108         * mini-exceptions.c: Fix a warning.
17109
17110 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
17111
17112         * mini-exceptions.c: don't bother getting stack trace info if
17113         it's not going to be used.
17114
17115 2005-01-27  Raja R Harinath  <rharinath@novell.com>
17116
17117         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
17118         ssapre-mini-ops.h.
17119
17120 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
17121
17122         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
17123
17124         * aot.c: Avoid calling mono_method_get_header () if not needed.
17125
17126         * mini.h: Bump AOT file format version.
17127         
17128         * mini.c (mono_emit_native_call): Allocate a GOT var here.
17129
17130         * mini.c (mono_print_tree): Print more info for calls.
17131
17132 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
17133
17134         * declsec.h: Remove warning by adding missing include for marshal.h
17135
17136 2005-01-26  Martin Baulig  <martin@ximian.com>
17137
17138         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
17139         `ip' twice.
17140
17141 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
17142
17143         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
17144         flags.
17145
17146         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
17147
17148         * aot.c (mono_compile_assembly): Fix a warning.
17149
17150 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
17151
17152         * declsec.c: Look for security attributes on the original MonoMethod 
17153         (and not the wrapped one). This fix permissions on icalls.
17154
17155 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
17156
17157         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
17158
17159         * mini.c (mono_allocate_stack_slots): Add a fixme.
17160
17161         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
17162
17163 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
17164
17165         * inssel.brg: optimize casts of sealed types (more
17166         optimizations waiting for fixes in remoting).
17167
17168 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
17169
17170         * inssel.brg (stmt): Add another dummy rule.
17171
17172         * driver.c: Fix warnings.
17173
17174         * driver.c (mono_main): If running under valgrind, instruct glib to use
17175         the system allocation functions so valgrind can track the memory
17176         allocated by the g_... functions.
17177
17178         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
17179
17180         * mini-ops.h: Add OP_DUMMY_STORE opcode.
17181
17182         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
17183
17184         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
17185         variables in try regions.
17186
17187         * mini.c (mini_method_compile): Don't disable optimizations on large
17188         methods when AOT compiling.
17189
17190         * mini.c (mono_allocate_stack_slots): New arch independent method to 
17191         allocate stack slots. Not yet used.
17192
17193 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
17194
17195         * debug-mini.c (mono_debug_close_method): Plug some leaks.
17196
17197 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
17198
17199         * mini-ppc.c: make the branch info relative as the code
17200         buffer can be reallocated.
17201
17202 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
17203
17204         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
17205         * driver.c: Removed the AOT/security restriction. Now initialize the
17206         security manager (in metadata) if --security is used.
17207         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
17208         rather than the pointer to declarative security, when AOT is used.
17209
17210 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
17211
17212         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
17213         basic blocks, reduced intrinsic exception throwing code size.
17214
17215 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
17216
17217         * driver.c (mini_usage): Reorder the usage screen.
17218
17219 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
17220
17221         * mini.c (mono_resolve_patch_target): Fix warning.
17222
17223 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
17224
17225         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
17226         previous patch.
17227
17228         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
17229
17230         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
17231         breaks the amd64 build.
17232
17233         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
17234         register allocation. Fixes #71454.
17235
17236         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
17237
17238         * arrays.cs: Add new regression test.   
17239
17240 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
17241
17242         * ssapre.c: Turned usage of snprintf to GString.
17243         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
17244         (I left it on by mistake in my previous commit).
17245
17246 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
17247
17248         * mini.c, cfold.c, basic-calls.cs: preserve side effects
17249         on cond branch optimization (fixes bug# 71515).
17250
17251 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
17252
17253         * abcremoval.c: Fixed bug 71062.
17254         * abcremoval.h: Likewise.
17255
17256 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
17257
17258         * mini.c: Added a new functionality to optimize_branches, the removal
17259         of useless basic blocks, and fixed some problem in the removal of
17260         critical edges; some utility functions added for both purposes.
17261         * ssapre.c: Added complex expression support, and fixed bug 70637.
17262         * ssapre.h: Likewise.
17263         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
17264         enabled in SSAPRE.
17265         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
17266         * driver.c: Re-enabled SSAPRE.
17267
17268 2005-01-19  Martin Baulig  <martin@ximian.com>
17269
17270         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
17271         the result of mono_get_method_constrained().
17272
17273 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
17274
17275         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
17276         manager.
17277
17278 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
17279
17280         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
17281         be detected.  Fixes #59296.
17282
17283 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
17284
17285         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
17286         which can happen. Fixes #71361.
17287
17288 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
17289
17290         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
17291         manager.
17292
17293 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
17294
17295         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
17296         appdomain-unload.exe to fail.
17297         
17298         * mini.c: Fix some memory leaks.
17299
17300 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
17301
17302         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
17303         Fixed bug and sped up some codepaths.
17304
17305 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
17306
17307         * mini.c: Fix some memory leaks.
17308
17309         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
17310         conversion.
17311
17312         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
17313
17314         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
17315         #71320.
17316
17317         * iltests.il: Add regression test for #71320.
17318
17319 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
17320
17321         * mini.c (mono_codegen): Fix installation of profiler hooks.
17322
17323         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
17324
17325 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
17326
17327         * mini.h, mini.c, cfold.c: optimize access to enum
17328         readonly fields, too. Eval conditional branches if possible
17329         to perform unreachable code removal in more cases.
17330
17331 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
17332
17333         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
17334
17335         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
17336         code manager.
17337
17338         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
17339         WinXP DEP. Fixes #71244.
17340
17341 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
17342
17343         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
17344
17345 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
17346
17347         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
17348
17349 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
17350
17351         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
17352         changes.
17353
17354         * mini.h: Bump AOT version.
17355
17356         * mini.h (MonoCompile): Change exvar to a hash table.
17357
17358         * mini.c: Allocate a separate exvar for each handler block.
17359
17360         * mini.c: Get rid of the computation of filter_lengths, its not needed.
17361
17362         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
17363         ex var with the pending exception and only throw if the two are equal.
17364         Fixes #68552.
17365         
17366         * exceptions.cs: Add tests for rethrow and nested catch clauses.
17367
17368         * mini-x86.c: Fix warnings.
17369
17370         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
17371         used by all the ports now.
17372
17373         * aot.c: Add write-symbols and save-temps options.
17374
17375 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
17376
17377         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
17378
17379 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
17380
17381         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
17382         operations.
17383
17384         * tramp-s390.c: Check vtable slot belongs to the domain.
17385
17386         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
17387         as per other platforms.
17388
17389         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
17390
17391 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
17392
17393         * driver.c: we don't run the Main() code in a subthread anymore.
17394
17395 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
17396
17397         * mini.c: added experimental rtc support in the statistical
17398         profiler: if the user has the permission, more accurate statistics
17399         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
17400         The MONO_RTC value must be restricted to what the linux rtc allows:
17401         power of two from 64 to 8192 Hz.
17402
17403 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
17404
17405         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
17406
17407 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
17408
17409         * mini-ppc.c: better icache flush for smp.
17410
17411 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
17412
17413         * mini-amd64.c (emit_move_return_value): Fix memory leak.
17414
17415         * mini-x86.c (get_call_info): Add the get_call_info () code from the
17416         amd64 port, not yet used.
17417
17418 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
17419
17420         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
17421         a struct type.
17422
17423 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
17424
17425         * driver.c: Added --security option to activate the security manager.
17426         Right now this will allow code generation for declarative demands and
17427         is disabled when AOT is specified.
17428         * mini.c: Add code generation for declarative security demands.
17429         * mini.h: Add mono_use_security_manager as an extern gboolean.
17430
17431 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
17432
17433         * aot.c (mono_compile_assembly): Speed up compilation a bit by
17434         emitting more dense assembly code.
17435
17436         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
17437         exception throwing stuff.
17438
17439 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
17440
17441         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
17442         dead code.
17443
17444         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
17445         left in by mistake.
17446
17447         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
17448         fixed.
17449
17450         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
17451
17452         * tramp-*.c: Only patch vtable slots if the object is in the current
17453         domain. Fixes appdomain-unload.exe.
17454
17455         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
17456         
17457         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
17458         x86 branch.
17459
17460 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
17461
17462         * mini.c (reverse_branch_op): New helper function.
17463
17464         * mini.c (optimize_branches): Run the new optimization only on 
17465         platforms which support it. Also reverse all kinds of branches.
17466
17467         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
17468
17469         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
17470         a throw statement.
17471
17472         * mini.c (optimize_branches): Reverse not-equals branches if the false
17473         bblock is a throw. This happens a lot of time with argument checking in
17474         corlib.
17475
17476         * mini.c (mono_codegen): Add support for placing basic blocks after
17477         the function epilogue.
17478
17479         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
17480         function epilogue.
17481         
17482 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
17483
17484         * mini.c (setup_stat_profiler): Only set this up if the platform
17485         supports ITIMER_PROF.
17486
17487 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
17488
17489         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
17490         previous patch.
17491
17492         * inssel.brg: Fix a warning.
17493
17494 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
17495
17496         * mini.c: added support for statistical profiler 
17497         (run with: --profile=default:stat).
17498
17499 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
17500
17501         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
17502
17503         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
17504
17505         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
17506         related to global registers from the amd64 port.
17507
17508 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
17509
17510         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
17511
17512         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
17513         with global registers.
17514         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
17515
17516         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
17517
17518 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
17519
17520         * debug-mini.c (encode_value): Fix off-by-one.
17521
17522         * aot.c (encode_value): Likewise.
17523
17524         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
17525
17526 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
17527
17528         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
17529         AOT.
17530
17531         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
17532         
17533         * aot.c (emit_method_info): Increase size of temp buffer.
17534
17535         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
17536         the AOT case.
17537
17538 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
17539
17540         * aot.c (emit_method_info): Fix build.
17541         
17542         * aot.c: Further rework of the AOT file format to reduce the size of
17543         the method info data.
17544
17545         * mini.h: Bump AOT file format version.
17546
17547 2004-12-27  Martin Baulig  <martin@ximian.com>
17548
17549         * mini.c (mini_get_method): New static method; call
17550         mono_get_method_full() and mono_get_inflated_method().
17551         (mono_method_to_ir): Use mini_get_method() instead of
17552         mono_get_method_full(). 
17553
17554 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
17555
17556         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
17557
17558 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
17559
17560         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
17561
17562         * inssel-amd64.brg: Add some optimization rules.
17563
17564 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
17565
17566         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
17567         standard not GC'd stuff is fine.
17568
17569 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
17570
17571         * aot.c: Rework the AOT file format to get rid of most of the global
17572         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
17573
17574         * mini.h: Bump AOT file format version.
17575         
17576 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
17577
17578         * mini.h: Bump AOT file format version.
17579
17580         * aot.c (mono_aot_is_got_entry): New function to determine if an 
17581         address is inside a GOT.
17582
17583         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
17584
17585         * cpu-pentium.md: Increase the maximum size of some instructions which
17586         might involve a got access.
17587         
17588         * mini.c (get_method_from_ip): Another debug helper function.
17589
17590         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
17591         when got var accesses are created during the decompose phase.
17592
17593         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
17594
17595         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
17596         argument mini_compile_method and to MonoCompile, and use this to
17597         determine whenever a given method is compiled for AOT. This allows the
17598         other methods compiled during AOT compilation to be free of AOT stuff,
17599         so the backends does not need to add special support for them by
17600         creating a fake GOT etc.
17601
17602         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
17603         longer needed.
17604
17605 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
17606
17607         * mini.c (mono_method_to_ir): It turns out that some of the
17608         x-appdomain wrappers are lax with types, so just ignore this for
17609         all wrappers.
17610
17611         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
17612         at the vtable->klass. If it is non-shared code we can just use the
17613         vtable.
17614
17615 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
17616
17617         * mini-ppc.c: access MonoDomain from tls, too.
17618
17619 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
17620
17621         * declsec.c: Removed unused variable (and related warning ;-)
17622
17623 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
17624
17625         * iltests.il: New test for LDELEMA on an array of ref types.
17626
17627         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
17628         all ldelema's on reftypes.
17629         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
17630         it was the wrong place to put it.
17631
17632         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
17633         register to pop to make this cleaner, at the request of Paolo.
17634
17635 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
17636
17637         * mini-ops.h (OP_GETHASHCODE): New op.
17638
17639         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
17640
17641         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
17642         operation.
17643
17644         For a microbenchmark, this reduces the cost of Hashtable.get_Item
17645         by 25%.
17646         
17647         * mini-x86.c (mono_arch_output_basic_block): Rather than
17648
17649         add ebp, 4
17650
17651         Emit
17652
17653         pop edx
17654
17655         The first is 3 bytes while the second is 1. This saves 36 kb on
17656         mscorlib, quite a big saving. When bootstraping mcs, I was able to
17657         see a small boost because of icache locality.
17658
17659         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
17660
17661 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
17662
17663         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
17664         started code sharing with the generic code.
17665
17666 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
17667
17668         * mini-ppc.c, cpu-g4.md: added code for direct access to
17669         tls data slots.
17670
17671 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
17672
17673         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
17674          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
17675         to OP_TLS_GET.
17676
17677 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
17678
17679         * declsec.c|h: Added functions to cache the declarative stack modifiers
17680         in MonoJitInfo and to create a security frame from a MonoJitInfo 
17681         structure.
17682         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
17683         created. Register internal calls for System.Security.SecurityFrame::
17684         _GetSecurityFrame and _GetSecurityStack.
17685         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
17686         the definitions for the new stack walk/callback mechanism.
17687         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
17688         first security frame for LinkDemands and InheritanceDemands) and
17689         GetSecurityStack for Demands. Both use the new mono_walk_stack code
17690         from lupus.
17691         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
17692         walk initialization (lupus).
17693
17694 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
17695
17696         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
17697         idiom.
17698         (handle_loaded_temps): Do not create a temporary variable for
17699         things that we know are temps. They will never be modified.
17700         (mono_spill_call): Set MONO_INST_IS_TEMP
17701         (mono_emulate_opcode): ditto
17702         (emit_tree): ditto
17703         (mono_method_to_ir.CEE_DUP): ditto
17704
17705 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
17706
17707         * mini.c (type_to_eval_stack_type): Make this handle the void type
17708         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
17709         (emit_tree): use ip_in_bb to special case some common idioms
17710         Update all callers to pass in the IP.
17711         (mono_method_to_ir): Make CEE_CALL* do the above as well.
17712
17713         This gives us a nice 2% speedup in mcs bootstrap.
17714
17715         * mini-x86.c (peephole_pass): Peephole pass to make
17716         mov  [foo], eax
17717         push [foo]
17718
17719         into
17720
17721         mov [foo], eax
17722         push eax
17723
17724         * mini.c (ip_in_bb): new method.
17725         (mono_method_to_ir): use this method rather than doing the hash
17726         lookup ourselves.
17727
17728         * linear-scan.c (mono_linear_scan): When expiring actives, you
17729         don't need to keep around variables that expire on this
17730         instruction. This makes it so that:
17731              a = b + 1
17732         will turn into:
17733              store (ebx add (ebx, 1))
17734         which will become
17735              add ebx, 1
17736
17737 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
17738
17739         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
17740         combination to avoid doing two copies. Fix up problems with previous
17741         patch.
17742
17743         * mini.c: Fix 64 bit warnings.
17744
17745         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
17746
17747 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
17748
17749         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
17750         changes from the x86 code.
17751
17752         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
17753
17754 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
17755
17756         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
17757         throwing code to reduce its size, unify the AOT and non-aot code and 
17758         get rid of relocations in the AOT case.
17759
17760         * mini-x86.h mini.c exceptions-x86.c 
17761         (mono_arch_get_throw_corlib_exception): New arch specific function to 
17762         raise corlib exceptions which doesn't require relocations in the 
17763         caller.
17764
17765         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
17766
17767 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
17768
17769         * mini.c (mono_emit_method_call): Only allocate the got var when it is
17770         needed.
17771
17772         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
17773         in the AOT case.
17774
17775 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
17776
17777         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
17778         with add function when used from Inc/dec atomic 
17779         functions. Re-enabled optimization on x86.
17780         * mini-ops.h: renamed atomic_add functions to
17781         allow _add to match the Interlocked::Add and
17782         _add_next to match Interlocked::Inc/Dec.
17783
17784 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
17785
17786         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
17787         linking of BBs to the end BB, and enabled SSAPRE also with
17788         consprop and copyprop (which was prevented by that bug).
17789
17790 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
17791
17792         * mini-x86.c: disabling the Interlocked optimizing code. 
17793
17794 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
17795
17796         * aot.c (load_aot_module): Move reading of got_addr after the AOT
17797         file version check.
17798         
17799 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
17800
17801         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
17802         interlocked optimization due lack of support on x86, rewrote 
17803         exchange to take into account that base may be in eax.
17804         
17805         xsp works again; activated Interlocked optimizing code.
17806         
17807 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
17808
17809         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
17810
17811 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
17812
17813         * mini-ops.h: Add new opcodes.
17814
17815         * mini.h: Add new patch types. Add got_var to MonoCompile.
17816
17817         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
17818         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
17819         make it work with all kinds of patchable code.
17820
17821         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
17822         address of the GOT, and referencing entries in the GOT.
17823
17824         * mini.c: Add code to load the GOT address if needed by an opcode.
17825
17826         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
17827         independent AOT code on the x86 using an elf-style Global Offset Table.
17828
17829 2004-12-14  Raja R Harinath  <rharinath@novell.com>
17830
17831         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
17832
17833 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17834
17835         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
17836         when running xsp.
17837
17838 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
17839
17840         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
17841         of Interlocked:Increment/Decrement/Add as inline ops.
17842         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
17843
17844 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
17845
17846         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
17847         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
17848
17849 2004-12-12  Duncan Mak  <duncan@ximian.com>
17850
17851         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
17852         again. `patch_info->table_size' is no longer valid after Zoltan's
17853         commit #37636.
17854
17855 2004-12-12  Martin Baulig  <martin@ximian.com>
17856
17857         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
17858         if we are the "real" method, ie. not an inlined method inside it.
17859
17860 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
17861
17862         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
17863         before we look in the special fields table. This fixes
17864         ../tests/thread-static-init.cs.
17865
17866 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17867
17868         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
17869         for Array get_Rank and get_Length. Fixes bug #70465.
17870
17871 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
17872
17873         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
17874         separate structure to reduce the size of MonoJumpInfo.
17875
17876 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
17877
17878         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
17879
17880 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
17881
17882         * mini.c (mini_get_inst_for_method): Changed to allow ports
17883         to return a MonoInst instead of opcode 
17884         (renamed mini_get_opcode_for_method to better reflect the new functionality)
17885         
17886         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
17887         Allow ports to return a created MonoInst instead of op-code, will enable
17888         new optimizations.
17889         (renamed mini_get_opcode_for_method to better reflected the functionality)
17890
17891 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
17892
17893         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
17894
17895 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
17896
17897         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
17898         Fixes #69985.
17899
17900 2004-12-08  Martin Baulig  <martin@ximian.com>
17901
17902         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
17903         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
17904
17905 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
17906
17907         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
17908         correctly.
17909
17910         * exceptions.cs: Disable some tests which depend on properties of x86 fp
17911         arithmetic.
17912
17913 2004-12-08  Raja R Harinath  <rharinath@novell.com>
17914
17915         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
17916
17917 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
17918
17919         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
17920         bug introduced by the previous patch.
17921
17922 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
17923
17924         * mini-ppc.c, objectc.cs: handle large structs passed by value
17925         (fixes bug #69972).
17926
17927 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
17928
17929         * mini-ppc.c: OP_ARGLIST implementation from
17930         Geoff Norton  <gnorton@customerdna.com>.
17931
17932 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
17933
17934         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
17935         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
17936
17937 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
17938
17939         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
17940
17941 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
17942
17943         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
17944         support.
17945
17946 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
17947
17948         * mini-sparc.c: Zero out localled-ed memory.
17949
17950         * iltests.il: Add tests for zeroing out localloc-ed memory.
17951
17952 2004-12-04  Martin Baulig  <martin@ximian.com>
17953
17954         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
17955         mono_method_get_signature_full().       
17956
17957 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
17958
17959         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
17960         and some utility functions (always for SSAPRE), integrated SSAPRE.
17961         * mini.h: Likewise.
17962         * driver.c: Added ssapre option.
17963         * ssa.c: Small fix on OP_ARG handling.
17964         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
17965         * Makefile.am: Likewise.
17966
17967 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
17968
17969         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
17970         now in the xp code.
17971
17972         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
17973         icall.
17974
17975 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
17976
17977         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
17978         
17979         * cpu-s390.md : Increase instruction length of oparglist.
17980
17981         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
17982
17983 2004-11-30  Martin Baulig  <martin@ximian.com>
17984
17985         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
17986         virtual generic methods.  We call a special helper_compile_generic_method()
17987         icall to retrieve the method from the vtable, inflate and compile
17988         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
17989
17990         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
17991
17992 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
17993
17994         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
17995
17996 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
17997
17998         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
17999         Fixes #69929.
18000
18001 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
18002
18003         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
18004         platforms with PIC aot.
18005
18006 2004-11-28  Martin Baulig  <martin@ximian.com>
18007
18008         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
18009         Fixes gen-112.cs.
18010
18011 2004-11-28  Martin Baulig  <martin@ximian.com>
18012
18013         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
18014         the result of mono_type_get_underlying_type() to check whether
18015         we're byref.
18016
18017 2004-11-26  Martin Baulig  <martin@ximian.com>
18018
18019         * mini.c
18020         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
18021         in the g_assert().
18022
18023 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
18024
18025         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
18026         the same way as the other arguments so they won't get clobbered.
18027
18028         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
18029         calls through R11 since it is clobbered by the trampoline code.
18030
18031 2004-11-26  Raja R Harinath  <rharinath@novell.com>
18032
18033         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
18034         pick up in-tree mscorlib.dll.
18035
18036 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
18037
18038         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
18039
18040         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
18041         runtime data/code are now stored in a table similar to the GOT in ELF. 
18042         This allows the code itself to be position independent.
18043
18044         * aot.c: Fix loading of referenced assemblies after the lazy assembly
18045         loading changes.
18046
18047         * aot.c: Attach ELF type (object/function) directives to all global
18048         symbols.
18049
18050         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
18051
18052         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
18053
18054         * mini-amd64.h: Turn on PIC AOT code.
18055
18056         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
18057         returning the offset within an OP_AOTCONST instruction where the GOT
18058         offset needs to be added.
18059
18060         * mini.h: Bump AOT file format version.
18061
18062 2004-11-25  Martin Baulig  <martin@ximian.com>
18063
18064         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
18065         uninflated generic methods.
18066
18067 2004-11-25  Martin Baulig  <martin@ximian.com>
18068
18069         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
18070
18071 2004-11-24  Martin Baulig  <martin@ximian.com>
18072
18073         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
18074         original klass (this only applies for generic instances).
18075
18076 2004-11-24  Martin Baulig  <martin@ximian.com>
18077
18078         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
18079         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
18080         that array).
18081
18082 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
18083
18084         * mini.c (mono_method_to_ir): Disable inlining for methods containing
18085         localloc. Fixes #69678.
18086
18087         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
18088         
18089 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
18090
18091         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
18092         used SSE registers on pinvoke calls. Fixes #69774.
18093
18094 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
18095
18096         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
18097         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
18098
18099 2004-11-23  Raja R Harinath  <rharinath@novell.com>
18100
18101         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
18102         Refer directly to the mcs/ tree.
18103
18104 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18105
18106         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
18107         Check if a trampoline for a synchronized method is required. 
18108
18109 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
18110
18111         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
18112         with localloc if needed. Throe arithmetric exception in
18113         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
18114         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
18115
18116 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
18117
18118         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
18119         types before switching on type.  Fixes #69622.
18120
18121 2004-11-19  Raja R Harinath  <rharinath@novell.com>
18122
18123         * Makefile.am (check-local): New.  Integrate into 'make check'.
18124         (MCS,RUNTIME): Define using in-tree mono and mcs.
18125         (ILASM): New.
18126         (%.exe): Use $(ILASM).
18127
18128 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
18129
18130         * mini-ppc.c: adjust initial prolog size (bug #69691).
18131
18132 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
18133
18134         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
18135         #69664.
18136
18137 2004-11-17  Raja R Harinath  <rharinath@novell.com>
18138
18139         * Makefile.am (clean-local): Rename from 'clean'.
18140
18141 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18142
18143         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
18144         to mono_arch_is_int_overflow. 
18145         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
18146         SIGFPE events.
18147
18148 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
18149
18150         * declsec.c|h: New files to support declarative security attributes.
18151         Added function to check if a method has (applicable) security.
18152         * mini.c|h: Add check for declarative security attributes in
18153         mono_method_check_inlining.
18154         * Makefile.am: Added declsec.c and declsec.h to the build.
18155
18156 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
18157
18158         * mini.c, mini.h: update to keep dynamic code info per-domain.
18159
18160 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
18161
18162         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
18163         (mini_init): Get rid of it from here too.
18164
18165 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
18166
18167         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
18168         implemented OP_RETHROW (patch by Geoff Norton
18169         <gnorton@customerdna.com>).
18170
18171 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
18172
18173         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
18174         between appdomains.  Fixes appdomain-unload on PPC.
18175
18176 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
18177
18178         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
18179         mini-exceptions.c: handle the new wrapper types.
18180         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
18181         token value as a MonoClass* when compiling a wrapper.
18182         mono_jit_create_remoting_trampoline now takes an additional
18183         MonoRemotingTarget parameter.
18184         
18185 2004-11-10  Martin Baulig  <martin@localhost>
18186
18187         * mini.c (mono_method_to_ir): Use `generic_container->context'
18188         rather than creating a new one.
18189
18190 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18191
18192         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
18193
18194         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
18195
18196 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
18197
18198         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
18199         the experimental aot cache stuff.
18200
18201 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
18202
18203         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
18204         mini-exceptions.c: update to exception clause structure changes.
18205
18206 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
18207
18208         * exceptions-x86.c (throw_exception): Fix warnings.
18209
18210         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
18211         for OP_RETHROW.
18212
18213 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
18214
18215         * exceptions-sparc.c (get_throw_exception): Really fix this.
18216
18217 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
18218
18219         * tramp-*.c: we no longer support icalls without wrappers, so
18220         a bit of code can be removed here
18221
18222 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
18223
18224         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
18225         patch.
18226
18227         * cpu-sparc.md: Add op_rethrow.
18228
18229         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
18230
18231         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
18232
18233         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
18234         * mini-ops.h: Add OP_RETHROW.
18235
18236         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
18237
18238         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
18239
18240 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
18241         
18242         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
18243         Makes the output much easier to read
18244
18245 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
18246
18247         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
18248         prevents another huge leak when compiling with ssa. Secondly, the
18249         performance of doing this rather than freeing the lists is much
18250         better. GList does a lock every time you allocate a list link,
18251         so that it can use a memory pool. So, it is better to just use
18252         a memory pool of our own.
18253         
18254         * ssa.c, linear-scan.c: replace g_list_remove_link with
18255         g_list_delete.  The remove one does not free the GList, so we were
18256         leaking memory. On -O=all --compile-all with corlib, this cut down
18257         3 MB of allocations.
18258
18259 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
18260
18261         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
18262
18263         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
18264
18265         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
18266         into a new function mono_create_jit_trampoline ().
18267
18268 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
18269
18270         * trace.c (get_spec): Allow tracing of classes without a namespace.
18271
18272 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
18273
18274         * mini.c: Fix pointer overwrite in mini_method_compile.
18275
18276 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
18277
18278         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
18279         The darwin ABI needs some special handling for 1 and 2 byte structs
18280         Lets use lbz/lhz instead of lwz everywhere.
18281         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
18282         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
18283         Use stb/sth for the former, and put the latter always on stack instead of in
18284         argument registers.
18285
18286 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
18287
18288         * trace.c (is_filenamechar): Add '_'.
18289
18290 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
18291
18292         * mini-s390.c: Fix prolog length to allow for large trace requirements.
18293
18294         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
18295
18296 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
18297
18298         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
18299         depends on libmonogc. Fixes #68805.
18300
18301 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
18302
18303         * mini.c (mono_jit_free_method): Provide extra information for
18304         this error.  Currently this leaks, but will be turned into a
18305         developer option in the future.
18306
18307 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
18308
18309         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
18310
18311 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
18312
18313         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
18314         boundary. Fixes reading of PATCH_INFO_R4 and R8.
18315         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
18316
18317 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
18318
18319         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
18320         trampolines for AOT code.
18321
18322 2004-10-22    <vargaz@freemail.hu>
18323
18324         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
18325         constructed types. Fixes #68136.
18326
18327 2004-10-21  Martin Baulig  <martin@ximian.com>
18328
18329         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
18330         if it returns true, unwind the stack to the call instruction.
18331
18332 2004-10-21    <vargaz@freemail.hu>
18333
18334         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
18335
18336         * mini.h: Bump AOT version number.
18337
18338         * objects.cs: Add another test for unbox trampolines.
18339
18340         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
18341         valuetype methods.
18342
18343 2004-10-20    <vargaz@freemail.hu>
18344
18345         * driver.c: Add SHARED to the set of optimizations tested.
18346
18347         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
18348
18349         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
18350         used by CEE_NEWARR.
18351
18352         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
18353
18354 2004-10-20  Martin Baulig  <martin@ximian.com>
18355
18356         * mini-exceptions.c (mono_handle_exception): Call
18357         mono_debugger_handle_exception() to tell the debugger about
18358         catch/finally clauses.
18359
18360 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
18361
18362         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
18363
18364         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
18365         #68447.
18366
18367 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
18368
18369         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
18370         methods as their native size, fixed bug #57543, #57545.
18371         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
18372         This saves a temporary register and mullw call down into 1 (minor perf
18373         increase for cases like sum = sum * 5;  This use to translate into:
18374             li r11,5
18375             mullw r28,r28,r11
18376         It now translates to
18377             mulli r28,r28,5
18378
18379 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
18380
18381         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
18382         #68388.
18383
18384 2004-10-11  Martin Baulig  <martin@ximian.com>
18385
18386         * mini.c (mono_method_to_ir): If we're a generic method, get the
18387         MonoGenericContainer from our MonoMethodNormal and create a
18388         MonoGenericContext from it.
18389
18390 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
18391
18392         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
18393
18394         * basic-long.cs: Add test for checked i8->i2 cast.
18395
18396 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
18397
18398         * inssel-ppc.brg: added a couple of speedup rules.
18399
18400 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
18401
18402         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
18403         to speed up rebuilds.
18404
18405 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18406
18407         * mini-s390.c: Minor fix to OP_OR_IMM.
18408
18409 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
18410
18411         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
18412         better. Fixes appdomain-unload.exe on sparc.
18413
18414 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
18415
18416         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
18417         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
18418         see bug 67324.
18419
18420 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
18421
18422         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
18423
18424 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
18425
18426         * mini.c: Always generate a field read/write wrapper for members
18427         of the class MarshalByRefObject since the actual instance could
18428         be a CBO.
18429
18430 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
18431
18432         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
18433
18434 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
18435
18436         * driver.c mini.h trace.c: Move the setting of the main assembly into
18437         a separate function called mono_trace_set_assembly () and call it after
18438         actually loading the main assembly. Fixes #66872.
18439
18440 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
18441
18442         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
18443         using the code manager.
18444
18445 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
18446
18447         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
18448
18449 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
18450
18451         * cpu-amd64.md: Fix bug in previous patch.
18452         
18453         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
18454         #66650.
18455
18456 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
18457
18458         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
18459         mini-exceptions.c: updates for changed stack walk interface.
18460
18461 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18462
18463         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
18464
18465 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
18466
18467         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
18468
18469 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
18470
18471         * driver.c (mini_regression_list): Do not call mono_assembly_close 
18472         since assemblies can't be unloaded.
18473         
18474 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
18475
18476         * cpu-amd64.md: Fix more instruction lengths.
18477
18478         * cpu-amd64.md: Fix lengths of some instructions.
18479
18480 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
18481
18482         * inssel.brg: Make the array ldelema check aot friendly.
18483
18484 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
18485
18486         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
18487
18488         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
18489
18490 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
18491
18492         * mini-x86.c: Fix build.
18493
18494         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
18495         mono_type_get_underlying_type () helper function to simplify code.
18496         
18497 2004-09-09  Martin Baulig  <martin@ximian.com>
18498
18499         * mini-amd64.c: Don't access `type->data.klass' directly, call
18500         mono_class_from_mono_type() instead since the type may be a
18501         generic instance.
18502
18503 2004-09-09  Martin Baulig  <martin@ximian.com>
18504
18505         * mini-amd64.c (get_call_info): Fix support for generic instances.
18506         (add_valuetype): Use mono_class_from_mono_type() to get the class
18507         since we can be a generic instance.
18508
18509 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
18510
18511         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
18512
18513 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
18514
18515         * liveness.c: reset spill costs on each scan: bug 62107
18516
18517 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
18518
18519         * exceptions-sparc.c (mono_arch_find_jit_info): remove
18520         unnecessary line that doesn't compile
18521
18522 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
18523
18524         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
18525         trampolines, make them call an error function so people can fix their
18526         code.
18527
18528 2004-09-06  Martin Baulig  <martin@ximian.com>
18529
18530         * mini.c (mono_method_to_ir): When initializing locals, handle a
18531         generic instances like a valuetype if it's a valuetype and like a
18532         class if it's a class.
18533
18534 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
18535
18536         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
18537         stack. Fixes #64674.
18538
18539         * exceptions.cs: Add test for unwinding of call arguments.
18540
18541 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
18542
18543         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
18544         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
18545         set the carry/borrow flag). The sparc and s390 implementations
18546         can now use optimized versions (and simplify the code). ppc bugfixes.
18547
18548 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
18549
18550         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
18551
18552 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
18553
18554         * inssel-amd64.brg: Remove leftover 32 bit rule.
18555
18556         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
18557
18558 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
18559
18560         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
18561         mono_arch_find_jit_info functions into a new function. Fix a memory
18562         leak.
18563
18564         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
18565         refactored code.
18566         
18567 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
18568
18569         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
18570         as well.
18571         
18572         * exceptions.cs: Add array size tests.
18573
18574         * mini.c: Allocate a separate icall wrapper for each arity of 
18575         mono_array_new_va. Fixes #59509.
18576
18577         * exceptions.cs: Add testcase for 64578.
18578
18579         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
18580
18581         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
18582         
18583 2004-09-02  Martin Baulig  <martin@ximian.com>
18584
18585         * mini.c (mono_method_to_ir): When initializing the locals, call
18586         handle_initobj() on the generic instance itself, not its
18587         underlying type.
18588
18589 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
18590
18591         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
18592         MonoJitInfo for dynamic methods.
18593
18594         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
18595
18596         * mini.c: Add support for freeing JIT data for dynamic methods.
18597         
18598 2004-09-01  Martin Baulig  <martin@ximian.com>
18599
18600         * mini-x86.c (is_regsize_var): Added support for generic
18601         instances.
18602         (mono_arch_emit_prolog): Make this compile again, use
18603         `x86_push_imm_template (code)'.
18604
18605 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18606
18607         * mini-x86.c: make all push_imm instructions that get
18608         patched always emit the long form
18609
18610 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
18611
18612         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
18613         in a per-domain hash.
18614
18615         * mini-amd64.c (merge_argument_class_from_type): Handle generic
18616         types.
18617
18618 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
18619
18620         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
18621         work.
18622         
18623         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
18624         work.
18625
18626         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
18627         Beginnings of SSE2 support.
18628
18629         * exceptions.cs: Add more tests for checked int<->uint casts.
18630
18631 2004-08-28  Martin Baulig  <martin@ximian.com>
18632
18633         * mini-x86.c (mono_arch_instrument_epilog): Added support for
18634         generic instances.
18635
18636         * mini.c
18637         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
18638         Handle generic instances recursively.
18639
18640 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
18641
18642         * iltests.il: test for conv.u8 on a constant
18643
18644 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
18645
18646         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
18647         LCONV_x4 (shrun_32 (membase)).
18648
18649 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
18650
18651         * inssel-x86.brg: c&p rules for push/setret of long
18652
18653 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
18654
18655         * inssel-x86.brg: c&p rules for compare (base, regvar) and
18656         compare (regvar, base)
18657
18658         * inssel-x86.brg: more burg love
18659
18660         * inssel.brg: more cleanup
18661
18662         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
18663
18664 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
18665
18666         * basic-long.cs, basic-calls.cs: new tests for optimization.
18667
18668 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
18669
18670         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
18671         patch.
18672
18673 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
18674
18675         * mini-amd64.c (read_tls_offset_from_method): Add another case.
18676         
18677 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
18678
18679         * inssel.brg (mini_emit_memcpy): use 
18680         NO_UNALIGNED_ACCESS to disable memcpy optimization
18681
18682 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
18683
18684         * mini-amd64.c: Handle generic types in various places.
18685
18686         * mini.c (mono_method_to_ir): Handle generic types in init locals.
18687
18688 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
18689
18690         * mini.c (handle_box): Fix warning.
18691
18692         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
18693
18694         * mini-amd64.h: Enable the emit_state optimization.
18695
18696         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
18697
18698         * mini-amd64.c: Add some new 64 bit peephole opts.
18699
18700         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
18701
18702         * cpu-amd64.md: sreg1 of div instructions must be %rax.
18703
18704         * mini-amd64.c: Register allocator fixes.
18705
18706         * mini.c: Add an optimization to emit_state to avoid allocation of new
18707         registers on some platforms.
18708
18709 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
18710
18711         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
18712
18713         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
18714         allocation. Fixes #63085.
18715
18716         * basic-long.cs: Add new regression test.
18717
18718         * mini-amd64.c: Register allocator improvements.
18719
18720 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
18721
18722         * mini-amd64.c (read_tls_offset_from_method): Add another code
18723         sequence.
18724
18725         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
18726         instruction sequence for nullifying class init trampolines.
18727
18728         * objects.cs: Add new regalloc test.
18729
18730         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
18731
18732 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
18733
18734         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
18735         
18736         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
18737         arguments.
18738
18739         * driver.c: Fix profiling after TLS changes.
18740         
18741         * driver.c (mono_main): Set mono_stats.enabled if needed.
18742
18743         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
18744         CEE_BOX.
18745
18746 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
18747
18748         * mini-x86.c: use a 1 op rather than a 2 op tls access
18749         instruction -> faster.
18750
18751 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
18752
18753         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
18754         x86 backend.
18755
18756 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
18757
18758         * exceptions-sparc.c (throw_exception): fix typo
18759
18760 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
18761
18762         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
18763         set tree->dreg correctly with tls. Allow any
18764         register to be used.
18765
18766         * mini-x86.c (read_tls_offset_from_method): add new code
18767         generation pattern seen with GCC.
18768
18769
18770 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
18771
18772         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
18773         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
18774         exceptions-sparc.c: fix some performance issues in exception
18775         handling and setting of the stack trace for exceptions that were
18776         already thrown.
18777
18778 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
18779
18780         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
18781         x86 backend.
18782         
18783         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
18784         registers.
18785
18786 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
18787
18788         This patch inlines tls access, when possible.
18789         
18790         * mini.h: new arch functions for TLS intrinsics.
18791         All platforms updated with a stub.
18792
18793         * mini.c: use the new intrinsics
18794
18795         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
18796         arch specific intrinsic for tls variables
18797
18798 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
18799
18800         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
18801         under windows.
18802
18803 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
18804
18805         * mini.c: thread local allocation
18806
18807 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
18808
18809         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
18810
18811         * Makefile.am: Link against the static version of libmonogc.
18812         
18813         * Makefile.am: Link the static versions of the convenience libraries
18814         into the mono executable.
18815
18816         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
18817
18818 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
18819
18820         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
18821         on integer overflow.
18822
18823         * mini-amd64.c: Reorganize function call code.
18824
18825         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
18826
18827 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
18828
18829         * inssel-x86.brg: use xor eax,eax.
18830         
18831         * basic.cs: new tests
18832
18833 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
18834
18835         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
18836         in exception throwing code.
18837         
18838 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
18839
18840         * inssel-x86.brg: use xor esi,esi.
18841
18842 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
18843
18844         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
18845         can trace methods compiled during mini_init () too.
18846
18847         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
18848         CEE_CONV_U4.
18849
18850 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
18851
18852         * Makefile.am: static link on x86 (r=zoltan)
18853
18854 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
18855
18856         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
18857         code since it causes some programs to fail.
18858
18859 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
18860
18861         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
18862
18863 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
18864
18865         * mini.c: ovfops_op_map - add STACK_OBJ case for
18866         CONV_I 
18867         * basic.cs: add test_0_pin_string as test
18868         case for above.
18869
18870 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
18871
18872         * Makefile.am: build C# if srcdir != builddir
18873
18874 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
18875
18876         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
18877         fall-through blocks.
18878
18879 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
18880
18881         * driver.c: enable loop by default again and include abcrem in -O=all.
18882
18883 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
18884
18885         * iltests.il: Add some localloc tests.
18886
18887         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
18888
18889         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
18890         Fixes #62574.
18891
18892         * inssel-amd64.brg: Add some optimizations.
18893
18894         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
18895         for gcc-3.4.
18896
18897         * Makefile.am: Statically link mono against libmono on AMD64.
18898         
18899         * mini-amd64.c inssel-amd64.brg: Optimizations.
18900
18901 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
18902
18903         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
18904
18905         * tramp-amd64.c: Patch calling code in trampolines.
18906
18907 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
18908
18909         * mini-amd64.c: pinvoke struct passing fixes.
18910
18911 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
18912
18913         * mini-sparc.c: redo change, make mono_arch_cpu_init call
18914         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
18915
18916 2004-08-05  Duncan Mak  <duncan@ximian.com>
18917
18918         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
18919         CEE_LDELEM_ANY.
18920
18921 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
18922
18923         * mini-amd64.c (emit_move_return_value): Move return value for normal
18924         calls too.
18925
18926 2004-08-05  Martin Baulig  <martin@ximian.com>
18927
18928         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
18929         `type->type'; just modify `type' itself when dealing with enums
18930         and generic instances.
18931         (check_call_signature): Make `simple_type' a `MonoType *'.
18932
18933 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
18934
18935         * mini.c: Use OP_PADD to add offsets to addresses.
18936
18937         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
18938
18939 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
18940
18941         * mini-sparc.c (mono_arch_emit_epilog): fix check
18942         for folding last op into restore instruction
18943
18944 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
18945
18946         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
18947         helper methods using the code manager.
18948         
18949         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
18950
18951         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
18952
18953 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18954         
18955         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
18956           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
18957
18958         * mini-s390.c: fix tail processing
18959
18960 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
18961
18962         * mini-ppc.c: mul.ovf.un exception name fix.
18963
18964 2004-08-03  Martin Baulig  <martin@ximian.com>
18965
18966         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
18967         instances; before jumping to `handle_enum', also modify `ptype'.
18968
18969 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
18970
18971         * cpu-sparc.md: fcall maximal length too small.
18972
18973 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
18974
18975         * mini-amd64.c mini.h: Add initial support for passing/returning 
18976         structures to/from pinvoked methods.
18977
18978 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
18979
18980         * mini-ppc.c: reg allocator fix.
18981
18982 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
18983
18984         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
18985
18986         * inssel.brg: Optimize memset on 64 bit machines.
18987
18988         * mini-amd64.c: Fix some vararg cases.
18989
18990 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18991
18992         * mini-s390.c: Corrected macro in emit_float_to_int
18993
18994         * s390-abi.cs: Tests to exercise the s390 ABI
18995
18996 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
18997
18998         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
18999         caller saved regs.
19000
19001         * basic.cs: Add a test for add.ovf.un.
19002
19003 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
19004
19005         * mini-sparc.c: add case for OP_IDIV_UN
19006
19007 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
19008
19009         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
19010         
19011         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
19012
19013 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
19014
19015         * basic.cs: regression tests.
19016
19017         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
19018         regressions.
19019
19020 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
19021
19022         * basic.cs: Add a new test.
19023
19024         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
19025         and AOT. Various fixes and optimizations.
19026
19027         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
19028
19029 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
19030
19031         * mini-ppc.c: make sure temp regs are not used for global reg
19032         allocation.
19033
19034 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
19035
19036         * cpu-sparc.md: conv_i8 fix for 64bits
19037
19038         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
19039
19040 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
19041         
19042         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
19043         add opcode for cmp BYTE PTR [eax], imm.
19044
19045         * inssel.brg: Make memcpy and memset takes bases.
19046
19047 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
19048
19049         * *-amd64.*: More AMD64 work.
19050         
19051 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
19052
19053         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
19054         add a compare-not-equal opcode.
19055         
19056 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
19057
19058         * mini.c: Use mono_init_from_assembly instead of mono_init.
19059         
19060 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
19061
19062         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
19063
19064         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
19065
19066         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
19067
19068         * inssel.brg: 64 bit fixes.
19069
19070         * mini.h (MonoCallInst): Add some AMD64 specific data.
19071
19072         * mini.h: Add some OP_P opcodes.
19073
19074 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
19075
19076         * basic.cs: tests for 61797 and 61740
19077
19078 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
19079
19080         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
19081         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
19082
19083 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
19084
19085         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
19086
19087         * *-amd64*.*: Ongoing AMD64 work.
19088
19089 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
19090
19091         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
19092
19093         * *-amd64*: Ongoing AMD64 work.
19094
19095         * mini-arch.h: Add AMD64 support.
19096
19097         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
19098
19099         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
19100
19101         * mini-ops.h: Add new opcodes.
19102
19103         * Makefile.am: Add AMD64 support.
19104
19105         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
19106         rules into the inssel-long*.brg files.
19107
19108         * *-amd64.*: Add beginnings of AMD64 backend.
19109
19110 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
19111
19112         * mini.c (print_dfn): commenting out the code that prints
19113         the cil. With -O=deadce, this makes -v -v crash.
19114         
19115         * cpu-pentium.md: make checkthis have a length of 2
19116
19117 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
19118
19119         * mini-sparc.h: fix implementations of __builtin
19120         functions for Sun compiler for V9.
19121
19122 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
19123
19124         * mini.c: use the new stelem.ref wrapper
19125         * exceptions.cs, arrays.cs: new stelem.ref tests
19126
19127 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
19128
19129         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
19130         new XSP should work with these changes).
19131
19132 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
19133         
19134         * inssel-{long32,x86,}.brg: trivial optimizations.
19135         
19136 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
19137
19138         * mini.c: load value when emitting box operation in
19139         constrained calls.
19140
19141 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
19142
19143         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
19144         is one byte shorter than cmp DWORD PTR [eax], 0.
19145
19146 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
19147
19148         * inssel-ppc.brg: arguments on the stack are always
19149         relative to the stack pointer (spotted by Neale Ferguson).
19150
19151 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19152
19153         * exceptions-x86.c: delay appending the method name to the trace until
19154         after mono_jit_info_table_find is called, as this gets the real
19155         MonoMethod.
19156
19157 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
19158
19159         * aot.c: register roots
19160
19161 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
19162
19163         * aot.c : I could just use PLATFORM_WIN32 flag.
19164
19165 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
19166
19167         * aot.c : Reverting the previous fix. This time it broke linux build.
19168
19169 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
19170
19171         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
19172
19173 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
19174
19175         * mini.c (handle_stack_args): Remove some more debugging code.
19176         
19177         * mini.c (handle_stack_args): Remove debug output left in by mistake.
19178
19179         * driver.c mini.h aot.c: Allow additional options to be specified with
19180         --aot and pass them to mono_compile_assembly.
19181
19182         * aot.c: Add experimental code to AOT compile all loaded assemblies
19183         on demand and save the code into a cache in the filesystem.
19184
19185         * aot.c: Add support for more wrapper methods.
19186         
19187         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
19188         58863.
19189
19190         * cpu-*.md: Remove removed opcodes.
19191
19192         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
19193         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
19194         related icalls to marshal.c.
19195
19196 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
19197
19198         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
19199
19200         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
19201
19202         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
19203
19204 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
19205         * liveness.c: If liveness is recomputated we need to reset the information
19206         for each variable. This way, if the liveness range has been narrowed
19207         by optimizations that happened after the last computation, we can return
19208         a smaller range.
19209         
19210         For example, if you have
19211         
19212         {
19213                 int i = 0;
19214                 
19215                 // Tons of code that does not affect i
19216                 
19217                 i = foo ();
19218                 ...
19219         }
19220         
19221         i = 0 is dead code and will be removed by SSA. However, when
19222         linear scan gets to the code, i will still appear to be live
19223         throughout the entire block. This prevents good register allocation.
19224
19225 2004-07-06  Martin Baulig  <martin@ximian.com>
19226
19227         * debug-mini.c (mono_debug_init_method): Allow
19228         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
19229         (mono_debug_add_icall_wrapper): New method.
19230
19231         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
19232
19233 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
19234
19235         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
19236         optimization.
19237
19238 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
19239
19240         * aot.c (mono_aot_load_method): Fix loading of debug info.
19241
19242 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
19243
19244         * aot.c: Add logging support.
19245
19246 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
19247
19248         * mini.h: Add prototype for mono_print_method_from_ip.
19249
19250         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
19251
19252         * inssel.brg: 64 bit fixes.
19253
19254         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
19255         inssel-long32.brg.
19256
19257         * Makefile.am: Add SPARC64 support.
19258
19259 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
19260
19261         * aot.c: Fix alignment problems on 32 bit platforms.
19262
19263 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
19264
19265         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
19266         SPARC64.
19267
19268         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
19269         problems.
19270
19271         * mini.h: Bump AOT file version. Some 64 bit fixes.
19272
19273 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
19274
19275         * inssel-sparc.brg: Add new rule to avoid register moves.
19276
19277         * inssel.brg: Add ldind_to_load_membase helper function.
19278
19279 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
19280
19281         * mini.c: OffsetToStringData intrinsic.
19282         
19283 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
19284
19285         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
19286
19287         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
19288         regression tests.
19289
19290         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
19291 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
19292
19293         * mini.c: reinstated mono_compile_get_interface_var()
19294         on x86, too, since the change breaks the Gtk# build there as well.
19295
19296 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19297
19298         * driver.c: remove loop from the default optimizations: it seems to
19299         interact badly with some of the other options (see bug #60613).
19300
19301 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
19302
19303         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
19304         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
19305
19306 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
19307
19308         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
19309         vararg-using methods.
19310
19311 2004-06-21  Martin Baulig  <martin@ximian.com>
19312
19313         * mini/mini-exceptions.c
19314         (mono_handle_exception): Added `gpointer original_ip' argument.
19315         After calling mono_unhandled_exception(), call
19316         mono_debugger_unhandled_exception() and if that returns true,
19317         restore the context and return.
19318
19319 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
19320
19321         * mini-ppc.c: prefer the use of relative branches so
19322         they won't need to be patched in aot code (patch from Patrick Beard).
19323
19324 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
19325
19326         * aot.c: patch from Patrick Beard to make the output assembly
19327         more correct for the MacOSX assembler. Small tweak to
19328         generate sane images on Linux/PPC, too.
19329
19330 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19331
19332         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
19333         case until bug #59509 is fixed (shows up in #60332).
19334
19335 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
19336
19337         * mini.c: make sure the needed wrappers are compiled, too, with
19338         precomp.
19339
19340 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
19341
19342         * driver.c: remove NPTL reference in --version output.
19343
19344 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19345
19346         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
19347         generate valid assembly for the Mach-O assembler.
19348
19349 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
19350
19351         * driver.c: don't include abcrem in the all optimization specifier
19352         since it slows down jit compilation too much for now.
19353
19354 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
19355
19356         * mini.c: use BIGMUL only if both operands have the same signage.
19357         * iltests.il: Test for bug 60056. (errors related to signage in
19358         BIGMUL).
19359
19360         r=lupus.
19361
19362 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
19363
19364         * mini.c, aot.c: memory leak fixes.
19365
19366 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
19367
19368         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
19369
19370 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
19371
19372         * Makefile.am: remove the -static hack completely, it links in
19373         statically glib as well.
19374
19375 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
19376
19377         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
19378         * exceptions.cs: make it compile with new mcs/csc.
19379
19380 2004-06-03 Massimiliano Mantione <massi@ximian.com>
19381         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
19382         and added relevant test case.
19383
19384 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
19385
19386         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
19387         regressions in gtk-sharp.
19388
19389 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
19390
19391         * exceptions.cs: New regression tests.
19392
19393         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
19394
19395 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
19396
19397         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
19398
19399 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
19400
19401         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
19402
19403         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
19404
19405 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
19406
19407         * mini.c (mono_jit_runtime_invoke): Init class in this
19408         method instead of trusting mono_jit_compile_method to
19409         do the work (because wrappers can be in object class)
19410
19411 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
19412
19413         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
19414
19415         * basic-long.cs: New regression test.
19416
19417 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
19418
19419         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
19420         and div/rem checks.
19421
19422 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
19423
19424         * Makefile.am: fix miguel's change to build mono statically against
19425         libmono (track build dependencies).
19426
19427 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
19428
19429         * cfold.c: Some glib versions do not have G_MININT32.
19430
19431 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
19432
19433         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
19434         with precision of tan, atan, sin and cos, and implemented related
19435         regressions tests (fixes bug 54467, but one new problem appeared and
19436         is not fixed yet).
19437
19438 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
19439
19440         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
19441
19442         * exceptions.cs: Add test for constant folding && division by zero.
19443
19444         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
19445         since driver.c is in libmono too, so the optimization was useless.
19446
19447         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
19448         variable to driver.c so the compiler can emit more efficient code to
19449         access them.
19450
19451 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19452
19453         * Makefile.am: don't distribute generated inssel.[ch] files.
19454
19455 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
19456
19457         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
19458         into the default appdomain. Fixes #58707.
19459
19460         * jit-icalls.c: Remove the broken approximation for truncl, doing
19461         no conversion is better.
19462
19463         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
19464         Fixes #58863.
19465
19466 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
19467
19468         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
19469         of the mcrxr instruction which is not available on some processors
19470         even if it's documented to be. Implement add and sub overflow correctly
19471         (still not complete for long unsigned). Speed up icalls a bit.
19472
19473 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
19474
19475         * mini.c (mono_jit_compile_method_with_opt): Make sure that
19476         we run .cctor in the current domain instead of target_domain.
19477         
19478         Fixes bug #58558, .cctor not being called in -O=shared.
19479
19480 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
19481
19482         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
19483
19484 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
19485
19486         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
19487         which can be done with an imm8, do it that way.
19488         (mono_arch_output_basic_block): ditto for a jmp
19489         (mono_arch_emit_prolog): Computate maximum offset of a label.
19490
19491 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
19492
19493         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
19494         now tries to allocate prefered physical reg's for virtual
19495         regs. This reduces the number of emited spills/loads with
19496         20-30% on our core assemblies.
19497
19498 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
19499
19500         * jit-icalls.c: truncl() is not needed and trunc() is
19501         the correct thing to do anyway (bug #58287).
19502
19503 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
19504
19505         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
19506         if available.
19507
19508 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
19509
19510         * driver.c: enable loop optimizations by default.
19511
19512 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
19513
19514         * mini-x86.c: fix calc of max loop size when aligning loops start.
19515
19516 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
19517
19518         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
19519         the stack.
19520
19521 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
19522
19523         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
19524         should set carry.
19525
19526         * basic-long.cs: Add tests for add/subtract of immediates with carry.
19527
19528         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
19529         
19530         * mini.c (inline_method): Allways inline some wrappers even if the cost
19531         is too large. Fixes #58785.
19532
19533         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
19534         
19535 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
19536
19537         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
19538         (crichton@gimp.org). Beginning of support for sparc/linux.
19539
19540         * mini-sparc.c: Optimize retrieval of LMF address.
19541
19542 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
19543
19544         * exceptions-ppc.c:  handle alloca in methods with clauses.
19545
19546 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
19547
19548         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
19549
19550 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
19551
19552         * mini.c: Delegate most of the abort signal work to 
19553           mono_thread_request_interruption, which also handles Stop and Suspend
19554           states.
19555
19556 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
19557
19558         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
19559         supports the save/restore lmf opcodes.
19560
19561 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
19562
19563         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
19564         by gcc-3.4 as well.
19565
19566         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
19567
19568 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
19569
19570         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
19571         methods which contain array accesses.
19572
19573         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
19574         boundaries. Fixes #58537.
19575
19576         * iltests.il: Add regression test for #58537.
19577
19578 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
19579
19580         * mini-x86.c (mono_arch_local_regalloc): Last part of
19581         fix for bug #58633 (releasing register to early).
19582
19583 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
19584
19585         * basic-long.cs: Add new regression test.
19586
19587 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
19588
19589         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
19590         register too early on the chain.
19591
19592 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
19593
19594         * mini.c (create_helper_signature): Use a helper function to reduce
19595         the code which needs to be written. Also set the calling convention of
19596         icalls on windows. Fixes #57840.
19597
19598 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
19599
19600         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
19601         exceptions-ppc.c: added helper function to get the instruction address
19602         from a signal handler context.
19603
19604 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
19605
19606         * helpers.c: use g_get_tmp_dir. Invokes happyness 
19607         from gonzalo.
19608
19609 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
19610
19611         * helpers.c: Add new env variable to pass args to objdump.
19612         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
19613
19614 2004-05-17  Radek Doulik  <rodo@ximian.com>
19615
19616         * Makefile.am (common_sources): added abcremoval.h so it get
19617         disted and daily mono packages on go-mono.com will build again
19618
19619 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
19620
19621         * abcremoval.c: Fixed coding style, added copyright header.
19622
19623         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
19624
19625         * mini.h: Added prototype for abc removal main function.
19626
19627         * build_relations_propagation_table.pl: Added copyright header.
19628
19629 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
19630
19631         * basic-long.cs: reg test for complex ceq_long bug.
19632
19633 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
19634
19635         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
19636         reg in long and clob case (bug #58343). Fixed/added comments.
19637
19638 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
19639
19640         * mini.c (mono_jit_runtime_invoke): Follow new convention
19641         of calling the invoke method with an function pointer.
19642
19643 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
19644
19645         * ChangeLog: Fix author of memory leak patch.
19646
19647 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
19648
19649         * Makefile.am: fix make dist as well...
19650
19651
19652 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
19653
19654         * cfold.c: Made so that conversions from pointer to int4 are no-ops
19655         on archs where pointers are 4 bytes long.
19656
19657         * Makefile.am: Added abcremoval.c source file.
19658
19659         * abcremoval.c: Added abcremoval.c.
19660
19661         * abcremoval.h: Added abcremoval.h.
19662
19663         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
19664
19665         * inssel.brg: Enabled bounds check removal.
19666
19667         * mini.c: Added support for abcrem optimization.
19668
19669         * mini.h: Added abcrem optimization label.
19670
19671         * driver.c: Added support for abcrem optimization.
19672
19673         * propagated_relations_table.def: Added propagated_relations_table.def.
19674
19675 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
19676
19677         * mini.c, cfold.c: fix style.
19678
19679 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
19680
19681         * mini.c: handle issue with the low-level implementation of
19682         some long opcodes (bug #54209).
19683
19684 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
19685
19686         * basic.cs: test for my new cmov stuff.
19687
19688 2004-05-13      Patrik Torstensson
19689
19690         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
19691         opt and added peephole documentation.
19692
19693 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
19694
19695         * tramp-ppc.c: rewrote the generic trampoline code.
19696
19697 2004-05-11      Patrik Torstensson
19698
19699         * mini-x86.c: optimize long shl/shr asm code (one less branch)
19700
19701 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
19702
19703         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
19704
19705         * mini.h mini.c dominators.c: Applied patch from Derek Woo
19706         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
19707
19708         * mini.c: Add new icalls for AsAny marshalling.
19709
19710 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
19711
19712         * tramp-ppc.c, mini-ppc.c: more cleanups.
19713
19714 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19715
19716         * mini.c: no warnings.
19717
19718 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19719
19720         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
19721
19722 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
19723
19724         * mini.c: In the thread abort signal handler, if the thread is in the
19725         process of being stoped, don't throw the Abort exception, just stop the
19726         thread.
19727
19728 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
19729
19730         * tramp-ppc.c: removed old code.
19731
19732 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19733
19734         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
19735         do some simple speed optimizations on ppc.
19736
19737 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
19738
19739         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
19740         and large offsets in load/store.
19741
19742 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
19743
19744         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
19745         it causes regressions.
19746
19747 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
19748
19749         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
19750         support.
19751
19752 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
19753
19754         * jit-icalls.c: remove warnings.
19755         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
19756         speedups for unsafe code.
19757
19758 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
19759
19760         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
19761
19762 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
19763
19764         * basic-calls.cs: Add new regression test.
19765
19766         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
19767         more portable.
19768
19769         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
19770
19771         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
19772         is no longer used.
19773
19774 2004-05-06      Patrik Torstensson
19775
19776         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
19777         long reg allocation in any reg (not only eax:edx) and implemented 
19778         long shl/shr ops in asm instead of helpers.
19779
19780 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
19781
19782         * mini-sparc.h: Fix warnings.
19783
19784         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
19785         stack.
19786
19787         * mini-exceptions.c (mono_handle_exception): Call the filter in a
19788         separate statement for clarity.
19789
19790         * mini-sparc.c: Update status.
19791
19792 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
19793
19794         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
19795         here.
19796
19797 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
19798
19799         * inssel-ppc.brg: another small pre-release workaround:
19800         we don't do overflow detection for long_sub_un.
19801
19802 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
19803
19804         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
19805         (also works around a weird ppc bug: 57957).
19806
19807 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
19808
19809         * tramp-ppc.c: trampoline fixes.
19810
19811 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
19812
19813         * mini-ppc.c: fixed typos.
19814
19815 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
19816
19817         * mini-ppc.c, exceptions-ppc.c: more code saves registers
19818         at the top of the stack. Fixed typos. Use a frame registers
19819         for all the methods with exception clauses.
19820
19821 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
19822
19823         * exceptions-ppc.c: restore fp registers.
19824
19825 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
19826
19827         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
19828         order from the stack top (moved the stack room to save the
19829         return value for trace after the param area). Fixed corruption
19830         in restoring registers on unwind.
19831
19832 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
19833
19834         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
19835
19836 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
19837
19838         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
19839         and prolog/epilog for methods that use it. Allow
19840         enough param area room for varargs methods. Fix miguel's
19841         breakage in exception handling.
19842
19843 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
19844
19845         * Makefile.am: run genmdesc only on current arch.
19846
19847 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19848
19849         * exceptions-x86.c:
19850         * mini-x86.h: fix the build on windows.
19851
19852 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
19853
19854         * 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.
19855
19856         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
19857
19858         * mini-exceptions.c: New file.
19859         
19860         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
19861         Move some parts of the x86 exception handling code to an 
19862         arch-independent file so it can be shared with other ports.
19863
19864 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
19865
19866         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
19867
19868 2004-04-26  David Waite  <mass@akuma.org>
19869
19870         * driver.c: remove comma from end of enumeration declaration
19871
19872 2004-04-26  Jackson Harper  <jackson@ximian.com>
19873
19874         * driver.c: parse config file before loading first assembly. This
19875         allows the user gac to be enabled/disabled. 
19876         
19877 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
19878
19879         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
19880         simpler mechanism: we do not care what is encoded initially
19881         (branch absolute or relative), we care about the code and its
19882         target.  I kept the old code for reference for now.
19883
19884         The new code tries first to determine if the jump is anywhere in
19885         the -/+32 absolute meg range, if it succeeds, it encodes using the
19886         absolute branch;  If not, it tried to find something in the
19887         relative range, if not, it uses the handle_thunk code. 
19888
19889 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
19890
19891         * exceptions-ppc.c: use the correct ip register on macosx.
19892
19893 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
19894
19895         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
19896
19897 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
19898
19899         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
19900         Raise exception on integer divide by zero by hand since the hw
19901         doesn't support it. Handle NaNs in FP compares.
19902
19903 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
19904
19905         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
19906         code reducing duplication between the platforms and enabled
19907         signal exception handling (on linux for now).
19908
19909 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
19910
19911         * exceptions-ppc.c: more macosx support.
19912
19913 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19914
19915         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
19916
19917 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
19918
19919         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
19920
19921 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
19922
19923         * iltests.il: more tests.
19924
19925 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
19926
19927         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
19928         vars as well.
19929
19930 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
19931
19932         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
19933
19934 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
19935
19936         * liveness.c: Mark variables as volatile in all basic blocks reachable
19937         from exception clauses.
19938
19939 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
19940
19941         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
19942         inlining.
19943
19944 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
19945
19946         * iltests.il, basic.cs: more tests for regalloc.
19947
19948 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
19949
19950         * iltests.il: Some tests for register allocation modifications
19951         I have locally.
19952
19953 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
19954
19955         * exceptions.cs: Add regression test for bug #56782.
19956
19957         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
19958         original stack trace if an exception is rethrown. Fixes #56782. Oh,
19959         the beauty of fixing the same thing in 5 different files...
19960
19961 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
19962
19963         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
19964         methods.
19965
19966 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
19967
19968         * mini.c: Add support for STRWLPARRAY marshalling convention.
19969
19970 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
19971
19972         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
19973         to init the context to setup the regs pointer).
19974
19975 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
19976
19977         * exceptions-ppc.c: more exceptions work.
19978
19979 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
19980
19981         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
19982         not allowed.
19983
19984 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
19985
19986         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
19987         can use the memory directly.
19988
19989         * cpu-pentium.md: Update documentation from a post from Zoltan. 
19990
19991         add x86_add_membase, x86_sub_membase, x86_mul_membase
19992
19993 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
19994
19995         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
19996         GENERAL_REGS they were also hardcoded for all PPC ports.
19997
19998         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
19999
20000         Remove hard-coded limit for floating point registers, use
20001         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
20002
20003         Notice that in MacOS X calling conventions you can fit a lot more
20004         floating point values in registers, so I should update the PInvoke
20005         test to excercise the passing of floating point values on the
20006         stack (currently broken).
20007         
20008 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
20009
20010         * tramp-ppc.c (create_trampoline_code): Added
20011         JUMP_TRAMPOLINE_SIZE. 
20012         (ppc_magic_trampoline): Follow the pattern from
20013         x86_magic_trampoline: if code is set to zero, return. 
20014         (create_trampoline_code): Always pass MonoMethod to the jump
20015         trampoline, before it was passing a null.
20016         (mono_arch_create_jump_trampoline): Implement the jump stub, could
20017         share the code with mono_arch_create_jit_trampoline. 
20018
20019         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
20020         implemented.
20021         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
20022         implemented.  
20023
20024         * cpu-g4.md: Added length for jmp instruction, the worst case
20025         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
20026         for save_lmf).
20027
20028 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
20029
20030         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
20031
20032 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
20033
20034         * mini.c: Only set bblock->real_offset when adding a new bblock, and
20035         before each IL instruction.
20036
20037         * mini.c (CEE_BOX): Fix warnings.
20038
20039 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20040
20041         * mini.c: removed a few unused vars and extra whitespace.
20042
20043 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
20044
20045         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
20046         checks.
20047         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
20048         index.
20049         (OP_GETCHR): use the above
20050         (CEE_LDELEMA): use the above.
20051
20052         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
20053         version of the generic impl.
20054         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
20055         (CEE_LDELEMA): use the above.
20056
20057 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
20058
20059         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
20060         Fixes #56317.
20061
20062         * iltests.il: Added new regression test for #56317.
20063
20064 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
20065
20066         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
20067         under NetBSD. Fixes #56450.
20068
20069         * liveness.c (update_gen_kill_set): Fix previous patch.
20070
20071 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20072
20073         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
20074
20075 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
20076
20077         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
20078         ldsfld and ldsflda.
20079
20080         * inssel-sparc.brg: Add more optimizations.
20081
20082         * mini-sparc.c: Replace multiply/divide with shifts if possible.
20083
20084 2004-04-01  Martin Baulig  <martin@ximian.com>
20085
20086         * mini.c (handle_box): New static function; moved the
20087         implementation of CEE_BOX here.
20088         (mono_method_to_ir): Added `constrained_call' variable.
20089         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
20090         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
20091         mono_method_get_constrained() to get the method.
20092
20093 2004-04-01  Martin Baulig  <martin@ximian.com>
20094
20095         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
20096         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
20097         (mono_method_to_ir): We don't need these macros anymore since
20098         mono_class_get_full() already takes care of it. 
20099
20100 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20101
20102         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
20103         use @function (as doesn't accept #function here) and check the return
20104         value of system and stop if fails.
20105
20106 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20107
20108         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
20109
20110 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
20111
20112         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
20113
20114         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
20115
20116         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
20117         #56223.
20118
20119         * basic-long.cs: Add test for negation of Int64.MinValue.
20120
20121 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
20122
20123         * mini-sparc.c: Update status.
20124
20125         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
20126
20127         * exceptions-sparc.c: Fix return value in filters.
20128
20129         * inssel-sparc.brg: Fix register allocation in some rules.
20130
20131 2004-03-28  Martin Baulig  <martin@ximian.com>
20132
20133         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
20134         if neccessary.  
20135
20136 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
20137
20138         * mini-x86.c (mono_arch_patch_code): Fix warnings.
20139         
20140         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
20141         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
20142         remove unused conv_u4 opcode.
20143
20144         * mini-x86.c: Remove valgrind workaround since it slows down things
20145         even when mono is not run under valgrind.
20146
20147 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
20148
20149         * mini-sparc.c: Update status.
20150
20151         * inssel-sparc.brg: Add some optimizations.
20152
20153         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
20154         future delay slot filling. Add support for varargs, tail calls and JMP.
20155
20156         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
20157         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
20158
20159         * inssel.brg: Fix register allocation in OP_ARGLIST.
20160
20161         * inssel.brg: Fix warnings.
20162
20163 2004-03-25  Martin Baulig  <martin@ximian.com>
20164
20165         * mini.c (inflate_generic_field): Removed.
20166         (mini_get_method): Removed, use mono_get_method_full(),
20167         (mini_get_class): Removed, use mono_class_get_full().
20168         (mono_method_to_ir): Pass our generic context to
20169         mono_field_from_token().        
20170
20171 2004-03-25  Martin Baulig  <martin@ximian.com>
20172
20173         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
20174         of a `MonoMethod *'.
20175         (mini_get_method): Take a `MonoGenericContext *' instead
20176         of a `MonoMethod *'.
20177         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
20178         a new local variable called `generic_context' which holds the
20179         current `MonoGenericContext *'; use it to lookup things.
20180
20181 2004-03-24  Martin Baulig  <martin@ximian.com>
20182
20183         * mini.c (mini_get_class): New static method; if we're inside a
20184         generic instance, inflate the class if neccessary.
20185         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
20186
20187 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
20188
20189         * iltests.il: New regression test for #55976.
20190
20191         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
20192         #55976.
20193
20194 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
20195
20196         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
20197         output.
20198
20199 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
20200
20201         * liveness.c: Consider SSA stores as well as loads when making vars
20202         volatile.
20203
20204         * exceptions.cs: New regression tests for register allocation.
20205         
20206 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
20207
20208         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
20209         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
20210           domain lock only to protect puntual access to data structures.
20211           Added access lock for sighash, jit_icall_hash_name, 
20212           jit_icall_hash_addr and domain->code_mp.
20213
20214 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
20215
20216         * driver.c: Print SIGSEGV handling method.
20217
20218         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
20219
20220         * mini.c (setup_jit_tls_data): Handle case when this is called
20221         multiple times for a thread.
20222
20223         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
20224         is different from fbxx_un. Fixes #54303. Also use constants instead of
20225         magic numbers in a lot of places.
20226
20227 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
20228
20229         * exceptions.cs: Fix cctor test when --regression is used.
20230
20231 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
20232
20233         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
20234         for Linux/ppc.
20235
20236 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
20237
20238         * inssel-ppc.brg: fixed register assignments for some rules.
20239
20240 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
20241
20242         * exceptions.cs: Add test for exceptions in static constructors.
20243
20244         * mini.c (mono_jit_compile_method_with_out): Move the calling of
20245         static constructors outside the domain lock. Fixes #55720.
20246
20247 2004-03-17  Martin Baulig  <martin@ximian.com>
20248
20249         * mini.c (get_generic_field_inst): Removed, this'll never happen.
20250         (inflate_generic_field): Take the `MonoMethod *' instead of the
20251         `MonoClass *' and added support for generic method.
20252         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
20253         have a `field->parent->gen_params', only inflate the field if it's
20254         an open constructed type.
20255
20256 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
20257
20258         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
20259         exception object instead of the preconstructed ones.
20260
20261 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20262
20263         * mini.c: reverted changed to sigsegv_signal_handler commited
20264         accidentally in the previous patch.
20265
20266 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20267
20268         * mini.c:
20269         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
20270         running --aot with an old assembly.
20271
20272 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
20273
20274         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
20275         point values.
20276
20277         * mini-sparc.c: Add support for v9 branches with prediction.
20278
20279 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
20280
20281         * mini.c (mini_init): #warning is GNUC only
20282
20283         * mini-sparc.h: implement __builtin_frame_address
20284         and __builtin_return_address for Sun C compiler
20285
20286 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
20287
20288         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
20289
20290 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
20291
20292         * basic-calls.cs: Add test for unaligned byref long argument passing.
20293
20294         * mini-ops.h: Add sparcv9 compare and branch instructions.
20295
20296         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
20297         v9 instructions if we have a v9 cpu.
20298
20299         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
20300         registers for global allocation.
20301
20302         * exceptions-sparc.c: Fixes.
20303         
20304 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
20305
20306         * liveness.c (mono_analyze_liveness): Optimized version.
20307
20308         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
20309
20310         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
20311         sparc work.
20312
20313         * basic-float.cs basic-calls.cs: New regression tests.
20314
20315 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
20316
20317         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
20318         sigaltstack implementation.
20319
20320         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
20321         
20322         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
20323         stuff if SIGSEGV_ON_ALTSTACK is not defined.
20324
20325 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
20326
20327         * mini.c: Fix warnings.
20328         
20329         * mini.c (mono_resolve_patch_target): New function which contains the
20330         arch independent part of the patching process.
20331
20332         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
20333         patching code to a separate function.
20334
20335 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
20336
20337         * mini.c (add_signal_handler): ifdef out on Windows
20338
20339 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
20340
20341         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
20342         cpu-sparc.md: Add exception handling support + other fixes.
20343
20344         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
20345         typed GC detection in --version.
20346
20347         * basic.cs exceptions.cs: New regression tests.
20348
20349         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
20350         the arch specific code can store data during a compilation.
20351
20352         * mini-ops.h: Add OP_SETFRET.
20353
20354         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
20355         function, register a separate icall for each arity, so the icalls can
20356         get a wrapper.
20357         
20358         * mini.c (mono_print_tree): Print negative offsets in a more readable
20359         form.
20360         
20361         * mini.c: Make signal handling work on sparc.
20362         
20363         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
20364
20365         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
20366
20367         * jit-icalls.c: Emulate truncl by aintl on solaris.
20368
20369         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
20370
20371 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
20372
20373         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
20374
20375 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
20376
20377         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
20378         a MarshalByRef type, inline a method that performs the check, taking into
20379         account that the object can be a proxy. Also implemented tow new opcodes:
20380         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
20381         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
20382         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
20383
20384 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
20385
20386         * mini-ppc.c: if a relative branch displacement is too big
20387         but it points to and area reachable with an absolute branch, 
20388         avoid the thunks.
20389
20390 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
20391
20392         * mini.c: optimize small copies in cpblk.
20393
20394 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
20395
20396         * basic-calls.cs basic-float.cs: New regression tests.
20397
20398         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
20399         negative offsets from %fp. Implement localloc. Fix local register 
20400         allocation. Fix the case when the this argument needs to be saved to
20401         the stack. Implement some missing opcodes.
20402
20403 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
20404
20405         * mini.c (mini_method_compile): Reenable global regalloc in methods
20406         with exception handlers.
20407
20408         * linear-scan.c (mono_varlist_sort): Fix warning.
20409
20410         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
20411
20412         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
20413         regalloc costs.
20414
20415         * liveness.c: Make all variables uses in exception clauses volatile, to
20416         prevent them from being allocated to registers. Fixes #42136.
20417
20418 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
20419
20420         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
20421         causes regressions.
20422
20423         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
20424         argument to mono_arch_regalloc_cost.
20425
20426         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
20427         precisely.
20428
20429 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
20430
20431         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
20432         Make the cost of allocating a variable to a register arch dependent.
20433
20434         * basic-calls.cs: Fix compilation of tests.
20435         
20436         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
20437         helper function to cut back on the number of #ifdefs needed.
20438
20439         * mini-ppc.c: Fix compilation.
20440
20441         * basic-calls.cs: New regression tests.
20442
20443         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
20444
20445         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
20446         of l0 since that is callee saved.
20447
20448         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
20449         to virtual calls.
20450
20451         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
20452         of delay instruction.
20453
20454         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
20455
20456         * mini.h (MonoCallInst): Add 'virtual' flag.
20457
20458         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
20459
20460 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
20461
20462         * *.cs: New regression tests.
20463
20464         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
20465         work.
20466
20467         * mini.c (mono_runtime_install_handlers): Fix build.
20468
20469         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
20470         'signal_stack_size' members.
20471
20472         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
20473         alternate signal stack.
20474
20475         * exceptions-x86.c: Add stack overflow handling.
20476
20477         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
20478         functions to arch independent code.
20479
20480         * mini.c (mono_print_tree): Print more detailed info for load_membase
20481         opcodes.
20482         
20483 2004-02-23  Martin Baulig  <martin@ximian.com>
20484
20485         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
20486
20487 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
20488
20489         * mini-x86.c: fixed reg allocation for div/rem.
20490
20491 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
20492
20493         * driver.c (mono_main): Report some configuratio options on --version.
20494
20495 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
20496
20497         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
20498         low in the address space. Correctly flush memory in thunks where we
20499         output native code.
20500
20501 2004-02-20  Martin Baulig  <martin@ximian.com>
20502
20503         * mini.c (mini_get_method): New static method; inflate all generic
20504         methods and methods in open generic instances.
20505         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
20506         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
20507
20508 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
20509
20510         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
20511
20512         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
20513
20514 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
20515
20516         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
20517
20518         * mini-sparc.c (flushi mono_arch_output_basic_block): make
20519         it compile using Sun's compiler.
20520
20521 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
20522
20523         * 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.
20524
20525         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
20526
20527 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
20528
20529         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
20530         code.
20531         * mini-ppc.c: handle calls outside of the allowed range with thunks
20532         allocated using the code manager.
20533         * tramp-ppc.c: use the code manager to hold generated native code.
20534         Fixed the magic trampoline to just patch vtable entries.
20535
20536 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
20537
20538         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
20539         independent file.
20540
20541 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
20542
20543         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
20544         PPC.
20545
20546         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
20547         if we have a working __thread implementation.
20548
20549         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
20550         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
20551
20552 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
20553
20554         * mini-x86.c: Fix compilation under gcc 2.
20555         
20556 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
20557
20558         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
20559         contains a call to the wrapped function.
20560
20561         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
20562         OP_<CALL>_IMM opcodes, and use them under X86.
20563         
20564         * mini.c (mono_jit_find_compiled_method): Fix warning.
20565
20566         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
20567
20568         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
20569
20570         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
20571         functionality to mini.c.
20572
20573         * mini.c (mono_create_jump_trampoline): New function to create a jump
20574         trampoline. Return a compiled method instead of a trampoline if it
20575         exists. Add a cache for jump trampolines.
20576
20577         * mini.c (mono_jit_find_compiled_method): New function to return a
20578         compiled method if it exists.
20579
20580         * mini-x86.c: Call mono_create_jump_trampoline instead of 
20581         mono_arch_create_jit_trampoline.
20582
20583         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
20584         a jump trampoline. Fixes #52092.
20585         
20586 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
20587
20588         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
20589         which is not up-to-date. Add check_corlib_version () instead.
20590
20591         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
20592         have to call it.
20593         
20594         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
20595         since newer valgrind versions do not need it.
20596
20597         * mini.c (mono_jit_compile_method_with_opt): New helper function to
20598         compile a method with a given set of optimizations.
20599
20600         * mini.c: Compile icall wrappers on-demand instead of at startup.
20601
20602         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
20603         wrapper for an icall.
20604
20605 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
20606
20607         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
20608         #54063.
20609
20610         * iltests.il: Add test for non-empty stack before switch instruction.
20611
20612 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
20613
20614         * mini.c: Add support for new stringbuilder marshalling conventions.
20615
20616         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
20617
20618 2004-02-01  Martin Baulig  <martin@ximian.com>
20619
20620         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
20621         in `ginst->mtype_argv'.
20622
20623 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
20624
20625         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
20626         facilitate grepping.
20627
20628 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
20629
20630         * mini.c: fixed buglet in initobj generic implementation for references.
20631
20632 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
20633
20634         * Makefile.am: make the version script conditional.
20635         * jit-icalls.c: handle missing truncl().
20636
20637 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
20638
20639         * exceptions.cs: Add more tests for double->int conversion.
20640
20641         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
20642         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
20643
20644 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
20645
20646         * driver.c: make --verbose --version emit an error
20647         if the loaded corlib doesn't match the runtime version.
20648
20649 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
20650
20651         * mini-ppc.h: export ppc_patch().
20652         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
20653         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
20654         on par or better than on MacOSX.
20655
20656 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
20657
20658         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
20659         mono_lookup_pinvoke_call.
20660
20661         * mini-x86.c: Under windows, the default pinvoke calling convention is
20662         stdcall. Fixes #52834.
20663
20664         * mini.c (optimize_branches): Add an upper bound to the number of
20665         iterations to prevent infinite loops on strange loops. Fixes #53003.
20666
20667 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
20668
20669         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
20670         and ISINST. Fixes #52093.
20671
20672         * objects.cs (test_0_vector_array_cast): New tests.
20673         
20674 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
20675
20676         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
20677         checking in Array.Set ().
20678
20679         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
20680         #52590.
20681
20682         * object.cs (test_0_multi_array_cast): New regression test.
20683
20684 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
20685
20686         * exceptions-ppc.c: fix build on Linux/PPC.
20687
20688 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
20689
20690         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
20691         running under valgrind.
20692         (x86_magic_trampoline): Fix build bustage.
20693
20694         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
20695         negative values as well. This is needed for the encoding of the line number
20696         info, since sometimes the line numbers are not in increasing order.
20697
20698 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
20699
20700         * cpu-pentium.md (localloc): Increase the size of the localloc 
20701         instruction since it is a loop under Win32.
20702
20703         * debug-mini.c (record_line_number): Get rid of unneccesary memory
20704         allocation.
20705
20706 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
20707
20708         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
20709         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
20710         Max Horn (max@quendi.de). Fix file names in comments.
20711
20712 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
20713
20714         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
20715         avoid stack overflow.
20716         (replace_usage): Avoid uninitialized variable warnings.
20717
20718         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
20719         and taking the address of valuetype variables.
20720
20721 2004-01-03  Patrik Torstensson
20722
20723         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
20724         for other purposes than FP later on.
20725
20726 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
20727
20728         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
20729         of tail calls.
20730
20731 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
20732
20733         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
20734
20735 2003-12-30  Patrik Torstensson <p@rxc.se>
20736
20737         * mini-x86.h: Decreased number of availiable fp regs.
20738         Solves corner cases with FP spilling.
20739
20740 2003-12-23  Patrik Torstensson <p@rxc.se>
20741
20742         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
20743         for floating point stack tracking / spilling on x86. 
20744         Fixes bug #49012.
20745         
20746         * basic-float.cs: added float mul overflow test.
20747
20748 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
20749
20750         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
20751
20752 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
20753
20754         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
20755         supports for cond branches that overflow the immediate
20756         overflow offset. mcs can compile simple programs.
20757
20758 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
20759
20760         * exceptions-ppc.c: exception handling support wip:
20761         finally handlers get run on exception.
20762
20763 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
20764
20765         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
20766         profiling.
20767
20768 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
20769
20770         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
20771         initial support for stack walking and unwinding.
20772
20773 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
20774
20775         * driver.c (mono_main): Make corlib-out-of-sync message more 
20776         descriptive. Also remove verify_corlib call.
20777
20778 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
20779
20780         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
20781         not overlap with other call's arguments, too.
20782
20783 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
20784
20785         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
20786         move to arch-specific code the choice of arch-specific
20787         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
20788         * mini.c: ensure emulation calls will not interleave
20789         with other calls.
20790
20791 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
20792
20793         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
20794         the magic trampoline stack frame is dropped before executing
20795         the new method.
20796
20797 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
20798
20799         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
20800         and integer to fp conversions. Added support for overflowing
20801         arguments on the stack. Reserve a couple more registers as temps.
20802         Added support for aot compilation (as output still needs to be
20803         tweaked, though).
20804
20805 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
20806
20807         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
20808         Don't overwrite return register in some corner cases.
20809
20810 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
20811
20812         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
20813         static constructors when AOT compiling.
20814
20815         * driver.c (mono_main): Call mono_check_corlib_version.
20816
20817 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
20818
20819         * cpu-g4.md, basic.cs: fixed div target register.
20820
20821 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
20822
20823         * mini-ppc.c, basic.cs: shl_imm fix with test.
20824
20825 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
20826
20827         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
20828         structures by value. Misc fixes.
20829         * objects.cs: more tests.
20830
20831 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
20832
20833         * mini-ppc.c: lconv.ovf.i implemented.
20834
20835 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20836
20837         * mini.c:
20838         (mini_init): don't error out if someone already called g_thread_init.
20839
20840 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
20841
20842         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
20843         to be any type per the spec. Fix abnormal memory usage when
20844         the same object is repeatedly thrown.
20845
20846 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
20847
20848         * mini.c: check for overruns in IL code.
20849
20850 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
20851
20852         * TODO: Add/remove some todo entries.
20853
20854 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
20855
20856         * driver.c (mono_main): Call mono_verify_corlib.
20857
20858 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
20859
20860         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
20861         This has been moved to mini.c
20862         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
20863         type being casted is marshalbyref it could be a proxy, so instead of
20864         emitting the type check code, emit a call to a runtime method that will
20865         perform the check by calling CanCastTo if needed.
20866
20867 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
20868
20869         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
20870         methods with large stack frames under Win32.
20871
20872 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
20873
20874         * Makefile.am: Distribute regression tests.
20875
20876         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
20877         at the end instead of inserting each variable into the sorted list.
20878
20879         * linear-scan.c (mono_varlist_sort): New helper function.
20880         
20881 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
20882
20883         * mini.c: ensure arguments and locals are within bounds.
20884
20885 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
20886
20887         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
20888         related fixes.
20889
20890 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
20891
20892         * mini.c (mono_cprop_copy_values): Fix crash.
20893
20894         * aot.c: Set verbosity back to 0.
20895         
20896 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
20897
20898         * regalloc.c: complete memory leak fix by Laurent Morichetti
20899         (l_m@pacbell.net).
20900
20901 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
20902
20903         * driver.c (main_thread_handler): Revert the previous patch.
20904
20905         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
20906         under valgrind.
20907
20908         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
20909         memory from the memory pool.
20910
20911         * driver.c (main_thread_handler): Turn on all optimizations when
20912         --aot is used.
20913
20914         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
20915         an array for better performance.
20916
20917         * regalloc.c (mono_regstate_assign): Fix memory leak.
20918
20919         * debug-mini.c (mono_debug_serialize_debug_info): New function to
20920         serialize the debug info.
20921
20922         * debug-mini.c (mono_debug_add_aot_method): New function to load the
20923         debug info from the serialized representation.
20924
20925         * aot.c: Save debug info into the generated file and load it when 
20926         loading a method.
20927
20928         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
20929
20930 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
20931
20932         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
20933         More FP-related fixes.
20934
20935 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
20936
20937         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
20938         and register allocation buglet. Hello world now runs.
20939
20940 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
20941
20942         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
20943         * tramp-ppc.c: fixed class init trampoline.
20944         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
20945
20946 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
20947
20948         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
20949         mini.c: more ppc changes/fixes.
20950
20951 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
20952
20953         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
20954         Also optimize the case when the arguments are the same in the caller 
20955         and in the callee.
20956
20957         * iltests.il: Add tests for tail calls with valuetype arguments.
20958
20959 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
20960
20961         * mini-ppc.c: fixes for struct return type.
20962
20963 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
20964
20965         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
20966         mono_spillvar_offset() to arch-specific code.
20967
20968 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
20969
20970         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
20971
20972 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
20973
20974         * exceptions-x86.c: Fix stack space leaks.
20975         
20976         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
20977         registers from the lmf if the method has save_lmf set.
20978
20979 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
20980
20981         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
20982         of icall wrappers into InvokeInDomain, since these are now per-domain.
20983
20984 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
20985
20986         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
20987         make some opcode emulation and intrinsic ops enabled/disabled 
20988         according to the architecture. More fixes.
20989
20990 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
20991
20992         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
20993
20994 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
20995
20996         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
20997         arch-specific handling for 'this' and struct return type to
20998         arch-specific code.
20999
21000 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21001
21002         * aot.c: prevent divide by zero error when reporting (it happened with
21003         Accessibility.dll).
21004
21005 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
21006
21007         * mini.h (inst_switch): Remove unused macro.
21008
21009 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21010
21011         * aot.c:
21012         (load_aot_module): free 'info->methods' and 'info' properly. No more
21013         "free(): invalid pointer blah" messages when you have an old aot
21014         compiled assembly.
21015
21016 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
21017
21018         * jit-icalls.c, mini.c: Added support for context static fields.
21019
21020 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
21021
21022         * mini.c (mono_method_blittable): Methods which set LastError are not 
21023         blittable either. Fixes #51108.
21024         
21025 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
21026
21027         * mini.c: flush icache.
21028         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
21029
21030 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
21031
21032         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
21033
21034 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
21035
21036         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
21037         safe on IA32.
21038
21039         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
21040         vararg calls.
21041
21042         * inssel.brg (CEE_MKREFANY): Fix AOT case.
21043
21044 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
21045
21046         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
21047         instruction when the result is discarded.
21048
21049         * iltests.il (test_0_div_regalloc): New regression test.
21050
21051         * arrays.cs: Fix compilation error.
21052
21053 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
21054
21055         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
21056         float rules to inssel-x86.brg: sane architectures with FP registers
21057         don't need to implement these rules.
21058
21059 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
21060
21061         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
21062
21063 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
21064
21065         * mini.h, inssel-long32.brg: fixed endianess issues in int64
21066         implementation of 32 bit systems.
21067
21068 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
21069
21070         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
21071         (Jeroen Zwartepoorte).
21072
21073 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
21074
21075         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
21076         the caller and the callee matches.
21077         
21078         * mini.c (mono_method_to_ir): Add comment.
21079
21080         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
21081         signbit is missing on some platforms.
21082
21083 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
21084
21085         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
21086
21087         * mini.c (setup_jit_tls_data): Call the new function.
21088         
21089         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
21090
21091         * mini-x86.c: Add experimental support for fast access to the lmf
21092         structure under NPTL/Linux 2.6.x.
21093
21094 2003-11-06  Martin Baulig  <martin@ximian.com>
21095
21096         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
21097         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
21098         the debugger.
21099
21100 2003-11-02  Martin Baulig  <martin@ximian.com>
21101
21102         * mini.c (inflate_generic_field): New static method.
21103         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
21104         generic instance and the field is declared in a generic type, call
21105         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
21106
21107 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
21108
21109         * mini.h mini.c (mono_method_same_domain): New function to return
21110         whenever the caller and the callee are in the same domain.
21111
21112         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
21113
21114 2003-10-30  Martin Baulig  <martin@ximian.com>
21115
21116         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
21117         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
21118         method parameters.
21119         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
21120         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
21121
21122 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
21123
21124         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
21125         propagation.
21126
21127         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
21128         object here, so it is in the correct appdomain etc.
21129
21130 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
21131
21132         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
21133         already done.
21134         (mono_method_to_ir): Avoid freeing the type created returned from
21135         mono_type_create_from_typespec, since it is put into an internal cache
21136         by the function. Fixes pointer.exe.
21137
21138         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
21139         trampolines for icalls and pinvokes as well. Fixes #33569.
21140
21141 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
21142
21143         * mini.c: Update after appdomain changes.
21144
21145         * mini.c (mono_jit_compile_method_inner): Allways compile native
21146         method wrappers in the root domain, since there can only be one
21147         instance of them, whose address is stored in method->info.
21148
21149 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
21150
21151         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
21152         environment variable. Instead detect automatically whenever running
21153         under valgrind using the magic macro RUNNING_ON_VALGRIND from
21154         valgrind.h.
21155
21156 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
21157
21158         * trace.c, trace.h: New files that implement the new trace option
21159         parsing. 
21160
21161         * driver.c: Document new --trace options.
21162
21163         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
21164         mini-x86.c: Apply:
21165
21166         -       if (mono_jit_trace_calls)
21167         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
21168
21169         * mini.h: prototypes.
21170         
21171 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
21172
21173         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
21174
21175         * mini.c inssel.brg: Implement typedefbyref opcodes.
21176
21177         * mini.c (mono_jit_compile_method): Remove unused local variable.
21178
21179         * mini.c (mono_jit_compile_method_inner): Ditto.
21180         
21181 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
21182
21183         * tramp-x86.c (x86_class_init_trampoline): Fix build.
21184         
21185         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
21186
21187 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
21188
21189         * mini.c (mono_no_aot): Remove unused global variable.
21190
21191         * mini.c: Thread safety fixes.
21192
21193 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
21194
21195         * mini.c (mono_create_class_init_trampoline): Add a lock around
21196         class_init_hash_addr.
21197
21198         * arrays.cs (test_0_newarr_emulation): Add new regression test for
21199         #30073.
21200
21201         * mini.c: Decompose the NEWARR instruction before decomposing its
21202         arguments. Fixes #30073.
21203
21204 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
21205
21206         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
21207         convention.
21208
21209 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
21210
21211         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
21212
21213         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
21214
21215         * driver.c: Add support for compiling icall wrappers to --compile.
21216
21217 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
21218
21219         * inssel.brg: The empty value in class->interface_offsets is -1, not
21220         0. Fixes #49287.
21221
21222 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
21223
21224         * objects.cs: New test for 'is' operator on an array of interfaces.
21225
21226 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
21227
21228         * tramp-ppc.c: update trampoline code to support jumps
21229         and class initialization.
21230
21231 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
21232
21233         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
21234
21235         * inssel.brg (OP_UNBOXCAST): Fix #46027.
21236
21237         * inssel.brg (OP_UNBOX): Remove unused rule.
21238
21239         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
21240         region instead of one for each method. Fixes #47813.
21241
21242 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
21243
21244         * exceptions.cs (test_0_nested_finally): New regression test for
21245         nested exception handlers.
21246
21247         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
21248
21249         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
21250
21251         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
21252         inlining.
21253
21254         * mini.c (mono_method_check_inlining): Make the inlining limit 
21255         configurable by an environment variable.
21256         
21257         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
21258
21259         * mini.h: Bump AOT file version.
21260
21261         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
21262         token, store the image along with the token, since the token might not 
21263         refer to the same image as the method containing the relocation, 
21264         because of inlining.
21265
21266 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
21267
21268         * mini.c (mono_precompile_assemblies): New function to compile
21269         all methods in all loaded assemblies.
21270
21271         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
21272
21273         * regalloc.h regalloc.c (MonoRegState): Change the type of 
21274         iassign and fassign to int*, since they can contain large negative
21275         values if the register is spilled. Also added some comments. Fixes
21276         #45817.
21277
21278         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
21279         under Win32. Fixes #42964.
21280
21281 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
21282
21283         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
21284
21285         * aot.c: Added support for AOT compiling methods which contain calls
21286         to wrappers. Currently, only remoting-invoke-with-check wrappers are
21287         handled.
21288         
21289         * driver.c (compile_all_methods): Run the compilation in a thread
21290         managed by mono. Fixes #44023.
21291
21292         * mini.c (mono_codegen): Print full method name in verbose output.
21293
21294         * mini-x86.c (mono_arch_patch_code): Fix warning.
21295         
21296         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
21297         jumps, since the method we are jumping to might be domain-specific.
21298
21299         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
21300
21301 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
21302
21303         * inssel.brg: string chars are unsigned.
21304
21305 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
21306
21307         * TODO: New todo item.
21308
21309         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
21310         which calls mono_runtime_class_init and patches the call site to
21311         avoid further calls.
21312         (mono_arch_create_class_init_trampoline): New arch specific function 
21313         to create a class init trampoline.
21314         (create_trampoline_code): Generalized so it can create
21315         class init trampolines as well.
21316
21317         * mini.c (helper_sig_class_init_trampoline): New helper variable.
21318         (mono_create_class_init_trampoline): New function to create and cache
21319         class init trampolines.
21320         (mono_find_class_init_trampoline_by_addr): New function to lookup the
21321         vtable given the address of a class init trampoline. Used by the
21322         patching process.
21323         (mono_codegen): Generate a call to a trampoline instead of
21324         mono_runtime_class_init in LDSFLD[A].
21325         (mono_codegen): Add relocations for the new trampoline.
21326         
21327         * mini.h mini-x86.c aot.c: Added a new relocation type: 
21328         MONO_PATCH_INFO_CLASS_INIT.
21329
21330         * mini.h: Bump AOT version number.
21331
21332         * aot.c: Create a copy of the loaded code instead of using the original
21333         so methods which call each other will be close in memory, improving
21334         cache behaviour.
21335         
21336         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
21337         patch since it breaks the regression tests.
21338         
21339         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
21340         for the register saving instruction sequence since the 
21341         frame_state_for function in glibc 2.3.2 don't seem to detect it.
21342
21343 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
21344
21345         * TODO: Fix todo item && remove another.
21346
21347 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
21348
21349         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
21350         previous checkin.
21351
21352         * aot.c: Moved the check for MONO_LASTAOT into the initialization
21353         function of the module.
21354
21355         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
21356         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
21357         --no-aot command line option.
21358
21359 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
21360
21361         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
21362         by Bernie Solomon (bernard@ugsolutions.com).
21363
21364         * inssel.brg: Refactor the interface offset table related code into
21365         its separate functions and add support for the AOT case.
21366
21367 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
21368
21369         * aot.c (mono_aot_get_method_inner): Fix memory leak.
21370         
21371         * aot.c: Added mono_aot_verbose variable and made all debugging
21372         output depend on the value of this variable.
21373
21374         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
21375         method_label and info_label.
21376
21377         * mini.h mini-x86.c aot.c: Added a new relocation type 
21378         MONO_PATCH_INFO_IID for klass->interface_id.
21379
21380         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
21381         the MonoJitInfo structure.
21382
21383         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
21384         a non-root appdomain in shared mode.
21385
21386 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
21387
21388         * aot.c: make aot loader less verbose. Remove free of unused variable.
21389
21390 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
21391
21392         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
21393
21394         * .cvsignore: Added *.dll.
21395
21396         * mini.c (mono_print_tree_nl): New function callable while debugging.
21397
21398         * mini.c (mono_print_code): Export this.
21399
21400         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
21401         patched code.
21402
21403 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
21404
21405         * mini.h (MonoCompile): Added 'jit_info' field.
21406
21407         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
21408         the cfg structure, since it is needed by the AOT compiler.
21409
21410         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
21411
21412         * aot.c: A major rewrite. Changes include:
21413         - save exception tables for methods which have them.
21414         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
21415         to g_module_symbol.
21416         - reworked the file format so it is now much smaller and needs
21417         fewer relocation entries.
21418         
21419 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
21420
21421         * aot.c (load_aot_module): Fix build bustage on platforms without
21422         Boehm GC.
21423
21424 2003-09-04  Martin Baulig  <martin@ximian.com>
21425
21426         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
21427
21428 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
21429
21430         * TODO: Some new optimization ideas.
21431
21432         * aot.c: Move AOT module loading logic here from mono_assembly_open.
21433
21434         * aot.c: Save the optimization flags used to compile the code into
21435         the AOT module.
21436
21437         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
21438         support emitting domain specific code.
21439         
21440         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
21441         no longer domain neutral. It can be made domain neutral by compiling 
21442         with --optimize=shared.
21443
21444         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
21445         between appdomains.
21446
21447         * driver.c mini.h mini.c: New --no-aot debugging option which disables
21448         loading of AOT code.
21449
21450         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
21451         
21452         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
21453         if there is no domain neutrality information.
21454
21455 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
21456
21457         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
21458         format version into the generated library.
21459
21460         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
21461         callee method into the caller since one of them could be shared.
21462
21463         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
21464         system exceptions from AOT code now works.
21465
21466         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
21467         method if it is domain neutral and the callee is not.
21468
21469         * graph.c (cfg_emit_one_loop_level): Fix warning.
21470
21471 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
21472
21473         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
21474         last checkin.
21475
21476 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
21477
21478         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
21479         is needed  by code which is executed before mono_runtime_init ().
21480         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
21481         
21482         * mini.c (mono_thread_abort): Fix warning.
21483         (mono_jit_compile_method): Call static constructor in the AOT case too.
21484
21485         * aot.c (mono_compile_assembly): Fix warning.
21486
21487 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21488
21489         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
21490
21491 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
21492
21493         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
21494
21495         * cpu-pentium.md: Fix the length of call opcodes so they include the
21496         ESP restoring instruction. Fixes #47968.
21497
21498 2003-08-28  Martin Baulig  <martin@ximian.com>
21499
21500         * mini-x86.c (mono_arch_call_opcode): Added support for
21501         MONO_TYPE_GENERICINST.
21502
21503         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
21504
21505 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
21506
21507         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
21508         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
21509
21510         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
21511         metadata_section.
21512
21513 2003-08-26  Martin Baulig  <martin@ximian.com>
21514
21515         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
21516         when reporting an error, set this to the actual error location.
21517         (mono_method_to_ir): Report the correct error location if
21518         get_basic_blocks() returned an error.
21519
21520 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
21521
21522         * mini.c (mono_type_blittable): OBJECT is not blittable.
21523         (mono_method_blittable): Methods which have marshalling descriptors
21524         are not blittable either. Fixes #47842.
21525
21526 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
21527
21528         * driver.c mini.c: Use an environment variable instead of a global 
21529         variable. Also fix the build.
21530
21531         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
21532         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
21533         reporting this. 
21534
21535         * driver.c mini.c: Added --with-valgrind option to turn off some
21536         code which prevents mono from running under valgrind.
21537
21538         * mini.c (mono_emit_call_args): Fixed warning.
21539
21540         * mini.c (mono_emulate_opcode): Fixed warning.
21541
21542 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
21543
21544         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
21545         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
21546         regalloc.c, regalloc.h: specify available registers in arch-specific
21547         code and support floats in the regallocator (patch by Laurent Morichetti 
21548         <l_m@pacbell.net>)
21549
21550 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
21551
21552         * mini.c: mono_thread_current() can be called only after
21553         mono_runtime_init(): rearrange code to not call it early on.
21554
21555 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
21556
21557         * mini.c: allocate jump tables in the code mempools.
21558
21559 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
21560
21561         * mini.c, mini.h: make sure per-thread data allocated by the jit is
21562         freed.
21563
21564 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
21565
21566         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
21567         12 to 16.  This fixes bug #47453.
21568
21569
21570 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
21571
21572         * mini-ppc.c: fixed indexed load and unsigned compares.
21573
21574 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
21575
21576         * mini.c: reenabled installation of handler for
21577           thread abort signal.
21578
21579 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
21580
21581         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
21582         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
21583         until it's fixed and actually useful.
21584
21585 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
21586
21587         * inssel-long32.brg: couple more opcodes implemented.
21588
21589 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
21590         
21591         * mini-sparc.c: Even more opcodes implemeted.
21592
21593 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
21594
21595         * mini-sparc.c: More opcodes implemented.
21596
21597 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
21598
21599         * mini-sparc.c: More opcodes implemented.
21600
21601 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
21602
21603         * inssel-sparc.brg: Add some needed rules.  Direct
21604         copy from PPC.
21605         * Makefile.am: Use inssel-sparc.brg
21606         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
21607         an assert happy for now.
21608
21609 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
21610
21611         * mini-sparc.c: Fixed compile errors.
21612         * exceptions-sparc.c: Same.  We now produce a mono binary 
21613         on sparc-linux.  Yea.
21614
21615 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
21616
21617         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
21618         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
21619         They compile, but do not work.
21620
21621 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
21622
21623         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
21624         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
21625         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
21626         (ct@gentoo.org).
21627
21628 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
21629
21630         * mini.c: more opcodes implemented and better support for generics.
21631
21632 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
21633
21634         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
21635         * mini.c, mini.h: first cut at generics support: some new instructions 
21636         added and changed the behaviour of some of the existing ones.
21637
21638 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
21639
21640         * mini.c: Removed definition of metadata_shared mutex here.
21641
21642 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
21643
21644         * mini-x86.c: make vararg calls work for instance methods.
21645
21646 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
21647
21648         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
21649         returns the arguments in a separte list, now.
21650
21651 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
21652
21653         * aot.c, mini.c: updates for array type representation changes.
21654
21655 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
21656
21657         * mini.c: register function to perform jit shutdown.
21658
21659 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
21660
21661         * mini.c: use a faster allocator if possible.
21662
21663 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
21664
21665         * aot.c: some cleanups and portability changes.
21666
21667 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
21668
21669         * mini.c: use faster allocation for CEE_BOX if possible.
21670
21671 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
21672
21673         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
21674         Moved inlined mempcy code to its own function so that is can be
21675         reused. Added an inline memset function as well (optimized initobj).
21676         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
21677
21678 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
21679
21680         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
21681
21682 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
21683
21684         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
21685         arch code can setup the cpu for CLR execution, if needed.
21686         We use it on x86 to set the precision of FP operations.
21687
21688 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
21689
21690         * mini.c: disable some optimizations if we can guess they'll cost too
21691         much for a given method.
21692
21693 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
21694
21695         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
21696         
21697 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
21698         * mini.h mini.c mini-x86.c: Added instruction level coverage 
21699         info collection support.
21700
21701 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
21702
21703         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
21704         is now implemented in the profiling API. Get rid of a couple of
21705         unnecessary global variables.
21706
21707 2003-06-15  Nick Drochak <ndrochak@gol.com>
21708
21709         * basic-long.cs: tests for negative values for bigmul, and unsigned.
21710         * cpu-g4.md: add op_bigmul and op_bigmul_un
21711         * cpu_pentium.md: add op_bigmul_un
21712         * inssel-long32.brg: add rule for unsigned bigmul
21713         * mini-ops.h: define OP_BIGMUL_UN
21714         * mini-x86.c: THE BUG: handle (un)signed properly
21715         * mini.c: choose unsigned opcode if needed.
21716         This set of patches fixes bug #44291
21717
21718 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
21719
21720         * mini.c (optimize_branches): improved to handle all kinds of
21721         conditional branches.
21722
21723 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
21724
21725         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
21726         don't raise exceptions.
21727
21728 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
21729
21730         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
21731         to arch-specific files.
21732
21733 2003-06-09  Martin Baulig  <martin@ximian.com>
21734
21735         * Makefile.am (libs): Added $(LIBGC_LIBS).
21736
21737 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
21738
21739         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
21740         and OP_ATAN (fixes bug#44293).
21741
21742 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
21743
21744         * Makefile.am, mini-x86.c: rename cpu description array to
21745         pentium_desc, since some compilers define the 'pentium' preprocessor
21746         symbol.
21747
21748 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
21749
21750         * mini.c (mini_select_instructions): add explicit branch if the
21751         following block is not the false target of a conditional branch -
21752         we need this with any optimization that reorder or remove bblocks
21753
21754         * mini.c (optimize_branches): bug fixes
21755
21756 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
21757
21758         * mini.c (mono_method_to_ir): inline static readonly fields
21759
21760         * ssa.c (fold_tree): start cfold support for long (very simple
21761         cases only)
21762
21763         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
21764
21765 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
21766
21767         * inssel.brg: fixed memcpy (bug #44219).
21768
21769 2003-06-05  Dick Porter  <dick@ximian.com>
21770
21771         * driver.c: Set the glib log levels to not abort if g_message
21772         recurses.
21773
21774         g_set_prgname() has to happen before mini_init() so that the
21775         process handle gets the info.
21776         
21777 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
21778
21779         * driver.c: add intrins to the default optimizations to get wider
21780         exposure.
21781
21782 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
21783
21784         * mini.h: some large basic blocks will overflow a 16-bit
21785         integers for symbolic registers.
21786
21787 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
21788
21789         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
21790         (mono_arch_output_basic_block): fix bug 43499 
21791
21792 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
21793
21794         * mini.c: kill duplicated definition of mono_debug_format.
21795
21796 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
21797
21798         * mini-x86.c, arrays.cs: fixed register allocation bug.
21799
21800 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
21801
21802         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
21803
21804         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
21805
21806 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21807
21808         * mini.c:
21809         (print_method_from_ip): also print source location information if
21810         available.
21811
21812 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
21813
21814         * mini.c (mono_find_block_region): bug fix in region code
21815         (mini_method_compile): enable removing unreachable code again, but
21816         only in methods without exception clauses.
21817
21818 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
21819
21820         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
21821         Implemented arglist opcode and handling of TypedReference type.
21822         Fixed x86 call convention when a structure is returned.
21823         Minimal support for calling static vararg methods.
21824
21825 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
21826
21827         * mini.c (mini_method_compile):  always remove unreachable code,
21828         because the code in them may be inconsistent  (access to dead
21829         variables for example).
21830
21831 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
21832
21833         * driver.c, debug-mini.c: warning fixes.
21834
21835 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
21836
21837         * Makefile.am, jit.h, mini.h: install header for embedding mono.
21838
21839 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
21840
21841         * mini.c: thread-static fields are registered in mono_class_vtable(),
21842         so ensure the function is called before checking for them.
21843
21844 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
21845
21846         * mini.c (optimize_branches): fix for bug 43586
21847
21848         * jit-icalls.c (mono_llmult_ovf): added an additional check for
21849         overflow (fixes Bug #43639)
21850
21851 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
21852
21853         * mini.c, objects.cs: allow the use of stobj for primitive types.
21854
21855 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
21856
21857         * mini.c: be less strict about argument checking until we support
21858         running the verifier.
21859
21860 2003-05-27  Nick Drochak <ndrochak@gol.com>
21861
21862         * basic-long.cs: tests for (ulong)int * (ulong)int also
21863         * mini.c: use the same trick for (ulong)int * (ulong)int
21864
21865 2003-05-27  Nick Drochak <ndrochak@gol.com>
21866
21867         * basic-long.cs: add regression test for (long)int * (long)int
21868         * cpu-pentium.md: add op_bigmul specification
21869         * inssel-long32.brg: add OP_BIGMUL rule
21870         * mini-ops.h: add OP_BIGMUL
21871         * mini-x86.c: register allocator: handle case where src1 needs to be
21872         in EAX.
21873         * mini.c: substitute special BIGMUL opcode in the tree for 
21874         (long)int * (long)int
21875
21876 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
21877
21878         * jit-icalls.c: call the type ctor on field access if needed.
21879
21880 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
21881
21882         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
21883         to a method (including results of ldelema, bug#43207).
21884
21885 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
21886
21887         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
21888         colors to show exception handler blocks.
21889
21890         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
21891         (fix for pinvoke7.cs).
21892
21893 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
21894
21895         * mini.h, mini.c: ensure correct initialization order for types that
21896         require it. Prepare for lazy compilation of jit icall wrappers.
21897         Provide a name for opcode emulation to reduce unneeded mallocing.
21898
21899 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
21900
21901         * mini-x86.c: better register restoring code and profiling
21902         support for tail calls.
21903
21904 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
21905
21906         * mini.h, driver.c: prepare for leaf methods optimization.
21907
21908 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
21909
21910         * mini.c: get targets of branches before converting a method.
21911
21912 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
21913
21914         * mini.c (optimize_branches): added some experimental code (disbaled) 
21915
21916 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
21917
21918         * mini.c (optimize_branches): fix branch to branch optimization 
21919
21920         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
21921
21922         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
21923
21924         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
21925
21926         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
21927         if needed.
21928
21929 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
21930
21931         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
21932         enable use of interface variables again.
21933
21934         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
21935         I1 to registers because there is no simply way to sign extend 8bit
21936         quantities in caller saved registers on x86.
21937
21938         * inssel-float.brg: set costs of some rules to 2 so
21939         that monobure always select the arch. specific ones if supplied,
21940         regardless of the order we pass the files to monoburg.
21941
21942 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
21943
21944         * mini.c, mini-x86.c: since the magic trampoline for jumps
21945         can't patch the code directly, we do it as soon as the
21946         method gets compiled.
21947
21948 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
21949
21950         * mini-x86.c, mini.h: introduce a new patching method
21951         to support CEE_JMP and tail calls.
21952         * mini.c: obey tail.call. Don't precompile methods target
21953         of CEE_JMP.
21954         * tramp-x86.c: new trampoline code to handle methods
21955         reached through a jump.
21956
21957 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
21958
21959         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
21960         bit values to registers
21961
21962 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
21963
21964         * mini.c (mono_compile_get_interface_var): share interface
21965         variables if possible.
21966
21967 2003-05-16  Martin Baulig  <martin@ximian.com>
21968
21969         * debug-mini.c (mono_init_debugger): New function to initialize
21970         the debugger.  This is not in the debugger since it needs to
21971         access some of mini's internals.
21972
21973 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
21974
21975         * mini.c (mono_method_to_ir): inlining fixes/cleanups
21976
21977 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
21978
21979         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
21980         for value type handling.
21981
21982 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
21983
21984         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
21985         (mono_method_check_inlining): enable inlining of all kinds of wrappers
21986
21987 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
21988
21989         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
21990           the constructor through a proxy.
21991
21992 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
21993
21994         * jit-icalls.c, inssel.brg: fixes to array element address
21995         calculations.
21996
21997 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
21998
21999         * mini-x86.c (is_regsize_var): allocate pointer to registers
22000
22001 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
22002
22003         * driver.c: fixed typo, added intrins to the set of optimizations
22004         tested with regressions.
22005
22006 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
22007
22008         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
22009         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
22010         test case.
22011
22012 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
22013
22014         * inssel.brg: remove some common pop instructions without side effects
22015
22016 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
22017
22018         * inssel-x86.brg: fixed thinko in int to double conversions.
22019
22020 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
22021
22022         * mini.c, jit-icalls.c: added runtime thread-static variable support.
22023
22024 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
22025
22026         * inssel-long32.brg: two more missing instructions.
22027
22028 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
22029
22030         * mini.c (mono_emit_call_args): set the cil_code for all arguments
22031         if not already set.
22032
22033 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
22034
22035         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
22036         correctly.
22037
22038         * basic-float.cs: Added tests for negative zero.
22039
22040 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
22041
22042         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
22043         a couple of missing operations for long casts, with test cases.
22044
22045 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22046
22047         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
22048
22049 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
22050
22051         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
22052         code size estimation.
22053
22054 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
22055
22056         * mini.c (mono_jit_create_remoting_trampoline): make it work with
22057         abstract methods (fix bug 42542)
22058
22059         * aot.c: add ability to handle array types
22060         
22061 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
22062
22063         * mini.c: Call the _specific versions of the object allocation
22064         functions if possible.
22065
22066 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
22067
22068         * driver.c: call setlocale ().
22069
22070 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
22071
22072         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
22073         windows build.
22074
22075 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
22076
22077         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
22078
22079         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
22080         wrappers (fix bug 42122)
22081
22082 2003-05-04  Martin Baulig  <martin@ximian.com>
22083
22084         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
22085
22086         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
22087         s/mini_set_defaults/mono_set_defaults/g.
22088
22089 2003-05-04  Martin Baulig  <martin@ximian.com>
22090
22091         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
22092
22093 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
22094
22095         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
22096         (reported by Don Roberts).
22097
22098 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
22099
22100         * mini.c: temporarily work around two bugs for this release.
22101
22102 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
22103
22104         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
22105         that contains -export-dynamic and it makes using the ld script
22106         useless.
22107         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
22108
22109 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
22110
22111         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
22112         specific cpu.
22113
22114 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
22115
22116         * mini.c: make sure leave calls all the needed finally blocks,
22117         even when the target jumps out of multiple exception clauses.
22118
22119 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
22120
22121         * ldscript, Makefile.am: add linker script to reduce the number of
22122         exported symbols (should also fix the issues with libwine defining
22123         some of the same symbols in io-layer).
22124
22125 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
22126
22127         * driver.c (mini_main): Avoid assertion when no file name is given on 
22128         the command line.
22129
22130 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
22131
22132         * driver.c: added --version/-V command line option.
22133         Added the inline optimization in the regression tests.
22134
22135 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
22136
22137         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
22138         to the type in the method signature (fixes bug#42134).
22139
22140 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
22141
22142         * mini.c: when inlining, check this is not null only when needed (bug #42135).
22143
22144 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
22145
22146         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
22147
22148 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22149
22150         * driver.c: fixed bug #42100.
22151
22152 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
22153
22154         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
22155
22156 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
22157
22158         * mini.c: moved most of the code required to do inlining to its own
22159         function so it can be reused. Inline also ctors if appropriate.
22160
22161 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
22162
22163         * Makefile.am: Link with -export-dynamic so shared libs loaded by
22164         the runtime can call mono API functions.
22165
22166 2003-04-27  Martin Baulig  <martin@ximian.com>
22167
22168         * debug-mini.c (mono_debug_init_method): Added
22169         `guint32 breakpoint_id' argument; if the method has a breakpoint,
22170         send a notification to the debugger.
22171
22172         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
22173         running in the Mono Debugger, just pass the breakpoint number to
22174         mono_debug_init_method().
22175
22176         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
22177
22178 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
22179
22180         * mini.c: allow some more unsafe compares.
22181
22182 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
22183
22184         * mini-x86.c, Makefile.am: make distcheck works (partially from
22185         a patch by Richard Lee <r.h.lee@attbi.com>).
22186         * regset.c, regset.h: removed, they are unused.
22187
22188 2003-04-25  Dick Porter  <dick@ximian.com>
22189
22190         * driver.c: Usage reports the name as 'mono' not 'mini'
22191         * exceptions-x86.c: Build and run on freebsd
22192
22193 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
22194
22195         * Makefile.am: install the program with the 'mono' name and
22196         the library as libmono instead of mini and libmini.
22197
22198 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
22199
22200         * driver.c: provide the APIs for the embedding interface of the old jit.
22201
22202 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
22203
22204         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
22205
22206 2003-04-23  Martin Baulig  <martin@ximian.com>
22207
22208         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
22209
22210         * driver.c: Added `--debug' command line argument to enable
22211         debugging support.
22212
22213 2003-04-23  Martin Baulig  <martin@ximian.com>
22214
22215         * debug.[ch]: Removed.  The code is now in
22216         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
22217
22218         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
22219         last six months.
22220
22221 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
22222
22223         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
22224
22225 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22226
22227         * mini.c:
22228         (mini_cleanup): moved mono_runtime_cleanup call after the call to
22229         mono_domain_finalize.
22230         (mini_method_compile): use mono_method_profile* if the the option is
22231         enabled.
22232
22233 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
22234
22235         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
22236         methods with their wrapper.
22237
22238         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
22239         methods with their wrapper.
22240
22241         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
22242         their wrapper.
22243
22244         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
22245         wrapper.
22246
22247         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
22248         methods.
22249
22250 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
22251
22252         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
22253
22254 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
22255
22256         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
22257         of the mempool. This is slightly faster and uses less memory
22258
22259 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
22260
22261         * mini.c: avoid O(n) allocation for variables.
22262
22263 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
22264
22265         * mini.c: handle items on the stack after inlining methods.
22266
22267 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
22268
22269         * mini.c: make the method->opcode optimization dependent
22270         on MONO_OPT_INSTRINS and do it lazily.
22271
22272 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
22273
22274         * driver.c: print overall results at the end of regression run.
22275
22276 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
22277
22278         * inssel.brg: don't overwrite symbolic registers.
22279
22280 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
22281
22282         * inssel-x86.brg: fix conversion from long to float.
22283
22284 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
22285
22286         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
22287
22288 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
22289
22290         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
22291
22292         * driver.c: Added --print-vtable option as in the old JIT.
22293
22294 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
22295
22296         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
22297
22298 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
22299
22300         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
22301
22302 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
22303
22304         * mini.c regalloc.c regalloc.h: Fix memory leak.
22305
22306 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
22307
22308         * aot.c (mono_aot_get_method): register all used strings
22309
22310 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
22311
22312         * mini.c: always intern strings references with ldstr at compile time.
22313
22314 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
22315
22316         * Makefile.am: add BUILT_SOURCES.
22317
22318 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
22319
22320         * driver.c: give a better error message when the assembly to execute
22321         doesn't have an entry point.
22322
22323 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
22324
22325         * Makefile.am: added hack for automake
22326
22327         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
22328         correct sematics.
22329
22330         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
22331
22332 22003-04-07  Martin Baulig  <martin@ximian.com>
22333
22334         * Makefile.am: Added Makefile.am.
22335
22336         * debugger-main.c: Removed, this is now in the debugger where it
22337         belongs.
22338
22339         * mini.pc.in: Call this package `mini' for the moment.
22340
22341
22342
22343
22344
22345
22346
22347
22348
22349
22350
22351
22352
22353
22354