2009-11-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
[mono.git] / mono / mini / ChangeLog
1 2009-11-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
2
3         * exceptions-x86.c: hopefully last change to fix the windows build.
4         This one courtesy of Jonathan Chambers.
5
6 2009-11-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
7
8         * debugger-agent.c: remove unused function.
9
10 2009-11-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
11
12         * debugger-agent.c: add #ifdefs for a few header files.
13         * mini-x86.h: disable the soft debugger in windows.
14         Step 1 of 2 to make this compile on windows with gcc.
15
16 2009-11-02  Zoltan Varga  <vargaz@gmail.com>
17
18         * tramp-x86.c (mono_arch_get_llvm_imt_trampoline): Comment this out for now
19         as it breaks the build.
20
21 2009-07-01  Zoltan Varga  <vargaz@gmail.com>
22
23         Merge the soft debugger branch.
24
25         * debugger-agent.h debugger-agent.c: New files containing the soft
26         mode debugger module.
27
28         * method-to-ir.c (mono_method_to_ir): Generate OP_SEQ_POINT opcodes
29         at the appropriate locations.
30
31         * mini-<ARCH>.c (mono_arch_output_basic_block): Handle OP_SEQ_POINT
32         opcode.
33
34         * mini-<ARCH>.c: Add new arch-specific functions to set/clear breakpoints,
35         enable/disable single stepping.
36
37         * exceptions-<ARCH>.c (mono_arch_find_jit_info_ext): New stack unwinding api
38         which returns all information in a StackFrameInfo structure, and can handle the
39         LMF frames added by the debugger.
40
41         * mini-<ARCH>.h (MonoLMFExt): New structure containing additional information
42         about an LMF frame.
43
44         * mini-exceptions.c (mono_jit_walk_stack_from_ctx_in_thread): New stack
45         walker function which works on a specific thread and passes a StackFrameInfo
46         structure to its callback.
47
48         * mini.c (mini_init): Initialize the debugger agent.
49
50         * aot-compiler.c aot-runtime.c: Add soft-debug support.
51
52         * mini-ops.h: Add OP_SEQ_POINT opcode.
53
54         * driver.c (mono_main): Add new '--debugger-agent' option for passing
55         arguments to the debugger agent.
56
57 2009-11-02  Zoltan Varga  <vargaz@gmail.com>
58
59         * mini.c (mini_method_compile): Disable llvm for methods with an lmf here to
60         speed things up.
61
62         * mini-llvm.c (mono_llvm_emit_method): Add support for OP_LOCALLOC.
63
64         * tramp-x86.c (mono_arch_get_llvm_imt_trampoline): Implement this for x86.
65
66         * mini.c (mini_init): Avoid using the IMT trampoline in the LLVM case.
67
68         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add a static rgctx trampoline
69         if needed.
70         (mono_create_llvm_imt_trampoline): New function to create a trampoline which
71         sets the IMT argument and makes a virtual call.
72
73         * mini-llvm.c: Enable interface calls using the llvm imt trampoline.
74
75 2009-11-01  Zoltan Varga  <vargaz@gmail.com>
76
77         * Makefile.am (llvm_sources): Enable the llvm option since it no longer breaks
78         the windows build.
79
80 2009-10-30  Zoltan Varga  <vargaz@gmail.com>
81
82         * mini.c (mini_cleanup): Call profiler shutdown before shutting down the
83         runtime. Fixes #551228.
84
85 2009-10-29  Zoltan Varga  <vargaz@gmail.com>
86
87         * mini-x86.c (mono_arch_output_basic_block): Fix % 1. Fixes #550970.
88
89         * basic.cs: Add a test.
90
91         * method-to-ir.c (mono_method_to_ir): Use EMIT_NEW_LOAD_MEMBASE_TYPE to
92         load vtypes instead if OP_LOADV_MEMBASE in the implementation of
93         CONSTRAINED. Fixes #550964.
94
95         * generics.cs: Add a test.
96
97 2009-10-28  Mark Probst  <mark.probst@gmail.com>
98
99         * mini-posix.c (add_signal_handler): Use
100         mono_gc_get_suspend_signal() instead of GC_get_suspend_signal().
101
102 2009-10-28 Jerry Maine <crashfourit@gmail.com>
103
104         Contributed under the terms of the MIT/X11 license by
105         Jerry Maine <crashfourit@gail.com>.
106
107         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions): Added code to detect
108         sse4a for simd intrinsics.
109
110         * mini-amd64.c (mono_arch_cpu_enumerate_simd_versions): Added code to detect
111         sse4a for simd intrinsics.
112
113 2009-10-27  Zoltan Varga  <vargaz@gmail.com>
114
115         * ir-emit.h method-to-ir.c: Change a few _IMM macros to assign to inst_imm
116         instead of inst_p1 which is not the same on ILP32 platforms.
117
118 2009-10-24  Zoltan Varga  <vargaz@gmail.com>
119
120         * mini-ppc.c (mono_arch_emit_prolog): Load the current got address,
121         not the mscorlib one before calling mono_get_lmf_addr.
122
123         * tramp-ppc.c (mono_arch_create_trampoline_code_full): Fix the storing
124         of the ip to the LMF.
125
126         * method-to-ir.c (mono_method_to_ir): Fix the handling of the
127         immediate in the op->op_imm optimization.
128
129         * mini-ppc.c: Add a 'vtregs' field to ArgInfo to make the code easier to
130         understand. VTypes now work, but are not abi compliant, as they are
131         split into 4 byte parts instead of 8.
132         (emit_memcpy): Fix the unrolled case to work on the PS3.
133
134         * mini-ppc.c (get_delegate_invoke_impl): Fix this for the PS3.
135
136         * aot-compiler.c (mono_compile_assembly): Make the autoreg option
137         the default when static linking.
138
139         * mini-ppc.c (mono_arch_emit_prolog): Fix handling of I8 arguments.
140
141         * aot-compiler.c: Add an autoreg option to automatically register
142         statically linked aot modules using ELF .ctors.
143
144         * genmdesc.pl: Add __ppc64__ to allowed defines.
145
146 2009-10-25  Zoltan Varga  <vargaz@gmail.com>
147
148         * mini-posix.c (add_signal_handler): Delay the GC suspend signal while
149         executing a SIGSEGV handler on an altstack, since libgc can't handle that.
150
151 2009-10-24  Mark Probst  <mark.probst@gmail.com>
152
153         * exceptions-x86.c (mono_arch_find_jit_info): Fix build.
154
155 2009-10-24  Zoltan Varga  <vargaz@gmail.com>
156
157         * mini-exceptions.c (mini_jit_info_table_find): Add an 'out_domain' argument
158         which will contain the domain where the method was found.
159
160         * exceptions-<ARCH>.c mini-exceptions.c: Update callers of
161         mini_jit_info_table_find ().
162
163         * aot-compiler.c (xdebug_end_emit): Remove so stray debug code.
164
165         * branch-opts.c (mono_if_conversion): Avoid running deadce if it is disabled.
166
167 2009-10-22  Zoltan Varga  <vargaz@gmail.com>
168
169         * mini-x86.c (mono_arch_emit_prolog): Disable aot for methods with save_lmf
170         set, its not supported yet.
171
172 2009-10-22  Zoltan Varga  <vargaz@gmail.com>
173
174         * aot-runtime.c (mono_aot_get_method): Avoid asserting if a array generic
175         iface wrapper is not found.
176         (mono_aot_get_method): Ditto for GetGenericValueImpl.
177
178 2009-10-21  Zoltan Varga  <vargaz@gmail.com>
179
180         * aot-runtime.c (mono_aot_get_method): Fix support for the IList<T> wrappers,
181         which have a different name.
182
183         * aot-runtime.c (mono_aot_get_method): Special case the array generic iface
184         wrappers and Array.GetGenericValueImpl ().
185
186         * aot-compiler.c: Avoid emitting some wrappers which are not needed anymore
187         because of the change above.
188
189         * generics.cs: Add a test for full aot + generic array ifaces.
190
191 2009-10-19  Sebastien Pouliot  <sebastien@ximian.com>
192
193         * aot-compiler.c (emit_plt): Remove duplicate 'debug_sym' variable 
194         that hides the previous one.
195
196 2009-10-18  Zoltan Varga  <vargaz@gmail.com>
197
198         * aot-compiler.c (can_marshal_struct): Allow some System.dll structs to be
199         marshalled. Fixes #541623.
200
201 2009-10-16  Zoltan Varga  <vargaz@gmail.com>
202
203         * aot-compiler.c (emit_extra_methods): Remove some asserts which are not needed.
204
205 2009-10-15  Zoltan Varga  <vargaz@gmail.com>
206
207         * mini.c (mono_op_imm_to_op): Handle OP_AND/OR/XOR_IMM.
208
209 2009-10-14  Massimiliano Mantione  <massi@ximian.com>
210
211         * mini-posix.c (sigprof_signal_handler):
212         Implemented support for building stat call chans in different ways.
213
214 2009-10-14  Massimiliano Mantione  <massi@ximian.com>
215
216         * mini-exceptions.c (mono_find_jit_info):
217         Also check that a jit info has been found (fixes a profiler crash).
218
219 2009-10-14  Massimiliano Mantione  <massi@ximian.com>
220
221         * mini.c (mono_codegen):
222         Call mono_profiler_code_buffer_new with correct code address.
223
224 2009-10-14  Zoltan Varga  <vargaz@gmail.com>
225
226         * driver.c (mono_main): Change the date in the copyright.
227
228 2009-10-14  Mark Probst  <mark.probst@gmail.com>
229
230         * method-to-ir.c (mono_method_to_ir): Don't use a managed array
231         allocator in shared generic code for open classes, because we
232         can't get those classes' vtables.  We need to make managed
233         allocators not depend on the vtable at compile-time to solve this.
234
235 2009-10-13  Martin Baulig  <martin@ximian.com>
236
237         * debug-mini.c (mono_debugger_trampoline_compiled): Add
238         `const guint8 *trampoline' argument; send both the old and the new
239         notification.
240
241 2009-09-30  Zoltan Varga  <vargaz@gmail.com>
242
243         * aot-compiler.c (add_wrappers): Add a runtime invoke wrapper which is used by
244         mono_runtime_capture_context () without calling mono_runtime_invoke ().
245         (can_marshal_struct): Skip structures with auto layout.
246
247         * tramp-arm.c (GEN_TRAMP_SIZE): Increase this by 4.
248
249 2009-10-02  Zoltan Varga  <vargaz@gmail.com>
250
251         * mini-sparc.c (mono_arch_emit_setret): Emit long return values using OP_LMOVE.
252         (mono_arch_create_vars): Instead of allocating a stack slot by hand, allocate
253         a variable to hold the stack slot used by the int<->float conversion opcodes.
254
255         * mini-sparc.c (mono_arch_build_imt_thunk): Implement support for fail_tramp.
256
257 2009-10-04  Zoltan Varga  <vargaz@gmail.com>
258
259         * aot-compiler.c (add_generic_class): Only add GetGenericValueImpl wrappers
260         when using full-aot.
261
262 2009-10-06  Zoltan Varga  <vargaz@gmail.com>
263
264         * aot-compiler.c (add_generic_class): Add an instance of GenericComparer<T> for
265         each instance of Comparer<T>.
266
267         * generics.cs: Add a new test.
268
269 2009-10-09  Zoltan Varga  <vargaz@gmail.com>
270
271         * driver.c (parse_debug_options): Add a 'gdb' option.
272
273         * mini.c (mini_parse_debug_options): Add a 'gdb' option.
274
275         * image-writer.c: Add support for emitting the image into a memory buffer.
276
277         * dwarfwriter.c: Add support for sharing one IL file between multiple images.
278
279         * aot-compiler.c: Add support for registering debug info with GDB using the
280         new JIT debugging interface in GDB 7.0. It can be turned on by setting
281         MONO_XDEBUG to 'gdb'.
282
283 2009-10-10  Zoltan Varga  <vargaz@gmail.com>
284
285         * aot-compiler.c (mono_save_trampoline_xdebug_info): Implement this for the
286         gdb mode.
287
288 2009-10-11  Zoltan Varga  <vargaz@gmail.com>
289
290         * aot-compiler.c (mono_save_xdebug_info): Emit a symbol for the method which
291         can be used to set breakpoints in gdb.
292
293         * image-writer.c (bin_writer_emit_writeout): Add support for setting the text
294         segment to an absolute address.
295
296 2009-10-13  Mark Probst  <mark.probst@gmail.com>
297
298         * method-to-ir.c: Use the managed array allocator method if
299         available.
300
301 2009-10-13  Bill Holmes  <billholmes54@gmail.com>
302
303         * aot-compiler.c : Fix the MSVC builds
304
305         Code is contributed under MIT/X11 license.
306
307 2009-10-13  Zoltan Varga  <vargaz@gmail.com>
308
309         * aot-compiler.c (mono_save_xdebug_info): Group methods into groups of 10 to
310         avoid registering 1 symbol file per method with gdb.
311
312 2009-09-29  Zoltan Varga  <vargaz@gmail.com>
313
314         * mini-sparc.c: Fix the handling of enums with base type long.
315
316         * mini-sparc.c (mono_arch_output_basic_block): Fix IREM_UN_IMM.
317
318         * mini-sparc.c (mono_arch_allocate_vars): Use mono_class_from_mono_type ()
319         instead of using type->data.klass as the later doesn't work with generics.
320
321 2009-09-25  Mark Probst  <mark.probst@gmail.com>
322
323         * method-to-ir.c, mini.h, mini-alpha.c, mini-amd64.c, mini-arm.c,
324         mini-hppa.c, mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c,
325         mini-s390x.c, mini-sparc.c, mini-x86.c: Thread.get_CurrentThread
326         works differently now and we don't handle it in the JIT anymore.
327
328         * mini.c, mini-exceptions.c, mini-posix.c, debug-debugger.c,
329         debug-mini.c, tramp-amd64.c, tramp-x86.c: Changes resulting from
330         the Thread class split.
331
332 2009-09-25  Zoltan Varga  <vargaz@gmail.com>
333
334         * driver.c: Don't run tests with the obsolete treeprop optimization.
335
336         * mini-sparc.c (mono_arch_create_vars): Make the component vars of a long ret
337         variable volatile. Fixes #541577.
338
339         * basic-calls.cs: Add a new test.
340
341         * basic-long.cs: Remove tests which are now in basic-calls.cs.
342
343 2009-09-24  Zoltan Varga  <vargaz@gmail.com>
344
345         * dwarfwriter.c (emit_debug_info_end): Disable this as it doesn't seem to
346         work/required with recent iphone sdk versions.
347
348         * aot-compiler.c (add_wrappers): Generate PtrToStructure wrappers for more
349         structures.
350
351         * decompose.c (mono_decompose_vtype_opts): Avoid reading uninitialized memory
352         in the VCALL decomposition code.
353
354 2009-09-22  Zoltan Varga  <vargaz@gmail.com>
355
356         * mini-ia64.c (mono_arch_output_basic_block): Fix ISHR/ISHR_IMM.
357
358         * basic.cs: Add a test.
359
360         * mini-ia64.c (mono_arch_build_imt_thunk): Implement support the virtual
361         generic invokes.
362
363         * mini-exceptions.c (mini_jit_info_table_find): New helper function which
364         searches all the domains of the current thread.
365
366         * exceptions-<ARCH>.c: Use it. Fixes #539394.
367
368 2009-09-21  Zoltan Varga  <vargaz@gmail.com>
369
370         * exceptions-arm.c (mono_arm_throw_exception): Set ctx->ebp to fp instead of sp
371         so catching exceptions thrown in the same method works. Fixes exception17.exe.
372
373         * tramp-arm.c (mono_arch_create_trampoline_code_full): Store NULL into lmf->method
374         for non-jit trampolines.
375
376         * mini.c (mono_jit_runtime_invoke): Allow string ctors with dyn runtime invoke.
377
378         * aot-compiler.c (add_wrappers): Ditto.
379
380         * mini-arm.c: Implement support for passing vtypes and floats, and increase
381         the size of the param area used by dyn_call to 6 which covers the majority of
382         methods.
383
384         * mini.c aot-compiler.c: Allow dyn_call for string methods except ctors.
385
386         * mini-arm.c: Implement support for passing/receiving
387         longs and receiving floats in the dyn_call code.
388
389         * mini-amd64.c: Implement support for receiving vtypes in registers in
390         the dyn_call code.
391
392         * mini.c mini-amd64.c: Implement partial support for passing vtypes in
393         the dyn_call code.
394
395 2009-09-20  Zoltan Varga  <vargaz@gmail.com>
396
397         * mini-arm.c (get_call_info): Return more precise information in
398         ArgInfo->regtype.
399         (dyn_call_supported): Use the information in CallInfo.
400
401         * mini-arm.c: Enable support for returning vtypes in the dyn_call code.
402
403         * mini.c mini-amd64.c: Enable support for returning vtypes in the dyn_call
404         code.
405
406         * mini-arm.c: Update after the dyn_call api changes.
407
408         * mini.c (mini_create_jit_domain_info): Register a destructor function
409         for the runtime_invoke_hash.
410
411         * mini-amd64.c (mono_arch_get_dyn_call_args): Rename this to
412         'mono_arch_dyn_call_start'. Pass the pointer to the return value buffer to
413         this function.
414         (mono_arch_get_dyn_call_ret): Rename this to 'mono_arch_dyn_call_finish'.
415         (dyn_call_supported): Simplify this by using get_call_info ().
416         (mono_arch_dyn_call_free): New destructor function.
417
418         * generics.cs: Remove a printf.
419
420         * method-to-ir.c (mono_method_to_ir): Allocate some param area for DYN_CALL.
421
422         * mini-arm.c: Add support for enum return values and passing a few arguments
423         on the stack.
424         
425         * mini.c (mono_jit_runtime_invoke): Add support for enum return values to
426         dyn invoke.
427
428         * mini-amd64.c (mono_arch_get_dyn_call_ret): Ditto.
429
430         * aot-compiler.c (add_wrappers): Add a few restrictions for the use of
431         the dynamic invoke wrappers.
432
433         * mini-arm.c: Implement OP_DYN_CALL for arm.
434
435         * aot-compiler.c (add_wrappers): Avoid aot-ing runtime invoke wrappers
436         supported by the dynamic runtime invoke wrapper.
437
438         * aot-compiler.c aot-runtime.c: Add support for encoding the dynamic
439         runtime invoke wrapper.
440
441         * mini.c (mono_jit_runtime_invoke): Use the dynamic runtime invoke wrappers
442         if possible when running with full-aot.
443
444         * mini-ops.h: Add OP_DYN_CALL opcode.
445
446         * mini-amd64.c method-to-ir.c: Add infrastructure for making method calls
447         with dynamic arguments lists similar to libffi.
448
449 2009-09-19  Zoltan Varga  <vargaz@gmail.com>
450
451         * method-to-ir.c: Fix the previous change on 64 bit platforms.
452         
453         * method-to-ir.c: Applied patch from Rodrigo Kumpera. Allow an i8 argument
454         to NEWARR.
455
456         * iltests.il.in: Add a new test.
457         
458 2009-09-18  Zoltan Varga  <vargaz@gmail.com>
459
460         * aot-compiler.c (add_generic_instances): Add more instances of
461         GenericEqualityComparer.
462
463 2009-09-18  Rodrigo Kumpera  <rkumpera@novell.com>
464
465         * mini.c: Add asserts for mono_class_vtable calls that are not meant to fail.
466
467 2009-09-18  Rodrigo Kumpera  <rkumpera@novell.com>
468
469         * method-to-ir.c: Handle failures from mono_class_vtable. Added some
470         comments on some functions that now can fail.
471
472 2009-09-17  Andrew Jorgensen  <ajorgensen@novell.com>
473
474         * Makefile.am: Add Info.plist to EXTRA_DIST
475
476 2009-09-16  Zoltan Varga  <vargaz@gmail.com>
477
478         * method-to-ir.c (mono_method_to_ir): Allow AOT for CEE_LDTOKEN in
479         static synchronized wrappers. Fixes #539500.
480
481 2009-09-14  Rodrigo Kumpera  <rkumpera@novell.com>
482
483         * jit-icalls.c (mono_class_static_field_address): handle vtable failure
484         properly.
485
486 2009-09-16  Zoltan Varga  <vargaz@gmail.com>
487
488         * mini-exceptions.c (mono_handle_exception_internal): Store the computed
489         lmf before calling filter clauses as well. Fixes #539550.
490
491         * exceptions.cs: Add a test.
492         
493 2009-09-14  Zoltan Varga  <vargaz@gmail.com>
494
495         * aot-compiler.c (add_generic_class): Add instances of
496         Array.GetGenericValueImpl as well.
497
498         * Makefile.am (fullaotcheck): Copy and aot more assemblies so linq
499         can be tested too.
500
501         * generics.cs: Add a fullaot linq test.
502
503 2009-09-10  Zoltan Varga  <vargaz@gmail.com>
504
505         * aot-compiler.c (arch_emit_static_rgctx_trampoline): Don't clobber argument
506         reg r1 on arm.
507
508 2009-09-10  Bill Holmes  <billholmes54@gmail.com>
509
510         * mini-trampolines.c (mono_delegate_trampoline) : Call
511           mono_cominterop_get_invoke if the delegate target object
512           is a COM object.
513
514         Code is contributed under MIT/X11 license.
515
516 2009-09-09  Sebastien Pouliot  <sebastien@ximian.com>
517
518         * method-to-ir.c: For CoreCLR throw a SecurityException if an 
519         internal call is defined outside platform code. Reduce code 
520         duplication with existing [Method|Field]AccessException
521
522 2009-09-08  Rodrigo Kumpera  <rkumpera@novell.com>
523
524         * mini-x86.c (mono_arch_emit_call): Don't reduce stack usage by 4
525         if the return value is a small struct passed on regs.
526
527 2009-09-09  Zoltan Varga  <vargaz@gmail.com>
528
529         * cpu-arm.md mini-arm.c: Remove unused opcodes.
530
531         * mini-codegen.c: Enable the cpu description validation for arm.
532
533 2009-09-08  Zoltan Varga  <vargaz@gmail.com>
534
535         * basic-calls.cs: Move the test_0_float_load_and_store_with_big_offset ()
536         test which depends on structs to objects.cs.
537         
538         * basic-calls.cs: Remove calls to Console.WriteLine and throws, since those
539         require object model related stuff working.
540
541         * cpu-x86.md mini-x86.c: Remove more unused opcodes.
542
543         * mini-ops.h: Fix OP_BIGMUL instruction descriptions.
544
545         * mini-codegen.c (mono_local_regalloc): Validate the cpu description 
546         against the instruction metadata in mini-ops.h. amd64 only for now.
547
548         * mini-ops.h: Fix some instruction descriptions.
549
550         * mini-ops.h mini-x86.c mini-amd64.c cpu-<ARCH>.md: Remove some
551         unused instructions.
552
553 2009-09-06  Zoltan Varga  <vargaz@gmail.com>
554
555         * exceptions.cs: Add a new test.
556
557 2009-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
558
559         * mini-x86.c (needs_stack_frame): OSX requires full frames to keep proper alignment.
560
561 2009-09-06  Zoltan Varga  <vargaz@gmail.com>
562
563         * mini-llvm.c (mono_llvm_emit_method): Add a few more missing casts,
564         skip empty phi opcodes.
565         
566         * mini-llvm.c (mono_llvm_emit_method): Handle unsigned volatile variables
567         correctly by zero extending after loads. Skip methods containing calls
568         to the monitor enter/exit trampolines.
569
570         * tramp-x86.c (mono_arch_create_trampoline_code): Align the stack
571         when calling mono_thread_force_interruption_checkpoint ().
572
573         * mini.c (mini_method_compile): Disable llvm when AOT compiling.
574
575         * tramp-amd64.c (mono_arch_patch_callsite): Add support for 32 bit ->
576         64 bit thunks.
577         (mono_arch_nullify_class_init_trampoline): Read 'buf' instead of 'code'.
578
579         * mini-llvm.c (mono_llvm_emit_method): Add a few missing conversions so a 
580         bootstrap could run.
581
582 2009-09-04  Zoltan Varga  <vargaz@gmail.com>
583
584         * mini.c (mini_init): Set callbacks.get_runtime_build_info ().
585
586 2009-09-03  Zoltan Varga  <vargaz@gmail.com>
587
588         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass the start
589         of the method to
590         mono_breakpoint_clean_code () when using LLVM as the prologues generated by
591         LLVM might be very short.
592
593         * mini-x86.c (mono_arch_output_basic_block): Maintain stack alignment
594         in OP_THROW/RETHROW.
595
596         * exceptions-x86.c: Rewrite the throw trampolines so they maintain stack
597         alignment on osx.
598
599 2009-09-03  Zoltan Varga  <vargaz@gmail.com>
600
601         * mini-amd64.c (mono_arch_get_vcall_slot): Pass the start of the method to
602         mono_breakpoint_clean_code () when using LLVM as the prologues generated by
603         LLVM might be very short.
604
605 2009-09-01  Zoltan Varga  <vargaz@gmail.com>
606
607         * exceptions-x86.c (throw_exception): Fix the previous change by substracting
608         the alignment for the value of sp.
609
610 2009-09-01  Geoff Norton  <gnorton@novell.com>
611
612         * mini.c (mono_get_lmf_addr): Fix jit_thread_attach for native to 
613         managed wrappers in full aot.
614
615 2009-08-31  Zoltan Varga  <vargaz@gmail.com>
616
617         * exceptions-x86.c (get_throw_exception): Align the stack on osx.
618
619 2009-08-28  Zoltan Varga  <vargaz@gmail.com>
620
621         * mini-llvm-cpp.cpp mini-llvm.c: Update to latest llvm api.
622
623 2009-08-25  Zoltan Varga  <vargaz@gmail.com>
624
625         * aot-compiler.c (emit_exception_debug_info): Emit ei->flags too.
626
627         * aot-runtime.c (decode_exception_debug_info): Decode ei->flags from the
628         saved info.
629
630         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
631
632         * aot-runtime.c aot-compiler.c: Emit exception causes fully so we don't
633         depend on the info MonoMethodHeader which could be missing in IL stripped
634         assemblies.
635
636 2009-08-25  Zoltan Varga  <vargaz@gmail.com>
637
638         * mini-arm.c (add_general): Fix the passing of 64 bit values on darwin, where
639         they are only 4 byte aligned.
640
641 2009-08-21  Zoltan Varga  <vargaz@gmail.com>
642
643         * mini-arm.c (mono_arch_allocate_vars): Use FP as the frame pointer as
644         was done previously, since using SP causes too many problems.
645
646         * exceptions-arm.c: Fix the handling of sp/fp so unwinding through
647         frames without a frame pointer works.
648
649         * mini-arm.c (mono_arch_get_global_int_regs): Avoid using V5 as a
650         global register in methods with calls, since the calls can go through
651         a static rgctx trampoline which doesn't save it.
652
653 2009-08-19  Zoltan Varga  <vargaz@gmail.com>
654
655         * mini-arm.c (mono_arch_context_get_int_reg): Handle SP as well.
656
657 2009-08-18  Zoltan Varga  <vargaz@gmail.com>
658
659         * aot-compiler.c (add_generic_instances): Fix the net 1.1 build.
660
661 2009-08-18  Christian Hergert  <chris@dronelabs.com>
662
663         * method-to-ir.c: Fix warnings for uninitialized variables.
664
665 2009-08-18  Christian Hergert  <chris@dronelabs.com>
666
667         * mini-exceptions.c:
668         * aot-compiler.c: Fix printf warnings.
669
670 2009-08-18  Zoltan Varga  <vargaz@gmail.com>
671
672         * aot-compiler.c (add_generic_instances): Add string[] wrapper methods.
673         Add GetGenericValueImpl<string>.
674         
675         * aot-compiler.c (add_generic_instances): Add instances of
676         GenericEqualityComparer<T> for primitive types. Only emit the array
677         wrappers into the mscorlib image.
678
679 2009-08-15  Zoltan Varga  <vargaz@gmail.com>
680
681         * aot-runtime.c (load_method): Rename 'aot_module' -> 'amodule'. Allocate
682         the methods_loaded array using amodule->info->nmethods.
683
684         * mini.h (MonoAotFileInfo): Add an 'nmethods' field.
685         (MONO_AOT_FILE_VERSION): Bump this.
686
687         * aot-compiler.c: Emit more generic instances allowing some parts of linq
688         to work.
689
690         * aot-runtime.c (mono_aot_get_unwind_info): Handle the case when the
691         MonoJitInfo doesn't belong to its methods aot image.
692
693 2009-08-14  Zoltan Varga  <vargaz@gmail.com>
694
695         * mini-arm.c (mono_arch_allocate_vars): Use SP as the default frame reg.
696
697         * mini-arm.c: Fix warnings.
698         
699         * mini-arm.c (mono_arm_emit_load_imm): Only emit a movt if needed.
700
701         * mini-arm.c (mono_arm_emit_load_imm): Use movt/movw if the cpu
702         supports it.
703
704 2009-08-12  Zoltan Varga  <vargaz@gmail.com>
705
706         * aot-compiler.c (arch_emit_imt_thunk): Rework the arm code to
707         avoid clobbering IP.
708
709         * mini-trampolines.c (mono_magic_trampoline): Allocate a local to
710         hold the trampoline argument, so its initial value is available during
711         debugging.
712
713 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
714
715         * exceptions-arm.c:
716         * exceptions-hppa.c:
717         * mini.c:
718         * exceptions-s390x.c:
719         * exceptions-mips.c:
720         * exceptions-ppc.c:
721         * exceptions-sparc.c:
722         * exceptions-alpha.c:
723         * aot-runtime.c:
724         * mini-trampolines.c:
725         * exceptions-x86.c:
726         * exceptions-s390.c: add and use #define's instead of sizeof()
727         for MonoJitInfo and MonoJitInfoTable.
728
729 2009-08-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
730
731         * tramp-arm.c:
732         * tramp-amd64.c:
733         * tramp-ppc.c:
734         * tramp-x86.c: use a #define instead of sizeof() for a few
735         structures that use a zero-length array.
736
737 2009-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
738
739         * method-to-ir.c (mono_method_to_ir/CEE_CONSTRAINED_): Handle the
740         case when the method is dynamic. Fixes #529238.
741
742 2009-08-06  Zoltan Varga  <vargaz@gmail.com>
743
744         * mini.c (mono_jit_compile_method_inner): Throw an exception instead
745         of asserting when a method is JIT compiled in full-aot mode.
746
747 2009-08-03  Jerry Maine  <crashfourit@gmail.com>
748         
749         Contributed under the terms of the MIT/X11 license by
750         Jerry Maine <crashfourit@gail.com>.
751         
752         * fixed wrong dates in changelog.
753
754 2009-08-03  Jerry Maine  <crashfourit@gmail.com>
755         
756         Contributed under the terms of the MIT/X11 license by
757         Jerry Maine <crashfourit@gail.com>.
758
759         * basic-simd.cs: added test for packed double square root.
760         * cpu-amd64.md: added opcode info for packed double square root.
761         * cpu-x86.md: added opcode info for packed double square root.
762         * mini-ops.h: added IR opcode for packed double square root.
763         * mini-x86.c: added IR to native translation code for packed double square root.
764         * mini-amd64.c: removed todo for packed double square root.
765         * simd-intrinsics.c: added method to IR opcode converstion for
766         packed double square root.
767
768 2009-08-03 Jerry Maine <crashfourit@gmail.com>
769
770         Contributed under the terms of the MIT/X11 license by
771         Jerry Maine <crashfourit@gail.com>.
772
773         * mini-amd64.c: Added a change to help tell the difference as 
774         to what perpose the xmm register is being used--mainly to help
775         with debuging.
776         * mini-amd64.h: Changed callee regs to use 15 out of 16 
777         (one used for special cases) xmm registers for both fp
778         and simd ops. Added define to turn on new feature in the regalloc
779         that allows fp and simd ops to share the xmm regs happily.
780         * codegen.c: Added code to detect for which perpose an xmm reg is
781         being used (fp or simd) and to translate back and forth to the
782         correct logical reg bank (fp or simd) for 'spill load's.
783
784 2009-08-03 Jerry Maine <crashfourit@gmail.com>
785
786         Contributed under the terms of the MIT/X11 license by
787         Jerry Maine <crashfourit@gail.com>.
788
789         * basic-simd.cs: Added tests for stressing the regalloc when running with
790         16 simd regs and when simd and fp ops share the same reg bank.
791
792 2009-08-01  Mark Probst  <mark.probst@gmail.com>
793
794         * method-to-ir.c (mini_emit_stobj): If we call mono_value_copy()
795         in shared generic code, we might have to look up the class in the
796         RGCTX.  If we use the class directly, compute its GC descriptor.
797
798 2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>
799
800         * mini.c (mono_jit_runtime_invoke): Fix a warning.
801
802 2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>
803
804         * mini.c (mono_jit_runtime_invoke): Initialize the class and
805         check for errors. Fixed the case when the class with the Main
806         method is broken.
807
808 2009-07-31 Jerry Maine <crashfourit@gmail.com>
809
810         Contributed under the terms of the MIT/X11 license by
811         Jerry Maine <crashfourit@gail.com>.
812
813         * cpu-amd64.md: Fixed simple bug in machine discrition file.
814
815 2009-07-31  Zoltan Varga  <vargaz@gmail.com>
816
817         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_IREM_UN_IMM.
818
819 2009-08-30  Rodrigo Kumpera  <rkumpera@novell.com>
820
821         * method-to-ir.c: Fix naming of stelem and ldelem.
822
823 2009-07-30  Zoltan Varga  <vargaz@gmail.com>
824
825         * driver.c (main_thread_handler): Check that the assembly loaded
826         matches the filename when doing AOT.
827
828 2009-07-30  Mark Probst  <mark.probst@gmail.com>
829
830         * mini.c: get_ip_from_sigctx installer has been removed, so don't
831         call it anymore.
832
833         * mini-x86.h, mini-amd64.h, mini-ppc.h: UCONTEXT macros moved (to
834         utils/mono-sigcontext.h).
835
836         * exceptions-amd64.c: Use the UCONTEXT_GREGS macro instead of an
837         #ifdef.
838
839 2009-07-29  Massimiliano Mantione  <massi@ximian.com>
840
841         * mini.c (mono_codegen):
842         Call profiler hook to keep track of method code buffers.
843
844 2009-07-27  Mark Probst  <mark.probst@gmail.com>
845
846         * method-to-ir.c: Invoke write barriers for the
847         Interlocked.(Compare)Exchange JIT intrinsics.
848
849 2009-07-26  Raja R Harinath  <harinath@hurrynot.org>
850
851         * Makefile.am (version.h): Fix issues when built out of tree.
852         Remove some redundant 'grep's piped through 'sed's.
853
854 Fri Jul 24 17:28:37 CEST 2009 Steven Munroe  <munroesj@us.ibm.com>
855
856         This patch is contributed under the terms of the MIT/X11 license
857
858         * mini-ppc.c (mono_arch_output_basic_block):
859         (OP_STOREI1_MEMBASE_REG): Handle 32-bit offsets combining addis
860         for bits 32-47 with signed load/store diplacements for bits
861         48-63.  Use prefered base/offset order for indexed form.
862         (OP_STOREI2_MEMBASE_REG, OP_STORE_MEMBASE_REG): Same.
863         (OP_LOAD_MEMBASE, OP_LOADI4_MEMBASE, OP_LOADU4_MEMBASE,
864         OP_LOADI1_MEMBASE, OP_LOADU1_MEMBASE, OP_LOADU2_MEMBASE,
865         OP_LOADI2_MEMBASE): Same.
866         (OP_STORER8_MEMBASE_REG, OP_LOADR8_MEMBASE,
867         OP_STORER4_MEMBASE_REG, OP_LOADR4_MEMBASE): Same.
868         (OP_STOREI1_MEMINDEX): Use prefered base/offset order for
869         indexed form.
870         (OP_STOREI2_MEMINDEX, OP_STORE_MEMINDEX): Same.
871         (OP_LOAD_MEMINDEX, OP_LOADI4_MEMINDEX, OP_LOADU4_MEMINDEX,
872         OP_LOADU2_MEMINDEX, OP_LOADI2_MEMINDEX, OP_LOADU1_MEMINDEX,
873         OP_LOADI1_MEMINDEX): Same
874         (OP_LOADR4_MEMINDEX, OP_LOADR8_MEMINDEX, OP_STORER4_MEMINDEX,
875         OP_STORER8_MEMINDEX): Same
876         (OP_JMP): Use addis/addi sequence for int cfg->stack_usage
877         computations.
878         (mono_arch_emit_prolog): Handle 32-bit offsets combining addis
879         for bits 32-47 with signed load/store diplacements for bits
880         48-63.  Use prefered base/offset order for indexed form.
881
882 Fri Jul 24 16:57:12 CEST 2009 Steven Munroe  <munroesj@us.ibm.com>
883
884 This patch is contributed under the terms of the MIT/X11 license
885
886         * mini-ppc.c: Define PPC_MOVE_FPR_GPR and PPC_ISA_64.
887         (mono_arch_get_vcall_slot): Fx pointer to int cast warning.
888         (mono_arch_decompose_opts): Make OP_ICONV_TO_R4 and
889         OP_ICONV_TO_R8 decompose conditional on !PPC_ISA_64.
890         (mono_arch_output_basic_block) [OP_JMP]: Use ppc_load32 for
891         cfg->stack_usage to avoid size warnings.
892         (mono_arch_output_basic_block) [__mono_ppc64__]: Replace
893         store/load sequence with mffgpr if PPC_MOVE_FPR_GPR is true.
894         (mono_arch_output_basic_block) [!__mono_ppc64__]: For
895         OP_ICONV_TO_R4 or OP_ICONV_TO_R8 and PPC_ISA_64 use fcfid
896         to convert.
897         (mono_arch_emit_prolog): Move mono_emit_unwind_op_def_cfa 
898         after code varible is initialized.
899         Add g_assert ppc_is_imm16 for ainfo->offset. Handle
900         ainfo->size == 8 when ainfo->offset !ppc_is_imm16.
901         (mono_arch_emit_epilog): 
902         Move Use ppc_load32 for cfg->stack_usage to avoid size
903         warnings.
904
905 2009-07-24  Mark Probst  <mark.probst@gmail.com>
906
907         * method-to-ir.c: The write barrier doesn't do the store anymore,
908         so we have always to emit it.  Also, emit the wbarrier after the
909         store.
910
911 2009-07-24  Zoltan Varga  <vargaz@gmail.com>
912
913         * mini-arm.c (mono_arch_get_delegate_invoke_impls): Add a trampoline
914         for argument count 3 too.
915
916 2009-07-23  Zoltan Varga  <vargaz@gmail.com>
917
918         * mini.c (mono_jit_compile_method_with_opt): Add an 'ex' argument to let
919         the caller handle the exceptions.
920         (mono_jit_runtime_invoke): Handle exceptions thrown while compiling the
921         method. Fixes #524498.
922
923 2009-07-22  Geoff Norton  <gnorton@novell.com>
924
925         * mini-exceptions.c: Fix build on ia64.
926
927 2009-07-22  Mark Probst  <mark.probst@gmail.com>
928
929         * mini-exceptions.c (ves_icall_get_frame_info): Use write
930         barriers.
931
932 2009-07-21  Zoltan Varga  <vargaz@gmail.com>
933
934         * mini-arm.c (mono_arch_emit_prolog): Fix thread attaching in aot
935         code.
936
937 2009-07-20  Zoltan Varga  <vargaz@gmail.com>
938
939         * basic-simd.cs (Main): Pass args to the test driver.
940
941 2009-07-20  Geoff Norton  <gnorton@novell.com>
942
943         * mini-x86.h: Fix the x86 version guards to use Apple's
944         properly defined macros.
945
946 2009-07-20  Geoff Norton  <gnorton@novell.com>
947
948         * mini-x86.c: Fix --trace on darwin-x86 and other systems which require
949         aligned access.
950
951 2009-07-20  Zoltan Varga  <vargaz@gmail.com>
952
953         * mini.c (mono_jit_runtime_invoke): Speed this up by adding a hash to
954         MonoJitDomainInfo which maps MonoMethod's to a structure containing all
955         the information which is needed for invokes, so only one locking+hash table
956         lookup is needed.
957
958         * aot-compiler.c: Add a 'tool-prefix' option to be used when cross-compiling.
959         
960         * aot-compiler.c (add_generic_instances): Emit instances of 
961         GenericComparer<T> for primitive types.
962
963 2009-07-19 Rodrigo Kumpera  <rkumpera@novell.com>
964
965         * mini-posix.c: Fix linux build.
966
967 2009-07-19  Geoff Norton  <gnorton@novell.com>
968
969         * mini.h: Add prototypes for mono_runtime_syscall_fork and
970         mono_gdb_render_native_backtraces
971         * mini-darwin.c: Apple's syscall(SYS_fork) is very weird on x86,
972         so we implement the sane semantics to the runtime here
973         (mono_gdb_render_native_backtraces).  Apple also uses an ancient gdb
974         so we need to call it differently (mono_gdb_render_native_backtraces)
975         * mini-posix.c: Move the old semantics from mini.c to the prototypes
976         here for default implementations.
977         * mini.c: Refactor mono_handle_native_sigsegv so that we can properly
978         support Apple's weird syscall (SYS_fork) implementation and not busy
979         loop in abort() on native crashes on OSX anymore.
980
981 2009-07-18  Zoltan Varga  <vargaz@gmail.com>
982
983         * aot-runtime.c (load_method): Change the handling of the
984         MONO_LASTAOT env variable so MONO_LASTAOT=0 means that no aot methods
985         are used.
986
987         * mini.c (mono_patch_info_equal): Really fix the handling of RGCTX_FETCH.
988
989 2009-07-17  Zoltan Varga  <vargaz@gmail.com>
990
991         * mini.c (mono_patch_info_equal): Revert the last change for now as it
992         seems to break the aot tests.
993         
994         * mini.c (mono_patch_info_equal): Fix the handling of 
995         MONO_PATCH_INFO_RGCTX_FETCH.
996
997 2009-07-16  Zoltan Varga  <vargaz@gmail.com>
998
999         * unwind.c: Use TARGET_AMD64 instead of __x86_64__.
1000
1001         * mini.c (mono_patch_info_hash): Fix the handling of 
1002         MONO_PATCH_INFO_INTERNAL_METHOD.
1003         (mono_patch_info_equal): Ditto.
1004
1005 2009-07-16  Zoltan Varga  <vargaz@gmail.com>
1006
1007         * mini-llvm.c (mono_llvm_emit_method): Use module instead of ctx->module
1008         in a few places.
1009         
1010         * mini-llvm.c: Add some infrastructure for AOT support.
1011
1012 2009-07-15  Zoltan Varga  <vargaz@gmail.com>
1013
1014         * mini-llvm-cpp.c: Update to the latest llvm api.
1015         
1016         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Set the EnablePrettyStackTrace
1017         option to false to prevent llvm from installing signal handlers which
1018         trip up the gc.
1019         
1020 2009-07-15 Rodrigo Kumpera  <rkumpera@novell.com>
1021
1022         * cpu-x86.md:
1023         * cpu-amd64.md: Revert previous change as those instructions
1024         take 2 separate arguments. Remember to read the arch docs more
1025         carefully next time.
1026
1027 2009-07-15  Zoltan Varga  <vargaz@gmail.com>
1028
1029         * mini-llvm-cpp.cpp (mono_llvm_build_alloca): Update to latest llvm api.
1030
1031 Wed Jul 15 17:20:27 CEST 2009 Paolo Molaro <lupus@ximian.com>
1032
1033         * mini-ppc.c: exploit multiple load/store units if available (rest of
1034         the change from Steven Munroe (<munroesj@us.ibm.com>) first patch at 
1035         http://bugzilla.novell.com/show_bug.cgi?id=487846).
1036
1037 Wed Jul 15 16:24:57 CEST 2009 Paolo Molaro <lupus@ximian.com>
1038
1039         * mini-ppc.c: integrate most of Steven Munroe (<munroesj@us.ibm.com>)
1040         first patch at http://bugzilla.novell.com/show_bug.cgi?id=487846.
1041
1042 2009-07-14 Rodrigo Kumpera  <rkumpera@novell.com>
1043
1044         * cpu-x86.md: Fix missing clobbering from trancendental simd
1045         ops.
1046
1047         * cpu-amd64.md: Same.
1048
1049 2009-07-14 Jerry Maine <crashfourit@gmail.com>
1050
1051         Contributed under the terms of the MIT/X11 license by
1052         Jerry Maine <crashfourit@gail.com>.
1053
1054         * basic-simd.cs: Added tests for single and doulble indexers.
1055
1056         * cpu-amd64.md: Added simd opcode information.
1057
1058         * mini-amd64.c: Added IR to native simd generation code.
1059         Added simd register names and function that returns them.
1060
1061         * mini-amd64.h: Added marcos to turn on simd code compilation in
1062         amd64. Added max simd register count marco. Added caller/callee
1063         register mask marcos. Added marcos to use simd register bank.
1064
1065         * mini.h: Added helper marco for shufling dwords and simple
1066         floats.
1067
1068 2009-07-14  Zoltan Varga  <vargaz@gmail.com>
1069
1070         * mini-llvm-cpp.cpp: Update to latest llvm SVN api.
1071
1072         * Makefile.am (mono_LDADD): Pass LLVM_LDFLAGS to the linked.
1073
1074         * unwind.c (mono_unwind_get_ops_from_fde): Make this return
1075         the length of the native code as well.
1076
1077         * basic-simd.cs: Add a test for #521662.
1078
1079 Mon Jul 13 17:58:50 CEST 2009 Paolo Molaro <lupus@ximian.com>
1080
1081         * mini-ppc.c: fixed bug introduced by Steven's TLS changes.
1082
1083 2009-07-13  Mark Probst  <mark.probst@gmail.com>
1084
1085         * mini.c: Register function for getting the IP from a signal
1086         context with metadata.
1087
1088 2009-07-13  Zoltan Varga  <vargaz@gmail.com>
1089
1090         * method-to-ir.c (mono_method_to_ir): When calling a gshared method,
1091         call a generic class init trampoline if needed. Fixes #519336.
1092
1093         * generics.cs: Add a test.
1094         
1095 2009-07-09  Mark Probst  <mark.probst@gmail.com>
1096
1097         * method-to-ir.c: When doing a call which might be remote from
1098         shared generic code to other shared code with open type arguments,
1099         get the remoting invoke wrapper from the RGCTX and do an indirect
1100         call to it.
1101
1102 2009-07-03  Zoltan Varga  <vargaz@gmail.com>
1103
1104         * mini-trampolines.c (get_unbox_trampoline): Add an rgctx trampoline
1105         after the unbox trampoline in the full-aot case.
1106
1107 2009-07-02  jonas echterhoff <jonas@unity3d.com>
1108         
1109         * mini.c: Move initialization of jit_mutex before debugger initialization
1110         
1111         to avoid crashes.
1112         
1113         
1114         * Info.plist: added Info.plist and link flag to enable the mono executable
1115         to access other processes. Requires codesigning of the executable to work.
1116         
1117         * mdb-debug-info32-darwin.s: The same as mdb-debug-info32.s, changed to 
1118         
1119         compile on OS X.
1120         
1121
1122 2009-06-30  Zoltan Varga  <vargaz@gmail.com>
1123
1124         * driver.c (mini_regression): Handle loading errors. Fixes #508869.
1125
1126 2009-06-29  Zoltan Varga  <vargaz@gmail.com>
1127
1128         * mini-exceptions.c (get_generic_context_from_stack_frame): Fix the case
1129         when the generic instance is an instantiation of a subclass of the
1130         methods class. Fixes #517166.
1131
1132 2009-06-26  Zoltan Varga  <vargaz@gmail.com>
1133
1134         * mini-amd64.c (mono_arch_emit_prolog): Fix thread attaching in AOTed
1135         code.
1136
1137         * mini.c (mono_jit_thread_attach): Allow domain to be NULL for calls from
1138         AOTed code.
1139
1140         * CMakeLists.txt: Add minimal support for installation.
1141
1142 2009-06-25  Zoltan Varga  <vargaz@gmail.com>
1143
1144         * aot-compiler.c (emit_and_reloc_code): Factor out the code to
1145         determine whenever a method is directly callable to a separate function.
1146
1147         * mini-<ARCH>.c tramp-<ARCH>.c: Remove needless casts and add new
1148         needed ones as a result of the previous change.
1149
1150         * mini-<ARCH>.c tramp-<ARCH>.c: Use mgreg_t* as the
1151         type of register arrays.
1152
1153         * mini-trampolines.c tramp-<ARCH>.c aot-runtime.c: Use mgreg_t* as the
1154         type of register arrays.
1155
1156 2009-06-24  Jerry Maine  <crashfourit@gmail.com>
1157         
1158         Contributed under the terms of the MIT/X11 license by
1159         Jerry Maine <crashfourit@gail.com>.
1160
1161         * mini-amd64.c: Added code to convert simd IR to native amd64 sse.
1162
1163 2009-06-24  Zoltan Varga  <vargaz@gmail.com>
1164
1165         * aot-compiler.c (emit_plt): Define debug labels for most plt entries.
1166
1167 2009-06-24  Neale Ferguson <neale@sinenomine.net>
1168
1169         * mini-s390x.c: Correct LCONV_TO_Ix and ICONV_TO_Ix routines. Fix leave_method
1170         dump of structure return value. Fix some formatting.
1171         * cpu-s390x.md: Fix lengths of instruction sequences.
1172         * mini-s390.c: Minor formatting changes.
1173
1174 2009-06-24  Zoltan Varga  <vargaz@gmail.com>
1175
1176         * mini-x86.h: Applied patch from Romain Tartiere (romain@blogreen.org).
1177         Use sigaction on freebsd as well.
1178
1179 2009-06-23  Zoltan Varga  <vargaz@gmail.com>
1180
1181         * mini.h: Don't define MONO_ARCH_HAVE_TLS_GET to 0, as some code
1182         uses #ifdef on it.
1183         
1184         * mini.c (mini_init): Revert a change which breaks cross-compilation.
1185
1186 2009-06-22  Mark Probst  <mark.probst@gmail.com>
1187
1188         * mini-ppc.c, cpu-ppc.md: Enable TLS on Darwin/G4.
1189
1190 2009-06-22  Mark Probst  <mark.probst@gmail.com>
1191
1192         * mini.c, mini.h: Tell the runtime whether we support MONO_TLS.
1193
1194 2009-06-20  Martin Baulig  <martin@ximian.com>
1195
1196         * debug-mini.c
1197         (MonoDebuggerThreadFlags): New enum typedef.
1198         (MonoDebuggerThreadInfo): Added `guint32 thread_flags'.
1199         (mono_debugger_thread_created): Added `gpointer func' argument;
1200         initialize the new `thread_flags' field.
1201
1202 2009-06-18  Martin Baulig  <martin@ximian.com>
1203
1204         * debug-debugger.h (MonoDebuggerRuntimeFlags): New enum typedef.
1205         (MonoDebuggerInfo): Renamed the `dummy' field info `runtime_info'.
1206
1207         * debug-debugger.c
1208         (mini_debugger_set_attach_ok): New function; sets the attach-ok
1209         flag in `MONO_DEBUGGER__info.runtime_info'.
1210
1211         * driver.c
1212         (mono_main): Call mini_debugger_set_attach_ok() if generics
1213         sharing is disabled.
1214
1215 2009-06-22  Zoltan Varga  <vargaz@gmail.com>
1216
1217         * aot-compiler.c (add_wrappers): Fix a warning.
1218
1219         * mini-ppc.c tramp-ppc.c exceptions-ppc.c aot-compiler.c: Update after
1220         the ppc load/store macro changes.
1221
1222 2009-06-21  Zoltan Varga  <vargaz@gmail.com>
1223
1224         * tramp-ppc.c (mono_arch_patch_plt_entry): Implement this.
1225
1226         * aot-compiler.c (mono_compile_assembly): Sanitize the plt symbol too,
1227         not just the got symbol.
1228
1229         * mini-ppc.c aot-compiler.c unwind.c: Implement generation of unwind info
1230         on ppc.
1231
1232         * aot-compiler.c unwind.c: Add infrastructure for unwind support on
1233         ppc.
1234         
1235         * aot-compiler.c: Remove some fixmes.
1236
1237         * driver.c (mono_main): Print a helpful message when cross-compiling.
1238
1239         * mini.c (mini_init): Disable signal handlers when cross-compiling.
1240
1241         * method-to-ir.c (initialize_array_data): Do the optimization if the
1242         target byte order is little endian, instead of the host byte order.
1243
1244         * aot-compiler.c: Emit sizes for most symbols, only emit runtime-invoke
1245         wrappers into the mscorlib image, Emit a unique plt symbol for each
1246         image, emit symbols for plt entries.
1247
1248         * image-writer.c (img_writer_emit_symbol_size): New function to emit
1249         a .size directive.
1250         
1251 2009-06-20  Zoltan Varga  <vargaz@gmail.com>
1252
1253         * aot-compiler.c (add_wrappers): Avoid calling 
1254         mono_marshal_get_type_info () since it can assert for some types.
1255
1256         * method-to-ir.c (mono_method_to_ir): Disable aot when some forms of 
1257         ldtoken are used inside wrappers.
1258
1259         * helpers.c: Add support for prefixing tools with the arch name.
1260
1261         * mini.h (OP_LOADR_MEMBASE): New opcodes to load/store pointer sized
1262         quantities when using ilp32.
1263
1264         * mini-codegen.c: Use OP_LOADR_MEMBASE/OP_STORER_MEMBASE for loading/storing
1265         spill slots. Use sizeof(mgreg_t) for the spill slot size.
1266
1267         * image-writer.c: Use .long on ilp32.
1268
1269         * aot-compiler.c: Use 32 bit loads on ilp32.
1270         
1271 2009-06-19  Zoltan Varga  <vargaz@gmail.com>
1272
1273         * tramp-ppc.c (mono_arch_create_trampoline_code): Fix the ppc build.
1274
1275         * mini-ops.h: Use TARGET_POWERPC define for consistency.
1276
1277         * patch-info.h: Add 'MSCORLIB_GOT_ADDR' patch type.
1278
1279         * aot-compiler.c aot-runtime.c: Put the mscorlib got address into the 
1280         second got slot of every aot image.
1281         
1282         * aot-compiler.c aot-runtime.c mini-trampolines.c: Add support for
1283         aot on platforms with function pointers.
1284
1285         * mini-ppc.h mini-ppp.c cpu-ppc.md exceptions-ppc.c tramp-ppc.c: Add
1286         support for aot/full aot on ppc/ppc64.
1287         
1288         * tramp-<ARCH>.c (mono_arch_patch_plt_entry): Add 'got' and 'regs'
1289         arguments which are needed on ppc.
1290
1291         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Add 'regs'
1292         argument.
1293
1294         * mini-trampolines.c aot-runtime.c: Update after the above changes.
1295         
1296         * liveness.c (BITS_PER_CHUNK): Use MONO_BITSET_BITS_PER_CHUNK.
1297
1298         * regalloc2.c (BITS_PER_CHUNK): Ditto.  
1299
1300         * aot-compiler.c (emit_got_info): Fix reading unused memory.
1301
1302         * ir-emit.h (alloc_dreg): Add a 'return -1' to quiet some compilers.
1303
1304 2009-06-17  Geoff Norton  <gnorton@novell.com>
1305
1306         * aot-compiler.c: Ensure we dont try to close a null dwarf writer.
1307
1308 2009-06-17  Zoltan Varga  <vargaz@gmail.com>
1309
1310         * dwarfwriter.c (mono_dwarf_writer_create): Add an 'appending' parameter
1311         to control whenever the dwarf writer is in xdebug or aot mode.
1312         (emit_class_dwarf_info): Use a separate abbrev for structures without
1313         children.
1314
1315         * aot-compiler.c: Pass the appending parameter to 
1316         mono_dwarf_writer_create ().
1317
1318         * branch-opts.c (mono_merge_basic_blocks): Fix the case when bbn
1319         falls through to its next bblock. Fixes #513931.
1320
1321         * iltests.il: Add a test.
1322
1323         * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Emit some line number
1324         infor even if emit_line is FALSE, as the apple linker seems to require it.
1325
1326         * image-writer.c (asm_writer_emit_symbol_diff): Call get_label ().
1327
1328         * dwarfwriter.c (emit_cie): Emit a separate symbol for the cie start, as
1329         gcc does.
1330         (emit_fde): Ditto.
1331
1332 2009-06-15  Zoltan Varga  <vargaz@gmail.com>
1333
1334         * exceptions-mips.c (mono_arch_get_throw_exception_by_name): Fix the
1335         mips build.
1336
1337 2009-06-13  Zoltan Varga  <vargaz@gmail.com>
1338
1339         * mini.h (struct MonoBasicBlock): Add 'has_jump_table' and 
1340         'has_call_handler' fields.
1341
1342         * method-to-ir.c (mono_method_to_ir): Set them if needed.
1343
1344         * branch-opts.c (mono_merge_basic_blocks): Avoid iterating through the
1345         first bblock if not needed. Fixes #512790.
1346         
1347 2009-06-11  Zoltan Varga  <vargaz@gmail.com>
1348
1349         * aot-compiler.c (mono_compile_assembly): Fix a warning.
1350         
1351         * aot-compiler.c (add_wrappers): Don't emit remoting-invoke-with-check
1352         wrappers.
1353
1354         * aot-runtime.c (mono_aot_get_method): Use the original method's code for
1355         remoting-invoke-with-check wrappers, which are not needed when running with
1356         full-aot, since it doesn't support remoting.
1357         
1358 2009-06-10  Zoltan Varga  <vargaz@gmail.com>
1359
1360         * aot-compiler.c (emit_got_info): Don't emit offsets for the plt got entries.
1361
1362         * aot-compiler.c aot-runtime.c: Don't emit the first got offset in the
1363         method info, it is not used anymore.
1364
1365         * mini.h: Bump AOT file format version.
1366         
1367         * aot-compiler.c (arch_emit_plt_entry): Make the arm plt entries one
1368         word smaller.
1369
1370         * aot-runtime.c (mono_aot_get_plt_info_offset): Update after the
1371         change above.
1372         
1373         * tramp-arm.c (mono_arch_patch_plt_entry): Ditto.
1374
1375         * mini.h: Bump AOT file format version.
1376         
1377 2009-06-10  Zoltan Varga  <vargaz@gmail.com>
1378
1379         * image-writer.c (asm_writer_emit_symbol_diff): Disable the 
1380         TARGET_ASM_APPLE stuff for now, as it doesn't seem to work on the
1381         iphone.
1382
1383         * mini-arm.c (mono_arch_output_basic_block): Fix the implementation
1384         of CKFINITE and FBGE for VFP.
1385
1386 2009-06-09  Zoltan Varga  <vargaz@gmail.com>
1387
1388         * aot-compiler.c: Don't align code to 16 bytes on arm.
1389         
1390         * aot-compiler.c (emit_method_code): Emit the unbox trampolines right
1391         before the methods they belong to.
1392
1393         * aot-runtime.c (mono_aot_plt_resolve): Avoid creating trampolines in
1394         the full-aot case if possible, since the trampoline will be called right 
1395         away.
1396
1397         * aot-compiler.c (mono_compile_assembly): Decrease the number of full aot
1398         trampolines to 1024 after the change above.
1399
1400         * aot-compiler.c (arch_emit_specific_trampoline): Rework the arm
1401         trampoline to save 8 bytes per trampoline.
1402
1403         * tramp-arm.c (mono_arch_create_trampoline_code_full): Update after the
1404         change above.
1405
1406 2009-06-08  Zoltan Varga  <vargaz@gmail.com>
1407
1408         * aot-compiler.c: Use acfg->temp_prefix instead of .L to prefix labels.
1409
1410 2009-06-08  Martin Baulig  <martin@ximian.com>
1411
1412         * debug-mini.c
1413         (MonoDebuggerExceptionAction): Moved into debug-mini.h.
1414         (_mono_debugger_throw_exception): Don't make this static.
1415         (_mono_debugger_unhandled_exception): Likewise.
1416         (mono_debugger_handle_exception): Moved to mini-exceptions.c
1417
1418         * debug-mini.c
1419         (MonoDebuggerExceptionAction): Moved here from debug-mini.c.
1420         (_mono_debugger_throw_exception): Add function prototype.
1421         (_mono_debugger_unhandled_exception): Likewise.
1422
1423         * mini-exceptions.c
1424         (mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
1425         arg; return the first exception handler if the exception is caught
1426         and we're running inside the debugger.
1427         (mono_debugger_handle_exception): Moved here from debug-mini.c;
1428         improve exception handle inside runtime-invoke, check whether the
1429         exception is actually caught in the method being invoked and not
1430         by the runtime-invoke-wrapper.
1431
1432 2009-06-08  Zoltan Varga  <vargaz@gmail.com>
1433
1434         * image-writer.c: Improve support for the osx assembler.
1435
1436         * dwarfwriter.c: Avoid the usage of subsections if the assembler doesn't
1437         support them.
1438
1439 2009-06-08  Martin Baulig  <martin@ximian.com>
1440
1441         * debug-mini.c
1442         (MonoDebuggerExceptionAction): Moved into debug-mini.h.
1443         (_mono_debugger_throw_exception): Don't make this static.
1444         (_mono_debugger_unhandled_exception): Likewise.
1445         (mono_debugger_handle_exception): Moved to mini-exceptions.c
1446
1447         * debug-mini.c
1448         (MonoDebuggerExceptionAction): Moved here from debug-mini.c.
1449         (_mono_debugger_throw_exception): Add function prototype.
1450         (_mono_debugger_unhandled_exception): Likewise.
1451
1452         * mini-exceptions.c
1453         (mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
1454         arg; return the first exception handler if the exception is caught
1455         and we're running inside the debugger.
1456         (mono_debugger_handle_exception): Moved here from debug-mini.c;
1457         improve exception handle inside runtime-invoke, check whether the
1458         exception is actually caught in the method being invoked and not
1459         by the runtime-invoke-wrapper.
1460
1461 2009-06-07  Zoltan Varga  <vargaz@gmail.com>
1462
1463         * image-writer.c (append_subsection): Don't align subsections of the
1464         debug_line section as a workaround.
1465
1466         * dwarfwriter.c: Emit line number info in the AOT case as well.
1467
1468 2009-06-06  Steven Munroe  <munroesj@us.ibm.com>
1469
1470         This patch is contributed under the terms of the MIT/X11 license
1471
1472        * mini-ppc.c (mono_arch_emit_exceptions): Change assert to
1473        code_len <= code_size
1474
1475 2009-06-06  Zoltan Varga  <vargaz@gmail.com>
1476
1477         * mini-mips.c (mips_emit_exc_by_name): Fix the mips build.
1478
1479 2009-06-04  Zoltan Varga  <vargaz@gmail.com>
1480
1481         * aot-compiler.c aot-runtime.c: Delete references to static rgctx
1482         invoke wrappers, we now use trampolines instead.
1483
1484 2009-06-04  Mark Probst  <mark.probst@gmail.com>
1485
1486         * mini-darwin.c: The exception thread must not be registered with
1487         the GC.
1488
1489 2009-06-04  Mark Probst  <mark.probst@gmail.com>
1490
1491         * mini-gc.c: Disable the code because it makes SGen crash.
1492
1493 2009-06-03  Zoltan Varga  <vargaz@gmail.com>
1494
1495         * aot-compiler.c (mono_compile_assembly): Handle file open errors gracefully
1496         instead of asserting.
1497
1498 2009-05-31  Zoltan Varga  <vargaz@gmail.com>
1499
1500         * aot-compiler.c (mono_compile_assembly): Move the creation of the
1501         output file after the code has been compiled.
1502
1503 2009-05-30  Zoltan Varga  <vargaz@gmail.com>
1504
1505         * tramp-ppc.c (mono_arch_get_static_rgctx_trampoline): Fix 64 bit support.
1506
1507 2009-05-31  Zoltan Varga  <vargaz@gmail.com>
1508
1509         * aot-compiler.c aot-runtime.c: Get rid of the shared/non-shared got
1510         entries distinction to simplify the code.
1511
1512         * mini.h: Bump AOT file format version.
1513         
1514 2009-05-28  Zoltan Varga  <vargaz@gmail.com>
1515
1516         * objects.cs: Fix the signature of one of the tests.
1517
1518         * mini.c (mini_create_ftnptr): New helper function, moved here from
1519         object.c.
1520         (mini_get_addr_from_ftnptr): Ditto.
1521         (mini_init): Install the new helpers.
1522
1523 2009-05-28  Martin Baulig  <martin@ximian.com>
1524
1525         Correctly initialize the debugger when embedding Mono.
1526
1527         * mdb-debug-info32.s, mdb-debug-info64.s: Add a global variable
1528         `MONO_DEBUGGER__using_debugger' to the `.mdb_debug_info' section;
1529         see documentation in mini_debug_running_inside_mdb().
1530
1531         * debug-debugger.c
1532         (mini_debug_running_inside_mdb): New function to check whether
1533         we're running inside mdb.
1534
1535         * mini.c (mini_init): Call mini_debugger_init() if we're running
1536         inside the debugger.
1537
1538         * driver.c (mono_main): Moved the call to mini_debugger_init()
1539         into mini_init() to make this work when embedding Mono.
1540
1541         * debug-debugger.c (mini_debugger_init): Warn about duplicate
1542         calls to mini_debugger_init().
1543
1544         * mini.h: Rename mono_debugger_init() -> mini_debugger_init(),
1545         mono_debugger_main() -> mini_debugger_main() and put them inside a
1546         `MONO_DEBUGGER_SUPPORTED' conditional.
1547
1548 2009-05-26 Rodrigo Kumpera  <rkumpera@novell.com>
1549
1550         * mini-trampolines.c: Kill mono_find_delegate_trampoline_by_addr as
1551         this is no longer in use.
1552         * mini.h: Same.
1553
1554 2009-05-26  Zoltan Varga  <vargaz@gmail.com>
1555
1556         * mini-sparc.c (add_outarg_load): Fix the sparc build.
1557
1558         * aot-compiler.c (emit_method_code): Always write out C style symbols for
1559         methods.
1560
1561 2009-05-27  Martin Baulig  <martin@ximian.com>
1562
1563 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
1564
1565         * mini-x86.c (mono_arch_output_basic_block): Fix the precision of
1566         long_conv_to_r_un to 64 bits.
1567
1568         * cpu-x86.md: Increase the instruction size due to the changes.
1569
1570         * iltests.il.in: Add regression test.
1571
1572         Fixes #467201.
1573
1574 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
1575
1576         * objects.cs: Move the previous test from basic.cs to here.
1577
1578 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
1579
1580         * basic.cs: Add regression test for #506915.
1581
1582 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
1583
1584         * method-to-ir.c (mono_method_to_ir): When doing the ldobj+stobj
1585         optimization we must check the bb of the first byte of stobj as
1586         it's the only one set in cil_offset_to_bb.
1587
1588         Fixes #506915.  
1589
1590 2009-05-25  Zoltan Varga  <vargaz@gmail.com>
1591
1592         * image-writer.c: Fix pointer directive on ppc64.
1593
1594 2009-05-24  Zoltan Varga  <vargaz@gmail.com>
1595
1596         * image-writer.c (asm_writer_emit_section_change): Avoid using
1597         .bss subsections on ppc too.
1598
1599 2009-05-23  Zoltan Varga  <vargaz@gmail.com>
1600
1601         * image-writer.c: Fix the definition of TARGET_ASM_....
1602         
1603         * image-writer.c: Fix the emission of assembler directives in the last
1604         change.
1605
1606         * mini-ppc.c (mono_arch_emit_exceptions): Increase the size of the
1607         exception throwing code to accomodate ppc64.
1608
1609         * tramp-ppc.c (mono_arch_get_nullified_class_init_trampoline): Increase the
1610         size to work on ppc64 too.
1611
1612         * mini-ppc.h (MonoCompileArch): Enable static rgctx trampolines on ppc64
1613         too.
1614
1615         * image-writer.c: Clean up the #ifdef hell a bit by adding defines for
1616         the assembler dialect instead of using platform specific defines.
1617
1618 2009-05-22  Geoff Norton  <gnorton@novell.com>
1619
1620         * mini-arm.c (get_call_info): If a structure is split between the stack
1621         and argument registers, we should not advance the stack pointer by the entire
1622         native size, but just by the amount that spilled.
1623
1624 2009-05-22  Zoltan Varga  <vargaz@gmail.com>
1625
1626         * mini-arm.c (get_call_info): Handle structures with alignment requirements
1627         correctly.
1628
1629 2009-05-21  Zoltan Varga  <vargaz@gmail.com>
1630
1631         * aot-compiler.c (emit_extra_methods): Encode direct runtime invoke
1632         wrappers normally.
1633         
1634         * aot-compiler.c (add_extra_method): Fix up the collection of extra
1635         methods so wrapper don't get added twice.
1636         (add_generic_instances): Don't add methods of arrays.
1637
1638         * generics.cs: Mark one test as !FULLAOT.
1639
1640 2009-05-21 Rodrigo Kumpera  <rkumpera@novell.com>
1641
1642         * mini-x86.c (emit_move_return_value): Remove unused vars.
1643
1644 2009-05-21 Rodrigo Kumpera  <rkumpera@novell.com>
1645
1646         * mini-x86.c (mono_arch_emit_call): The decompose code now supports
1647         decomposing 8 bytes structs into a LCALL.
1648
1649         * mini-x86.c (emit_move_return_value): We no longer push the vtype
1650         pointer for where to store the returned regs.
1651
1652         * decompose.c (mono_decompose_vtype_opts): Fix the comment to properly
1653         state the concern.
1654
1655         Fixes #471747, #471751 and #4734530 (in fact, it's a bunch of dups).
1656
1657 2009-05-20  Miguel de Icaza  <miguel@novell.com>
1658
1659         * aot-runtime.c (mono_aot_init): Use g_getenv to work on systems
1660         without getenv.
1661
1662 2009-05-21  Zoltan Varga  <vargaz@gmail.com>
1663
1664         * aot-compiler.c (add_wrappers): Add StructureToPtr/PtrToStructure wrappers.
1665
1666         * basic.cs: Move the test_2_cprop_bug () test to generics.cs as it involves
1667         generics.
1668
1669 2009-05-20 Rodrigo Kumpera  <rkumpera@novell.com>
1670
1671         * local-propagation.c (mono_local_cprop): Avoid local propagation
1672         across paired add/sub if the first instruction dest reg is it's
1673         source reg. For example:
1674
1675         int_add_imm R12 <- R12 [1] clobbers: 1
1676         int_sub_imm R42 <- R12 [1] clobbers: 1
1677
1678         The cprop pass would wrongly const prop + 1 to int_sub_imm which doesn't
1679         maintain the math identify.
1680
1681         Fixes #505375.
1682
1683 2009-05-20  Andreia Gaita  <avidigal@novell.com>
1684
1685         * Makefile.am: avoid going on the network just to get the revision,
1686         use git log instead
1687
1688 2009-05-19  Massimiliano Mantione  <massi@ximian.com>
1689
1690         Fixed estimate for short branches on amd64 (they were off mark, and
1691         enabling call prolog-epilog instrumentations caused assertions).
1692         * mini.h (struct MonoBasicBlock): added max_length field to hold the
1693         estimate for the maximum length of this basic block.
1694         * mini-amd64.c:
1695         - mono_arch_emit_prolog: compute max_length for each basic block
1696           (instead of max_offset), and inflate size estimate also for entry bb
1697           in case of code instrumentation.
1698         - mono_arch_output_basic_block: get rid of "cpos" (the current
1699           estimated "position" in the code), and always use "offset" instead,
1700           which is accurate; at the beginning of the function quickly recompute
1701           max_offset for all the remaining blocks, starting from the current
1702           cfg->code_len (which is correct, and not estimated) and using the
1703           estimated block lengths computed previously.
1704
1705 2009-05-17  Zoltan Varga  <vargaz@gmail.com>
1706
1707         * exceptions-ppc.c: Remove the caching from the trampoline creation 
1708         functions, it is already done in the caller.
1709
1710         * mini-trampolines.c (mono_llvm_vcall_trampoline): Fix the llvm build.
1711
1712         * mini-ppc.h mini-arm.h mini-x86.h mini-amd64.h: Add 
1713         MONO_ARCH_GSHARED_SUPPORTED define.
1714
1715         * mini.c (mini_init): Use the MONO_ARCH_GSHARED_SUPPORTED define.
1716
1717         * mini-arm.c mini.c: Get rid of the unused mono_arch_fixup_jinfo ()
1718         function.
1719
1720 2009-05-16  Zoltan Varga  <vargaz@gmail.com>
1721
1722         * jit-icalls.c (mono_helper_compile_generic_method): Get rid of the 
1723         call to mono_marshal_get_rgctx_invoke ().
1724
1725         * mini.c method-to-ir.c mini-trampolines.c: Get rid of the usage of
1726         mono_marshal_get_static_rgctx_invoke (), all platforms which support
1727         gshared use the static rgctx trampolines now.
1728         
1729         * mini.c (mini_init): Call mono_set_generic_sharing_supported () if the
1730         platform supports it.
1731
1732 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
1733
1734         * mini-arm.c (mono_arch_allocate_vars): Correctly save R5 when using AOT.
1735
1736         * aot-compiler.c (emit_method_code): Avoid duplicate labels for methods.
1737
1738 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
1739
1740         * mini-ppc.c (mono_arch_emit_exceptions): Nullify the processed patches.
1741
1742         * tramp-ppc.c (mono_arch_nullify_class_init_trampoline): Implement this
1743         for ppc.
1744
1745 2009-05-15  Massimiliano Mantione  <massi@ximian.com>
1746
1747         Made it possible for mono_arch_instrument_epilog to preserve
1748         argument registers, otherwise instrumenting the "epilogue" before
1749         a tail call would clobber them.
1750         * mini.h: Added "mono_arch_instrument_epilog_full" prototype, which
1751         if like mono_arch_instrument_epilog but with an additional parameter
1752         that states if argument registers must be preserved.
1753         * mini.c: implemented mono_arch_instrument_epilog as a call to
1754         mono_arch_instrument_epilog_full without asking to preserve argument
1755         registers (this makes the existing code work as usual).
1756         * mini-amd64.c:
1757         - mono_arch_instrument_epilog: add parameter to transform it into
1758         mono_arch_instrument_epilog_full, and preserve argument registers
1759         when required.
1760         - mono_arch_output_basic_block, OP_TAILCALL case: call
1761         mono_arch_instrument_epilog_full.
1762         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
1763         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c, mini-x86.c:
1764         only transformed mono_arch_instrument_epilog into
1765         mono_arch_instrument_epilog_full.
1766
1767 2009-05-15  Geoff Norton  <gnorton@novell.com>
1768
1769         * mini-darwin.c: This works on arm now.
1770
1771 2009-05-14  Geoff Norton  <gnorton@novell.com>
1772
1773         * jit.h, driver.c: Allow full-aot to be decided programatically by the
1774         embedding api.
1775
1776 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
1777
1778         * aot-compiler.c (emit_method_code): Skip a few more characters in the debug
1779         label names.
1780
1781         * mini-trampolines.c (mono_magic_trampoline): Handle static rgctx invoke
1782         wrappers during full aot mode correctly.
1783
1784         * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle shared generic
1785         methods correctly.
1786
1787         * aot-compiler.c (mono_aot_method_hash): Use our internal version of
1788         mono_metadata_type_hash ().
1789
1790 2009-05-14  Massimiliano Mantione  <massi@ximian.com>
1791
1792         * mini.h, mini-codegen.c, mini-alpha.c, mini-amd64.c, mini-arm.c,
1793         mini-hppa.h, mini-hppa.c, mini-ia64.c, mini-mips.h, mini-mips.c,
1794         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c, mini-886.c:
1795         Removed MONO_INST_BRLABEL from the instruction flags, and the
1796         remaining code that used it, because we do not support branches inside
1797         basic blocks (and branch target labels) anymore.
1798         * Makefile.am: As part of the above cleanup, remove reference to
1799         BURG files which don't exist anymore.
1800
1801 2009-05-14  Zoltan Varga  <vargaz@gmail.com>
1802
1803         * image-writer.c (asm_writer_emit_local_symbol): Make this a nop on
1804         osx.
1805
1806         * mini-mips.c mini-mips.h exceptions-mips.c: Transition the mips backend
1807         to use mono_arch_throw_corlib_exception.
1808
1809         * mini-ppc.c mini-ppc.h exceptions-ppc.c: Use 
1810         mono_arch_throw_corlib_exception for throwing corlib exceptions.
1811
1812         * aot-runtime.c (decode_patch): Allocate the data for R4/R8 from the
1813         domain mempool.
1814
1815         * mini.c (mono_patch_info_dup_mp): Copy the table of switch targets too.
1816
1817         * aot-compiler.c: Emit a local symbol prefixed with the assembly name 
1818         for the got to make debugging easier and to avoid confusing it with the
1819         system got.
1820         
1821         * aot-compiler.c (emit_method_code): Emit a C style symbol for each
1822         method so a breakpoint can be set when using gdb.
1823
1824 2009-05-13  Zoltan Varga  <vargaz@gmail.com>
1825
1826         * aot-compiler.c (mono_aot_method_hash): Implement this properly based
1827         on mono_method_get_imt_slot ().
1828
1829         * aot-runtime.c (find_extra_method_in_amodule): Get rid of the
1830         num_decodes variables.
1831
1832         * aot-compiler.c (mono_aot_method_hash): Revert part of the last
1833         change as it doesn't seem to work.
1834         
1835         * aot-compiler.c (mono_aot_method_hash): Improve the hashing of
1836         wrappers.
1837
1838 2009-05-12  Zoltan Varga  <vargaz@gmail.com>
1839
1840         * aot-compiler.c mini.c mini-amd64.h mini-arm.h: Kill 
1841         MONO_ARCH_FULL_AOT_IMT_SUPPORTED define, both platforms now support imt.
1842
1843         * mini.c (mini_init): Install mono_aot_get_imt_thunk as the IMT thunk
1844         builder when using full aot.
1845
1846         * mini-amd64.c (mono_arch_build_imt_thunk): Don't handle the full-aot case
1847         here, it is already handled.
1848         
1849         * mini-arm.c (mono_arch_emit_imt_argument): Pass the dynamic imt arg
1850         correctly for IMT.
1851
1852         * aot-compiler.c (arch_emit_imt_thunk): Implement this for ARM.
1853
1854         * mini-arm.h: Enable IMT for full aot.
1855         
1856         * aot-compiler.c (mono_compile_assembly): Don't emit imt thunk if the
1857         arch doesn't support it.
1858
1859         * mini.c (mini_init): Don't disable IMT for full aot if the
1860         architecture supports it.
1861
1862         * mini.h (MonoAotTrampoline): New enum containing the different types
1863         of 'numerous' trampolines.
1864         (MONO_AOT_FILE_VERSION): Bump this.
1865
1866         * aot-compiler.c aot-runtime.c: Unify the handling of specific and
1867         static rgctx trampolines. Add support for full-aot IMT thunks.
1868
1869         * mini-amd64.h: Enable IMT for full aot.
1870
1871         * TestDriver.cs: Add a CategoryAttribute class and an --exclude option
1872         to exclude tests belonging to a category.
1873
1874         * generics.cs: Mark some tests with a !FULLAOT category.
1875
1876         * Makefile.am (fullaotcheck): Run tests with --exclude !FULLAOT. Include
1877         generics tests.
1878
1879 2009-05-11  Zoltan Varga  <vargaz@gmail.com>
1880
1881         * aot-compiler.c (emit_and_reloc_code): Move the implementation of
1882         MONO_PATCH_INFO_GOT_OFFSET to a separate arch-specific function.
1883         (emit_plt): Fix a warning.
1884
1885 2009-05-10  Zoltan Varga  <vargaz@gmail.com>
1886
1887         * aot-compiler.c aot-runtime.c: Fix the build by moving is_shared_got_patch
1888         back into aot-compiler.c to a place where the other functions shared by
1889         the runtime and aot compiler are.
1890         
1891         * aot-compiler.c aot-runtime.c: Emit the got addr using a separate symbol,
1892         as done previously, instead of in MonoAotFileInfo, since pointers might have
1893         alignment requirements.
1894
1895         * mini.h: Bump AOT file format version.
1896
1897 2009-05-10  Miguel de Icaza  <miguel@novell.com>
1898
1899         * aot-runtime.c (mono_aot_is_shared_got_patch): Move this routine
1900         that is used at runtime from the aot-compiler.c, this makes it
1901         work on setups that remove the AOT compiler from the output
1902         image. 
1903
1904 2009-05-09  Zoltan Varga  <vargaz@gmail.com>
1905
1906         * tramp-ppc.c (mono_arch_get_static_rgctx_trampoline): Implement this for
1907         PPC.
1908
1909         * mini-ppc.h: Enable static rgctx trampolines for ppc.
1910
1911         * mini-<ARCH>.h: Kill the MONO_ARCH_ENABLE_EMIT_STATE_OPT define.
1912
1913         * decompose.c (mono_decompose_long_opts): Move the ppc/sparc specific 
1914         stuff to mono_arch_decompose_long_opts ().
1915         (mono_decompose_opcode): Remove some dead code.
1916
1917 2009-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
1918
1919         * method-to-ir.c (mono_method_to_ir): Fix boostrap of non amd64 builds
1920         cmethod can be null for quite a some reasons.
1921
1922 2009-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
1923
1924         * method-to-ir.c (mono_method_to_ir): Fix non amd64 builds.
1925
1926 2009-05-08  Zoltan Varga  <vargaz@gmail.com>
1927
1928         * aot-compiler.c (arch_emit_got_access): Fix the aot-not-supported build.
1929
1930 2009-05-08  Zoltan Varga  <vargaz@gmail.com>
1931
1932         * method-to-ir.c (mono_emit_call_args): Add a 'tail' flag argument.
1933         (mono_method_to_ir): Use MONO_ARCH_USE_OP_TAIL_CALL macro to determine
1934         whenever to make tail calls using OP_TAIL_CALL. Enable support for tail
1935         calls returning structures by addr on amd64.
1936
1937         * mini-amd64.h (MONO_ARCH_USE_OP_TAIL_CALL): New arch-specific macro.
1938
1939         * iltests.il.in: Restructure the tail call tests a bit.
1940         
1941 2009-05-07  Zoltan Varga  <vargaz@gmail.com>
1942
1943         * aot-compiler.c (add_wrappers): Add remoting-invoke-with-check wrappers
1944         for virtual methods too.
1945
1946 2009-05-06  Raja R Harinath  <harinath@hurrynot.org>
1947
1948         * method-to-ir.c (mono_method_to_ir): Revert change of 2009-05-02
1949         due to regression in verifying System.dll.
1950
1951 2009-05-06  Zoltan Varga  <vargaz@gmail.com>
1952
1953         * debug-mini.c (mono_debugger_method_has_breakpoint): Allow breakpoints
1954         in dynamic methods.
1955
1956         * dwarfwriter.c (emit_class_dwarf_info): Add support for generic
1957         instances.
1958
1959         * aot-compiler.c aot-runtime.c: Use our own hash function instead of
1960         g_str_hash () which can change.
1961
1962         * driver.c (mini_regression): Disable optimizations not supported by
1963         the cpu. Fixes #500019.
1964
1965         * aot-runtime.c (mono_aot_get_unwind_info): Fix the --enable-minimal=aot
1966         build.
1967
1968 2009-05-06  Zoltan Varga  <vargaz@gmail.com>
1969
1970         * mini-llvm.c (mono_llvm_emit_method): Update the OP_TLS_GET implementation
1971         to the latest LLVM code.
1972
1973 2009-05-05  Zoltan Varga  <vargaz@gmail.com>
1974
1975         * genmdesc.pl (load_opcodes): Fix this after the TARGET_... changes.
1976
1977 2009-05-04  Zoltan Varga  <vargaz@gmail.com>
1978
1979         * mini-llvm.c (mono_llvm_emit_method): Implement TLS support on 
1980         x86/amd64.
1981
1982         * aot-compiler.c (encode_patch_list): Simplify this considerably as we are
1983         no longer saving offsets, so just save the patch types along with the other
1984         info.
1985         * aot-runtime.c (load_patch_info): Update after the changes to 
1986         encode_patch_list ().
1987         (decode_got_entry): Removed, merged into load_patch_info ().
1988         (is_shared_got_patch): Removed, call the same function from
1989         aot-compiler.c.
1990
1991         * mini.h: Bump aot file format version.
1992         
1993         * aot-compiler.c aot-runtime.c: Resurrect static linking support. Kill the
1994         half-finished no-dlsym code.
1995
1996         * aot-runtime.c (load_method): Kill the old and bit-rotten use_loaded_code
1997         option.
1998
1999         * mini-<ARCH>.h mini-trampolines.c aot-runtime.c: Kill the 
2000         MONO_ARCH_HAVE_CREATE_TRAMPOLINE_FROM_TOKEN define.
2001
2002 2009-05-02  Zoltan Varga  <vargaz@gmail.com>
2003
2004         * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Increase the
2005         buffer length to work with AOT code.
2006
2007         * method-to-ir.c (mono_method_to_ir): Handle loading errors in the
2008         ldfld/stfld opcodes.
2009
2010         * exceptions-x86.c (mono_arch_get_throw_exception_by_name): Simplify this
2011         as it is not used.
2012
2013         * mini-llvm.c mini-x86.c: Implement 32 bit and x86 support.
2014
2015         * ssa.c (mono_ssa_compute): Don't skip I8 values when using LLVM.
2016
2017         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Update to the latest
2018         LLVM API.
2019
2020         * mini.c (mini_method_compile): Set the from_llvm flag in MonoJitInfo
2021         if needed. Don't decompose long operations when using llvm.
2022
2023 2009-05-01  Zoltan Varga  <vargaz@gmail.com>
2024
2025         * aot-compiler.c aot-runtime.c: Use mono_pagesize () instead of the
2026         PAGESIZE constant.
2027
2028         * aot-runtime.c (load_aot_module): Get rid of another mprotect call.
2029
2030 2009-05-03  Martin Baulig  <martin@ximian.com>
2031
2032         * debug-debugger.c (debugger_insert_source_breakpoint): Don't call
2033         mono_debugger_insert_method_breakpoint() since the class init
2034         handler we're inserting at the top of the method already gives us
2035         a notification.
2036
2037 2009-04-30  Zoltan Varga  <vargaz@gmail.com>
2038
2039         * decompose.c (mono_decompose_long_opts): Move the implementation of LNEG
2040         to mono_arch_decompose_long_opts () for x86 and arm.
2041
2042 2009-04-29  Zoltan Varga  <vargaz@gmail.com>
2043
2044         * mini-codegen.c (mono_regstate_alloc_int): Use __x86_64__ instead of
2045         TARGET_AMD64 here.
2046
2047 2009-04-28  Zoltan Varga  <vargaz@gmail.com>
2048
2049         * *.h *.c: Use TARGET_<ARCH> defines instead of __<arch>__ defines in the
2050         JIT code.
2051
2052 2009-04-26  Zoltan Varga  <vargaz@gmail.com>
2053
2054         * aot-runtime.c (mono_aot_create_specific_trampoline): Add a stat for the
2055         number of trampolines used in full-aot mode.
2056
2057         * aot-compiler.c: Add an ntrampolines option to set the number of 
2058         trampolines emitted in full-aot mode.
2059
2060 2009-04-27  Zoltan Varga  <vargaz@gmail.com>
2061
2062         * mini-llvm.c (mono_llvm_emit_method): Implement OP_CHECK_THIS using
2063         a volatile load. Get rid of get_tempname (), llvm assigns names
2064         automatically.
2065
2066         * mini-llvm-cpp.cpp (mono_llvm_build_volatile_load): New instruction
2067         builder function.
2068
2069         * mini-llvm.c (mono_llvm_emit_method): Don't call LLVMGetParam on
2070         a value.
2071
2072         * abcremoval.c (REPORT_ABC_REMOVAL): Don't output messages at verbose
2073         level 1.
2074
2075         * mini-codegen.c (mono_local_regalloc): Prevent sreg1/dreg to be allocated
2076         to the same register as a fixed sreg2. Fixes #497271.
2077
2078         * iltests.il.in: Add a new test.
2079
2080 2009-04-26  Zoltan Varga  <vargaz@gmail.com>
2081
2082         * mini-amd64.c: Use moves instead of pushes for passing arguments on the
2083         stack, since pushes complicate exception handling.
2084
2085         * exceptions-amd64.c (mono_arch_find_jit_info): Don't pop the arguments of
2086         the stack if they are passed using moves.
2087
2088         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add an assert.
2089
2090         * method-to-ir.c (mono_method_to_ir): Disable fast virtual generic methods
2091         when using llvm.
2092
2093         * mini-llvm.c (mono_llvm_emit_method): Call jit icall wrappers, not the 
2094         icalls themselves. Convert arguments of FCOMPARE. Convert the destination
2095         of FMOVE if it is an R4.
2096
2097 2009-04-25  Zoltan Varga  <vargaz@gmail.com>
2098
2099         * mini-ops.h: Add OP_LLVM_OUTARG_VT opcode.
2100
2101         * mini.h (LLVMCallInfo): New structure to store calling convention 
2102         information for the LLVM back end similar to the CallInfo structures in 
2103         the back-ends.
2104
2105         * mini-amd64.c (mono_arch_get_llvm_call_info): New arch function to return
2106         call information in a format usable by LLVM.
2107         (mono_arch_emit_call): Move the LLVM handling code to mono_llvm_emit_call ().
2108
2109         * method-to-ir.c (mono_emit_call_args): Emit calls using 
2110         mono_llvm_emit_call () when compiling using LLVM.
2111
2112         * mini-llvm.c: Implement support for passing/receiving valuetypes. Add
2113         comments to all functions. Fix memory leaks. Add a public init/cleanup
2114         function.
2115
2116         * mini.c: Call the llvm init/cleanup functions in mini_init()/cleanup().
2117
2118         * method-to-ir.c (handle_array_new): Disable llvm when calling the vararg
2119         mono_array_new_va () jit icall.
2120         
2121 Fri Apr 24 16:44:08 CEST 2009 Paolo Molaro <lupus@ximian.com>
2122
2123         * Makefile.am, genmdesc.c, genmdesc.pl: tiny refactor to allow
2124         multiple machine description files to be specified.
2125         * mini-ops.h: fixes for cross-compilation.
2126
2127 2009-04-22  Miguel de Icaza  <miguel@novell.com>
2128
2129         * aot-runtime.c (make_writable): Use mono_mprotect to simplify
2130         some porting work.
2131
2132 2009-04-22  Zoltan Varga  <vargaz@gmail.com>
2133
2134         * method-to-ir.c (mono_method_to_ir): Force init_locals to be TRUE
2135         to prevent asserts in various passes. Fixes #497220.
2136
2137 2009-04-21  Zoltan Varga  <vargaz@gmail.com>
2138
2139         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove
2140         a racy assert.
2141
2142         * aot-compiler.c aot-runtime.c: Emit the unwind info into a separate
2143         table to avoid duplicates.
2144
2145         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
2146         
2147         * aot-compiler.c (emit_method_code): Avoid writing symbols if the nodebug
2148         option is used.
2149
2150 2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>
2151
2152         * mini.c (mini_method_verify): Fail fulltrust code if the exception
2153         is for method or field access.
2154
2155 2009-04-20  Zoltan Varga  <vargaz@gmail.com>
2156
2157         * mini-llvm-cpp.cpp (mono_llvm_dump_value): New helper function to print
2158         a Value to stdout.
2159
2160         * mini-llvm.c (mono_llvm_emit_method): Use it.
2161         
2162         * mini-llvm.c (type_to_llvm_type): Fix the mapping of enums.
2163         (mono_llvm_emit_method): Add support for CAS. Fix handling of CSET opcodes
2164         on volatile values.
2165
2166         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add support for 
2167         synchronized methods.
2168
2169         * mini.c (mini_method_compile): Disable LLVM for dynamic methods.
2170
2171         * mini.c (mini_method_compile): Enable ABCREM when running with LLVM.
2172
2173         * mini-llvm.c (mono_llvm_emit_method): Add support for OP_LOADI4_MEM/
2174         OP_LOADI8_MEM.
2175
2176         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Add a MONO_LLVM env variable
2177         allowing some options to be set dynamically.
2178
2179 2009-04-19  Zoltan Varga  <vargaz@gmail.com>
2180
2181         * mini-llvm.c (mono_llvm_emit_method): Handle compares followed by an
2182         unconditional branch.
2183
2184         * mini.h (MonoTrampolineType): Add new trampoline type 
2185         'MONO_TRAMPOLINE_LLVM_VCALL' which handles virtual calls made from LLVM
2186         compiled code.
2187
2188         * mini-trampolines.c (mono_llvm_vcall_trampoline): New C trampoline 
2189         function.
2190
2191         * mini-trampolines.c (mono_create_llvm_vcall_trampoline): New trampoline
2192         creation function.
2193
2194         * mini.c (mini_init): Avoid using the common vtable trampoline when LLVM
2195         is enabled. Instead, use the llvm vcall trampoline.
2196         
2197         * mini-trampolines.c (mono_get_vcall_slot_addr): New helper function.
2198
2199         * mini-trampolines.c tramp-amd64.c tramp-x86.c: Use it.
2200         
2201         * mini-<ARCH>.c: Get rid of the identical mono_arch_get_vcall_slot_addr ()
2202         functions.
2203
2204         * mini-<ARCH>.h mini-trampolines.c mini.c: Get rid of 
2205         MONO_ARCH_COMMON_VTABLE_TRAMPOLINE, it is supported by all archs.
2206
2207         * mini-ia64.c (mono_arch_lowering_pass): Null out the sregs of the
2208         OP_IA64_CSET opcode.
2209
2210         * mini.c: Fix a warning.
2211
2212         * mini-llvm.c (mono_llvm_emit_method): Convert arguments of SWITCH and
2213         THROW to the appropriate llvm type.
2214
2215 2009-04-18  Zoltan Varga  <vargaz@gmail.com>
2216
2217         * mini.c (mini_method_compile): Add statistics for methods JITted
2218         with/without LLVM.
2219
2220 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
2221
2222         * method-to-ir.c: Fix the computation of ins_sreg_counts for ia64
2223         OP_IA64_CMP_<cond>_IMM opcodes.
2224
2225 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
2226
2227         * mini-llvm.c (emit_cond_system_exception): Implement throwing of
2228         corlib exceptions.
2229
2230         * dwarfwriter.c (mono_dwarf_writer_emit_method): Handle --regression
2231         correctly.
2232
2233         * mini-llvm.c (type_to_llvm_type): Avoid accessing t->data.klass for
2234         GENERICINST.
2235
2236 2009-04-17  Atsushi Enomoto  <atsushi@ximian.com>
2237
2238         * mini-exceptions.c : add thread id to EXCEPTION trace message.
2239
2240 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
2241
2242         * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Fix AOT
2243         support.
2244
2245         * tramp-x86.c (mono_arch_get_unbox_trampoline): Implement static
2246         rgctx invoke trampolines for x86.
2247
2248         * mini-x86.c (mono_arch_output_basic_block): Add a few nops before
2249         indirect calls to simplify get_vcall_slot_addr (). Fixes #494567.
2250         (mono_arch_get_vcall_slot): Simplify this.
2251
2252 2009-04-16  Zoltan Varga  <vargaz@gmail.com>
2253
2254         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Move the calls to
2255         mono_debug_add_delegate_trampoline () to get_delegate_invoke_impl ().
2256
2257 2009-04-14  Zoltan Varga  <vargaz@gmail.com>
2258
2259         * aot-compiler.c tramp-arm.c mini-arm.c: Implement static rgctx 
2260         trampolines for ARM. Add full-aot support for delegate invokes for ARM.
2261
2262         * mini-trampolines.c (mono_magic_trampoline): Fix the build.
2263
2264         * liveness.c (visit_bb): Remove a needless assert.
2265
2266 2009-04-13  Zoltan Varga  <vargaz@gmail.com>
2267
2268         * mini-trampolines.c (mono_create_delegate_trampoline): Delegate the
2269         full aot support to the arch specific code.
2270
2271         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Add full-aot support.
2272
2273         * aot-compiler.c (emit_trampolines): Emit delegate invoke impl trampolines.
2274
2275         * aot-compiler.c (emit_named_code): Rename this to 'emit_trampoline'.
2276         
2277         * mini-amd64.c (mono_arch_get_delegate_invoke_impls): New function to
2278         collect information about the delegate invoke impl trampolines.
2279
2280         * mini.h (MonoAotTrampInfo): New structure collecting the information needed
2281         to save trampolines during full-aot mode.
2282
2283         * mini-trampolines.c (mono_create_static_rgctx_trampoline): New trampoline
2284         creation function which returns a trampoline which sets the rgctx
2285         argument.
2286         (mono_magic_trampoline): Use the rgctx trampoline instead of an rgctx
2287         wrapper if possible.
2288         (mono_delegate_trampoline): Ditto.
2289
2290         * mini.c (mono_jit_runtime_invoke): Ditto.
2291
2292         * tramp-amd64.c: Add an implemention of static rgctx trampolines for AMD64.
2293         
2294         * aot-compiler.c aot-runtime.c: Add support for static rgctx trampolines.
2295
2296         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
2297         
2298 2009-04-12  Zoltan Varga  <vargaz@gmail.com>
2299
2300         * mini-ia64.c (mono_arch_lowering_pass): Use NULLIFY_INS instead of
2301         just setting the opcode to OP_NOP.
2302
2303 2009-04-11  Zoltan Varga  <vargaz@gmail.com>
2304
2305         * mini.c (mini_method_compile): Put the last change inside an 
2306         #ifdef MONO_ARCH_HAVE_LIVERANGE_OPS.
2307         
2308         * mini.c (mini_method_compile): Disable sharing of stack slots/registers
2309         and extend live ranges to cover the whole method when using xdb.
2310
2311         * jit-icalls.c (ldvirtfn_internal): Avoid creating rgctx wrappers here,
2312         do it in the trampolines.
2313
2314         * mini-trampolines.c (mono_magic_trampoline): Add an rgctx wrapper if
2315         needed.
2316
2317         * mini-trampolines.c (mono_delegate_trampoline): Ditto.
2318         
2319         * method-to-ir.c (mono_method_to_ir): Avoid using the fast virtual method
2320         call code in full-aot mode since IMT is disabled there.
2321         (mono_method_to_ir): Inline ldfld wrappers which return structures too, the
2322         new JIT no longer has that restriction.
2323
2324         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
2325
2326         * aot-compiler.c (emit_extra_methods): Emit the wrapper method names in
2327         a more compact format.
2328         (mono_aot_wrapper_name): New function to return a unique name for a
2329         wrapper method, also used by the AOT runtime.
2330
2331         * aot-runtime.c (find_extra_method_in_amodule): Update after the changes to
2332         aot-compiler.c.
2333
2334         * aot-compiler.c (add_generic_class): Add the helper methods from T[]
2335         when a ICollection<T> etc is encountered.
2336         (add_generic_instances): Process method arguments/locals too.
2337         (emit_trampolines): Emit unbox trampolines for extra methods too. Shorten
2338         trampoline names.
2339
2340         * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle extra methods too.
2341         
2342 2009-04-10  Zoltan Varga  <vargaz@gmail.com>
2343
2344         * aot-compiler.c: Disable the AOT compiler if the JIT is disabled.
2345
2346         * dwarfwriter.c (emit_type): Emit byref to reference types as 'int' for now.
2347
2348         * decompose.c (mono_decompose_opcode): Make this return a MonoInst*
2349         representing the result of the decomposition. Nullify instructions
2350         instead of setting them to OP_NOP since nops can't have registers
2351         set.
2352
2353 2009-04-09  Zoltan Varga  <vargaz@gmail.com>
2354
2355         * aot-compiler.c (mono_compile_assembly): Split this huge function into
2356         smaller parts. Add 'nodebug' option to prevent generation of DWARF debug
2357         info. Strip 'mapping symbols' on ARM.
2358
2359         * iltests.il.in (test_0_fconv_to_i): Disable this on ARM too.
2360         
2361         * genmdesc.pl: Applied patch by Martin Fuzzey (mfuzzey@parkeon.com). Sync
2362         this with the native genmdesc.
2363
2364 2009-04-08  Bill Holmes  <billholmes54@gmail.com>
2365
2366         * aot-runtime.c:  Fixing the MSVC build.
2367
2368         Code is contributed under MIT/X11 license.
2369
2370 2009-04-08  Zoltan Varga  <vargaz@gmail.com>
2371
2372         * mini-llvm.c (mono_llvm_emit_method): Pass i1/i2 arguments as i4 since 
2373         JITted code depends on it.
2374
2375 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
2376
2377         * aot-compiler.c: Use new MonoGenericParam accessors.
2378
2379 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
2380
2381         Reduce memory usage and improve correctness wrt MonoGenericParam
2382         * aot-runtime.c (decode_klass_ref): Simplify generic parameter
2383         handing.  Avoid allocating MonoGenericParams, but use the ones in
2384         the container itself.
2385
2386 2009-04-07  Miguel de Icaza  <miguel@novell.com>
2387
2388         * tasklets.c: Return exceptions in the out argument.
2389
2390 2009-04-08  Zoltan Varga  <vargaz@gmail.com>
2391
2392         * mini-llvm.c (mono_llvm_emit_method): Fix alignment in the LOCALLOC_IMM
2393         opcode. Use pointer types in more places instead of casting them to 
2394         integers.
2395
2396         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Create a pass manager to run
2397         optimizations.
2398         (mono_llvm_optimize_method): New helper function to optimize a method.
2399
2400         * method-to-ir.c (mono_emit_widen_call_res): Extract the call result 
2401         widening code so it could be called from more places.
2402         (mono_method_to_ir): Call mono_emit_widne_call_res () in several more
2403         code paths in the call opcodes.
2404
2405 Mon Apr 6 14:19:54 CEST 2009 Paolo Molaro <lupus@ximian.com>
2406
2407         * exceptions-amd64.c, mini-amd64.h: amd64 support code for continuations.
2408
2409 2009-04-06  Zoltan Varga  <vargaz@gmail.com>
2410
2411         * dwarfwriter.c: Use _ to separate class name 
2412         components as gdb can't handle '.'. Represent reference variables
2413         as 'class <NAME>&'.
2414         
2415         * mini.h (MonoCompile): Add locals_min_stack_offset/locals_max_stack_offset.
2416
2417         * mini-amd64.c (mono_arch_allocate_vars): Save min/max stack offset.
2418         
2419         * mini-gc.c: New file, contains the SGEN GC related parts of the JIT.
2420
2421         * gc-test.cs: New file with GC stack marking tests.
2422         
2423         * mini-arm.c (mono_arch_output_basic_block): Fix int->float conversion of
2424         negative numbers for vfp.
2425
2426         * basic-float.cs: Add a test.
2427         
2428 Mon Apr 6 14:12:10 CEST 2009 Paolo Molaro <lupus@ximian.com>
2429
2430         * exceptions-x86.c, mini-x86.h: x86 support code for continuations.
2431
2432 Mon Apr 6 14:09:53 CEST 2009 Paolo Molaro <lupus@ximian.com>
2433
2434         * tasklets.h, tasklets.c, mini.h, mini.c, Makefile.am: arch-indep
2435         part of tasklet/continuation support.
2436
2437 2009-04-05  Zoltan Varga  <vargaz@gmail.com>
2438
2439         * mini-llvm.c (mono_llvm_emit_method): Move the handling of
2440         amd64 opcodes inside an ifdef.
2441
2442         * dwarfwriter.c: Emit inheritance information for classes, emit fields
2443         of complex types.
2444         
2445         * dwarfwriter.c (emit_type): Emit the class info for classes.
2446
2447 2009-04-04  Zoltan Varga  <vargaz@gmail.com>
2448
2449         * Makefile.am (AM_CXXFLAGS): Add GLIB_CFLAGS to this.
2450
2451         * mini-llvm-cpp.h: New header file for mini-llvm-cpp.cpp.
2452
2453         * mini-llvm.c: Remove unused fields from EmitContext, fix memory leaks.
2454
2455         * ssa.c (mono_ssa_compute): Fix some memory leaks.
2456
2457 2009-04-03  Zoltan Varga  <vargaz@gmail.com>
2458
2459         * mini.c mini-amd64.c method-to-ir.c: Use COMPILE_LLVM in a few more places.
2460
2461         * mini-llvm.c: Update comments.
2462
2463         * mini.h (COMPILE_LLVM): New macro.
2464
2465         * decompose.c (mono_decompose_opcode): Use the COMPILE_LLVM macro.
2466
2467         * ssa.c (mono_ssa_compute): Ditto.
2468         
2469         * unwind.c (mono_unwind_get_ops_from_fde): New helper function to extract
2470         the unwind ops from a DWARF FDE.
2471
2472         * mini-llvm.c: Implement generation of unwind info for LLVM compiled
2473         methods by extracting the dwarf unwind ops from the unwind info generated
2474         by LLVM.
2475         
2476         * mini-llvm.c (mono_llvm_emit_method): Enable support for non-IMT virtual
2477         calls.
2478
2479         * mini-amd64.c (mono_arch_get_vcall_slot): Handle more kinds of the SIB
2480         addressing modes.
2481
2482 2009-04-02  Zoltan Varga  <vargaz@gmail.com>
2483
2484         * Makefile.am (llvm_sources): Enable this.
2485
2486         * mini.c (mini_method_compile): Add support for compiling with LLVM, 
2487         failing back to the JIT if something cannot be handled.
2488
2489         * mini-amd64.c (mono_arch_emit_call): Emit the arguments more simple when
2490         compiling with LLVM.
2491
2492         * decompose.c (mono_decompose_opcode): Avoid decomposing some opcodes when
2493         compiling with LLVM.
2494
2495         * method-to-ir.c (mono_method_to_ir): Avoid decomposing SWITCH when 
2496         compiling with LLVM.
2497
2498         * mini-ops.h: Add a few opcodes needed by LLVM.
2499
2500         * dwarfwriter.c (mono_dwarf_writer_emit_method): Avoid crashes if the method
2501         has no unwind info.
2502
2503         * mini-llvm.c mini-llvm-cpp.cpp: New files containing the experimental llvm
2504         backend.
2505
2506         * mini-arm.c (mono_arch_output_basic_block): Fix the ARM_FPU_NONE build.
2507
2508         * mini-arm.h mini-arm.c cpu-arm.md: Finish VFP support.
2509
2510 2009-04-01  Mark Probst  <mark.probst@gmail.com>
2511
2512         * regalloc.h, mini-codegen.c: Make vassign members gint32 to fix
2513         ridiculously large methods.
2514
2515 2009-03-31  Martin Baulig  <martin@ximian.com>
2516
2517         * debug-debugger.c (debugger_remove_breakpoint): Call
2518         mono_debugger_remove_class_init_callback ().
2519
2520 2009-03-31  Zoltan Varga  <vargaz@gmail.com>
2521
2522         * aot-compiler.c (mono_compile_assembly): Call img_writer_emit_start ()
2523         right before emitting code, not at the start.
2524
2525         * mini.c (mono_postprocess_patches): Extract this into a separate function
2526         from mono_codegen ().
2527
2528         * ssa.c (mono_ssa_compute): Set ins->klass for every PHI node, handle
2529         byref types correctly.
2530
2531 2009-03-30  Zoltan Varga  <vargaz@gmail.com>
2532
2533         * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix a crash introduced
2534         by the last change.
2535
2536 2009-03-29  Zoltan Varga  <vargaz@gmail.com>
2537
2538         * mini-amd64.c (mono_arch_output_basic_block): Emit a few nops before 
2539         indirect calls, this avoids problems where get_vcall_slot () would get
2540         confused by the native code for the instruction preceeding the call.
2541         (mono_arch_get_vcall_slot): Simplify this.
2542         (mono_arch_emit_imt_argument): Remove this, it is no longer needed.
2543
2544         * mini-ops.h: Fix the definitions of the OP_IA64 opcodes, since the local
2545         register allocator now seems to depend on them instead of the data in
2546         cpu-<ARCH>.md.
2547
2548         * mini.c (mini_method_compile): Throw the correct type of exception if
2549         mono_method_get_header () fails because of a loading error.
2550
2551 2009-03-28  Zoltan Varga  <vargaz@gmail.com>
2552
2553         * mini.c (mini_method_compile): Clear the loader error if the method
2554         header cannot be decoded.
2555
2556         * mini-trampolines.c (mono_magic_trampoline): Handle generic virtual 
2557         interface methods on proxies correctly.
2558
2559         * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix handling of the
2560         this argument for vtype methods. Add precise liveness info for arguments.
2561
2562         * mini-codegen.c (mono_print_ins_index): Print the vreg of the
2563         LIVERANGE_START/END opcodes.
2564
2565         * method-to-ir.c (mono_spill_global_vars): Fix liverange calculation
2566         for arguments and values in registers.
2567
2568 2009-03-27  Zoltan Varga  <vargaz@gmail.com>
2569
2570         * method-to-ir.c (mono_method_to_ir): Disable tail calls for calls which
2571         return a valuetype. Fixes #487518.
2572
2573         * iltests.il: Add a test.
2574         
2575         * aot-compiler.c: Use mono_thread_create () to create helper threads.
2576
2577         * mini-trampolines.c (mono_delegate_trampoline): Handle static delegates
2578         closed over a null reference correctly.
2579
2580 2009-03-26  Zoltan Varga  <vargaz@gmail.com>
2581
2582         * method-to-ir.c (mono_handle_global_vregs): Fix support for ternary ops.
2583
2584 2009-03-25  Mark Probst  <mark.probst@gmail.com>
2585
2586         * mini-codegen.c (mono_local_regalloc): Don't let sregs get
2587         allocated to the same registers as fixed sregs.
2588
2589 2009-03-24  Mark Probst  <mark.probst@gmail.com>
2590
2591         * mini-ops.h: New ternary ATOMIC_CAS ops replace the old
2592         ATOMIC_CAS_IMM ops.
2593
2594         * method-to-ir.c: Handle more cases for
2595         Interlocked.CompareExchange.
2596
2597         * cpu-x86.md, mini-x86.c, mini-x86.h, cpu-amd64.md, mini-amd64.c,
2598         mini-amd64.h, cpu-ppc.md, cpu-ppc64.md, mini-ppc.c, mini-ppc.h:
2599         ATOMIC_CAS implementations for x86, AMD64, PPC and PPC64.
2600
2601 2009-03-23  Zoltan Varga  <vargaz@gmail.com>
2602
2603         * aot-runtime.c (decode_method_ref): Fix a warning.
2604
2605         * unwind.c (mono_unwind_frame): Ditto.  
2606
2607 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
2608
2609         * aot-compiler.c (arch_emit_unbox_trampoline): Fix the binary writer support.
2610         (mono_compile_assembly): Enable the binary writer for full-aot as well.
2611
2612         * image-writer.c (do_reloc): Add support for the JUMP24 relocation,
2613         fix the handling of large values in the ALU_PC_G0_NC relocation.
2614
2615 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
2616
2617         * local-propagation.c method-to-ir.c local-propagation.c: Fix warnings.
2618
2619 2009-03-22  Mark Probst  <mark.probst@gmail.com>
2620
2621         * method-to-ir.c (mono_spill_global_vars): Support for ternary
2622         ops.
2623
2624 2009-03-22  Mark Probst  <mark.probst@gmail.com>
2625
2626         * method-to-ir.c: MINI_OP3 needs a comma.
2627
2628         * method-to-ir.c, mini.h, mini.c: Remove
2629         mono_init_op_sreg_counts ().
2630
2631 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
2632
2633         * mini-arm.c (mono_arch_output_basic_block): Fix aot support in
2634         OP_JMP.
2635         
2636         * mini-arm.c (mono_arch_build_imt_thunk): Disable the !fail_tramp
2637         assertion.
2638
2639         * mini-ops.h: Fix arguments of the MEMINDEX opcodes.
2640
2641         * mini-amd64.c (mono_arch_build_imt_thunk): Simplify the fail handling
2642         code somewhat.
2643
2644 2009-03-21  Mark Probst  <mark.probst@gmail.com>
2645
2646         * cfold.c, cprop.c, decompose.c, genmdesc.c, helpers.c, ir-emit.h,
2647         liveness.c, local-propagation.c, method-to-ir.c, mini-codegen.c,
2648         mini.c, mini.h, simd-intrinsics.c, ssa.c: Support for ternary IR
2649         operations.
2650
2651 2009-03-20  Zoltan Varga  <vargaz@gmail.com>
2652
2653         * driver.c: Change location of gc_wrapper.h.
2654
2655         * method-to-ir.c (mono_find_block_region): Handle try clauses nested
2656         inside finally clauses correctly. Fixes #485721.
2657
2658         * mini.c (mono_find_spvar_for_region): This needs to handle try regions
2659         after the change above.
2660
2661         * exceptions.cs: Add a test.
2662         
2663 2009-03-19  Zoltan Varga  <vargaz@gmail.com>
2664
2665         * unwind.c (mono_unwind_ops_encode): Increase the size of the encode buffer.
2666
2667         * mini-amd64.c (mono_arch_emit_epilog): Remove the encoding of stack size
2668         into cfg->used_int_regs, it is not needed with the dwarf unwinder.
2669         (mono_arch_compute_omit_fp): Remove the emit_epilog () workaround.
2670
2671         * mini-amd64.c (mono_arch_compute_omit_fp): Add another check to avoid hitting
2672         the stack_alloc_size < (1 << 16) assertion in emit_prolog ().
2673
2674 2009-03-19  Sebastien Pouliot  <sebastien@ximian.com>
2675
2676         * method-to-ir.c: Allow CoreCLR to throw FieldAccessException. 
2677         Simplify logic for ensure_method_is_allowed_to_call_method. 
2678         Handle wrappers on callers.
2679
2680 2009-03-19  Zoltan Varga  <vargaz@gmail.com>
2681
2682         * Makefile.am (fullaotcheck): Don't run the generics tests, some of
2683         them don't run yet.
2684
2685         * basic-simd.cs: Fix the names of some test methods.
2686
2687 2009-03-18  Geoff Norton  <gnorton@novell.com>
2688
2689         * mini.c: Only chain sigfpe if it wasn't generated in mangaed code.
2690
2691 2009-03-18  Zoltan Varga  <vargaz@gmail.com>
2692
2693         * dwarfwriter.c (token_handler): Fix a crash caused by the last change.
2694
2695 2009-03-17  Jb Evain  <jbevain@novell.com>
2696
2697         * driver.c: remove now uneeded call to mono_gc_base_init before
2698         mono_profiler_load.
2699
2700 2009-03-17  Jb Evain  <jbevain@novell.com>
2701
2702         * dwarfwriter.c (token_handler): handle more cases.
2703
2704 2009-03-17  Sebastien Pouliot  <sebastien@ximian.com> 
2705
2706         * method-to-ir.c: Remove more dead code (that was required only
2707         because of method_is_safe). Fix compiler warnings.
2708
2709 2009-03-17  Sebastien Pouliot  <sebastien@ximian.com>
2710
2711         * method-to-ir.c: Remove unneeded/useless method_is_safe
2712         http://lists.ximian.com/archives/public/mono-devel-list/2009-March/031404.html
2713
2714 2009-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
2715
2716         * mini.c (mini_method_compile): Print the method been compiled with
2717         verbose level 1 instead of 3 as this helps a lot debugging JIT crashes
2718         for people not familiar with the runtime.
2719
2720 2009-03-17  Zoltan Varga  <vargaz@gmail.com>
2721
2722         * mini-exceptions.c (get_generic_info_from_stack_frame): Avoid returning
2723         a managed object which is later put into a GList. Return its class instead.
2724
2725         * mini.c (mono_allocate_stack_slots_full): Avoid sharing ref and non-ref
2726         stack slots when using sgen.
2727
2728 2009-03-16  Zoltan Varga  <vargaz@gmail.com>
2729
2730         * dwarfwriter.c (emit_line_number_info): Really fix the eglib build.
2731
2732 2009-03-14  Zoltan Varga  <vargaz@gmail.com>
2733
2734         * local-propagation.c (reg_is_softreg_no_fpstack): Use >= instead of
2735         > so it works on the first vreg as well.
2736
2737 2009-03-13  Zoltan Varga  <vargaz@gmail.com>
2738
2739         * dwarfwriter.c (emit_line_number_info): Disable an assert which seems to
2740         trigger randomly.
2741
2742         * aot-compiler.c: Get rid of xdebug_lock (), use the loader lock instead.
2743         
2744         * dwarfwriter.c (emit_line_number_info): Fix eglib build as eglib doesn't
2745         implement GArray.
2746
2747 2009-03-12  Zoltan Varga  <vargaz@gmail.com>
2748
2749         * dwarfwriter.c (emit_line_number_info): Optimize the computation of the
2750         native->IL offset mapping.
2751
2752 2009-03-11  Zoltan Varga  <vargaz@gmail.com>
2753
2754         * mini-amd64.c (mono_arch_output_basic_block): Fix % 1. Fixes #484323.
2755
2756         * basic.cs: Add a test.
2757
2758 2009-03-11  Mark Probst  <mark.probst@gmail.com>
2759
2760         * mini-x86.c (mono_arch_output_basic_block): Use different
2761         registers in case the ones we want to overwrite are used by the
2762         other operand.  Fixes regression in #480807.
2763
2764 2009-03-10  Zoltan Varga  <vargaz@gmail.com>
2765
2766         * aot-compiler.c (mono_compile_assembly): Make the output less verbose.
2767
2768         * dwarfwriter.c (emit_line_number_info): The line number info for
2769         IL code was off by one. Fix that.
2770
2771         * mini-s390x.c: Fix support for vtypes whose addresses are passed on the
2772         stack.
2773
2774 2009-03-09  Mark Probst  <mark.probst@gmail.com>
2775
2776         Contributed under the terms of the MIT/X11 license by Steven
2777         Munroe <munroesj@us.ibm.com>.
2778
2779         * mini-ppc.c: Correct handling of OP_LOADI4_MEMINDEX for ppc64.
2780         Fixes #483462.
2781
2782 2009-03-08  Zoltan Varga  <vargaz@gmail.com>
2783
2784         * dwarfwriter.c (token_handler): Decode method references in non-wrappers
2785         as well.
2786
2787 2009-03-06  Zoltan Varga  <vargaz@gmail.com>
2788
2789         * method-to-ir.c (mono_method_to_ir): Check for type load exceptions in
2790         the delegate ctor handling code. Fixes #482638.
2791         
2792         * method-to-ir.c (mini_emit_memset): Fix the handling of size '3'. Fixes
2793         #481458.
2794
2795         * iltests.il.in: Add a test.
2796         
2797         * mini-darwin.c (mono_chain_signal): Remove this, it is already in
2798         mini-posix.c.
2799
2800 2009-03-05  Mark Probst  <mark.probst@gmail.com>
2801
2802         * mini-trampolines.c (mono_create_jump_trampoline): If the method
2803         is shared generic code, return the trampoline, even if the method
2804         has already been compiled.  Fixes #479763.
2805
2806         * mini.c, mini.h: New function
2807         mono_jit_find_compiled_method_with_jit_info() which is the same as
2808         mono_jit_find_compiled_method() but also returns the jit info.
2809
2810 2009-03-05  Mark Probst  <mark.probst@gmail.com>
2811
2812         * method-to-ir.c (mono_method_to_ir): Only force the vtable var
2813         for methods which actually have one.  For all other methods, make
2814         sure the this argument var is live the whole method.
2815
2816         * mini.c (mini_method_compile): Every shared method has a
2817         this/vtable/mrgctx info.  Fixes #480807.
2818
2819 2009-03-05  Mark Probst  <mark.probst@gmail.com>
2820
2821         * mini-ppc.c (mono_arch_build_imt_thunk): Add support for mixed
2822         generic/imt thunks where some entries branch through the vtable,
2823         while other entries branch directly.
2824
2825 2009-03-05  Zoltan Varga  <vargaz@gmail.com>
2826
2827         * mini-darwin.c (mono_chain_signal): Define this to fix the build.
2828
2829         * mini-windows.c: Ditto.
2830         
2831         * mini.c (mono_jit_runtime_invoke): Speed up the invoking of parameterless
2832         ctors.
2833
2834 2009-03-04  Zoltan Varga  <vargaz@gmail.com>
2835
2836         * dwarfwriter.c (emit_line_number_info): Add some debug code to help track
2837         down an assert.
2838
2839 2009-03-04  Mark Probst  <mark.probst@gmail.com>
2840
2841         * method-to-ir.c: Don't inline methods that use JMP.  Fixes
2842         #481403.
2843
2844 2009-03-04  Mark Probst  <mark.probst@gmail.com>
2845
2846         * exceptions-x86.c: Include debug-mini.h - fixes build.
2847
2848 2009-03-04  Martin Baulig  <martin@ximian.com>
2849
2850         * debug-mini.c: Clean up the exception API and add documentation.
2851         (mono_debugger_handle_exception): New public method; this is
2852         called when throwing an exception or encountering an unhandled one.
2853         (mono_debugger_call_exception_handler): Formerly known as
2854         mono_debugger_handle_exception(); this is used to tell the
2855         debugger that we're about to invoke an exception handler.
2856
2857 2009-03-04  Martin Baulig  <martin@ximian.com>
2858
2859         * debug-mini.c (mono_debugger_runtime_invoke): Moved here from
2860         ../metadata/mono-debug-debugger.c; save and reset exception state.
2861
2862 2009-03-02  Martin Baulig  <martin@ximian.com>
2863
2864         * debug-mini.c: Moved the debugger exception handling here from
2865         ../metadata/mono-debug-debugger.c.
2866
2867         * debug-mini.h
2868         (MonoDebuggerExceptionAction): New exception typedef.
2869
2870         * debug-mini.c
2871         (MonoDebuggerThreadInfo): Added `MonoObject *last_exception'.
2872
2873         * exceptions-amd64.c
2874         (mono_amd64_throw_exception): Use the new debugger exception
2875         handling code.
2876
2877         * mini-exceptions.c
2878         (mono_handle_exception_internal): Don't call
2879         mono_debugger_unhandled_exception() here.
2880
2881 2009-03-03  Zoltan Varga  <vargaz@gmail.com>
2882
2883         * mini.c aot-compiler.c: Update after the changes to 
2884         mono_marshal_get_runtime_invoke ().
2885
2886         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): 
2887         Virtual generic methods might not have method->slot set, work around
2888         that.
2889
2890         * generics.cs: Add a test.
2891
2892 2009-03-02  Geoff Norton  <gnorton@novell.com>
2893
2894         * mini.c:
2895         * driver.c: Allow signal chaining of SIGFPE as well.
2896
2897 2009-03-02  Zoltan Varga  <vargaz@gmail.com>
2898
2899         * mini-trampolines.c (mono_generic_virtual_remoting_trampoline): Update
2900         this since it now receives the method not its generic context in the
2901         IMT reg.
2902
2903         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for mixed
2904         generic/imt thunks where some entries branch through the vtable, while
2905         other entries branch directly.
2906
2907         * mini-x86.c (mono_arch_build_imt_thunk): Ditto.
2908
2909         * method-to-ir.c (mono_method_to_ir): Enable fast virtual generic call 
2910         support for interface methods as well.
2911
2912         * mini-trampolines.c: Add support for virtual generic methods in interfaces
2913         using the normal IMT thunks.
2914
2915         generics.cs: Add new tests.
2916         
2917         * method-to-ir.c (mono_method_to_ir): Pass the method instead of
2918         the generic inst to the generic imt thunks. This fixes AOT support, 
2919         improves consistency with the normal IMT thunks, and makes it easier to
2920         add support for interface generic virtual methods later.
2921
2922         * mini-trampolines.c (mono_magic_trampoline): Ditto.    
2923         
2924 2009-02-28  Zoltan Varga  <vargaz@gmail.com>
2925
2926         * driver.c (mono_set_signal_chaining): New public API function to enable
2927         signal chaining on POSIX platforms.
2928
2929         * mini-posix.c mini.c: Applied a variant of a patch by Simon Rowland 
2930         (si@lindenlab.com) to implement signal chaining. The original patch was
2931         contributed under the MIT X/11 license:
2932         https://bugzilla.novell.com/show_bug.cgi?id=318894
2933
2934 2009-02-27  Zoltan Varga  <vargaz@gmail.com>
2935
2936         * iltests.il.in (test_0_implicit_float_to_double_conversion): Disable this
2937         too until it can be made to run on amd64.
2938
2939 2009-02-26  Zoltan Varga  <vargaz@gmail.com>
2940
2941         * mini-x86.c (mono_arch_get_this_arg_from_call): Avoid expensive calls
2942         to  get_generic_context_from_code () + get_call_info () if possible.
2943
2944 2009-02-25  Zoltan Varga  <vargaz@gmail.com>
2945
2946         * mini-exceptions.c (mono_handle_native_sigsegv): Implement the
2947         suspend-on-sigsegv functionality.
2948
2949         * mini.c (mini_parse_debug_options): Add a new 'suspend-on-sigsegv' option
2950         to suspend when a native SIGSEGV is received. This is useful for debugging
2951         crashes which don't happen under gdb, since a live process contains more
2952         information than a core file.
2953
2954         * mini-exceptions.c (mono_print_thread_dump): Use 
2955         MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX instead of platform defines.
2956
2957         * mini-x86.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): New define.
2958
2959         * mini-amd64.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): Ditto.
2960         
2961         * basic-float.cs: Disable the tests which currently fail on amd64.
2962
2963         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass a non-null 
2964         value to mono_arch_patch_callsite () to fix crashes.
2965         
2966         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix a warning.
2967
2968 2009-02-23  Zoltan Varga  <vargaz@gmail.com>
2969
2970         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Replace the
2971         nop code by patching the call address to point to the nullified class init
2972         trampoline, as the former does not seem to be safe on SMP machines.
2973
2974 2009-02-23  Mark Probst  <mark.probst@gmail.com>
2975
2976         * mini-ops.h: Fix the argument types for a few x86 opcodes where
2977         they were wrong.
2978
2979 2009-02-23  Zoltan Varga  <vargaz@gmail.com>
2980
2981         * basic-float.cs basic-calls.cs: Fix warnings.
2982
2983 2009-02-22  Mark Probst  <mark.probst@gmail.com>
2984
2985         * tramp-ppc.c (mono_arch_create_trampoline_code): Store the
2986         correct frame pointer in the LMF.  Should fix #478394.
2987
2988 2009-02-22  Zoltan Varga  <vargaz@gmail.com>
2989
2990         * Makefile.am (fullaotcheck): Copy Mono.Simd.dll as well.
2991
2992         * image-writer.c: Make the binary writer less verbose.
2993
2994 2009-02-21  Zoltan Varga  <vargaz@gmail.com>
2995
2996         * method-to-ir.c (mono_method_to_ir): Don't assert if string ctors
2997         are called from runtime invoke wrappers.
2998
2999 2009-02-20  Zoltan Varga  <vargaz@gmail.com>
3000
3001         * cpu-ppc.md (store_memindex): Increase the size of this.
3002
3003 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
3004
3005         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
3006
3007         * cpu-x86.md: Fix the sizes for long_conv_to_r_un and long_conv_to_r_un_2.
3008
3009         * mini-x86.c (mono_arch_output_basic_block): Use only 64bits of precision for
3010         OP_LCONV_TO_R_UN.
3011
3012         Last fix for of #467201.
3013
3014
3015 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
3016
3017         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
3018
3019         * cpu-x86.md: Fix the sizes for fcall(_reg,_membase), long_conv_to_r4_2
3020         and long_conv_to_r8_2:
3021
3022         Fixed part of #467201.
3023
3024 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
3025
3026         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
3027
3028         * mini-x86.c (mono_arch_output_basic_block): Adjust precision of int to float
3029         conversion to 32 bits.
3030
3031         * cpu-x86.md: Increase the size of int_conv_to_r4.
3032
3033         * basic-float.cs: Add a test for this.
3034
3035         Fixed part of #467201.
3036
3037 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
3038
3039         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
3040
3041         * mini-x86.c (mono_arch_output_basic_block): Adjust precision of long to double
3042         conversion to 64 bits.
3043
3044         * basic-float.cs: Add a test for this.
3045
3046         Fixed part of #467201.
3047
3048 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
3049
3050         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
3051
3052         * mini-x86.c (emit_move_return_value): Don't reduce precision of functions returning float.
3053         This behavior is compatible with MS.
3054
3055         * iltest.il.in: Add a test for this.
3056
3057         Fixed part of #467201.
3058
3059 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
3060
3061         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
3062
3063         * mini-x86.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_R4, it must
3064         change the precision of the value.
3065
3066         * cpu-x86.md: Define len for float_conv_to_r4.
3067
3068         * basic-float.cs: Add a test for this.
3069
3070         Fixed part of #467201.
3071
3072 2009-02-19 Rodrigo Kumpera  <rkumpera@novell.com>
3073
3074         * mini.c: Adjust locking order to the new semantics where the loader lock
3075         comes first.
3076
3077 2009-02-18  Rodrigo Kumpera  <rkumpera@novell.com>
3078
3079         * aot-runtime.c:
3080         * mini-amd64.c:
3081         * mini-arm.c:
3082         * mini-ia64.c:
3083         * mini-mips.c:
3084         * mini-ppc.c:
3085         * mini-sparc.c:
3086         * mini-trampolines.c:
3087         * mini-x86.c:
3088         * mini.c:
3089         * tramp-alpha.c:
3090         * tramp-amd64.c:
3091         * tramp-arm.c:
3092         * tramp-hppa.c:
3093         * tramp-ia64.c:
3094         * tramp-mips.c:
3095         * tramp-ppc.c:
3096         * tramp-s390.c:
3097         * tramp-s390x.c:
3098         * tramp-sparc.c:
3099         * tramp-x86.c: Use mono_domain_code_* functions instead of using MonoDomain::code_mp directly.
3100
3101 2009-02-18  Zoltan Varga  <vargaz@gmail.com>
3102
3103         * mini-codegen.c (mono_local_regalloc): Remove a ! from if (!dest_sreg1)
3104         as it is incorrect.
3105
3106 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
3107
3108         * aot-compiler.c (add_generic_class): Only add rgctx invoke wrappers
3109         for cctors if needed.
3110
3111 2009-02-17  Mark Probst  <mark.probst@gmail.com>
3112
3113         * mini-ppc.c: Fix build on Darwin.
3114
3115 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
3116
3117         * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Use 2 as the DWARF
3118         version instead of 3 as valgrind doesn't like version 3.
3119
3120         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
3121
3122         * aot-compiler.c (mono_aot_method_hash): New function to return a hash
3123         usable for hashing methods.
3124         (emit_extra_methods): Use the new hash to avoid putting every method in the
3125         same hash bucket.
3126
3127         * aot-runtime.c (find_extra_method_in_amodule): Use the new hash.
3128
3129         * aot-runtime.c (can_method_ref_match_method): New function to quickly check
3130         whenever a method ref could match a method.
3131         
3132         * aot-runtime.c (load_image): Revert the previous change, it causes an AOT
3133         test to fail.
3134         
3135         * aot-runtime.c (find_extra_method_in_amodule): Add a cache for decoded 
3136         methods refs.
3137
3138         * aot-runtime.c (load_image): Pass our basedir to mono_assembly_load.
3139
3140         * aot-compiler.c (emit_exception_debug_info): Bump the maximum size of
3141         the encoding buffer.
3142
3143         * method-to-ir.c (mono_method_check_inlining): Avoid calling 
3144         mono_method_get_header () on inflated methods as an optimization.
3145
3146 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
3147
3148         * ssa.c (fold_ins): Fix another crash if the instruction following the
3149         switch was optimized away.
3150
3151 2009-02-16  Mark Probst  <mark.probst@gmail.com>
3152
3153         Contributed under the terms of the MIT/X11 license by Steven
3154         Munroe <munroesj@us.ibm.com>.
3155
3156         * mini-ppc.c, mini-ppc.h: Implement TLS for PPC64.
3157
3158 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
3159
3160         * mini.c method-to-ir.c mini-trampolines.c aot-runtime.c: Remove locking
3161         around the mono_domain_alloc calls, it is now done by the functions
3162         themselves.
3163
3164         * aot-compiler.c (compile_method): Only add wrappers referenced by
3165         the method if compiling with full AOT.
3166         (mono_compile_assembly): Error out if --aot=full is specified on
3167         a platform where it is not supported.
3168
3169         * aot-compiler.c (emit_trampolines): Emit generic class init trampolines
3170         on ARM too.
3171
3172         * tramp-arm.c (mono_arch_create_generic_class_init_trampoline_full): Add
3173         AOT support.
3174
3175         * aot-runtime.c (load_named_code): Handle 
3176         mono_arm_throw_exception_by_token.
3177
3178         * mini-arm.h: Add declaration of mono_arm_throw_exception_by_token.
3179
3180         * image-writer.c (asm_writer_emit_pointer_unaligned): Make this really
3181         unaligned.
3182
3183         * Makefile.am (fullaotcheck): Exit if a test fails.
3184
3185         * aot-compiler.c (mono_compile_assembly): Use the ASM writer for full aot
3186         on ARM.
3187         (mono_compile_assembly): Handle the assembler failing.
3188
3189         * image-writer.c (asm_writer_emit_section_change): Handle ARM gas not
3190         accepting subsections of .bss.
3191
3192         * ssa.c (visit_inst): Fix a crash if the instruction following a switch
3193         was optimized away.
3194
3195         * aot-compiler.c: Remove some unused includes.
3196         
3197         * aot-compiler.c (MonoAotCompile): Remove some unused fields which are
3198         now in MonoImageWriter.
3199
3200         * mini-x86.c (mono_arch_get_vcall_slot): Handle yet another
3201         code sequence which matches a non-virtual call. Fixes #472654.
3202
3203 2009-02-15  Zoltan Varga  <vargaz@gmail.com>
3204
3205         * aot-compiler.c: Use xdebug_lock ()/unlock () macros for locking in the
3206         xdebug code.
3207         
3208         * aot-compiler.c: Make the xdebug code not depend on the AOT compiler,
3209         use the image/dwarf writers directly.
3210
3211         * image-writer.c (struct _MonoImageWriter): Remove the unused 'image'
3212         field.
3213
3214         * aot-compiler.c (MonoAotCompile): Remove fields which are now in
3215         MonoDwarfWriter.
3216
3217         * image-writer.h: Fix some typos.
3218
3219         * dwarfwriter.h dwarfwriter.c: New files.
3220         
3221         * aot-compiler.c: Extract the DWARF info writing functionality into a 
3222         separate module.
3223
3224         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add a 'out_unwind_ops'
3225         argument to return unwind info.
3226
3227         * tramp-arm.c (mono_arch_create_trampoline_code_full): Ditto.
3228
3229         * aot-compiler.c: Emit unwind info for trampolines in full-aot mode.
3230         
3231         * aot-runtime.c (decode_method_ref): Add a case for 
3232         MONO_AOT_METHODREF_WRAPPER_NAME.
3233
3234         * mini.h: Add constants for the magic numbers used in encode_method_ref ()
3235         for AOT.
3236
3237         * aot-compiler.c (encode_method_ref): Use the new constants.
3238
3239         * aot-runtime.c (decode_method_ref): Ditto.
3240
3241         * aot-compiler.c (compile_method): For generic icalls, queue the wrapper to
3242         be compiled, not the icall itself.
3243
3244 2009-02-14  Zoltan Varga  <vargaz@gmail.com>
3245
3246         * aot-runtime.c (find_extra_method_in_amodule): Avoid decoding wrapper names
3247         using decode_method_ref ().
3248
3249         * method-to-ir.c (mini_emit_ldelema_1_ins): If the array index is a long,
3250         convert it to an in32. Fixes #475859.
3251
3252         * arrays.cs: Add a test.
3253
3254 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
3255
3256         * mini-s390x.c (mono_arch_output_basic_block): Fix the shift amounts in 
3257         OP_LCONV_TO_U2.
3258
3259         * basic-long.cs: Add a test.
3260
3261 2009-02-12  Mark Probst  <mark.probst@gmail.com>
3262
3263         * mini-x86.c, mini-x86.h: Very simple frame pointer removal.  We
3264         remove the frame pointer in leaf methods which don't receive any
3265         arguments, don't throw exceptions and don't do dynamic stack
3266         allocations.
3267
3268 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
3269
3270         * mini-amd64.c (mono_arch_build_imt_thunk): Fix size calculation after
3271         the fail_tramp changes. Hopefully fixes #475132.
3272
3273 2009-02-12  Rodrigo Kumpera  <rkumpera@novell.com>
3274
3275         * method-to-ir.c (mono_emit_method_call_full): Use mono_metadata_signature_dup_mempool
3276         instead of mono_metadata_signature_dup_full.
3277
3278 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
3279
3280         * ssa.c (fold_ins): Use MONO_IS_JUMP_TABLE () and MONO_JUMP_TABLE_FROM_INS ()
3281         for processing jump tables. Fixes #473787.
3282
3283 2009-02-11  Mark Probst  <mark.probst@gmail.com>
3284
3285         * mini-generic-sharing.c: mini_method_get_context() just calls
3286         mono_method_get_context_general() now.
3287
3288         * mini.c, mini.h: Moved get_object_generic_inst(),
3289         construct_object_context_for_method() and
3290         mono_domain_lookup_shared_generic() to metadata/generic-sharing.c.
3291
3292 2009-02-11  Zoltan Varga  <vargaz@gmail.com>
3293
3294         * branch-opts.c (mono_if_conversion): Handle the case where the merged 
3295         basic block fell through to its successor bblock without a branch. Fixes
3296         #474718.
3297
3298         * iltests.il.in: Add a test.
3299         
3300         * aot-compiler.c (encode_method_ref): Encode methods of array types.
3301         (can_encode_patch): We can now handle arrays of generic parameters and
3302         array methods.
3303
3304         * aot-runtime.c (decode_method_ref_2): Handle methods of array types.
3305
3306         * aot-compiler.c aot-runtime.c: Emit the size of specific trampolines into
3307         the AOT file to avoid some #ifdefs in aot-runtime.c
3308
3309         * mini.h: Bump AOT file format version.
3310
3311 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
3312
3313         * Makefile.am (fullaotcheck): Make this run the tests.
3314
3315         * aot-compiler.c: Make the printing of skipped methods runtime configurable.
3316
3317 2009-02-10  Mark Probst  <mark.probst@gmail.com>
3318
3319         * mini-x86.c (mono_arch_context_get_int_reg): Handle all registers
3320         individually.  Fixes #473482.
3321
3322 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
3323
3324         * mini-arm.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
3325
3326 2009-02-09  Jeffrey Stedfast  <fejj@novell.com>
3327
3328         * aot-compiler.c (arch_emit_plt_entry): Fixed to compile.
3329         (mono_compile_assembly): Hush compile warnings about
3330         uninitialized [tmp_]outfile_name variables in the !use_bin_writer
3331         code path.
3332
3333 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
3334
3335         * exceptions-arm.c (mono_arch_find_jit_info): Fix aot support.
3336
3337         * mini-arm.c: Checkin unwind related changes missing from an earlier commit.
3338
3339         * aot-compiler.c: Fix arm support.
3340
3341         * image-writer.c: Move the R_ARM constants to image-writer.h. Export a
3342         img_writer_emit_unset_mode () function.
3343
3344         * unwind.c (mono_unwind_get_dwarf_data_align): New helper function.
3345         (mono_unwind_get_dwarf_pc_reg): Ditto.
3346
3347         * aot-compiler.c (emit_dwarf_abbrev): Another large reorganization.
3348         Move almost all platform specific code to a set of arch_ functions, 
3349         and document them to ease porting.
3350         
3351         * aot-compiler.c (mono_xdebug_init): Fix xdebug support.
3352
3353         * image-writer.h image-writer.c: New files, extracted from aot-compiler.c.
3354
3355         * aot-compiler.c: Extract the image writing functionality into a separate
3356         module to reduce the size of this file.
3357
3358 2009-02-09  Geoff Norton  <gnorton@novell.com>
3359
3360         * mini-s390.c: Fix the signature of emit_sig_cookie.
3361
3362 2009-02-09  Zoltan Varga  <vargaz@gmail.com>
3363
3364         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_IMAGE.
3365
3366         * aot-runtime.c (is_shared_got_patch): Ditto.
3367
3368         * aot-runtime.c (load_named_code): Cope with the fact that 
3369         decode_got_entry () won't decode the patch fully if its corresponding got
3370         entry is already filled.
3371         
3372         * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): 
3373         Initialize *ji.
3374         (mono_arch_create_monitor_exit_trampoline_full): Ditto.
3375
3376         * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): Use 'code'
3377         as the moving pointer instead of 'buf' for consistency with the rest of the
3378         codebase.
3379         (mono_arch_create_monitor_exit_trampoline): Ditto.
3380
3381         * aot-compiler.c (emit_trampolines): Add throw_pending_exception/
3382         generic_class_init trampolines.
3383         (add_generic_class): Extract some code from add_generic_instances () into a
3384         separate function so it can be called from other places too.
3385         (compile_method): Call add_generic_class () for the classes of inflated methods
3386         referenced by the method.
3387         (can_encode_patch): Allow references to generic parameters.
3388
3389         * aot-runtime.c: Add support the patches required by the new trampolines.
3390         
3391         * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Add full-aot
3392         support.
3393
3394         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline_full): Add
3395         full-aot support.
3396
3397         * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Rename
3398         this from get_throw_pending_exception, make the signature full aot compatible.
3399
3400         * Makefile.am (fullaotcheck): New target to run full-aot tests.
3401
3402         * method-to-ir.c (inline_method): Save/Restore cfg->ret_var_set too.
3403
3404         * exceptions.cs: Add a test.
3405
3406 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
3407
3408         * unwind.c (mono_unwind_frame): Eliminate the data_align_factor argument,
3409         use the DWARF_DATA_ALIGN constant instead.
3410
3411         * exception-<ARCH>.c: Update after the above change.
3412
3413         * exceptions-arm.c (mono_arch_find_jit_info): Transition this to use the
3414         dwarf unwinder.
3415
3416         * mini-arm.c: Enable the dwarf unwinder.
3417
3418         * mini-trampolines.c (mono_magic_trampoline): Use mono_class_get_vtable_entry ()
3419         instead of mono_class_setup_vtable ().
3420
3421 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
3422
3423         * exceptions-x86.c (mono_arch_find_jit_info): Transition this to use the
3424         dwarf unwinder.
3425
3426         * mini-x86.h: Enable the dwarf unwinder.
3427
3428 2009-02-06  Raja R Harinath  <harinath@hurrynot.org>
3429
3430         Fix mcs/tests/test-7.cs
3431         * mini-amd64.c (mono_arch_allocate_vars): Revert change from
3432         2009-02-03.
3433
3434 2009-02-06  Zoltan Varga  <vargaz@gmail.com>
3435
3436         * mini.c (print_jit_stats): Remove some unused statistics.
3437
3438 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
3439
3440         * aot-compiler.c (emit_klass_info): Update after MonoClass changes.
3441
3442 2009-02-05  Mark Probst  <mark.probst@gmail.com>
3443
3444         * jit-icalls.c (mono_helper_compile_generic_method): Don't inflate
3445         the method we get from mono_object_get_virtual_method() because
3446         that function does it properly, now.
3447
3448 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
3449
3450         * unwind.c (mono_unwind_ops_encode): Handle offsets greater than 32 between
3451         opcodes. Fixes #472775.
3452
3453 2009-02-05  Mark Probst  <mark.probst@gmail.com>
3454
3455         * mini-exceptions.c (ves_icall_get_frame_info): Account for the
3456         fact that mono_find_jit_info() sometimes returns the context
3457         corresponding to the jit info in new_ctx.  Fixes #472600.
3458
3459 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
3460
3461         * method-to-ir.c mini-hppa.c mini.c trace.c mini-s390x.c aot-compiler.c
3462         mini-s390.c: Use mono_class_enum_basetype () instead of accessing
3463         klass->enum_basetype directly.
3464
3465         * aot-compiler.c (emit_class_dwarf_info): Add support for all possible
3466         enum subtypes.
3467
3468         * unwind.c: Avoid 0 sized arrays.
3469
3470 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
3471
3472         * mini-exceptions.c (mono_setup_altstack): Use a more reasonable altstack
3473         size on systems with 64k pages. Fixes #471389.
3474
3475 2009-02-04  Mark Probst  <mark.probst@gmail.com>
3476
3477         Contributed under the terms of the MIT/X11 license by Steven
3478         Munroe <munroesj@us.ibm.com>.
3479
3480         * mini-ppc.c (mono_arch_output_basic_block): Generate better code
3481         for LOADI4_MEMBASE.  Use addi instead of addic if it's not
3482         necessary.
3483
3484 2009-02-04  Mark Probst  <mark.probst@gmail.com>
3485
3486         Contributed under the terms of the MIT/X11 license by Steven
3487         Munroe <munroesj@us.ibm.com>.
3488
3489         * exceptions-ppc.c (mono_arch_get_restore_context): Code size
3490         comparison fix.
3491
3492         * tramp-ppc.c (mono_arch_create_generic_class_init_trampoline):
3493         The trampoline can be longer on PPC64.
3494
3495 2009-02-04  Mark Probst  <mark.probst@gmail.com>
3496
3497         Contributed under the terms of the MIT/X11 license by Steven
3498         Munroe <munroesj@us.ibm.com>.
3499
3500         * mini-ppc.c: Compiler warning fixes and trivial code
3501         simplifications.
3502
3503 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
3504
3505         * method-to-ir.c (mono_spill_global_vars): Fix problems caused by reading
3506         ins->dreg which could be a hardware register, not a vreg.
3507
3508         * aot-compiler.c (emit_method_dwarf_info): Ditto.
3509         
3510         * mini.h (MonoCompile): Remove vreg_to_var_num array, it is no longer used.
3511         (struct MonoMethodVar): Add a vreg field, holding the vreg of variable.
3512
3513         * mini.c (mono_compile_create_var_for_vreg): Set var->vreg.
3514         
3515         * mini-amd64.c (mono_arch_output_basic_block): Avoid reading cfg->varinfo[..]
3516         ->dreg, that is not the vreg we are looking for.
3517
3518         * mini-amd64.h mini-x86.h: Enable MONO_ARCH_LIVENESS_OPS again.
3519
3520         * mini-x86.c (mono_arch_output_basic_block): Add support for LIVERANGE_START/
3521         LIVERANGE_END.
3522
3523         * method-to-ir.c (mono_spill_global_vars): Add an assert to help track down
3524         strange crashes.
3525
3526 2009-02-03  Zoltan Varga  <vargaz@gmail.com>
3527
3528         * mini-x86.c (mono_arch_emit_prolog): Emit unwind info.
3529
3530         * aot-compiler.c (emit_line_number_info): Fix line number emission when
3531         the line diff is 0.
3532
3533         * aot-compiler.c: Add xdebug support on x86.
3534
3535         * unwind.c: Add x86 support.
3536         
3537         * aot-compiler.c (emit_exception_debug_info): Control the emission of
3538         unwind info using a new MONO_ARCH_HAVE_XP_UNWIND define.
3539
3540         * mini.c (mini_method_compile): Ditto.
3541         
3542         * mini-amd64.c (mono_arch_allocate_vars): Avoid setting cfg->ret->dreg to
3543         the variable index.
3544
3545         * aot-compiler.c: Add emit_push_section ()/emit_pop_section () helper functions
3546         which mimic .push_section/.pop_section in GAS.
3547         
3548         * aot-compiler.c: Emit precise live range information for variables.
3549
3550         * mini-amd64.c (mono_arch_output_basic_block): Add OP_LIVERANGE_START/END.
3551
3552         * method-to-ir.c (mono_spill_global_vars): Compute the instructions marking
3553         the live ranges of variables, and emit OP_LIVERANGE_START/END opcodes for
3554         them.
3555
3556         * mini-ops.h: Add OP_LIVERANGE_START/END opcodes to mark
3557         the live ranges of variables.
3558
3559         * mini.h (struct MonoMethodVar): Add two fields containing the live range
3560         of the variable in terms of native offsets.
3561
3562 2009-02-03  Rodrigo Kumpera  <rkumpera@novell.com>
3563
3564         * arrays.cs: Test for Get/SetValue of array with negate lower bounds.
3565         
3566 2009-02-02  Mark Probst  <mark.probst@gmail.com>
3567
3568         Contributed under the terms of the MIT/X11 license by Steven
3569         Munroe <munroesj@us.ibm.com>.
3570
3571         * exceptions-ppc.c (restore_regs_from_context): Correct operand
3572         order (offset then base reg) for ppc_load_multiple_regs.
3573         (emit_save_saved_regs) Correct operand order for
3574         ppc_store_multiple_regs.
3575         (mono_arch_get_call_filter): Correct operand order for
3576         ppc_load_multiple_regs.
3577
3578         * mini-ppc.c (emit_memcpy): Fix operand order for
3579         ppc_load_reg_update and ppc_store_reg_update.
3580         (mono_arch_output_basic_block): Correct operand order for ppc_lha.
3581         (mono_arch_emit_epilog): Correct operand order for
3582         ppc_load_multiple_regs.
3583
3584         * tramp-ppc.c (mono_arch_create_trampoline_code): Correct operand
3585         order for ppc_store_multiple_regs and ppc_load_multiple_regs.
3586
3587 2009-02-02  Mark Probst  <mark.probst@gmail.com>
3588
3589         * cpu-ppc64.md: Fixed storer4_memindex length.
3590
3591 2009-02-02  Zoltan Varga  <vargaz@gmail.com>
3592
3593         * aot-compiler.c (emit_line_number_info): Optimize the size of the emitted
3594         line number info.
3595         
3596         * aot-compiler.c (emit_line_number_info): Optimize this.
3597
3598 2009-02-01  Zoltan Varga  <vargaz@gmail.com>
3599
3600         * aot-compiler.c: Disassemble tokens in the IL disassembly.
3601         
3602         * aot-compiler.c: Add debug info for methods without debug info by
3603         emitting an IL file and having the line number info referencing that file.
3604
3605         * aot-compiler.c: Optimize the size of the generated line number info.
3606
3607         * aot-compiler.c: Emit line number info in xdebug mode.
3608
3609         * aot-compiler.c (mono_save_xdebug_info): Receive a MonoCompile instead of a
3610         million arguments.
3611
3612 2009-01-31  Zoltan Varga  <vargaz@gmail.com>
3613
3614         * aot-compiler.c (emit_method_dwarf_info): Emit names for local variables.
3615
3616         * driver.c (mono_main): Enable debugging support automatically if XDEBUG
3617         is used.
3618
3619 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
3620
3621         * basic-calls.cs: Test for the weird crash found on arm.
3622         
3623 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
3624
3625         * cpu-arm.md: Increase the size of storer8_membase_reg and
3626         loadr8_membase_reg to 24 bytes to accomodate the extra add.
3627
3628         * mini-arm.c (mono_arch_output_basic_block): Under FPA, when emitting
3629         OP_STORER8_MEMBASE_REG and OP_LOADR8_MEMBASE_REG, add the original
3630         reg to LR otherwise we'll be loading/storing from just the offset.
3631
3632 2009-01-30  Miguel de Icaza  <miguel@novell.com>
3633
3634         Question: if we are storing gint32's inside the "*native_offset",
3635         should we change the signature to "gint32 *native_offset" to
3636         ensure that we do not have type definition problems?
3637         
3638         * mini-exceptions.c (ves_icall_get_frame_info): Cast the gint32 to
3639         an int * as this is what the other function expects, causes
3640         problems with Freescale's compiler that defined int32_t to be a
3641         long and makes int incompatible 
3642
3643 2009-01-30  Miguel de Icaza  <miguel@novell.com>
3644
3645         * Rename generic-sharing.c to mini-generic-sharing.c to avoid the
3646         filename conflict with bjam.
3647
3648 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
3649
3650         * cpu-arm.md: Increase the size of storer8_membase_reg to 20 bytes
3651         as it might use decomposed ops.
3652
3653 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
3654
3655         * jit-icalls.c (mono_imul_ovf): Fix one of the literals.
3656
3657         * mini.c (mini_init): Emulate mul.ovf opcodes if MONO_ARCH_EMULATE_MUL_OVF
3658         is defined.
3659
3660         * mini-arm.h (MONO_ARCH_EMULATE_MUL_OVF): New define.
3661
3662         * mini-arm.c (mono_arch_build_imt_thunk): Rewrite this to allow large vtable
3663         offsets.
3664
3665         * mini-arm.c (mono_arch_context_get_int_reg): Adapt this to the "clever"
3666         way registers are stored in MonoContext on arm.
3667
3668         * unwind.c: Rewrite the handling of the cached_info array to use hazard pointers
3669         instead of locking so mono_get_cached_unwind_info () becomes signal safe.
3670
3671         * mini.c (mini_init): Emuate OP_FCONV_TO_I when using soft float.
3672
3673         * mini-arm.c (emit_load_volatile_arguments): Avoid an unneccesary assert.
3674
3675         * mini.c (mini_init): Register mono_isfinite.
3676
3677         * jit-icalls.c (mono_isfinite): New jit icall.
3678
3679         * method-to-ir.c (mono_decompose_soft_float): Add support for OP_CKFINITE.
3680         
3681         * exceptions-arm.c (mono_arch_find_jit_info): When unwinding using the LMF,
3682         set esp to ARMREG_FP instead of R12, since R12 stores the value of sp for
3683         the parent frame.
3684
3685 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
3686
3687         * exceptions-arm.c (mono_arch_find_jit_info): The frame layout on arm have
3688         separate frame and stack pointers, so we must use FP to find the register
3689         spill area.
3690         The FP reg is retrieved from the MonoContext::regs array.
3691
3692 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
3693
3694         * mini-arm.c (mono_arch_output_basic_block): Emit two cond ops for OP_FBGE
3695         as FPA requires it.
3696
3697 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
3698
3699         * mini-arm.c (mono_arch_emit_setret): Emit OP_FMOVE for methods that
3700         return R4 and R8 when not running under softfloat.
3701
3702         Fixes basic-calls.exe
3703
3704 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
3705
3706         * mini-arm.c: Implement some overflow opcodes.
3707
3708 2009-01-29  Miguel de Icaza  <miguel@novell.com>
3709
3710         * ssa.c: handle another alloca.h
3711
3712         * mini-exceptions.c (mono_handle_native_sigsegv): Do not use
3713         PLATFORM_WIN32 for detecting if we have sigaction.   Instead use
3714         MONO_ARCH_USE_SIGACTION. 
3715
3716         * aot-runtime.c, mini-exceptions.c: Replace platform define with
3717         capability defines.
3718
3719         * method-to-ir.c (mono_method_to_ir): Type cast fix on some platforms.
3720
3721         * mini-ppc.h (MONO_ARCH_USE_SIGACTION): Do not define this for all
3722         PPC targets as sigaction does not exist on all platforms, define
3723         this on a per-platform basis.
3724
3725         Instead of erroring out if the platform is not defined, include
3726         mini-ppc-os.h, and expect that the OS specific setting provides
3727         the required information.   
3728
3729 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
3730
3731         * aot-compiler.c: Fix --enable-minimal=aot.
3732
3733 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
3734
3735         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Fix the
3736         previous change.
3737
3738 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
3739
3740         * exceptions-arm.c: Fix warnings.
3741
3742         * tramp-arm.c aot-compiler.c unwind.h unwind.c: Implement xdebug support for
3743         ARM.
3744
3745         * mini-x86.c: Fix --enable-minimal=jit build.
3746
3747         * mini.c: Really fix --enable-minimal=jit build.
3748         
3749         * mini.c (construct_object_context_for_method): Move this outside
3750         the DISABLE_JIT block to fix the --enable-minimal=jit build.
3751
3752         "Backported" of r124984 from 2.0 branch.
3753         
3754         * aot-compiler.c aot-runtime.c: Add full-aot support delegate BeginInvoke/EndInvoke.
3755
3756         "Backport" of r124977 + r124978 from 2.0 branch.
3757         
3758         * exceptions-arm.c (mono_arm_throw_exception_by_token): New helper function
3759         to avoid calling mono_exception_from_token () from the throw trampoline.
3760         (mono_arch_get_throw_exception_generic): call throw_exception_by_token
3761         for throwing corlib exceptions, this fixes full-aot support for corlib
3762         exceptions.
3763
3764         * aot-compiler.c (compile_method): Make a copy of cfg->locals to fix the build.
3765
3766 2009-01-29  Miguel de Icaza  <miguel@novell.com>
3767
3768         * mini-darwin.c, mini-windows.c, mini-posix.c: Commit the first
3769         part of the changes to split the code in mini into operating
3770         system specific files.
3771
3772         This patch was done by copying mini.c to the respective files to
3773         preserve SVN history.
3774
3775 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
3776
3777         * aot-compiler.c (emit_method_dwarf_info): Add minimal support for locals.
3778
3779 2009-01-28  Zoltan Varga  <vargaz@gmail.com>
3780
3781         * method-to-ir.c (mono_method_to_ir): Avoid generic sharing for calls made to
3782         remoting-invoke-with-check wrappers of shared methods.
3783
3784         * mini.c (print_jit_stats): Print out major gc count/time for libgc too.
3785
3786 2009-01-27  Mark Probst  <mark.probst@gmail.com>
3787
3788         * method-to-ir.c (emit_stloc_ir): Only apply the reg-reg move
3789         optimization if the top of stack is the last instruction in the
3790         bblock.  Otherwise it might have been used after its definition.
3791         Fixes #469742.
3792
3793 2009-01-27  Zoltan Varga  <vargaz@gmail.com>
3794
3795         * mini-trampolines.c (mono_magic_trampoline): Print out the caller
3796         method as well when get_vcall_slot () fails to match a code sequence.
3797
3798         * mini-arm.c: Fix the android build, which doesn't have
3799         __aeabi_read_tp.
3800
3801 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
3802
3803         * mini-s390x.c: Remove a stray declaration of emit_sig_cookie () to fix
3804         the s390x build.
3805
3806 2009-01-26  Rodrigo Kumpera  <rkumpera@novell.com>
3807
3808         * unwind.c (mono_unwind_cleanup): Don't crash if cached_info is NULL.
3809
3810 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
3811
3812         * mini.c (mini_method_compile): Save the unwind info generated by the JIT
3813         and put its id into jinfo->used_regs. This is only used on amd64,
3814         which is currently the only platform generating unwind info.
3815
3816         * exceptions-amd64.c: Instead of unwinding based on a register mask, use
3817         the dwarf unwinder. This is required to correctly handle async exceptions
3818         like thread abort and stack overflows, which can happen while a method
3819         is in the middle of its prolog or epilog.
3820         
3821         * aot-runtime.c (mono_aot_get_unwind_info): New helper function to obtain
3822         the unwind info belonging to an AOTed method.
3823
3824         * aot-compiler.c aot-runtime.c: Save/Load the unwind info emitted by the JIT
3825         into cfg->unwind_ops.
3826         
3827         * unwind.c (mono_unwind_frame): Use <= instead of < for the loop exit check.
3828
3829         * mini.c (mini_init): Call mono_unwind_init ().
3830         (mini_cleanup): Call mono_unwind_cleanup ().
3831
3832         * unwind.c: Add functions for managing a set of unwind info entries, allowing
3833         unwind info to be shared between methods.
3834
3835         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info for the registers
3836         saved in the LMF.
3837
3838         * exceptions-amd64.c (mono_arch_exceptions_init): Call 
3839         get_throw_pending_exception () to avoid initialization races.
3840
3841         * mini-exceptions.c (mono_exceptions_init): Call an arch specific
3842         mono_arch_exceptions_init () function.
3843
3844         * mini.h (MONO_INST_NEW): Remove duplicate setting of cil_code.
3845
3846 2009-01-25  Zoltan Varga  <vargaz@gmail.com>
3847
3848         * mini.c (mono_get_domain_intrinsic): New helper function.
3849         (mono_get_thread_intrinsic): Ditto.
3850
3851         * mini-arm.c mini-ia64.c: Use the new helper functions.
3852         
3853         * method-to-ir.c (mono_method_to_ir): Fix the comment for
3854         the last constrained_call change, since it is needed in the non-AOT
3855         case as well.
3856
3857         * mini-arm.c: Implement OP_TLS_GET on arm eabi linux.
3858         
3859         * mini-arm.c (mono_arch_emit_prolog): Add an inlined version of 
3860         mono_get_lmf_addr () on arm eabi linux.
3861
3862 2009-01-24  Zoltan Varga  <vargaz@gmail.com>
3863
3864         * mini-amd64.c (mono_arch_get_vcall_slot): Handle yet another
3865         code sequence which matches a non-virtual call.
3866
3867 2009-01-23  Mark Probst  <mark.probst@gmail.com>
3868
3869         * mini-ppc.c (mono_arch_context_get_int_reg): Allow access to the
3870         stack pointer (r1).
3871
3872 2009-01-23  Zoltan Varga  <vargaz@gmail.com>
3873
3874         * aot-compiler.c aot-runtime.c: Treat delegate-invoke wrappers similarly to
3875         runtime-invoke wrappers, since they are also shared based on signature.
3876
3877 2009-01-22  Mark Probst  <mark.probst@gmail.com>
3878
3879         * mini-exceptions.c (ves_icall_get_frame_info): Fetch the generic
3880         info from the (correct) context.
3881
3882 2009-01-22  Zoltan Varga  <vargaz@gmail.com>
3883
3884         * unwind.c (mono_unwind_frame): Remove a stray g_free ().
3885         
3886         * unwind.c (mono_unwind_frame): New function to unwind through a frame
3887         using dwarf unwinding info. Not yet used.
3888
3889         * mini.c (mini_init): When using xdebug, disable freeing of domains.
3890
3891 2009-01-21  Mark Probst  <mark.probst@gmail.com>
3892
3893         * mini-ppc.c (mono_arch_delegate_invoke_impl): Return function
3894         descriptors.
3895
3896         * mini-trampolines.c (mono_delegate_trampoline): Remove the PPC64
3897         special case and handle mono_arch_delegate_invoke_impl() returning
3898         function descriptors.
3899
3900         * tramp-ppc.c (mono_arch_create_trampoline_code): Delegate
3901         trampolines return function descriptors, too.
3902
3903 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
3904
3905         * method-to-ir.c (handle_alloc): Avoid generic instances in the
3906         out_of_line optimization.
3907
3908 2009-01-21  Martin Baulig  <martin@ximian.com>
3909
3910         * mini.h
3911         (MonoCompile): Added `disable_deadce_vars' to disable removing
3912         unused variables.
3913
3914         * mini.c
3915         (mini_method_compile): Set `cfg->disable_deadce_vars' when running
3916         inside the debugger.
3917
3918         * liveness.c (mono_analyze_liveness): Don't remove any unused
3919         variables if `cfg->disable_deadce_vars' is set.
3920
3921 2009-01-21  Mark Probst  <mark.probst@gmail.com>
3922
3923         * method-to-ir.c: Only apply exception constructor optimization if
3924         the the method actually belongs to an exception class.  Fixes
3925         #467456.
3926
3927 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
3928
3929         * mini-trampolines.c (mono_delegate_trampoline): Put back the previous
3930         change inside a #ifdef __mono_ppc64__.
3931
3932         * aot-compiler.c (compile_method): Remove the previous limitation.
3933
3934         * method-to-ir.c (method-to-ir.c): Add support for the constrained prefix
3935         on type variables in AOTed code.
3936         
3937         * aot-compiler.c (compile_method): Skip generic methods having type 
3938         constraints on their generic parameters.
3939
3940         * aot-compiler.c (compile_method): Check for methods which cannot be
3941         encoded inside RGCTX_FETCH patches as well.
3942
3943         * mini-exceptions.c (mono_print_thread_dump): Fix the windows
3944         build.
3945
3946 2009-01-20  Mark Probst  <mark.probst@gmail.com>
3947
3948         * method-to-ir.c: Force the vtable variable in shared generic code
3949         for the case that they might show up on a stack trace where they
3950         are needed.
3951
3952         * mini-exceptions.c: Save and use generic sharing info as well as
3953         IP in stack traces to resolve shared generic instantiations.
3954
3955 2009-01-20  Zoltan Varga  <vargaz@gmail.com>
3956
3957         * mini-trampolines.c (mono_delegate_trampoline): Revert the change which
3958         added a mono_get_addr_from_ftnptr () as it breaks the ia64 build.
3959
3960 2009-01-20  Mark Probst  <mark.probst@gmail.com>
3961
3962         * method-to-ir.c: Do generic sharing for array constructors.
3963
3964 2009-01-20  Rodrigo Kumpera  <rkumpera@novell.com>
3965
3966         * mini-exceptions.c (mono_print_thread_dump): Add information
3967         about the thread state using wapi_current_thread_desc.
3968
3969 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
3970
3971         * basic-simd.cs: Tests for the new constructors. 
3972
3973 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
3974
3975         * mini-ops.h: Added OP_EXPAND_*
3976
3977         * cpu-x86.md: Same.
3978
3979         * mini-x86.c (mono_arch_output_basic_block): Same.
3980         
3981         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for single element constructors.
3982
3983 2009-01-19  Zoltan Varga  <vargaz@gmail.com>
3984
3985         * iltests.il.in: Add a test for #467385.
3986
3987 2009-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
3988
3989         * mini.c (mini_thread_cleanup): Don't cleanup TLS storage if the
3990         thread been cleaned up is not the same currently in execution.
3991
3992         Fixes appdomain-unload crashes on windows, osx and linux variants
3993         without the __thread keyword.
3994
3995 2009-01-18  Zoltan Varga  <vargaz@gmail.com>
3996
3997         * mini-arm.c (mono_arch_flush_icache): Applied patch from Koushik Dutta
3998         (koush@koushikdutta.com). Implement this for android.
3999
4000         * helpers.c (mono_disassemble_code): Avoid assembler errors if the id
4001         begins with a digit.
4002
4003         * method-to-ir.c: Call mono_gc_get_write_barrier () instead of
4004         mono_marshal_get_write_barrier ().
4005
4006 2009-01-17  Rodrigo Kumpera  <rkumpera@novell.com>
4007
4008         * decompose.c (mono_decompose_vtype_opts): Fix the decomposition
4009         of OP_VCALL_* ops for 8 bytes vtypes on 32 bits archs and platorms
4010         that pass them on a register pair.
4011
4012         This affects windows, OSX and FreeBSD. The mono/tests/handleref.exe
4013         test was crashing due to that.
4014
4015 Fri Jan 16 15:21:21 CET 2009 Paolo Molaro <lupus@ximian.com>
4016
4017         * exceptions-ppc.c: tweaks from malc (OV-Soft) to fix the size of the
4018         trampoline code. Include ucontext.h only if available.
4019
4020 2009-01-15  Mark Probst  <mark.probst@gmail.com>
4021
4022         * mini.c: mono_domain_lookup_shared_generic() takes an open method
4023         and doesn't check whether it's sharable, like it was before
4024         removing the shared generics hash.  This brings IronPython
4025         performance back to what it was before that change.
4026
4027 2009-01-14  Mark Probst  <mark.probst@gmail.com>
4028
4029         * method-to-ir.c: Handle delegate invocation optimization earlier,
4030         otherwise it would be handled (much more slowly) by the
4031         final/sealed optimization.
4032
4033 2009-01-13  Zoltan Varga  <vargaz@gmail.com>
4034
4035         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes when the current thread or
4036         domain is not set. Fixes #465864.
4037
4038 2009-01-12  Mark Probst  <mark.probst@gmail.com>
4039
4040         * method-to-ir.c: Don't stop sharing of generic methods with catch
4041         clauses - we already handle those.
4042
4043 2009-01-12  Mark Probst  <mark.probst@gmail.com>
4044
4045         * mini.c, mini.h: lookup_generic_method() is now
4046         mono_domain_lookup_shared_generic() and uses the jit_code_hash,
4047         making the shared_generics_hash obsolete.
4048
4049 2009-01-12  Mark Probst  <mark.probst@gmail.com>
4050
4051         * mini-ppc.c, exceptions-ppc.c, cpu-ppc.md, cpu-ppc64.md: Don't
4052         use the red zone.  Make room on the stack first and then use it,
4053         not the other way around.
4054
4055 2009-01-12  Zoltan Varga  <vargaz@gmail.com>
4056
4057         * mini.c (mini_init): Call mono_xdebug_init ().
4058
4059         * aot-compiler.c (mono_xdebug_init): Make this non-static.
4060
4061 2009-01-11  Zoltan Varga  <vargaz@gmail.com>
4062
4063         * TestDriver.cs: Add an --iter argument to run tests multiple times.
4064
4065         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Emit debug info for
4066         trampolines.
4067
4068         * aot-compiler.c (mono_save_trampoline_xdebug_info): New function to emit
4069         debug+unwind info for trampolines.
4070
4071         * mini.c (mono_create_unwind_op): New helper function.
4072
4073         * unwind.h: Add macros for emitting unwind ops without a MonoCompile.
4074
4075 2009-01-10  Zoltan Varga  <vargaz@gmail.com>
4076
4077         * aot-compiler.c: Fix the build.
4078
4079 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
4080
4081         * Makefile.am: Update dtrace-prelink.sh location.
4082
4083 2009-01-08  Zoltan Varga  <vargaz@gmail.com>
4084
4085         * method-to-ir.c (mono_method_to_ir): Fix the check for the mscorlib ldstr 
4086         optimization. Fixes #464520.
4087
4088 2009-01-07  Bill Holmes  <billholmes54@gmail.com>
4089
4090         * mini-amd64.c : Adding code to save/restore non-volatile registers
4091            on Winx64.
4092
4093         * exceptions-amd64.c : Adding code to save/restore non-volatile 
4094           registers on Winx64.
4095
4096         Contributed under MIT/X11 license.
4097
4098 2009-01-07  Zoltan Varga  <vargaz@gmail.com>
4099
4100         * mini-arm.c (mono_arch_flush_icache): Use __GNUC_PREREQ instead of checking
4101         __GNUC_MINOR__ which can break when the major version changes.
4102
4103 2009-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
4104
4105         * basic-simd.cs: Add tests for usage of the sizeof opcode.
4106
4107 2009-01-07  Geoff Norton  <gnorton@novell.com>
4108
4109         * helpers.c:  Allow mono -v -v -v to work on darwin.
4110
4111 2009-01-05  Bill Holmes  <billholmes54@gmail.com>
4112
4113         * mini-amd64.c (mono_arch_get_vcall_slot) : Handle an additional instruction
4114           pattern. 
4115
4116         Contributed under MIT/X11 license.
4117
4118 2009-01-05  Zoltan Varga  <vargaz@gmail.com>
4119
4120         * mini.c (mono_allocate_stack_slots_full2): Use mono_class_from_mono_type
4121         instead of directly accessing type->data.klass. Fixes #462016.
4122         (mono_allocate_stack_slots_full): Ditto.
4123
4124         * mini-arm.c (mono_arch_flush_icache): Applied patch from Riku Voipio 
4125         <novell@kos.to>. Fix cache flush on kernels without OLDABI compat option.
4126
4127         * aot-compiler.c (emit_plt): Fix ARM build.
4128
4129 2009-01-04  Zoltan Varga  <vargaz@gmail.com>
4130
4131         * branch-opts.c (mono_if_conversion): Optimize this using ins->prev.
4132         
4133         * branch-opts.c (mono_if_conversion): Fix an assert introduced by the last
4134         change.
4135
4136         * branch-opts.c (mono_if_conversion): Use branch->inst_true_bb/inst_false_bb
4137         instead of bblock->out_bb [0]/[1], the two might not be the same. Fixes
4138         #463357.
4139
4140         * iltests.il.in: Add a regression test.
4141
4142 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
4143
4144         * mini-codegen.c (mono_print_ins_index): Pretty print XPHI and VPHI.
4145
4146 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
4147
4148         * basic-simd.cs: Add a regression test for #462457.
4149
4150 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
4151
4152         * mini-ops.h: Add a definition of XPHI.
4153
4154         * mini.h (MONO_IS_PHI): Make is aware of simd instrincs. 
4155
4156         * ssa.c (op_phi_to_move): Handle XPHI.
4157
4158         * ssa.c (mono_ssa_compute): Generate a XPHI for simd intrinsics instead of VPHI.
4159
4160         Fixes #462457
4161
4162 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
4163
4164         * method-to-ir.c (mono_emit_rgctx_calli): Fix a warning.
4165
4166 2008-12-31  Geoff Norton  <gnorton@novell.com>
4167
4168         * mini-ppc.c: The prolog size allocated can be too small for darwin
4169         ppc32 under certain circumstances.  Also fix a small logic bug.
4170
4171 2008-12-29  Zoltan Varga  <vargaz@gmail.com>
4172
4173         * mini.c (mono_jit_compile_method_inner): Avoid holding the domain lock
4174         while loading AOT methods.
4175
4176         * mini-exceptions.c: Check jit_tls->class_cast_from instead of class_cast_to
4177         since only the former is nulled out after a successful cast. This prevents
4178         crashes with rethrown exceptions when using --debug=casts.
4179
4180 2008-12-24  Mark Probst  <mark.probst@gmail.com>
4181
4182         * mini.h: New macro for checking whether a method is final,
4183         i.e. whether the method or its class is marked final.
4184
4185         * method-to-ir.c: Use the new macro for all final-checks
4186         consistently.  Fixes the crash in the System.ServiceModel tests.
4187
4188 2008-12-23  Mark Probst  <mark.probst@gmail.com>
4189
4190         * mini-exceptions.c (get_exception_catch_class): Corrected another
4191         overly strict assertion.
4192
4193 2008-12-23  Mark Probst  <mark.probst@gmail.com>
4194
4195         * mini-ppc.c (mono_arch_build_imt_thunk): Save and restore r11.
4196         Clobbering it is not allowed because the caller might use it as
4197         the vtable register in the interface call.
4198
4199 2008-12-19  Mark Probst  <mark.probst@gmail.com>
4200
4201         * mini-exceptions.c (get_exception_catch_class): Corrected an
4202         overly strict assertion.
4203
4204 2008-12-18  Mark Mason  <mmason@upwardaccess.com>
4205         
4206         * method-to-ir.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P or sizeof(gpointer) when appropriate.
4207
4208         * mini.h: Move typedef to mgreg_t up above include of mini-arch.h
4209
4210         * local-propogation.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P when appropriate
4211
4212         * cpu-mips.md: correct lengths for certain long_ opcodes.
4213
4214         * mini-mips.h: Only emulate long operations when SIZEOF_REGISTER==4. Add missing func decl.
4215
4216         * 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().
4217         
4218 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
4219
4220         * exceptions-mips.c (mono_arch_find_jit_info): decode sd instructions as well when looking for registers.
4221         
4222 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
4223         
4224         * mini-mips.c (mono_arch_output_basic_block): OP_JUMP_TABLE stores patch type in inst_c1, not inst_i1.
4225         
4226 2008-12-16  Rodrigo Kumpera  <rkumpera@novell.com>
4227
4228         * branch-opts.c (remove_block_if_useless): Even if BB0 falls through, don't add a br to the
4229         next basic block.
4230         
4231 2008-12-16  Mark Mason  <mmason@upwardaccess.com>
4232
4233         * 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
4234
4235         * 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)
4236         
4237 2008-12-15  Mark Mason  <mmason@upwardaccess.com>
4238         
4239         * trace.c (mono_trace_enter_method): correctly handle arguments smaller than the stack slot size on big endian systems.
4240         
4241 2008-12-14  Zoltan Varga  <vargaz@gmail.com>
4242
4243         * liveness.c (mono_analyze_liveness): Avoid eliminating the 'this' var in
4244         gshared code. Fixes #458947.
4245
4246         * generics.cs: Add a test.
4247
4248 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
4249         
4250         * method-to-ir.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4251         
4252         * mini-mips.c: first pass n32 code generation.
4253
4254         * mini-mips.h: datatypes and defines for n32 support.
4255
4256         * exceptions-mips.c: first pass n32 code generation.
4257         
4258         * tramp-mips.c: first pass n32 code generation.
4259         
4260         * cpu-mips.md: add long_ opcodes.
4261         
4262 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
4263
4264         * liveness.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4265
4266         * cfold.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4267         
4268         * local-propogation.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4269         
4270         * regalloc2.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4271
4272         * mini.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4273
4274         * mini-codegen.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4275
4276         * ssa.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4277
4278         * decompose.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
4279
4280         * helpers.c: for mips/n32, don't pass -mips32 to objdump
4281
4282 2008-12-12  Zoltan Varga  <vargaz@gmail.com>
4283
4284         * mini-arm.c tramp-arm.c: Fix calls to mono_arch_flush_icache.
4285
4286 2008-12-12  Andres G. Aragoneses  <aaragoneses@novell.com>
4287
4288         * driver.c: Sync --help-trace with man page (EXPR,EXPR).
4289
4290 2008-12-12  Mark Probst  <mark.probst@gmail.com>
4291
4292         * mini-ppc.h, exceptions-ppc.c, tramp-ppc.c: Create function
4293         descriptors for helper functions directly in front of the code.
4294
4295 2008-12-11  Mark Probst  <mark.probst@gmail.com>
4296
4297         * method-to-ir.c: Removed an unnecessary assertion.
4298
4299 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
4300
4301         * method-to-ir.c: Merge SGEN changes from the old JIT.
4302
4303 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
4304
4305         * driver.c (compile_all_methods_thread_main): Handle failure of
4306         mono_get_method ().
4307
4308 2008-12-10  Mark Probst  <mark.probst@gmail.com>
4309
4310         * mini-ppc.c: Merged with mini-ppc64.c.
4311
4312         * mini-ppc.h: Define PPC_MINIMAL_PARAM_AREA_SIZE on all targets.
4313
4314         * Makefile.am: Use the same sources for PPC and PPC64.
4315
4316         * mini-ppc64.c: Removed.
4317
4318 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
4319
4320         * branch-opts.c (remove_block_if_useless): Extract fall through detection
4321         code to mono_bb_is_fall_through.
4322         
4323         * branch-opts.c (mono_remove_critical_edges): Same.
4324
4325 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
4326
4327         * ssa.c (fold_ins): branch opt can kill dummy switch ops so we can't
4328         expect that an OP_BR_REG will be there.
4329
4330 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
4331
4332         * branch-opts.c (remove_block_if_useless): Use MONO_IS_BRANCH_OP instead of checking
4333         for the many branch ops. The original check miss OP_BR_REG.
4334
4335         Fixes #457574.
4336         
4337 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
4338
4339         * mini-mips.h mini-mips.c exceptions-mips.c tramp-mips.c: first round of changes necessary to eventually support n32.
4340
4341 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
4342
4343         * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
4344         while holding the aot lock.
4345
4346 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
4347
4348         * mini-mips.c (mono_arch_output_basic_block): use mfc1/lwc1 instead of mfc1d/ldc1
4349         
4350 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
4351
4352         * mini.c (mini_cleanup) : Adding a call to cominterop_release_all_rcws 
4353           to release all runtime callable wrappers held by the runtime.
4354
4355         Contributed under MIT/X11 license.
4356
4357 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
4358
4359         * tramp-amd64.c (mono_arch_create_trampoline_code_full) : Increase the code size for
4360           for Winx64.
4361
4362         Contributed under MIT/X11 license.
4363
4364 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
4365
4366         * aot-runtime.c (decode_exception_debug_info): Acquire the domain
4367         lock when calling mono_domain_alloc (). Hopefully fixes #415608.
4368
4369 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
4370
4371         * cpu-mips.md: fix ckfinite length
4372
4373         * mini-mips.c: at least recognize n32 ABI when used (not yet supported)
4374         (mono_arch_lowering_pass): cleanup, rearrange for clarity
4375         (mono_arch_output_basic_block): implement OP_CKFINITE, add more asserts
4376         
4377 2008-12-08  Mark Mason   <mmason@upwardaccess.com>
4378
4379         * exceptions-mips.c (mono_arch_find_jit_info): init new_ctx with ctx, dont' call setup_context.
4380         
4381 2008-12-08  Geoff Norton  <gnorton@novell.com>
4382
4383         * tramp-amd64.c: r120895 stores RAX, so we need to increase the window
4384         size by 8 bytes as well.
4385
4386 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4387
4388         * basic-simd.cs: Fix method names for Vector16b.
4389         
4390 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4391
4392         * basic-simd.cs: Fix method names for Vector16sb.
4393
4394 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4395
4396         * basic-simd.cs: Fix method names for Vector8us.
4397         
4398 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4399
4400         * basic-simd.cs: Fix method names for Vector8s.
4401         
4402 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4403
4404         * basic-simd.cs: Fix method names for Vector4ui.
4405
4406 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4407
4408         * basic-simd.cs: Fix method names for Vector2l.
4409
4410 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4411
4412         * basic-simd.cs: Fix method names for Vector2d.
4413
4414 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4415
4416         * simd-intrinsics.c (mono_emit_simd_intrinsics): Add support for intrinsics
4417         that are extension methods.
4418
4419 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
4420
4421         * basic-simd.cs: Fix method names for Vector4f.
4422
4423 2008-12-08  Zoltan Varga  <vargaz@gmail.com>
4424
4425         * mini-exceptions.c (mono_print_thread_dump): Mark threadpool threads
4426         as such. Fixes #456669.
4427
4428 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
4429
4430         * mini-mips.c (mono_arch_emit_call): narrow float arguments when passing as args.
4431         
4432 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
4433
4434         * mini-mips.c (mono_arch_lowering_pass): don't handle OP_ICONV_TO_R* or OP_R*CONST
4435         (mono_arch_emit_setret): use OP_MIPS_CVTSD to return SP floats
4436         (mono_arch_output_basic_block): simplify FP load/store, handle OP_MIPS_FBLT_UN
4437         (mips_adjust_stackframe): handle FP spills
4438                 
4439         * mini-ops.h: add mips_mtc1_s2
4440         
4441         * cpu-mips.md: add mips_mtc1_s2
4442         
4443 2008-12-07  Zoltan Varga  <vargaz@gmail.com>
4444
4445         * unwind.c: New file, move the unwind info encoding functions here from
4446         aot-compiler.c, so they could be used at runtime too.
4447
4448 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
4449
4450         * mini-mips.c (mono_arch_lowering_pass): handle OP_IMUL_IMM as well
4451         (mono_arch_output_basic_block): fix OP_LOCALLOC code generation
4452         
4453 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
4454
4455         * mini-mips.c: cleanup warnings
4456         (mono_arch_lowering_pass): handle OP_LOCALLOC_IMM
4457         (mips_adjust_stackframe): handle case of taking the address of stack locals
4458         
4459 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
4460
4461         * aot-compiler.c: Implement a few functions missing from the asm writer.
4462         (emit_method_code): Only write symbols for methods when using the bin
4463         writer, since the assembler can't deal with the characters in our method
4464         names.
4465
4466         * aot-compiler.c (is_plt_patch): ICALL_ADDR is also a plt patch.
4467
4468         * method-to-ir.c (mono_method_to_ir): Transform aotconst+calli into a direct
4469         call.
4470
4471         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Rework the code
4472         a bit to also restore %rax.
4473
4474 2008-12-05  Mark Probst  <mark.probst@gmail.com>
4475
4476         * mini-ppc.c: Some simple merges from mini-ppc64.c.
4477
4478 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
4479
4480         * ssa.c (mono_ssa_compute): Only add an implicit reference at start for
4481         arguments.
4482
4483 2008-12-05  Mark Probst  <mark.probst@gmail.com>
4484
4485         * exceptions-ppc.c: Merged with exceptions-ppc64.c.
4486
4487         * mini-ppc.c, mini-ppc.h: Remove PPC_STACK_ALIGNMENT and use
4488         MONO_ARCH_FRAME_ALIGNMENT.  Struct for PPC64 function descriptors.
4489
4490         * exceptions-ppc64.c: Removed.
4491
4492         * Makefile.am: Use exceptions-ppc.c instead of exceptions-ppc64.c.
4493
4494 2008-12-05  Mark Probst  <mark.probst@gmail.com>
4495
4496         * tramp-ppc.c, mini-ppc.c, mini-ppc.h: Merged tramp-ppc.c with
4497         tramp-ppc64.c.
4498
4499         * Makefile.am: Use tramp-ppc.c instead of tramp-ppc64.c.
4500
4501         * tramp-ppc64.c: Removed.
4502
4503 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
4504
4505         * aot-compiler.c (add_generic_instances): Skip non-generic classes in
4506         the TYPESPEC table.
4507
4508 2008-12-05  Mark Probst  <mark.probst@gmail.com>
4509
4510         * mini-ppc.h: Merged mini-ppc64.h with mini-ppc.h.
4511
4512         * exceptions-ppc64.c, tramp-ppc64.c, mini-arch.h, Makefile.am: Use
4513         mini-ppc.h instead of mini-ppc64.h.
4514
4515         * mini-ppc64.h: Removed.
4516
4517 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
4518
4519         * mini-mips.c: introduce USE_LDC_SDC: use ldc1/sdc1 to load/store doubles, disabled by default
4520         
4521         * mini-mips.c (mono_arch_emit_outarg_vt): fix offset calculation for memcpy in structure passing.
4522         
4523 2008-12-05  Mark Probst  <mark.probst@gmail.com>
4524
4525         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c:
4526         Removed FIRST/LAST_[GF]REG macros, to make merging PPC64 with PPC
4527         code easier.
4528
4529 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
4530
4531         * basic-simd.cs: Tests for operator == and != on  Vector8us and Vector16b.
4532
4533 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
4534
4535         * simd-intrinsics.c: Add support for operator == and != to Vector8(u)s and Vector16(s)b.
4536
4537 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
4538
4539         * basic-simd.cs: Tests for operator == and != on Vector4f.
4540
4541 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
4542
4543         * simd-intrinsics.c (simd_intrinsic_emit_equality): Adapt to support Vector4f.
4544
4545         * simd-intrinsics.c: Kill useless enum.
4546
4547 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
4548
4549         * cpu-mips.md: add long_conv_to_ovf_i4_2
4550         * mini-mips.c: update/add various _OVF_ opcodes to fix test failures
4551
4552 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
4553
4554         * mini-mips.c: ifdef protect automatic promotions of R4 to R8.
4555         
4556         * mini-mips.c (mono_arch_emit_setret): handle R4 case with FCONV_TO_R4 instead of FMOVE
4557
4558 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
4559
4560         * mini-mips.c (mono_arch_output_basic_block): fix codegen for OP_OR_IMM/OP_IOR_IMM
4561         
4562 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
4563
4564         * basic-simd.cs: Add tests for new methods.
4565
4566 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
4567
4568         * simd-intrinsics.c: Add support for operator == and !=
4569         on Vector4(u)i.
4570
4571         * simd-methods.h: Add SN_op_Inequality and SN_op_Equality.
4572
4573 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
4574
4575         * simd-intrinsics.c: Remove ExtractByteMask intrinsics.
4576
4577 2008-12-04  Zoltan Varga  <vargaz@gmail.com>
4578
4579         * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
4580
4581         * mini.c (mono_resolve_patch_target): Allow pinvoke methods in 
4582         MONO_PATCH_INFO_ICALL_ADDR.
4583
4584         * aot-runtime.c (MonoAotFileInfo): Correct order of fields.
4585
4586         * aot-compiler.c: Resurrect full-aot support.
4587
4588 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
4589
4590         * mini-mips.c (mono_arch_lowering_pass): handle OP_COMPARE and OP_ICOMPARE
4591         
4592 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
4593
4594         * mini-mips.c (mono_arch_output_basic_block): fix OP_IREM_UN code generation
4595         
4596 2008-12-03  Rodrigo Kumpera  <rkumpera@novell.com>
4597
4598         * basic-simd.cs: Fix tests to work under ppc.
4599         Remove tests for methods that will be removed.
4600
4601 2008-12-03  Mark Probst  <mark.probst@gmail.com>
4602
4603         * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
4604         generic type (via a typedef or typeref) correctly.
4605
4606 2008-12-03  Zoltan Varga  <vargaz@gmail.com>
4607
4608         * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
4609         diagnose an assertion failure.
4610
4611 2008-12-02  Mark Probst  <mark.probst@gmail.com>
4612
4613         * tramp-ppc64.c (mono_arch_create_rgctx_lazy_fetch_trampoline):
4614         Fix trampoline size.
4615
4616         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: A few floating point
4617         conversion opcodes are implemented natively instead via emulation.
4618
4619 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
4620
4621         * cpu-mips.md: remove mips_xori
4622
4623         * mini-ops.h:  remove mips_xori
4624
4625         * mini-mips.h: replace OP_MIPS_XORI with OP_IXOR
4626
4627         * mini-mips.c (mono_arch_decompose_long_opts): Add ladd_imm, lsub, lsub_imm, lneg, lsub_ovf, lsub_ovf_un.
4628         
4629         * mini-mips.c (mono_arch_lowering_pass, mono_arch_output_basic_block): fix IXOR handling
4630         
4631 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
4632
4633         * cpu-mips.md: fix instruction lengths.
4634
4635         * mini-mips.h: define MONO_ARCH_NO_IOV_CHECK
4636
4637         * mini-mips.c: move most instruction rewriting into decompose_ops. Implement conditional branches and exceptions. Fix jump table patch handling. Implement add/sub OVF.
4638
4639         * mini-ops.h: fix slti / sltiu op profiles.
4640         
4641 2008-12-02  Martin Baulig  <martin@ximian.com>
4642
4643         * method-to-ir.c (mono_method_to_ir): Disable debugging
4644         information for the init locals block to make the debugger stop
4645         after all locals have been initalized.
4646
4647 2008-12-02  Martin Baulig  <martin@ximian.com>
4648
4649         * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
4650         running inside the debugger.
4651
4652 2008-12-01  Zoltan Varga  <vargaz@gmail.com>
4653
4654         * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
4655         is enabled.
4656
4657         * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the 
4658         alu->alu imm optimization which only shows if deadce is disabled.
4659
4660         * aot-compiler.c: Rename the function names for the binary and asm writers
4661         so they can coexist in the same process. Rework the xdebug code to use the
4662         asm writer. This avoids the need to call into the runtime to dump the
4663         debugging info. Add more debugging info for types.
4664
4665         * mini-<ARCH>.h: Kill MONO_ARCH_HAVE_NORMALIZE_OPCODES define.
4666
4667         * genmdesc.c genmdesc.pl mini.h: Don't put the CEE_ opcodes into the
4668         cpu description tables, they can't occur in cpu-<ARCH>.md.
4669
4670         * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
4671         the stack in CEE_LDFLDA. Fixes #450542.
4672
4673         * generics.cs: Add a new test.
4674
4675 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
4676
4677         * mini-ops.h: updated MIPS opcodes
4678         * mini-mips.c: decompose long opts
4679         * mini-mips.h: decompose long opts
4680         
4681 2008-11-29  Mark Mason   <mmason@upwardaccess.com>
4682
4683         * cpu-mips.md: fix length on int_rem_un
4684         * mini-mips.c (mips_stackframe_adjust): fix insertion of spillvars region in MIPS stackframes.
4685         
4686 2008-11-29  Zoltan Varga  <vargaz@gmail.com>
4687
4688         * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
4689
4690         * mini-codegen.c (mono_print_ins_index): Handle OP_VOIDCALL_MEMBASE.
4691
4692 2008-11-29  Martin Baulig  <martin@ximian.com>
4693
4694         * mini-exceptions.c (mono_handle_native_sigsegv): Check
4695         mono_debug_using_mono_debugger() in addition to the
4696         `no_gdb_backtrace' flag in the `MonoDebugOptions'.
4697
4698 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
4699
4700         * mini-ops.h: updated more MIPS opcodes
4701         * mini-mips.c: FP compare/branch working again, clean up last of CEE_ -> OP_ mappings
4702         * cpu-mips.md: Added MIPS versions of new FP compare/branch opcodes.
4703         
4704 2008-11-28  Mark Probst  <mark.probst@gmail.com>
4705
4706         * mini-ppc64.c: Patch the RGCTX fetch trampoline correctly.
4707
4708 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
4709
4710         * mini-mips.c (mono_arch_emit_call): adding missing conversion to fp single when passing in integer arg register.
4711         * mini-mips.c (mips_adjust_stackframe): compensate for spill-down logic.
4712         * mini-ops.h: correct selected mips opcode entries
4713         
4714 2008-11-28  Mark Probst  <mark.probst@gmail.com>
4715
4716         * mini-ppc64.c, mini-ppc64.h: Enable generalized IMT thunks and
4717         make them work.
4718
4719 2008-11-28  Mark Probst  <mark.probst@gmail.com>
4720
4721         * mini-ppc64.h, tramp-ppc64.c: Make generic code sharing work.
4722
4723 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
4724
4725         * method-to-ir.c, mini-trampolines.c: protect IMG code with #ifdef MONO_ARCH_HAVE_IMT to fix compile errors.
4726         * mini-mips.c: Fixup stackframe assignments after allocation of spillvars.
4727         * mini-mips.h: disable IMT
4728         * tramp-mips.c (mono_arch_get_vcall_slot): fix offset extraction
4729         
4730 2008-11-28  Mark Probst  <mark.probst@gmail.com>
4731
4732         * mini-ppc64.c, mini-ppc64.h: Don't emulate long ops.
4733
4734 2008-11-28  Mark Probst  <mark.probst@gmail.com>
4735
4736         * mini-ppc64.c, exceptions-ppc64.c: Several fixes.
4737
4738 2008-11-28  Zoltan Varga  <vargaz@gmail.com>
4739
4740         * method-to-ir.c (handle_isinst): Use PCONST instead of ICONST for
4741         consistency.
4742
4743 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
4744
4745         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
4746         for Set/GetVector aligned versions.
4747
4748 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
4749
4750         * basic-simd.cs: Add tests for Get/SetVector.
4751
4752 2008-11-27  Mark Probst  <mark.probst@gmail.com>
4753
4754         * mini.c: Removed g_slist_append_mempool().  Now in
4755         metadata/mempool.c.
4756
4757 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
4758
4759         * simd-intrinsics.c (mono_emit_vector_ldelema): Extract the element
4760         size properly and make the bounds check optional.
4761
4762         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
4763         for SetVector and IsAligned.
4764
4765 2008-11-27  Zoltan Varga  <vargaz@gmail.com>
4766
4767         * mini.c: Remove unused mono_normalize_opcodes () function.
4768
4769 2008-11-26  Mark Probst  <mark.probst@gmail.com>
4770
4771         * method-to-ir.c (mini_emit_inst_for_method): Small fix: we're
4772         using the new atomic add ops now.
4773
4774         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Implemented atomic
4775         add.
4776
4777 2008-11-26  Mark Probst  <mark.probst@gmail.com>
4778
4779         * mini-ppc64.c: Several fixes.
4780
4781 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
4782
4783         * cpu-mips.md: added jump_table
4784         * mini-mips.c: added jump_table. Eliminate compare-imm when lowering. Remove dead function.             
4785
4786 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
4787
4788         * mini-mips.c, mini-mips.h, tramp-mips.c, cpu-mips.md: Initial upgrade of MIPS port to new IR.
4789
4790 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
4791
4792         * mini-ops.h: corrected a handful of MIPS opcodes.
4793
4794 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
4795
4796         * aot-compiler.c: MIPS to use ELF writer
4797
4798 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
4799
4800         * mini-codegen.c: remove MIPS specific assert.
4801
4802 2008-11-25  Mark Probst  <mark.probst@gmail.com>
4803
4804         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Several
4805         fixes.  PPC64 now passes most of the runtime regressions.
4806
4807 2008-11-24  Zoltan Varga  <vargaz@gmail.com>
4808
4809         * regalloc2.c: Distinguish between use/def positions. Optimize the creation of
4810         volatile intervals a bit.
4811
4812 2008-11-24  Mark Probst  <mark.probst@gmail.com>
4813
4814         * basic-long.cs: New test case.
4815
4816 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
4817
4818         * mini.c (mini_method_compile): Disable globalra for large methods for 
4819         now.
4820
4821         * regalloc2.c (order_moves): Add fp support.
4822
4823         * branch-opts.c (mono_remove_critical_edges): Split non-critical edges whose
4824         source bblock ends with an OP_BR_REG.
4825
4826         * ratests.cs: Add a new test.
4827
4828 2008-11-23  Mark Probst  <mark.probst@gmail.com>
4829
4830         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c: Disable generic code
4831         sharing.  PPC64 now passes generics.exe.
4832
4833 2008-11-23  Mark Probst  <mark.probst@gmail.com>
4834
4835         * mini-ppc64.c: Several fixes.  PPC64 now runs iltests.exe.
4836
4837 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
4838
4839         * exceptions-x86.c (mono_arch_find_jit_info): Avoid reading uninitialized
4840         memory when mono_jit_info_table_find () can't find the method in the
4841         LMF case.
4842
4843         * aot-compiler.c (mono_save_xdebug_info): Emit complete debug info for
4844         AOTed code too.
4845         
4846         * aot-compiler.c (mono_save_xdebug_info): Make this work with the assembly
4847         writer too.
4848
4849 2008-11-23  Mark Probst  <mark.probst@gmail.com>
4850
4851         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, cpu-ppc64.md:
4852         Several fixes.  PPC64 now runs exceptions.exe and
4853         devirtualization.exe.
4854
4855 2008-11-22  Mark Probst  <mark.probst@gmail.com>
4856
4857         * mini-ppc64.c, tramp-ppc64.c: Small fixes.  PPC64 now runs
4858         arrays.exe and basic-math.exe.
4859
4860 2008-11-22  Mark Probst  <mark.probst@gmail.com>
4861
4862         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c,
4863         cpu-ppc64.md: Several fixes.  PPC64 now runs objects.exe.
4864
4865 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
4866
4867         * simd-intrinsics.c: Add support ArrayExtension intrinsics.
4868
4869 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
4870
4871         * method-to-ir.c: Move bounds checking macros to ir-emit.h
4872
4873         * ir-emit.h: Move macros from method-to-ir.c to here.
4874
4875 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
4876
4877         * mini-ops.h: Correct the long simd ops to use LREG.
4878
4879 2008-11-21  Zoltan Varga  <vargaz@gmail.com>
4880
4881         * mini-ops.h: Correct the dreg type of OP_LOADI8_MEMBASE.
4882         
4883         * mini-ops.h: Correct the dreg type of a few long opcodes.
4884
4885         * mini-amd64.h: Applied patch from Mihai Chelaru <kefren@ngnetworks.ro>.
4886         Add netbsd support.
4887
4888 Fri Nov 21 12:52:23 CET 2008 Paolo Molaro <lupus@ximian.com>
4889
4890         * mini-ppc.c: remove negative stack references in epilog
4891         for platforms that don't support the red zone.
4892
4893 2008-11-21  Mark Probst  <mark.probst@gmail.com>
4894
4895         * mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved floating
4896         point regs.  Now PPC64 passes basic-calls.exe.
4897
4898 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4899
4900         * basic-simd.cs: Add tests for accessors of Vector2l.
4901
4902 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4903
4904         * mini-ops.h: Added OP_INSERTX_I8_SLOW,.
4905
4906         * mini-x86.c (mono_arch_decompose_long_opts): Decompose OP_INSERTX_I8_SLOW.
4907         
4908         * simd-intrinsics.c: Add support for Vector2l and Vector2ul.
4909
4910 2008-11-21  Mark Probst  <mark.probst@gmail.com>
4911
4912         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes.  Now
4913         PPC64 passes basic-long.exe.
4914
4915 2008-11-20  Mark Probst  <mark.probst@gmail.com>
4916
4917         * decompose.c: Decompose carry and overflow add on PPC64 like on
4918         other 64 bit archs.  Don't decompose sub at all on PPC64.
4919
4920         * mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c, cpu-ppc64.md:
4921         Several fixes and new opcodes.  Now PPC64 runs (but doesn't pass)
4922         basic-long.exe.
4923
4924 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4925
4926         * basic-simd.cs: Add tests for accessors of Vector2d.
4927
4928 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4929
4930         * mini-ops.h: Added OP_INSERTX_R8_SLOW,.
4931
4932         * cpu-x86.md: Same.
4933
4934         * mini-x86.c (mono_arch_output_basic_block): Same.
4935         
4936         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector2d.
4937
4938 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4939
4940         * basic-simd.cs: Add tests for accessors of Vector4f.
4941
4942 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4943
4944         * mini-ops.h: Added OP_INSERTX_R4_SLOW,.
4945
4946         * cpu-x86.md: Same.
4947
4948         * mini-x86.c (mono_arch_output_basic_block): Same.
4949         
4950         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4f.
4951
4952 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4953
4954         * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
4955
4956 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4957
4958         * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
4959
4960         * cpu-x86.md: Same.
4961
4962         * mini-x86.c (mono_arch_output_basic_block): Same.
4963         
4964         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
4965
4966 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4967
4968         * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
4969
4970 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4971
4972         * simd-intrinsics.c: Enable setters for Vector16sb.
4973
4974 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
4975
4976         * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
4977
4978         * cpu-x86.md: Same.
4979
4980         * mini-x86.c (mono_arch_output_basic_block): Same.
4981         
4982         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
4983
4984 2008-11-19  Rodrigo Kumpera  <rkumpera@novell.com>
4985
4986         * simd-intrinsics.c: Implement setter for Vector8us.
4987
4988 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
4989
4990         * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
4991         for dead variables.
4992
4993 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
4994
4995         * mini-ppc.c: remove references to the red zone in the prolog
4996         (for systems that don't support it).
4997
4998 2008-11-19  Mark Probst  <mark.probst@gmail.com>
4999
5000         * cpu-ppc64.md: Fixed a few instruction lengths.
5001
5002         * mini-ppc64.c: Don't emit SETLRET.  PPC64 passes basic-float.exe,
5003         now.
5004
5005 2008-11-19  Mark Probst  <mark.probst@gmail.com>
5006
5007         * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes.  PPC64 passes
5008         basic.exe now.
5009
5010 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
5011
5012         * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
5013
5014 2008-11-18  Rodrigo Kumpera  <rkumpera@novell.com>
5015
5016         * mini-ops.h: Added OP_INSERT_I2.
5017
5018         * cpu-x86.md: Same.
5019
5020         * mini-x86.c (mono_arch_output_basic_block): Same.
5021         
5022         * simd-intrinsics.c: Implement setter for Vector8s.
5023
5024         * simd-methods.h: Add the names of get setters of Vector8s.
5025
5026 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
5027
5028         * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
5029         
5030         * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
5031         parameters.
5032
5033         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
5034
5035 2008-11-18  Mark Probst  <mark.probst@gmail.com>
5036
5037         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
5038         for PPC64.  An empty program runs now.
5039
5040 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
5041
5042         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
5043
5044         * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
5045         a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
5046         info for JITted code is emitted into a shared library, loadable into gdb.
5047
5048 2008-11-18  Mark Probst  <mark.probst@gmail.com>
5049
5050         * Makefile.am: Changes to build PPC64.
5051
5052         * mini-arch.h: Include mini-ppc64.h on PPC64.
5053
5054 2008-11-18  Mark Probst  <mark.probst@gmail.com>
5055
5056         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
5057         in PPC code up to r119147.
5058
5059 2008-11-18  Mark Probst  <mark.probst@gmail.com>
5060
5061         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
5062         cpu-ppc64.md: Changes for PPC64.
5063
5064         Based on code submitted by andreas.faerber@web.de at
5065         https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
5066         X11/MIT license.
5067
5068 2008-11-18  Mark Probst  <mark.probst@gmail.com>
5069
5070         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
5071         cpu-ppc64.md: Copied from the corresponding PPC files from
5072         r118846.
5073
5074 2008-11-18  Scott Peterson  <lunchtimemama@novell.com>
5075
5076         * mini-ops.h: Added OP_ROUND.
5077
5078         * cpu-x86.md: Added round.
5079
5080         * mini-x86.c: Added support for intrinsicing Math.Round (double).
5081
5082         * basic-math.cs: Added test_0_round to test rounding.
5083
5084         Contributed under MIT/X11 license.
5085
5086 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
5087
5088         * aot-compiler.c : Fix the Winx64 build.
5089
5090         Contributed under MIT/X11 license.
5091
5092 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
5093
5094         * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
5095         in OP_EXTRACT_R8 to avoid possible stack corruption.
5096
5097 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
5098
5099         * mini-ops.h: Added OP_EXTRACT_R8/I8.
5100
5101         * cpu-x86.md: Added extract_r8.
5102
5103         * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
5104         
5105         * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
5106         a couple of OP_EXTRACT_I4.
5107
5108         * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
5109
5110         * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
5111
5112 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
5113
5114         * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
5115         and not 4.1. 
5116
5117 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
5118
5119         * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
5120         trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
5121
5122         * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
5123         are not needed any more.
5124
5125         * mini.h: Remove the unused INS_LIST macros.
5126
5127         * mini.c (mini_method_compile): Remove a disable globalra case which is no
5128         longer needed.
5129
5130         * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
5131         ir-emit.h.
5132
5133         * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
5134         mono_alloc_ireg () instead.
5135
5136         * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
5137         macros.
5138
5139         * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
5140         on amd64.
5141
5142         * aot-runtime.c (load_aot_module): Disable AOT when running under
5143         CAS.
5144
5145         * mini-amd64.h: Change the monitor fastpath defines to check for
5146         !PLATFORM_WIN32 so they work on *bsd too.
5147
5148         * mini.h mini.c mini-hhpa.c: Remove more unused code.
5149
5150         * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
5151
5152         * mini.h (MonoCompile): Remove new_ir flag.
5153
5154         * regalloc.h regalloc.c: Remove unused code.
5155
5156         * cpu-*.md: Remove more unused opcodes.
5157
5158         * simple-cee-ops.h simple-mini-ops.h: Removed.
5159
5160         * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
5161         
5162 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
5163
5164         * aliasing.h: Removed.
5165
5166         * *.c: Remove references to aliasing.h and inssel.h.
5167
5168         * mini.c: Remove additional unused functions.
5169
5170         * mini-ops.h cpu-*.md: Remove unused opcodes.
5171
5172 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
5173
5174         Remove the old JIT code.
5175
5176         * inssel*.brg: Removed.
5177
5178         * ssa.c abcremoval.c aliasing.c: Removed.
5179
5180         * ssa2.c: Renamed to ssa.c.
5181
5182         * abcremoval2.c: Renamed to abcremoval.c.
5183
5184         * *.c: Removed all !cfg->new_ir code.
5185
5186         * mini-<ARCH>.c: Removed mono_arch_call_opcode (), 
5187         mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
5188
5189         * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
5190         
5191 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
5192
5193         * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
5194         to simplify the code and cut back on the number of global symbols in the AOT
5195         file.
5196         
5197         * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
5198
5199 2008-11-15  Zoltan Varga  <vargaz@gmail.com>
5200
5201         * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
5202         with the got/got_info tables.
5203
5204         * mini.h: Bump AOT file format version.
5205         
5206         * unwind.h: New file, contains definitions for stack unwinding.
5207
5208         * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
5209         to cfg->unwind_ops.
5210         
5211         * aot-compiler.c: Generalize the emitting of unwind information to use the
5212         information in cfg->unwind_ops.
5213
5214         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
5215
5216         * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
5217         AOT method frames. Enable writing symbols for methods by default.
5218
5219 2008-11-14  Rodrigo Kumpera  <rkumpera@novell.com>
5220
5221         * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
5222         and make it work with vectors of element sizes 1, 2 and 4.
5223
5224         * simd-intrinsics.c: Enable getter for all vectors with element size
5225         1, 2 or 4.
5226
5227         * simd-methods.h: Add the names of other getters.
5228
5229         * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
5230
5231         * cpu-x86.md: Same.
5232
5233         * mini-x86.c: Same.
5234
5235 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
5236
5237         * mini-ppc.h: portability fix.
5238
5239 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
5240
5241         * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
5242         buggy and will overwrite it.
5243
5244 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
5245
5246         * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
5247         Use it to emit local symbols for all methods so AOTed methods show up with
5248         their full name in gdb/valgrind output.
5249
5250 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
5251
5252         * mini-ppc.c: portability fixes.
5253
5254 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
5255
5256         * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
5257         entries out of the if (!generic_shared...) code so it is always done.
5258         (mono_class_init_trampoline): Do the patching when running under valgrind
5259         too, newer versions of valgrind have no problems with it.
5260
5261 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
5262
5263         * aot-compiler.c (emit_writeout): Rework this to make it easier to add
5264         further sections.
5265
5266 2008-11-13  Mark Probst  <mark.probst@gmail.com>
5267
5268         * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
5269         filters.
5270
5271 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
5272
5273         * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui. 
5274
5275 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
5276
5277         * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
5278
5279         * cpu-x86.md: Same.
5280
5281         * mini-x86.c: Same.
5282
5283         * simd-intrinsics.c: Same.
5284
5285 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
5286
5287         * simd-intrinsics.c: Enable constructor intrinsics for all types.
5288
5289 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
5290
5291         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
5292         to work with more Vector types.
5293
5294 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
5295
5296         * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
5297         store the elemens directly instead of using and intermediate.
5298
5299 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
5300
5301         * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
5302
5303         * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
5304         to preserve %eax for aot plt trampolines.
5305
5306         * aot-compiler.c (compile_method): Don't skip synchronized methods.
5307         (encode_method_ref): Flag synchronized methods so they won't go through
5308         the AOT trampoline.
5309
5310         * aot-compiler.c: Additional work to support AOTing synchronized methods/
5311         wrappers.
5312
5313         * cpu-ia64.md (jmp): Increase max length.
5314
5315 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
5316
5317         * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
5318         open generic classes.
5319
5320         * aot-compiler.c: Enable the ELF writer on ELF platforms.
5321
5322         * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
5323         box+brtrue optimization since it causes test failures on x86.
5324
5325 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
5326
5327         * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
5328
5329         * cpu-x86.md: Same.
5330
5331         * mini-x86.c: Same.
5332
5333         * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
5334         for simd ctor values. 
5335
5336         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
5337         instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
5338
5339 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
5340
5341         * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
5342         LogicalRightShift.
5343
5344         * simd-instrincs.c: Same.
5345
5346         * basic-simd.cs: Same.
5347
5348 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
5349
5350         * ratests.cs: Add more tests.
5351
5352         * regalloc2.c (add_spill_code): Handle more corner cases.
5353
5354 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
5355
5356         * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
5357         (update_liveness): Avoid holes in the liveness ranges of hregs if they are
5358         both the source an destination of an instruction.
5359
5360 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
5361
5362         * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
5363         wapihandles.c: more portability changes.
5364
5365 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
5366
5367         * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
5368         * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
5369         safe to execute in a signal handler and the kernel provides better
5370         the info in /proc/self/smaps. Avoid the assert on sigaction during
5371         cleanup.
5372
5373 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
5374
5375         * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
5376         do the bblock linking hack if it is actually needed.
5377
5378         * Makefile.am (patch-libtool): New helper target to patch libtool to speed
5379         up linking.
5380
5381         * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
5382         crash problem is fixed.
5383
5384         * branch-opts.c (mono_remove_critical_edges): Link up newly added
5385         bblocks.
5386
5387         * mini.c (mini_method_compile): Compute unreachable bblocks properly even
5388         for catch clauses.
5389         (mini_method_compile): Set the starting value of next_vreg to 
5390         MAX_IREGS + MAX_FREGS when using globalra.
5391
5392         * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
5393         filter clauses with BB_EXCEPTION_HANDLER.
5394
5395         * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
5396
5397 2008-11-10  Mark Probst  <mark.probst@gmail.com>
5398
5399         * mini-x86.c (mono_arch_get_argument_info): Don't align argument
5400         space for stdcall.  Fixes regressions on Win32.
5401
5402 2008-11-10  Zoltan Varga  <vargaz@gmail.com>
5403
5404         * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
5405         bblocks.
5406         (linear_scan): Remove an assert which doesn't seem to be needed.
5407
5408         * local-propagation.c (mono_local_deadce): Avoid a call to
5409         MONO_DELETE_INS which would screw up the instruction linking.
5410
5411         * mini.c (mono_decompose_op_imm): Make this work with globalra.
5412
5413         * regalloc2.c: Upgrade to work the current JIT code.
5414
5415 2008-11-09  Zoltan Varga  <vargaz@gmail.com>
5416
5417         * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
5418         case.
5419
5420         * aot-runtime.c: Remove some dead code.
5421
5422         * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
5423         consistency.
5424         (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
5425
5426         * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
5427         trampolines using sscanf since atoi doesn't work on large unsigned values.
5428
5429         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): 
5430         Initialize code_size.
5431
5432 2008-11-08  Mark Probst  <mark.probst@gmail.com>
5433
5434         * method-to-ir.c (mini_emit_inst_for_method): Make
5435         Interlocked.CompareExchange work for Int arguments on 32 bit
5436         archs, as well.
5437
5438 2008-11-07  Mark Probst  <mark.probst@gmail.com>
5439
5440         * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
5441
5442 2008-11-06  Bill Holmes  <billholmes54@gmail.com>
5443
5444         * main.c Fix MSVC build.
5445
5446         Contributed under MIT/X11 license.
5447
5448 2008-11-06  Mark Probst  <mark.probst@gmail.com>
5449
5450         * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
5451         alignment larger than 8 bytes are aligned correctly, too.
5452
5453         * mini.c: Honor the min_align field of MonoClass when laying out
5454         the stack.
5455
5456 2008-11-06  Zoltan Varga  <vargaz@gmail.com>
5457
5458         * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
5459
5460         * aot-compiler.c (emit_plt): Fix a warning.
5461         
5462         * aot-compiler.c: Implement ARM support in the binary writer.
5463
5464 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
5465
5466         * basic-simd.cs: Add test for getter with byref arg.
5467         Fix the naming of a few tests.
5468         Add missing checks to a test.
5469
5470 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
5471
5472         * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
5473
5474         * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
5475         most of the full-aot support for monitor enter/exit trampolines.
5476
5477         * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
5478         enter/exit trampoline creation functions.
5479
5480         * Makefile.am: Fix the generation of buildver.h so it is not invoked during
5481         make dist.
5482
5483 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
5484
5485         * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
5486         incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
5487         implement the needed functionality without adding crap to the runtime.
5488
5489 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
5490
5491         * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
5492         non-x86 builds.
5493
5494         * mini.c (mono_build_date): New global version holding the build date in
5495         string format.
5496         
5497         * Makefile.am (buildver.c): Generate a file containing the build date.
5498
5499         * main.c: Set the build date from the generated file.
5500
5501         * mini.c (mono_get_runtime_build_info): New helper function returning build
5502         information in a string format.
5503         
5504         * driver.c (mono_main): Print the build date in --version.
5505
5506         * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
5507         file when the bind-to-runtime-version option is used.
5508
5509 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
5510
5511         * simd-intrinsics.c: Fix bug when using getters and byref args. 
5512
5513 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
5514
5515         * simd-methods.h: Rename prefetch methods.
5516
5517         * simd-intrinsics.c: Same.      
5518
5519 2008-11-05  Mark Probst  <mark.probst@gmail.com>
5520
5521         * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
5522         sizes.
5523
5524 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
5525
5526         * aot-compiler.c: Use the bundled elf header files instead of depending on
5527         the system one.
5528         
5529         * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
5530         mempool.
5531
5532         * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
5533         on every call.
5534
5535 2008-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
5536
5537         * cpu-x86.md: Add store nta ops.
5538
5539         * mini-ops.h: Same.
5540
5541         * mini-x86.c: Same.
5542
5543         * mini.h: Add an enum for simd prefetch modes.
5544
5545         * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
5546         of store. Use the changed code to support store nta.
5547
5548         * simd-intrinsics.c: Add prefetch ops for all vector types.
5549
5550 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
5551
5552         * aot-compiler.c: Add an option for JIT compiling the methods by multiple 
5553         threads.
5554         
5555         * aot-compiler.c: Use statically allocated buffers for constructing symbol 
5556         names.
5557
5558         * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
5559         trampolines.
5560
5561 2008-11-04  Mark Probst  <mark.probst@gmail.com>
5562
5563         * mini-x86.c: Fixed commit.
5564
5565 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
5566
5567         * aot-compiler.c (emit_plt): Align the plt section only on x86.
5568
5569 2008-11-04  Mark Probst  <mark.probst@gmail.com>
5570
5571         * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
5572         and MONITOR_EXIT, for the ASM fastpaths.
5573
5574         * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
5575         available.
5576
5577         * mini.c, patch-info.h: Signature and patch infos for
5578         Monitor.Enter/Exit trampolines.
5579
5580         * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
5581
5582         * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
5583         Monitor.Enter/Exit ASM fastpath for Linux.
5584
5585 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
5586
5587         * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
5588
5589         * objects.cs: Add a new test.
5590         
5591         * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
5592
5593         * aot-runtime.c (load_method): Run class initialization in the PLT case even
5594         if MONO_LOG_LEVEL is set.
5595
5596         * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
5597
5598         * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
5599
5600         * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
5601         
5602         * aot-compiler.c: Change the relocation code to use virtual addresses instead
5603         of file offsets. Align the sections belonging to the data segment to 
5604         PAGESIZE.
5605
5606 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
5607
5608         * aot-compiler.c: Simplify the elf writer by depending on the definitions in
5609         elf.h. Port it to amd64.
5610
5611 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
5612
5613         * driver.c: Enable SIMD by default.
5614
5615 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
5616
5617         * cpu-x86.md: Add prefetch op.
5618
5619         * mini-ops.h: Same.
5620
5621         * mini-x86.c: Same.
5622
5623         * mini.h: Add an enum for simd prefetch modes.
5624
5625         * simd-methods.h: Add prefetch function names.
5626
5627         * simd-intrinsics.c: Add prefetch ops for all vector types.
5628
5629 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
5630
5631         * aot-compiler.c (emit_bytes): Speed this up a little.
5632
5633 2008-11-02  Zoltan Varga  <vargaz@gmail.com>
5634
5635         * aot-compiler.c: Add JIT time etc. statistics.
5636         
5637         * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
5638
5639         * mini.h (MonoCompile): Add 'got_offset' field.
5640
5641         * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
5642         method_got_offsets array.
5643
5644         * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
5645         wrappers.
5646
5647         * aot-compiler.c (compile_method): Add generic method instances referenced
5648         by the method to the list of methods to be compiled, this is required so if
5649         A<T> references B<T>, and another assembly references A<int>, then it will
5650         also get a copy of B<int>.
5651
5652         * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
5653         when checking for monitor enter/exit.
5654
5655 2008-10-30  Mark Probst  <mark.probst@gmail.com>
5656
5657         * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
5658         for Monitor.Enter and Monitor.Exit if enabled.
5659
5660         * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
5661         Solaris.
5662
5663 2008-10-30  Zoltan Varga  <vargaz@gmail.com>
5664
5665         * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
5666         of an OP_MOVE. Fixes #440046.
5667
5668         * basic-long.cs: Add a new test.
5669
5670 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
5671
5672         * mini.h: Add synchronization note for the managed counter-part.
5673
5674         * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
5675         returns the simd caps of the current cpu.
5676
5677 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
5678
5679         * basic-simd.cs: Remove Console.WriteLine.
5680
5681 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
5682
5683         * basic-simd.cs: New tests for Vector2ul.
5684
5685 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
5686
5687         * simd-intrinsics.c: Add new vector type Vector2ul.
5688
5689 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
5690
5691         * basic-simd.cs: New tests for Vector2l.
5692
5693 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
5694
5695         * cpu-x86.md: Add long version of most packed int ops.
5696
5697         * mini-ops.h: Same.
5698
5699         * mini-x86.h: Same.
5700
5701         * simd-intrinsics.c: Add new vector type Vector2l.
5702
5703 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
5704
5705         * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
5706
5707         * simd-methods.h: Remove SN_op_BitwiseXor.
5708
5709 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
5710
5711         * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
5712         alignment.
5713
5714 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
5715
5716         * basic-simd.cs: Test for Vector2d.
5717
5718         * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
5719         value.
5720
5721 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
5722
5723         * cpu-x86.md: Add double version of all packed float ops.
5724
5725         * mini-ops.h: Same.
5726
5727         * mini-x86.h: Same.
5728
5729         * simd-intrinsics.c: Add new vector type Vector2d.
5730
5731         * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
5732
5733         * simd-methods.h: Add Duplicate.
5734
5735 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
5736
5737         * basic-simd.cs: Test for packing with signed saturation.
5738
5739 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
5740
5741         * aot-compiler.c (add_generic_instances): Add all methods of generic instances
5742         found in the TYPESPEC table.
5743
5744 2008-10-26  Zoltan Varga  <vargaz@gmail.com>
5745
5746         * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
5747         too.
5748
5749         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
5750
5751         * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
5752         instead of the RVA, since the RVA can be changed by tools like the cil 
5753         stripper.
5754
5755         * method-to-ir.c (mono_method_to_ir2): Ditto.
5756
5757         * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
5758         (deserialize_variable): Ditto.
5759
5760 2008-10-25  Martin Baulig  <martin@ximian.com>
5761
5762         * debug-mini.c (write_variable): Use
5763         `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
5764
5765 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
5766
5767         * cpu-x86.md: Add unsigned variants of packd and packw.
5768
5769         * mini-ops.h: Same.
5770
5771         * mini-x86.h: Emit the right instruction for packd and packw.
5772         Add unsigned variants of packd and packw.
5773
5774         * simd-intrinsics.c: Packd and packw were used in place of their
5775         unsigned variants. Change that.
5776         Add intrinsics for (Signed)PackWithSignedSaturation.
5777
5778         * simd-methods.h: Add (Signed)PackWithSignedSaturation.
5779
5780 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
5781
5782         * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
5783
5784 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
5785
5786         * mini-ops.h: Remove dword packed add/sub with saturation ops.
5787
5788         * cpu-x86.md: Remove dword packed add/sub with saturation ops.
5789
5790         * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
5791         sse instructions.
5792
5793         * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
5794
5795 2008-10-24  Mark Probst  <mark.probst@gmail.com>
5796
5797         * method-to-ir.c, mini.c: Special casing for the synchronized
5798         wrapper for the ldtoken+GetTypeFromHandle case.
5799
5800 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
5801
5802         * mini.c (mono_replace_ins): Move this to branch-opts.c.
5803
5804         * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
5805         created/split bblocks.
5806
5807 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
5808
5809         * mini-ops.h: Add packed signed mul high.
5810         
5811         * cpu-x86.md: Same.
5812
5813         * mini-x86.c (mono_arch_output_basic_block): Same.
5814
5815         * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
5816
5817         * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
5818
5819 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
5820
5821         * basic-simd.cs: Tests for Vector16sb.
5822
5823 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
5824
5825         * inssel.brg (stmt): Fix OP_HARD_NOP rule.
5826
5827 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
5828
5829         * mini-ops.h: Add packed signed min, max and compare greater.
5830         
5831         * cpu-x86.md: Same.
5832
5833         * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
5834         saturation.
5835
5836         * simd-methods.h: Add CompareGreaterThan.
5837
5838         * simd-methods.h: Remove CompareEquals.
5839
5840         * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
5841
5842         * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
5843
5844         * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
5845         CompareEqual.
5846
5847 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
5848
5849         * basic-simd.cs: Fix tests due to change in the API.
5850
5851 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
5852
5853         * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
5854
5855 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
5856
5857         * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
5858
5859         * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
5860         inst_offset as this has invalid values for LDADDR.
5861
5862 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
5863
5864         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
5865
5866         * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
5867
5868 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
5869
5870         * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
5871         for accessing field->data.
5872
5873 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
5874
5875         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
5876
5877 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
5878
5879         * simd-methods.h: Add SignedPackWithUnsignedSaturation.
5880
5881         * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
5882
5883 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
5884
5885         * dominators.c (mono_compute_natural_loops): Allocate GList enties
5886         from the cfg mempool.
5887
5888 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
5889
5890         * basic-simd.cs: Tests for new methods in Vector8us.
5891
5892 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
5893
5894         * mini-ops.h: Add multiply and store high.
5895         
5896         * cpu-x86.md: Same.
5897
5898         * mini-x86.c (mono_arch_output_basic_block): Same.
5899
5900         * simd-methods.h: Same.
5901
5902         * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
5903         and CompareEqual.
5904
5905 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
5906
5907         * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
5908         mono_class_setup_vtable ().
5909
5910         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
5911         mono_class_get_vtable_entry () for accessing klass->vtable.
5912
5913         * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
5914
5915         * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
5916         found.
5917
5918         * method-to-ir.c (mono_save_token_info): Don't save references made from
5919         wrappers.
5920
5921         * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
5922         of generic instances.
5923
5924         * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
5925
5926 2008-10-19  Mark Probst  <mark.probst@gmail.com>
5927
5928         * cpu-ppc.md, mini-ppc.c: The length of the code generated for
5929         OP_JMP depends on the method signature.  Calculate it properly.
5930
5931 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
5932         
5933         * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
5934         called directly.
5935
5936         * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
5937         instances.
5938         (emit_extra_methods): Add another table mapping method indexes to 
5939         offsets in the extra_method_info table.
5940
5941         * mini.h: Bump AOT file format version.
5942         
5943         * aot-runtime.c: Merge most of the code from mono_aot_get_method
5944         and mono_aot_get_method_from_token () into one function.
5945
5946 2008-10-19  Mark Probst  <mark.probst@gmail.com>
5947
5948         * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
5949         separate counter.
5950
5951 2008-10-18  Zoltan Varga  <vargaz@gmail.com>
5952
5953         * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
5954         methods.
5955
5956         * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
5957         disable_aot.
5958
5959         * mini.c (mono_patch_info_equal): Compare the generic context as well.
5960
5961         * mini.h: Bump aot file format version.
5962
5963         * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
5964         AOT file can contain native code for methods which are not in the METHOD
5965         table. Generate code for non-sharable generic instances of generic methods
5966         found in the METHODSPEC table.
5967         
5968         * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
5969         encoding generic type handles.
5970
5971         * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
5972         (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
5973
5974         * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
5975         macros + MONO_ADD_INS.
5976
5977         * mini.c (mono_jump_info_token_new2): New function which takes a generic
5978         context as well.
5979
5980         * mini.h (MonoJumpInfoToken): Include fields for a generic context.
5981
5982         * mini.h: Bump aot file format version.
5983
5984         * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
5985
5986 2008-10-17  Mark Probst  <mark.probst@gmail.com>
5987
5988         * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
5989         platforms, with definable stack alignment value.  Set to 16 now
5990         for all platforms.
5991
5992         * mini.c, mini.h, driver.c: Command line option for disabling
5993         stack alignment.
5994
5995 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
5996
5997         * basic-simd.cs: Tests for new methods in Vector4ui.
5998
5999 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
6000
6001         * mini-ops.h: Add packed int shuffle.
6002         
6003         * cpu-x86.md: Same.
6004
6005         * mini-x86.c (mono_arch_output_basic_block): Same.
6006
6007         * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
6008         extract mask, max, min, shuffle.
6009
6010         * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
6011
6012 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
6013
6014         * basic-simd.cs: Tests for new methods in Vector8us.
6015
6016 2008-10-17  Mark Probst  <mark.probst@gmail.com>
6017
6018         * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
6019         RuntimeTypeHandle, not a TypedReference.
6020
6021 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
6022
6023         * simd-intrinsics.c: remove relocations.
6024
6025 2008-10-17  Zoltan Varga  <vargaz@gmail.com>
6026
6027         * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM 
6028         optimizations from the x86 backend.
6029
6030 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
6031
6032         * simd-methods.h, simd-intrinsics.c: debloat method names and
6033         prepare for no relocations.
6034
6035 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
6036
6037         * mini-ops.h: Add packed min/equal and sum of absolute differences.
6038         
6039         * cpu-x86.md: Same.
6040
6041         * mini-x86.c (mono_arch_output_basic_block): Same.
6042
6043         * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
6044         extract mask, max, min and sum of absolute differences.
6045
6046         * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
6047         method name.
6048
6049 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
6050
6051         * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
6052         Renamed one test for consistency.
6053
6054 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
6055
6056         * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
6057         fix to the code that deal with other blocks.
6058
6059 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
6060
6061         * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
6062
6063 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
6064
6065         * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
6066         that deals with vreg interference. Explicitly check for OP_LDADDR to be
6067         able to process the source reg.
6068
6069 2008-10-16  Martin Baulig  <martin@ximian.com>
6070
6071         * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
6072
6073         * inssel.brg: Add `OP_HARD_NOP'.
6074
6075         * mini.h (MonoCompile): Added `keep_cil_nops' flag.
6076
6077         * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
6078         `OP_HARD_NOP' instruction when running inside the debugger.
6079
6080         * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
6081         `OP_HARD_NOP' instruction when running inside the debugger.
6082
6083 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
6084
6085         * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
6086         now works. The issue with the regalloc tripping up no longer
6087         happens.
6088
6089         * simd-intrinsics.c (load_simd_vreg): Same.
6090
6091 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
6092         
6093         * basic-simd.cs: Tests for new Vector8ui methods.
6094
6095 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
6096
6097         * simd-intrinsics.c (get_simd_vreg): Simplify code and test
6098         only for type. This fixes crashes where MonoInst::klass is checked
6099         for ops of type != VTYPE or OBJ.
6100
6101         * simd-intrinsics.c (load_simd_vreg): Same.
6102
6103 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
6104
6105         * mini-ops.h: Add ops for packed shuffle/max/avg and
6106         extract mask.
6107         
6108         * cpu-x86.md: Same.
6109
6110         * mini-x86.c (mono_arch_output_basic_block): Same.
6111
6112         * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
6113         extract mask.
6114
6115         * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
6116         to emit extract mask op.
6117
6118         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
6119         to emit word shuffles.
6120
6121 2008-10-15  Mark Probst  <mark.probst@gmail.com>
6122
6123         * mini.c (mono_allocate_stack_slots_full): Align stack frame to
6124         the largest alignment needed by a variable, but at least
6125         sizeof(gpointer).
6126
6127 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
6128
6129         * basic-simd.cs: Tests for the fixes in the last commit.
6130
6131 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
6132
6133         * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
6134         no longer handles STACK_PTR input.
6135
6136         * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
6137
6138         * simd-intrinsics.c (load_simd_vreg): New function that works like 
6139         get_simd_vreg   but handles STACK_PTR input.
6140
6141         * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
6142         as the input can be an arbitrary pointer.
6143
6144         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
6145         LDADDR local optimization directly otherwise use a store op.
6146
6147 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
6148
6149         * basic-simd.cs: Tests for dup low and dup high.
6150
6151 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
6152
6153         * mini-ops.h: Add dup low and dup high ops.
6154         
6155         * cpu-x86.md: Same.
6156
6157         * mini-x86.c (mono_arch_output_basic_block): Same.
6158
6159         * simd-intrinsics.c (vector4f_intrinsics): Same.
6160
6161 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
6162
6163         * basic-simd.cs: Tests for recently added functionality.
6164
6165 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
6166
6167         * mini-ops.h: Add remaining sse1 fp ops.
6168         
6169         * cpu-x86.md: Add remaining sse1 fp ops.
6170
6171         * mini-x86.c (mono_arch_output_basic_block): Same.
6172
6173         * mini.h: Add enum for simd FP compare conditions.
6174
6175         * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
6176
6177         * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
6178         so the backed can generate the appropriate op.
6179
6180 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
6181         This patch squeese one more byte from the SimdIntrinsc struct.
6182
6183         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
6184         a a shift amount intead of simply or'ing it.
6185
6186         * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
6187
6188         * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
6189         byte so we can have an aditional flags field without increasing struct size.
6190
6191         * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
6192         against the simd_supported_versions bitmask.
6193
6194         * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
6195
6196 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
6197
6198         * mini.c: remove rawbuffer code (the only use here is unsafe because
6199         it takes locks during signal handling and the kernel now provides much
6200         better info in proc/pid/smaps these days).
6201
6202 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
6203
6204         * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
6205         OP_X86_PUSH_OBJ. Fixes #434620.
6206
6207         * objects.cs: Add a test.
6208         
6209 2008-10-12  Rodrigo Kumpera  <rkumpera@novell.com>
6210
6211         * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
6212         that the packuswb/packusdw don't work with unsigned numbers for what
6213         would be negative numbers in signed format.
6214
6215         * cpu-x86.md: Add doubleword forms of many ops and packing ones.
6216         Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
6217
6218         * mini-ops.h: Add doubleword forms of many ops and packing ones.
6219
6220         * mini-x86.c: Emit doubleword forms of many ops and packing ones.
6221
6222         * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
6223
6224         * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
6225
6226         * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
6227         add more ops.
6228
6229         * simd-intrinsics.c (simd_version_name): New function, returns the name of the
6230         version as the enum in mini.h.
6231
6232         * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
6233         for sse3 ops, check the simd_version field if present. This way the code
6234         works with all versions of sse.
6235
6236 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
6237
6238         * simd-intrinsics.c: Fixed intrinsic name typo.
6239
6240         * mini.h: Added missing simd exported function.
6241
6242         * basic-simd.cs: Added tests for Vector4ui.
6243         Fixed broken test for Vector16b.
6244
6245 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
6246
6247         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
6248         the max length to 64.
6249
6250 2008-10-10  Mark Probst  <mark.probst@gmail.com>
6251
6252         * method-to-ir.c: Only do the fast virtual generic method call for
6253         non-wrapper methods.
6254
6255         * mini.h, mini-trampolines.c: The new generic virtual remoting
6256         trampoline handles virtual method calls via the vtable (as done by
6257         the fast virtual generic method calls) to remoting proxies.
6258
6259         * mini.c (mono_jit_create_remoting_trampoline): For generic
6260         methods reate a generic virtual remoting trampoline.
6261
6262         * mini-amd64.h: Enable fast virtual generic method calls again.
6263
6264 2008-10-10  Mark Probst  <mark.probst@gmail.com>
6265
6266         * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
6267         restore registers when doing tail calls.
6268
6269 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
6270
6271         * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
6272         Vector4ui.
6273
6274 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
6275
6276         * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
6277
6278 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
6279
6280         * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
6281
6282 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
6283
6284         * basic-simd.cs: Retrofit for API changes.
6285
6286 2008-10-10  Mark Probst  <mark.probst@gmail.com>
6287
6288         * mini-ppc.c: Handle integer stack arguments for tail calls.
6289
6290 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
6291
6292         * optflags-def.h: Removed sse3 optimization.
6293
6294         * driver.c: Same.
6295
6296         * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
6297         sse3.
6298
6299         * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
6300
6301         * mini.h: Added enumeration with simd versions.
6302
6303         * simd-intrinsics.c (emit_intrinsics): Use the new static var
6304         for detecting SSE3.
6305
6306         * simd-intrinsics.c: Added mono_simd_intrinsics_init.
6307
6308         * mini.c (mini_init): Call mono_simd_intrinsics_init.
6309
6310 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
6311
6312         * basic-simd.cs: Added tests for Vector8u and Vector16u.
6313
6314         * basic-simd.cs: Fixed test naming.
6315
6316 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
6317
6318         * mini-ops.h: Added ops for packed and saturated math, shifts
6319         and packing/unpacking.
6320
6321         * cpu-x86.md: Added descriptors for the above ops.
6322
6323         * mini-x86.c: Added code to emmit the above ops.
6324
6325         * simd-intrinsics.c: Added support for Vector16u and Vector8u.
6326
6327 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
6328
6329         * aot-compiler.c (compile_method): Enable AOT for generic code.
6330
6331         * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
6332
6333 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
6334
6335         * mini.c: add a workaround for a common screwup that ends up blamed
6336         to mono (other processes blocking signal delivery).
6337
6338 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
6339
6340         * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
6341         in the LDFLD/STFLD opcodes. Fixes #432673.
6342
6343         * iltests.il.in: Add a new test.
6344
6345 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
6346
6347         * mini-arm.c: attach the thread in unmanaged->managed transitions
6348         using delegates (bug #433148).
6349
6350 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
6351
6352        * basic-simd.cs: Use new ShuffleSel constants.
6353
6354 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
6355
6356         * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
6357
6358         * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
6359         only disable simd intrinsics if no sse2 is detected.
6360
6361         * optflags-def.h: Added sse3.
6362
6363         * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
6364         is disabled.
6365
6366 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
6367
6368         * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
6369         when adding delegate-invoke wrappers.
6370
6371 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
6372
6373         * Makefile.am: Reenable the simd tests.
6374
6375 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
6376
6377         * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
6378           add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
6379           other vreg is allocated to that hreg.
6380
6381         Contributed under MIT/X11 license.
6382
6383 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
6384
6385         * Makefile.am: Disable the simd tests for now as Mono.Simd is not
6386         yet checked in.
6387
6388 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
6389
6390         * basic-simd.cs: New test suite for SIMD intrinsics.
6391
6392         * Makefile.am: Added new tests.
6393
6394 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
6395
6396         * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
6397
6398         * mini-ops.h: Same.
6399
6400         * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
6401
6402         * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
6403         using SSE2 aware opcodes.
6404
6405         * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
6406         is enabled, this code path is only reachable if conversion ops are emmited after
6407         mono_method_to_ir.
6408
6409         * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
6410
6411         This optimization saves 6 bytes per conversion against the old version.
6412
6413 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
6414
6415         * aot-compiler.c (compile_method): Don't skip methods referencing 
6416         generic methods without a corresponding entry in token_info_hash, since
6417         encode_method_ref () can handle all generic methods now.
6418
6419         * method-to-ir.c (mono_save_token_info): Don't save the token info if a 
6420         generic context is set.
6421         
6422         * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
6423         generic sharing of LDTOKEN.
6424
6425 2008-10-06  Mark Probst  <mark.probst@gmail.com>
6426
6427         * mini-amd64.h: Temporarily disabled fast virtual generic method
6428         calls because it breaks the System.Runtime.Remoting tests.
6429
6430 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
6431
6432         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
6433
6434         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
6435         so inlining actually works.
6436         (check_inline_caller_method_name_limit): Ditto.
6437
6438 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
6439
6440         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
6441         64 bit safety (from Olaf Hering and Andreas Farber).
6442
6443 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
6444         
6445         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
6446         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
6447         unused virtual call support code.
6448
6449         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
6450         
6451         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
6452         which can't use aot trampolines.
6453         (decode_patch): Don't create aot trampolines for methods which can't use
6454         them.
6455
6456         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
6457         use aot trampolines.
6458
6459         * mini.h: Bump AOT image format version.
6460         
6461 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
6462
6463         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
6464         to save_token_info () since cmethod is inflated for constrained calls.
6465
6466         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
6467
6468 2008-10-04  Andreas Farber  <andreas.faerber@web.de>
6469
6470         * Makefile.am: Add build rules for ppc64.
6471         This avoids the build failing at pedump with unresolved symbols
6472         due to lack of arch_sources. Instead it will now fail earlier
6473         due to lack of cpu-ppc64.md.
6474
6475         Contributed under MIT/X11 license.
6476
6477 2008-10-04  Mark Probst  <mark.probst@gmail.com>
6478
6479         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
6480         tail calls.
6481
6482         * iltests.il.in: Add test case for tail call with many arguments.
6483
6484 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
6485
6486         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
6487         to the fast virtual generic method code until the aot case is fixed.
6488
6489 2008-10-03  Mark Probst  <mark.probst@gmail.com>
6490
6491         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
6492
6493 2008-10-03  Mark Probst  <mark.probst@gmail.com>
6494
6495         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
6496         thunks.
6497
6498 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
6499         
6500         * simd-intrinsics.c: Forgot to add this one.
6501
6502         * mini-codegen.c: Fix macro in case SIMD is not supported.
6503
6504 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
6505         
6506         This patch land initial JIT support for simd intrinsics.
6507
6508         * mini-x86.h: Added new define to make --enable_minimal work on x86.
6509
6510         * Makefile.am: Added simd-intrinsics.c
6511
6512         * simd-intrinsics.c: New file with simd instrinsic related
6513         code.
6514
6515         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
6516
6517         * cpu-x86.md: Add simd related instructions.
6518
6519         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
6520
6521         * driver.c: Added two new --regression variants.
6522
6523         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
6524
6525         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
6526
6527         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
6528         extract some complicated logic to helper functions.
6529
6530         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
6531
6532         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
6533
6534         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
6535         the specialized simplification pass.
6536
6537         * method-to-ir.c (mono_spill_global_vars): Use new macro.
6538
6539         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
6540
6541         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
6542         table.
6543
6544         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
6545         if MONO_ARCH_NEED_SIMD_BANK is defined.
6546
6547         * mini-ops.h: Added the new simd ops.
6548
6549         * mini-x86.c: Added mono_arch_xregname.
6550
6551         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
6552
6553         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
6554
6555         * mini-x86.h: Define simd related MONO_ARCH macros.
6556
6557         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
6558
6559         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
6560
6561         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
6562         MONO_CLASS_IS_SIMD to deal with simd related IR.
6563
6564         * mini.h (MonoInst): Added spill_var to the backend union.
6565
6566         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
6567
6568         * mini.h: Added forward declarations of the new simd fuctions.
6569
6570         * optflags-def.h: Added new optimization names SIMD.
6571
6572         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
6573
6574         * regalloc.h: Added support for working with 3 register banks.
6575
6576         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
6577
6578         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
6579
6580 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
6581
6582         * mini-exceptions.c: remove 64 bit related ifdef clutter.
6583
6584 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
6585
6586         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
6587         instead of one on 64 bit systems.
6588
6589         * method-to-ir.c: Remove unused includes.
6590
6591 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
6592
6593         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
6594         cfg->used_int_regs, since the two are different on arm.
6595
6596 2008-10-02  Mark Probst  <mark.probst@gmail.com>
6597
6598         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
6599         mono_method_get_vtable_index() to get the vtable index.
6600
6601 2008-10-02  Mark Probst  <mark.probst@gmail.com>
6602
6603         * method-to-ir.c (mono_method_to_ir2): Don't create native
6604         wrappers for array methods, because they're never called (and if
6605         they were called they wouldn't work).
6606
6607 2008-10-02  Mark Probst  <mark.probst@gmail.com>
6608
6609         * method-to-ir.c (mono_method_to_ir2): Array methods are
6610         special-cased and must not be invoked indirectly via the (M)RGCTX
6611         when generic sharing is turned on.  Fixes #431413.
6612
6613 2008-10-01  Mark Probst  <mark.probst@gmail.com>
6614
6615         * method-to-ir.c: When generic sharing is active, call
6616         non-interface virtual generic methods via the standard trampoline.
6617
6618         * mini-trampolines.c: Handle virtual generic shared methods.
6619
6620         * mini.h, mini-x86.c, mini-x86.h: New argument for
6621         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
6622         method thunks and which is the trampoline to call if the lookup
6623         fails.  Enable the virtual generic method thunk for x86.
6624
6625         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
6626         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
6627         argument but assert that it's NULL, because these archs don't yet
6628         implement the virtual generic method thunk.  Changes in the IMT
6629         thunk data structures.
6630
6631 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
6632
6633         * aot-compiler.c (emit_globals): Avoid invalid characters in
6634         the static linking symbol.
6635
6636         * objects.cs: Add a test for the range check optimization. Fix warnings.
6637
6638         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
6639         optimization from the current JIT.
6640
6641         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
6642         later in decompose_array_access_opts () to allow more optimizations.
6643
6644         * method-to-ir.c (mono_handle_soft_float): Rename this to 
6645         mono_decompose_soft_float () for consistency.
6646
6647         * mini-ops.h: Fix arguments of OP_STRLEN.
6648
6649         * method-to-ir.c (save_cast_details): Extract the cast details saving code
6650         into a separate function.
6651         (reset_cast_details): Ditto.
6652         (handle_unbox): Save cast details. Fixes #431254.
6653
6654         * method-to-ir.c: Remove some obsolete FIXMEs.
6655
6656 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
6657
6658         * ir-emit.h (alloc_dreg): Write a warning before crashing.
6659
6660 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
6661
6662         * mini-codegen.c: More work on macros to make them
6663         ready for multiple regbanks.
6664
6665 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
6666
6667         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
6668
6669         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
6670
6671 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
6672
6673         * mini-codegen.c (mono_spillvar_offset): Proper support for
6674         multiple regbanks.
6675
6676 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
6677
6678         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
6679         the stack overflow changes.
6680
6681 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
6682
6683         * mini-codegen.c: Make all bank macros depend on reg_bank.
6684
6685         * mini-codegen.c (mono_local_regalloc): Make free mask
6686         initialization regbank aware.
6687
6688 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
6689
6690         * mini-codegen.c (mono_local_regalloc): Extract callee
6691         mask selection to a function and make it regbank aware.
6692
6693 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
6694
6695         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
6696         code to deal with many regbanks.
6697
6698 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
6699
6700         * mini-codegen.c: More fp->regbank changes.
6701
6702 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
6703
6704         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
6705         of a hardcoded constant.
6706
6707 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
6708
6709         * method-to-ir.c (type_from_stack_type): Fix typo.
6710
6711 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
6712
6713         * mini-ia64.c (emit_move_return_value): Convert float return values to
6714         double.
6715
6716         * objects.cs: Add a new test.
6717         
6718         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
6719         VARARG methods to fix an assert later.
6720
6721         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
6722         end so it at least compiles.
6723
6724 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
6725
6726         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
6727
6728 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
6729
6730         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
6731         optimization to a new function (emit_optimized_ldloca_ir) and enable
6732         it for both ldloca and ldloca_s.
6733
6734 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
6735
6736         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
6737         gshared CASTCLASS code.
6738
6739         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
6740         amd64, where the libc stack unwinder encounters stack frames referring to
6741         native code in unmapped memory.
6742
6743         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
6744         sharing.
6745
6746         * generics.cs: Add new test.
6747
6748 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
6749
6750         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
6751         add a check that one of the ARM_FPU_ constants is defined.
6752
6753         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
6754         
6755         * mini-exceptions.c: Fix build on non-altstack platforms.
6756
6757         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
6758         sharing of vtypes.
6759
6760         * ir-emit.h: Add a comment to NEW_PCONST.
6761
6762         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
6763
6764         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
6765
6766         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
6767         after the changes to MonoJitDomainInfo.
6768
6769 2008-09-27  Mark Probst  <mark.probst@gmail.com>
6770
6771         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
6772
6773 2008-09-27  Mark Probst  <mark.probst@gmail.com>
6774
6775         * mini-ppc.c: Compiler warning fixes.
6776
6777 2008-09-27  Mark Probst  <mark.probst@gmail.com>
6778
6779         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
6780         for pinvokes.
6781
6782 2008-09-27  Mark Probst  <mark.probst@gmail.com>
6783
6784         * exceptions-ppc.c, mini-ppc.h: Compile
6785         mono_arch_handle_altstack_exception() on Darwin, too.
6786
6787 2008-09-27  Mark Probst  <mark.probst@gmail.com>
6788
6789         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
6790         work on archs which don't have generic sharing implemented, only
6791         without the vtable_arg.
6792
6793 2008-09-26  Mark Probst  <mark.probst@gmail.com>
6794
6795         * mini.c: Added comment explaining why delegate ctor icall
6796         wrappers are compiled.
6797
6798 2008-09-26  Mark Probst  <mark.probst@gmail.com>
6799
6800         * mini.c: Don't produce trampolines to delegate ctor icall
6801         wrappers but compile them upfront.
6802
6803 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
6804
6805         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
6806         runtime-set function when going back to managed code. Currently this
6807         is used to set back the protection on the soft ovf pages and/or to
6808         throw the stack overflow exception that happened in unmanaged code.
6809
6810 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
6811
6812         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
6813         runtime-set function when going back to managed code. Currently this
6814         is used to set back the protection on the soft ovf pages and/or to
6815         throw the stack overflow exception that happened in unmanaged code.
6816
6817 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
6818
6819         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
6820         the support code for restoring stack protection after stack overflows
6821         that happen in unmanaged code. Don't set the exec permission on the
6822         soft overflow area.
6823
6824 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
6825
6826         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
6827         delegate->method_ptr is set. Fixes #428054.
6828
6829 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
6830
6831         * tests.cs: Rename to ratests.cs.
6832
6833         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
6834         emit_get_rgctx_... functions.
6835
6836 2008-09-25  Mark Probst  <mark.probst@gmail.com>
6837
6838         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
6839
6840 2008-09-25  Mark Probst  <mark.probst@gmail.com>
6841
6842         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
6843         before asserting that method is sharable.
6844
6845 2008-09-25  Mark Probst  <mark.probst@gmail.com>
6846
6847         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
6848         whether method needs a static RGCTX wrapper used instead of
6849         complex conditions.
6850
6851         * generic-sharing.c, mini.h: A few functions moved to
6852         metadata/generic-sharing.c.
6853
6854 2008-09-25  Mark Probst  <mark.probst@gmail.com>
6855
6856         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
6857         Generic code sharing for value types, which essentially means
6858         treating value type methods like static methods.  The RGCTX is
6859         passed in the same way.
6860
6861 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
6862
6863         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
6864         opcode when creating multi-dimensional arrays of open types.
6865
6866         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
6867         open generic types.
6868
6869         * generics.cs: Add a test.
6870
6871         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
6872
6873 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
6874
6875         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
6876
6877         * mini.c (mini_method_compile): Set it when running under the debugger. 
6878
6879         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
6880         vreg optimization if the flag is set.
6881
6882         * driver.c (mono_main): Add --attach= option to pass options to
6883         the attach agent.
6884
6885         * mini.c (sigquit_signal_handler): Start the attach agent.
6886
6887         * ssapre.c: Disable this to save space since it is not yet ported to
6888         linear IR.
6889
6890         * regalloc2.c: Disable this to save space.
6891
6892         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
6893
6894 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
6895
6896         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
6897         the -v option useful again.
6898
6899 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
6900
6901         * mini-amd64.c (mono_arch_output_basic_block): Add support for
6902         --break-at-bb.
6903
6904         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
6905         arrays of arrays. Fixes #428406.
6906
6907         * method-to-ir.c (mini_emit_castclass): Ditto.
6908
6909         * objects.cs: Add new test.
6910         
6911 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
6912
6913         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
6914         was wrong at it choked against target_type_is_incompatible for byref types.
6915
6916 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
6917
6918         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
6919         places.
6920
6921 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
6922
6923         * mini-exceptions.c: update a few more exceptions-related counters.
6924
6925 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
6926
6927         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
6928         new functions to allocate from persistent mempools.
6929
6930 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
6931
6932         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
6933         multiple register banks in the future.
6934
6935         * mini-codegen.c (mono_local_regalloc): Fix a warning.
6936
6937 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
6938
6939         * mini.c (type_to_eval_stack_type): Remove duplicated function.
6940
6941         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
6942
6943         * mini.h: Export type_to_eval_stack_type.
6944
6945         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
6946         is only ins->klass of byref types.
6947
6948 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
6949
6950         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
6951         (mini_emit_memcpy2): Ditto.
6952
6953         * mini-amd64.c: Fix a warning.
6954
6955 2008-09-21  Mark Probst  <mark.probst@gmail.com>
6956
6957         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
6958         linking.
6959
6960 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
6961
6962         * method-to-ir.c: Extract stloc micro-optimization to a
6963         function and apply it to all cases.
6964
6965 2008-09-19  Mark Probst  <mark.probst@gmail.com>
6966
6967         * method-to-ir.c: Don't fail generic code sharing in cases we
6968         already support.
6969
6970 2008-09-18  Mark Probst  <mark.probst@gmail.com>
6971
6972         * mini-ppc.c: Handle structs in tailcalls on Darwin.
6973
6974 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
6975
6976         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
6977         implementation.
6978
6979 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
6980
6981         * trace.c: make tracing more useful and correct, with per-thread
6982         id and indent info.
6983
6984 2008-09-15  Mark Probst  <mark.probst@gmail.com>
6985
6986         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
6987         doing a method call and the argument is an R4.
6988
6989 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
6990
6991         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
6992         generic methods.
6993
6994 2008-09-13  Mark Probst  <mark.probst@gmail.com>
6995
6996         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
6997
6998 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
6999
7000         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
7001         (MONO_JUMP_TABLE_FROM_INS): Ditto.
7002
7003 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
7004
7005         * driver.c: Add a --agent argument (not supported yet) to load managed
7006         agent assemblies before loading the main assembly, similarly to how the
7007         Java VM handles agents.
7008
7009 2008-09-11  Mark Probst  <mark.probst@gmail.com>
7010
7011         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
7012         function to do stack layout of local variables.
7013
7014 2008-09-11  Mark Probst  <mark.probst@gmail.com>
7015
7016         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
7017         calculation.
7018
7019 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
7020
7021         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
7022         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
7023         JIT if DISABLE_JIT is defined.
7024
7025         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
7026         defined.
7027
7028 2008-09-10  Mark Probst  <mark.probst@gmail.com>
7029
7030         * iltests.il.in: Disable the fconv test on PPC (the result is
7031         undefined according to ECMA).
7032
7033 2008-09-10  Mark Probst  <mark.probst@gmail.com>
7034
7035         * iltests.il.in: Enable tail call tests for PPC.
7036
7037         * mini.h: Add variable for storing incoming valuetype argument
7038         addresses for tail calls.
7039
7040         * mini-ppc.c: Implement valuetype arguments and return values for
7041         tailcalls on Linux.
7042
7043 2008-09-09  Mark Probst  <mark.probst@gmail.com>
7044
7045         * mini-ppc.c: Partially implement tail calls (struct arguments and
7046         return values not supported).
7047
7048         * method-to-ir.c: Enable tail calls on PPC.
7049
7050 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
7051
7052         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
7053         runtime-invoke wrappers to work around the problem of them getting
7054         assigned to a random class.
7055
7056         * aot-runtime.c (mono_aot_get_method): Ditto.
7057         
7058 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
7059
7060         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
7061         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
7062
7063 2008-09-07  Mark Probst  <mark.probst@gmail.com>
7064
7065         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
7066         until they're implemented properly.
7067
7068         * exceptions-ppc.c: Use arch-independent exception-handling code
7069         instead of custom one.
7070
7071         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
7072         for Linear IR.
7073
7074         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
7075
7076         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
7077         applies when __powerpc__ is defined.
7078
7079 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
7080
7081         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
7082         methods to their code to avoid computing the full name of wrappers and
7083         doing a lookup in a string hash table.
7084
7085 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
7086
7087         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
7088         we identify bblocks before method_to_ir () is ran.
7089
7090         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
7091         Also avoid optimizing branches pointing to themselves.
7092
7093         * mini.c (mini_method_compile): Ditto. Fixes #422947.
7094
7095 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
7096
7097         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
7098
7099 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
7100
7101         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
7102         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
7103         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
7104         'buf'.
7105
7106         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
7107         jumped to the same entry in plt_jump_table.
7108
7109 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
7110
7111         * method-to-ir.c (initialize_array_data): Handle field with RVA from
7112         dynamic images.
7113
7114 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
7115
7116         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
7117         other assignment can be if converted. Saves 1.5% on corlib size and fixes
7118         #421807.
7119
7120 2008-08-29  Geoff Norton  <gnorton@novell.com>
7121
7122         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
7123         segment, and doesn't properly handle .space as .text.  Fixes
7124         AOT Mach/ARM
7125
7126 2008-08-29  Geoff Norton  <gnorton@novell.com>
7127
7128         * mini.c: Disable the mach exception handler when running on 
7129         ARM
7130
7131 2008-08-29  Geoff Norton  <gnorton@novell.com>
7132
7133         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
7134         globals on Darwin/ARM
7135
7136 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
7137
7138         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
7139         since too many things depend on it. Instead, call 
7140         mono_runtime_set_no_exec ().
7141         
7142         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
7143         the new JIT.
7144
7145         * aot-compiler.c: Add an 'asm-only' AOT option.
7146
7147         * mini.c: Avoid initializing the runtime when doing AOT compilation.
7148                 
7149         * aot-compiler.c (compile_method): Disable gshared support for now as it
7150         doesn't yet work.
7151
7152 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
7153
7154         * mini-amd64.h : Fix a compiler warning.
7155
7156         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
7157           Changed to use a callback function to retrieve the unwind info.
7158           This avoids problems observed when code blocks were removed by
7159           unloading an app domain.
7160
7161         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
7162           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
7163           to work properly.
7164
7165         Contributed under MIT/X11 license.
7166
7167 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
7168
7169         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
7170           case to keep the stack aligned to 8.
7171
7172         Contributed under MIT/X11 license.
7173
7174 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
7175
7176         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
7177         avoid repeated linear searches.
7178
7179 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
7180
7181         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
7182         methods it can't handle.
7183         
7184         * aot-compiler.c (add_method): Avoid adding a method twice.
7185         (add_wrappers): Add runtime invoke wrappers for all methods.
7186
7187         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
7188         function to create an aot-compatible version of this trampoline.
7189
7190         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
7191
7192 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
7193
7194         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
7195
7196         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
7197         with a generic sharing failure.
7198
7199         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
7200
7201         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
7202         CEE_RETHROW. Fixes #419634.
7203
7204         * mini.c (mono_method_to_ir): Ditto.
7205
7206         * exceptions.cs: Add a new test.
7207         
7208         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
7209         to mono_type_stack_size_internal () since some callers might not pass in
7210         an rgctx.
7211
7212         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
7213         instrument_prolog. Fixes #419878.
7214
7215         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
7216         doubles in soft float mode volatile.
7217
7218 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
7219
7220         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
7221
7222         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
7223         to handle soft float correctly.
7224
7225         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
7226         the fast path.
7227
7228         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
7229
7230         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
7231         to sp, since the generics catch code requires it.
7232
7233         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
7234         copying.
7235
7236         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
7237         mono_arch_emit_imt_argument ().
7238
7239         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
7240
7241         * mini-arm.c tramp-arm.c: Generic sharing updates.
7242
7243 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
7244
7245         * mini-arm.c: Fix the arm build.
7246
7247         * generic-sharing.c (mini_type_get_underlying_type): New helper function
7248         handling enums, generic instances and generic sharing.
7249         (mini_type_stack_size_full): Ditto.
7250
7251         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
7252         
7253         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
7254
7255         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
7256
7257         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
7258         trampolines.
7259
7260         * mini-arm.c: Various small generic sharing changes.
7261
7262         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
7263         this for x86.
7264         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
7265         custom code.
7266
7267         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
7268         helper function to return a generic class init trampoline.
7269
7270         * method-to-ir.c mini.c: Use it.
7271         
7272         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
7273         arch-specfic function to return a generic class init trampoline.
7274
7275         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
7276         the GENERIC_CLASS_INIT custom code.
7277
7278         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
7279         a fatal error, not a sharing failure.
7280
7281         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
7282         needed.
7283
7284         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
7285         trampoline argument from MONO_ARCH_VTABLE_REG.
7286
7287         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
7288         order of the arguments to the C trampoline: pass 'slot' as the trampoline
7289         argument, and pass the vtable in VTABLE_REG.
7290
7291         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
7292         order of the arguments to the C trampoline: pass 'slot' as the trampoline
7293         argument, and pass the vtable in VTABLE_REG.
7294         (mono_arch_create_trampoline_code_full): Remove some special casing for
7295         the rgctx fetch trampoline.
7296
7297         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
7298         Fixes #419273.
7299
7300         * iltests.il: Add a test for it.
7301
7302 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
7303
7304         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
7305
7306         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
7307         no longer needed.
7308
7309         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
7310         use mono_jit_info_table_find () to avoid recursion.
7311         (mono_delegate_trampoline): Add a sync wrapper here.
7312
7313         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
7314         here.
7315
7316         * mini.c (mono_method_to_ir): Ditto.
7317         
7318         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
7319         add_sync_wrapper argument. Don't add a sync wrapper here.
7320         (mono_create_jump_trampoline): Don't add a sync wrapper here.
7321
7322         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
7323         
7324 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
7325
7326         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
7327           of nonvolatile registers back from MonoContext to CONTEXT.
7328
7329         Contributed under MIT/X11 license.
7330
7331 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
7332
7333         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
7334           arguments on Winx64 there are only 4 argument registers.  For this
7335           logic to work the last argument must be pulled from the stack.  
7336
7337         Contributed under MIT/X11 license.
7338
7339 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
7340
7341         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
7342
7343         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
7344         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
7345         encode/decode_method_ref ().
7346
7347         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
7348
7349         * aot-runtime.c (decode_patch): Ditto.  
7350
7351         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
7352         MONO_PATCH_INFO_METHOD.
7353
7354         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
7355         MonoGenericJitInfo.
7356
7357         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
7358         MonoGenericJitInfo.
7359
7360         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
7361
7362         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
7363         one from the caller.
7364
7365         * aot-runtime.c (decode_generic_inst): New function to decode and
7366         return a interned generic inst.
7367         (decode_klass_ref): Use it.
7368         (decode_method_ref): Ditto.
7369
7370         * aot-compiler.c (emit_exception_debug_info): Save 
7371         jinfo->has_generic_jit_info too.
7372
7373 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
7374
7375         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
7376
7377         * iltests.il.in: Add a test for fconv_to_i.
7378
7379         * liveness.c: Disable the liveness2 pass for now to save space.
7380
7381         * regalloc2.c: Include mempool-internals.h to fix warnings.
7382
7383         * aot-compiler.c (encode_method_ref): Encode the context of generic
7384         instance methods.
7385
7386         * aot-runtime.c (decode_method_ref): Inflate generic methods using
7387         the context saved in the aot file.
7388
7389         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
7390
7391         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
7392
7393         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
7394         volatile so they won't be optimized away.
7395
7396 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
7397
7398         * ssa.c:
7399         * ssa2.c:
7400         * mini.c:
7401         * regalloc2.c:
7402         * dominators.c: Remove duplicated functions that now are in
7403         mempool-internals.h.
7404
7405 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
7406
7407         * aot-compiler.c: Fix warnings.
7408
7409         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
7410
7411         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
7412
7413         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
7414         as the patch type.
7415
7416         * mini.c (mono_resolve_patch_target): Ditto.
7417         
7418         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
7419         (encode_klass_ref): Add support for encoding VARs/MVARs.
7420
7421         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
7422
7423         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
7424         the handling of the got entries into a separate 'decode_got_entry' function.
7425         Add support for RGCTX_FETCH.
7426
7427         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
7428         clobbered by the trampoline code.
7429
7430         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
7431         not clobbered by the indirect calling code.
7432
7433 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
7434
7435         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
7436         to fix the build.
7437
7438 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
7439
7440         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
7441         signature using the compilation mempool otherwise we would leak it.
7442
7443 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
7444
7445         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
7446         mono_emit_abs_call ().
7447
7448         * patch-info.h: Add GENERIC_CLASS_INIT.
7449
7450         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
7451
7452         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
7453         as their target as a near call.
7454
7455         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
7456         ABS handling code.
7457         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
7458
7459         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
7460         call to a runtime function described by a patch.
7461
7462         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
7463         mono_emit_abs_call, this has the advantage that the ABS handling code in
7464         mono_codegen () can handle them both, and can handle other stuff in the
7465         future without additional code.
7466
7467         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
7468         entry.
7469         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
7470         abs addresses.
7471
7472         * mini.h: Add missing bblock related prototypes.
7473
7474         * mini.h (MonoCompile): Remove unused reverse_inst_list and
7475         reverse_inst_list_len fields.
7476
7477         * mini.c: Refactor this file a bit by moving branch optimizations to 
7478         branch-opts.c.
7479
7480         * method-to-ir.c: Merge generic sharing changes missed earlier.
7481
7482         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
7483
7484         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
7485         shared patches. Process METHODCONST as a shared patch.
7486
7487         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
7488         as it crashes on the 2.0 mscorlib.
7489
7490         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
7491         to cause crashes.
7492         
7493         * aot-compiler.c: Use is_plt_patch () in a few additional places.
7494         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
7495         by IMT.
7496
7497         * aot-compiler.c: Reorganize the got handling code to be a bit more
7498         understandable.
7499
7500 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
7501
7502         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
7503         mono_patch_info_equals/hash, and use it to massively simplify
7504         get_plt_index ().
7505
7506         * mini.c (mono_patch_info_hash): Simplify this and add support for
7507         more patch types.
7508
7509         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
7510
7511         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
7512         handling code, since an offset is not enough to identify a trampoline.
7513
7514         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
7515
7516 2008-08-17  Mark Probst  <mark.probst@gmail.com>
7517
7518         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
7519
7520         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
7521
7522         * mini-ops.h: Argument and result types for OVF_CARRY ops.
7523
7524         * decompose.c: PPC decompositions for various ops.
7525
7526         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
7527
7528 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
7529
7530         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
7531         call the generic trampoline code using a call, instead of a jump, to
7532         remove some special casing from the generic trampoline code.
7533
7534         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
7535         (mono_codegen): Ditto.
7536
7537         * aot-compiler.c aot-runtime.c: Ditto.
7538
7539         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
7540
7541         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
7542         helper function to find the offset corresponding to a lazy fetch trampoline.
7543
7544         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
7545         when doing generic sharing.
7546
7547         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
7548         places.
7549         
7550         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
7551         mini-trampolines.c to be with the other trampoline creation functions.
7552
7553         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
7554         as it is equal to method->signature in most cases, add a 
7555         mono_emit_method_call_full variant which takes a signature and an imt
7556         argument as well.
7557
7558 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
7559
7560         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
7561         to this function, since it could be computed easily from the method 
7562         argument.
7563         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
7564         more.
7565
7566         * method-to-ir.c mini.c: Remove references to 
7567         compile_generic_method_wo_context.
7568
7569         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
7570         generic method calls.
7571         
7572         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
7573         dimensional non-szarrays.
7574
7575         * mini.c (mini_init): Register mono_array_new_1.
7576
7577         * jit-icalls.c (mono_array_new_1): New jit icall.
7578
7579         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
7580         pointing to the method.
7581
7582         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
7583         method addresses belonging to METHOD_JUMP patches in the 
7584         jump_target_got_slot_hash.
7585         (mono_aot_load_method): Ditto.
7586
7587         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
7588         METHOD_JUMP patches.
7589
7590         * mini.c (mini_create_jit_domain_info): New helper function which 
7591         initializes/frees domain->runtime_info.
7592         (mini_free_jit_domain_info): Ditto.
7593         (mini_init): Install the domain hook functions with the runtime.
7594
7595         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
7596         information maintained by the JIT.
7597
7598         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
7599         insertion into jump_table_hash into mono_codegen (), also implement proper
7600         locking.
7601
7602         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
7603         tail calls, it is already done by the aot code.
7604         
7605         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
7606         mechanism on amd64.
7607
7608         * iltests.il.in: Make the jmp test a bit more complex.
7609
7610         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
7611         generic instances which doesn't have a token.
7612
7613         * aot-runtime.c (decode_method_ref): Ditto.
7614         
7615         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
7616         can handle this case now.
7617         (handle_box): Ditto.
7618
7619 2008-08-15  Geoff Norton  <gnorton@novell.com>
7620
7621         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
7622         debugging check.
7623
7624 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
7625
7626         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
7627         calling generic methods.
7628
7629         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
7630
7631         * aot-runtime.c (decode_patch_info): Ditto.
7632
7633         * mini.c (mono_resolve_patch_target): Ditto.
7634         
7635         * patch-info.h: Add METHOD_RGCTX.
7636
7637         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
7638
7639 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
7640
7641         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
7642         arguments in registers.
7643
7644         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
7645         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
7646
7647         * mini.c (mini_method_compile): Abort aot compilation for generic
7648         methods if generic sharing is disabled.
7649         
7650         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
7651         an mrgctx.
7652
7653         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
7654         requiring an mrgctx.
7655
7656         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
7657         store instructions when converting a vcall to a normal call.
7658
7659         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
7660         mono_arch_find_jit_info.
7661
7662 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
7663
7664         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
7665         avoid calling mono_method_full_name () for every method even if the
7666         env var is not set.
7667         (check_inline_caller_method_name_limit): Ditto.
7668
7669 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
7670
7671         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
7672         assemblies in one run.
7673
7674         * aot-compiler.c (mono_compile_assembly): Only print out a count of
7675         skipped methods if it is not 0.
7676
7677         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
7678
7679 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
7680
7681         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
7682           MONO_ARCH_HAVE_UNWIND_TABLE.
7683
7684         Contributed under MIT/X11 license.
7685
7686 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
7687
7688         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
7689           from default optimizaton list on Winx64.
7690
7691         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
7692
7693         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
7694           the LMF from the MonoJitTlsData structure.
7695
7696         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
7697
7698         Contributed under MIT/X11 license.
7699
7700 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
7701
7702         * mini.c (sigsegv_signal_handler): Fix the build.
7703
7704         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
7705         assembly->aot_module.
7706
7707         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
7708         hash table. This simplifies and speeds up a lot of code, and fixes support
7709         for .netmodules.
7710
7711         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
7712         with the runtime.
7713
7714         * mini-exceptions.c: Ditto.
7715         
7716         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
7717         'native_offset' argument, since these are computed in the 
7718         mono_find_jit_info () function.
7719
7720         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
7721         is used by exceptions-ppc.c.
7722
7723         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
7724         mono_arch_find_jit_info ().
7725         
7726         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
7727         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
7728         generic code in mini-exceptions.c.
7729
7730 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
7731
7732         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
7733
7734         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
7735         
7736         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
7737         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
7738         called while holding the loader lock. Fixes #415608.
7739         (mono_aot_get_method_from_token_inner): Ditto.
7740
7741 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
7742
7743         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
7744         to reduce differences between this and the generic implementation in
7745         mini-exceptions.c.
7746         (ves_icall_get_frame_info): Ditto.
7747
7748         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
7749
7750         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
7751         longer neccesarry.
7752
7753         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
7754         mono_arch_get_call_filter () and make it non-static, for consistency with the
7755         other architectures.
7756
7757 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
7758
7759         * mini.c:
7760         * local-propagation.c:
7761         * mini-x86.c: Correct the name of arch defines.
7762
7763 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
7764
7765         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
7766         NO_EMULATE_LONG_SHIFT_OPS define.
7767
7768 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
7769
7770         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
7771         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
7772
7773         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
7774         MACH fixes. Merged from the 2.0 branch.
7775
7776         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
7777
7778         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
7779         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
7780
7781         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
7782
7783         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
7784         mono_marshal_get_native_wrapper () signature changes.
7785
7786 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
7787
7788         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
7789         conversion bug under arm.
7790
7791 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
7792
7793         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
7794
7795         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
7796         with overflow checking.
7797
7798 2008-08-05  Marek Habersack  <mhabersack@novell.com>
7799
7800         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
7801         to the genmdesc.pl file
7802
7803 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
7804
7805         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
7806         arg_array in the soft-float versions of the LOAD/STORE macros.
7807
7808         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
7809         implementation.
7810
7811         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
7812
7813 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
7814
7815         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
7816         a float HFA. Fixes #413621.
7817
7818 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
7819
7820         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
7821         frame_size to args_size. Fixes build.
7822
7823 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
7824
7825         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
7826         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
7827
7828         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
7829         the stack are not unaligned. Fixes #413247.
7830         
7831 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
7832
7833         * mini.c: update jitted methods performance counters.
7834
7835 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
7836
7837         * mini-exceptions.c: increase the exceptions thrown performance
7838         counter in mono_handle_exception ().
7839
7840 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
7841
7842         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
7843         can work with netmodules.
7844
7845 2008-07-28  Geoff Norton  <gnorton@novell.com>
7846
7847         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
7848         regression tests.
7849
7850 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
7851
7852         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
7853         correct place.
7854
7855 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
7856
7857         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
7858           The float param registers and other param registers must be the 
7859           same index on Windows x64.
7860
7861         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
7862           ArgValuetypeAddrInIReg argument case.  Setting the argument
7863           op to OP_VTARG_ADDR (OP_REGOFFSET)).
7864
7865         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
7866           variable computed above as the copy length for arguments of storage
7867           type ArgValuetypeAddrInIReg.
7868
7869         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
7870           ArgValuetypeAddrInIReg argument case.  This case will rely on
7871           mono_arch_emit_outarg_vt to emit the correct code later in the process.
7872
7873         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
7874           a 32 byte stack allocation for all calls.  We will omit the adjustment for
7875           jump and tail call instructoins as they do not follow the typical call behavior.
7876
7877         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
7878           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
7879           local variable and pass the local variable by reference to the called method.
7880
7881         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
7882           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
7883           of a struct is passed in a register it must be saved with the other
7884           volatile argument on the stack.
7885
7886         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
7887           frame pointer the stack adjustment value must be saved to the unwind 
7888           info structure.
7889
7890         Contributed under MIT/X11 license.
7891
7892 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
7893
7894         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
7895         which got lost in the merge.
7896
7897 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
7898
7899         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
7900         build.
7901
7902         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
7903         
7904         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
7905         icalls, since they won't be patched.
7906
7907         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
7908         different code sequence when running under valgrind to prevent some valgrind
7909         errors.
7910
7911         * iltests.il.in: Add new regression test.
7912
7913         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
7914         end with a throw.
7915
7916         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
7917         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
7918
7919         * iltests.il.in: Add new test.
7920
7921         * aot-compiler.c: Fix some warnings.
7922
7923         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
7924         Fixes #412494.
7925
7926 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
7927
7928         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
7929         (mini_usage_jitdeveloper): Add a missing --wapi option.
7930
7931 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
7932
7933         * mini-codegen.c: Simplify the is_fp macros.
7934         (free_up_ireg): Remove, use free_up_reg instead.
7935         (free_up_reg): Fix the fp case.
7936
7937 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
7938
7939         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
7940         lowered earlier.
7941
7942         * exceptions-x86.c: Merge some changes which seemed to have got lost
7943         in the linear-ir merge.
7944
7945         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
7946
7947         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
7948         long vreg volatile even if the variable was already created.
7949
7950         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
7951         volatile variables.
7952
7953 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
7954
7955         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
7956
7957         * mini.c (mono_jit_compile_method_inner): Add support for 
7958         MONO_EXCEPTION_BAD_IMAGE.
7959
7960         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
7961         mini_method_get_context () returns NULL. Fixes #356531.
7962
7963         * mini.c (mono_method_to_ir): Ditto.
7964         
7965         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
7966         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
7967
7968 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
7969
7970         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
7971         in the LDFTN implementation.
7972
7973 2008-07-25  Mark Probst  <mark.probst@gmail.com>
7974
7975         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
7976         code, patch calls to icalls, too, even if they're not in the
7977         shared generic code hash.  Fixes #411962.
7978
7979 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
7980
7981         * cpu-x86.md: Increase the length of the fcall opcodes.
7982
7983         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
7984         calls returning floats.
7985
7986         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
7987         on NEWARR.
7988         
7989         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
7990         missed earlier.
7991
7992         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
7993         into the domain->method_code_hash.
7994
7995         * aot-compiler.c: Fix win32 build.
7996
7997         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
7998         
7999         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
8000         gshared NEWARR implementation.
8001
8002         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
8003
8004         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
8005         can be used outside of method_to_ir.
8006
8007         * mini.h (MonoCompile): Add arg_types field.
8008
8009         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
8010         
8011         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
8012         the values of the local arg_array and param_types array.
8013
8014 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
8015
8016         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
8017         got accesses might only get generated later when NEWOBJ is decomposed.
8018         
8019         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
8020         looking up the native code of the target method when a delegate is called
8021         for the first time.
8022
8023         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
8024         optimization.
8025
8026         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
8027
8028         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
8029         AOT work on platforms without a working dlsym implementation.
8030
8031         * mini.h: Bump AOT image format version.
8032         
8033 2008-07-24  Mark Probst  <mark.probst@gmail.com>
8034
8035         * mini-exceptions.c: Free a MonoType with
8036         mono_metadata_free_type() instead of g_free().
8037
8038         * aot-runtime.c: Free a MonoType.
8039
8040 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
8041
8042         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
8043         optimization.
8044
8045         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
8046         fp stack on x86.
8047
8048 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
8049         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
8050         profiler hook.
8051
8052 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
8053
8054         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
8055         NEWOBJ calls on valuetypes.
8056
8057         * iltests.il.in: Add new test.
8058
8059         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
8060
8061 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
8062
8063         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
8064         is no longer needed.
8065
8066         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
8067         non register sized integer arguments.
8068         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
8069         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
8070         emit_memcpy2 ().
8071
8072         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
8073         CEE_MONO_RETOBJ.
8074         
8075         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
8076         two a binop with different sized arguments is emitted.
8077
8078         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
8079         instruction in the ins==NULL case.
8080
8081 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
8082
8083         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
8084
8085         * mini-x86.c: Fix osx build.
8086
8087         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
8088         opcodes as well.
8089
8090         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
8091         instruction for non int sized variables.
8092
8093         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
8094         implementation.
8095
8096 2008-07-23  Robert Jordan  <robertj@gmx.net>
8097
8098         * method-to-ir.c: Fix MSVC build.
8099
8100 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
8101
8102         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
8103         a non int sized type, widen it to an int since newer versions of gcc seem to
8104         generate code which needs this.
8105
8106         * ssa2.c abcremoval2.c: Fix warnings.
8107
8108         * *: Merge the Linear IR branch.
8109
8110         The original branch is at trunk/branches/vargaz/mini-linear-il, and
8111         the ChangeLog file there describes all the changes done over the years. 
8112         Further documentation can be found at www.mono-project.com/Linear_IL.
8113
8114 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
8115
8116         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
8117           The float param registers and other param registers must be the 
8118           same index on Windows x64.
8119
8120         Contributed under MIT/X11 license.
8121
8122 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
8123
8124         * mini.c: Make the previous fix GC safe.
8125
8126 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
8127
8128         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
8129
8130 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
8131
8132         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
8133           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
8134           ArgValuetypeAddrInIReg instead.
8135
8136         Contributed under MIT/X11 license.
8137
8138 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
8139
8140         * mini-codegen.c (get_register_spilling): Fix a warning.
8141
8142 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
8143
8144         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
8145         for types which the initialization fails. Raises the provided exception
8146         at the right stop after cleanup.
8147
8148 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
8149
8150         * aot-compiler.c: Free most of the memory allocated during compilation.
8151
8152         * mini.c (mini_parse_debug_options): Fix a leak.
8153         
8154         * mini.c (mini_method_compile): Don't add the method to the jit info tables
8155         during aot compilation.
8156
8157 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
8158
8159         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
8160         it has too much register pressure.
8161
8162 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
8163
8164         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
8165
8166 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
8167
8168         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
8169         on x86.
8170
8171         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
8172         on amd64 similar to the way it is done on arm.
8173
8174         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
8175
8176         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
8177         consistency, normalize error messages, avoid loading aot-only modules in
8178         normal mode.
8179
8180         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
8181         for consistency.
8182
8183         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
8184
8185 2008-07-11  Martin Baulig  <martin@ximian.com>
8186
8187         * debug-debugger.h
8188         (MonoDebuggerInfo): Add `interruption_request'.
8189
8190 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
8191
8192         * aot-compiler.c (emit_plt): Remove some dead code.
8193
8194         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
8195
8196         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
8197         return the plt info offset belonging to a given plt entry.
8198
8199         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
8200         mono_aot_get_plt_info_offset.
8201         
8202         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
8203         similar to the amd64 code by makeing jumps through a separate jump table 
8204         instead of embedding the jump addresses into the code.
8205
8206 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
8207
8208         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
8209         method.
8210
8211 2008-07-10  Martin Baulig  <martin@ximian.com>
8212
8213         * mini.c (mini_method_compile): Disable generics sharing when
8214         running in the debugger.
8215
8216 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
8217
8218         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
8219
8220         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
8221         the local register allocator from running out of registers on x86 when 
8222         using aot.
8223
8224 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
8225
8226         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
8227         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
8228         C4146.
8229
8230         Contributed under MIT/X11 license.
8231
8232 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
8233
8234         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
8235         speed up the assembler.
8236
8237 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
8238
8239         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
8240         support.
8241
8242         * mini.c: Move the soft float handling macros a bit earlier, add 
8243         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
8244         place.
8245
8246         * mini.h: Add prototype for mono_arch_fixup_jinfo.
8247
8248         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
8249         read-only to help catch code allocation requests.
8250         
8251         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
8252         and turn it off when using --aot-only or when compiling with --aot=full.
8253
8254         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
8255         jump table for switches from the normal domain mempool, not the code
8256         manager.
8257
8258         * mini-trampolines.c (get_unbox_trampoline): New function to return an
8259         unbox trampoline which handles aot-only mode too.
8260
8261         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
8262         an AOTed unbox trampoline.
8263
8264         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
8265
8266 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
8267
8268         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
8269         ""
8270
8271         Contributed under MIT/X11 license.
8272
8273 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
8274
8275         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
8276           the unwind information for the method at the end of the allocated block.
8277           
8278         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
8279           MonoCompileArch to hold the unwind info for SEH on Winx64
8280         
8281         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
8282           frame pointer info for the method being compiled.
8283           
8284         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
8285           the call to mono_exception_from_token.
8286           
8287         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
8288           storing the method prolog information in a format that the Winx64 SEH can understand.  This
8289           information is stored a the end of the method block because it is all 32-bit offset based.
8290
8291         Contributed under MIT/X11 license.
8292
8293 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
8294
8295         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
8296
8297         * wapihandles.c: Fix warnings.
8298
8299         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
8300         mode.
8301
8302         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
8303         mono_jit_compile_method in aot-only mode since that calls the type 
8304         initializer.
8305         
8306         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
8307         get_delegate_invoke_impl in aot-only mode.
8308
8309         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
8310
8311 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
8312
8313         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
8314
8315         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
8316         is on by default.
8317
8318         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
8319
8320         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
8321         init trampoline from the AOT file as well.
8322
8323         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
8324         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
8325         code.
8326
8327         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
8328         mono_init.
8329
8330         * exceptions-amd64.c: Add _full variants for the remaining exception code
8331         creation functions as well, allow emission of relocatable code, remove
8332         caching since that is now done by the caller.
8333
8334         * mini-exceptions.c: Add _full variants for the remaining exception code
8335         creation functions as well, add aot-only support.
8336
8337         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
8338         if we can determine a proper token for them.
8339         (add_wrappers): Add a few more wrappers.
8340         (emit_method_code): Remove some dead code.
8341         (emit_trampolines): Emit exception code too.
8342
8343         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
8344
8345         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
8346         mono_array_new_va which avoids varargs.
8347
8348         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
8349
8350         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
8351         mono_arch_create_specific_trampoline () in all places.
8352
8353         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
8354         a bit so it can be used for other things as well.
8355         
8356         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
8357         on demand as well.
8358
8359         * exceptions-amd64.c: Rename the caching from the exception code creation
8360         functions, it is done by the caller instead.
8361         
8362         * exceptions-amd64.c: Change the signature of the exception code creation 
8363         functions to allow the creation of relocatable code later.
8364
8365         * mini-exceptions.c: Add a set of functions to query the various 
8366         runtime-generated exception functions.
8367
8368         * mini.c mini-exceptions.c: Use the newly added functions instead of the
8369         mono_arch_.. () functions.
8370         
8371 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
8372
8373         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
8374
8375         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
8376
8377         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
8378         (mini_get_vtable_trampoline): Ditto.
8379
8380         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
8381         code in the AOT case by returning the code size and a list of relocations to
8382         the caller.
8383
8384         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
8385
8386 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
8387
8388         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
8389           clean the stack.
8390
8391         Contributed under MIT/X11 license.
8392
8393 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
8394
8395         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
8396         so the buffer size can be computed correctly. Fixes #404735.
8397
8398         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
8399         normally as cfg->debug_info is already freed.
8400
8401 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
8402
8403         * mini-amd64.c: For calls returning vtypes in registers, don't store
8404         the return address on the stack, instead allocate a separate local for
8405         it. Fixes #404729.
8406
8407 2008-07-05  Mark Probst  <mark.probst@gmail.com>
8408
8409         * mini-trampolines.c, mini.h: Add an argument to
8410         mono_create_jit_trampoline_in_domain() for turning off the adding
8411         of the sync wrapper.
8412
8413         * mini.c: Use the JIT trampoline without sync instead of
8414         ldftn_nosync in static RGCTX invoke wrappers so that the call can
8415         be patched.
8416
8417 2008-07-04  Mark Probst  <mark.probst@gmail.com>
8418
8419         * driver.c: Turn on GSHARED optimization by default.
8420
8421 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
8422
8423         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
8424         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
8425
8426         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
8427         create a variant of the generic trampoline code callable from AOTed trampolines.
8428
8429         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
8430         trampoline code callable from AOTed trampolines.
8431
8432         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
8433
8434 2008-07-04  Mark Probst  <mark.probst@gmail.com>
8435
8436         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
8437         pass-through manner.
8438
8439         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
8440         and don't fail sharing for them anymore.
8441
8442         * mini-exceptions.c: Handle exceptions in shared generic methods.
8443
8444         * generic-sharing.c: When checking the context of a generic
8445         method, also check its class's context.  Don't treat wrappers as
8446         sharable.
8447
8448         * mini-trampolines.c: Some code factored out to
8449         metadata/generic-sharing.c.  Handle the MRGCTX case.
8450
8451         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
8452         we must deal with the method being of another instantiation of the
8453         class.  Add static rgctx invoke wrappers to generic methods.
8454
8455 2008-07-04  Mark Probst  <mark.probst@gmail.com>
8456
8457         * mini.c: Provide all jit infos of generic shared methods with a
8458         generic jit info.
8459
8460         * mini-exceptions.c: Handle the new situation that a generic info
8461         might be available, but not info about the this/vtable/mrgctx
8462         variable.
8463
8464 2008-07-03  Mark Probst  <mark.probst@gmail.com>
8465
8466         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
8467         generic methods.
8468
8469 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
8470
8471         * dominators.c (check_dominance_frontier): Fix a warning.
8472
8473         * mini.h: Add some missing prototypes.
8474
8475         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
8476
8477         * driver.c (mono_jit_init_version): Correct the comments since the first
8478         argument should be the name of the root domain, not a filename.
8479
8480         * aot-runtime.c (make_writable): Error out if this is called while running
8481         with --aot-only.
8482         (load_aot_module): Ditto.
8483
8484         * aot-compiler.c: Really fix the computation of method indexes.
8485
8486         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
8487         optimizations as this is no longer called frequently.
8488
8489         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
8490         method and the invoke impl code and pass it to the delegate trampoline instead of
8491         just the delegate class.
8492
8493 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
8494
8495         * aot-compiler.c: Fixup the computation of method indexes.
8496         (add_wrappers): Create the base methods of the runtime invoke wrappers using
8497         the method builder infrastructure.
8498
8499         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
8500         has no header.
8501
8502         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
8503         mode, load the method right away instead of creating a trampoline.
8504
8505         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
8506
8507         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
8508         some checks a bit.
8509
8510 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
8511
8512         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
8513         (mono_aot_load_method): Use method_index instead of method->token.
8514
8515         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
8516         can handle icalls etc. properly.
8517
8518         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
8519
8520         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
8521
8522         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
8523         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
8524         JIT_ICALL_ADDR patch type.
8525
8526         * patch-info.h: Add JIT_ICALL_ADDR patch type.
8527
8528         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
8529         request flag.
8530         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
8531
8532         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
8533
8534 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
8535
8536         * mini.c: Use domain->jit_code_hash_lock for controlling access to
8537         domain->jit_code_hash.
8538
8539 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
8540
8541         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
8542
8543 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
8544
8545         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
8546         get_this_arg_from_call, let it compute it when needed.
8547
8548         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
8549         gsctx from code only when needed.
8550
8551         * mini-trampolines.c (get_generic_context): Rename this to 
8552         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
8553         it can be called by the arch backends.
8554
8555         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
8556
8557 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
8558
8559         * driver.c (mono_main): Add experimental --aot-only command line option.
8560
8561         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
8562         set.
8563
8564 2008-06-26  Kornel Pal  <kornelpal@gmail.com>
8565
8566         * driver.c (DllMain): Remove mono_module_handle.
8567
8568         Contributed under MIT/X11 license.
8569
8570 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
8571
8572         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
8573         for emitting methods which are not in the source assembly. Detect and report
8574         failure of assembling+linking.
8575         
8576         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
8577
8578         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
8579
8580 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
8581
8582         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
8583
8584 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
8585
8586         * mini.h: Remove some obsolete prototypes.
8587
8588         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
8589
8590 2008-06-24  Mark Probst  <mark.probst@gmail.com>
8591
8592         * mini.c (get_object_generic_inst): Variable-sized arrays are not
8593         supported by Visual Studio, so use alloca().
8594
8595 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
8596
8597         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
8598         Fixes #402585.
8599
8600 2008-06-23  Mark Probst  <mark.probst@gmail.com>
8601
8602         * mini.c: Fail sharing of a generic method if it contains an open
8603         catch clause (because we don't pass MRGCTXs yet).
8604
8605 2008-06-23  Mark Probst  <mark.probst@gmail.com>
8606
8607         * mini.c: When compiling a method with generic sharing, insert the
8608         method instantiated with an all-Object generic context into the
8609         jit info table, instead of the context of the first instantiation
8610         of the method we happen to compile.
8611
8612 2008-06-18  Martin Baulig  <martin@ximian.com>
8613
8614         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
8615         `major_version' and `minor_version'.
8616
8617 2008-06-17  Mark Probst  <mark.probst@gmail.com>
8618
8619         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
8620         mono_method_is_generic_sharable_impl() takes an additional
8621         argument specifying whether to treat type variables as reference
8622         types.
8623
8624 2008-06-17  Mark Probst  <mark.probst@gmail.com>
8625
8626         * mini.h: Removed obsolete prototypes.
8627
8628 2008-06-17  Mark Probst  <mark.probst@gmail.com>
8629
8630         * mini.c: Don't fail generic sharing for initobj and sizeof - we
8631         already handle them.
8632
8633 2008-06-17  Mark Probst  <mark.probst@gmail.com>
8634
8635         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
8636         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
8637         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
8638         tramp-x86.c: Added a MonoGenericContext* argument to
8639         mono_arch_get_unbox_trampoline() so that it can call other
8640         functions which require it.
8641
8642 2008-06-17  Mark Probst  <mark.probst@gmail.com>
8643
8644         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
8645         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
8646         mono_arch_get_this_arg_from_call() takes a
8647         MonoGenericSharingContext* as well.
8648
8649 2008-06-17  Mark Probst  <mark.probst@gmail.com>
8650
8651         * mini.c: Factor out code for emitting unbox into emit_unbox() and
8652         implement generic sharing of unbox.
8653
8654 2008-06-17  Mark Probst  <mark.probst@gmail.com>
8655
8656         * mini.c: Don't compute the vtable to determine whether a field is
8657         special static, because it might not work for open types.
8658
8659 2008-06-17  Mark Probst  <mark.probst@gmail.com>
8660
8661         * mini.c: Removed the unused token_type and token_source arguments
8662         from get_runtime_generic_context_ptr().
8663
8664 2008-06-17  Marek Habersack  <mhabersack@novell.com>
8665
8666         * mini.c (ADD_BINOP): fix the build
8667
8668 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
8669
8670         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
8671         a widening op.
8672
8673 2008-06-16  Mark Probst  <mark.probst@gmail.com>
8674
8675         * mini.h: Removed class relations enum that's not used anymore.
8676
8677 2008-06-16  Mark Probst  <mark.probst@gmail.com>
8678
8679         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
8680
8681         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
8682         the lazy fetch trampoline access code.
8683
8684 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
8685
8686         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
8687
8688 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
8689
8690         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
8691
8692         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
8693
8694         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
8695
8696 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
8697
8698         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
8699         intrinsics.
8700
8701         * mini-ops.h: Add MIN/MAX_UN opcodes.
8702
8703         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
8704         intrinsics.
8705
8706         * basic-math.cs: Add more min/max tests.
8707
8708         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
8709
8710 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8711
8712         * mini.c: Small fix in the prologue of emit_castclass.
8713
8714 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
8715
8716         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
8717
8718         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
8719         do not work even for unsigned types. Fixes #400014.
8720
8721         * basic-math.cs: Add regression tests for unsigned Min/Max.
8722
8723 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8724
8725         * mini.c: Added additional context_used argument to several
8726         functions, which will be needed for sharing generic methods.  Use
8727         GET_RGCTX macro wherever appropriate.  Declare only one
8728         context_used in mono_method_to_ir().
8729
8730 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8731
8732         * mini.c, generic-sharing.c: Removed generic class relations.
8733
8734         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
8735         functions due to MRGCTX changes.
8736
8737 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8738
8739         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
8740         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
8741         with calculated IMT.
8742
8743         * mini.c: Generic sharing of calls via generic interfaces.
8744
8745         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
8746         generic method with non-constant MonoGenericContext*.  Instead,
8747         the context is taken out of the method itself.
8748
8749 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8750
8751         * mini.c: Generic sharing of ldvirtftn.
8752
8753 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8754
8755         * mini.c: Generic sharing of ldftn.
8756
8757 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8758
8759         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
8760
8761 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8762
8763         * mini.c: Generic sharing of the special case of ldtoken followed
8764         by a call to GetTypeFromHandle.
8765
8766 2008-06-13  Mark Probst  <mark.probst@gmail.com>
8767
8768         * mini.c: Generic sharing of box for nullable types.
8769
8770 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
8771
8772         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
8773         are passed on the stack. Fixes #324807.
8774
8775 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
8776
8777         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
8778         for the ArgValuetypeAddrInIReg case.
8779
8780         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
8781         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
8782
8783         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
8784         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
8785         local variable and pass the local variable by reference to the called method.
8786           
8787         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
8788         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
8789
8790         Contributed under MIT/X11 license.
8791
8792 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
8793
8794         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
8795
8796         * debug-mini.c (mono_debug_print_vars): Release memory after printing
8797         everything.
8798
8799 2008-06-10  Martin Baulig  <martin@ximian.com>
8800
8801         * debug-mini.c
8802         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
8803
8804 2008-06-09  Kornel Pal  <kornelpal@gmail.com>
8805
8806         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
8807         possible error when no arguments are passed.
8808
8809         Contributed under MIT/X11 license.
8810
8811 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
8812
8813         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
8814         where the file name is NULL.
8815
8816 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
8817
8818         * mini.c: Fix s390 build.
8819
8820 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
8821
8822         * trace.c (mono_trace_parse_options): Fix warnings.
8823
8824         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
8825
8826 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
8827
8828         * mini.c (remove_block_if_useless): Avoid printing the method name.
8829         
8830         * mini.c: Remove needless setting of ins->cil_code which is now done by 
8831         MONO_INST_NEW.
8832
8833         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
8834         LMF. Not yet used.
8835
8836         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
8837         translated code after it has been patched.
8838
8839 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
8840
8841         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
8842         avoid problems during code patching on SMP systems.
8843         (emit_call): Avoid adding a patch info which is already added by 
8844         emit_call_body.
8845         (mono_arch_emit_exceptions): Ditto.
8846
8847 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
8848
8849         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
8850         MONO_TYPE_ISSTRUCT already checks for it.
8851
8852 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
8853
8854         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
8855           structs with floats on Winx64 the float registers are not used.  
8856           The integer registers are always used..
8857         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
8858           only one register will be used and only if the size of the struct 
8859           is 1,2,4, or 8 bytes.
8860
8861         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
8862           to work for Winx64.
8863
8864         Contributed under MIT/X11 license.
8865
8866 2008-06-05  Martin Baulig  <martin@ximian.com>
8867
8868         * debug-debugger.c (debugger_lookup_class): Also call
8869         mono_class_setup_methods() here; we're only called from RTI.
8870
8871 2008-06-05  Andreas Farber  <andreas.faerber@web.de>
8872
8873         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
8874         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
8875         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
8876         Post-process object files and add dtrace-generated object, if necessary.
8877
8878         Contributed under MIT/X11 license.
8879
8880 2008-06-04  Mark Probst  <mark.probst@gmail.com>
8881
8882         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
8883         element class.
8884
8885         * mini.c: Generic sharing for unbox.any and castclass.
8886
8887 2008-06-04  Mark Probst  <mark.probst@gmail.com>
8888
8889         * mini.c: Ignore tailcall prefix in shared generic code and when
8890         doing calls which require a vtable/rgctx argument.
8891
8892 2008-06-04  Mark Probst  <mark.probst@gmail.com>
8893
8894         * mini.c: Don't free the JIT info.
8895
8896         * driver.c: Changes in the JIT info table testing code.
8897
8898 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
8899
8900         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
8901         interruption. Fix some warnings.
8902
8903         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
8904         interruption_checkpoint.
8905
8906 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
8907
8908         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
8909         from embedding applications.
8910
8911 2008-06-02  William Holmes  <billholmes54@gmail.com>
8912
8913         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
8914           reserving 32 bytes on the stack when making calls. 
8915
8916         Contributed under MIT/X11 license.
8917
8918 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
8919
8920         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
8921         the linear IL branch.
8922
8923         * driver.c: Print out more information for --version on arm.
8924
8925 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
8926
8927         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
8928         bb_exit instead, since out of line bblocks might not actually be emitted
8929         out-of-line.
8930         
8931         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
8932         maximum epilog size for out of line bblocks if tracing is enabled.
8933
8934         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
8935
8936 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
8937
8938         * arrays.cs: Regression tests for allocating arrays with negative sizes.
8939
8940 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
8941
8942         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
8943         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
8944         opcodes.
8945
8946 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
8947
8948         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
8949         the 'value' to store is a constant.
8950
8951         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
8952
8953         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
8954         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
8955
8956 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
8957
8958         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
8959         for accessing method->generic_container.
8960
8961 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
8962
8963         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
8964         
8965         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
8966
8967         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
8968
8969         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
8970         fails.
8971
8972 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
8973
8974         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
8975
8976         * mini.c: Handle the case when mono_class_vtable () fails.
8977
8978 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
8979         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
8980         the stat profiler.
8981
8982 2008-05-22  Mark Probst  <mark.probst@gmail.com>
8983
8984         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
8985         together with domain sharing.
8986
8987 2008-05-22  Mark Probst  <mark.probst@gmail.com>
8988
8989         * mini.c: Treat callvirts to final methods like non-virtual calls
8990         when doing generic sharing, i.e. look them up in the runtime
8991         generic context.
8992
8993 2008-05-22  Mark Probst  <mark.probst@gmail.com>
8994
8995         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
8996         with computed types (for generic sharing).
8997
8998         * mini.c: Generic sharing for mkrefany and refanyval.
8999
9000 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
9001
9002         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
9003         possible.
9004
9005         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
9006         the generic sharing code.
9007         
9008         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
9009         when needed.
9010
9011 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
9012
9013         * mini.h: Remove the declaration of mono_aot_init_vtable ().
9014
9015 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
9016
9017         * driver.c: updated copyright date
9018
9019 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
9020
9021         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
9022         needed.
9023
9024 2008-05-19  Martin Baulig  <martin@ximian.com>
9025
9026         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
9027         pointing to the new `_mono_debug_using_mono_debugger' variable.
9028
9029         * driver.c
9030         (mono_main): Check mono_debug_using_mono_debugger() rather than
9031         the `MONO_INSIDE_MDB' environment variable to check whether we're
9032         inside the debugger.
9033
9034 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
9035
9036         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
9037         argument.
9038
9039 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
9040
9041         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
9042
9043         * mini.c: Added mini_assembly_can_skip_verification. This
9044         function checks if the assembly requested to skip verification. 
9045         Fixes part of #387274.
9046
9047 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
9048
9049         * mini.c (mini_get_method): Disable the check for open generic classes when
9050         using generic sharing.
9051
9052         * generics.cs: Add a test for #387034.
9053
9054         * mini.c (mini_get_method): Check whenever the method class is an open generic
9055         type, and return NULL in that case, causing a verification error. Fixes
9056         #384123.
9057
9058 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
9059
9060         * driver.c (mono_main): Revert r102623. The right
9061         thing to do is to enable the verifier under verifiable
9062         unless a --security flag was passed.
9063
9064         We need this non-trivial behavior for --verify-all otherwise
9065         mcs-compileall won't be able to use it. As it needs everything to
9066         be verified under validil.
9067
9068 2008-05-06  Martin Baulig  <martin@ximian.com>
9069
9070         Fix #383749.
9071
9072         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
9073         (mono_debugger_thread_cleanup): Likewise.
9074         (mono_debugger_extended_notification): Likewise.
9075
9076 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
9077
9078         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
9079         against both inflated and non-inflated methods. We need to check against the
9080         generic definition for cases where the instantiated method is not visible.
9081         We need to check against the inflated types for cases where the instantiation
9082         changes any super type. This fixes #382986.
9083
9084         Note that this doesn't need to be applied to other parts of mono_method_to_ir
9085         that check for visibiliy as generic params only appears as the type subject
9086         of tokens on call opcodes. Field manipulation and ldftn must always
9087         target an exact type.
9088
9089 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
9090
9091         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
9092         if no related --security flag is passed.
9093
9094 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
9095
9096         * mini-arch.h: Prepare support for ppc64.
9097
9098         Contributed under MIT/X11 license.
9099
9100 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
9101
9102         * aot-runtime.c: Prepare support for ppc64.
9103
9104         Contributed under MIT/X11 license.
9105
9106 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
9107
9108         * mini-ops.h: Prepare support for ppc64.
9109
9110         Contributed under MIT/X11 license.
9111
9112 2008-05-04  Andreas Farber  <andreas.faerber@web.de>
9113
9114         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
9115
9116         Contributed under MIT/X11 license.
9117
9118 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
9119
9120         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
9121         assemblies, since aot_name is not a full path, causing us to load MS.NET 
9122         assemblies on windows.
9123
9124 ?2008-04-28  Kornel Pal  <kornelpal@gmail.com>
9125
9126         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
9127         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
9128         * main.c: Use UTF-8 encoded command line instead of Windows default code
9129         page on Windows to support Unicode.
9130         * driver.c (DllMain): New function for mixed-mode assembly support.
9131         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
9132         export __stdcall functions without decoration.
9133
9134         Contributed under MIT/X11 license.
9135
9136 2008-04-28  Mark Probst  <mark.probst@gmail.com>
9137
9138         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
9139         saving it very early.
9140
9141 2008-04-28  Mark Probst  <mark.probst@gmail.com>
9142
9143         * mini.h, mini.c: Lots of code for accessing the old RGCTX
9144         deleted.  The only way to access the new RGCTX is via the
9145         trampline.
9146
9147         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
9148         vtable instead of the RGCTX to static methods.
9149
9150         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
9151         accessing the new RGCTX.
9152
9153         * generic-sharing.c: There is no separation between self, type
9154         arguments and other types in the RGCTX anymore.
9155
9156 2008-04-25  Jonathan Chambers <joncham@gmail.com>
9157
9158         * mini-amd64.c (add_general): Remove previous stack adjustment.
9159         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
9160         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
9161         for 32 bytes of stack space reserved for all calls.
9162         
9163         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
9164         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
9165         adjustment.
9166         
9167         Code contributed under MIT/X11 license.
9168
9169 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
9170
9171         * mini.c (mini_method_verify): Only verify non-inflated methods, check
9172         against the root definition, peeling out method and type instantiations.
9173         Cache verify success results, code that fails verification is still
9174         checked multiple times.
9175
9176 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
9177
9178         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
9179
9180 2008-04-23  Jonathan Chambers <joncham@gmail.com>
9181
9182         * mini-amd64.c (add_general): Always increment stack on Win64.
9183         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
9184         on Win64.
9185         
9186         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
9187         stack based argument handling on Win64.
9188         
9189         Code contributed under MIT/X11 license.
9190
9191 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
9192
9193         * Makefile.am (version.h): Add support for git-svn.
9194
9195 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
9196
9197         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
9198         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
9199         avoiding allocations and libc functions which might deadlock.
9200         
9201         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
9202         'no-gdb-backtrace' option is set.
9203
9204         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
9205
9206         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
9207
9208 2008-04-21  Martin Baulig  <martin@ximian.com>
9209
9210         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
9211         and `get_lmf_addr'; `notification_address' is no longer a pointer.
9212
9213 2008-04-21  Martin Baulig  <martin@ximian.com>
9214
9215         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
9216         `thread_vtable', `event_handler_ptr' and `event_handler'.
9217
9218 2008-04-21  Martin Baulig  <martin@ximian.com>
9219
9220         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
9221         allows delayed initialization of the `executable_code_buffer' when
9222         attaching.
9223
9224 2008-04-21  Martin Baulig  <martin@ximian.com>
9225
9226         * mini.h (mono_debugger_create_notification_function): Removed.
9227         * tramp-*.c (mono_debugger_create_notification_function): Removed.
9228
9229         * mdb-debug-info64.s
9230         (MONO_DEBUGGER__notification_function): Added this in the .text section.
9231
9232         * mdb-debug-info32.s
9233         (MONO_DEBUGGER__notification_function): Added this in the .text section.
9234
9235         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
9236         currently only works on x86 and x86_64, so don't create it on ppc.
9237
9238 2008-04-21  Martin Baulig  <martin@ximian.com>
9239
9240         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
9241
9242         * mini.c
9243         (mini_method_compile): In the fp elimination check, check
9244         `debug_options.mdb_optimizations' in addition to
9245         mono_debug_using_mono_debugger().       
9246
9247         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
9248         disable some JIT optimizations which are only disabled when
9249         running inside the debugger.
9250         Added `--help-debug' option to describe the debugging options.
9251         (parse_debug_options): New static function to parse the `--debug'
9252         options, so we can easily add more stuff in future.
9253
9254 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
9255
9256         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
9257         the method has no body.
9258
9259 2008-04-19  Jonathan Chambers <joncham@gmail.com>
9260
9261         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
9262         assembly is not allowed in MSVC 64-bit compiler. 
9263         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
9264         as we get floating point exceptions everywhere.
9265         
9266         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
9267         correctly align arguments for call to throw_exception.
9268         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
9269         
9270         Code contributed under MIT/X11 license.
9271
9272 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
9273
9274         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
9275
9276 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
9277
9278         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
9279
9280         * mini-amd64.c (NEW_INS): Set cil_code.
9281
9282         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
9283         from mini-amd64.c so all debugger related logic is in one place.
9284
9285         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
9286         later won't have a random ip assigned to them.
9287
9288 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
9289
9290         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
9291         the arch specific function initializes code_size.
9292         (mono_create_delegate_trampoline): Ditto.
9293
9294         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
9295         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
9296         platforms.
9297
9298         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
9299         running under the debugger.
9300
9301         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
9302         debugger.
9303
9304         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
9305         debugger. Also move the disabling of optimizations here from driver.c.
9306         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
9307         debugger.
9308
9309         * mini.h (MonoCompile): Add a few new flags.
9310
9311 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
9312
9313         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
9314         so the cil_code field of created MonoInst's is properly set.
9315         (mini_select_instructions): Ditto.
9316
9317         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
9318         (MONO_INST_NEW_CALL): Ditto.
9319
9320         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
9321         in many places so the ins->cil_code field is properly initialized.
9322
9323         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
9324         place.
9325
9326 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
9327
9328         * mini.c (mini_method_compile): Print a different message when compiling a 
9329         shared method.
9330         
9331         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
9332         > 1.
9333
9334 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
9335
9336         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
9337         SSE2 instructions.
9338
9339         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
9340         
9341 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
9342
9343         * mini.c (handle_stack_args): Make this return void since its return value was
9344         never used. Also set cfg->unverifiable for invalid IL instead of calling
9345         G_BREAKPOINT ().
9346
9347 2008-04-10  Mark Probst  <mark.probst@gmail.com>
9348
9349         * mini.c: Make sure "this" is live in catch clauses with type
9350         variables in shared generic code.
9351
9352 2008-04-08  Mark Probst  <mark.probst@gmail.com>
9353
9354         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
9355         generic_class_is_reference_type() to ensure the proper behaviour
9356         when sharing generic code and the type in question is a type
9357         argument.
9358
9359 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
9360
9361         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
9362         race conditions when printing thread dumps. Fixes #377738.
9363
9364 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
9365         
9366         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
9367         shows up when both MonoInst arguments can cause aliasig.
9368         There is likely no way in the current JIT to trigger this problem, but
9369         it showed up in the development of generics sharing, when in a new
9370         opcode both args of an OP_GROUP can be aliases (addresses of a local).
9371         When the generics sharing code will be committed, its tests will be
9372         valid also for this bug.
9373
9374 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
9375
9376         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
9377         PATCH_INFO_METHOD.
9378
9379         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
9380         NULL.
9381
9382 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
9383
9384         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
9385         use a more detailed exception message for InvalidCastException.
9386
9387         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
9388
9389         * driver.c (mono_main): Add --debug=casts option to turn on better 
9390         InvalidCastException message details.
9391
9392         * mini.c (mini_get_debug_options): New helper function to return the address of
9393         the debug_options variable.
9394
9395         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
9396         the jit_tls TLS variable.
9397
9398         * mini.c (mono_jit_tls): New TLS variable.
9399
9400         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
9401         option is used.
9402
9403 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
9404
9405         * mini.h: Removed verifer related stuff. This code was moved to verify.c
9406
9407         * mini.c: Removed verifer related stuff, code moved to verify.c.
9408
9409         * driver.c: Using code from verify.c instead of mini.c.
9410
9411 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
9412
9413         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
9414         longer valid.
9415
9416 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
9417
9418         * mini.c (check_for_method_verify): Enabling verification of
9419         corlib if mono_verify_all is set. Bugs in the verifier preventing that
9420         have been fixed.
9421
9422 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
9423
9424         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
9425         caller saved registers as well.
9426         
9427         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
9428         saved registers as well.
9429
9430 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
9431
9432         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
9433
9434         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
9435         code.
9436
9437 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
9438
9439         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
9440         to get_call_info.
9441         (get_call_info): Take a gsctx argument instead of 'cfg'.
9442
9443 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
9444
9445         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
9446         mono_verify_all is set.
9447
9448         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
9449
9450         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
9451
9452 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
9453
9454         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
9455         an exception.
9456
9457         * driver.c mini.c mini.h: Add a --verify-all development option to test the
9458         verifier and the code generated by the compiler.
9459
9460 2008-03-25  Mark Probst  <mark.probst@gmail.com>
9461
9462         * mini.c: Generic sharing of the non-nullable case of the box
9463         instruction.
9464
9465 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
9466
9467         * inssel.brg: Fix the build.
9468
9469         * iltests.il.in: Add a test for lconv.ovf.u8.un.
9470
9471 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
9472
9473         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
9474         Array:Address. Fixes #372410.
9475
9476         * iltests.il.in: New tests for readonly prefix.
9477
9478 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
9479
9480         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
9481         mini-trampolines.c.
9482
9483         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
9484         mini-exceptions.c.
9485
9486         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
9487         
9488         * mini.c (mono_decompose_op_imm): New helper function.
9489
9490         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
9491         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
9492         return value.
9493
9494         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
9495         mono_arch_output_basic_block. Fix warnings.
9496
9497         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
9498         for now.
9499
9500 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
9501
9502         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
9503         since the extra frame is now detected automatically inside the loop.
9504
9505         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
9506         opts which are now in mono_peephole_ins ().
9507         
9508         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
9509
9510         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
9511         frames and skip duplicate managed-to-native frames. Fixes #367665.
9512
9513         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
9514         opts which are now in mono_peephole_ins ().
9515         (mono_arch_peephole_pass_2): Ditto.
9516
9517         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
9518
9519         * mini-codegen.c (mono_peephole_ins): New helper function containing the
9520         arch independent peephole optimizations.
9521
9522         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
9523         opts which are now in mono_peephole_ins ().
9524
9525         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
9526         
9527         * mini-s390.c (mono_arch_output_basic_block): Fix build.
9528
9529         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
9530         pattern.
9531
9532         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
9533         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
9534         opcode. 
9535
9536 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
9537
9538         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
9539         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
9540         return value.
9541
9542         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
9543         mono_arch_output_basic_block. Fix warnings.
9544
9545 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
9546
9547         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
9548         conv.ovf.u.un.
9549
9550 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
9551
9552         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
9553         conv.ovf.u.un.
9554
9555         * iltests.il: Add new tests.
9556
9557 2008-03-20  Kornel Pal  <kornelpal@gmail.com>
9558
9559         * mini.c: Removed Windows version macros.
9560
9561 2008-03-20  Mark Probst  <mark.probst@gmail.com>
9562
9563         * generic-sharing.c: Put reflection types in the extensible part
9564         of the runtime generic context.
9565
9566         * mini.c: Generic sharing of the GetTypeHandle special case of the
9567         ldtoken instruction.
9568
9569 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
9570
9571         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
9572
9573         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
9574         
9575         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
9576         consistency with the other version on the linear IR branch.
9577
9578         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
9579
9580         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
9581
9582         * iltests.il.in: Add new tests.
9583
9584 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
9585
9586         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
9587
9588         * iltests.il.in: Add new tests.
9589
9590 2008-03-19  Mark Probst  <mark.probst@gmail.com>
9591
9592         * mini.c: Two variables with the same name were declared in
9593         nesting contexts and one wasn't initialized.  Fixed.
9594
9595 2008-03-19  Mark Probst  <mark.probst@gmail.com>
9596
9597         * mini.c: Generic sharing of the initobj instruction.
9598
9599 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
9600
9601         * mini.c: make the test to optimize ldtoken from typeof() more
9602         precise.
9603
9604 2008-03-18  Mark Probst  <mark.probst@gmail.com>
9605
9606         * mini.c: Generic sharing of the initobj instruction for reference
9607         types.
9608
9609 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
9610
9611         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
9612         the mono_breakpoint_clean_code() code to perform bound checks.
9613
9614 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
9615
9616         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
9617         mono_arch_patch_callsite() to include the start of the managed method
9618         to be able to perform bound checks.
9619
9620 2008-03-17  Mark Probst  <mark.probst@gmail.com>
9621
9622         * mini.c: Generic sharing for the isinst instruction.
9623
9624 2008-03-17  Mark Probst  <mark.probst@gmail.com>
9625
9626         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
9627         inssel-long32-mips.brg: Added opcodes for doing indirect calls
9628         with the runtime generic context argument.
9629
9630         * mini.c: Share calls to several types of unsharable methods by
9631         putting the address of the method code in the runtime generic
9632         context and doing an indirect call.
9633
9634         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
9635         to switches.
9636
9637 2008-03-16  Mark Probst  <mark.probst@gmail.com>
9638
9639         * generic-sharing.c: Change due to a change in the runtime genric
9640         context API.
9641
9642 2008-03-15  Martin Baulig  <martin@ximian.com>
9643
9644         * tramp-x86.c
9645         (mono_arch_nullify_class_init_trampoline): Add call to
9646         mono_breakpoint_clean_code() to make things work when running
9647         inside the debugger.
9648
9649         * tramp-amd64.c
9650         (mono_arch_nullify_class_init_trampoline): Add call to
9651         mono_breakpoint_clean_code() to make things work when running
9652         inside the debugger.
9653
9654 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
9655
9656         * inssel-long.brg (reg): Fix 64 bit build.
9657
9658 2008-03-14  Mark Probst  <mark.probst@gmail.com>
9659
9660         * mini.c, mini.h: Share static generic code by passing it an
9661         implicit argument pointing to the runtime generic context.
9662
9663         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
9664         inssel-long32-mips.brg: New opcodes for calling shared static,
9665         which need to be passed the runtime generic context.
9666
9667         * mini-amd64.c, mini-x86.c: Save the runtime generic context
9668         argument on the stack in the prologue if needed.  New function for
9669         finding the runtime generic context argument from the registers
9670         saved by the trampoline.
9671
9672         * mini-amd64.h, mini-x86.h: Specify which register to use for the
9673         runtime generic context argument.
9674
9675         * tramp-amd64.c: Also restore the register used for the runtime
9676         generic context argument.
9677
9678         * mini-trampoline.c: Resolve shared static calls by consulting the
9679         runtime generic context via the new argument.
9680
9681         * generic-sharing.c: Add an argument to sharability-checking
9682         functions that specifies whether type variables should be treated
9683         as sharable type arguments.
9684
9685         * inssel-x86.brg: Removed a superfluous, buggy rule.
9686
9687         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
9688         to switches.
9689
9690 2008-03-14  Martin Baulig  <martin@ximian.com>
9691
9692         * debug-debugger.c (main_thread_handler): Call
9693         mono_runtime_run_main() without sending any notifications.
9694
9695         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
9696
9697 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
9698
9699         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
9700
9701 2008-03-14  Mark Probst  <mark.probst@gmail.com>
9702
9703         * tramp-x86.c: Fixed register restore offsets in the trampoline
9704         code for ECX and EDX.
9705
9706 2008-03-12  Geoff Norton  <gnorton@novell.com>
9707
9708         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
9709         different ucontext_t implementations.
9710         * exceptions-arm.c: Use the above defines to get exceptions working on 
9711         iPhone (based on a patch by Luke Howard lukeh@padl.com)
9712         * mini-arm.c: Implement iPhone icache support (based on a patch by
9713         Luke Howard lukeh@padl.com)
9714
9715 2008-03-12  Mark Probst  <mark.probst@gmail.com>
9716
9717         * mini.c: Enable generic sharing of calls to non-static
9718         non-interface non-generic non-value-type methods.
9719
9720         * mini-trampolines.c: Resolve calls from shared generic code.
9721
9722 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
9723
9724         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
9725
9726         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
9727
9728 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
9729
9730         * mini.c: some fixes for the AOT compiler.
9731
9732 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
9733
9734         * cpu-amd64.md: Add clob:1 to some float opcodes.
9735
9736 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
9737
9738         * mini.h: Added MiniVerifierMode enumeration.
9739
9740         * mini.c: Added mini_verifier_set_mode to control
9741         the usage of the new verifier.
9742
9743         * mini.c (mono_method): Integrated the new verifier.
9744
9745         * driver.c: Extended --security option with validil and
9746         verifiable options to activate the new verifier.
9747
9748 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
9749
9750         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
9751         optimization to ctors taking 0 or 2 arguments too.
9752
9753         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
9754         a bit.
9755
9756         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
9757
9758         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
9759
9760 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
9761
9762         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
9763         non-aot case as well.
9764
9765         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
9766
9767         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
9768         changes.
9769
9770         * aot-compiler.c (encode_patch): Ditto.
9771
9772         * mini.h (G_MININT32): Fix the definition of this.
9773
9774 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
9775
9776         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
9777
9778         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
9779
9780 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
9781
9782         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
9783         methods returning vtypes in registers.
9784         (mono_arch_allocate_vars): Ditto.
9785
9786         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
9787
9788         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
9789
9790         * generics.cs: Add a test from the linear IR branch.
9791
9792         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
9793
9794         * mini.c (inline_method): Cache failed inline attempts.
9795
9796 2008-03-04  Mark Probst  <mark.probst@gmail.com>
9797
9798         * mini.c: For shared methods of generic classes put the location
9799         of "this" into the MonoGenericJitInfo.
9800
9801         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
9802         register out of a MonoContext by register number.  Add the generic
9803         sharing context as an argument to mono_arch_find_this_argument().
9804
9805         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
9806         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
9807         for new arch function.
9808
9809         * mini-exception.c: Handle open exception clauses in shared
9810         generic code.
9811
9812         * mini-trampolines.c: Supply additional argument to
9813         mono_arch_find_this_argument().
9814
9815 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
9816
9817         * Makefile.am (regtests): Run the bench.exe tests last.
9818
9819 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
9820
9821         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
9822         a bit.
9823
9824 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
9825
9826         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
9827         with MS.
9828
9829         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
9830         
9831         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
9832
9833         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
9834         whose class has no cctor.
9835
9836         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
9837
9838 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
9839
9840         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
9841         unverified.
9842
9843 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
9844
9845         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
9846         to be in sync with the code on the linear IR branch.
9847
9848         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
9849
9850         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
9851
9852 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
9853
9854         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
9855
9856         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
9857
9858         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
9859
9860         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
9861
9862         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
9863         
9864         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
9865         body.
9866
9867 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
9868
9869         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
9870         OP_LOADR4_MEMBASE emission.
9871
9872         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
9873         (mono_spillvar_offset_float): Ditto.
9874
9875         * mini-mips.c (mono_arch_emit_prolog): Ditto.
9876
9877         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
9878         emission.
9879
9880         * basic-long.cs: Add regression tests for them.
9881
9882         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
9883         use.
9884         (mono_arch_allocate_vars): Fix representation of single-precision float
9885         argument.
9886         (mono_arch_output_basic_block): Ditto.
9887
9888         * inssel-mips.brg: Ditto, remove duplicate items.
9889
9890         * mini-mips.c (emit_load_volatile_arguments): New function to handle
9891         arguments of tail calls as on other platforms.
9892         (mono_arch_output_basic_block): Handle tail calls.
9893
9894         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
9895         register.
9896
9897         * objects.cs (test_5_pass_static_struct): Add test for it.
9898
9899         Contributed under MIT/X11 license.
9900
9901 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
9902
9903         * Makefile.am: Use gmcs for compiling the regression tests.
9904
9905         * *.2.cs *.2.il: Rename to *.cs and *.il.
9906
9907 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
9908
9909         * regalloc.h: Make the vassign array smaller.
9910
9911         * mini.c (mini_method_compile): Remove an unused field in cfg.
9912
9913         * mini-codegen.c: Add a bunch of micro optimizations.
9914
9915 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
9916
9917         * regalloc.h: Remove some unused fields.
9918
9919 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
9920
9921         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
9922
9923         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
9924
9925 2008-02-22  Mark Probst  <mark.probst@gmail.com>
9926
9927         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
9928
9929         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
9930         trampoline: Fetch an entry from the runtime generic context.  If
9931         it's NULL, jump to the actual trampoline to fill the runtime
9932         generic context.  Otherwise, return it.
9933
9934         * mini.c: Call the lazy fetch trampoline to get entries out of the
9935         runtime generic context.
9936
9937         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
9938         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
9939         tramp-sparc.c: Stubs for the lazy fetch trampoline.
9940
9941 2008-02-21  Mark Probst  <mark.probst@gmail.com>
9942
9943         * mini.c: Fetch data out of the extensible part of the runtime
9944         generic context instead of calling a helper function.
9945
9946         * generic-sharing.c: Some functions moved into
9947         metadata/generic-sharing.c.  Helper function for fetching other
9948         types now checks and asserts against extensible rgctx (just for
9949         debugging purposes - the helper function isn't called anymore
9950         unless for debugging).
9951
9952 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
9953
9954         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
9955         for tail calls up to the point that the tests in iltests.exe run. Also add a
9956         dummy CKFINITE implementation.
9957         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
9958         needed for trampoline LMF frames.
9959
9960         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
9961         trampoline LMF frames.
9962
9963 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
9964
9965         * mini.c (inline_method): clean any pending loader error when inlining fail.
9966         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
9967
9968 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
9969
9970         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
9971
9972         * aot-runtime.c (decode_patch_info): Ditto.
9973
9974         * mini.c (mono_resolve_patch_target): Ditto.
9975         
9976         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
9977         icall wrappers.
9978
9979         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
9980         
9981         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
9982         if it references an icall address.
9983
9984 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
9985
9986         * cpu-s390x.md: Remove some more unused opcodes.
9987         
9988         * cpu-s390x.md: Remove some unused opcodes.
9989
9990         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
9991         mono_op_imm_to_op ().
9992
9993         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
9994         instead of a switch statement.
9995         
9996         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
9997         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
9998
9999         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
10000         
10001         * mini-codegen.c: Remove unused mono_regstate2_... functions.
10002
10003         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
10004         -1.
10005
10006 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
10007
10008         * driver.c (mono_main): Improve error reporting when an assembly cannot be
10009         opened. Fixes #362607.
10010
10011         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
10012
10013         * iltests.il.in: Add a test for static methods in interfaces.
10014
10015 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
10016
10017         * genmdesc.c (build_table): Fix a crash on older glib versions.
10018
10019         * cpu-sparc.md: Remove some unused opcodes.
10020         
10021         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
10022         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
10023
10024         * cpu-amd64.md: Remove some unused opcodes.
10025
10026         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
10027         like the other opcodes.
10028
10029 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
10030
10031         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
10032
10033         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
10034
10035         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
10036         variables 'cfg' instead of 'm' for consistency.
10037
10038         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
10039
10040         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
10041         argument holding the vtype return address, to avoid the ambigious use of
10042         cfg->ret for this purpose.
10043
10044         * mini.c (NEW_RETLOADA): Use vret_addr if set.
10045
10046         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
10047         
10048         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
10049         new mono_print_ins () function which only takes one argument.
10050
10051 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
10052
10053         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
10054         macro arguments.
10055
10056 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
10057
10058         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
10059
10060         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
10061
10062         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
10063         opcodes and other small changes.
10064
10065         * mini-ops.h: Add some new opcodes from the linear IR branch.
10066
10067         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
10068
10069         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
10070         opcodes, use the REG_MEMBASE opcodes instead.
10071         
10072         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
10073         opcodes, use the REG_MEMBASE opcodes instead.
10074         
10075         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
10076         linear IR branch.
10077
10078         * mini.c (mono_op_imm_to_op): New helper function.
10079
10080         * mini-ops.h: Add some opcodes from linear IR branch.
10081
10082 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
10083
10084         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
10085         <tsv@solvo.ru>.
10086
10087 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
10088
10089         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
10090         OP_ICONV_TO_R4/R8.
10091
10092         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
10093
10094 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
10095
10096         * aot-compiler.c (emit_method_code): Add an assert.
10097
10098         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
10099         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
10100         methods.
10101
10102 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
10103
10104         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
10105         some load/store opcodes so they are consistent. 
10106         (mono_arch_emit_prolog): Simplify some code.
10107
10108         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
10109
10110         * objects.cs: Add tests for large argument offsets on ARM.
10111
10112         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
10113         stack offsets. Fixes #359651.
10114
10115         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
10116
10117         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
10118
10119         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
10120
10121         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
10122
10123         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
10124
10125         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
10126         rid of CEE_CONV_R_UN.
10127
10128         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
10129
10130 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
10131
10132         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
10133
10134         * mini.c (mono_normalize_opcodes): Add some more opcodes.
10135
10136         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
10137
10138         * cpu-amd64.md: Remove some unused opcodes.
10139
10140         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
10141
10142         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
10143
10144         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
10145         arch specific functions for its parts. Call the peephole pass after local
10146         regalloc so the prolog can compute a more accurate max_offset.
10147         
10148         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
10149         the corresponding OP_I/OP_L opcodes.
10150
10151         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
10152
10153         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
10154
10155 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
10156
10157         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
10158         as they are handled in mini.c.
10159
10160         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
10161         
10162         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
10163         case since it is handled in mini.c.
10164
10165         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
10166
10167         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
10168
10169         * *.c: Use the new opcodes in the IR and back end code.
10170
10171         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
10172
10173         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
10174
10175 2008-02-06  Mark Probst  <mark.probst@gmail.com>
10176
10177         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
10178         an assert because it has a race condition.
10179
10180 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
10181
10182         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
10183
10184         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
10185
10186         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
10187
10188         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
10189         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
10190
10191 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
10192
10193         * cpu-amd64.md (move): Correct the maximum size of move.
10194
10195 2008-02-05  Mark Probst  <mark.probst@gmail.com>
10196
10197         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
10198         the generic class init trampoline to return quickly if the class
10199         is already inited.
10200
10201 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
10202
10203         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
10204         issues where an 32 bit callsite cannot be patched by a 64 bit address.
10205
10206 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
10207
10208         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
10209         branch.
10210
10211 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
10212
10213         * objects.cs: Add some soft-float tests.
10214
10215         * mini.c: Fix a couple more soft-float issues.
10216
10217         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
10218
10219         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
10220         avoid a REX prefix.
10221
10222 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
10223
10224         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
10225         exception happens while compiling a virtual method.
10226
10227 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
10228
10229         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
10230         
10231         * mini-sparc.c: Fix build.
10232
10233         * mini-sparc.c (get_call_info): Add support for generic sharing.
10234
10235         * mini-exceptions.c: Add a FIXME.
10236
10237 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
10238
10239         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
10240         altstack handling code.
10241
10242         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
10243         
10244         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
10245
10246         * mini-s390.c: Add support for generic sharing.
10247
10248         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
10249         Fix CAS on s390.
10250         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
10251
10252         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
10253
10254         * mini-s390x.c: Add support for generic sharing.
10255         
10256         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
10257         Fix CAS on ia64.
10258         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
10259
10260         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
10261         can be used since it takes a 16 bit signed immediate.
10262
10263         * inssel-s390x.brg: Fix OP_SETRET.
10264
10265         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
10266
10267         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
10268
10269         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
10270
10271         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
10272
10273         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
10274         in one place.
10275
10276         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
10277         stuff.
10278
10279         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
10280         of the unused mono_arch_patch_delegate_trampoline stuff.
10281
10282 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
10283
10284         * basic-long.cs: Move the fp related tests to basic-float.cs.
10285
10286         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
10287
10288         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
10289
10290         * basic-calls.cs: Add a test for proper float argument passing.
10291
10292         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
10293         if the context corresponds to an exception received through a signal.
10294
10295         * exceptions.cs: Add a test for nullref handling at the start of a try
10296         clause.
10297
10298         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
10299
10300         * jit-icalls.c (mono_break): New JIT icall.
10301
10302         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
10303
10304         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
10305
10306 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
10307
10308         * cpu-*.md: Get rid of unused opcodes.
10309
10310         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
10311
10312         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
10313         by all platforms.
10314
10315         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
10316         define.
10317
10318         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
10319         the arch independent trampoline code in mini-trampolines.c.
10320
10321         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
10322
10323         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
10324
10325         * mini-s390.h: Remove an unused define.
10326         
10327         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
10328         the arch independent trampoline code in mini-trampolines.c.
10329
10330         * mini-arm.c (mono_arch_emit_prolog): Fix build.
10331
10332 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
10333
10334         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
10335
10336         * mini-s390.c (mono_arch_emit_prolog): Fix build.
10337
10338         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
10339
10340         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
10341
10342         * cpu-amd64.md: Use smaller sizes for int opcodes.
10343
10344         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
10345
10346         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
10347         objects.cs.
10348
10349         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
10350         debugging.
10351
10352         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
10353         instead of though a pointer to save an indirection when accessing elements of
10354         the array.
10355
10356         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
10357         some typos.
10358         (NOT_IMPLEMENTED): New helper macro.
10359         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
10360         of a bb.
10361
10362         * *.c: Use the new helper macro.
10363
10364 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
10365
10366         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
10367
10368 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
10369
10370         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
10371         stack slots.
10372
10373 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
10374
10375         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
10376         profiling is enabled.
10377         
10378         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
10379         the end.
10380         (mono_arch_emit_prolog): Add more first bblock optimizations.
10381
10382         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
10383         in order if possible.
10384         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
10385         bblock, since the arguments are still in their original registers.
10386
10387         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
10388
10389 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
10390
10391         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
10392         as well.
10393
10394         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
10395         offset 0.
10396
10397         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
10398
10399         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
10400         process async exceptions received while in unmanaged code.
10401
10402         * mini.c (mini_init): Install a callback with the runtime which will be called
10403         when a thread receives an async exception while in unmanaged code.
10404
10405         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
10406
10407         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
10408
10409 2008-01-16  Wade Berrier  <wberrier@novell.com>
10410
10411         * cpu-g4.md:
10412         * cpu-arm.md:
10413         * cpu-s390x.md:
10414         fix build
10415
10416 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
10417
10418         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
10419         compilation with sun cc.
10420
10421         * cpu-*.md: Fix the build.
10422
10423         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
10424
10425         * mini-amd64.h: Add some comments to the MonoLMF structure.
10426
10427         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
10428         
10429         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
10430         in the LMF structure if possible. This saves two instructions in the
10431         managed->native wrappers.
10432
10433         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
10434
10435 2008-01-16  Mark Probst  <mark.probst@gmail.com>
10436
10437         * generic-sharing.c: New type argument lookup code which uses the
10438         runtime generic context template.
10439
10440 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
10441
10442         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
10443
10444         * mini-arm.c (add_general): Fix arm eabi parameter passing.
10445         (mono_arch_output_basic_block): Fix localloc implementation.
10446
10447         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
10448
10449         * mini-ia64.c (peephole_pass): Fix ia64 build.
10450
10451         * mini-amd64.c (peephole_pass): Fix a warning.
10452         
10453         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
10454         at a constant offset from sp/fp.
10455
10456         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
10457         instead of obtaining it from *lmf in the managed method case.
10458
10459 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
10460
10461         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
10462
10463 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
10464
10465         * mini.h (MonoInstList): New type.
10466         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
10467         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
10468         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
10469         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
10470         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
10471         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
10472         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
10473         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
10474         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
10475         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
10476         MONO_INST_LIST_FOR_EACH_ENTRY,
10477         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
10478         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
10479         mono_inst_list_first, mono_inst_list_last,
10480         mono_inst_list_next, mono_inst_list_prev): New instruction
10481         list handling interfaces.
10482         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
10483         list head 'ins_list'.
10484         (MonoInst): Replace next pointer with list head 'node'.
10485         (MonoCallInst): Make 'out_args' a MonoInstList.
10486         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
10487         (MonoCompile): Delete reverse_inst_list and
10488         reverse_inst_list_len.
10489         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
10490         mono_arch_lowering_pass, mono_arch_local_regalloc,
10491         mono_arch_output_basic_block, mono_arch_emit_prolog):
10492         Convert to new instruction lists.
10493         (insert_after_ins): Delete.
10494         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
10495         instruction lists.
10496         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
10497         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
10498         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
10499         mono_emulate_opcode, mono_emit_load_got_addr,
10500         inline_method, mono_method_to_ir, mono_print_bb_code,
10501         print_dfn, decompose_pass, nullify_basic_block,
10502         replace_out_block_in_code, remove_block_if_useless,
10503         merge_basic_blocks, move_basic_block_to_end,
10504         try_unsigned_compare, optimize_branches, mono_print_code,
10505         mini_select_instructions, remove_critical_edges): Likewise.
10506         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
10507         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
10508         mono_arch_output_basic_block, mono_arch_emit_prolog):
10509         Likewise.
10510         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
10511         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
10512         mono_arch_output_basic_block): Likewise.
10513         (inst_list_prepend, insert_after_ins): Delete.
10514         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
10515         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
10516         instruction lists.
10517         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
10518         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
10519         mono_arch_emit_prolog): Likewise.
10520         * cfold.c (mono_constant_fold): Likewise.
10521         * liveness.c (visit_bb, mono_analyze_liveness,
10522         optimize_initlocals): Likewise.
10523         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
10524         * graph.c (mono_draw_code_cfg): Likewise.
10525         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
10526         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
10527         mono_ssa_cprop): Likewise.
10528         * abcremoval (get_relations_from_previous_bb, process_block):
10529         Likewise.
10530         * local-propagation (mono_cprop_invalidate_values,
10531         mono_local_cprop_bb): Likewise.
10532         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
10533         peephole_pass, mono_arch_output_basic_block,
10534         mono_arch_emit_prolog): Likewise.
10535         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
10536         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
10537         mono_arch_emit_prolog): Likewise.
10538         (insert_after_ins): Delete.
10539         * aliasing.c (print_code_with_aliasing_information,
10540         mono_build_aliasing_information, mono_aliasing_deadce):
10541         Convert to new instruction lists.
10542         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
10543         peephole_pass, NEW_INS, mono_arch_lowering_pass,
10544         mono_arch_local_regalloc, mono_arch_output_basic_block):
10545         Likewise.
10546         (insert_after_ins): Delete.
10547         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
10548         peephole_pass, mono_arch_output_basic_block): Convert to
10549         new instruction lists.
10550         * mini-codegen (InstList, inst_list_prepend,
10551         insert_after_ins): Delete.
10552         (insert_before_ins, get_register_force_spilling,
10553         get_register_spilling, free_up_ireg, free_up_reg,
10554         create_copy_ins, create_spilled_store, alloc_int_reg,
10555         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
10556         to new instruction lists.
10557         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
10558         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
10559         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
10560         (insert_after_ins): Delete.
10561         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
10562         mono_arch_local_regalloc, mono_arch_output_basic_block,
10563         mono_arch_call_opcode): Convert to new instruction lists.
10564         (insert_after_ins): Delete.
10565         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
10566         peephole_pass, mono_arch_output_basic_block,
10567         mono_arch_emit_prolog): Convert to new instruction lists.
10568
10569 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
10570
10571         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
10572
10573         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
10574         Fixes #353182.
10575
10576         * Makefile.am (version.h): Make this work with non-bash shells.
10577
10578 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
10579
10580         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
10581
10582 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
10583
10584         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
10585         the InitializeArray optimization.
10586
10587 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
10588
10589         * mini.c driver.c: Don't include os/gc_wrapper.h.
10590
10591 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
10592
10593         * mini.c (print_jit_stats): Print GC statistics if available.
10594
10595 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
10596
10597         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
10598
10599 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
10600
10601         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
10602
10603 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
10604
10605         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
10606         
10607         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
10608
10609         * driver.c (mono_main): Ditto.
10610
10611 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
10612
10613         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
10614
10615         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
10616         in the vtable can't be encoded.
10617         (compile_method): Ditto.
10618
10619 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
10620
10621         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
10622         defined.
10623
10624         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
10625         lmf->rbp.
10626
10627         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
10628         the top LMF entry belongs to the current method.
10629
10630         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
10631
10632 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
10633
10634         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
10635         
10636         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
10637
10638         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
10639
10640         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
10641
10642         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
10643
10644         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
10645         implementation.
10646
10647         * basic-float.cs: Add an ulong->double cast test.
10648
10649 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
10650
10651         * mini.c (mono_method_to_ir): Fix a warning.
10652
10653 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
10654
10655         * mini-ops.h: Add OP_SWITCH.
10656
10657         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
10658         CEE_SWITCH in back-end code, use OP_SWITCH instead.
10659
10660 2007-12-11  Geoff Norton  <gnorton@novell.com>
10661
10662         * mini-s390x.c: Minor change to the MAX() define to allow
10663         it to compile with other gcc versions.
10664
10665 2007-12-11  Geoff Norton  <gnorton@novell.com>
10666
10667         * cpu-s390x.md:
10668         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
10669
10670 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
10671
10672         exceptions-arm.c (mono_arch_get_restore_context): Restore
10673         the frame pointer.
10674
10675         exceptions-arm.c (throw_exception): Save the frame pointer.
10676         This is a partial fix for #323747. Only the client side is
10677         fixed.
10678
10679 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
10680
10681         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
10682         was using an unrelated variable to log the class which
10683         needed the cctor to be called. This was crashing on arm.
10684
10685 2007-12-09  Robert Jordan  <robertj@gmx.net>
10686
10687         * mini-x86.c (mono_arch_emit_epilog):
10688         Consider all kinds of 64-bit types. Fixes #323114.
10689
10690 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
10691
10692         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
10693
10694 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
10695
10696         * mini-amd64.c (peephole_pass): Add a missing instruction check.
10697
10698 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
10699
10700         * mini.c: run type ctor before allocating an object, not only
10701         when running it's constructor method (fixes at least part of bug #342507).
10702
10703 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
10704         
10705         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
10706         
10707         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
10708         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
10709         function.
10710
10711         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
10712         mono_generic_class_init_trampoline () the same as it is done with the other
10713         trampolines.
10714
10715         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
10716         aot-runtime.c aot-compiler.c: Implement AOT support.    
10717
10718 2007-12-07  Mark Probst  <mark.probst@gmail.com>
10719
10720         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
10721         build for archs which don't have the vtable trampoline defined
10722         yet.
10723
10724 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
10725
10726         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
10727
10728         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
10729
10730         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
10731
10732         * tramp-<ARCH>.c: Use the new helper function.
10733
10734 2007-12-07  Mark Probst  <mark.probst@gmail.com>
10735
10736         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
10737         trampoline call, which takes a vtable argument.
10738
10739         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
10740         OP_TRAMPCALL_VTABLEs like other calls.
10741
10742         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
10743         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
10744         call.  Implemented a support function which fetches the vtable
10745         from a register set.
10746
10747         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
10748         Implemented a generic class init trampoline, using the
10749         OP_TRAMPCALL_VTABLE opcode.
10750
10751         * mini.c: Implemented static field access when sharing generic
10752         code.  This implies initing the class using the new
10753         OP_TRAMPCALL_VTABLE call.
10754
10755 2007-12-07  Mark Probst  <mark.probst@gmail.com>
10756
10757         * mini.c: Don't compile methods with sharing enabled if their
10758         classes are disabled for sharing.
10759
10760 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
10761
10762         * inssel.brg: Add a missing sign extension to the GETCHR and array access
10763         opcodes. Fixes #346563.
10764
10765         * objects.cs: Add a new test.
10766
10767         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
10768
10769         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
10770         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
10771
10772 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
10773
10774         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
10775
10776 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
10777
10778         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
10779         code stream.
10780
10781 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
10782
10783         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
10784
10785         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
10786         optimization in the AOT case.
10787         
10788 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
10789
10790         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
10791         
10792         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
10793
10794         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
10795
10796         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
10797
10798         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
10799         is created by the inlined delegate ctor.
10800
10801         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
10802
10803         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
10804
10805 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
10806
10807         * cpu-x86.md: Fix the length of ckfinite.
10808
10809 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
10810
10811         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
10812         
10813         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
10814         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
10815
10816         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
10817
10818         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
10819         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
10820
10821 2007-11-28  Martin Baulig  <martin@ximian.com>
10822
10823         * mini-x86.c
10824         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
10825         after creating the trampoline.
10826
10827 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
10828
10829         * aot-runtime.c (load_aot_module): Check runtime version if needed.
10830
10831         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
10832         the same version.
10833
10834         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
10835         instead of the calling method to help AOT.
10836
10837         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
10838
10839 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
10840
10841         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
10842         is defined.
10843
10844 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
10845
10846         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
10847         
10848         * aot-compiler.c (compile_method): Correct check for generic method definitions.
10849         (encode_method_ref): No need to handle generic method definitions specially.
10850
10851         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
10852
10853         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
10854         decode_klass_info.
10855
10856         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
10857         encode_klass_info.
10858         (compile_method): Enable generic sharing.
10859
10860 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
10861
10862         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
10863         (mini_method_compile): Add preliminary support for AOTing shared generic code.
10864
10865         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
10866         generic code.
10867
10868         * mini-trampolines.c: Fix a warning.
10869
10870         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
10871         NEW_PCONST.
10872         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
10873         (generic_class_is_reference_type): Remove unused function.
10874
10875         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
10876         in the generic vtable trampoline case.
10877
10878         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
10879         
10880         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
10881         return an AOT method based on a vtable slot.
10882
10883         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
10884
10885         * mini.c (mini_get_vtable_trampoline): Export this.
10886
10887 2007-11-22  Martin Baulig  <martin@ximian.com>
10888
10889         * debug-debugger.h
10890         (MonoDebuggerInfo): Move `debugger_version' up.
10891
10892 2007-11-22  Martin Baulig  <martin@ximian.com>
10893
10894         * mini-amd64.c
10895         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
10896
10897         * mini-trampolines.c
10898         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
10899         after compiling the method.
10900
10901 2007-11-20  Martin Baulig  <martin@ximian.com>
10902
10903         * debug-mini.c
10904         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
10905         (mono_debugger_remove_breakpoint): Likewise.
10906         (mono_debugger_check_breakpoints): Likewise.
10907
10908         * debug-debugger.c: Implement the new breakpoint interface here.
10909
10910 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
10911
10912         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
10913         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
10914
10915         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
10916
10917 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
10918
10919         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
10920
10921         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
10922         mini.c.
10923
10924         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
10925         mini.c.
10926
10927         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
10928         returning a vtype in a register.
10929
10930         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
10931         here from the arch specific code.
10932
10933         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
10934         mini.c.
10935
10936         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
10937         (mono_arch_emit_prolog): Increment maximum prolog size.
10938
10939         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
10940         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
10941
10942         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
10943         MonoGenericSharingContext.
10944
10945         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
10946         MonoGenericSharingContext. Allocate memory from the cfg mempool.
10947
10948 2007-11-15  Mark Probst  <mark.probst@gmail.com>
10949
10950         * mini.c, mini.h, generic-sharing.c: Functions for producing code
10951         which extract fields out of the runtime generic context.  Full
10952         sharing of the NEWARR opcode.
10953
10954 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
10955
10956         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
10957         --enable-minimal=ssa.
10958
10959 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
10960
10961         * mini-trampolines.c (mono_delegate_trampoline): Update after 
10962         mono_marshal_get_delegate_invoke () signature change.
10963
10964 2007-11-13  Mark Probst  <mark.probst@gmail.com>
10965
10966         * mini.c: Removed the shared context in favor of the generic
10967         sharing context.  Allocate the MonoJitInfo structure with room for
10968         the generic sharing context if it's needed.
10969
10970         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
10971         domain-internals.h now.
10972
10973         * mini-x86.c: Pass the generic sharing context to get_call_info ().
10974
10975         * generic-sharing.c: Several changes for working without a shared
10976         context and instead operating on open types instead.
10977
10978 2007-11-12  David S. Miller  <davem@davemloft.net>
10979
10980        * inssel-sparc.brg: Fix double instruction emit.
10981
10982 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
10983
10984         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
10985         Get/Set/Address methods.
10986         
10987         * mini.c debug-debugger.c mini-trampolines.c: Update after 
10988         mono_marshal_get_delegate_invoke signature change.
10989
10990 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
10991
10992         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
10993         This can happens with dynamic methods. Fixes the other bug in #322722.
10994
10995 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
10996
10997         * tramp-arm.c (mono_arch_patch_callsite): Support patching
10998         BX call sequence.
10999
11000         * mini-arm.c (arm_patch): Implement patching of BX call
11001         sequence. Fixes one of the bugs in #322722.
11002
11003 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
11004
11005        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
11006        under Linux.  We only need to flush every 32-byte cache line.    
11007
11008 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
11009
11010         * mini.c:
11011         move_basic_block_to_end: Add branches when needed, eventually creating
11012         a new BB.
11013         optimize_branches: added a parameter that tells if it's ok to create
11014         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
11015         and avoid calling move_basic_block_to_end when it's not ok.
11016         Fixes bug 318677.
11017
11018 2007-11-07  Mark Probst  <mark.probst@gmail.com>
11019
11020         * mini.c: Abort inlining call to InitializeArray if something
11021         looks wrong.  Let the icall handle it, which now has proper safety
11022         checks.
11023
11024 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
11025
11026         * mini.c (mono_spill_call): add support for soft-float.
11027
11028         * mini.c (mono_method_to_ir): add support for soft-float
11029         to inlined functions that return float.
11030
11031         * mini.c (mono_method_to_ir): add support for soft-float
11032         to cee_stsfld opcode on float fields.
11033
11034 2007-11-05  Geoff Norton  <gnorton@novell.com>
11035
11036         * mini-x86.h: Fix the structure access for X86 Leopard.
11037
11038
11039 2007-11-05  Martin Baulig  <martin@ximian.com>
11040
11041         * mini-trampolines.c
11042         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
11043         after compiling the method to notify the debugger.
11044
11045 2007-11-05  Martin Baulig  <martin@ximian.com>
11046
11047         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
11048
11049 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
11050
11051         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
11052         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
11053
11054 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
11055
11056         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
11057         native-to-managed wrappers.
11058         
11059 2007-11-01  Geoff Norton  <gnorton@novell.com>
11060
11061         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
11062         members.
11063
11064 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
11065
11066         * mini.c, mini-x86.c: when getting back from unmanaged code
11067         to managed via a marshaled delegate we also need to set the
11068         right domain.
11069
11070 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
11071
11072         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
11073         for amd64.
11074
11075 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
11076
11077         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
11078         let the debugger or other external agents to tell the JIT when
11079         a sw breakpoint has been inserted in the code that the JIT needs
11080         to be able to inspect.
11081
11082 2007-10-31  Martin Baulig  <martin@ximian.com>
11083
11084         * debug-debugger.h
11085         (MonoDebuggerInfo): Remove `runtime_class_init'.
11086
11087 2007-10-30  Martin Baulig  <martin@ximian.com>
11088
11089         * debug-mini.h
11090         (mono_debugger_thread_created): Added `MonoThread *' argument.
11091         (mono_debugger_extended_notification): New public method.
11092         (mono_debugger_trampoline_compiled): New public method.
11093
11094         * debug-mini.c
11095         (MonoDebuggerThreadInfo): Added `thread' and
11096         `extended_notifications' fields.
11097
11098         * debug-debugger.c
11099         (debugger_executable_code_buffer): New static variable.
11100
11101         * debug-debugger.h
11102         (MonoDebuggerInfo): Added `executable_code_buffer',
11103         `executable_code_buffer_size', `breakpoint_info_area',
11104         `breakpoint_table' and `breakpoint_table_size'.
11105
11106 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
11107
11108         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
11109         that IP  either is an unused value or the vtable pointer. IMT 
11110         calls use vtable + offset now. Reduced by almost half the size
11111         of IMT entries.
11112
11113 2007-10-26  Jonathan Chambers <joncham@gmail.com>
11114
11115         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
11116         defines to access param registers. Replace long usage with
11117         gsize as sizeof(long) != sizeof(void*) on Win64.
11118
11119         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
11120         on Win64. Fix intrinsic, use _AddressOfReturnAddress
11121         instead of non-existant _GetAddressOfReturnAddress.
11122
11123         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
11124         param registers. Save/restore %rdi and %rsi in MonoLMF.
11125
11126         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
11127         param registers. Modify (throw_exception) signature to take 
11128         %rdi and %rsi on Win64. 
11129
11130         Code is contributed under MIT/X11 license.
11131
11132 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
11133
11134         * helpers.c: unlink debugging output files.
11135
11136 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
11137
11138         * mini.c: Move mono_create_ftnptr () to object.c.
11139
11140 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
11141
11142         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
11143         optional. This function can now be used to disassemble code generated
11144         outside the JIT such as trampolines and IMT thunks.
11145
11146         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
11147
11148         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
11149         vtable pointer from a ldr instruction.
11150
11151         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
11152         new IMT call sequence.
11153
11154         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
11155         call sequence for interface invocations.
11156
11157         * mini-arm.c (mono_arch_emit_imt_argument): added, required
11158         for imt support. This function is empty since IMT on ARM requires no
11159         special handling on the IR side.
11160
11161         * mini-arm.c (mono_arch_find_imt_method): added, required for
11162         imt support.
11163
11164         * mini-arm.c (mono_arch_find_this_argument): added, required
11165         for imt support.
11166
11167         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
11168         a ldr instruction to load a value stored in the code stream.
11169
11170         * mini-arm.c (mono_arch_build_imt_thunk):added, required
11171         for imt support.
11172
11173
11174 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
11175
11176         * mini.c (mini_init): Install the jump trampoline callback.
11177
11178 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
11179
11180         * mini-trampolines.c: handle synchronized methods with the common
11181         vtable trampoline (bug #335601).
11182
11183 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
11184
11185         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
11186
11187         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
11188         64 bit platforms.
11189
11190         * mini-ia64.h mini-ia64.c: Add support for IMT.
11191
11192         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
11193         prolog. Fixes #331958.
11194
11195 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
11196
11197         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
11198
11199 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
11200
11201         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
11202         trampoline.
11203
11204 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
11205
11206         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
11207         trampoline.
11208
11209 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
11210
11211         * mini-x86.c, mini-x86.h: x86 support for the common vtable
11212         trampoline.
11213
11214 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
11215
11216         * mini-trampolines.c: changed the magic rampoline to understand
11217         the common vtable trampoline method: the method to invoke is
11218         determined by the vtable displacement of the call.
11219
11220 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
11221
11222         * mini.c, mini.h: register the common vtable trampoline if the
11223         architecture supports it.
11224
11225 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
11226
11227         * cpu-amd64.md: use the correct max length for tls_get.
11228
11229 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
11230
11231         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
11232         CEE_STELEM_ANY. Fixes #333696.
11233
11234 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
11235
11236         * exceptions-x86.c: provide more graceful handling of the case where
11237         we followed a bogus function pointer from managed code (bug #332866).
11238
11239 2007-10-11  Mark Probst  <mark.probst@gmail.com>
11240
11241         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
11242         replaces the generic_shared flag and will carry more information
11243         in the future.
11244
11245         * generic-sharing.c: Added mini_type_stack_size() which allows
11246         allows open types if given a generic sharing context.
11247         mini_get_basic_type_from_generic() takes a
11248         MonoGenericSharingContext* instead of a MonoCompile* now.
11249
11250         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
11251         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
11252         mini-sparc.c, mini-x86.c: Trivial changes required by the two
11253         changes above.  Just passing arguments through to the right
11254         places.
11255
11256 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
11257
11258         * mini-arm.c: unify the call emission to emit_code_seq().
11259
11260 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
11261
11262         * tramp-arm.c: reduced the trampoline size.
11263
11264 2007-10-10  Mark Probst  <mark.probst@gmail.com>
11265
11266         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
11267         variable handling out of arch-specific code.
11268
11269 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
11270
11271         * mini-arm.c: implemented fast delegate dispatch.
11272
11273 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
11274
11275         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
11276         that fp elimination is turned off if the space required by locals is too
11277         big. Fixes #331958.
11278
11279 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
11280
11281         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
11282         ARM to the new style trampoline.
11283
11284 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
11285
11286         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
11287
11288         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
11289
11290 2007-10-09  Martin Baulig  <martin@ximian.com>
11291
11292         * debug-debugger.h
11293         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
11294         `field_info_offset_offset'.     
11295
11296 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
11297
11298         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
11299         removed more internal usage of the r11 register and made it available
11300         to the register allocator.
11301
11302 2007-10-08  Mark Probst  <mark.probst@gmail.com>
11303
11304         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
11305         when sharing generics and treat type variables as references.
11306
11307 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
11308
11309         * mini-ppc.c: started removing the internal uses of register r11
11310         to eventually allow the register allocator to manage it as an
11311         additional available register.
11312
11313 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
11314
11315         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
11316
11317 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
11318
11319         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
11320         specific trampolines as they are not performance critical as a jump
11321         target (maybe align as before only for AOT code?). This saves about
11322         200 KB of native code on x86 for monodevelop startup.
11323
11324 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
11325
11326         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
11327         monodevelop startup.
11328
11329 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
11330
11331         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
11332
11333         * mini-sparc.h mini-sparc.c: Implement IMT support.
11334
11335         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
11336         its smaller and doesn't clobber sparc_g1.
11337
11338         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
11339
11340 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
11341
11342         * mini-ppc.c: optimized the size of the IMT thunks a bit.
11343
11344 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
11345
11346         * mini-ppc.c: implemented fast delegate invocation.
11347
11348 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
11349
11350         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
11351
11352 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
11353
11354         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
11355         code to the new style trampoline in preparation for IMT support.
11356
11357 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
11358
11359         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
11360         systems already. This also reduces the specific trampiline sizes and
11361         prepares for the use of r12 as the IMT identifier register.
11362
11363 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
11364
11365         * mini-mips.h: endianess fix (simplified from a patch by
11366         Thomas Kunze <thommy@tabao.de>, bug #323737).
11367
11368 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
11369
11370         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
11371         to access ucontext fields and enable netbsd support
11372         (partially from Magnus Henoch <mange@freemail.hu>).
11373
11374 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
11375
11376         * genmdesc.pl: patch from Henryk Plotz <henryk@openmoko.org> to
11377         use the preprocessor from the CPP env var if it is set.
11378
11379 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
11380
11381         * mini-trampolines.c: fixed an assertion and moved it earlier in the
11382         code, before interface_offset gets used.
11383
11384 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
11385
11386         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
11387         mono_class_setup_vtable () before accessing klass->vtable.
11388
11389 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
11390
11391         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
11392         hackish.
11393
11394 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
11395
11396         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
11397         IMT slots (this saves hundreds of KB of memory in programs like
11398         IronPython and Monodevelop).
11399
11400 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
11401
11402         * mini.c: print the delegate counter.
11403
11404 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
11405
11406         * mini-x86.c: make it easier to enable the debugging code for IMT
11407         slots.
11408
11409 2007-09-28  Martin Baulig  <martin@ximian.com>
11410
11411         * debug-debugger.h
11412         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
11413         `mono_method_klass_offset' and `mono_method_token_offset'.
11414
11415 2007-09-20  Mark Probst  <mark.probst@gmail.com>
11416
11417         * mini.c: First generics sharing implementation.  Can only share
11418         in very simple cases.  If sharing doesn't work it falls back to
11419         dedicated compilation.
11420
11421         * mini.h: Flag in MonoCompile to specify whether generic
11422         compilation is shared.  Flags enum for marking which generic inst
11423         of a context is used.  Prototypes for helper functions.
11424
11425         * generic-sharing.c: Helper functions for generic method sharing.
11426
11427         * optflags-def.h: Optimization flag (gshared) for enabling generic
11428         method sharing added.
11429
11430         * Makefile.am: generic-sharing.c added.
11431
11432 2007-09-19 Daniel Nauck <dna@mono-project.de>
11433
11434         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
11435
11436 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
11437         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
11438         fixes bug 325507.
11439
11440 2007-09-19  Martin Baulig  <martin@ximian.com>
11441
11442         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
11443         mono_debug_cleanup() is now part of mono_cleanup().
11444
11445 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
11446
11447         * driver.c (mono_main): Fix a warning.
11448
11449 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
11450
11451         * aot-compiler.c: Optimize various parts when processing large assemblies.
11452         Fixes ##325568.
11453
11454         * mini.c (mono_patch_info_hash): Improve hash function.
11455
11456 2007-09-14  Jonathan Chambers <joncham@gmail.com>
11457
11458         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
11459         
11460         Code is contributed under MIT/X11 license.
11461
11462 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
11463
11464         * mini.c (mini_init): Fix a leak.
11465
11466         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
11467
11468 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
11469
11470         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
11471
11472 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
11473
11474         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
11475
11476 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
11477
11478         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
11479         variance tests.
11480
11481         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
11482
11483         * mini.c (handle_alloc): Enable managed allocators in AOT code.
11484
11485         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
11486
11487         * aot-runtime.c (decode_patch_info): Ditto.
11488
11489 2007-09-12  Jonathan Chambers <joncham@gmail.com>
11490
11491         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
11492         static case. Cache delegates in architecture specific code, 
11493         based on number of parameters.
11494         
11495         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
11496         in architecture specific code, based on number of parameters.
11497         
11498         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
11499         caching happen in architecture specific code now.
11500         
11501         Code is contributed under MIT/X11 license.
11502
11503 2007-09-12  Jonathan Chambers <joncham@gmail.com>
11504
11505         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
11506         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
11507         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
11508
11509         Code is contributed under MIT/X11 license.
11510
11511 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
11512         * mini.c: (mono_thread_abort) Fixed bug #82416.
11513
11514 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
11515
11516         * mini.: hook the new managed GC allocation feature into the JIT.
11517
11518 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
11519
11520         * mini.c: implementation for the new runtime tls opcode.
11521
11522 2007-09-11  Martin Baulig  <martin@ximian.com>
11523
11524         * debug-debugger.h
11525         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
11526         `mono_method_inflated_offset'.
11527
11528 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
11529
11530         * driver.c mini.h mini.c: Add a new devel command line option for injecting
11531         async exceptions into a method.
11532
11533         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
11534         purpose of testing whenever the unwinder works at every instruction.
11535
11536 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
11537
11538         * mini.c: check accessibility of method used in ldftn (fixes
11539         bug #82635).
11540
11541 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
11542
11543         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
11544
11545         * inssel.brg: Fix a warning.
11546
11547 2007-09-03  Martin Baulig  <martin@ximian.com>
11548
11549         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
11550         now takes the `main_method' as argument.
11551
11552 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
11553
11554         * cpu-sparc.md (endfilter): Add missing src1:i argument.
11555
11556 2007-08-30  Jonathan Chambers <joncham@gmail.com>
11557
11558         * driver.c: include the cil-coff.h header on Windows.
11559         
11560         Code is contributed under MIT/X11 license.
11561
11562 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
11563
11564         * mini.c, driver.c: don't include the cil-coff.h header.
11565
11566 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
11567
11568         * mini.c: flag places that needs fixes fo soft-float support.
11569
11570 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
11571
11572         * mini.h, inssel-float.brg: fix soft-float constant loads on big
11573         endian systems (partially from Dean Jenkins, bug #81924).
11574
11575 2007-08-28  Mark Probst  <mark.probst@gmail.com>
11576
11577         * mini.c (check_linkdemand): Remove embedded reference object in
11578         call to LinkDemandSecurityException.
11579         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
11580         with an IntPtr instead of a reference object.
11581
11582 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
11583
11584         * mini.c (handle_initobj): Handle alignment properly.
11585
11586         * inssel.brg (mini_emit_memset): Ditto. 
11587
11588         * inssel.brg (mini_emit_memcpy): Ditto. 
11589
11590         * inssel-sparc.brg: Ditto.              
11591
11592         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
11593
11594 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
11595
11596         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
11597         exceptions raised in unmanaged code. Fixes part of #82594.
11598
11599 2007-08-24  Mark Probst  <mark.probst@gmail.com>
11600
11601         * mini.c (mono_method_to_ir), declsec.c
11602         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
11603
11604 2007-08-22  Martin Baulig  <martin@ximian.com>
11605
11606         * debug-mini.h
11607         (MonoDebuggerThreadInfo): New typedef.
11608         (mono_debugger_thread_table): New global variable.
11609         (mono_debugger_thread_created): New public function.
11610         (mono_debugger_thread_cleanup): New public function.
11611
11612         * debug-debugger.h
11613         (MonoDebuggerInfo):
11614         - removed `get_current_thread' and `lookup_assembly'.
11615         - removed `data_table'.
11616         - added `thread_table'.
11617
11618         * mini.c
11619         (mono_thread_start_cb): Call mono_debugger_thread_created().
11620         (mono_thread_attach_cb): Likewise.
11621         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
11622         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
11623         initial domain.
11624
11625         * driver.c (mono_main): Move mono_debug_init() up, before calling
11626         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
11627
11628 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
11629
11630         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
11631         together when passing several arguments of type double (gives a small
11632         speedup and saves a few bytes of generated code).
11633
11634 2007-08-20  Jb Evain  <jbevain@novell.com>
11635
11636         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
11637
11638 2007-08-20  Jb Evain  <jbevain@novell.com>
11639
11640         * mini.c (mono_method_to_ir): throw MethodAccessException
11641         and FieldAccessException instead of InvalidProgramException.
11642
11643 2007-08-20  Mark Probst  <mark.probst@gmail.com>
11644
11645         * mini.c: CoreCLR security checks.
11646
11647         * mini.h: Removed MonoSecurityMode (moved to
11648         metadata/security-manager.h) and mono_security_mode global var
11649         (replaced by set/get functions in security-manager.h).
11650
11651         * driver.c: Added "core-clr-test" security mode for testing.  Used
11652         set-function for setting security mode.
11653
11654 2007-08-17  Mark Probst  <mark.probst@gmail.com>
11655
11656         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
11657         the new jit_info_table.
11658
11659         * driver.c: Test code for the new jit_info_table (enabled by the
11660         define MONO_JIT_INFO_TABLE_TEST).
11661
11662 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
11663
11664         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
11665         detection of call <REG> instruction sequence. Fixes build on freebsd.
11666
11667 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
11668
11669         * mini-exceptions.c: Fix a warning.
11670
11671 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
11672
11673         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
11674         stack overflow handling code on amd64 too.
11675
11676         * mini-exceptions.c (mono_setup_altstack): Make this use 
11677         mono_thread_get_stack_bounds ().
11678
11679         * mini-x86.h: Disable sigaltstack on solaris x86.
11680
11681 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
11682
11683         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
11684
11685 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
11686
11687         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
11688
11689 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
11690
11691         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
11692
11693         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
11694
11695 2007-08-03  Neale Ferguson <neale@sinenomine.net>
11696
11697         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
11698         due to alignment.
11699
11700 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
11701
11702         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
11703         to be emitted (bug #82281).
11704
11705 2007-08-01  Martin Baulig  <martin@ximian.com>
11706
11707         Merged the `debugger-dublin' branch.
11708
11709         * debug-debugger.h (MonoDebuggerInfo):
11710         Removed the `old_*' compatibility entries.
11711         Added `debugger_version' and `data_table'.
11712         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
11713         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
11714
11715         * debug-mini.c
11716         (MiniDebugMethodBreakpointInfo): Add `address_list'.
11717         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
11718         instead of a `gconstpointer'.
11719         (mono_debugger_insert_method_breakpoint): Return a
11720         `MonoDebugMethodAddressList *'.
11721
11722 2007-06-28  Martin Baulig  <martin@ximian.com>
11723
11724         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
11725
11726 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
11727
11728         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
11729         __builtin_frame_address () since it is broken on older gcc versions.
11730
11731 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
11732
11733         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
11734         on the stack overflow handling and made the managed stack overflows
11735         catchable in most cases using soft guard pages.
11736         * exceptions-x86.c: added code to restore the protection in the soft
11737         guard pages at the end of exception handling.
11738
11739 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
11740
11741         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
11742
11743 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
11744
11745         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
11746         exception handling.
11747
11748 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
11749
11750         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
11751         signal handling support until it has been ported to the new mechanism.
11752         * mini.c: fixed stack overflow detection and use the new
11753         architecture code  to handle signals on the altstack.
11754
11755 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
11756
11757         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
11758         stack overflows on the alt stack.
11759
11760 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
11761
11762         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
11763         stack overflows on the alt stack.
11764
11765 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
11766
11767         * exceptions-ppc.c: cleanup preparing for altstack support.
11768
11769 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
11770
11771         * exceptions-arm.c: cleanup preparing for altstack support.
11772
11773 2007-07-27  Mark Probst  <mark.probst@gmail.com>
11774
11775         * mini.c (print_jit_stats): Output hazard pointer stats.
11776
11777 2007-07-26  Mark Probst  <mark.probst@gmail.com>
11778
11779         * driver.c, mini.c: Replaced security mode flags with a single
11780         enum variable.
11781
11782 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
11783
11784         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
11785
11786 2007-07-25  Mark Probst  <mark.probst@gmail.com>
11787
11788         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
11789         (which doesn't do anything yet) for activating Core CLR
11790         (Silverlight) security.
11791
11792 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
11793
11794         * mini-codegen.c: work around a possible gcc bug on arm.
11795
11796 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
11797
11798         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
11799         message for platforms that don't support AOT compilation.
11800
11801 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
11802
11803         * mini.h, mini.c, driver.c: temporary smcs hack.
11804
11805 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
11806
11807         * mini-arm.h, mini-arm.c: arm EABI fixes.
11808
11809 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
11810
11811         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
11812         case.
11813
11814         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
11815         trampolines taking a method argument.
11816
11817         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
11818
11819         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
11820         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
11821
11822         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
11823         JIT compilation throws an exception. Fixes #82050.
11824
11825 2007-07-19  Mark Probst  <mark.probst@gmail.com>
11826
11827         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
11828         with the MONO_EXCEPTION_ defines.
11829
11830 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
11831
11832         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
11833         #82117.
11834         
11835         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
11836         the cause of an assertion.
11837
11838 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
11839
11840         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
11841         removed.
11842
11843 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
11844
11845         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
11846         assert. Should fix #82103.
11847
11848 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
11849
11850         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
11851         here too. Fixes #82095.
11852
11853         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
11854         addresses.
11855
11856         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
11857
11858         * mini-amd64.h: Enable IMT for amd64.
11859         
11860         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
11861
11862 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
11863
11864         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
11865
11866 2007-07-12  Mark Probst  <mark.probst@gmail.com>
11867
11868         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
11869         as soon as check_linkdemand sets an exception_type.
11870
11871 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
11872
11873         * mini-x86.c: fixed offsets for IMT call sequence.
11874         * mini-x86.h: enable IMT again.
11875
11876 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
11877
11878         * trace.c (mono_trace_enter_method): Decode MonoType too.
11879
11880         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
11881
11882         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
11883
11884         * mini-amd64.c: Add preliminary IMT implementation.
11885         
11886 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
11887
11888         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
11889         understand the new IMT-base interface invocation (thanks to
11890         Daniel Nauck for the report and the remote debugging session).
11891
11892 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
11893
11894         * mini-x86.c: size and speed optimizations for the IMT bsearch.
11895
11896 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
11897
11898         * Makefile.am (aotcheck): Make this actually use the AOTed code.
11899
11900 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
11901
11902         * mini-trampolines.c: implement AOT IMT support.
11903         * mini-x86.h: enable IMT support for wider testing.
11904
11905 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
11906
11907         * inssel.brg (emit_imt_argument): Add aot support here.
11908
11909         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
11910
11911 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
11912
11913         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
11914         of the IMT implementation, partially from massi, with my
11915         implementation of the bsearch sequence. Disabled by default until
11916         the AOT code is implemented.
11917
11918 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
11919
11920         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
11921
11922         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
11923
11924 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
11925
11926         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
11927         arch-independent IMT JIT code from Massimiliano
11928         Mantione (massi@ximian.com) with small cleanups from me.
11929
11930 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
11931
11932         * Makefile.am: fix svn invocation to get the svn revision to be
11933         independent of the local language (build fix).
11934
11935 2007-07-09  Mark Probst  <mark.probst@gmail.com>
11936
11937         * mini.c (inline_method): Reset cfg->exception_type if the
11938         inlining is aborted.  Fixes: 82049.
11939
11940 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
11941
11942         * mini.c: remove assert from exception handling code when exception_ptr
11943         is not set.
11944
11945 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
11946
11947         * mini.c (mono_codegen): Add an assert.
11948
11949         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
11950         enter and leave code.
11951         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
11952
11953 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
11954
11955         * mini-ppc.c: fixed memory corruption for localloc(0)
11956         (bug #81852).
11957
11958 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
11959         
11960         * mini.c: Fix warnings.
11961
11962 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
11963
11964         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
11965         to emit better double->int conversions.
11966
11967 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
11968
11969         * mini.c: the provided Min/Max optimizations are valid for unisgned
11970         ints.
11971
11972 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
11973
11974         * 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
11975
11976 2007-06-28  Miguel de Icaza  <miguel@novell.com>
11977
11978         * mini.c (mono_running_on_valgrind): Add support for reporting the
11979         method and  its boundaries to valgrind.
11980
11981 2007-06-28  Martin Baulig  <martin@ximian.com>
11982
11983         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
11984
11985 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
11986
11987         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
11988
11989         * generic.2.cs: Add new test case.
11990
11991 2007-06-25  Martin Baulig  <martin@ximian.com>
11992
11993         Merged the `debugger-dublin' branch.
11994
11995         * debug-mini.c
11996         (mono_debugger_insert_method_breakpoint): New public method.
11997         (mono_debugger_remove_method_breakpoint): Likewise.
11998         (mono_debugger_check_breakpoints): New static method.
11999         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
12000
12001         * debug-debugger.h (MonoDebuggerInfo):
12002         Renamed (to keep backward compatibility in the vtable):
12003         `insert_breakpoint' -> `old_insert_breakpoint'.
12004         `remove_breakpoint' -> `old_remove_breakpoint'.
12005         `create_string' -> `old_create_string'.
12006         `lookup_class' -> `old_lookup_class'.
12007         `lookup_type' -> removed; changed into a dummy field.
12008         `lookup_assembly' -> `old_lookup_assembly'.
12009         Added (same functionality, but different signature):
12010         `create_string', `lookup_class', `lookup_assembly'
12011         Added new:
12012         `get_method_addr_or_bpt', `remove_method_breakpoint',
12013         `runtime_class_init'.
12014
12015         * debug-debugger.c: Merged the `debugger-dublin' branch.
12016
12017 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
12018
12019         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
12020         well.
12021         (peephole_pass): Likewise.
12022
12023 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
12024
12025         * driver.c: hopefully make setaffinity work also for ancient
12026         versions of linux.
12027
12028 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
12029
12030         * driver.c : win32 build fix.
12031
12032 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
12033
12034         * driver.c: check for the MONO_NO_SMP env var and bind to a single
12035         processor if it is set.
12036
12037 2007-06-21  Martin Baulig  <martin@ximian.com>
12038
12039         * debug-mini.h: New file.
12040
12041         * debug-mini.c
12042         (mono_debugger_insert_breakpoint_full): Moved here from
12043         ../metadata/mono-debug-debugger.c.
12044         (mono_debugger_remove_breakpoint): Likewise.
12045         (mono_debugger_breakpoint_callback): Likewise.
12046
12047 2007-06-15  Raja R Harinath  <rharinath@novell.com>
12048
12049         * jit-icalls.c (mono_helper_compile_generic_method): Update to
12050         changes in MonoGenericClass.
12051
12052 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
12053
12054         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
12055
12056 2007-06-14  Raja R Harinath  <rharinath@novell.com>
12057
12058         * jit-icalls.c (mono_helper_compile_generic_method): Update to
12059         removal of MonoGenericMethod.
12060
12061 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
12062
12063         * mini-exceptions.c: hooks for the exception events profiling API.
12064
12065 2007-06-14  Randolph Chung  <tausq@debian.org>
12066
12067         * Makefile.ma: Add hppa target.
12068         * mini-arch.h: Include mini-hppa.h
12069         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
12070         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
12071         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
12072
12073 2007-06-14  Randolph Chung  <tausq@debian.org>
12074
12075         * inssel.brg: Add rules for "chained" compare-branch operations so that
12076         a single compare op can affect multiple branches.  Adjust cost for
12077         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
12078         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
12079         cost for some rules so that they can more easily be overridden by
12080         per-arch rules (with fixes from lupus).
12081         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
12082
12083 2007-06-13  Randolph Chung  <tausq@debian.org>
12084
12085         * mini-ops.h: Reorder branch ops so that they match the order of the
12086         corresponding CEE_* ops.  The code expects them this way.
12087         Add new ops for HPPA target.
12088         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
12089
12090 2007-06-13  Randolph Chung  <tausq@debian.org>
12091
12092         * mini-exceptions.c: Handle cases where the stack grows towards
12093         larger addresses.
12094         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
12095
12096 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
12097
12098         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
12099         counter.
12100         * driver.c: explain where a non-matching corlib is found.
12101
12102 2007-06-13  Mark Probst  <mark.probst@gmail.com>
12103
12104         * mini.c (print_jit_stats): Output dynamic code allocation stats.
12105
12106 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
12107
12108         * mini-exceptions.c: Generate a method profile leave event during
12109         an exception to ensure that the profiler gets notified.
12110
12111 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
12112
12113         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
12114         branch.
12115
12116         * cpu-amd64.md: Add long_and/or/xor opcodes.
12117
12118 2007-06-06  Wade Berrier  <wberrier@novell.com>
12119
12120         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
12121         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
12122         length of instruction shr_imm (expected 8, got 10)
12123
12124 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
12125
12126         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
12127
12128 2007-06-06  Mark Probst  <mark.probst@gmail.com>
12129
12130         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
12131         MonoInternalHashTable again (fixed bug in the internal hash table
12132         code).
12133
12134 2007-06-06  Mark Probst  <mark.probst@gmail.com>
12135
12136         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
12137         Have to figure out what makes it crash the SWF regression.
12138
12139 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
12140
12141         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
12142
12143 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
12144
12145         * mini.c: optimize out the type check when storing null in a
12146         reference array.
12147
12148 2007-06-04  Mark Probst  <mark.probst@gmail.com>
12149
12150         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
12151         MonoInternalHashTable.
12152
12153 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
12154
12155         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
12156         signed integer methods.
12157
12158 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
12159
12160         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
12161         permanently since the current approach doesn't work.
12162
12163 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
12164
12165         * inssel.brg (stmt): Only call delegate->invoke_impl if 
12166         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
12167
12168 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
12169
12170         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
12171         the sreg2==rdx case.
12172         
12173         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
12174         account if it contains a rex prefix.
12175         (peephole_pass): Handle OP_FMOVE as well.
12176
12177 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
12178
12179         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
12180         as it causes regressions.
12181
12182 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
12183
12184         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
12185         static case as well.
12186
12187         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
12188
12189         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
12190         (mono_arch_get_this_arg_from_call): Ditto.
12191
12192         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
12193
12194         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
12195         invoke_impl field.
12196
12197         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
12198         (mono_arch_get_this_arg_from_call): Ditto.
12199
12200         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
12201         
12202         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
12203         try to create optimized invoke code and use that for further invocations. 
12204         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
12205
12206         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
12207
12208 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
12209
12210         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
12211         sealed classes or methods.
12212         *devirtualization.cs: tests for the new optimization
12213
12214 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
12215
12216         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
12217         by the update_volatile () function.
12218
12219 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
12220
12221         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
12222         require it.
12223
12224         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
12225
12226 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
12227
12228         * mini.c: Add configure checks for header files.
12229         * mini-x86.c: Add configure checks for header files.
12230         * trace.c: Add configure checks for header files.
12231         * aot-runtime.c: Add configure checks for header files.
12232         * aot-compiler.c: Add configure checks for header files.
12233         * driver.c: Add configure checks for header files.
12234         * mini-codegen.c: Add configure checks for header files.
12235         
12236         Code is contributed under MIT/X11 license.
12237
12238 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
12239
12240         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
12241         icompare_imm -128 + op_iclt. Fixes #81703.
12242
12243 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
12244
12245         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
12246
12247 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
12248
12249         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
12250         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
12251         so that all isinst checks now use "interface_bitmap".
12252
12253 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
12254
12255         * cpu-amd64.md (jmp): Fix a warning.
12256
12257         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
12258
12259         * basic.cs: Add new regression test.
12260
12261         * basic.cs: Remove test which is now in basic-long.cs.
12262
12263         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
12264
12265         * basic-long.cs: Add new test.
12266         
12267 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
12268
12269         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
12270
12271 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
12272
12273         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
12274
12275         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
12276         places.
12277         
12278         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
12279         throwing code a bit.
12280
12281         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
12282         the exception throwing code a bit.
12283
12284         * mini-x86.c (get_call_info): Allocate result from a mempool.
12285
12286 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
12287
12288         * aot-compiler.c (find_typespec_for_class): Fix the assert.
12289
12290         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
12291
12292         * mini.h (MonoCompile): Add 'token_info_hash' field.
12293
12294         * mini.c: Save token->method associations during compilation so the AOT 
12295         compiler can use it.
12296         
12297         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
12298         which reference generic classes and methods.
12299
12300 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
12301
12302         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
12303
12304         * aot-compiler.c (compile_method): Fix a typo in a comment.
12305
12306         * aot-runtime.c (decode_cached_class_info): Skip generic types.
12307
12308         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
12309         everything generic.
12310
12311         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
12312
12313 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
12314
12315         * mini.h (MonoCompile): Add 'args' field.
12316
12317         * mini.c (mono_compile_create_vars): Store variables representing the arguments
12318         into cfg->args.
12319
12320         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
12321
12322 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
12323
12324         * mini.c (mono_compile_get_interface_var): Remove this unused function.
12325
12326         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
12327
12328         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
12329         opcodes for some opcodes.
12330
12331         * mini.h *.brg *.c: Use the new opcodes.
12332
12333 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
12334
12335         * mini.h: Bumped aot revision.
12336
12337         * inssel.brg: modified code generation of type checks for interfaces
12338         to use the new "MonoClass.interface_bitmap" instead of the old
12339         "MonoClass.interface_offsets".
12340
12341 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
12342
12343         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
12344
12345 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
12346
12347         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
12348         64 bit platforms.
12349
12350 2007-04-27  Neale Ferguson <neale@sinenomine.net>
12351
12352         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
12353
12354 2007-04-27  Wade Berrier  <wberrier@novell.com>
12355
12356         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
12357         mini.h) to fix build.
12358
12359 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
12360
12361         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
12362         
12363         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
12364         causes the corlib unit tests to fail.
12365
12366 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
12367
12368         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
12369
12370         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
12371
12372         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
12373         opcodes to the comparison relations.
12374
12375         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
12376         opcodes to their types.
12377         
12378         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
12379
12380         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
12381         it in cfg->arch.cinfo.
12382
12383         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
12384
12385         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
12386         cfg->cil_offset_to_bb.
12387
12388 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
12389
12390         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
12391         created becase of initlocals.
12392
12393 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
12394
12395         * mini-alpha.c cpu-alpha.md: More alpha port work from 
12396         Sergey Tikhonov <tsv@solvo.ru>.
12397
12398 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
12399
12400         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
12401
12402 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
12403
12404         * cpu-s390.md (break): Correct the length of break instruction.
12405
12406 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
12407
12408         * mini.c: fix a couple of soft-float issues and comments.
12409
12410 2007-04-15  Miguel de Icaza  <miguel@novell.com>
12411
12412         * trace.c (is_filenamechar): - is also a filename char.
12413
12414 2007-04-15  Neale Ferguson <neale@sinenomine.net>
12415
12416         * mini-s390.c: Correct checking for enum type in return value processing.
12417
12418 2007-04-14  Raja R Harinath  <rharinath@novell.com>
12419
12420         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
12421         (version.h): Makefile is in the build directory.
12422
12423 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
12424
12425         * mini-amd64.h: fix for assertion failure on Solaris/amd64
12426
12427 2007-04-11  Martin Baulig  <martin@ximian.com>
12428
12429         * mini.c (can_access_member): Fix handling of generic classes;
12430         fixes #81259.
12431
12432 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
12433
12434         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
12435
12436 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
12437
12438         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
12439
12440 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
12441
12442         * mini-codegen.c: make sure the right spill amount is
12443         used for fp or integer registers (fixes the float_sub_spill() on ppc).
12444
12445 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
12446
12447         * mini-ppc.c: fixes for the fp_branch_nan test.
12448
12449 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
12450
12451         * basic.cs: Comment out new test which still fails on ia64.
12452
12453 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
12454
12455         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
12456
12457 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
12458
12459         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
12460
12461 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
12462
12463         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
12464         on 64 bit machines. Fixes part of #80738.
12465
12466         * basic.cs: Add regression test.
12467
12468 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
12469
12470         * inssel.brg basic.cs: Revert previous change to fix build.
12471
12472         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
12473         platforms.
12474         
12475         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
12476
12477         * basic.cs: Add new regression test.
12478
12479 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
12480
12481         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
12482         many arguments.
12483
12484 2007-03-16  Neale Ferguson <neale@sinenomine.net>
12485
12486         * cpu-s390x.md: Correct length of break instruction.
12487
12488 2007-03-16  Neale Ferguson <neale@sinenomine.net>
12489
12490         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
12491         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
12492
12493 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
12494
12495         * *.c: Begin WIN64 port.
12496         * mini.c:  Use correct register in profiler.
12497         * mini-amd64.c: No inline assembly on Win64.
12498         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
12499         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
12500         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
12501         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
12502         mono_arch_ip_from_context for Win64.
12503         
12504         Contributed under MIT/X11 license.
12505
12506 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
12507
12508         * exceptions-amd64.c (seh_handler): Ditto.
12509
12510         * exceptions-x86.c (seh_handler): Fix a memory leak.
12511
12512 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
12513
12514         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
12515         mini-s390x.c: fixed peephole optimizations to deal
12516         correctly with 1 and 2 byte reload avoidance.
12517
12518 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
12519
12520         * cpu-s390.md, cpu-s390x.md: update localloc length.
12521
12522 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
12523
12524         * cpu-g4.md: added missing descriptions.
12525
12526 2007-03-14  Miguel de Icaza  <miguel@novell.com>
12527
12528         *  Makefile.am: Add support so the tail tests are not executed on
12529         PowerPC as that is a known limitation of the PowerPC port.
12530
12531 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
12532
12533         * runmdesc.bat:  Move to msvc directory.
12534         
12535 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
12536
12537         * runmdesc.bat:  Run executable that was produced by the current
12538         target and sent via an argument.
12539         
12540 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
12541
12542         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
12543         #81102.
12544
12545         * generics.2.cs: Add regression test.
12546
12547 2007-03-09  Wade berrier  <wberrier@novell.com>
12548
12549         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
12550
12551 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
12552
12553         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
12554         AOT code depends on this.
12555
12556 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
12557
12558         * mini.c: more precise tracking of types in the eval stack
12559         (part of fix for bug #81044).
12560
12561 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
12562
12563         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
12564
12565         * aot-compiler.c (encode_patch): Remove an obsolete comment.
12566
12567 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
12568
12569         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
12570
12571         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
12572
12573 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
12574
12575         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
12576         a pointer on 64 bit systems. Fixes #80190.
12577
12578         * iltests.il: Add new regression test.
12579
12580 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
12581
12582         * mini.c: inline a constant for Environment.IsRunningOnWindows.
12583
12584 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
12585
12586         * trace.c: Remove an erroneous alignemnt check when tracing.
12587           Fixes --trace on OSX86.
12588
12589 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
12590
12591         * mini-$(arch).h: initialize SP in context for all the archs.
12592
12593 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
12594
12595         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
12596         regressions in the thread tests.
12597
12598 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
12599
12600         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
12601         - fixed implementation of LOCALLOC opcode
12602         - implemented non-un compare for floats
12603         - code cleanup
12604         - implementation of FDIV and CKFINITE opcodes
12605         - fixes for latest mono updates
12606         - additional arch opcodes
12607
12608 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
12609
12610         * Makefile.am: simplify and merge rules for cross-compilation.
12611
12612 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
12613
12614         * local-propagation.c: Actually *apply* the fix for bug 80591...
12615
12616 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
12617
12618         * mini-exceptions.c: backuot part of the last change
12619         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
12620
12621 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
12622         * inssel.brg: Fix bug 59286.
12623
12624
12625 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
12626
12627         * mini-exceptions.c: patch from Zoltan to correctly check for
12628         stack boundaries (using the stack register, not the frame register),
12629         fixes bugs #80724, #79717.
12630
12631 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
12632
12633         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
12634         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
12635
12636         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
12637         presence of frame pointer elimination.
12638
12639 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
12640         
12641         * mini-x86.h: NetBSD UCONTEX_REG defines.
12642
12643 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
12644
12645         * inssel-amd64.brg: Fix amd64 build.
12646
12647 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
12648
12649         * mini.h: remove extern to workaround what looks likes gcc bug 26905
12650         on amd64.
12651
12652 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
12653
12654         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
12655         ends.
12656
12657         * mini-<ARCH>.c: Use mono_is_regsize_var ().
12658
12659 2007-01-30 Mark Mason <mason@broadcom.com>
12660
12661            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
12662            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
12663            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
12664            beginning support for CEE_JMP [not quite working yet]
12665            * tramp-mips.c: LMF handling now works
12666         
12667 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
12668
12669         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
12670
12671         * mini.h (NULLIFY_INS): New macro.
12672
12673 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
12674
12675         * mini.c: statistical profiler fix for windows, patch
12676         from Tor Lillqvist (tml@novell.com).
12677
12678 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
12679         * local-propagation.c: Fix bug 80591.
12680
12681 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
12682
12683         * Makefile.am: put back the --export-dynamic option as with
12684         the previous gmodule flags (thanks to Robert Jordan).
12685
12686 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
12687
12688         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
12689
12690         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
12691         simplify and speed up the local register allocator. Also rename some fields
12692         like iassign->vassign.
12693         
12694         * regalloc.c: Remove some functions which are no longer used since their
12695         inlined version is in mini-codegen.c.
12696         
12697         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
12698
12699         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
12700
12701 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
12702
12703         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
12704         narrowing. Fixes #80622.
12705
12706         * iltests.il: Add new regresssion test. 
12707
12708 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
12709
12710         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
12711         debug-debugger.c, debug-debugger.h: warning fixes.
12712         * driver.c: updated copyright year and made it fit in one line.
12713
12714 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
12715
12716         * aot-runtime.c: updated to use mono-dl instead of gmodule.
12717
12718 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
12719
12720         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
12721
12722         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
12723
12724         * iltests.il: Add new test for bug #80507.
12725
12726 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
12727
12728         * mini-arm.h: use soft-float also on vfp for now.
12729
12730 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
12731
12732         * mini.c: fix some more soft-float issues.
12733
12734 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
12735
12736         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
12737
12738 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
12739         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
12740         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
12741         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
12742
12743 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
12744
12745         * mini-arm.c: typo fix.
12746
12747 2007-01-23  Neale Ferguson <neale@sinenomine.net>
12748
12749         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
12750
12751 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
12752
12753         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
12754         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
12755
12756         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
12757
12758         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
12759
12760         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
12761         
12762         * inssel.brg: Fix a warning.
12763
12764         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
12765
12766         * abcremoval.c ssa.c ssapre.c: Update after this change.
12767         
12768         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
12769
12770         * dominators.c (df_set): Use mono_bitset_union_fast.    
12771
12772 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
12773
12774         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
12775         mini-codegen.c: reduce relocations and memory usage for the cpu
12776         description.
12777
12778 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
12779
12780         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
12781
12782         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
12783         to reduce their size.
12784
12785 2007-01-19 Mark Mason <mason@broadcom.com>
12786
12787         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
12788         * mini-mips.c: more configuration macros, support long conditional branches, additional
12789         asserts, fix epilog instrumentation.
12790         * mini-mips.h: use standard stack walk
12791         * cpu-mips.md: increase size of div, rem and conditional branches
12792         
12793 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
12794
12795         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
12796         to cpu spec data.
12797
12798 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
12799
12800         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
12801         (compile_method): Ditto.
12802
12803         * aot-runtime.c (decode_klass_info): Ditto.
12804
12805         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
12806         needed by the code generated by inssel.brg. Also fix a warning.
12807
12808 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
12809
12810         * mini.c: deal with enums that become genericinsts by
12811         being nested in a generic class (bug #79956).
12812
12813 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
12814
12815         * mini.c: match the generic definition to check for
12816         private access with generic types (bug #78431).
12817
12818 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
12819
12820         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
12821         to make life easier for people cross-compiling that insist on not
12822         using scratchbox.
12823
12824 2007-01-17 Mark Mason <mason@broadcom.com>
12825
12826         * inssel-long.brg: patch to deal with mips missing flags
12827         * inssel-long32-mips.brg: implement overflow checks
12828         * insset-mips.brg: implement overflow checks
12829         * mini-mips.h: implement conditional exception handling
12830         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
12831           Remove unused code, minor cleanups.
12832         * exceptions-mips.c: minor cleanups
12833         * mini-ops.h: add mips conditional exception ops
12834         * cpu-mips.md: add mips conditional exception ops
12835
12836         
12837 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
12838
12839         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
12840         to deal with mips missing of flags.
12841
12842 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
12843
12844         * exceptions-ppc.c: execute fault handlers.
12845
12846 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
12847
12848         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
12849
12850 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
12851
12852         * mini.c: handle also floating point values in initialize_array.
12853
12854 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
12855
12856         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
12857         array initialization and make it conditional on the intrins option.
12858
12859 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
12860
12861         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
12862         relocations and put the patch info names close to the enum definition.
12863
12864 2007-01-15 Mark Mason <mason@broadcom.com>
12865
12866         * basic.cs, exceptions.cs: break up large tests to increase debugability.
12867
12868 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
12869
12870         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
12871
12872 2007-01-12  Raja R Harinath  <rharinath@novell.com>
12873
12874         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
12875
12876 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
12877
12878         * Makefile.am: distribute the mips sources.
12879
12880 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
12881
12882         * mini-codegen.h: handle bug #80489 here, by excluding ecx
12883         directly.
12884
12885 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
12886
12887         * cpu-x86.md: back out for now as this triggers other regressions.
12888
12889 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
12890
12891         * cpu-x86.md: force src1 and dest regpair for long shift instructions
12892         to eax:edx, so ecx can't get allocated to them (bug #80489).
12893
12894 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
12895
12896         * mini.c, mini-exceptions.c: enabled running fault handlers
12897         (bug #80469).
12898
12899 2007-01-03  Miguel de Icaza  <miguel@novell.com>
12900
12901         * driver.c: If nothing fail, do not use the string "failed",
12902         because it makes it very annoying to view test result logs on the
12903         web. 
12904
12905 2006-12-30  Miguel de Icaza  <miguel@novell.com>
12906
12907         * debug-debugger.c (mono_debugger_main): Rename "main" to
12908         "main_method" to prevent a warning.
12909
12910         Remove a warning for unused field.
12911
12912 2006-12-28  Martin Baulig  <martin@ximian.com>
12913
12914         * debug-debugger.c
12915         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
12916
12917 2006-12-22  Martin Baulig  <martin@ximian.com>
12918
12919         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
12920         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
12921         seperate `.mdb_debug_info' section, so we can access it from the
12922         debugger even if the binary is stripped.
12923
12924         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
12925         from the `.mdb_debug_info' here to prevent the linker from
12926         removing that section.
12927
12928         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
12929         mdb-debug-info64.s.
12930
12931 2006-12-19  Robert Jordan  <robertj@gmx.net>
12932
12933         * mini-x86: enable the code to return small structures in
12934         registers for FreeBSD as well. Fixes bug #80278.
12935         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
12936
12937 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
12938
12939         * mini-x86.c: align the stack when calling the profiler
12940         function instrumenting the prolog (on OSX).
12941
12942 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
12943
12944         * mini.c: emit a break opcode where Debugger.Break () is called.
12945
12946 2006-12-13  Miguel de Icaza  <miguel@novell.com>
12947
12948         * mini.c (mono_method_to_ir): Provide useful information on this
12949         assert, to prevent others from debugging like I did.
12950
12951 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
12952
12953         * mini.c: enable code which was incorrectly commented
12954         (bug #80235).
12955
12956 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
12957
12958         * mini-x86.c: enable on OSX, too, the code to return small
12959         structures in registers.
12960
12961 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
12962
12963         * mini-x86.c: remove the use of the dynamic code manager here, too.
12964
12965 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
12966
12967         * mini.h, debug-debugger.c, tramp-*.c: fixed 
12968         mono_debugger_create_notification_function() to use
12969         mono_global_codeman_reserve () instead of a dynamic code manager.
12970
12971 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
12972
12973         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
12974         ves_array_element_address() jit icall and use a generated
12975         managed method instead (which is about 4 times faster for a rank 3
12976         array access).
12977
12978 2006-11-29  Mark Mason  <mason@broadcom.com>
12979
12980         * basic-calls.cs: additional tests for passing
12981         structures as function arguments.
12982
12983 2006-11-29  Mark Mason  <mason@broadcom.com>
12984
12985         * mini-mips.h: disable custom exception handling
12986         * mini-mips.c: throw/rethrow should use jalr to call
12987         exception stubs.  Fixed bug with passing structures
12988         by value. More support for tracing floating point
12989         functions.
12990
12991 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
12992
12993         * mini.c: fixed typo in the soft-float ldind.r4 handling
12994         (bug #80086).
12995
12996 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
12997
12998         * mini.c, mini.h, driver.c: added --runtime command line
12999         option to select a different runtime than the autodetected one.
13000         * jit.h: added API for embedders to initialize with a specific
13001         runtime version.
13002
13003 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
13004
13005         * mini.c: handle also boxing of r4 values (bug #80024).
13006
13007 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
13008
13009         * mini-ppc.c: force indirect calls until we reserve
13010         enough address space for all the generated code.
13011
13012 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
13013
13014         * exceptions-arm.c: workaround bugs in the libc definition
13015         of struct ucontext.
13016
13017 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
13018
13019         * inssel.brg: fixes from me and Mark Mason.
13020
13021 2006-11-23  Dick Porter  <dick@ximian.com>
13022
13023         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
13024         semaphore display now we've fixed the initial value
13025
13026 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
13027
13028         * inssel.brg: partially revert the last change to fix the build.
13029
13030 2006-11-21  Mark Mason  <mason@broadcom.com>
13031
13032         * inssel.brg: Add and use compare-and-branch macros to support
13033         architectures that do not have condition code registers (ie. MIPS).
13034         * *-mips.{c,brg,md}: Fix copyright statements
13035
13036 2006-11-20  Mark Mason  <mason@broadcom.com>
13037
13038         * Makefile.am: remove mini-codegen.c from list of MIPS sources
13039         * mini.c: Allow GET_CONTEXT to be specified by the arch port
13040         * mini.h: Added declaration for mono_print_ins()
13041         * mini-codegen.c: added ins_spec initializer for MIPS
13042         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
13043         vreg to be virtual and hreg to be non-virtual.
13044         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
13045         is not yet working/implemented correctly.
13046         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
13047         non-static, fixup calls to print_ins() from other parts in the file.
13048
13049 2006-11-20  Mark Mason  <mason@broadcom.com>
13050
13051         * basic-calls.cs: added tests for passing structures as arguments
13052         to calls.
13053
13054 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
13055
13056         * inssel-long32.brg: optimize signed division by power of two.
13057
13058 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
13059
13060         * mini-arm.c: added support for interworking with thumb code
13061         (mono must be still be built using the ARM instruction encoding).
13062
13063 2006-11-19  Miguel de Icaza  <miguel@novell.com>
13064
13065         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
13066         verifier has different rules for it.   Fixes a few verifier issues
13067         in the test suite.
13068
13069         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
13070         at the end, so people know what happened.
13071
13072 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
13073
13074         * brach-opts.c: in optimize_exception_target() make sure we
13075         are in a catch clause (fixes bug #79871).
13076
13077 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
13078
13079         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
13080         more soft-float support fixes.
13081
13082 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
13083
13084         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
13085         that are passed half on the stack and half in registers.
13086
13087 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
13088
13089         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
13090         more mips integration work from Mark E Mason 
13091         <mark.e.mason@broadcom.com>.
13092
13093 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
13094
13095         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
13096         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
13097         tramp-mips.c: added sources for the mips port, not
13098         integrated in the build yet. Contributed by
13099         Mark E Mason <mark.e.mason@broadcom.com>.
13100
13101 2006-11-14  Neale Ferguson <neale@sinenomine.net>
13102
13103         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
13104
13105 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
13106
13107         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
13108         put the soft-float rules in its own file since it seems to
13109         break s390 compilation.
13110
13111 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
13112
13113         * mini-arm.c: fixed wrnings.
13114
13115 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
13116
13117         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
13118         inssel-arm.brg: ARM support for soft-float.
13119
13120 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
13121
13122         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
13123         loads and stores of 32 bit fp values.
13124
13125 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
13126
13127         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
13128
13129         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
13130         works. Fixes #79852 and #79463.
13131
13132 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
13133
13134         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
13135         more soft-float support WIP and fixes.
13136
13137 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
13138
13139         * mini-arm.c: some VFP updates.
13140
13141 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
13142
13143         * mini-exceptions.c: 0 is a valid local var offset in some
13144         architectures, don't assert (bug #78508).
13145
13146 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
13147
13148         * exceptions-arm.c: fixed off by one error in stack walk code.
13149
13150 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
13151
13152         * mini.h, mini.c: more precise tracking of type load exceptions.
13153
13154 2006-11-03  Robert Jordan  <robertj@gmx.net>
13155
13156         * Makefile.am: [WIN32] Add monow.exe target.
13157         * driver.c: [WIN32] Don't detach the console when debugging.
13158         Fixes bug #79797.
13159         
13160 2006-10-30  Miguel de Icaza  <miguel@novell.com>
13161
13162         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
13163
13164 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
13165
13166         * aot-compiler.c (emit_method_info): Add a case missed earlier.
13167
13168         * driver.c (mini_regression): Fix --regression with AOT.
13169
13170         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
13171
13172 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
13173
13174         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
13175
13176         * mini-sparc.h: Don't use sigaction on sparc/linux.
13177
13178         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
13179
13180         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
13181
13182         * mini-exceptions.c: Add proper include files for getpid ().
13183
13184 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
13185
13186         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
13187         address instead of a MonoJitInfo* to avoid decoding the exception info for the
13188         method.
13189
13190         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
13191         name cache to reduce its size.
13192
13193         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
13194
13195 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
13196
13197         * mini-x86.c: Save/restore the current LMF structure more efficiently using
13198         the mono_lmf TLS variable.
13199
13200         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
13201         trampoline lmf frames.  
13202
13203         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
13204
13205 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
13206
13207         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
13208         the mono_lmf TLS variable.
13209
13210         * mini-exceptions.c: Access the LMF structure through accessors.
13211
13212         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
13213         variable instead of in jit_tls->lmf.
13214
13215         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
13216         
13217         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
13218         trampoline lmf frames.
13219
13220         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
13221
13222 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
13223
13224        * mini.c trace.c mini-x86.c: Revert these too.
13225         
13226        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
13227        signature change.
13228
13229 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
13230
13231         * genmdesc.c: removed now dead code.
13232
13233 2006-10-09  Robert Jordan <robertj@gmx.net>
13234
13235         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
13236
13237 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
13238
13239         * mini.h: do not leave gaps in the opcode values.
13240
13241 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
13242
13243         * jit-icalls.h: flag functions as internal here, too.
13244
13245 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
13246
13247         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
13248         functions with the internal attribute.
13249
13250 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
13251
13252         * aot-compiler.c: fclose the file descriptor in the profile read loop.
13253
13254 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
13255
13256         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
13257         for soft-float.
13258
13259 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
13260
13261         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
13262         tail calls as on other platforms.
13263
13264         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
13265
13266         * iltests.il: Add a few tailcall tests.
13267
13268 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
13269
13270         * driver.c: fix loop for old compilers (bug #79521).
13271
13272 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
13273
13274         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
13275
13276         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
13277
13278         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
13279         metadata without any code.
13280
13281         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
13282         more precise debugging information using gdb.
13283
13284 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
13285
13286         * inssel-ia64.brg: Make the helper methods static.
13287
13288 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
13289
13290         * inssel-x86.brg: make the helper methods static.
13291
13292 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
13293
13294         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
13295
13296 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
13297
13298         * mini.c: updates for monoburg changes.
13299         * inssel.brg: make a few helper functions static as they should.
13300
13301 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
13302
13303         * Makefile.am: Move mini-codegen.c to common_sources.
13304
13305 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
13306
13307         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
13308         instructions.
13309         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
13310         mini-ppc.h: port to use the common local register allocator.
13311
13312 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
13313
13314         * mini.h: Remove the comment too then.
13315
13316 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
13317
13318         * mini.h: put back backend.data which is to be used shortly and
13319         doesn't increase the size of MonoInst. If any 64 bit arch aligned
13320         pointers on 4 byte boundaries it'd have much bigger issues running
13321         and you can ifdef it out anyway.
13322
13323 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
13324
13325         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
13326         MonoInst size by 4 bytes on 64 bit machines.
13327
13328 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
13329
13330         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
13331         replacement with more meaningful field names. Arch maintainers, please
13332         check the assigned names are good enough for your arch.
13333
13334 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
13335
13336         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
13337         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
13338
13339 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
13340
13341         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
13342         relocations and memory requirements, put the optimization flags
13343         definitions in their own file.
13344
13345 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
13346
13347         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
13348
13349         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
13350
13351 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
13352
13353         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
13354
13355 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
13356
13357         * inssel.brg: use the correct function to get the size of an item
13358         in an array, given an element class.
13359         * aot-compiler.c: do not access class->class_size directly.
13360
13361 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
13362
13363         * mini.h, debug-mini.c: added a debugging function to print
13364         info about local variables and arguments in a jitted method.
13365
13366 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
13367
13368         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
13369
13370         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
13371
13372 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
13373
13374         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
13375         inner and outer loops when passing vtypes.
13376
13377 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
13378
13379         * mini-ppc.c: take into account the cpu errata for cache flushing
13380         which caused some random errors (bug #79381).
13381
13382 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
13383
13384         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
13385         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
13386
13387 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
13388
13389         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
13390         loaded.
13391
13392         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
13393         freebsd ports tree.
13394
13395         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
13396         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
13397
13398         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
13399         displacement.
13400
13401 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
13402
13403         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
13404
13405 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
13406
13407         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
13408         macro does not have to be changed during debugging.
13409
13410         * 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>.
13411
13412         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
13413
13414         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
13415         
13416         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
13417         MONO_ARCH_NO_EMULATE_MUL is defined.
13418
13419         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
13420
13421         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
13422
13423         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
13424
13425         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
13426         
13427 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
13428
13429         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
13430         stuff to mini-exceptions.c where it is used.
13431
13432         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
13433         setup code, the real one is in mini-exceptions.c.
13434
13435         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
13436         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
13437         some changes from the freebsd ports tree.
13438
13439         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
13440         constants.
13441         
13442         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
13443
13444 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
13445
13446         * mini.c: on Linux, check for /proc to be mounted
13447         (bug# 79351, novell bug#201204).
13448
13449 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
13450
13451         * mini.c: handle cases where pthread_attr_getstack() behaves
13452         incorrectly (bug #78096).
13453
13454 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
13455
13456         * mini-arm.c: support larger stack frames (bug #79272).
13457
13458 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
13459
13460         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
13461
13462         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
13463         tokens.
13464
13465         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
13466         mono_class_from_name () to find a class from its name.
13467
13468         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
13469
13470 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
13471
13472         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
13473
13474 2006-09-05  Kornel Pal  <kornelpal@gmail.com>
13475
13476         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
13477
13478 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
13479
13480         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
13481         callinfo->trampoline.
13482
13483         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
13484         fixes #79271.
13485         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
13486         future.
13487
13488 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
13489
13490         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
13491
13492 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
13493
13494         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
13495         stats.method_trampolines, it is already done by the generic trampoline code.
13496
13497         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
13498         
13499 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
13500
13501         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
13502
13503         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
13504
13505         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
13506
13507         * mini.c (print_jit_stats): Print mscorlib mempool size too.
13508         
13509         * mini.c (print_jit_stats): Print new stats.
13510
13511         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
13512
13513 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
13514
13515         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
13516         Address on two dimensional arrays. Fixes #78729.
13517
13518         * mini.h (MonoCompile): Add a 'skip_visibility' field.
13519
13520         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
13521         a method.
13522
13523         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
13524
13525         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
13526         #79130.
13527         
13528         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
13529         a race condition.
13530         (mini_get_ldelema_ins): Ditto.
13531
13532 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
13533
13534         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
13535         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
13536         Fixes #79213.
13537
13538 2006-08-29 Neale Ferguson <neale@sinenomine.net>
13539
13540         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
13541         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
13542
13543         * exceptions-s390x.c: Cosmetic change.
13544
13545         * tramp-s390.c: Fix warning.
13546
13547         * cpu-s390.md: Correct length of mul_imm.
13548
13549 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
13550
13551         * aot-compiler.c: added binary writer with ELF backend
13552         implementation (only on Linux/x86 for now).
13553
13554 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
13555
13556         * Makefile.am: Don't run net 2.0 AOT tests.
13557
13558         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
13559         (mono_compile_assembly): Skip net 2.0 assemblies as well.
13560
13561         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
13562
13563 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
13564
13565         * aot-compiler.c: simplified and refactored the asm-writing code
13566         to allow different backends.
13567
13568 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
13569
13570         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
13571
13572         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
13573         little. Share patches of type TYPE_FROM_HANDLE as well.
13574
13575         * mini.c (mono_patch_info_equal): New helper function.
13576         (mono_patch_info_hash): Ditto.
13577
13578         * aot-compiler.c (emit_method_code): Fix s390 build.
13579
13580         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
13581         is not handled because it is stored as a flag and not as a type ctor. Fixes
13582         #79016.
13583
13584 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
13585
13586         * aot-compiler.c: Fix computation of GOT slot statistics.
13587         
13588         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
13589         Also remove support for not PIC AOT.
13590
13591         * mini.h: Bump AOT file format version.
13592
13593         * objects.cs: Add a test for #78990.
13594
13595         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
13596         (peter.dettman@iinet.net.au). Fixes #79087.
13597
13598         * basic-long.cs: Add a test for the above.
13599
13600 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
13601
13602         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
13603         
13604         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
13605         code somewhat.
13606
13607 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
13608
13609         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
13610         exceptions.
13611
13612 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
13613
13614         * mini.c: Don't verify COM proxy invoke calls
13615         
13616
13617 2006-08-10  Dick Porter  <dick@ximian.com>
13618
13619         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
13620         which process is holding semaphores locked.
13621
13622 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
13623
13624         * mini-ia64.c mini-amd64.c: Fix #79027.
13625
13626         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
13627
13628         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
13629
13630         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
13631         implicit arguments in a vararg call. Fixes #79027.
13632
13633 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
13634
13635         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
13636         (mono_get_array_new_va_signature): Ditto.
13637
13638 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
13639
13640         * aot-runtime.c: Call init_plt lazily.
13641
13642         * inssel-long.brg: Fix unsigned long->int conversion.
13643
13644         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
13645
13646         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
13647         that most data is now in the .rss/.data section.
13648
13649 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
13650
13651         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
13652
13653         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
13654
13655         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
13656
13657         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
13658
13659         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
13660         virtual call. Fixes #79010.
13661
13662         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
13663         and use the result as the this argument in the real call.
13664
13665         * generics.2.cs: Add a new test for #79010.
13666         
13667 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
13668
13669         * mini-x86.c: Fix a warning.
13670
13671         * aot-compiler.c: Add a bunch of statistics.
13672
13673         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
13674
13675 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
13676
13677         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
13678
13679 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
13680
13681         * 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>.
13682
13683 2006-07-13  Miguel de Icaza  <miguel@novell.com>
13684
13685         * mini.c (mono_method_to_ir): Obtain the original method in the
13686         CIL stream and use this to perform validation.
13687
13688         Fixed: #78816
13689
13690 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
13691
13692         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
13693         (mono_arch_call_opcode): Ditto.
13694
13695         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
13696         #78826.
13697
13698         * mini.c (mono_patch_info_dup_mp): New helper function.
13699         
13700         * aot-compiler.c (compile_method): Fix some of the memory allocated during
13701         compilation. Fixes #78827.
13702
13703 2006-07-18  Kornel Pal  <kornelpal@gmail.com>
13704
13705         * declsec.c: Use original security informations for
13706           MONO_WRAPPER_MANAGED_TO_MANAGED.
13707
13708 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
13709
13710         * mini.c: Allow Com Interop methods/classes and
13711         don't verify COM wrapper calls
13712         
13713
13714 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
13715
13716         * inssel-long32.brg: Fix long->i4 checked conversion.
13717
13718         * exceptions.cs: Add a test for the above.
13719
13720 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
13721
13722         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
13723
13724         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
13725         leaks.
13726
13727         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
13728         #78775.
13729
13730 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
13731
13732         * mini.c: Fix solaris/x86 exception handling.
13733
13734         * Makefile.am: Get rid of $(ICU_LIBS).
13735
13736 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
13737
13738         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
13739         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
13740         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
13741
13742         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
13743
13744         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
13745         this function causes a SIGSEGV.
13746
13747 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
13748
13749         * mini.c: Remove unused solaris/x86 includes.
13750
13751 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
13752
13753         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
13754
13755 2006-06-20  Jb Evain  <jbevain@gmail.com>
13756
13757         * cpu-g4.md: fix max length of start_handler instruction.
13758
13759 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
13760         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
13761
13762 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
13763         * ssa.c: Fixed bug 78653 for SSA based deadce.
13764         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
13765         MonoInst.flags, used in SSA based deadce.
13766         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
13767         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
13768
13769 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
13770
13771         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
13772         it can end up using non executable memory on ppc64 systems
13773         running ppc32 userspace (fix from Johannes Berg).
13774
13775 2006-06-14  Dick Porter  <dick@ximian.com>
13776
13777         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
13778         4.1.1
13779
13780 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
13781         * mini.c: Made so that inline is locally disabled if it would
13782         trigger a .cctor, because too many apps depend on this behavior
13783         (which seems to be also the one of the MS CLR).
13784
13785 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
13786
13787         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
13788         No idea why this worked before.
13789
13790         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
13791         which branch to outer exception clauses since they could skip the
13792         inner finally clauses. Fixes #78633.
13793
13794         * exceptions.cs: Add a test for the above.
13795
13796         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
13797         Fixes #78629.
13798
13799         * iltests.il: Add a test for the above.
13800
13801 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
13802
13803         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
13804         after the end of a try bblock, to prevent asserts in mini_method_compile ().
13805
13806         * iltests.il: Add a test for the above.
13807
13808 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
13809
13810         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
13811         
13812         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
13813         methods as instrinsics.
13814
13815 2006-06-09  Wade Berrier <wberrier@novell.com>
13816
13817         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
13818         (simple-cee-ops.h ssapre-mini-ops.h)
13819
13820 2006-06-09  Neale Ferguson <neale@sinenomine.net>
13821
13822         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
13823         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
13824         instruction).
13825         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
13826         * cpu-s390x.md: Fix max. length values for a couple of instructions.
13827
13828 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
13829
13830         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
13831
13832 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
13833
13834         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
13835         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
13836         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
13837         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
13838         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
13839         of opcodes, so that bug 78549 should not happen again.
13840         * ssapre.c: Updated to use the renamed files.
13841
13842 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
13843
13844         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
13845         in OP_ATOMIC_EXCHANGE_I4.
13846
13847 2006-06-07  Wade Berrier <wberrier@novell.com>
13848
13849         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
13850         in mono_debugger_create_notification_function)
13851
13852 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
13853
13854         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
13855         
13856         * mini.c (type_from_stack_type): Disable some changes which do not
13857         seem to work.
13858
13859         * driver.c: Reenable opts.
13860
13861         * mini.h (MonoStackSlot): New structure to keep track of the verification state
13862         of the evaluation stack.
13863         
13864         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
13865         evaluation stack trace at entry to the bblock.
13866
13867         * mini.c (merge_stacks): New function to perform verification of stack merges.
13868         Turned off by default.
13869
13870         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
13871         STACK_MP.
13872         
13873 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
13874
13875         * local-propagation.c: Fixed bug 78549.
13876
13877 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
13878
13879         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
13880
13881 2006-06-02  Miguel de Icaza  <miguel@novell.com>
13882
13883         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
13884         tramp-arm.c, tramp-ia64.c
13885         (mono_debugger_create_notification_function): Update signature to
13886         new signature and use new protocol for creating the notification
13887         function.  
13888
13889         Should fix the build.
13890
13891 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
13892
13893         * exceptions-ppc.c (mono_jit_walk_stack)
13894         (ves_icall_get_frame_info): Fix the build
13895
13896 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
13897
13898         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
13899
13900 2006-05-31  Raja R Harinath  <rharinath@novell.com>
13901
13902         * il2tests.2.il: New file for generics CIL tests.  Add test for
13903         #78019.
13904         * Makefile.am: Update.
13905
13906         Fix #78019
13907         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
13908         to nullable types.
13909
13910 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
13911
13912         * aliasing.c: Fixed bug 78311.
13913
13914 2006-05-29  Martin Baulig  <martin@ximian.com>
13915
13916         * mini-exceptions.c (mono_find_jit_info): When computing the
13917         native offset, check whether we're actually inside the method's
13918         code; call mono_debug_print_stack_frame() to format the frame.
13919         (ves_icall_System_Exception_get_trace): Call
13920         mono_debug_print_stack_frame() to format the stack frame.
13921         (ves_icall_get_trace): Update to the new debugging API.
13922         (mono_jit_walk_stack_from_ctx): Likewise.
13923         (ves_icall_get_frame_info): Likewise.
13924
13925         * mini.c (get_method_from_ip): Use the new debugging API.
13926         (mono_print_method_from_ip): Likewise.
13927
13928         * exceptions-ppc.c
13929         (mono_jit_walk_stack): Use the new debugging API.
13930         (ves_icall_get_frame_info): Likewise.   
13931
13932 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
13933
13934         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
13935
13936 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
13937
13938         * mini.c: Added "limitator" to inline for debugging.
13939
13940 2006-05-24  Martin Baulig  <martin@ximian.com>
13941
13942         * debug-debugger.c (mono_debugger_init): Create a private,
13943         malloc()-based code manager for the notification function and
13944         intentionally leak it on exit.  This fixes the crash-on-exit race
13945         condition.
13946
13947         * tramp-amd64.c
13948         (mono_debugger_create_notification_function): Added
13949         `MonoCodeManager *' argument.
13950
13951         * tramp-x86.c
13952         (mono_debugger_create_notification_function): Added
13953         `MonoCodeManager *' argument.
13954
13955 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
13956
13957         * aliasing.c: Fixed 64 bit issue.
13958         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
13959         default since all known bugs are fixed (one more time!).
13960
13961 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
13962
13963         * mini.c: write barrier support.
13964
13965 2006-05-23  Martin Baulig  <martin@ximian.com>
13966
13967         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
13968         check at the top of the file.
13969
13970 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
13971
13972         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
13973         reverting changes without reason and without changelog entries.
13974
13975 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
13976
13977         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
13978         to a few opcodes. Fixes #78439.
13979
13980         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
13981         consistency with other archs.
13982
13983         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
13984
13985 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
13986
13987         * debug-debugger.c: fix the build.
13988
13989 2006-05-17  Martin Baulig  <martin@ximian.com>
13990
13991         * debug-debugger.c
13992         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
13993         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
13994         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
13995         (debugger_attach): Call GC_mono_debugger_add_all_threads().
13996
13997 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
13998
13999         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
14000
14001 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
14002
14003         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
14004         MONO_TYPE_GENERICINST.
14005         
14006         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
14007         MONO_TYPE_GENERICINST.
14008
14009 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
14010
14011         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
14012         #78325.
14013
14014 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
14015
14016         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
14017         mempool.
14018         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
14019
14020 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
14021
14022         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
14023         mono_trace_cleanup ().
14024
14025         * iltests.il: Fix problem with the newly added test.
14026
14027         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
14028         due to register constraints, free up the previous hreg. Fixes #78314.
14029
14030         * iltests.il: Add new test for #78314.  
14031
14032         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
14033         Interlocked.Add. Fixes #78312.
14034
14035         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
14036         
14037 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
14038
14039         * inssel.brg (mini_emit_virtual_call): Fix a warning.
14040
14041 2006-05-05  Martin Baulig  <martin@ximian.com>
14042
14043         * debug-mini.c (mono_debug_open_block): New method.
14044
14045         * mini-amd64.c
14046         (mono_arch_output_basic_block): Call mono_debug_open_block() at
14047         the beginning of each basic block.
14048
14049         * mini-x86.c
14050         (mono_arch_output_basic_block): Call mono_debug_open_block() at
14051         the beginning of each basic block.
14052
14053 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
14054
14055         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
14056         default until I understand why they break the build on amd64.
14057
14058 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
14059
14060         * mini.c (mini_cleanup): Call mono_cleanup ().
14061
14062         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
14063         errors.
14064
14065 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
14066
14067         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
14068         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
14069         default since all known bugs are fixed, and I cannot reproduce bug
14070         77944... I'm asking Matt Hargett to test again after this commit.
14071
14072 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
14073
14074         * mini-codegen.c: Fixed typo that thrashed inline.
14075
14076 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
14077
14078         * dominators.c (compute_dominators): Avoid using a worklist since
14079         it is not correct in some cases. Instead, iterate over all bblocks as
14080         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
14081
14082 2006-04-28  Miguel de Icaza  <miguel@novell.com>
14083
14084         * mini.c (mono_jit_compile_method_inner): Use
14085         mono_prepare_exception_from_error that resets the value
14086         internally.
14087
14088 2006-04-27  Miguel de Icaza  <miguel@novell.com>
14089
14090         * mini.c: Move the mini_loader_error_to_exception to metadata. 
14091         
14092 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
14093
14094         * aliasing.c: Fixed bug 78210.
14095
14096 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
14097
14098         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
14099         default until all their problems (or the ones they trigger) are fixed.
14100
14101 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
14102
14103         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
14104         
14105         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
14106         as loaded only after resolving patches since that could invoke the same method.
14107
14108         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
14109
14110         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
14111         functions.
14112
14113         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
14114         AOT loader.
14115
14116         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
14117         stack.
14118
14119         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
14120         made from AOT code through the PLT table.
14121
14122         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
14123         holding the plt offset when a call is made to the aot plt trampoline.
14124         
14125 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
14126
14127         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
14128         amd64 AOT support.
14129
14130         * Makefile.am (common_sources): Fix build breakage.
14131
14132         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
14133         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
14134         intra-assembly calls if possible.
14135         
14136         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
14137
14138         * mini-trampolines.c: Handle PLT entries.
14139
14140         * mini.c: Avoid creating a GOT var for calls.
14141
14142         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
14143         from mscorlib code.
14144
14145         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
14146         from mscorlib code.
14147
14148         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
14149         AOT code.       
14150
14151         * mini.h: Bump AOT file format version.
14152         
14153         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
14154         covers more cases.
14155
14156 2006-04-25  Martin Baulig  <martin@ximian.com>
14157
14158         * driver.c: Disable copyprop, consprop and inline when running
14159         inside the debugger.
14160
14161 2006-04-25  Martin Baulig  <martin@ximian.com>
14162
14163         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
14164         with `get_current_thread' and added `detach'.
14165         (MonoDebuggerMetadataInfo): Added `thread_size',
14166         `thread_tid_offset', `thread_stack_ptr_offset' and
14167         `thread_end_stack_offset'.
14168
14169 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
14170
14171         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
14172         aot-runtime.c.
14173
14174         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
14175         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
14176
14177         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
14178
14179         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
14180
14181         * aot.c: Add support for ADJUSTED_IID.  
14182
14183 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
14184
14185         * aot.c (emit_method_order): Don't align method_order_end.
14186
14187         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
14188         the interface ID changes.
14189
14190 2006-04-21  Dick Porter  <dick@ximian.com>
14191
14192         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
14193         cleaning up a thread.  Fixes the new part of bug 77470.
14194
14195 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
14196
14197         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
14198         to managed wrapper.
14199                      
14200 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
14201
14202         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
14203         
14204         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
14205         SIGSEGV. Fixes #78072.
14206
14207         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
14208         unregister our SIGABRT handler.
14209
14210 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
14211
14212         * mini.c: Disabled inline where it can alter the call stack in a
14213         way visible from managed code.
14214         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
14215         default.
14216
14217 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
14218
14219         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
14220         on other platforms. Fixes #78089.
14221
14222 2006-04-13  Martin Baulig  <martin@ximian.com>
14223
14224         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
14225         determine whether we're inside the debugger.
14226
14227         * debug-debugger.h
14228         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
14229
14230 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
14231
14232         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
14233         handler clauses. Fixes #78024.
14234
14235         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
14236         in the CALL_MEMBASE opcodes. Fixes #78088.
14237         (mono_arch_get_vcall_slot_addr): Ditto.
14238
14239 2006-04-10  Martin Baulig  <martin@ximian.com>
14240
14241         * debug-debugger.c: The thread handling code has now been moved
14242         into ../metadata/threads.c.
14243
14244 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
14245
14246         * driver.c (mono_main): Fix --with-gc=none build.
14247
14248         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
14249         (mono_spillvar_offset_float): Ditto.
14250         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
14251         hreg, not when its !global, since on ia64, there is a third category: stacked
14252         registers.      
14253
14254 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
14255
14256         * mini.c: set MonoInst->klass for load field address and a few other
14257         places.
14258
14259 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
14260
14261         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
14262
14263 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
14264
14265         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
14266         the branch opt changes.
14267
14268 2006-04-06  Dick Porter  <dick@ximian.com>
14269
14270         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
14271         
14272         * wapihandles.c (mini_wapi_seminfo): 
14273         * driver.c (mono_main): Add semaphore info option
14274
14275 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
14276
14277         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
14278         branch optimization changes. Fixes #78009.
14279
14280 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
14281
14282         * mini.c: ignore accessibility of methods in managed->native wrappers.
14283
14284 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
14285
14286         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
14287         
14288         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
14289
14290 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
14291
14292         * mini.c: Modify the branch optimizations to preserve the invariant that
14293         the entries inside the in_bb and out_bb arrays are unique.
14294         (mono_unlink_bblock): Avoid creation of new arrays.
14295
14296 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
14297
14298         * mini.c (mono_unlink_bblock): Fix regression caused by previous
14299         change (#77992).
14300
14301 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
14302
14303         * mini.c (optimize_branches): Remove the "optimizations" in
14304         the cbranch1/cbranch2 -> branch cases which were causing several
14305         problems in the past. Fixes #77986.
14306
14307 2006-03-31  Chris Toshok  <toshok@ximian.com>
14308
14309         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
14310         default optimizations :(
14311
14312 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
14313
14314         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
14315         branch.
14316
14317 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
14318
14319         * local-propagation.c: Added comments to structs and removed
14320         "Mono" prefixes from local tree mover types.
14321
14322 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
14323
14324         * Makefile.am (arch_sources): Define this for each architecture so 
14325         libmono_la_SOURCES is defined in one place.
14326
14327 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
14328
14329         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
14330         from handles/.
14331
14332 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
14333
14334         * driver.c: print the GC name supplied by configure.
14335
14336 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
14337
14338         * local-propagation.c: Added tree mover, and moved here all the
14339         local propagation code from mini.c
14340         * mini.c: Added support for treeprop, and moved all the local
14341         propagation code to local-propagation.c
14342         * mini.h: Added support for treeprop
14343         * driver.c: Added support for treeprop, enabled consprop, copyprop,
14344         treeprop, inline and deadce by default
14345         * Makefile.am: Added local-propagation.c
14346
14347 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
14348
14349         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
14350
14351 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
14352
14353         * debug-debugger.c: make it compile without the Boehm GC.
14354
14355 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
14356
14357         * mini.c: fixed issue with mismatch when an icall is registered
14358         with multiple names but same address.
14359
14360 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
14361
14362         * declsec.c, mini-exceptions.c: use write barrier to set reference
14363         fields of managed objects.
14364
14365 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
14366
14367         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
14368         (can_access_internals): Fix a warning.
14369
14370         * mini.c (print_method_from_ip): Rename this to 
14371         mono_print_method_from_ip so it gets exported.
14372
14373         * trace.c: Deal with strings inside StringBuilder's containing garbage
14374         and fix memory leaks. Fixes #77848.
14375
14376 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
14377
14378         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
14379         fixes #77787.
14380
14381 2006-03-16 Neale Ferguson <neale@sinenomine.net>
14382         
14383         * mini-s390.c: Remove OP_X86_TEST_NULL.
14384
14385 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
14386
14387         * mini.c: use the correct GetHashCode() for the moving collector.
14388
14389 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
14390
14391         * liveness.c: Regalloc spill cost tuning.
14392
14393 2006-03-15 Neale Ferguson <neale@sinenomine.net>
14394         
14395         * mini-s390x.h: Correct S390_LONG macro.
14396
14397         * mini-s390x.c: Cleanup unused code.
14398
14399 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
14400
14401         * jit-icalls.h: New file.
14402
14403         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
14404         icalls and include that instead of including jit-icalls.c.
14405
14406         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
14407         OP_X86 opcodes.
14408
14409 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
14410
14411         * mini.c: when checking for member accessibility, also check for
14412         friend assemblies and for explicit interface implementations.
14413
14414 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
14415
14416         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
14417
14418         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
14419
14420         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
14421         common cases are done first.    
14422
14423         * mini-ops.h: Only define platform specific opcodes on the given platform.
14424
14425         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
14426         branch.
14427         
14428 2006-03-14  Martin Baulig  <martin@ximian.com>
14429
14430         Revert Paolo's change from r57348:
14431
14432         * mini.h: don't use gboolean for bitfields.
14433         * mini.c: verifier changes for fields and methods accessibility.
14434
14435 2006-03-13  Neale Ferguson <neale@sinenomine.net>
14436
14437         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
14438
14439         * mini-s390x.c: Fix conv_r_un.
14440
14441         * cpu-s390, cpu-s390x.md: Fix lengths.
14442
14443 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
14444
14445         * mini.c: nested types have access to all the nesting
14446         levels, not just the enclosing types.
14447
14448 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
14449
14450         * mini.c: added a few more verification checks.
14451
14452 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
14453
14454         * liveness.c: Merge optimizations from the linear-il branch.
14455
14456 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
14457
14458         * mini-ia64.c (emit_call): Add a comment.
14459
14460         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
14461
14462         * tramp-ia64.c: Fix some warnings.
14463
14464 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
14465
14466         * mini.h: don't use gboolean for bitfields.
14467         * mini.c: verifier changes for fields and methods accessibility.
14468
14469 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
14470
14471         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
14472         lazy icall wrapper changes.
14473
14474         * dominators.c: Replace all the dominator algorithms with faster
14475         ones from the linear-il branch.
14476
14477         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
14478         the mempool.
14479
14480         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
14481         common cases are done first.
14482
14483         * mini-amd64.c: Fix some warnings.
14484
14485         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
14486         from the mempool.
14487
14488         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
14489         added code.
14490
14491         * mini.h: Add a missing prototype.
14492
14493 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
14494
14495         * mini.c: Compile icall wrappers lazily.
14496
14497         * mini-codegen.c: Use printf instead of g_print since its much faster.
14498
14499         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
14500         function.
14501
14502         * mini.c (optimize_branches): Cache the negative result from 
14503         remove_block_if_useless ().
14504
14505         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
14506         Also fix some bblock linking issues.
14507
14508         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
14509         assembly files.
14510
14511         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
14512
14513         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
14514         accessed fields first, for better cache behavior.
14515         
14516 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
14517
14518         * mini.c: speedup IList<T> array accesses.
14519
14520 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
14521
14522         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
14523         inline_costs counter. Fixes #77190.
14524
14525 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
14526
14527         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
14528         trace messages. Fixes #77706.
14529
14530 2006-03-04  Martin Baulig  <martin@ximian.com>
14531
14532         * tramp-amd64.c, tramp-x86.c
14533         (mono_debugger_create_notification_function): Use
14534         mono_global_codeman_reserve() to allocate a buffer at runtime and
14535         return it.
14536
14537         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
14538
14539         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
14540         notification function at runtime and then call `initialize' in the
14541         `MONO_DEBUGGER__debugger_info' vtable.
14542
14543 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
14544
14545         * iltests.il: Fix a visibility problem.
14546
14547 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
14548
14549         * driver.c, mini.c: add hooks for the counters API.
14550
14551 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
14552
14553         * driver.c: show disabled options.
14554
14555 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
14556
14557         * linear-scan.c: always use cost-driven selection.
14558
14559 2006-02-28  Raja R Harinath  <rharinath@novell.com>
14560
14561         * jit-icalls.c (helper_compile_generic_method): Revert change from
14562         2006-02-24.
14563
14564 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
14565
14566         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
14567
14568 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
14569
14570         * inssel.brg: style fixes, mostly to force the updated monoburg
14571         to run for people using svn.
14572
14573 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
14574
14575         * mini.c: match monoburg changes.
14576
14577 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
14578
14579         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
14580         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
14581         declaration in the header file.
14582
14583 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
14584
14585         * helpers.c: reduce relocations and mem usage.
14586
14587 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
14588
14589         * mini.h, mini-codegen.c: disable logging features if
14590         requested by configure.
14591
14592 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
14593
14594         * mini.c: tiny verifier changes.
14595
14596 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
14597
14598         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
14599         cpu-pentium.md: stack alignment changes for osx/x86,
14600         partially from Geoff Norton <gnorton@customerdna.com>.
14601
14602 2006-02-24  Raja R Harinath  <harinath@gmail.com>
14603
14604         * jit-icalls.c (helper_compile_generic_method): Update to changes
14605         in metadata/class.c.
14606
14607 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
14608         
14609         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
14610         
14611         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
14612         interface calls with large offsets.
14613
14614 2006-02-23  Raja R Harinath  <rharinath@novell.com>
14615
14616         * jit-icalls.c (helper_compile_generic_method): Document the
14617         special-case we depend on so that we can inflate the method twice
14618         with the same context with no bad side-effects.
14619
14620 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
14621
14622         * mini-x86.c, mini-amd64.c: fix for case when xen support
14623         is disabled.
14624
14625 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
14626
14627         * mini-x86.c, mini-amd64.c: generate code to access tls items
14628         in a faster way for Xen systems.
14629
14630 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
14631
14632         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
14633         updates and compilation fixes for the OSX/x86 port, mostly from
14634         Geoff Norton <gnorton@customerdna.com>.
14635
14636 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
14637
14638         * inssel.brg: faster interface call implementation
14639         to sync with the interface_offsets MonoVTable changes.
14640
14641 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
14642
14643         * mini.c: more verification checks.
14644
14645 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
14646
14647         * mini.c: added a few more verification checks.
14648
14649 2006-02-17      Neale Ferguson <neale@sinenomine.net>
14650
14651         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
14652         facility on the processor and use it if available.
14653
14654 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
14655
14656         * driver.c, aot.c, mini.c: throw exception if the IL code is
14657         invalid or unverifiable.
14658
14659 2006-02-17  Raja R Harinath  <rharinath@novell.com>
14660
14661         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
14662         m.StructField.
14663
14664 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
14665
14666         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
14667
14668 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
14669
14670         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
14671         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
14672         handling of instantiated generic valuetypes.
14673
14674 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
14675
14676         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
14677         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
14678         instead.
14679
14680         * generics.2.cs: Revert the nullable reftypes tests.
14681
14682 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
14683
14684         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
14685         using __builtin_frame_address (1) as it doesn't work in the presence
14686         of optimizations. Hopefully fixes #77273.
14687
14688         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
14689         -> generics.cs change as it doesn't work with some automake versions.
14690
14691 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
14692
14693         * mini.c: handle systems that sue a different way to
14694         retrieve the stack address of the current thread.
14695
14696 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
14697
14698         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
14699         it specially in the makefile.
14700
14701         * generics.2.cs: Add tests for nullable reference types.
14702
14703 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
14704
14705         * mini.c: always handle the case when mono_jit_init()
14706         is called in a thread different from the main thread,
14707         confusing libgc (bug #77309).
14708
14709 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
14710
14711         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
14712
14713 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
14714
14715         * mini.c: change optimize_branches () to use a single loop
14716         and introduce a new optimization to simplify some range checks.
14717
14718 2006-02-03  Martin Baulig  <martin@ximian.com>
14719
14720         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
14721         and merged with debugger_thread_manager_add_thread().
14722         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
14723         inform the debugger about the main thread.
14724
14725 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
14726
14727         * basic.cs: Add test for div.un/rem.un constant folding.
14728
14729 2006-02-03  Neale Ferguson <neale@sinenomine.net>
14730
14731         * cpu-s390x.md: correct int_xor_imm length
14732
14733 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
14734
14735         * generics.2.cs: New test for #77442.
14736
14737         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
14738         #77442.
14739
14740 2006-02-02  Martin Baulig  <martin@ximian.com>
14741
14742         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
14743         <mono/metadata/mono-debug-debugger.h>   
14744
14745         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
14746
14747 2006-02-02  Martin Baulig  <martin@ximian.com>
14748
14749         * debug-debugger.h: New header file for debug-debugger.c.
14750
14751         * debug-debugger.c: Big API cleanup; don't run the managed Main()
14752         function is a separate thread anymore; add support for attaching.
14753
14754 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
14755
14756         * tramp-x86.c: Fix a warning.
14757
14758 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
14759
14760         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
14761         on very large methods.
14762
14763         * aot.c (load_patch_info): Fix a warning.
14764
14765 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
14766
14767         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
14768         mini-ops.h: alu membase optimizations.
14769
14770 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
14771
14772         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
14773         to speedup StringBuilder.
14774
14775 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
14776
14777         * dominators.c (mono_compute_natural_loops): Fix detection of
14778         loop body start blocks.
14779
14780         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
14781
14782 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
14783
14784         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
14785         #75145.
14786
14787 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
14788
14789         * aliasing.c: Fixed aliasing issue on 64 bit archs.
14790
14791 2006-01-25  Martin Baulig  <martin@ximian.com>
14792
14793         * debug-debugger.c: Moved the `MonoDebuggerManager' and
14794         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
14795         started to cleanup this file a little bit.
14796
14797 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
14798
14799         * mini.c: optimize a codepath frequently happening in generics code.
14800
14801 2006-01-23  Martin Baulig  <martin@ximian.com>
14802
14803         * Makefile.am: Only compile debug-debugger.c on supported platforms.
14804
14805         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
14806         functions directly.
14807
14808         * driver.c: debug-debugger.c is only available if
14809         `MONO_DEBUGGER_SUPPORTED' is defined.   
14810
14811 2006-01-23  Martin Baulig  <martin@ximian.com>
14812
14813         * debug-debugger.c: Only enable this on platforms where the Mono
14814         Debugger is working (x86 and x86_64).
14815
14816 2006-01-21  Martin Baulig  <martin@ximian.com>
14817
14818         The Mono Debugger is now using the normal `mono' instead of the
14819         `mono-debugger-mini-wrapper' when executing managed code.
14820
14821         * debug-debugger.c: New file; previously known as
14822         debugger/wrapper/wrapper.c.
14823
14824         * debug-mini.c (mono_init_debugger): Removed.
14825
14826         * driver.c (mono_main): Added new `--inside-mdb' command line
14827         argument which is used when running inside the debugger.
14828
14829 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
14830
14831         * liveness.c (mono_analyze_liveness): Remove some unused data
14832         structures.
14833
14834 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
14835
14836         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
14837
14838 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
14839
14840         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
14841         depends on implementation details of monobitset.
14842
14843         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
14844         Fixes #77271.
14845
14846 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
14847
14848         * liveness.c: Update after monobitset changes.
14849
14850 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
14851
14852         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
14853
14854 2006-01-11 Neale Ferguson <neale@sinenomine.net>
14855
14856         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
14857
14858         * mini-s390x.c: Remove warning messages.
14859
14860 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
14861
14862         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
14863
14864 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
14865
14866         * generics.2.cs: Add ldelem/stelem_any test.
14867
14868 2006-01-10 Neale Ferguson <neale@sinenomine.net>
14869
14870         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
14871
14872 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
14873
14874         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
14875         
14876 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
14877
14878         * generics.2.cs: Reenable vtype tests.
14879
14880         * inssel-x86.brg: Remove an icorrect valuetype rule.
14881
14882 2006-01-06 Neale Ferguson <neale@sinenomine.net>
14883
14884         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
14885         initial support for OP_ABS.
14886
14887 2006-01-05 Neale Ferguson <neale@sinenomine.net>
14888
14889         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
14890
14891 2006-01-05 Neale Ferguson <neale@sinenomine.net>
14892
14893         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
14894         conversion and implement LADD/LSUB.
14895
14896         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
14897         architectures.
14898
14899 2006-01-05 Neale Ferguson <neale@sinenomine.net>
14900
14901         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
14902
14903         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
14904         architectures.
14905
14906 2006-01-05 Neale Ferguson <neale@sinenomine.net>
14907
14908         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
14909         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
14910         (stack walk problem).
14911
14912 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
14913
14914         * aot.c (mono_aot_load_method): Fix a warning.
14915
14916 2006-01-03  Neale Ferguson <neale@sinenomine.net>
14917
14918         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
14919
14920 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
14921
14922         * iltests.il: Add test for #77148.
14923
14924         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
14925         #77148.
14926
14927 2006-01-03  Neale Ferguson <neale@sinenomine.net>
14928
14929         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
14930
14931 2006-01-03  Neale Ferguson <neale@sinenomine.net>
14932
14933         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
14934         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
14935
14936         * basic-long.cs: Add lconv-to-r4/r8 tests.
14937
14938 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
14939
14940         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
14941
14942         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
14943         here as on other archs.
14944
14945 2005-12-29 Neale Ferguson <neale@sinenomine.net>
14946
14947         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
14948
14949 2005-12-29 Neale Ferguson <neale@sinenomine.net>
14950
14951         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
14952         
14953         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
14954
14955         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
14956         instrument_prolog; Add memory_barrier instruction.
14957
14958 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
14959
14960         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
14961
14962 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
14963
14964         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
14965
14966         * aliasing.c inssel.brg: Fix warnings.
14967
14968         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
14969         could skip initialization of some parts of memory.
14970
14971         * mini.c mini-ia64.c: Fix warnings.
14972
14973         * inssel-sparc.brg: Add an implementation of lneg which actually works.
14974
14975 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
14976
14977         * aliasing.c (mono_build_aliasing_information): Add a workaround for
14978         a crash seen on sparc.
14979
14980         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
14981         
14982         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
14983
14984 2005-12-21 Neale Ferguson <neale@sinenomine.net>
14985
14986         * mini-ops.h: Add s390_backchain instruction
14987
14988         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
14989
14990         * cpu-s390.md: Add s390_backchain instruction
14991
14992         * mini-s390.c: Significant ABI changes
14993
14994         * mini-s390.h: Cater for zero length structures
14995
14996 2005-12-20 Neale Ferguson <neale@sinenomine.net>
14997
14998         * mini-s390.c: ABI fixes
14999
15000         * inssel-s390.brg: Remove debug statements
15001
15002         * cpu-s390.md: Fix length of ATOMIC_xx operations
15003
15004 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
15005
15006         * basic-float.cs: Add float<->long conversion tests.
15007
15008 2005-12-16 Neale Ferguson <neale@sinenomine.net>
15009
15010         * mini-s390.c: Fix LOCALLOC processing.
15011
15012         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
15013
15014 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
15015
15016         * iltests.il: Add tests for some opcodes not covered by the other
15017         tests.
15018
15019 2005-12-15 Neale Ferguson <neale@sinenomine.net>
15020
15021         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
15022         register loading for Tail processing; Correct trace output.
15023
15024         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
15025
15026         * cpu-s390.md: Correct size of jmp instruction. 
15027
15028 2005-12-13 Neale Ferguson <neale@sinenomine.net>
15029
15030         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
15031
15032 2005-12-13 Neale Ferguson <neale@sinenomine.net>
15033
15034         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
15035           Bring s390 up to current level.
15036
15037 2005-12-12  Zltan Varga  <vargaz@gmail.com>
15038
15039         * generics.2.cs: Disable the newly added tests as they do not work yet.
15040         
15041         * generics.2.cs: Add valuetype tests.
15042
15043 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
15044
15045         * basic-long.cs: Add i4->u8 test.
15046
15047         * objects.cs: Add tests for JIT intrinsic.
15048
15049         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
15050         optimizations lost by a mistake.
15051
15052 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
15053
15054         * basic-long.cs: Remove a test moved to objects.cs.
15055
15056         * arrays.cs: Add more array tests.
15057
15058 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
15059
15060         * arrays.cs: Add new tests for multi-dimensional arrays.
15061
15062 2005-12-06  Raja R Harinath  <rharinath@novell.com>
15063
15064         * Makefile.am (test_sources2): Add generics.2.cs.
15065         (EXTRA_DIST): Add test_sources2.
15066
15067 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
15068
15069         Support for boxing and unboxing nullable types as well as the
15070         isinst operation on nullables, per the CLI ammendment.
15071
15072         * inssel.brg (CEE_ISINST): Special case for nullable
15073
15074         * mini.c (handle_unbox_nullable): new method
15075         (handle_box): Special case for nullable types
15076         (mono_method_to_ir): Call handle_unbox_nullable in correct
15077         places.
15078
15079         * generics.2.cs: New test suite
15080
15081         * Makefile.am: Support for regression tests with generics.
15082
15083 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
15084
15085         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
15086         allocated to registers. Fixes #76800.
15087
15088 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
15089
15090         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
15091
15092 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
15093
15094         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
15095         of platforms.
15096
15097 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
15098
15099         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
15100         objects.cs.
15101
15102         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
15103         
15104         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
15105 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
15106
15107         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
15108         single precision before storing to a single precision location.
15109
15110 2005-11-28  Raja R Harinath  <rharinath@novell.com>
15111
15112         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
15113
15114 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
15115
15116         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
15117         correct files.
15118
15119         * basic.cs: Remove test_0_byte_compares test which was moved to
15120         objects.cs a long time ago.
15121
15122 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
15123
15124         * aliasing.c: Fixed aliasing issue on 64 bit archs.
15125
15126 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
15127
15128         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
15129         handlers are called.
15130
15131         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
15132         throwing code.
15133
15134          * mini-ia64.c: Add support for the throw->branch exception 
15135         optimization.   
15136
15137         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
15138
15139 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
15140
15141         * mini.c: Enabled "fastpath" deadce :-)
15142         
15143 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
15144
15145         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
15146         alias analysis pass to support it.
15147         * mini.h: Likewise.
15148         * ssa.c: Likewise.
15149         * liveness.c: Likewise (liveness computation can use aliasing
15150         information to be more accurate).
15151         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
15152         moreover made so that "--compile-all" uses the given optimization
15153         flags and not the default ones.
15154         * aliasing.c: Alias analysis (new file).
15155         * aliasing.h: Likewise.
15156         * Makefile.am: added "aliasing.c" and "aliasing.h".
15157         
15158 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
15159
15160         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
15161         OP_L opcodes.
15162
15163 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
15164
15165         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
15166         fp >= end_of_stack exit condition, as it is not needed, and it might
15167         become true for fp eliminated frames.
15168
15169 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
15170
15171         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
15172         coded offsets.
15173
15174 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
15175
15176         * mini-arm.c: fixed alignment of doubles/longs to match
15177         the C ABI (bug #76635).
15178
15179 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
15180
15181         * aot.c: fix compilation with --enable-minimal=aot.
15182
15183 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
15184
15185         * mini-arm.c: fixed compatibility with the new
15186         floating point emulator package for compares.
15187
15188 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
15189
15190         * mini.c : reverted sig->pinvoke changes (r51396-51397).
15191
15192 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
15193
15194         * mini-exceptions.c (print_stack_frame): Output to stderr.
15195         (mono_handle_native_sigsegv): Ditto.
15196
15197 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
15198
15199         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
15200         OP_LCONV_TO_OVF_I implementation.
15201
15202         * mini-amd64.c: Add support for the throw->branch exception 
15203         optimization.
15204
15205         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
15206         when the catch clause catches a more general exception, i.e. Object.
15207
15208 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
15209
15210         * cpu-ia64.md: Remove unused opcodes.
15211
15212         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
15213         specific defines for architectures defining USE_SIGACTION.
15214
15215         * mini-ia64.c: Fix some warnings.
15216
15217         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
15218         version seemed to skip a frame.
15219
15220 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
15221
15222         * mini.c: Clean up the usage of sig->pinvoke flag. Now
15223         only calls which are made to native code use this flag.
15224
15225 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
15226
15227         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
15228         varargs methods as well.
15229         
15230         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
15231         which have save_lmf set. Reorganize methods prologs a bit.
15232
15233         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
15234         debugger to the proper place.
15235
15236 2005-10-29  Martin Baulig  <martin@ximian.com>
15237
15238         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
15239         when running inside the debugger until the debugger has support
15240         for it.
15241
15242 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
15243
15244         * mini.h: Fix a warning.
15245
15246 2005-10-24  Miguel de Icaza  <miguel@novell.com>
15247
15248         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
15249         we expose publicly, this returns the string.
15250
15251 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
15252
15253         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
15254         with fp elimination.
15255
15256 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
15257
15258         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
15259         native stacktrace using the glibc 'backtrace' function if available.
15260
15261 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
15262
15263         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
15264
15265         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
15266         handle SIGSEGVs received while in native code.
15267
15268         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
15269         code, call mono_handle_native_sigsegv which will abort the runtime
15270         after printing some diagnostics, instead of converting it into a
15271         confusing NullReferenceException.
15272
15273 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
15274
15275         * cpu-pentium.md: Remove unused opcodes.
15276
15277 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
15278
15279         * mini-amd64.h (MonoLMF): Add rsp field.
15280
15281         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
15282         the lmf too.
15283
15284 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
15285
15286         * mini-codegen.c (get_register_spilling): Fix some warnings.
15287
15288 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
15289
15290         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
15291         elimination during exception handling. Enable fp elimination by
15292         default.
15293
15294         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
15295         elimination.
15296
15297 2005-10-16  Martin Baulig  <martin@ximian.com>
15298
15299         * mini-exceptions.c
15300         (mono_debugger_run_finally): New public method for the debugger.
15301
15302 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
15303
15304         * debug-mini.c (mono_debug_init_method): Fix warning.
15305
15306         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
15307         the 'exname' parameter const to fix some warnings.
15308
15309 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
15310
15311         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
15312         introduced by the previous patch.
15313
15314 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
15315
15316         * basic-float.cs: Add test for precision of float arithmetic.
15317
15318         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
15319         when loading/storing single values from/to memory.
15320
15321         * mini.c (mono_jit_compile_method_with_opt): Create the function
15322         pointers in the correct domain.
15323
15324 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
15325
15326         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
15327         introduced by previous patch.
15328         
15329         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
15330         when out_filter_idx is NULL.
15331
15332         * mini-exceptions.c: Don't run filter clauses twice during exception
15333         handling. Fixes #75755.
15334
15335 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
15336
15337         * aot.c: Add support for ldflda wrappers.
15338
15339         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
15340         #75902.
15341
15342 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
15343
15344         * mini.c, mini.h: do not consider exception handlers blocks when
15345         setting up interface variables.
15346
15347 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
15348
15349         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
15350
15351 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
15352
15353         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
15354         causes a regression.
15355
15356         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
15357
15358 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
15359
15360         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
15361         of the OP_P definitions.
15362
15363         * TODO: Add a proposal for dealing with the CEE/OP mess.
15364
15365         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
15366         optimizations from the x86 port.
15367
15368         * cpu-amd64.md: Ditto.
15369
15370         * basic.cs basic-long.cs: Add tests.
15371
15372 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
15373
15374         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
15375         Patrik Torstensson's implementation of my exception-handling
15376         optimization idea, when the exception object is not used
15377         (bug #62150).
15378
15379 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
15380
15381         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
15382         of the mul_imm optimizations from the old jit.
15383
15384 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
15385
15386         * mini.c, liveness.c: patch by Patrik Torstensson and
15387         Zoltan Varga to improve performance in methods with
15388         exception clauses.
15389
15390 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
15391
15392         * driver.c: Remove 'Globalization' entry from --version.
15393
15394 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
15395
15396         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
15397         there is a profiler interested in JIT events.
15398
15399         * aot.c: Load profile files produced by the AOT profiling module, and
15400         reorder methods based on the profiling info. Add a 'method_order' table
15401         to the AOT file to make mono_aot_find_jit_info work with the reordered
15402         methods.
15403
15404         * mini.h: Bump AOT file version info.
15405
15406 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
15407
15408         * mini-arm.h: work around what looks like a gcc bug when optimizations
15409         are enabled.
15410
15411 2005-09-28  Raja R Harinath  <rharinath@novell.com>
15412
15413         * Makefile.am (AM_CFLAGS): Don't use += to append inside
15414         conditionals.  Use ...
15415         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
15416
15417 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
15418
15419         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
15420         to determine the amount of memory to copy when passing valuetypes.
15421
15422         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
15423         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
15424
15425 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
15426
15427         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
15428         information about aot.
15429
15430 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
15431
15432         * *.c: Replace the use of {Enter,Leave}CriticalSection with
15433         macros. This will allow a deadlock debugger to easily be plugged
15434         in.
15435
15436 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
15437
15438         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
15439
15440 2005-09-27  Raja R Harinath  <rharinath@novell.com>
15441
15442         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
15443         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
15444         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
15445         ($(arch_built)) [CROSS_COMPILING]: Error out.
15446
15447 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
15448
15449         * aot.c: Add support for the no_special_static flag for classes.
15450
15451 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
15452
15453         * Reapply reverted patches.
15454
15455         * *: Revert r50174 as well.
15456
15457         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
15458
15459 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
15460
15461         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
15462
15463 2005-09-23  Miguel de Icaza  <miguel@novell.com>
15464
15465         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
15466         part of the SIG_HANDLER_SIGNATURE.  
15467
15468 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
15469
15470         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
15471         statistics.
15472
15473         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
15474         introduced by previous patch.
15475
15476 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
15477
15478         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
15479         saved registers too.
15480
15481         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
15482         upon the information returned by get_call_info ().
15483         
15484         * mini-x86.c (add_float): Fix stack size calculation.
15485         (mono_arch_call_opcode): Rewrite this so it works based up the
15486         information returned by get_call_info ().
15487         (mono_arch_get_this_vret_args): Ditto.
15488
15489 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
15490
15491         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
15492         in cinfo to determine the registers which need to be used.
15493
15494 2005-09-20  Miguel de Icaza  <miguel@novell.com>
15495
15496         * driver.c (mono_main): Add --server and --desktop flags. 
15497
15498 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
15499
15500         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
15501         registers as global registers.
15502
15503         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
15504         longer needed with the new register allocator.
15505
15506         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
15507
15508         * cpu-ia64.md: Remove unused opcodes.
15509         
15510         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
15511         
15512 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
15513
15514         * cpu-amd64.md: Remove unused opcodes.
15515
15516         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
15517         needed with the new register allocator.
15518
15519         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
15520         reg-reg moves.
15521
15522 2005-09-16  Raja R Harinath  <rharinath@novell.com>
15523
15524         * Makefile.am (check-local): Don't invoke semdel-wrapper.
15525
15526 2005-09-16  Martin Baulig  <martin@ximian.com>
15527
15528         * exceptions-amd64.c
15529         (throw_exception): Don't call mono_debugger_throw_exception() if
15530         we're a rethrow - see the FIXME in the code.
15531
15532 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
15533
15534         * mini.c (mono_init_exceptions): This only works on some architectures.
15535         
15536 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
15537
15538         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
15539         on ia64.
15540
15541         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
15542
15543         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
15544         now in mini-exceptions.c.
15545
15546 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
15547
15548         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
15549         now in mini-exceptions.c.
15550
15551 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
15552
15553         * exceptions-x86.c: Applied patch from Patrik Torstensson 
15554         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
15555
15556         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
15557         code into mini-exceptions.c. Add some assertions to it.
15558
15559 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
15560
15561         * aot.c (emit_section_change): Applied patch from "The Software Team" 
15562         (<software@solmersa.com>). Fix as errors on windows.
15563
15564 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
15565
15566         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
15567         method info into the LMF.
15568
15569 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
15570         
15571         * mini-ia64.c: Add proper unwind info for method epilogs.
15572
15573         * exceptions-ia64.c: Add some code to help debugging.
15574         
15575         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
15576
15577         * mini-exceptions.c: Fix warning.
15578
15579 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
15580
15581         * mini.c: Really fix build.
15582
15583         * mini-x86.c mini-amd64.c: Fix build.
15584
15585 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
15586
15587         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
15588
15589         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
15590         some Interlocked methods as intrinsics.
15591
15592         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
15593         for Thread methods as well.
15594
15595         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
15596
15597         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
15598
15599         * mini-ia64.c mini-x86.c mini-amd64.c 
15600         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
15601         OP_MEMORY_BARRIER.
15602         
15603         * mini.c (mono_init_exceptions): Fix build breakage.
15604
15605 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
15606
15607         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
15608         of instructions. Use the new ia64_unw_op macros for emitting unwind
15609         info.
15610
15611         * mini.c (mono_init_exceptions): Initialize exception handling
15612         related trampolines at startup.
15613
15614 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
15615
15616         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
15617
15618 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
15619
15620         * mini.c: Handle type loading errors gracefully during compilation and
15621         throw the appropriate exception.
15622
15623 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
15624
15625         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
15626         for the mono binary.
15627
15628 2005-09-09  Martin Baulig  <martin@ximian.com>
15629
15630         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
15631         the release.
15632
15633 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
15634
15635         * mini-arm.h: use emulation for conv.r.un for the release.
15636
15637 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
15638
15639         * mini-arm.c, objects.cs: more fixes and tests for them.
15640
15641 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
15642
15643         * mini-arm.c: align structures to at least 4 bytes to be able
15644         to keep our current optimized memcpy.
15645
15646 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
15647
15648         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
15649
15650 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15651
15652         * mini.c: ignore SIGPIPE.
15653
15654 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
15655
15656         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
15657
15658         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
15659
15660 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
15661
15662         * mini.h: Add prototype for mono_allocate_stack_slots_full.
15663
15664 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
15665
15666         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
15667         exception handling support.
15668         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
15669         patch by Brian Koropoff <briank@marakicorp.com>).
15670
15671 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
15672
15673         * mini.c: revert another 'optimization' which breaks when
15674         items on the eval stack need to be saved at a basic block end
15675         (bug #75940).
15676
15677 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
15678
15679         * jit-icalls.c: for arrays, ensure we always provide
15680         lower bounds.
15681
15682 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
15683
15684         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
15685         
15686         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
15687
15688 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
15689
15690         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
15691         arguments in their original register.
15692
15693 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
15694
15695         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
15696         memset/memcpy.
15697
15698         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
15699         when ssapre is enabled.
15700
15701         * inssel-long.brg: Fix bug in previous patch.
15702
15703         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
15704         multiplication by a constant.
15705
15706 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
15707
15708         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
15709         icc.
15710
15711         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
15712         saving registers.
15713
15714 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
15715
15716         * inssel-arm.brg: apply changes tested by Brian Koropoff
15717         <briank@marakicorp.com>.
15718
15719 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
15720
15721         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
15722         
15723 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
15724
15725         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
15726         to the same register if dreg is just a base register.
15727         (print_ins): Improve printing of membase opcodes.
15728
15729         * inssel-x86.brg: Add optimized ldind(reg) rules.
15730
15731         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
15732
15733 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
15734
15735         * mini.c: when running under valgrind, set the stack bottom for
15736         the GC at the actual approximate stack for the app (fixes running
15737         mono with valgrind).
15738
15739 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
15740
15741         * mini.c: do no break at the first valuetype to init found
15742         (fixes bug #75791).
15743
15744 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
15745
15746         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
15747
15748 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
15749
15750         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
15751
15752 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
15753
15754         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
15755
15756 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
15757
15758         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
15759
15760         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
15761         code.
15762
15763         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
15764         code.
15765
15766         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
15767         methods.
15768
15769 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
15770
15771         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
15772
15773 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
15774
15775         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
15776         in the tail recursion optimization.
15777
15778         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
15779         debug info into the assembly file.
15780
15781         * iltests.il: Add test for filter regions.
15782
15783         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
15784         initial stack of filter regions. Fixes #75755.
15785
15786 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
15787
15788         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
15789         stack requirements.
15790
15791 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
15792
15793         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
15794         the check for an already compiled method on non-ia64 platforms.
15795         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
15796         proper domain.
15797
15798         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
15799
15800         * inssel-x86.brg: Add some optimized call rules.
15801
15802 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
15803
15804         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
15805         method here.
15806
15807         * mini.h mini-trampolines.c: Pass the trampoline argument to 
15808         mono_arch_patch_delegate_trampoline.
15809
15810         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
15811
15812         * mini-trampolines.c: Fix build.
15813
15814         * mini-amd64.h: Add delegate trampolines.
15815
15816         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
15817
15818         * inssel-amd64.brg: Add optimized call rules.
15819         
15820         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
15821
15822         * inssel-ia64.brg: Add optimized ldind(reg) rules.
15823
15824 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
15825
15826         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
15827         change.
15828
15829         * mini-ia64.c: Remove LMF fixmes.
15830
15831         * mini-ia64.h: Remove most fields from LMF.
15832
15833         * inssel-ia64.brg (stmt): Fix unaligned access errors.
15834
15835         * mini-trampolines.c: Add support for IA64 function descriptors.
15836
15837         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
15838         for IA64 function descriptors.
15839
15840 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
15841
15842         * tramp-arm.c: patch the vtable for virtual calls. Added
15843         support code to register/unregister the LMF.
15844         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
15845         more LMF work.
15846
15847 2005-08-19  Dick Porter  <dick@ximian.com>
15848
15849         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
15850         bit value if needed.
15851
15852 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
15853
15854         * mini.c (mini_get_method): Move handling of wrapper data here.
15855
15856         * mini.c (mono_method_to_ir): Add support for dynamic methods.
15857
15858         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
15859         virtual.
15860
15861         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
15862         bblock->code does not remain empty.
15863
15864 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
15865
15866         * arrays.cs: Add regression test for #75832.
15867
15868         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
15869         rules. Fixes #75832.
15870
15871         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
15872         instruction scheduling.
15873
15874 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
15875
15876         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
15877
15878 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
15879
15880         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
15881
15882         * mini-codegen.c: Fix VC build.
15883
15884         * cpu-pentium.md: Increase length of atomic_exhange_i4.
15885
15886 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15887
15888         * mini.h: fix signature for mono_register_opcode_emulation.
15889
15890 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
15891
15892         * mini.c: Get rid of most of the helper_sig_... constants using
15893         mono_create_icall_signature ().
15894
15895 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
15896
15897         * jit-icalls.c (helper_ldstr): New helper function.
15898
15899         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
15900
15901         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
15902         throw, load the string using a helper call instead of creating a string object.
15903
15904         * aot.c: Update after LDSTR changes.
15905
15906         * mini.h: Bump AOT file version.
15907         
15908         * aot.c: Save class size info into the AOT file. Print more statistics during
15909         compilation.
15910
15911         * mini.h: Bump AOT file version.
15912
15913         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
15914         ordering of disasm cases. Fixes #74957.
15915
15916 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
15917
15918         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
15919         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
15920         the generic code needed for the ARM port.
15921
15922 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
15923
15924         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
15925         inssel-arm.brg: more ARM features and fixes.
15926
15927 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
15928
15929         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
15930         ARM port work in progress.
15931
15932 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
15933
15934         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
15935
15936         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
15937
15938         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
15939
15940         * inssel.brg (mini_emit_memset): Add support for unaligned access.
15941
15942         * *-ia64.*: Ongoing IA64 work.
15943         
15944         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
15945
15946 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
15947
15948         * TODO: Remove out-of-data todo stuff.
15949
15950         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
15951         dead code.
15952
15953         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
15954
15955         * mini.h: Bump corlib version.
15956
15957 2005-07-27  Martin Baulig  <martin@ximian.com>
15958
15959         * mini-codegen.c
15960         (create_copy_ins): Added `const unsigned char *ip' argument; set
15961         `copy->cil_code' from it.
15962
15963 2005-07-27  Martin Baulig  <martin@ximian.com>
15964
15965         * mini-exceptions.c (mono_handle_exception): Don't call
15966         mono_debugger_handle_exception() for filters.
15967
15968 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
15969
15970         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
15971         as well.
15972
15973 2005-07-26  Martin Baulig  <martin@ximian.com>
15974
15975         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
15976
15977         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
15978         helper_compile_generic_method() if the method is actually virtual
15979         and non-final.
15980
15981 2005-07-26  Martin Baulig  <martin@ximian.com>
15982
15983         * mini.c
15984         (trampoline_code): Renamed to `mono_trampoline_code' and made it
15985         public; this is now accessed directly by the debugger.
15986         (mono_generic_trampoline_code): Removed.
15987
15988         * debug-mini.c
15989         (mono_debug_init_method): Also add interncalls and wrappers.
15990
15991 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
15992
15993         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
15994
15995 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
15996
15997         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
15998
15999 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
16000
16001         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
16002
16003 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
16004
16005         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
16006         getting TLS offsets on AMD64 too.
16007
16008 2005-07-20  Kornel Pal <kornelpal@hotmail.com>
16009
16010         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
16011
16012 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
16013
16014         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
16015         inssel-arm.brg, mini-arm.h: ARM port work in progress.
16016
16017 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
16018
16019         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
16020
16021         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
16022         to mini.c.
16023
16024         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
16025         mono_sparc_is_virtual_call ().
16026         
16027         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
16028
16029         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
16030         trampoline parameters.
16031
16032         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
16033         
16034         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
16035         to mono_arch_get_vcall_slot_addr.
16036
16037         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
16038         trampoline code.
16039
16040         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
16041
16042 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
16043
16044         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
16045
16046 2005-07-19  Martin Baulig  <martin@ximian.com>
16047
16048         * exceptions-amd64.c (throw_exception): Call
16049         mono_debugger_throw_exception() here like we're doing it on i386.
16050
16051 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
16052
16053         * mini-ia64.c: Add optimized TLS access support.
16054
16055 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
16056
16057         * mini-exceptions.c: Ongoing IA64 work.
16058
16059         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
16060
16061         * mini.c: Use the default optimization set when embedding. Fixes
16062         #75194.
16063
16064 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
16065
16066         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
16067         of trampolines to a separate file.
16068
16069         * mini-trampolines.c: New file.
16070
16071         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
16072         separate file.
16073         
16074         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
16075         amd64/ia64 code.
16076
16077         * mini-codegen.c: Fix cygwin build.
16078
16079 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
16080
16081         * mini.c: Add some minor changes needed by the IA64 port.
16082
16083         * *-ia64.*: Ongoing IA64 work.
16084
16085 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
16086
16087         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
16088         trampolines into arch-independent and arch-dependent parts.
16089
16090         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
16091
16092 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
16093
16094         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
16095
16096         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
16097         the xp-regalloc-branch for amd64.
16098
16099         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
16100         xp-regalloc-branch for x86.
16101
16102 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
16103
16104         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
16105
16106 2005-07-06  Martin Baulig  <martin@ximian.com>
16107
16108         * mini.c
16109         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
16110         (mono_jit_runtime_invoke): Likewise.
16111
16112 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
16113
16114         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
16115         on x86 too.
16116         
16117         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
16118         without loading their metadata. Reorganize the file format so exception handling+
16119         debug info is kept separate from normal method info. Create MonoJitInfo 
16120         structures for methods lazily.
16121
16122         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
16123         loading metadata.
16124         (x86_class_init_trampoline): Patch AOT class init trampolines too.
16125
16126         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
16127
16128         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
16129         in AOT code.
16130
16131         * mini.h: Bump AOT file version.
16132
16133 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
16134
16135         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
16136
16137 2005-07-01  Raja R Harinath  <rharinath@novell.com>
16138
16139         * Makefile.am (check-local): Call semdel-wrapper.
16140
16141 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
16142
16143         * mini-x86.c: Revert the last change as it seems to break the build..
16144
16145 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
16146
16147         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
16148         
16149         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
16150
16151 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
16152
16153         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
16154         outside of the macro, so strange stuff doesn't happen with gcc4
16155         (NEW_AOTCONST_TOKEN): Likewise.
16156
16157 2005-06-28  Martin Baulig  <martin@ximian.com>
16158
16159         * mini.c (mini_class_is_system_array): New static method; use this
16160         instead of `klass->parent == mono_defaults.array_class' everywhere
16161         since this also works for the new generic array class.
16162
16163 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
16164
16165         * inssel.brg: Remove warnings.
16166
16167 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
16168
16169         * mini-ia64.c: Ongoing IA64 work.
16170
16171         * basic-float.cs: Add float->i1 conversion test.
16172
16173         * iltests.il: Add conv.u4 test.
16174
16175 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
16176
16177         * inssel-long.brg: Fix bug caused by last change.
16178
16179 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
16180
16181         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
16182         BSDs.  Allows the x86 JIT to work on OSX86
16183
16184 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
16185
16186         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
16187         u4->i8 conversion.
16188
16189         * mini-ia64.c: Ongoing IA64 work.
16190
16191 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
16192
16193         * mini-ia64.c: Ongoing IA64 work.
16194
16195         * driver.c: Clean up jit_code_hash as well when using --regression.
16196
16197         * inssel-long.brg: Fix long->i4/u4 conversion rules.
16198
16199         * basic-long.cs: Add tests for long->u4 conversion.
16200
16201 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
16202
16203         * mini.c: Take mono_get_domainvar out of macros. This makes sure
16204         that we do not depend on undefined C behavior: the order stuff
16205         gets evaluated within an expression. Fixes mono when compiled on
16206         GCC 4.
16207
16208 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
16209
16210         * *-ia64.*: Ongoing IA64 work.
16211
16212         * aot.c: Lower memory usage while loading AOT methods.
16213
16214         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
16215
16216         * mini.h: Bump AOT file format version.
16217
16218 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
16219
16220         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
16221
16222 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
16223
16224         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
16225         not on callee assembly). Fixed some comments.
16226
16227 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
16228
16229         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
16230         it gets proper disassembly.
16231         (emit_method_info): Remove some dead code.
16232
16233         * mini.c (mini_method_compile): Allways allocate the GOT var in
16234         mono_method_to_ir for emulating opcodes.
16235
16236 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
16237
16238         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
16239         before freeing the code memory. Fixes #74990.
16240
16241         * objects.cs: Add regression test for #74992.
16242
16243         * liveness.c: Extend live ranges of arguments to the beginning of the
16244         method. Fixes #74992.
16245
16246         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
16247         so it points into the faulting instruction.
16248
16249 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
16250
16251         * jit-icalls.c (mono_imul_ovf): Add exception handling.
16252
16253         * *-ia64.*: Ongoing IA64 work.
16254
16255         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
16256
16257 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
16258
16259         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
16260
16261         * *-ia64.*: Ongoing IA64 work.
16262
16263 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
16264
16265         * basic-long.cs: Add tests for add/sub.ovf.
16266
16267         * basic.cs: Add tests for sub.ovf.
16268
16269         * *-ia64.*: Ongoing IA64 work.
16270
16271 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
16272
16273         * *-ia64.*: Ongoing IA64 work.
16274
16275         * basic.cs: Add conv.ovf.i4.un test.
16276
16277 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
16278
16279         * mini.c: (remove_block_if_useless) Fixed bug 75061.
16280         
16281 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16282
16283         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
16284
16285 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
16286
16287         * *-ia64.*: Ongoing IA64 work.
16288
16289 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16290
16291         * trace.[ch]:
16292         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
16293
16294 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
16295
16296         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
16297
16298 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
16299
16300         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
16301
16302         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
16303         of a call is callable by a near call.
16304
16305 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
16306
16307         * mini-ia64.c: Ongoing IA64 work.
16308
16309 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
16310
16311         * genmdesc.c: Make the generated array non-static.
16312
16313         * inssel-long.brg: Fix LSHR_IMM rule.
16314
16315         * *-ia64.*: Ongoing IA64 work.
16316
16317         * *-ia64.*: Ongoing IA64 work.
16318
16319 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
16320
16321         * *-ia64.*: Ongoing IA64 work.
16322
16323         * *-ia64.*: Ongoing IA64 work.
16324         
16325         * mini-ia64.c: Ongoing IA64 work.
16326
16327         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
16328
16329 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
16330
16331         * objects.cs basic-calls.cs: Move some tests to objects.cs.
16332         
16333         * objects.cs basic-long.cs: Move some tests to objects.cs.
16334
16335 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
16336
16337         * *-ia64.*: Ongoing IA64 work.
16338
16339         * iltests.il: Add a new test.
16340
16341         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
16342         newobj. Fixes #75042.
16343
16344 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
16345
16346         * *-ia64.*: Ongoing IA64 work.
16347         
16348         * *-ia64.*: Ongoing IA64 work.
16349         
16350         * *-ia64.*: Ongoing IA64 work.
16351
16352         * basic.cs objects.cs: Move tests accessing static variables as well.
16353
16354         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
16355
16356 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
16357
16358         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
16359
16360         * driver.c: Always print failed tests.
16361
16362         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
16363         frame pointer.
16364
16365         * *ia64*: Ongoing IA64 work.
16366
16367 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
16368
16369         * basic.cs: Add tests for add.ovf. Fix warnings.
16370
16371 2005-05-18  Miguel de Icaza  <miguel@novell.com>
16372
16373         * driver.c (mono_main): Avoid crash if no argument is passed to
16374         --break;  Do not use g_error, but f_printf.   And fix all other
16375         ocurrences of the same crash.
16376
16377 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
16378
16379         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
16380         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
16381         Fixes #74742.
16382
16383 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
16384
16385         * *-ia64.*: Add beginnings of IA64 backend.
16386
16387         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
16388
16389 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
16390
16391         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
16392         Fixes #74925.
16393
16394         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
16395
16396         * mini-amd64.c: Fix a warning.
16397
16398 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
16399
16400         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
16401         in float_neg. Fixes #74897.
16402
16403         * mini-amd64.c (emit_call): Fix another near call bug.
16404
16405 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
16406
16407         * declsec.c: Keep the appdomain information in the structure. Added a 
16408         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
16409         value gets overwritten).
16410         * declsec.h: Set the default MonoArray for the the stack to 6. Added
16411         an MonoAppDomain member to MonoSecurityFrame.
16412         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
16413         used in the stack walk. Now use a MonoArray which grow (double) when
16414         it gets full.
16415
16416 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
16417
16418         * mini.c: Re-enabled runtime cleanup, since running threads should
16419         now properly stop when exiting.
16420
16421 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
16422
16423         * mini-codegen.c: New file contaning the arch-independent local
16424         register allocator. Not used by any architectures yet.
16425
16426         * mini.h linear-scan.c: Merge some changes from the 
16427         mini-xp-local-regalloc branch.
16428
16429 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
16430
16431         * mini-amd64.c (emit_call): Fix calls to native functions when the
16432         runtime is compiled as a shared library. Fixes #74756.
16433
16434         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
16435         on a literal field. Fixes #74751.
16436
16437 2005-04-25  Raja R Harinath  <rharinath@novell.com>
16438
16439         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
16440
16441 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
16442
16443         * objects.cs: Add missing null casting test.
16444
16445 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
16446
16447         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
16448         in wrapper methods. Also rename 'address' variable to 'offset'.
16449
16450 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
16451
16452         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
16453         warnings.
16454         
16455         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
16456
16457         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
16458         work on windows.
16459
16460 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
16461
16462         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
16463
16464 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
16465
16466         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
16467         just the last bytes.
16468
16469 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
16470
16471         * aot.c (mono_compile_assembly): Fix warning.
16472
16473         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
16474         by the _MSC_VER stuff.
16475
16476 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
16477
16478         * inssel-long.brg: Fix #74588.
16479
16480         * cpu-amd64.md: Fix #74591.
16481
16482         * iltests.il: Add new regression tests.
16483
16484 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
16485
16486         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
16487         valuetype.
16488
16489 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
16490
16491         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
16492
16493         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
16494         from Bill Middleton <flashdict@gmail.com>.
16495
16496 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
16497
16498         * arrays.cs: Add new regression test. Fix warnings.
16499
16500 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
16501
16502         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
16503         and leakage in CKFINITE.
16504
16505         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
16506         this to a null op since it is called on amd64 too.
16507
16508         * exceptions-amd64.c (get_throw_trampoline): Align stack.
16509
16510         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
16511         body since this is not used on amd64.
16512         
16513         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
16514
16515         * mini-amd64.c: Remove obsolete fixmes.
16516
16517         * mini.c (print_method_from_ip): Fix debugging support.
16518
16519 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
16520
16521         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
16522         so that expressions that don't give much gain are not reduced.
16523         * ssapre.h: Likewise.
16524
16525 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
16526
16527         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
16528
16529         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
16530
16531         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
16532
16533 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
16534
16535         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
16536
16537         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
16538
16539 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
16540
16541         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
16542         stack touching.
16543
16544         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
16545
16546         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
16547
16548         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
16549
16550         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
16551         MONO_ARCH_USE_SIGACTION. Fixes #74252.
16552
16553         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
16554
16555         * mini-x86.c: Fix up stack overflow handling.   
16556
16557         * exceptions.cs: Add new regression test.
16558
16559 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
16560
16561         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
16562         mono_jit_thread_attach.
16563
16564         * mini.c (mono_method_to_ir): Verify called method is not abstract.
16565
16566 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
16567
16568         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
16569         avoid calling constructors using callvirt.
16570
16571         * inssel.brg: Fix #74073.
16572
16573 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
16574
16575         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
16576         compilation with non-GCC compilers.
16577         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
16578         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
16579
16580 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
16581
16582         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
16583         klass->interface_offsets (will likely fix bug#74073).
16584
16585 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
16586
16587         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
16588
16589 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
16590
16591         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
16592         to amd64_div_reg_size ().
16593         
16594         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
16595
16596 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
16597
16598         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
16599
16600 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
16601
16602         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
16603
16604 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
16605
16606         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
16607         
16608         * mini.c (mono_precompile_assembly): Load and precompile referenced
16609         assemblies as well. Fixes #74015.
16610
16611 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
16612
16613         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
16614
16615 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
16616
16617         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
16618         a lot of checks and (anyway) permissions cannot work until corlib is 
16619         loaded.
16620
16621 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
16622
16623         * mini-ppc.c: fixed ABI issue on sysv/ppc.
16624
16625 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
16626
16627         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
16628         calls (fixes bug#72824).
16629
16630 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
16631
16632         * mini.c: fix tail recursion elimination (see test in bug#73936).
16633
16634 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
16635
16636         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
16637         some fp functions in sse2 mode.
16638
16639 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
16640
16641         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
16642
16643 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
16644
16645         * mini.h mini.c: Add mono_get_jit_tls_key ().
16646
16647         * mini-x86.c: Enable fast TLS support on windows.
16648
16649 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
16650
16651         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
16652         * mini.c: Check for p/invoke method when generating code. If a
16653         p/invoke method, or it's class, isn't decorated with [Suppress
16654         UnmanagedCodeSecurity] then generate code to call System.Security.
16655         UnmanagedDemand (only if the security manager is active).
16656
16657 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
16658
16659         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
16660         last change as it seems to cause strange crashes.
16661         
16662 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
16663
16664         * *.c: handle unsafe function pointers where needed.
16665
16666 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
16667
16668         * mini.c (mono_jit_free_method): Remove the fixme too.
16669
16670 2005-03-15  Miguel de Icaza  <miguel@novell.com>
16671
16672         * mini.c: As discussed, make the code actually free the delegate
16673         thunk now, to enable the debugging of delegate problems, use
16674         MONO_DEBUG=1 when running Mono. 
16675
16676         This takes also care of parts of the leaks as seen by Joe.
16677
16678 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
16679
16680         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
16681         thread_tls_offset calculation.
16682
16683 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
16684
16685         * declsec.c: Reworked linkdemand checks for icall. The previous code
16686         was using the declaration code (untrusted) and didn't work as expected
16687         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
16688         specific case.
16689
16690 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
16691
16692         * iltests.il: Add new localloc test.
16693
16694         * mini-amd64.c: Handle large stack allocations the same way as on
16695         windows if stack overflow handling is working.
16696         
16697         * mini-amd64.c: Allocate the signal stack using mmap.
16698
16699         * mini.c (sigsegv_signal_handler): Fix reading of context.
16700
16701         * mini-exceptions.c: Fix up stack overflow handling.
16702
16703         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
16704
16705         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
16706
16707         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
16708
16709         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
16710
16711         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
16712         tramp_init functions as they are no longer needed.
16713
16714 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
16715
16716         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
16717         
16718         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
16719
16720         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
16721         
16722         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
16723         support that now.
16724
16725         * mini-ops.h: Add OP_LMUL_IMM.
16726
16727         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
16728         long mul/div opcodes as intrinsic.
16729
16730         * mini-amd64.c (emit_call): Handle the case when the callee might be
16731         an AOT method.
16732
16733 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
16734
16735         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
16736         extra safe.
16737         
16738         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
16739
16740         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
16741
16742 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
16743
16744         * mini.c (mono_codegen): Don't leak here, to help people running
16745         monogrind.
16746
16747 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
16748
16749         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
16750         conversions in sse2 mode.
16751
16752         * basic-float.cs: Add regression test.
16753         
16754         * mini-amd64.c: Reenable sse2.
16755
16756 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
16757
16758         * mini-amd64.c: Disable sse2 until some regressions are fixed.
16759
16760 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
16761
16762         * driver.c: Copyright text should include 2005.
16763         
16764 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
16765
16766         * cpu-amd64.md (load_membase): Fix more max lengths.
16767
16768 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
16769
16770         * cpu-amd64.md (load_membase): Fix max length.
16771
16772         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
16773
16774         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
16775
16776         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
16777         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
16778
16779         * basic-float.cs: Add rounding regression test.
16780
16781         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
16782
16783 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
16784
16785         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
16786         structures in registers for pinvoke wrappers.
16787
16788 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
16789
16790         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
16791
16792 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
16793
16794         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
16795         wrapper to mono_jit_thread_attach.
16796
16797         * mini.c (mini_jit_thread_attach): New jit icall.
16798
16799         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
16800         native->managed wrappers.
16801
16802         * exceptions.cs: Add new regression test.
16803
16804         * mini.c (optimize_branches): Check regions in the cbranch to throw
16805         block case as well. Fixes #73242.
16806
16807 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
16808
16809         * mini.c: thread safety fixes.
16810
16811 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
16812
16813         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
16814         patching stuff, since delegates use jump trampolines so there is
16815         no caller.
16816
16817         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
16818         jump trampolines.
16819         
16820         * tramp-amd64.c: Fix build.
16821
16822         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
16823         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
16824
16825         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
16826         Rename this to mono_arch....
16827         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
16828
16829         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
16830
16831         * mini-amd64.c (emit_call): If both the caller and the callee is
16832         guaranteed to have 32 bit addresses, emit a normal call.
16833
16834         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
16835
16836         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
16837         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
16838         method_ptr inside delegates.
16839
16840 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
16841
16842         * mini.c (mono_jit_free_method): Free the method info even if the native code is
16843         invalidated. Fixes #73001.
16844
16845         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
16846
16847         * mini-x86.c: Only use stdcall for pinvokes on windows.
16848
16849 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
16850
16851         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
16852         * mini-x86.c: remove unreliable __thread var offset detection,
16853         use the correct accessors and enable by default.
16854
16855 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
16856
16857         * mini.c (mono_jit_free_method): Fix memory leak.
16858
16859 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
16860
16861         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
16862
16863 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
16864
16865         * cpu-amd64.md: Fix lengths of atomic opcodes.
16866
16867 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
16868
16869         * driver.c: try to not imply using ICU is any good.
16870
16871 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
16872
16873         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
16874         functions as inline ops.
16875
16876         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
16877         some Interlocked functions as inline ops.
16878
16879         * mini.c (move_basic_block_to_end): Fix bug in last patch.
16880
16881         * mini.h (MonoBasicBlock): Reorganize fields a bit.
16882
16883         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
16884
16885         * mini.c: Add support for OP_NOT_TAKEN.
16886
16887         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
16888         structures in registers for pinvoke wrappers.
16889
16890         * mini-amd64.c: Fix warnings.
16891
16892 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
16893
16894         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
16895
16896         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
16897
16898         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
16899         address instead of loading the address from it.
16900
16901         * mini-x86.c: Add support for returning small structs in registers
16902         on Win32. Fixes part of #70864.
16903         
16904 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
16905
16906         * trace.c (get_token): Improve error checking.
16907
16908 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
16909
16910         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
16911
16912 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
16913  
16914         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
16915         it can be reused for MonoClass.
16916         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
16917         _LINKDEMAND.
16918
16919 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
16920
16921         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
16922         instead of a MonoReflectionMethod. The method information wasn't used
16923         when displaying SecurityException details (but will be now).
16924
16925 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
16926
16927         * Makefile.am : windows build fix.
16928
16929 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
16930
16931         * iltests.il: Add new regression test.
16932
16933         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
16934         #72522.
16935
16936 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
16937  
16938         * mini.c: Moved linkdemand check into helper function check_linkdemand
16939         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
16940         LDFTN, LDVIRTFTN).
16941
16942 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
16943
16944         * declsec.c: Added statistics counter for different kinds of 
16945         LinkDemands.
16946         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
16947         (and commented) declaration.
16948         * mini.c: Added statistics counter for security Demand code 
16949         generation. Added display of security statistics.
16950
16951 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
16952
16953         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
16954         Fix compilation errors under gcc-2.95.
16955
16956 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
16957
16958         * mini.c, driver.c: Use the new jit trampoline hashtable
16959
16960 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
16961
16962         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
16963
16964 2005-02-11  Martin Baulig  <martin@ximian.com>
16965
16966         * debug-mini.c (mono_debug_close_method): Free the line number array.
16967
16968 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
16969
16970         * aot.c: Break up large methods into smaller ones. Share GOT slots for
16971         icalls.
16972
16973         * mini.h: Bump AOT file format version. 
16974
16975 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
16976
16977         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
16978         APTC and P/Invoke.
16979         * declsec.h: Added macros to get/set lazyly initialized security 
16980         informations about assemblies. Added new enum for different type of
16981         possible LinkDemand violation. Added function to check LinkDemands.
16982         * mini.h: Added a field to MonoCompile to hold any security violation
16983         detected when JITting a method (so it can be thrown later).
16984         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
16985         and CEE_CALLVIRT. Added code to throw exception at the end of
16986         mini_method_compile (note: the exception is unhandled right now).
16987
16988 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
16989
16990         * mini.c, jit-icalls.c: use the managed implementation of
16991         memset for initobj and memset, to avoid managed <-> unmanaged
16992         transitions.
16993
16994 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
16995
16996         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
16997         optimization if it would need a GOT var.
16998
16999         * basic.cs: Add tests for constant propagation and switch statements.
17000
17001         * ssa.c: Fix out-of-range constant propagation and switch statements.
17002
17003 2005-02-09    <vargaz@freemail.hu>
17004
17005         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
17006
17007 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
17008
17009         * cpu-amd64.md (load_membase): Fix max length of load_membase.
17010
17011 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
17012
17013         * mini.c: update to new signature of mono_class_get_allocation_ftn().
17014
17015 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
17016
17017         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
17018         arithmetic operations.
17019
17020 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
17021
17022         * mini-ppc.c: add a workaround for broken user code that
17023         DllImports vararg functions with non-vararg signatures.
17024
17025 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
17026
17027         * mini.c (mono_jit_compile_method_inner): Add detection and a 
17028         meaningfull error message for assemblies written in Managed C++.
17029
17030         * tramp-amd64.c mini-amd64.h: Add support for 
17031         create_trampoline_from_token ().
17032
17033         * aot.c mini-x86.c abcremoval.c: Applied patch from
17034         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
17035
17036 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
17037
17038         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
17039         which takes a MonoImage/token as parameter instead of a MonoMethod.
17040
17041         * aot.c: Use the new trampoline for initializing vtables.
17042
17043         * aot.c: Add support for ldfld/stfld_remote wrappers.
17044
17045         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
17046         rules for compare <MEM>, IMM.
17047
17048         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
17049
17050         * aot.c: Handle inherited finalizers correctly.
17051
17052 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
17053
17054         * inssel.brg (stmt): Add a missing _setup_... ().
17055
17056         * aot.c: Save some parts of the class state to the AOT file and use it
17057         to recompute that state when a class is initialized.
17058
17059         * mini.c: Install AOT hooks into the runtime.
17060
17061         * mini.h: Bump AOT file format version.
17062         
17063         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
17064         Fixes #72148.
17065
17066         * iltests.il: Add new test.
17067
17068 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
17069
17070         * mini.c: fix typo.
17071
17072 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
17073
17074         * mini.c: setup the statistical profiler in the thread attach
17075         callback to cope with the new single thread code.
17076
17077 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
17078
17079         * mini-ppc.c: ensure we have enough room for the profiler
17080         calls (fixed bug#72084).
17081
17082 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
17083
17084         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
17085         it.
17086
17087 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
17088
17089         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
17090
17091 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
17092
17093         * ssapre.c: Fixed an issue with down safety (this allows IronPython
17094         to succesfully execute parrotbench).
17095         * ssapre.h: Likewise.
17096
17097 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
17098
17099         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
17100         variable for stores to method arguments (fixes a SSAPRE issue).
17101
17102 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
17103
17104         * mini.c: handle value types in dup, fixes gen-112.cs.
17105
17106 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
17107
17108         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
17109         sequence for calls in dynamic methods to avoid thunks.
17110
17111 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
17112
17113         * mini.c: correctly remove dynamic methods from the hashtable.
17114
17115 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
17116
17117         * driver.c: Disabled SSAPRE until fix the bug that appears
17118         in IronPython's parrotbench.
17119
17120 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
17121
17122         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
17123
17124         * mini.c (mono_method_to_ir): Revert the previous change.
17125         
17126         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
17127         when AOT compiling.
17128
17129         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
17130         mono_jit_info_table_find () etc. when running under valgrind.
17131
17132         * inssel.brg: Fix warnings.
17133
17134         * mini-exceptions.c: Fix warnings.
17135
17136 2005-01-31  Martin Baulig  <martin@ximian.com>
17137
17138         * driver.c (compile_all_methods_thread_main): Don't try to compile
17139         generic methods or anything which has type parameters.
17140
17141 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
17142
17143         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
17144
17145         * TestDriver.cs: Add --verbose flags.
17146
17147         * graph.c ssa.c: Fix 64 bit warnings.
17148         
17149         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
17150         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
17151         Fix 64 bit warnings.
17152
17153         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
17154         variable not spotted by gcc.
17155         
17156         * mini-amd64.c inssel-amd64.brg: Applied patch from  
17157         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
17158         X86_COMPARE_MEMBASE opcodes.
17159
17160         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
17161
17162 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
17163
17164         * *: MonoMethod->signature might be NULL now. You *MUST* use
17165         mono_method_signature.
17166
17167 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
17168
17169         * driver.c (compile_all_methods_thread_main): Compile the methods
17170         without invoking cctors.
17171
17172 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
17173
17174         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
17175         * basic-calls.cs: test for the above.
17176
17177 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
17178
17179         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
17180         MonoJitInfo changes.
17181
17182 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
17183
17184         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
17185         eagerly if it contains dynamic methods.
17186         
17187         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
17188
17189         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
17190         trace, it is now computed by an icall from trace_ips.
17191         
17192         * mini-exceptions.c: Fix a warning.
17193
17194 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
17195
17196         * mini-exceptions.c: don't bother getting stack trace info if
17197         it's not going to be used.
17198
17199 2005-01-27  Raja R Harinath  <rharinath@novell.com>
17200
17201         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
17202         ssapre-mini-ops.h.
17203
17204 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
17205
17206         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
17207
17208         * aot.c: Avoid calling mono_method_get_header () if not needed.
17209
17210         * mini.h: Bump AOT file format version.
17211         
17212         * mini.c (mono_emit_native_call): Allocate a GOT var here.
17213
17214         * mini.c (mono_print_tree): Print more info for calls.
17215
17216 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
17217
17218         * declsec.h: Remove warning by adding missing include for marshal.h
17219
17220 2005-01-26  Martin Baulig  <martin@ximian.com>
17221
17222         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
17223         `ip' twice.
17224
17225 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
17226
17227         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
17228         flags.
17229
17230         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
17231
17232         * aot.c (mono_compile_assembly): Fix a warning.
17233
17234 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
17235
17236         * declsec.c: Look for security attributes on the original MonoMethod 
17237         (and not the wrapped one). This fix permissions on icalls.
17238
17239 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
17240
17241         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
17242
17243         * mini.c (mono_allocate_stack_slots): Add a fixme.
17244
17245         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
17246
17247 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
17248
17249         * inssel.brg: optimize casts of sealed types (more
17250         optimizations waiting for fixes in remoting).
17251
17252 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
17253
17254         * inssel.brg (stmt): Add another dummy rule.
17255
17256         * driver.c: Fix warnings.
17257
17258         * driver.c (mono_main): If running under valgrind, instruct glib to use
17259         the system allocation functions so valgrind can track the memory
17260         allocated by the g_... functions.
17261
17262         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
17263
17264         * mini-ops.h: Add OP_DUMMY_STORE opcode.
17265
17266         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
17267
17268         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
17269         variables in try regions.
17270
17271         * mini.c (mini_method_compile): Don't disable optimizations on large
17272         methods when AOT compiling.
17273
17274         * mini.c (mono_allocate_stack_slots): New arch independent method to 
17275         allocate stack slots. Not yet used.
17276
17277 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
17278
17279         * debug-mini.c (mono_debug_close_method): Plug some leaks.
17280
17281 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
17282
17283         * mini-ppc.c: make the branch info relative as the code
17284         buffer can be reallocated.
17285
17286 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
17287
17288         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
17289         * driver.c: Removed the AOT/security restriction. Now initialize the
17290         security manager (in metadata) if --security is used.
17291         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
17292         rather than the pointer to declarative security, when AOT is used.
17293
17294 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
17295
17296         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
17297         basic blocks, reduced intrinsic exception throwing code size.
17298
17299 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
17300
17301         * driver.c (mini_usage): Reorder the usage screen.
17302
17303 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
17304
17305         * mini.c (mono_resolve_patch_target): Fix warning.
17306
17307 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
17308
17309         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
17310         previous patch.
17311
17312         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
17313
17314         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
17315         breaks the amd64 build.
17316
17317         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
17318         register allocation. Fixes #71454.
17319
17320         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
17321
17322         * arrays.cs: Add new regression test.   
17323
17324 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
17325
17326         * ssapre.c: Turned usage of snprintf to GString.
17327         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
17328         (I left it on by mistake in my previous commit).
17329
17330 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
17331
17332         * mini.c, cfold.c, basic-calls.cs: preserve side effects
17333         on cond branch optimization (fixes bug# 71515).
17334
17335 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
17336
17337         * abcremoval.c: Fixed bug 71062.
17338         * abcremoval.h: Likewise.
17339
17340 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
17341
17342         * mini.c: Added a new functionality to optimize_branches, the removal
17343         of useless basic blocks, and fixed some problem in the removal of
17344         critical edges; some utility functions added for both purposes.
17345         * ssapre.c: Added complex expression support, and fixed bug 70637.
17346         * ssapre.h: Likewise.
17347         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
17348         enabled in SSAPRE.
17349         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
17350         * driver.c: Re-enabled SSAPRE.
17351
17352 2005-01-19  Martin Baulig  <martin@ximian.com>
17353
17354         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
17355         the result of mono_get_method_constrained().
17356
17357 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
17358
17359         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
17360         manager.
17361
17362 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
17363
17364         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
17365         be detected.  Fixes #59296.
17366
17367 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
17368
17369         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
17370         which can happen. Fixes #71361.
17371
17372 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
17373
17374         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
17375         manager.
17376
17377 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
17378
17379         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
17380         appdomain-unload.exe to fail.
17381         
17382         * mini.c: Fix some memory leaks.
17383
17384 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
17385
17386         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
17387         Fixed bug and sped up some codepaths.
17388
17389 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
17390
17391         * mini.c: Fix some memory leaks.
17392
17393         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
17394         conversion.
17395
17396         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
17397
17398         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
17399         #71320.
17400
17401         * iltests.il: Add regression test for #71320.
17402
17403 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
17404
17405         * mini.c (mono_codegen): Fix installation of profiler hooks.
17406
17407         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
17408
17409 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
17410
17411         * mini.h, mini.c, cfold.c: optimize access to enum
17412         readonly fields, too. Eval conditional branches if possible
17413         to perform unreachable code removal in more cases.
17414
17415 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
17416
17417         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
17418
17419         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
17420         code manager.
17421
17422         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
17423         WinXP DEP. Fixes #71244.
17424
17425 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
17426
17427         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
17428
17429 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
17430
17431         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
17432
17433 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
17434
17435         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
17436         changes.
17437
17438         * mini.h: Bump AOT version.
17439
17440         * mini.h (MonoCompile): Change exvar to a hash table.
17441
17442         * mini.c: Allocate a separate exvar for each handler block.
17443
17444         * mini.c: Get rid of the computation of filter_lengths, its not needed.
17445
17446         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
17447         ex var with the pending exception and only throw if the two are equal.
17448         Fixes #68552.
17449         
17450         * exceptions.cs: Add tests for rethrow and nested catch clauses.
17451
17452         * mini-x86.c: Fix warnings.
17453
17454         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
17455         used by all the ports now.
17456
17457         * aot.c: Add write-symbols and save-temps options.
17458
17459 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
17460
17461         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
17462
17463 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
17464
17465         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
17466         operations.
17467
17468         * tramp-s390.c: Check vtable slot belongs to the domain.
17469
17470         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
17471         as per other platforms.
17472
17473         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
17474
17475 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
17476
17477         * driver.c: we don't run the Main() code in a subthread anymore.
17478
17479 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
17480
17481         * mini.c: added experimental rtc support in the statistical
17482         profiler: if the user has the permission, more accurate statistics
17483         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
17484         The MONO_RTC value must be restricted to what the linux rtc allows:
17485         power of two from 64 to 8192 Hz.
17486
17487 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
17488
17489         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
17490
17491 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
17492
17493         * mini-ppc.c: better icache flush for smp.
17494
17495 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
17496
17497         * mini-amd64.c (emit_move_return_value): Fix memory leak.
17498
17499         * mini-x86.c (get_call_info): Add the get_call_info () code from the
17500         amd64 port, not yet used.
17501
17502 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
17503
17504         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
17505         a struct type.
17506
17507 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
17508
17509         * driver.c: Added --security option to activate the security manager.
17510         Right now this will allow code generation for declarative demands and
17511         is disabled when AOT is specified.
17512         * mini.c: Add code generation for declarative security demands.
17513         * mini.h: Add mono_use_security_manager as an extern gboolean.
17514
17515 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
17516
17517         * aot.c (mono_compile_assembly): Speed up compilation a bit by
17518         emitting more dense assembly code.
17519
17520         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
17521         exception throwing stuff.
17522
17523 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
17524
17525         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
17526         dead code.
17527
17528         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
17529         left in by mistake.
17530
17531         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
17532         fixed.
17533
17534         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
17535
17536         * tramp-*.c: Only patch vtable slots if the object is in the current
17537         domain. Fixes appdomain-unload.exe.
17538
17539         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
17540         
17541         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
17542         x86 branch.
17543
17544 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
17545
17546         * mini.c (reverse_branch_op): New helper function.
17547
17548         * mini.c (optimize_branches): Run the new optimization only on 
17549         platforms which support it. Also reverse all kinds of branches.
17550
17551         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
17552
17553         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
17554         a throw statement.
17555
17556         * mini.c (optimize_branches): Reverse not-equals branches if the false
17557         bblock is a throw. This happens a lot of time with argument checking in
17558         corlib.
17559
17560         * mini.c (mono_codegen): Add support for placing basic blocks after
17561         the function epilogue.
17562
17563         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
17564         function epilogue.
17565         
17566 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
17567
17568         * mini.c (setup_stat_profiler): Only set this up if the platform
17569         supports ITIMER_PROF.
17570
17571 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
17572
17573         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
17574         previous patch.
17575
17576         * inssel.brg: Fix a warning.
17577
17578 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
17579
17580         * mini.c: added support for statistical profiler 
17581         (run with: --profile=default:stat).
17582
17583 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
17584
17585         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
17586
17587         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
17588
17589         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
17590         related to global registers from the amd64 port.
17591
17592 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
17593
17594         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
17595
17596         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
17597         with global registers.
17598         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
17599
17600         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
17601
17602 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
17603
17604         * debug-mini.c (encode_value): Fix off-by-one.
17605
17606         * aot.c (encode_value): Likewise.
17607
17608         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
17609
17610 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
17611
17612         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
17613         AOT.
17614
17615         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
17616         
17617         * aot.c (emit_method_info): Increase size of temp buffer.
17618
17619         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
17620         the AOT case.
17621
17622 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
17623
17624         * aot.c (emit_method_info): Fix build.
17625         
17626         * aot.c: Further rework of the AOT file format to reduce the size of
17627         the method info data.
17628
17629         * mini.h: Bump AOT file format version.
17630
17631 2004-12-27  Martin Baulig  <martin@ximian.com>
17632
17633         * mini.c (mini_get_method): New static method; call
17634         mono_get_method_full() and mono_get_inflated_method().
17635         (mono_method_to_ir): Use mini_get_method() instead of
17636         mono_get_method_full(). 
17637
17638 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
17639
17640         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
17641
17642 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
17643
17644         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
17645
17646         * inssel-amd64.brg: Add some optimization rules.
17647
17648 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
17649
17650         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
17651         standard not GC'd stuff is fine.
17652
17653 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
17654
17655         * aot.c: Rework the AOT file format to get rid of most of the global
17656         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
17657
17658         * mini.h: Bump AOT file format version.
17659         
17660 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
17661
17662         * mini.h: Bump AOT file format version.
17663
17664         * aot.c (mono_aot_is_got_entry): New function to determine if an 
17665         address is inside a GOT.
17666
17667         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
17668
17669         * cpu-pentium.md: Increase the maximum size of some instructions which
17670         might involve a got access.
17671         
17672         * mini.c (get_method_from_ip): Another debug helper function.
17673
17674         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
17675         when got var accesses are created during the decompose phase.
17676
17677         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
17678
17679         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
17680         argument mini_compile_method and to MonoCompile, and use this to
17681         determine whenever a given method is compiled for AOT. This allows the
17682         other methods compiled during AOT compilation to be free of AOT stuff,
17683         so the backends does not need to add special support for them by
17684         creating a fake GOT etc.
17685
17686         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
17687         longer needed.
17688
17689 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
17690
17691         * mini.c (mono_method_to_ir): It turns out that some of the
17692         x-appdomain wrappers are lax with types, so just ignore this for
17693         all wrappers.
17694
17695         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
17696         at the vtable->klass. If it is non-shared code we can just use the
17697         vtable.
17698
17699 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
17700
17701         * mini-ppc.c: access MonoDomain from tls, too.
17702
17703 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
17704
17705         * declsec.c: Removed unused variable (and related warning ;-)
17706
17707 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
17708
17709         * iltests.il: New test for LDELEMA on an array of ref types.
17710
17711         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
17712         all ldelema's on reftypes.
17713         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
17714         it was the wrong place to put it.
17715
17716         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
17717         register to pop to make this cleaner, at the request of Paolo.
17718
17719 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
17720
17721         * mini-ops.h (OP_GETHASHCODE): New op.
17722
17723         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
17724
17725         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
17726         operation.
17727
17728         For a microbenchmark, this reduces the cost of Hashtable.get_Item
17729         by 25%.
17730         
17731         * mini-x86.c (mono_arch_output_basic_block): Rather than
17732
17733         add ebp, 4
17734
17735         Emit
17736
17737         pop edx
17738
17739         The first is 3 bytes while the second is 1. This saves 36 kb on
17740         mscorlib, quite a big saving. When bootstraping mcs, I was able to
17741         see a small boost because of icache locality.
17742
17743         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
17744
17745 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
17746
17747         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
17748         started code sharing with the generic code.
17749
17750 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
17751
17752         * mini-ppc.c, cpu-g4.md: added code for direct access to
17753         tls data slots.
17754
17755 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
17756
17757         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
17758          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
17759         to OP_TLS_GET.
17760
17761 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
17762
17763         * declsec.c|h: Added functions to cache the declarative stack modifiers
17764         in MonoJitInfo and to create a security frame from a MonoJitInfo 
17765         structure.
17766         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
17767         created. Register internal calls for System.Security.SecurityFrame::
17768         _GetSecurityFrame and _GetSecurityStack.
17769         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
17770         the definitions for the new stack walk/callback mechanism.
17771         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
17772         first security frame for LinkDemands and InheritanceDemands) and
17773         GetSecurityStack for Demands. Both use the new mono_walk_stack code
17774         from lupus.
17775         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
17776         walk initialization (lupus).
17777
17778 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
17779
17780         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
17781         idiom.
17782         (handle_loaded_temps): Do not create a temporary variable for
17783         things that we know are temps. They will never be modified.
17784         (mono_spill_call): Set MONO_INST_IS_TEMP
17785         (mono_emulate_opcode): ditto
17786         (emit_tree): ditto
17787         (mono_method_to_ir.CEE_DUP): ditto
17788
17789 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
17790
17791         * mini.c (type_to_eval_stack_type): Make this handle the void type
17792         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
17793         (emit_tree): use ip_in_bb to special case some common idioms
17794         Update all callers to pass in the IP.
17795         (mono_method_to_ir): Make CEE_CALL* do the above as well.
17796
17797         This gives us a nice 2% speedup in mcs bootstrap.
17798
17799         * mini-x86.c (peephole_pass): Peephole pass to make
17800         mov  [foo], eax
17801         push [foo]
17802
17803         into
17804
17805         mov [foo], eax
17806         push eax
17807
17808         * mini.c (ip_in_bb): new method.
17809         (mono_method_to_ir): use this method rather than doing the hash
17810         lookup ourselves.
17811
17812         * linear-scan.c (mono_linear_scan): When expiring actives, you
17813         don't need to keep around variables that expire on this
17814         instruction. This makes it so that:
17815              a = b + 1
17816         will turn into:
17817              store (ebx add (ebx, 1))
17818         which will become
17819              add ebx, 1
17820
17821 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
17822
17823         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
17824         combination to avoid doing two copies. Fix up problems with previous
17825         patch.
17826
17827         * mini.c: Fix 64 bit warnings.
17828
17829         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
17830
17831 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
17832
17833         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
17834         changes from the x86 code.
17835
17836         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
17837
17838 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
17839
17840         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
17841         throwing code to reduce its size, unify the AOT and non-aot code and 
17842         get rid of relocations in the AOT case.
17843
17844         * mini-x86.h mini.c exceptions-x86.c 
17845         (mono_arch_get_throw_corlib_exception): New arch specific function to 
17846         raise corlib exceptions which doesn't require relocations in the 
17847         caller.
17848
17849         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
17850
17851 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
17852
17853         * mini.c (mono_emit_method_call): Only allocate the got var when it is
17854         needed.
17855
17856         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
17857         in the AOT case.
17858
17859 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
17860
17861         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
17862         with add function when used from Inc/dec atomic 
17863         functions. Re-enabled optimization on x86.
17864         * mini-ops.h: renamed atomic_add functions to
17865         allow _add to match the Interlocked::Add and
17866         _add_next to match Interlocked::Inc/Dec.
17867
17868 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
17869
17870         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
17871         linking of BBs to the end BB, and enabled SSAPRE also with
17872         consprop and copyprop (which was prevented by that bug).
17873
17874 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
17875
17876         * mini-x86.c: disabling the Interlocked optimizing code. 
17877
17878 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
17879
17880         * aot.c (load_aot_module): Move reading of got_addr after the AOT
17881         file version check.
17882         
17883 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
17884
17885         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
17886         interlocked optimization due lack of support on x86, rewrote 
17887         exchange to take into account that base may be in eax.
17888         
17889         xsp works again; activated Interlocked optimizing code.
17890         
17891 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
17892
17893         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
17894
17895 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
17896
17897         * mini-ops.h: Add new opcodes.
17898
17899         * mini.h: Add new patch types. Add got_var to MonoCompile.
17900
17901         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
17902         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
17903         make it work with all kinds of patchable code.
17904
17905         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
17906         address of the GOT, and referencing entries in the GOT.
17907
17908         * mini.c: Add code to load the GOT address if needed by an opcode.
17909
17910         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
17911         independent AOT code on the x86 using an elf-style Global Offset Table.
17912
17913 2004-12-14  Raja R Harinath  <rharinath@novell.com>
17914
17915         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
17916
17917 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17918
17919         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
17920         when running xsp.
17921
17922 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
17923
17924         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
17925         of Interlocked:Increment/Decrement/Add as inline ops.
17926         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
17927
17928 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
17929
17930         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
17931         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
17932
17933 2004-12-12  Duncan Mak  <duncan@ximian.com>
17934
17935         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
17936         again. `patch_info->table_size' is no longer valid after Zoltan's
17937         commit #37636.
17938
17939 2004-12-12  Martin Baulig  <martin@ximian.com>
17940
17941         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
17942         if we are the "real" method, ie. not an inlined method inside it.
17943
17944 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
17945
17946         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
17947         before we look in the special fields table. This fixes
17948         ../tests/thread-static-init.cs.
17949
17950 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17951
17952         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
17953         for Array get_Rank and get_Length. Fixes bug #70465.
17954
17955 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
17956
17957         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
17958         separate structure to reduce the size of MonoJumpInfo.
17959
17960 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
17961
17962         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
17963
17964 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
17965
17966         * mini.c (mini_get_inst_for_method): Changed to allow ports
17967         to return a MonoInst instead of opcode 
17968         (renamed mini_get_opcode_for_method to better reflect the new functionality)
17969         
17970         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
17971         Allow ports to return a created MonoInst instead of op-code, will enable
17972         new optimizations.
17973         (renamed mini_get_opcode_for_method to better reflected the functionality)
17974
17975 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
17976
17977         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
17978
17979 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
17980
17981         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
17982         Fixes #69985.
17983
17984 2004-12-08  Martin Baulig  <martin@ximian.com>
17985
17986         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
17987         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
17988
17989 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
17990
17991         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
17992         correctly.
17993
17994         * exceptions.cs: Disable some tests which depend on properties of x86 fp
17995         arithmetic.
17996
17997 2004-12-08  Raja R Harinath  <rharinath@novell.com>
17998
17999         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
18000
18001 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
18002
18003         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
18004         bug introduced by the previous patch.
18005
18006 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
18007
18008         * mini-ppc.c, objectc.cs: handle large structs passed by value
18009         (fixes bug #69972).
18010
18011 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
18012
18013         * mini-ppc.c: OP_ARGLIST implementation from
18014         Geoff Norton  <gnorton@customerdna.com>.
18015
18016 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
18017
18018         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
18019         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
18020
18021 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
18022
18023         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
18024
18025 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18026
18027         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
18028         support.
18029
18030 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
18031
18032         * mini-sparc.c: Zero out localled-ed memory.
18033
18034         * iltests.il: Add tests for zeroing out localloc-ed memory.
18035
18036 2004-12-04  Martin Baulig  <martin@ximian.com>
18037
18038         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
18039         mono_method_get_signature_full().       
18040
18041 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
18042
18043         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
18044         and some utility functions (always for SSAPRE), integrated SSAPRE.
18045         * mini.h: Likewise.
18046         * driver.c: Added ssapre option.
18047         * ssa.c: Small fix on OP_ARG handling.
18048         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
18049         * Makefile.am: Likewise.
18050
18051 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
18052
18053         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
18054         now in the xp code.
18055
18056         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
18057         icall.
18058
18059 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18060
18061         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
18062         
18063         * cpu-s390.md : Increase instruction length of oparglist.
18064
18065         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
18066
18067 2004-11-30  Martin Baulig  <martin@ximian.com>
18068
18069         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
18070         virtual generic methods.  We call a special helper_compile_generic_method()
18071         icall to retrieve the method from the vtable, inflate and compile
18072         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
18073
18074         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
18075
18076 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
18077
18078         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
18079
18080 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
18081
18082         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
18083         Fixes #69929.
18084
18085 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
18086
18087         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
18088         platforms with PIC aot.
18089
18090 2004-11-28  Martin Baulig  <martin@ximian.com>
18091
18092         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
18093         Fixes gen-112.cs.
18094
18095 2004-11-28  Martin Baulig  <martin@ximian.com>
18096
18097         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
18098         the result of mono_type_get_underlying_type() to check whether
18099         we're byref.
18100
18101 2004-11-26  Martin Baulig  <martin@ximian.com>
18102
18103         * mini.c
18104         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
18105         in the g_assert().
18106
18107 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
18108
18109         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
18110         the same way as the other arguments so they won't get clobbered.
18111
18112         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
18113         calls through R11 since it is clobbered by the trampoline code.
18114
18115 2004-11-26  Raja R Harinath  <rharinath@novell.com>
18116
18117         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
18118         pick up in-tree mscorlib.dll.
18119
18120 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
18121
18122         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
18123
18124         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
18125         runtime data/code are now stored in a table similar to the GOT in ELF. 
18126         This allows the code itself to be position independent.
18127
18128         * aot.c: Fix loading of referenced assemblies after the lazy assembly
18129         loading changes.
18130
18131         * aot.c: Attach ELF type (object/function) directives to all global
18132         symbols.
18133
18134         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
18135
18136         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
18137
18138         * mini-amd64.h: Turn on PIC AOT code.
18139
18140         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
18141         returning the offset within an OP_AOTCONST instruction where the GOT
18142         offset needs to be added.
18143
18144         * mini.h: Bump AOT file format version.
18145
18146 2004-11-25  Martin Baulig  <martin@ximian.com>
18147
18148         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
18149         uninflated generic methods.
18150
18151 2004-11-25  Martin Baulig  <martin@ximian.com>
18152
18153         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
18154
18155 2004-11-24  Martin Baulig  <martin@ximian.com>
18156
18157         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
18158         original klass (this only applies for generic instances).
18159
18160 2004-11-24  Martin Baulig  <martin@ximian.com>
18161
18162         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
18163         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
18164         that array).
18165
18166 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
18167
18168         * mini.c (mono_method_to_ir): Disable inlining for methods containing
18169         localloc. Fixes #69678.
18170
18171         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
18172         
18173 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
18174
18175         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
18176         used SSE registers on pinvoke calls. Fixes #69774.
18177
18178 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
18179
18180         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
18181         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
18182
18183 2004-11-23  Raja R Harinath  <rharinath@novell.com>
18184
18185         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
18186         Refer directly to the mcs/ tree.
18187
18188 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18189
18190         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
18191         Check if a trampoline for a synchronized method is required. 
18192
18193 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
18194
18195         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
18196         with localloc if needed. Throe arithmetric exception in
18197         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
18198         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
18199
18200 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
18201
18202         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
18203         types before switching on type.  Fixes #69622.
18204
18205 2004-11-19  Raja R Harinath  <rharinath@novell.com>
18206
18207         * Makefile.am (check-local): New.  Integrate into 'make check'.
18208         (MCS,RUNTIME): Define using in-tree mono and mcs.
18209         (ILASM): New.
18210         (%.exe): Use $(ILASM).
18211
18212 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
18213
18214         * mini-ppc.c: adjust initial prolog size (bug #69691).
18215
18216 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
18217
18218         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
18219         #69664.
18220
18221 2004-11-17  Raja R Harinath  <rharinath@novell.com>
18222
18223         * Makefile.am (clean-local): Rename from 'clean'.
18224
18225 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18226
18227         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
18228         to mono_arch_is_int_overflow. 
18229         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
18230         SIGFPE events.
18231
18232 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
18233
18234         * declsec.c|h: New files to support declarative security attributes.
18235         Added function to check if a method has (applicable) security.
18236         * mini.c|h: Add check for declarative security attributes in
18237         mono_method_check_inlining.
18238         * Makefile.am: Added declsec.c and declsec.h to the build.
18239
18240 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
18241
18242         * mini.c, mini.h: update to keep dynamic code info per-domain.
18243
18244 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
18245
18246         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
18247         (mini_init): Get rid of it from here too.
18248
18249 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
18250
18251         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
18252         implemented OP_RETHROW (patch by Geoff Norton
18253         <gnorton@customerdna.com>).
18254
18255 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
18256
18257         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
18258         between appdomains.  Fixes appdomain-unload on PPC.
18259
18260 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
18261
18262         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
18263         mini-exceptions.c: handle the new wrapper types.
18264         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
18265         token value as a MonoClass* when compiling a wrapper.
18266         mono_jit_create_remoting_trampoline now takes an additional
18267         MonoRemotingTarget parameter.
18268         
18269 2004-11-10  Martin Baulig  <martin@localhost>
18270
18271         * mini.c (mono_method_to_ir): Use `generic_container->context'
18272         rather than creating a new one.
18273
18274 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18275
18276         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
18277
18278         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
18279
18280 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
18281
18282         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
18283         the experimental aot cache stuff.
18284
18285 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
18286
18287         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
18288         mini-exceptions.c: update to exception clause structure changes.
18289
18290 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
18291
18292         * exceptions-x86.c (throw_exception): Fix warnings.
18293
18294         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
18295         for OP_RETHROW.
18296
18297 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
18298
18299         * exceptions-sparc.c (get_throw_exception): Really fix this.
18300
18301 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
18302
18303         * tramp-*.c: we no longer support icalls without wrappers, so
18304         a bit of code can be removed here
18305
18306 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
18307
18308         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
18309         patch.
18310
18311         * cpu-sparc.md: Add op_rethrow.
18312
18313         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
18314
18315         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
18316
18317         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
18318         * mini-ops.h: Add OP_RETHROW.
18319
18320         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
18321
18322         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
18323
18324 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
18325         
18326         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
18327         Makes the output much easier to read
18328
18329 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
18330
18331         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
18332         prevents another huge leak when compiling with ssa. Secondly, the
18333         performance of doing this rather than freeing the lists is much
18334         better. GList does a lock every time you allocate a list link,
18335         so that it can use a memory pool. So, it is better to just use
18336         a memory pool of our own.
18337         
18338         * ssa.c, linear-scan.c: replace g_list_remove_link with
18339         g_list_delete.  The remove one does not free the GList, so we were
18340         leaking memory. On -O=all --compile-all with corlib, this cut down
18341         3 MB of allocations.
18342
18343 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
18344
18345         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
18346
18347         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
18348
18349         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
18350         into a new function mono_create_jit_trampoline ().
18351
18352 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
18353
18354         * trace.c (get_spec): Allow tracing of classes without a namespace.
18355
18356 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
18357
18358         * mini.c: Fix pointer overwrite in mini_method_compile.
18359
18360 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
18361
18362         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
18363         The darwin ABI needs some special handling for 1 and 2 byte structs
18364         Lets use lbz/lhz instead of lwz everywhere.
18365         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
18366         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
18367         Use stb/sth for the former, and put the latter always on stack instead of in
18368         argument registers.
18369
18370 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
18371
18372         * trace.c (is_filenamechar): Add '_'.
18373
18374 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
18375
18376         * mini-s390.c: Fix prolog length to allow for large trace requirements.
18377
18378         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
18379
18380 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
18381
18382         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
18383         depends on libmonogc. Fixes #68805.
18384
18385 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
18386
18387         * mini.c (mono_jit_free_method): Provide extra information for
18388         this error.  Currently this leaks, but will be turned into a
18389         developer option in the future.
18390
18391 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
18392
18393         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
18394
18395 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
18396
18397         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
18398         boundary. Fixes reading of PATCH_INFO_R4 and R8.
18399         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
18400
18401 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
18402
18403         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
18404         trampolines for AOT code.
18405
18406 2004-10-22    <vargaz@freemail.hu>
18407
18408         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
18409         constructed types. Fixes #68136.
18410
18411 2004-10-21  Martin Baulig  <martin@ximian.com>
18412
18413         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
18414         if it returns true, unwind the stack to the call instruction.
18415
18416 2004-10-21    <vargaz@freemail.hu>
18417
18418         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
18419
18420         * mini.h: Bump AOT version number.
18421
18422         * objects.cs: Add another test for unbox trampolines.
18423
18424         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
18425         valuetype methods.
18426
18427 2004-10-20    <vargaz@freemail.hu>
18428
18429         * driver.c: Add SHARED to the set of optimizations tested.
18430
18431         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
18432
18433         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
18434         used by CEE_NEWARR.
18435
18436         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
18437
18438 2004-10-20  Martin Baulig  <martin@ximian.com>
18439
18440         * mini-exceptions.c (mono_handle_exception): Call
18441         mono_debugger_handle_exception() to tell the debugger about
18442         catch/finally clauses.
18443
18444 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
18445
18446         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
18447
18448         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
18449         #68447.
18450
18451 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
18452
18453         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
18454         methods as their native size, fixed bug #57543, #57545.
18455         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
18456         This saves a temporary register and mullw call down into 1 (minor perf
18457         increase for cases like sum = sum * 5;  This use to translate into:
18458             li r11,5
18459             mullw r28,r28,r11
18460         It now translates to
18461             mulli r28,r28,5
18462
18463 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
18464
18465         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
18466         #68388.
18467
18468 2004-10-11  Martin Baulig  <martin@ximian.com>
18469
18470         * mini.c (mono_method_to_ir): If we're a generic method, get the
18471         MonoGenericContainer from our MonoMethodNormal and create a
18472         MonoGenericContext from it.
18473
18474 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
18475
18476         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
18477
18478         * basic-long.cs: Add test for checked i8->i2 cast.
18479
18480 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
18481
18482         * inssel-ppc.brg: added a couple of speedup rules.
18483
18484 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
18485
18486         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
18487         to speed up rebuilds.
18488
18489 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18490
18491         * mini-s390.c: Minor fix to OP_OR_IMM.
18492
18493 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
18494
18495         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
18496         better. Fixes appdomain-unload.exe on sparc.
18497
18498 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
18499
18500         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
18501         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
18502         see bug 67324.
18503
18504 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
18505
18506         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
18507
18508 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
18509
18510         * mini.c: Always generate a field read/write wrapper for members
18511         of the class MarshalByRefObject since the actual instance could
18512         be a CBO.
18513
18514 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
18515
18516         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
18517
18518 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
18519
18520         * driver.c mini.h trace.c: Move the setting of the main assembly into
18521         a separate function called mono_trace_set_assembly () and call it after
18522         actually loading the main assembly. Fixes #66872.
18523
18524 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
18525
18526         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
18527         using the code manager.
18528
18529 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
18530
18531         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
18532
18533 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
18534
18535         * cpu-amd64.md: Fix bug in previous patch.
18536         
18537         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
18538         #66650.
18539
18540 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
18541
18542         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
18543         mini-exceptions.c: updates for changed stack walk interface.
18544
18545 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
18546
18547         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
18548
18549 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
18550
18551         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
18552
18553 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
18554
18555         * driver.c (mini_regression_list): Do not call mono_assembly_close 
18556         since assemblies can't be unloaded.
18557         
18558 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
18559
18560         * cpu-amd64.md: Fix more instruction lengths.
18561
18562         * cpu-amd64.md: Fix lengths of some instructions.
18563
18564 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
18565
18566         * inssel.brg: Make the array ldelema check aot friendly.
18567
18568 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
18569
18570         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
18571
18572         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
18573
18574 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
18575
18576         * mini-x86.c: Fix build.
18577
18578         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
18579         mono_type_get_underlying_type () helper function to simplify code.
18580         
18581 2004-09-09  Martin Baulig  <martin@ximian.com>
18582
18583         * mini-amd64.c: Don't access `type->data.klass' directly, call
18584         mono_class_from_mono_type() instead since the type may be a
18585         generic instance.
18586
18587 2004-09-09  Martin Baulig  <martin@ximian.com>
18588
18589         * mini-amd64.c (get_call_info): Fix support for generic instances.
18590         (add_valuetype): Use mono_class_from_mono_type() to get the class
18591         since we can be a generic instance.
18592
18593 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
18594
18595         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
18596
18597 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
18598
18599         * liveness.c: reset spill costs on each scan: bug 62107
18600
18601 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
18602
18603         * exceptions-sparc.c (mono_arch_find_jit_info): remove
18604         unnecessary line that doesn't compile
18605
18606 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
18607
18608         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
18609         trampolines, make them call an error function so people can fix their
18610         code.
18611
18612 2004-09-06  Martin Baulig  <martin@ximian.com>
18613
18614         * mini.c (mono_method_to_ir): When initializing locals, handle a
18615         generic instances like a valuetype if it's a valuetype and like a
18616         class if it's a class.
18617
18618 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
18619
18620         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
18621         stack. Fixes #64674.
18622
18623         * exceptions.cs: Add test for unwinding of call arguments.
18624
18625 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
18626
18627         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
18628         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
18629         set the carry/borrow flag). The sparc and s390 implementations
18630         can now use optimized versions (and simplify the code). ppc bugfixes.
18631
18632 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
18633
18634         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
18635
18636 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
18637
18638         * inssel-amd64.brg: Remove leftover 32 bit rule.
18639
18640         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
18641
18642 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
18643
18644         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
18645         mono_arch_find_jit_info functions into a new function. Fix a memory
18646         leak.
18647
18648         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
18649         refactored code.
18650         
18651 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
18652
18653         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
18654         as well.
18655         
18656         * exceptions.cs: Add array size tests.
18657
18658         * mini.c: Allocate a separate icall wrapper for each arity of 
18659         mono_array_new_va. Fixes #59509.
18660
18661         * exceptions.cs: Add testcase for 64578.
18662
18663         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
18664
18665         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
18666         
18667 2004-09-02  Martin Baulig  <martin@ximian.com>
18668
18669         * mini.c (mono_method_to_ir): When initializing the locals, call
18670         handle_initobj() on the generic instance itself, not its
18671         underlying type.
18672
18673 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
18674
18675         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
18676         MonoJitInfo for dynamic methods.
18677
18678         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
18679
18680         * mini.c: Add support for freeing JIT data for dynamic methods.
18681         
18682 2004-09-01  Martin Baulig  <martin@ximian.com>
18683
18684         * mini-x86.c (is_regsize_var): Added support for generic
18685         instances.
18686         (mono_arch_emit_prolog): Make this compile again, use
18687         `x86_push_imm_template (code)'.
18688
18689 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
18690
18691         * mini-x86.c: make all push_imm instructions that get
18692         patched always emit the long form
18693
18694 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
18695
18696         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
18697         in a per-domain hash.
18698
18699         * mini-amd64.c (merge_argument_class_from_type): Handle generic
18700         types.
18701
18702 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
18703
18704         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
18705         work.
18706         
18707         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
18708         work.
18709
18710         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
18711         Beginnings of SSE2 support.
18712
18713         * exceptions.cs: Add more tests for checked int<->uint casts.
18714
18715 2004-08-28  Martin Baulig  <martin@ximian.com>
18716
18717         * mini-x86.c (mono_arch_instrument_epilog): Added support for
18718         generic instances.
18719
18720         * mini.c
18721         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
18722         Handle generic instances recursively.
18723
18724 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
18725
18726         * iltests.il: test for conv.u8 on a constant
18727
18728 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
18729
18730         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
18731         LCONV_x4 (shrun_32 (membase)).
18732
18733 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
18734
18735         * inssel-x86.brg: c&p rules for push/setret of long
18736
18737 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
18738
18739         * inssel-x86.brg: c&p rules for compare (base, regvar) and
18740         compare (regvar, base)
18741
18742         * inssel-x86.brg: more burg love
18743
18744         * inssel.brg: more cleanup
18745
18746         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
18747
18748 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
18749
18750         * basic-long.cs, basic-calls.cs: new tests for optimization.
18751
18752 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
18753
18754         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
18755         patch.
18756
18757 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
18758
18759         * mini-amd64.c (read_tls_offset_from_method): Add another case.
18760         
18761 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
18762
18763         * inssel.brg (mini_emit_memcpy): use 
18764         NO_UNALIGNED_ACCESS to disable memcpy optimization
18765
18766 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
18767
18768         * mini-amd64.c: Handle generic types in various places.
18769
18770         * mini.c (mono_method_to_ir): Handle generic types in init locals.
18771
18772 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
18773
18774         * mini.c (handle_box): Fix warning.
18775
18776         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
18777
18778         * mini-amd64.h: Enable the emit_state optimization.
18779
18780         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
18781
18782         * mini-amd64.c: Add some new 64 bit peephole opts.
18783
18784         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
18785
18786         * cpu-amd64.md: sreg1 of div instructions must be %rax.
18787
18788         * mini-amd64.c: Register allocator fixes.
18789
18790         * mini.c: Add an optimization to emit_state to avoid allocation of new
18791         registers on some platforms.
18792
18793 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
18794
18795         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
18796
18797         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
18798         allocation. Fixes #63085.
18799
18800         * basic-long.cs: Add new regression test.
18801
18802         * mini-amd64.c: Register allocator improvements.
18803
18804 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
18805
18806         * mini-amd64.c (read_tls_offset_from_method): Add another code
18807         sequence.
18808
18809         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
18810         instruction sequence for nullifying class init trampolines.
18811
18812         * objects.cs: Add new regalloc test.
18813
18814         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
18815
18816 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
18817
18818         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
18819         
18820         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
18821         arguments.
18822
18823         * driver.c: Fix profiling after TLS changes.
18824         
18825         * driver.c (mono_main): Set mono_stats.enabled if needed.
18826
18827         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
18828         CEE_BOX.
18829
18830 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
18831
18832         * mini-x86.c: use a 1 op rather than a 2 op tls access
18833         instruction -> faster.
18834
18835 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
18836
18837         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
18838         x86 backend.
18839
18840 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
18841
18842         * exceptions-sparc.c (throw_exception): fix typo
18843
18844 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
18845
18846         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
18847         set tree->dreg correctly with tls. Allow any
18848         register to be used.
18849
18850         * mini-x86.c (read_tls_offset_from_method): add new code
18851         generation pattern seen with GCC.
18852
18853
18854 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
18855
18856         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
18857         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
18858         exceptions-sparc.c: fix some performance issues in exception
18859         handling and setting of the stack trace for exceptions that were
18860         already thrown.
18861
18862 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
18863
18864         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
18865         x86 backend.
18866         
18867         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
18868         registers.
18869
18870 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
18871
18872         This patch inlines tls access, when possible.
18873         
18874         * mini.h: new arch functions for TLS intrinsics.
18875         All platforms updated with a stub.
18876
18877         * mini.c: use the new intrinsics
18878
18879         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
18880         arch specific intrinsic for tls variables
18881
18882 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
18883
18884         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
18885         under windows.
18886
18887 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
18888
18889         * mini.c: thread local allocation
18890
18891 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
18892
18893         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
18894
18895         * Makefile.am: Link against the static version of libmonogc.
18896         
18897         * Makefile.am: Link the static versions of the convenience libraries
18898         into the mono executable.
18899
18900         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
18901
18902 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
18903
18904         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
18905         on integer overflow.
18906
18907         * mini-amd64.c: Reorganize function call code.
18908
18909         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
18910
18911 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
18912
18913         * inssel-x86.brg: use xor eax,eax.
18914         
18915         * basic.cs: new tests
18916
18917 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
18918
18919         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
18920         in exception throwing code.
18921         
18922 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
18923
18924         * inssel-x86.brg: use xor esi,esi.
18925
18926 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
18927
18928         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
18929         can trace methods compiled during mini_init () too.
18930
18931         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
18932         CEE_CONV_U4.
18933
18934 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
18935
18936         * Makefile.am: static link on x86 (r=zoltan)
18937
18938 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
18939
18940         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
18941         code since it causes some programs to fail.
18942
18943 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
18944
18945         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
18946
18947 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
18948
18949         * mini.c: ovfops_op_map - add STACK_OBJ case for
18950         CONV_I 
18951         * basic.cs: add test_0_pin_string as test
18952         case for above.
18953
18954 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
18955
18956         * Makefile.am: build C# if srcdir != builddir
18957
18958 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
18959
18960         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
18961         fall-through blocks.
18962
18963 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
18964
18965         * driver.c: enable loop by default again and include abcrem in -O=all.
18966
18967 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
18968
18969         * iltests.il: Add some localloc tests.
18970
18971         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
18972
18973         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
18974         Fixes #62574.
18975
18976         * inssel-amd64.brg: Add some optimizations.
18977
18978         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
18979         for gcc-3.4.
18980
18981         * Makefile.am: Statically link mono against libmono on AMD64.
18982         
18983         * mini-amd64.c inssel-amd64.brg: Optimizations.
18984
18985 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
18986
18987         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
18988
18989         * tramp-amd64.c: Patch calling code in trampolines.
18990
18991 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
18992
18993         * mini-amd64.c: pinvoke struct passing fixes.
18994
18995 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
18996
18997         * mini-sparc.c: redo change, make mono_arch_cpu_init call
18998         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
18999
19000 2004-08-05  Duncan Mak  <duncan@ximian.com>
19001
19002         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
19003         CEE_LDELEM_ANY.
19004
19005 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
19006
19007         * mini-amd64.c (emit_move_return_value): Move return value for normal
19008         calls too.
19009
19010 2004-08-05  Martin Baulig  <martin@ximian.com>
19011
19012         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
19013         `type->type'; just modify `type' itself when dealing with enums
19014         and generic instances.
19015         (check_call_signature): Make `simple_type' a `MonoType *'.
19016
19017 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
19018
19019         * mini.c: Use OP_PADD to add offsets to addresses.
19020
19021         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
19022
19023 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
19024
19025         * mini-sparc.c (mono_arch_emit_epilog): fix check
19026         for folding last op into restore instruction
19027
19028 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
19029
19030         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
19031         helper methods using the code manager.
19032         
19033         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
19034
19035         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
19036
19037 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
19038         
19039         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
19040           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
19041
19042         * mini-s390.c: fix tail processing
19043
19044 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
19045
19046         * mini-ppc.c: mul.ovf.un exception name fix.
19047
19048 2004-08-03  Martin Baulig  <martin@ximian.com>
19049
19050         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
19051         instances; before jumping to `handle_enum', also modify `ptype'.
19052
19053 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
19054
19055         * cpu-sparc.md: fcall maximal length too small.
19056
19057 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
19058
19059         * mini-amd64.c mini.h: Add initial support for passing/returning 
19060         structures to/from pinvoked methods.
19061
19062 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
19063
19064         * mini-ppc.c: reg allocator fix.
19065
19066 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
19067
19068         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
19069
19070         * inssel.brg: Optimize memset on 64 bit machines.
19071
19072         * mini-amd64.c: Fix some vararg cases.
19073
19074 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
19075
19076         * mini-s390.c: Corrected macro in emit_float_to_int
19077
19078         * s390-abi.cs: Tests to exercise the s390 ABI
19079
19080 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
19081
19082         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
19083         caller saved regs.
19084
19085         * basic.cs: Add a test for add.ovf.un.
19086
19087 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
19088
19089         * mini-sparc.c: add case for OP_IDIV_UN
19090
19091 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
19092
19093         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
19094         
19095         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
19096
19097 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
19098
19099         * basic.cs: regression tests.
19100
19101         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
19102         regressions.
19103
19104 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
19105
19106         * basic.cs: Add a new test.
19107
19108         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
19109         and AOT. Various fixes and optimizations.
19110
19111         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
19112
19113 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
19114
19115         * mini-ppc.c: make sure temp regs are not used for global reg
19116         allocation.
19117
19118 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
19119
19120         * cpu-sparc.md: conv_i8 fix for 64bits
19121
19122         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
19123
19124 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
19125         
19126         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
19127         add opcode for cmp BYTE PTR [eax], imm.
19128
19129         * inssel.brg: Make memcpy and memset takes bases.
19130
19131 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
19132
19133         * *-amd64.*: More AMD64 work.
19134         
19135 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
19136
19137         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
19138         add a compare-not-equal opcode.
19139         
19140 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
19141
19142         * mini.c: Use mono_init_from_assembly instead of mono_init.
19143         
19144 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
19145
19146         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
19147
19148         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
19149
19150         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
19151
19152         * inssel.brg: 64 bit fixes.
19153
19154         * mini.h (MonoCallInst): Add some AMD64 specific data.
19155
19156         * mini.h: Add some OP_P opcodes.
19157
19158 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
19159
19160         * basic.cs: tests for 61797 and 61740
19161
19162 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
19163
19164         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
19165         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
19166
19167 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
19168
19169         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
19170
19171         * *-amd64*.*: Ongoing AMD64 work.
19172
19173 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
19174
19175         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
19176
19177         * *-amd64*: Ongoing AMD64 work.
19178
19179         * mini-arch.h: Add AMD64 support.
19180
19181         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
19182
19183         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
19184
19185         * mini-ops.h: Add new opcodes.
19186
19187         * Makefile.am: Add AMD64 support.
19188
19189         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
19190         rules into the inssel-long*.brg files.
19191
19192         * *-amd64.*: Add beginnings of AMD64 backend.
19193
19194 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
19195
19196         * mini.c (print_dfn): commenting out the code that prints
19197         the cil. With -O=deadce, this makes -v -v crash.
19198         
19199         * cpu-pentium.md: make checkthis have a length of 2
19200
19201 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
19202
19203         * mini-sparc.h: fix implementations of __builtin
19204         functions for Sun compiler for V9.
19205
19206 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
19207
19208         * mini.c: use the new stelem.ref wrapper
19209         * exceptions.cs, arrays.cs: new stelem.ref tests
19210
19211 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
19212
19213         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
19214         new XSP should work with these changes).
19215
19216 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
19217         
19218         * inssel-{long32,x86,}.brg: trivial optimizations.
19219         
19220 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
19221
19222         * mini.c: load value when emitting box operation in
19223         constrained calls.
19224
19225 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
19226
19227         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
19228         is one byte shorter than cmp DWORD PTR [eax], 0.
19229
19230 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
19231
19232         * inssel-ppc.brg: arguments on the stack are always
19233         relative to the stack pointer (spotted by Neale Ferguson).
19234
19235 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19236
19237         * exceptions-x86.c: delay appending the method name to the trace until
19238         after mono_jit_info_table_find is called, as this gets the real
19239         MonoMethod.
19240
19241 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
19242
19243         * aot.c: register roots
19244
19245 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
19246
19247         * aot.c : I could just use PLATFORM_WIN32 flag.
19248
19249 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
19250
19251         * aot.c : Reverting the previous fix. This time it broke linux build.
19252
19253 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
19254
19255         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
19256
19257 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
19258
19259         * mini.c (handle_stack_args): Remove some more debugging code.
19260         
19261         * mini.c (handle_stack_args): Remove debug output left in by mistake.
19262
19263         * driver.c mini.h aot.c: Allow additional options to be specified with
19264         --aot and pass them to mono_compile_assembly.
19265
19266         * aot.c: Add experimental code to AOT compile all loaded assemblies
19267         on demand and save the code into a cache in the filesystem.
19268
19269         * aot.c: Add support for more wrapper methods.
19270         
19271         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
19272         58863.
19273
19274         * cpu-*.md: Remove removed opcodes.
19275
19276         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
19277         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
19278         related icalls to marshal.c.
19279
19280 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
19281
19282         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
19283
19284         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
19285
19286         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
19287
19288 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
19289         * liveness.c: If liveness is recomputated we need to reset the information
19290         for each variable. This way, if the liveness range has been narrowed
19291         by optimizations that happened after the last computation, we can return
19292         a smaller range.
19293         
19294         For example, if you have
19295         
19296         {
19297                 int i = 0;
19298                 
19299                 // Tons of code that does not affect i
19300                 
19301                 i = foo ();
19302                 ...
19303         }
19304         
19305         i = 0 is dead code and will be removed by SSA. However, when
19306         linear scan gets to the code, i will still appear to be live
19307         throughout the entire block. This prevents good register allocation.
19308
19309 2004-07-06  Martin Baulig  <martin@ximian.com>
19310
19311         * debug-mini.c (mono_debug_init_method): Allow
19312         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
19313         (mono_debug_add_icall_wrapper): New method.
19314
19315         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
19316
19317 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
19318
19319         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
19320         optimization.
19321
19322 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
19323
19324         * aot.c (mono_aot_load_method): Fix loading of debug info.
19325
19326 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
19327
19328         * aot.c: Add logging support.
19329
19330 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
19331
19332         * mini.h: Add prototype for mono_print_method_from_ip.
19333
19334         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
19335
19336         * inssel.brg: 64 bit fixes.
19337
19338         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
19339         inssel-long32.brg.
19340
19341         * Makefile.am: Add SPARC64 support.
19342
19343 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
19344
19345         * aot.c: Fix alignment problems on 32 bit platforms.
19346
19347 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
19348
19349         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
19350         SPARC64.
19351
19352         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
19353         problems.
19354
19355         * mini.h: Bump AOT file version. Some 64 bit fixes.
19356
19357 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
19358
19359         * inssel-sparc.brg: Add new rule to avoid register moves.
19360
19361         * inssel.brg: Add ldind_to_load_membase helper function.
19362
19363 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
19364
19365         * mini.c: OffsetToStringData intrinsic.
19366         
19367 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
19368
19369         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
19370
19371         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
19372         regression tests.
19373
19374         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
19375 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
19376
19377         * mini.c: reinstated mono_compile_get_interface_var()
19378         on x86, too, since the change breaks the Gtk# build there as well.
19379
19380 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19381
19382         * driver.c: remove loop from the default optimizations: it seems to
19383         interact badly with some of the other options (see bug #60613).
19384
19385 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
19386
19387         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
19388         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
19389
19390 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
19391
19392         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
19393         vararg-using methods.
19394
19395 2004-06-21  Martin Baulig  <martin@ximian.com>
19396
19397         * mini/mini-exceptions.c
19398         (mono_handle_exception): Added `gpointer original_ip' argument.
19399         After calling mono_unhandled_exception(), call
19400         mono_debugger_unhandled_exception() and if that returns true,
19401         restore the context and return.
19402
19403 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
19404
19405         * mini-ppc.c: prefer the use of relative branches so
19406         they won't need to be patched in aot code (patch from Patrick Beard).
19407
19408 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
19409
19410         * aot.c: patch from Patrick Beard to make the output assembly
19411         more correct for the MacOSX assembler. Small tweak to
19412         generate sane images on Linux/PPC, too.
19413
19414 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19415
19416         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
19417         case until bug #59509 is fixed (shows up in #60332).
19418
19419 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
19420
19421         * mini.c: make sure the needed wrappers are compiled, too, with
19422         precomp.
19423
19424 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
19425
19426         * driver.c: remove NPTL reference in --version output.
19427
19428 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19429
19430         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
19431         generate valid assembly for the Mach-O assembler.
19432
19433 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
19434
19435         * driver.c: don't include abcrem in the all optimization specifier
19436         since it slows down jit compilation too much for now.
19437
19438 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
19439
19440         * mini.c: use BIGMUL only if both operands have the same signage.
19441         * iltests.il: Test for bug 60056. (errors related to signage in
19442         BIGMUL).
19443
19444         r=lupus.
19445
19446 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
19447
19448         * mini.c, aot.c: memory leak fixes.
19449
19450 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
19451
19452         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
19453
19454 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
19455
19456         * Makefile.am: remove the -static hack completely, it links in
19457         statically glib as well.
19458
19459 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
19460
19461         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
19462         * exceptions.cs: make it compile with new mcs/csc.
19463
19464 2004-06-03 Massimiliano Mantione <massi@ximian.com>
19465         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
19466         and added relevant test case.
19467
19468 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
19469
19470         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
19471         regressions in gtk-sharp.
19472
19473 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
19474
19475         * exceptions.cs: New regression tests.
19476
19477         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
19478
19479 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
19480
19481         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
19482
19483 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
19484
19485         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
19486
19487         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
19488
19489 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
19490
19491         * mini.c (mono_jit_runtime_invoke): Init class in this
19492         method instead of trusting mono_jit_compile_method to
19493         do the work (because wrappers can be in object class)
19494
19495 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
19496
19497         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
19498
19499         * basic-long.cs: New regression test.
19500
19501 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
19502
19503         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
19504         and div/rem checks.
19505
19506 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
19507
19508         * Makefile.am: fix miguel's change to build mono statically against
19509         libmono (track build dependencies).
19510
19511 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
19512
19513         * cfold.c: Some glib versions do not have G_MININT32.
19514
19515 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
19516
19517         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
19518         with precision of tan, atan, sin and cos, and implemented related
19519         regressions tests (fixes bug 54467, but one new problem appeared and
19520         is not fixed yet).
19521
19522 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
19523
19524         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
19525
19526         * exceptions.cs: Add test for constant folding && division by zero.
19527
19528         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
19529         since driver.c is in libmono too, so the optimization was useless.
19530
19531         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
19532         variable to driver.c so the compiler can emit more efficient code to
19533         access them.
19534
19535 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19536
19537         * Makefile.am: don't distribute generated inssel.[ch] files.
19538
19539 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
19540
19541         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
19542         into the default appdomain. Fixes #58707.
19543
19544         * jit-icalls.c: Remove the broken approximation for truncl, doing
19545         no conversion is better.
19546
19547         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
19548         Fixes #58863.
19549
19550 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
19551
19552         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
19553         of the mcrxr instruction which is not available on some processors
19554         even if it's documented to be. Implement add and sub overflow correctly
19555         (still not complete for long unsigned). Speed up icalls a bit.
19556
19557 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
19558
19559         * mini.c (mono_jit_compile_method_with_opt): Make sure that
19560         we run .cctor in the current domain instead of target_domain.
19561         
19562         Fixes bug #58558, .cctor not being called in -O=shared.
19563
19564 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
19565
19566         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
19567
19568 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
19569
19570         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
19571         which can be done with an imm8, do it that way.
19572         (mono_arch_output_basic_block): ditto for a jmp
19573         (mono_arch_emit_prolog): Computate maximum offset of a label.
19574
19575 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
19576
19577         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
19578         now tries to allocate prefered physical reg's for virtual
19579         regs. This reduces the number of emited spills/loads with
19580         20-30% on our core assemblies.
19581
19582 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
19583
19584         * jit-icalls.c: truncl() is not needed and trunc() is
19585         the correct thing to do anyway (bug #58287).
19586
19587 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
19588
19589         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
19590         if available.
19591
19592 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
19593
19594         * driver.c: enable loop optimizations by default.
19595
19596 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
19597
19598         * mini-x86.c: fix calc of max loop size when aligning loops start.
19599
19600 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
19601
19602         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
19603         the stack.
19604
19605 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
19606
19607         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
19608         should set carry.
19609
19610         * basic-long.cs: Add tests for add/subtract of immediates with carry.
19611
19612         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
19613         
19614         * mini.c (inline_method): Allways inline some wrappers even if the cost
19615         is too large. Fixes #58785.
19616
19617         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
19618         
19619 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
19620
19621         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
19622         (crichton@gimp.org). Beginning of support for sparc/linux.
19623
19624         * mini-sparc.c: Optimize retrieval of LMF address.
19625
19626 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
19627
19628         * exceptions-ppc.c:  handle alloca in methods with clauses.
19629
19630 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
19631
19632         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
19633
19634 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
19635
19636         * mini.c: Delegate most of the abort signal work to 
19637           mono_thread_request_interruption, which also handles Stop and Suspend
19638           states.
19639
19640 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
19641
19642         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
19643         supports the save/restore lmf opcodes.
19644
19645 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
19646
19647         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
19648         by gcc-3.4 as well.
19649
19650         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
19651
19652 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
19653
19654         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
19655         methods which contain array accesses.
19656
19657         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
19658         boundaries. Fixes #58537.
19659
19660         * iltests.il: Add regression test for #58537.
19661
19662 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
19663
19664         * mini-x86.c (mono_arch_local_regalloc): Last part of
19665         fix for bug #58633 (releasing register to early).
19666
19667 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
19668
19669         * basic-long.cs: Add new regression test.
19670
19671 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
19672
19673         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
19674         register too early on the chain.
19675
19676 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
19677
19678         * mini.c (create_helper_signature): Use a helper function to reduce
19679         the code which needs to be written. Also set the calling convention of
19680         icalls on windows. Fixes #57840.
19681
19682 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
19683
19684         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
19685         exceptions-ppc.c: added helper function to get the instruction address
19686         from a signal handler context.
19687
19688 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
19689
19690         * helpers.c: use g_get_tmp_dir. Invokes happyness 
19691         from gonzalo.
19692
19693 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
19694
19695         * helpers.c: Add new env variable to pass args to objdump.
19696         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
19697
19698 2004-05-17  Radek Doulik  <rodo@ximian.com>
19699
19700         * Makefile.am (common_sources): added abcremoval.h so it get
19701         disted and daily mono packages on go-mono.com will build again
19702
19703 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
19704
19705         * abcremoval.c: Fixed coding style, added copyright header.
19706
19707         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
19708
19709         * mini.h: Added prototype for abc removal main function.
19710
19711         * build_relations_propagation_table.pl: Added copyright header.
19712
19713 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
19714
19715         * basic-long.cs: reg test for complex ceq_long bug.
19716
19717 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
19718
19719         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
19720         reg in long and clob case (bug #58343). Fixed/added comments.
19721
19722 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
19723
19724         * mini.c (mono_jit_runtime_invoke): Follow new convention
19725         of calling the invoke method with an function pointer.
19726
19727 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
19728
19729         * ChangeLog: Fix author of memory leak patch.
19730
19731 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
19732
19733         * Makefile.am: fix make dist as well...
19734
19735
19736 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
19737
19738         * cfold.c: Made so that conversions from pointer to int4 are no-ops
19739         on archs where pointers are 4 bytes long.
19740
19741         * Makefile.am: Added abcremoval.c source file.
19742
19743         * abcremoval.c: Added abcremoval.c.
19744
19745         * abcremoval.h: Added abcremoval.h.
19746
19747         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
19748
19749         * inssel.brg: Enabled bounds check removal.
19750
19751         * mini.c: Added support for abcrem optimization.
19752
19753         * mini.h: Added abcrem optimization label.
19754
19755         * driver.c: Added support for abcrem optimization.
19756
19757         * propagated_relations_table.def: Added propagated_relations_table.def.
19758
19759 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
19760
19761         * mini.c, cfold.c: fix style.
19762
19763 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
19764
19765         * mini.c: handle issue with the low-level implementation of
19766         some long opcodes (bug #54209).
19767
19768 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
19769
19770         * basic.cs: test for my new cmov stuff.
19771
19772 2004-05-13      Patrik Torstensson
19773
19774         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
19775         opt and added peephole documentation.
19776
19777 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
19778
19779         * tramp-ppc.c: rewrote the generic trampoline code.
19780
19781 2004-05-11      Patrik Torstensson
19782
19783         * mini-x86.c: optimize long shl/shr asm code (one less branch)
19784
19785 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
19786
19787         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
19788
19789         * mini.h mini.c dominators.c: Applied patch from Derek Woo
19790         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
19791
19792         * mini.c: Add new icalls for AsAny marshalling.
19793
19794 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
19795
19796         * tramp-ppc.c, mini-ppc.c: more cleanups.
19797
19798 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19799
19800         * mini.c: no warnings.
19801
19802 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19803
19804         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
19805
19806 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
19807
19808         * mini.c: In the thread abort signal handler, if the thread is in the
19809         process of being stoped, don't throw the Abort exception, just stop the
19810         thread.
19811
19812 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
19813
19814         * tramp-ppc.c: removed old code.
19815
19816 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19817
19818         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
19819         do some simple speed optimizations on ppc.
19820
19821 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
19822
19823         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
19824         and large offsets in load/store.
19825
19826 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
19827
19828         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
19829         it causes regressions.
19830
19831 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
19832
19833         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
19834         support.
19835
19836 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
19837
19838         * jit-icalls.c: remove warnings.
19839         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
19840         speedups for unsafe code.
19841
19842 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
19843
19844         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
19845
19846 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
19847
19848         * basic-calls.cs: Add new regression test.
19849
19850         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
19851         more portable.
19852
19853         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
19854
19855         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
19856         is no longer used.
19857
19858 2004-05-06      Patrik Torstensson
19859
19860         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
19861         long reg allocation in any reg (not only eax:edx) and implemented 
19862         long shl/shr ops in asm instead of helpers.
19863
19864 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
19865
19866         * mini-sparc.h: Fix warnings.
19867
19868         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
19869         stack.
19870
19871         * mini-exceptions.c (mono_handle_exception): Call the filter in a
19872         separate statement for clarity.
19873
19874         * mini-sparc.c: Update status.
19875
19876 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
19877
19878         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
19879         here.
19880
19881 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
19882
19883         * inssel-ppc.brg: another small pre-release workaround:
19884         we don't do overflow detection for long_sub_un.
19885
19886 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
19887
19888         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
19889         (also works around a weird ppc bug: 57957).
19890
19891 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
19892
19893         * tramp-ppc.c: trampoline fixes.
19894
19895 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
19896
19897         * mini-ppc.c: fixed typos.
19898
19899 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
19900
19901         * mini-ppc.c, exceptions-ppc.c: more code saves registers
19902         at the top of the stack. Fixed typos. Use a frame registers
19903         for all the methods with exception clauses.
19904
19905 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
19906
19907         * exceptions-ppc.c: restore fp registers.
19908
19909 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
19910
19911         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
19912         order from the stack top (moved the stack room to save the
19913         return value for trace after the param area). Fixed corruption
19914         in restoring registers on unwind.
19915
19916 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
19917
19918         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
19919
19920 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
19921
19922         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
19923         and prolog/epilog for methods that use it. Allow
19924         enough param area room for varargs methods. Fix miguel's
19925         breakage in exception handling.
19926
19927 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
19928
19929         * Makefile.am: run genmdesc only on current arch.
19930
19931 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19932
19933         * exceptions-x86.c:
19934         * mini-x86.h: fix the build on windows.
19935
19936 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
19937
19938         * 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.
19939
19940         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
19941
19942         * mini-exceptions.c: New file.
19943         
19944         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
19945         Move some parts of the x86 exception handling code to an 
19946         arch-independent file so it can be shared with other ports.
19947
19948 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
19949
19950         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
19951
19952 2004-04-26  David Waite  <mass@akuma.org>
19953
19954         * driver.c: remove comma from end of enumeration declaration
19955
19956 2004-04-26  Jackson Harper  <jackson@ximian.com>
19957
19958         * driver.c: parse config file before loading first assembly. This
19959         allows the user gac to be enabled/disabled. 
19960         
19961 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
19962
19963         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
19964         simpler mechanism: we do not care what is encoded initially
19965         (branch absolute or relative), we care about the code and its
19966         target.  I kept the old code for reference for now.
19967
19968         The new code tries first to determine if the jump is anywhere in
19969         the -/+32 absolute meg range, if it succeeds, it encodes using the
19970         absolute branch;  If not, it tried to find something in the
19971         relative range, if not, it uses the handle_thunk code. 
19972
19973 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
19974
19975         * exceptions-ppc.c: use the correct ip register on macosx.
19976
19977 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
19978
19979         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
19980
19981 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
19982
19983         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
19984         Raise exception on integer divide by zero by hand since the hw
19985         doesn't support it. Handle NaNs in FP compares.
19986
19987 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
19988
19989         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
19990         code reducing duplication between the platforms and enabled
19991         signal exception handling (on linux for now).
19992
19993 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
19994
19995         * exceptions-ppc.c: more macosx support.
19996
19997 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
19998
19999         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
20000
20001 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
20002
20003         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
20004
20005 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
20006
20007         * iltests.il: more tests.
20008
20009 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
20010
20011         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
20012         vars as well.
20013
20014 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
20015
20016         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
20017
20018 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
20019
20020         * liveness.c: Mark variables as volatile in all basic blocks reachable
20021         from exception clauses.
20022
20023 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
20024
20025         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
20026         inlining.
20027
20028 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
20029
20030         * iltests.il, basic.cs: more tests for regalloc.
20031
20032 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
20033
20034         * iltests.il: Some tests for register allocation modifications
20035         I have locally.
20036
20037 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
20038
20039         * exceptions.cs: Add regression test for bug #56782.
20040
20041         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
20042         original stack trace if an exception is rethrown. Fixes #56782. Oh,
20043         the beauty of fixing the same thing in 5 different files...
20044
20045 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
20046
20047         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
20048         methods.
20049
20050 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
20051
20052         * mini.c: Add support for STRWLPARRAY marshalling convention.
20053
20054 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
20055
20056         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
20057         to init the context to setup the regs pointer).
20058
20059 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
20060
20061         * exceptions-ppc.c: more exceptions work.
20062
20063 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
20064
20065         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
20066         not allowed.
20067
20068 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
20069
20070         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
20071         can use the memory directly.
20072
20073         * cpu-pentium.md: Update documentation from a post from Zoltan. 
20074
20075         add x86_add_membase, x86_sub_membase, x86_mul_membase
20076
20077 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
20078
20079         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
20080         GENERAL_REGS they were also hardcoded for all PPC ports.
20081
20082         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
20083
20084         Remove hard-coded limit for floating point registers, use
20085         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
20086
20087         Notice that in MacOS X calling conventions you can fit a lot more
20088         floating point values in registers, so I should update the PInvoke
20089         test to excercise the passing of floating point values on the
20090         stack (currently broken).
20091         
20092 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
20093
20094         * tramp-ppc.c (create_trampoline_code): Added
20095         JUMP_TRAMPOLINE_SIZE. 
20096         (ppc_magic_trampoline): Follow the pattern from
20097         x86_magic_trampoline: if code is set to zero, return. 
20098         (create_trampoline_code): Always pass MonoMethod to the jump
20099         trampoline, before it was passing a null.
20100         (mono_arch_create_jump_trampoline): Implement the jump stub, could
20101         share the code with mono_arch_create_jit_trampoline. 
20102
20103         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
20104         implemented.
20105         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
20106         implemented.  
20107
20108         * cpu-g4.md: Added length for jmp instruction, the worst case
20109         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
20110         for save_lmf).
20111
20112 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
20113
20114         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
20115
20116 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
20117
20118         * mini.c: Only set bblock->real_offset when adding a new bblock, and
20119         before each IL instruction.
20120
20121         * mini.c (CEE_BOX): Fix warnings.
20122
20123 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20124
20125         * mini.c: removed a few unused vars and extra whitespace.
20126
20127 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
20128
20129         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
20130         checks.
20131         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
20132         index.
20133         (OP_GETCHR): use the above
20134         (CEE_LDELEMA): use the above.
20135
20136         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
20137         version of the generic impl.
20138         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
20139         (CEE_LDELEMA): use the above.
20140
20141 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
20142
20143         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
20144         Fixes #56317.
20145
20146         * iltests.il: Added new regression test for #56317.
20147
20148 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
20149
20150         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
20151         under NetBSD. Fixes #56450.
20152
20153         * liveness.c (update_gen_kill_set): Fix previous patch.
20154
20155 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20156
20157         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
20158
20159 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
20160
20161         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
20162         ldsfld and ldsflda.
20163
20164         * inssel-sparc.brg: Add more optimizations.
20165
20166         * mini-sparc.c: Replace multiply/divide with shifts if possible.
20167
20168 2004-04-01  Martin Baulig  <martin@ximian.com>
20169
20170         * mini.c (handle_box): New static function; moved the
20171         implementation of CEE_BOX here.
20172         (mono_method_to_ir): Added `constrained_call' variable.
20173         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
20174         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
20175         mono_method_get_constrained() to get the method.
20176
20177 2004-04-01  Martin Baulig  <martin@ximian.com>
20178
20179         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
20180         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
20181         (mono_method_to_ir): We don't need these macros anymore since
20182         mono_class_get_full() already takes care of it. 
20183
20184 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20185
20186         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
20187         use @function (as doesn't accept #function here) and check the return
20188         value of system and stop if fails.
20189
20190 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20191
20192         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
20193
20194 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
20195
20196         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
20197
20198         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
20199
20200         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
20201         #56223.
20202
20203         * basic-long.cs: Add test for negation of Int64.MinValue.
20204
20205 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
20206
20207         * mini-sparc.c: Update status.
20208
20209         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
20210
20211         * exceptions-sparc.c: Fix return value in filters.
20212
20213         * inssel-sparc.brg: Fix register allocation in some rules.
20214
20215 2004-03-28  Martin Baulig  <martin@ximian.com>
20216
20217         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
20218         if neccessary.  
20219
20220 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
20221
20222         * mini-x86.c (mono_arch_patch_code): Fix warnings.
20223         
20224         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
20225         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
20226         remove unused conv_u4 opcode.
20227
20228         * mini-x86.c: Remove valgrind workaround since it slows down things
20229         even when mono is not run under valgrind.
20230
20231 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
20232
20233         * mini-sparc.c: Update status.
20234
20235         * inssel-sparc.brg: Add some optimizations.
20236
20237         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
20238         future delay slot filling. Add support for varargs, tail calls and JMP.
20239
20240         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
20241         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
20242
20243         * inssel.brg: Fix register allocation in OP_ARGLIST.
20244
20245         * inssel.brg: Fix warnings.
20246
20247 2004-03-25  Martin Baulig  <martin@ximian.com>
20248
20249         * mini.c (inflate_generic_field): Removed.
20250         (mini_get_method): Removed, use mono_get_method_full(),
20251         (mini_get_class): Removed, use mono_class_get_full().
20252         (mono_method_to_ir): Pass our generic context to
20253         mono_field_from_token().        
20254
20255 2004-03-25  Martin Baulig  <martin@ximian.com>
20256
20257         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
20258         of a `MonoMethod *'.
20259         (mini_get_method): Take a `MonoGenericContext *' instead
20260         of a `MonoMethod *'.
20261         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
20262         a new local variable called `generic_context' which holds the
20263         current `MonoGenericContext *'; use it to lookup things.
20264
20265 2004-03-24  Martin Baulig  <martin@ximian.com>
20266
20267         * mini.c (mini_get_class): New static method; if we're inside a
20268         generic instance, inflate the class if neccessary.
20269         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
20270
20271 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
20272
20273         * iltests.il: New regression test for #55976.
20274
20275         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
20276         #55976.
20277
20278 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
20279
20280         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
20281         output.
20282
20283 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
20284
20285         * liveness.c: Consider SSA stores as well as loads when making vars
20286         volatile.
20287
20288         * exceptions.cs: New regression tests for register allocation.
20289         
20290 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
20291
20292         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
20293         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
20294           domain lock only to protect puntual access to data structures.
20295           Added access lock for sighash, jit_icall_hash_name, 
20296           jit_icall_hash_addr and domain->code_mp.
20297
20298 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
20299
20300         * driver.c: Print SIGSEGV handling method.
20301
20302         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
20303
20304         * mini.c (setup_jit_tls_data): Handle case when this is called
20305         multiple times for a thread.
20306
20307         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
20308         is different from fbxx_un. Fixes #54303. Also use constants instead of
20309         magic numbers in a lot of places.
20310
20311 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
20312
20313         * exceptions.cs: Fix cctor test when --regression is used.
20314
20315 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
20316
20317         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
20318         for Linux/ppc.
20319
20320 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
20321
20322         * inssel-ppc.brg: fixed register assignments for some rules.
20323
20324 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
20325
20326         * exceptions.cs: Add test for exceptions in static constructors.
20327
20328         * mini.c (mono_jit_compile_method_with_out): Move the calling of
20329         static constructors outside the domain lock. Fixes #55720.
20330
20331 2004-03-17  Martin Baulig  <martin@ximian.com>
20332
20333         * mini.c (get_generic_field_inst): Removed, this'll never happen.
20334         (inflate_generic_field): Take the `MonoMethod *' instead of the
20335         `MonoClass *' and added support for generic method.
20336         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
20337         have a `field->parent->gen_params', only inflate the field if it's
20338         an open constructed type.
20339
20340 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
20341
20342         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
20343         exception object instead of the preconstructed ones.
20344
20345 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20346
20347         * mini.c: reverted changed to sigsegv_signal_handler commited
20348         accidentally in the previous patch.
20349
20350 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20351
20352         * mini.c:
20353         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
20354         running --aot with an old assembly.
20355
20356 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
20357
20358         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
20359         point values.
20360
20361         * mini-sparc.c: Add support for v9 branches with prediction.
20362
20363 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
20364
20365         * mini.c (mini_init): #warning is GNUC only
20366
20367         * mini-sparc.h: implement __builtin_frame_address
20368         and __builtin_return_address for Sun C compiler
20369
20370 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
20371
20372         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
20373
20374 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
20375
20376         * basic-calls.cs: Add test for unaligned byref long argument passing.
20377
20378         * mini-ops.h: Add sparcv9 compare and branch instructions.
20379
20380         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
20381         v9 instructions if we have a v9 cpu.
20382
20383         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
20384         registers for global allocation.
20385
20386         * exceptions-sparc.c: Fixes.
20387         
20388 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
20389
20390         * liveness.c (mono_analyze_liveness): Optimized version.
20391
20392         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
20393
20394         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
20395         sparc work.
20396
20397         * basic-float.cs basic-calls.cs: New regression tests.
20398
20399 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
20400
20401         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
20402         sigaltstack implementation.
20403
20404         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
20405         
20406         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
20407         stuff if SIGSEGV_ON_ALTSTACK is not defined.
20408
20409 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
20410
20411         * mini.c: Fix warnings.
20412         
20413         * mini.c (mono_resolve_patch_target): New function which contains the
20414         arch independent part of the patching process.
20415
20416         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
20417         patching code to a separate function.
20418
20419 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
20420
20421         * mini.c (add_signal_handler): ifdef out on Windows
20422
20423 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
20424
20425         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
20426         cpu-sparc.md: Add exception handling support + other fixes.
20427
20428         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
20429         typed GC detection in --version.
20430
20431         * basic.cs exceptions.cs: New regression tests.
20432
20433         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
20434         the arch specific code can store data during a compilation.
20435
20436         * mini-ops.h: Add OP_SETFRET.
20437
20438         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
20439         function, register a separate icall for each arity, so the icalls can
20440         get a wrapper.
20441         
20442         * mini.c (mono_print_tree): Print negative offsets in a more readable
20443         form.
20444         
20445         * mini.c: Make signal handling work on sparc.
20446         
20447         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
20448
20449         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
20450
20451         * jit-icalls.c: Emulate truncl by aintl on solaris.
20452
20453         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
20454
20455 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
20456
20457         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
20458
20459 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
20460
20461         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
20462         a MarshalByRef type, inline a method that performs the check, taking into
20463         account that the object can be a proxy. Also implemented tow new opcodes:
20464         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
20465         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
20466         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
20467
20468 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
20469
20470         * mini-ppc.c: if a relative branch displacement is too big
20471         but it points to and area reachable with an absolute branch, 
20472         avoid the thunks.
20473
20474 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
20475
20476         * mini.c: optimize small copies in cpblk.
20477
20478 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
20479
20480         * basic-calls.cs basic-float.cs: New regression tests.
20481
20482         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
20483         negative offsets from %fp. Implement localloc. Fix local register 
20484         allocation. Fix the case when the this argument needs to be saved to
20485         the stack. Implement some missing opcodes.
20486
20487 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
20488
20489         * mini.c (mini_method_compile): Reenable global regalloc in methods
20490         with exception handlers.
20491
20492         * linear-scan.c (mono_varlist_sort): Fix warning.
20493
20494         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
20495
20496         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
20497         regalloc costs.
20498
20499         * liveness.c: Make all variables uses in exception clauses volatile, to
20500         prevent them from being allocated to registers. Fixes #42136.
20501
20502 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
20503
20504         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
20505         causes regressions.
20506
20507         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
20508         argument to mono_arch_regalloc_cost.
20509
20510         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
20511         precisely.
20512
20513 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
20514
20515         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
20516         Make the cost of allocating a variable to a register arch dependent.
20517
20518         * basic-calls.cs: Fix compilation of tests.
20519         
20520         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
20521         helper function to cut back on the number of #ifdefs needed.
20522
20523         * mini-ppc.c: Fix compilation.
20524
20525         * basic-calls.cs: New regression tests.
20526
20527         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
20528
20529         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
20530         of l0 since that is callee saved.
20531
20532         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
20533         to virtual calls.
20534
20535         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
20536         of delay instruction.
20537
20538         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
20539
20540         * mini.h (MonoCallInst): Add 'virtual' flag.
20541
20542         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
20543
20544 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
20545
20546         * *.cs: New regression tests.
20547
20548         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
20549         work.
20550
20551         * mini.c (mono_runtime_install_handlers): Fix build.
20552
20553         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
20554         'signal_stack_size' members.
20555
20556         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
20557         alternate signal stack.
20558
20559         * exceptions-x86.c: Add stack overflow handling.
20560
20561         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
20562         functions to arch independent code.
20563
20564         * mini.c (mono_print_tree): Print more detailed info for load_membase
20565         opcodes.
20566         
20567 2004-02-23  Martin Baulig  <martin@ximian.com>
20568
20569         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
20570
20571 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
20572
20573         * mini-x86.c: fixed reg allocation for div/rem.
20574
20575 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
20576
20577         * driver.c (mono_main): Report some configuratio options on --version.
20578
20579 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
20580
20581         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
20582         low in the address space. Correctly flush memory in thunks where we
20583         output native code.
20584
20585 2004-02-20  Martin Baulig  <martin@ximian.com>
20586
20587         * mini.c (mini_get_method): New static method; inflate all generic
20588         methods and methods in open generic instances.
20589         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
20590         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
20591
20592 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
20593
20594         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
20595
20596         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
20597
20598 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
20599
20600         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
20601
20602         * mini-sparc.c (flushi mono_arch_output_basic_block): make
20603         it compile using Sun's compiler.
20604
20605 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
20606
20607         * 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.
20608
20609         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
20610
20611 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
20612
20613         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
20614         code.
20615         * mini-ppc.c: handle calls outside of the allowed range with thunks
20616         allocated using the code manager.
20617         * tramp-ppc.c: use the code manager to hold generated native code.
20618         Fixed the magic trampoline to just patch vtable entries.
20619
20620 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
20621
20622         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
20623         independent file.
20624
20625 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
20626
20627         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
20628         PPC.
20629
20630         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
20631         if we have a working __thread implementation.
20632
20633         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
20634         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
20635
20636 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
20637
20638         * mini-x86.c: Fix compilation under gcc 2.
20639         
20640 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
20641
20642         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
20643         contains a call to the wrapped function.
20644
20645         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
20646         OP_<CALL>_IMM opcodes, and use them under X86.
20647         
20648         * mini.c (mono_jit_find_compiled_method): Fix warning.
20649
20650         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
20651
20652         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
20653
20654         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
20655         functionality to mini.c.
20656
20657         * mini.c (mono_create_jump_trampoline): New function to create a jump
20658         trampoline. Return a compiled method instead of a trampoline if it
20659         exists. Add a cache for jump trampolines.
20660
20661         * mini.c (mono_jit_find_compiled_method): New function to return a
20662         compiled method if it exists.
20663
20664         * mini-x86.c: Call mono_create_jump_trampoline instead of 
20665         mono_arch_create_jit_trampoline.
20666
20667         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
20668         a jump trampoline. Fixes #52092.
20669         
20670 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
20671
20672         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
20673         which is not up-to-date. Add check_corlib_version () instead.
20674
20675         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
20676         have to call it.
20677         
20678         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
20679         since newer valgrind versions do not need it.
20680
20681         * mini.c (mono_jit_compile_method_with_opt): New helper function to
20682         compile a method with a given set of optimizations.
20683
20684         * mini.c: Compile icall wrappers on-demand instead of at startup.
20685
20686         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
20687         wrapper for an icall.
20688
20689 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
20690
20691         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
20692         #54063.
20693
20694         * iltests.il: Add test for non-empty stack before switch instruction.
20695
20696 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
20697
20698         * mini.c: Add support for new stringbuilder marshalling conventions.
20699
20700         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
20701
20702 2004-02-01  Martin Baulig  <martin@ximian.com>
20703
20704         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
20705         in `ginst->mtype_argv'.
20706
20707 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
20708
20709         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
20710         facilitate grepping.
20711
20712 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
20713
20714         * mini.c: fixed buglet in initobj generic implementation for references.
20715
20716 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
20717
20718         * Makefile.am: make the version script conditional.
20719         * jit-icalls.c: handle missing truncl().
20720
20721 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
20722
20723         * exceptions.cs: Add more tests for double->int conversion.
20724
20725         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
20726         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
20727
20728 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
20729
20730         * driver.c: make --verbose --version emit an error
20731         if the loaded corlib doesn't match the runtime version.
20732
20733 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
20734
20735         * mini-ppc.h: export ppc_patch().
20736         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
20737         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
20738         on par or better than on MacOSX.
20739
20740 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
20741
20742         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
20743         mono_lookup_pinvoke_call.
20744
20745         * mini-x86.c: Under windows, the default pinvoke calling convention is
20746         stdcall. Fixes #52834.
20747
20748         * mini.c (optimize_branches): Add an upper bound to the number of
20749         iterations to prevent infinite loops on strange loops. Fixes #53003.
20750
20751 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
20752
20753         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
20754         and ISINST. Fixes #52093.
20755
20756         * objects.cs (test_0_vector_array_cast): New tests.
20757         
20758 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
20759
20760         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
20761         checking in Array.Set ().
20762
20763         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
20764         #52590.
20765
20766         * object.cs (test_0_multi_array_cast): New regression test.
20767
20768 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
20769
20770         * exceptions-ppc.c: fix build on Linux/PPC.
20771
20772 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
20773
20774         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
20775         running under valgrind.
20776         (x86_magic_trampoline): Fix build bustage.
20777
20778         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
20779         negative values as well. This is needed for the encoding of the line number
20780         info, since sometimes the line numbers are not in increasing order.
20781
20782 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
20783
20784         * cpu-pentium.md (localloc): Increase the size of the localloc 
20785         instruction since it is a loop under Win32.
20786
20787         * debug-mini.c (record_line_number): Get rid of unneccesary memory
20788         allocation.
20789
20790 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
20791
20792         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
20793         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
20794         Max Horn (max@quendi.de). Fix file names in comments.
20795
20796 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
20797
20798         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
20799         avoid stack overflow.
20800         (replace_usage): Avoid uninitialized variable warnings.
20801
20802         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
20803         and taking the address of valuetype variables.
20804
20805 2004-01-03  Patrik Torstensson
20806
20807         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
20808         for other purposes than FP later on.
20809
20810 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
20811
20812         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
20813         of tail calls.
20814
20815 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
20816
20817         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
20818
20819 2003-12-30  Patrik Torstensson <p@rxc.se>
20820
20821         * mini-x86.h: Decreased number of availiable fp regs.
20822         Solves corner cases with FP spilling.
20823
20824 2003-12-23  Patrik Torstensson <p@rxc.se>
20825
20826         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
20827         for floating point stack tracking / spilling on x86. 
20828         Fixes bug #49012.
20829         
20830         * basic-float.cs: added float mul overflow test.
20831
20832 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
20833
20834         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
20835
20836 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
20837
20838         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
20839         supports for cond branches that overflow the immediate
20840         overflow offset. mcs can compile simple programs.
20841
20842 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
20843
20844         * exceptions-ppc.c: exception handling support wip:
20845         finally handlers get run on exception.
20846
20847 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
20848
20849         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
20850         profiling.
20851
20852 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
20853
20854         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
20855         initial support for stack walking and unwinding.
20856
20857 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
20858
20859         * driver.c (mono_main): Make corlib-out-of-sync message more 
20860         descriptive. Also remove verify_corlib call.
20861
20862 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
20863
20864         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
20865         not overlap with other call's arguments, too.
20866
20867 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
20868
20869         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
20870         move to arch-specific code the choice of arch-specific
20871         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
20872         * mini.c: ensure emulation calls will not interleave
20873         with other calls.
20874
20875 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
20876
20877         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
20878         the magic trampoline stack frame is dropped before executing
20879         the new method.
20880
20881 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
20882
20883         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
20884         and integer to fp conversions. Added support for overflowing
20885         arguments on the stack. Reserve a couple more registers as temps.
20886         Added support for aot compilation (as output still needs to be
20887         tweaked, though).
20888
20889 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
20890
20891         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
20892         Don't overwrite return register in some corner cases.
20893
20894 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
20895
20896         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
20897         static constructors when AOT compiling.
20898
20899         * driver.c (mono_main): Call mono_check_corlib_version.
20900
20901 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
20902
20903         * cpu-g4.md, basic.cs: fixed div target register.
20904
20905 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
20906
20907         * mini-ppc.c, basic.cs: shl_imm fix with test.
20908
20909 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
20910
20911         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
20912         structures by value. Misc fixes.
20913         * objects.cs: more tests.
20914
20915 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
20916
20917         * mini-ppc.c: lconv.ovf.i implemented.
20918
20919 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20920
20921         * mini.c:
20922         (mini_init): don't error out if someone already called g_thread_init.
20923
20924 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
20925
20926         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
20927         to be any type per the spec. Fix abnormal memory usage when
20928         the same object is repeatedly thrown.
20929
20930 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
20931
20932         * mini.c: check for overruns in IL code.
20933
20934 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
20935
20936         * TODO: Add/remove some todo entries.
20937
20938 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
20939
20940         * driver.c (mono_main): Call mono_verify_corlib.
20941
20942 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
20943
20944         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
20945         This has been moved to mini.c
20946         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
20947         type being casted is marshalbyref it could be a proxy, so instead of
20948         emitting the type check code, emit a call to a runtime method that will
20949         perform the check by calling CanCastTo if needed.
20950
20951 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
20952
20953         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
20954         methods with large stack frames under Win32.
20955
20956 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
20957
20958         * Makefile.am: Distribute regression tests.
20959
20960         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
20961         at the end instead of inserting each variable into the sorted list.
20962
20963         * linear-scan.c (mono_varlist_sort): New helper function.
20964         
20965 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
20966
20967         * mini.c: ensure arguments and locals are within bounds.
20968
20969 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
20970
20971         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
20972         related fixes.
20973
20974 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
20975
20976         * mini.c (mono_cprop_copy_values): Fix crash.
20977
20978         * aot.c: Set verbosity back to 0.
20979         
20980 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
20981
20982         * regalloc.c: complete memory leak fix by Laurent Morichetti
20983         (l_m@pacbell.net).
20984
20985 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
20986
20987         * driver.c (main_thread_handler): Revert the previous patch.
20988
20989         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
20990         under valgrind.
20991
20992         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
20993         memory from the memory pool.
20994
20995         * driver.c (main_thread_handler): Turn on all optimizations when
20996         --aot is used.
20997
20998         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
20999         an array for better performance.
21000
21001         * regalloc.c (mono_regstate_assign): Fix memory leak.
21002
21003         * debug-mini.c (mono_debug_serialize_debug_info): New function to
21004         serialize the debug info.
21005
21006         * debug-mini.c (mono_debug_add_aot_method): New function to load the
21007         debug info from the serialized representation.
21008
21009         * aot.c: Save debug info into the generated file and load it when 
21010         loading a method.
21011
21012         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
21013
21014 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
21015
21016         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
21017         More FP-related fixes.
21018
21019 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
21020
21021         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
21022         and register allocation buglet. Hello world now runs.
21023
21024 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
21025
21026         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
21027         * tramp-ppc.c: fixed class init trampoline.
21028         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
21029
21030 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
21031
21032         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
21033         mini.c: more ppc changes/fixes.
21034
21035 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
21036
21037         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
21038         Also optimize the case when the arguments are the same in the caller 
21039         and in the callee.
21040
21041         * iltests.il: Add tests for tail calls with valuetype arguments.
21042
21043 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
21044
21045         * mini-ppc.c: fixes for struct return type.
21046
21047 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
21048
21049         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
21050         mono_spillvar_offset() to arch-specific code.
21051
21052 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
21053
21054         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
21055
21056 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
21057
21058         * exceptions-x86.c: Fix stack space leaks.
21059         
21060         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
21061         registers from the lmf if the method has save_lmf set.
21062
21063 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
21064
21065         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
21066         of icall wrappers into InvokeInDomain, since these are now per-domain.
21067
21068 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
21069
21070         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
21071         make some opcode emulation and intrinsic ops enabled/disabled 
21072         according to the architecture. More fixes.
21073
21074 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
21075
21076         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
21077
21078 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
21079
21080         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
21081         arch-specific handling for 'this' and struct return type to
21082         arch-specific code.
21083
21084 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21085
21086         * aot.c: prevent divide by zero error when reporting (it happened with
21087         Accessibility.dll).
21088
21089 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
21090
21091         * mini.h (inst_switch): Remove unused macro.
21092
21093 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21094
21095         * aot.c:
21096         (load_aot_module): free 'info->methods' and 'info' properly. No more
21097         "free(): invalid pointer blah" messages when you have an old aot
21098         compiled assembly.
21099
21100 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
21101
21102         * jit-icalls.c, mini.c: Added support for context static fields.
21103
21104 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
21105
21106         * mini.c (mono_method_blittable): Methods which set LastError are not 
21107         blittable either. Fixes #51108.
21108         
21109 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
21110
21111         * mini.c: flush icache.
21112         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
21113
21114 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
21115
21116         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
21117
21118 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
21119
21120         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
21121         safe on IA32.
21122
21123         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
21124         vararg calls.
21125
21126         * inssel.brg (CEE_MKREFANY): Fix AOT case.
21127
21128 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
21129
21130         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
21131         instruction when the result is discarded.
21132
21133         * iltests.il (test_0_div_regalloc): New regression test.
21134
21135         * arrays.cs: Fix compilation error.
21136
21137 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
21138
21139         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
21140         float rules to inssel-x86.brg: sane architectures with FP registers
21141         don't need to implement these rules.
21142
21143 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
21144
21145         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
21146
21147 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
21148
21149         * mini.h, inssel-long32.brg: fixed endianess issues in int64
21150         implementation of 32 bit systems.
21151
21152 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
21153
21154         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
21155         (Jeroen Zwartepoorte).
21156
21157 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
21158
21159         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
21160         the caller and the callee matches.
21161         
21162         * mini.c (mono_method_to_ir): Add comment.
21163
21164         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
21165         signbit is missing on some platforms.
21166
21167 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
21168
21169         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
21170
21171         * mini.c (setup_jit_tls_data): Call the new function.
21172         
21173         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
21174
21175         * mini-x86.c: Add experimental support for fast access to the lmf
21176         structure under NPTL/Linux 2.6.x.
21177
21178 2003-11-06  Martin Baulig  <martin@ximian.com>
21179
21180         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
21181         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
21182         the debugger.
21183
21184 2003-11-02  Martin Baulig  <martin@ximian.com>
21185
21186         * mini.c (inflate_generic_field): New static method.
21187         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
21188         generic instance and the field is declared in a generic type, call
21189         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
21190
21191 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
21192
21193         * mini.h mini.c (mono_method_same_domain): New function to return
21194         whenever the caller and the callee are in the same domain.
21195
21196         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
21197
21198 2003-10-30  Martin Baulig  <martin@ximian.com>
21199
21200         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
21201         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
21202         method parameters.
21203         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
21204         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
21205
21206 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
21207
21208         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
21209         propagation.
21210
21211         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
21212         object here, so it is in the correct appdomain etc.
21213
21214 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
21215
21216         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
21217         already done.
21218         (mono_method_to_ir): Avoid freeing the type created returned from
21219         mono_type_create_from_typespec, since it is put into an internal cache
21220         by the function. Fixes pointer.exe.
21221
21222         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
21223         trampolines for icalls and pinvokes as well. Fixes #33569.
21224
21225 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
21226
21227         * mini.c: Update after appdomain changes.
21228
21229         * mini.c (mono_jit_compile_method_inner): Allways compile native
21230         method wrappers in the root domain, since there can only be one
21231         instance of them, whose address is stored in method->info.
21232
21233 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
21234
21235         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
21236         environment variable. Instead detect automatically whenever running
21237         under valgrind using the magic macro RUNNING_ON_VALGRIND from
21238         valgrind.h.
21239
21240 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
21241
21242         * trace.c, trace.h: New files that implement the new trace option
21243         parsing. 
21244
21245         * driver.c: Document new --trace options.
21246
21247         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
21248         mini-x86.c: Apply:
21249
21250         -       if (mono_jit_trace_calls)
21251         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
21252
21253         * mini.h: prototypes.
21254         
21255 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
21256
21257         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
21258
21259         * mini.c inssel.brg: Implement typedefbyref opcodes.
21260
21261         * mini.c (mono_jit_compile_method): Remove unused local variable.
21262
21263         * mini.c (mono_jit_compile_method_inner): Ditto.
21264         
21265 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
21266
21267         * tramp-x86.c (x86_class_init_trampoline): Fix build.
21268         
21269         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
21270
21271 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
21272
21273         * mini.c (mono_no_aot): Remove unused global variable.
21274
21275         * mini.c: Thread safety fixes.
21276
21277 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
21278
21279         * mini.c (mono_create_class_init_trampoline): Add a lock around
21280         class_init_hash_addr.
21281
21282         * arrays.cs (test_0_newarr_emulation): Add new regression test for
21283         #30073.
21284
21285         * mini.c: Decompose the NEWARR instruction before decomposing its
21286         arguments. Fixes #30073.
21287
21288 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
21289
21290         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
21291         convention.
21292
21293 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
21294
21295         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
21296
21297         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
21298
21299         * driver.c: Add support for compiling icall wrappers to --compile.
21300
21301 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
21302
21303         * inssel.brg: The empty value in class->interface_offsets is -1, not
21304         0. Fixes #49287.
21305
21306 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
21307
21308         * objects.cs: New test for 'is' operator on an array of interfaces.
21309
21310 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
21311
21312         * tramp-ppc.c: update trampoline code to support jumps
21313         and class initialization.
21314
21315 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
21316
21317         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
21318
21319         * inssel.brg (OP_UNBOXCAST): Fix #46027.
21320
21321         * inssel.brg (OP_UNBOX): Remove unused rule.
21322
21323         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
21324         region instead of one for each method. Fixes #47813.
21325
21326 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
21327
21328         * exceptions.cs (test_0_nested_finally): New regression test for
21329         nested exception handlers.
21330
21331         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
21332
21333         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
21334
21335         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
21336         inlining.
21337
21338         * mini.c (mono_method_check_inlining): Make the inlining limit 
21339         configurable by an environment variable.
21340         
21341         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
21342
21343         * mini.h: Bump AOT file version.
21344
21345         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
21346         token, store the image along with the token, since the token might not 
21347         refer to the same image as the method containing the relocation, 
21348         because of inlining.
21349
21350 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
21351
21352         * mini.c (mono_precompile_assemblies): New function to compile
21353         all methods in all loaded assemblies.
21354
21355         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
21356
21357         * regalloc.h regalloc.c (MonoRegState): Change the type of 
21358         iassign and fassign to int*, since they can contain large negative
21359         values if the register is spilled. Also added some comments. Fixes
21360         #45817.
21361
21362         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
21363         under Win32. Fixes #42964.
21364
21365 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
21366
21367         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
21368
21369         * aot.c: Added support for AOT compiling methods which contain calls
21370         to wrappers. Currently, only remoting-invoke-with-check wrappers are
21371         handled.
21372         
21373         * driver.c (compile_all_methods): Run the compilation in a thread
21374         managed by mono. Fixes #44023.
21375
21376         * mini.c (mono_codegen): Print full method name in verbose output.
21377
21378         * mini-x86.c (mono_arch_patch_code): Fix warning.
21379         
21380         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
21381         jumps, since the method we are jumping to might be domain-specific.
21382
21383         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
21384
21385 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
21386
21387         * inssel.brg: string chars are unsigned.
21388
21389 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
21390
21391         * TODO: New todo item.
21392
21393         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
21394         which calls mono_runtime_class_init and patches the call site to
21395         avoid further calls.
21396         (mono_arch_create_class_init_trampoline): New arch specific function 
21397         to create a class init trampoline.
21398         (create_trampoline_code): Generalized so it can create
21399         class init trampolines as well.
21400
21401         * mini.c (helper_sig_class_init_trampoline): New helper variable.
21402         (mono_create_class_init_trampoline): New function to create and cache
21403         class init trampolines.
21404         (mono_find_class_init_trampoline_by_addr): New function to lookup the
21405         vtable given the address of a class init trampoline. Used by the
21406         patching process.
21407         (mono_codegen): Generate a call to a trampoline instead of
21408         mono_runtime_class_init in LDSFLD[A].
21409         (mono_codegen): Add relocations for the new trampoline.
21410         
21411         * mini.h mini-x86.c aot.c: Added a new relocation type: 
21412         MONO_PATCH_INFO_CLASS_INIT.
21413
21414         * mini.h: Bump AOT version number.
21415
21416         * aot.c: Create a copy of the loaded code instead of using the original
21417         so methods which call each other will be close in memory, improving
21418         cache behaviour.
21419         
21420         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
21421         patch since it breaks the regression tests.
21422         
21423         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
21424         for the register saving instruction sequence since the 
21425         frame_state_for function in glibc 2.3.2 don't seem to detect it.
21426
21427 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
21428
21429         * TODO: Fix todo item && remove another.
21430
21431 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
21432
21433         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
21434         previous checkin.
21435
21436         * aot.c: Moved the check for MONO_LASTAOT into the initialization
21437         function of the module.
21438
21439         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
21440         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
21441         --no-aot command line option.
21442
21443 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
21444
21445         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
21446         by Bernie Solomon (bernard@ugsolutions.com).
21447
21448         * inssel.brg: Refactor the interface offset table related code into
21449         its separate functions and add support for the AOT case.
21450
21451 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
21452
21453         * aot.c (mono_aot_get_method_inner): Fix memory leak.
21454         
21455         * aot.c: Added mono_aot_verbose variable and made all debugging
21456         output depend on the value of this variable.
21457
21458         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
21459         method_label and info_label.
21460
21461         * mini.h mini-x86.c aot.c: Added a new relocation type 
21462         MONO_PATCH_INFO_IID for klass->interface_id.
21463
21464         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
21465         the MonoJitInfo structure.
21466
21467         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
21468         a non-root appdomain in shared mode.
21469
21470 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
21471
21472         * aot.c: make aot loader less verbose. Remove free of unused variable.
21473
21474 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
21475
21476         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
21477
21478         * .cvsignore: Added *.dll.
21479
21480         * mini.c (mono_print_tree_nl): New function callable while debugging.
21481
21482         * mini.c (mono_print_code): Export this.
21483
21484         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
21485         patched code.
21486
21487 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
21488
21489         * mini.h (MonoCompile): Added 'jit_info' field.
21490
21491         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
21492         the cfg structure, since it is needed by the AOT compiler.
21493
21494         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
21495
21496         * aot.c: A major rewrite. Changes include:
21497         - save exception tables for methods which have them.
21498         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
21499         to g_module_symbol.
21500         - reworked the file format so it is now much smaller and needs
21501         fewer relocation entries.
21502         
21503 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
21504
21505         * aot.c (load_aot_module): Fix build bustage on platforms without
21506         Boehm GC.
21507
21508 2003-09-04  Martin Baulig  <martin@ximian.com>
21509
21510         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
21511
21512 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
21513
21514         * TODO: Some new optimization ideas.
21515
21516         * aot.c: Move AOT module loading logic here from mono_assembly_open.
21517
21518         * aot.c: Save the optimization flags used to compile the code into
21519         the AOT module.
21520
21521         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
21522         support emitting domain specific code.
21523         
21524         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
21525         no longer domain neutral. It can be made domain neutral by compiling 
21526         with --optimize=shared.
21527
21528         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
21529         between appdomains.
21530
21531         * driver.c mini.h mini.c: New --no-aot debugging option which disables
21532         loading of AOT code.
21533
21534         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
21535         
21536         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
21537         if there is no domain neutrality information.
21538
21539 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
21540
21541         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
21542         format version into the generated library.
21543
21544         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
21545         callee method into the caller since one of them could be shared.
21546
21547         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
21548         system exceptions from AOT code now works.
21549
21550         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
21551         method if it is domain neutral and the callee is not.
21552
21553         * graph.c (cfg_emit_one_loop_level): Fix warning.
21554
21555 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
21556
21557         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
21558         last checkin.
21559
21560 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
21561
21562         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
21563         is needed  by code which is executed before mono_runtime_init ().
21564         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
21565         
21566         * mini.c (mono_thread_abort): Fix warning.
21567         (mono_jit_compile_method): Call static constructor in the AOT case too.
21568
21569         * aot.c (mono_compile_assembly): Fix warning.
21570
21571 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21572
21573         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
21574
21575 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
21576
21577         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
21578
21579         * cpu-pentium.md: Fix the length of call opcodes so they include the
21580         ESP restoring instruction. Fixes #47968.
21581
21582 2003-08-28  Martin Baulig  <martin@ximian.com>
21583
21584         * mini-x86.c (mono_arch_call_opcode): Added support for
21585         MONO_TYPE_GENERICINST.
21586
21587         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
21588
21589 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
21590
21591         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
21592         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
21593
21594         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
21595         metadata_section.
21596
21597 2003-08-26  Martin Baulig  <martin@ximian.com>
21598
21599         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
21600         when reporting an error, set this to the actual error location.
21601         (mono_method_to_ir): Report the correct error location if
21602         get_basic_blocks() returned an error.
21603
21604 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
21605
21606         * mini.c (mono_type_blittable): OBJECT is not blittable.
21607         (mono_method_blittable): Methods which have marshalling descriptors
21608         are not blittable either. Fixes #47842.
21609
21610 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
21611
21612         * driver.c mini.c: Use an environment variable instead of a global 
21613         variable. Also fix the build.
21614
21615         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
21616         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
21617         reporting this. 
21618
21619         * driver.c mini.c: Added --with-valgrind option to turn off some
21620         code which prevents mono from running under valgrind.
21621
21622         * mini.c (mono_emit_call_args): Fixed warning.
21623
21624         * mini.c (mono_emulate_opcode): Fixed warning.
21625
21626 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
21627
21628         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
21629         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
21630         regalloc.c, regalloc.h: specify available registers in arch-specific
21631         code and support floats in the regallocator (patch by Laurent Morichetti 
21632         <l_m@pacbell.net>)
21633
21634 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
21635
21636         * mini.c: mono_thread_current() can be called only after
21637         mono_runtime_init(): rearrange code to not call it early on.
21638
21639 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
21640
21641         * mini.c: allocate jump tables in the code mempools.
21642
21643 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
21644
21645         * mini.c, mini.h: make sure per-thread data allocated by the jit is
21646         freed.
21647
21648 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
21649
21650         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
21651         12 to 16.  This fixes bug #47453.
21652
21653
21654 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
21655
21656         * mini-ppc.c: fixed indexed load and unsigned compares.
21657
21658 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
21659
21660         * mini.c: reenabled installation of handler for
21661           thread abort signal.
21662
21663 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
21664
21665         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
21666         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
21667         until it's fixed and actually useful.
21668
21669 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
21670
21671         * inssel-long32.brg: couple more opcodes implemented.
21672
21673 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
21674         
21675         * mini-sparc.c: Even more opcodes implemeted.
21676
21677 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
21678
21679         * mini-sparc.c: More opcodes implemented.
21680
21681 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
21682
21683         * mini-sparc.c: More opcodes implemented.
21684
21685 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
21686
21687         * inssel-sparc.brg: Add some needed rules.  Direct
21688         copy from PPC.
21689         * Makefile.am: Use inssel-sparc.brg
21690         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
21691         an assert happy for now.
21692
21693 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
21694
21695         * mini-sparc.c: Fixed compile errors.
21696         * exceptions-sparc.c: Same.  We now produce a mono binary 
21697         on sparc-linux.  Yea.
21698
21699 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
21700
21701         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
21702         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
21703         They compile, but do not work.
21704
21705 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
21706
21707         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
21708         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
21709         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
21710         (ct@gentoo.org).
21711
21712 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
21713
21714         * mini.c: more opcodes implemented and better support for generics.
21715
21716 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
21717
21718         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
21719         * mini.c, mini.h: first cut at generics support: some new instructions 
21720         added and changed the behaviour of some of the existing ones.
21721
21722 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
21723
21724         * mini.c: Removed definition of metadata_shared mutex here.
21725
21726 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
21727
21728         * mini-x86.c: make vararg calls work for instance methods.
21729
21730 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
21731
21732         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
21733         returns the arguments in a separte list, now.
21734
21735 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
21736
21737         * aot.c, mini.c: updates for array type representation changes.
21738
21739 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
21740
21741         * mini.c: register function to perform jit shutdown.
21742
21743 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
21744
21745         * mini.c: use a faster allocator if possible.
21746
21747 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
21748
21749         * aot.c: some cleanups and portability changes.
21750
21751 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
21752
21753         * mini.c: use faster allocation for CEE_BOX if possible.
21754
21755 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
21756
21757         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
21758         Moved inlined mempcy code to its own function so that is can be
21759         reused. Added an inline memset function as well (optimized initobj).
21760         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
21761
21762 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
21763
21764         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
21765
21766 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
21767
21768         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
21769         arch code can setup the cpu for CLR execution, if needed.
21770         We use it on x86 to set the precision of FP operations.
21771
21772 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
21773
21774         * mini.c: disable some optimizations if we can guess they'll cost too
21775         much for a given method.
21776
21777 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
21778
21779         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
21780         
21781 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
21782         * mini.h mini.c mini-x86.c: Added instruction level coverage 
21783         info collection support.
21784
21785 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
21786
21787         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
21788         is now implemented in the profiling API. Get rid of a couple of
21789         unnecessary global variables.
21790
21791 2003-06-15  Nick Drochak <ndrochak@gol.com>
21792
21793         * basic-long.cs: tests for negative values for bigmul, and unsigned.
21794         * cpu-g4.md: add op_bigmul and op_bigmul_un
21795         * cpu_pentium.md: add op_bigmul_un
21796         * inssel-long32.brg: add rule for unsigned bigmul
21797         * mini-ops.h: define OP_BIGMUL_UN
21798         * mini-x86.c: THE BUG: handle (un)signed properly
21799         * mini.c: choose unsigned opcode if needed.
21800         This set of patches fixes bug #44291
21801
21802 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
21803
21804         * mini.c (optimize_branches): improved to handle all kinds of
21805         conditional branches.
21806
21807 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
21808
21809         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
21810         don't raise exceptions.
21811
21812 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
21813
21814         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
21815         to arch-specific files.
21816
21817 2003-06-09  Martin Baulig  <martin@ximian.com>
21818
21819         * Makefile.am (libs): Added $(LIBGC_LIBS).
21820
21821 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
21822
21823         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
21824         and OP_ATAN (fixes bug#44293).
21825
21826 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
21827
21828         * Makefile.am, mini-x86.c: rename cpu description array to
21829         pentium_desc, since some compilers define the 'pentium' preprocessor
21830         symbol.
21831
21832 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
21833
21834         * mini.c (mini_select_instructions): add explicit branch if the
21835         following block is not the false target of a conditional branch -
21836         we need this with any optimization that reorder or remove bblocks
21837
21838         * mini.c (optimize_branches): bug fixes
21839
21840 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
21841
21842         * mini.c (mono_method_to_ir): inline static readonly fields
21843
21844         * ssa.c (fold_tree): start cfold support for long (very simple
21845         cases only)
21846
21847         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
21848
21849 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
21850
21851         * inssel.brg: fixed memcpy (bug #44219).
21852
21853 2003-06-05  Dick Porter  <dick@ximian.com>
21854
21855         * driver.c: Set the glib log levels to not abort if g_message
21856         recurses.
21857
21858         g_set_prgname() has to happen before mini_init() so that the
21859         process handle gets the info.
21860         
21861 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
21862
21863         * driver.c: add intrins to the default optimizations to get wider
21864         exposure.
21865
21866 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
21867
21868         * mini.h: some large basic blocks will overflow a 16-bit
21869         integers for symbolic registers.
21870
21871 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
21872
21873         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
21874         (mono_arch_output_basic_block): fix bug 43499 
21875
21876 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
21877
21878         * mini.c: kill duplicated definition of mono_debug_format.
21879
21880 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
21881
21882         * mini-x86.c, arrays.cs: fixed register allocation bug.
21883
21884 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
21885
21886         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
21887
21888         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
21889
21890 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21891
21892         * mini.c:
21893         (print_method_from_ip): also print source location information if
21894         available.
21895
21896 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
21897
21898         * mini.c (mono_find_block_region): bug fix in region code
21899         (mini_method_compile): enable removing unreachable code again, but
21900         only in methods without exception clauses.
21901
21902 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
21903
21904         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
21905         Implemented arglist opcode and handling of TypedReference type.
21906         Fixed x86 call convention when a structure is returned.
21907         Minimal support for calling static vararg methods.
21908
21909 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
21910
21911         * mini.c (mini_method_compile):  always remove unreachable code,
21912         because the code in them may be inconsistent  (access to dead
21913         variables for example).
21914
21915 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
21916
21917         * driver.c, debug-mini.c: warning fixes.
21918
21919 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
21920
21921         * Makefile.am, jit.h, mini.h: install header for embedding mono.
21922
21923 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
21924
21925         * mini.c: thread-static fields are registered in mono_class_vtable(),
21926         so ensure the function is called before checking for them.
21927
21928 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
21929
21930         * mini.c (optimize_branches): fix for bug 43586
21931
21932         * jit-icalls.c (mono_llmult_ovf): added an additional check for
21933         overflow (fixes Bug #43639)
21934
21935 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
21936
21937         * mini.c, objects.cs: allow the use of stobj for primitive types.
21938
21939 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
21940
21941         * mini.c: be less strict about argument checking until we support
21942         running the verifier.
21943
21944 2003-05-27  Nick Drochak <ndrochak@gol.com>
21945
21946         * basic-long.cs: tests for (ulong)int * (ulong)int also
21947         * mini.c: use the same trick for (ulong)int * (ulong)int
21948
21949 2003-05-27  Nick Drochak <ndrochak@gol.com>
21950
21951         * basic-long.cs: add regression test for (long)int * (long)int
21952         * cpu-pentium.md: add op_bigmul specification
21953         * inssel-long32.brg: add OP_BIGMUL rule
21954         * mini-ops.h: add OP_BIGMUL
21955         * mini-x86.c: register allocator: handle case where src1 needs to be
21956         in EAX.
21957         * mini.c: substitute special BIGMUL opcode in the tree for 
21958         (long)int * (long)int
21959
21960 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
21961
21962         * jit-icalls.c: call the type ctor on field access if needed.
21963
21964 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
21965
21966         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
21967         to a method (including results of ldelema, bug#43207).
21968
21969 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
21970
21971         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
21972         colors to show exception handler blocks.
21973
21974         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
21975         (fix for pinvoke7.cs).
21976
21977 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
21978
21979         * mini.h, mini.c: ensure correct initialization order for types that
21980         require it. Prepare for lazy compilation of jit icall wrappers.
21981         Provide a name for opcode emulation to reduce unneeded mallocing.
21982
21983 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
21984
21985         * mini-x86.c: better register restoring code and profiling
21986         support for tail calls.
21987
21988 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
21989
21990         * mini.h, driver.c: prepare for leaf methods optimization.
21991
21992 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
21993
21994         * mini.c: get targets of branches before converting a method.
21995
21996 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
21997
21998         * mini.c (optimize_branches): added some experimental code (disbaled) 
21999
22000 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
22001
22002         * mini.c (optimize_branches): fix branch to branch optimization 
22003
22004         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
22005
22006         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
22007
22008         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
22009
22010         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
22011         if needed.
22012
22013 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
22014
22015         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
22016         enable use of interface variables again.
22017
22018         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
22019         I1 to registers because there is no simply way to sign extend 8bit
22020         quantities in caller saved registers on x86.
22021
22022         * inssel-float.brg: set costs of some rules to 2 so
22023         that monobure always select the arch. specific ones if supplied,
22024         regardless of the order we pass the files to monoburg.
22025
22026 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
22027
22028         * mini.c, mini-x86.c: since the magic trampoline for jumps
22029         can't patch the code directly, we do it as soon as the
22030         method gets compiled.
22031
22032 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
22033
22034         * mini-x86.c, mini.h: introduce a new patching method
22035         to support CEE_JMP and tail calls.
22036         * mini.c: obey tail.call. Don't precompile methods target
22037         of CEE_JMP.
22038         * tramp-x86.c: new trampoline code to handle methods
22039         reached through a jump.
22040
22041 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
22042
22043         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
22044         bit values to registers
22045
22046 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
22047
22048         * mini.c (mono_compile_get_interface_var): share interface
22049         variables if possible.
22050
22051 2003-05-16  Martin Baulig  <martin@ximian.com>
22052
22053         * debug-mini.c (mono_init_debugger): New function to initialize
22054         the debugger.  This is not in the debugger since it needs to
22055         access some of mini's internals.
22056
22057 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
22058
22059         * mini.c (mono_method_to_ir): inlining fixes/cleanups
22060
22061 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
22062
22063         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
22064         for value type handling.
22065
22066 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
22067
22068         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
22069         (mono_method_check_inlining): enable inlining of all kinds of wrappers
22070
22071 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
22072
22073         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
22074           the constructor through a proxy.
22075
22076 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
22077
22078         * jit-icalls.c, inssel.brg: fixes to array element address
22079         calculations.
22080
22081 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
22082
22083         * mini-x86.c (is_regsize_var): allocate pointer to registers
22084
22085 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
22086
22087         * driver.c: fixed typo, added intrins to the set of optimizations
22088         tested with regressions.
22089
22090 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
22091
22092         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
22093         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
22094         test case.
22095
22096 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
22097
22098         * inssel.brg: remove some common pop instructions without side effects
22099
22100 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
22101
22102         * inssel-x86.brg: fixed thinko in int to double conversions.
22103
22104 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
22105
22106         * mini.c, jit-icalls.c: added runtime thread-static variable support.
22107
22108 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
22109
22110         * inssel-long32.brg: two more missing instructions.
22111
22112 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
22113
22114         * mini.c (mono_emit_call_args): set the cil_code for all arguments
22115         if not already set.
22116
22117 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
22118
22119         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
22120         correctly.
22121
22122         * basic-float.cs: Added tests for negative zero.
22123
22124 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
22125
22126         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
22127         a couple of missing operations for long casts, with test cases.
22128
22129 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22130
22131         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
22132
22133 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
22134
22135         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
22136         code size estimation.
22137
22138 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
22139
22140         * mini.c (mono_jit_create_remoting_trampoline): make it work with
22141         abstract methods (fix bug 42542)
22142
22143         * aot.c: add ability to handle array types
22144         
22145 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
22146
22147         * mini.c: Call the _specific versions of the object allocation
22148         functions if possible.
22149
22150 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
22151
22152         * driver.c: call setlocale ().
22153
22154 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
22155
22156         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
22157         windows build.
22158
22159 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
22160
22161         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
22162
22163         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
22164         wrappers (fix bug 42122)
22165
22166 2003-05-04  Martin Baulig  <martin@ximian.com>
22167
22168         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
22169
22170         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
22171         s/mini_set_defaults/mono_set_defaults/g.
22172
22173 2003-05-04  Martin Baulig  <martin@ximian.com>
22174
22175         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
22176
22177 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
22178
22179         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
22180         (reported by Don Roberts).
22181
22182 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
22183
22184         * mini.c: temporarily work around two bugs for this release.
22185
22186 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
22187
22188         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
22189         that contains -export-dynamic and it makes using the ld script
22190         useless.
22191         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
22192
22193 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
22194
22195         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
22196         specific cpu.
22197
22198 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
22199
22200         * mini.c: make sure leave calls all the needed finally blocks,
22201         even when the target jumps out of multiple exception clauses.
22202
22203 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
22204
22205         * ldscript, Makefile.am: add linker script to reduce the number of
22206         exported symbols (should also fix the issues with libwine defining
22207         some of the same symbols in io-layer).
22208
22209 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
22210
22211         * driver.c (mini_main): Avoid assertion when no file name is given on 
22212         the command line.
22213
22214 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
22215
22216         * driver.c: added --version/-V command line option.
22217         Added the inline optimization in the regression tests.
22218
22219 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
22220
22221         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
22222         to the type in the method signature (fixes bug#42134).
22223
22224 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
22225
22226         * mini.c: when inlining, check this is not null only when needed (bug #42135).
22227
22228 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
22229
22230         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
22231
22232 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22233
22234         * driver.c: fixed bug #42100.
22235
22236 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
22237
22238         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
22239
22240 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
22241
22242         * mini.c: moved most of the code required to do inlining to its own
22243         function so it can be reused. Inline also ctors if appropriate.
22244
22245 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
22246
22247         * Makefile.am: Link with -export-dynamic so shared libs loaded by
22248         the runtime can call mono API functions.
22249
22250 2003-04-27  Martin Baulig  <martin@ximian.com>
22251
22252         * debug-mini.c (mono_debug_init_method): Added
22253         `guint32 breakpoint_id' argument; if the method has a breakpoint,
22254         send a notification to the debugger.
22255
22256         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
22257         running in the Mono Debugger, just pass the breakpoint number to
22258         mono_debug_init_method().
22259
22260         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
22261
22262 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
22263
22264         * mini.c: allow some more unsafe compares.
22265
22266 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
22267
22268         * mini-x86.c, Makefile.am: make distcheck works (partially from
22269         a patch by Richard Lee <r.h.lee@attbi.com>).
22270         * regset.c, regset.h: removed, they are unused.
22271
22272 2003-04-25  Dick Porter  <dick@ximian.com>
22273
22274         * driver.c: Usage reports the name as 'mono' not 'mini'
22275         * exceptions-x86.c: Build and run on freebsd
22276
22277 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
22278
22279         * Makefile.am: install the program with the 'mono' name and
22280         the library as libmono instead of mini and libmini.
22281
22282 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
22283
22284         * driver.c: provide the APIs for the embedding interface of the old jit.
22285
22286 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
22287
22288         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
22289
22290 2003-04-23  Martin Baulig  <martin@ximian.com>
22291
22292         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
22293
22294         * driver.c: Added `--debug' command line argument to enable
22295         debugging support.
22296
22297 2003-04-23  Martin Baulig  <martin@ximian.com>
22298
22299         * debug.[ch]: Removed.  The code is now in
22300         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
22301
22302         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
22303         last six months.
22304
22305 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
22306
22307         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
22308
22309 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22310
22311         * mini.c:
22312         (mini_cleanup): moved mono_runtime_cleanup call after the call to
22313         mono_domain_finalize.
22314         (mini_method_compile): use mono_method_profile* if the the option is
22315         enabled.
22316
22317 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
22318
22319         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
22320         methods with their wrapper.
22321
22322         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
22323         methods with their wrapper.
22324
22325         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
22326         their wrapper.
22327
22328         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
22329         wrapper.
22330
22331         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
22332         methods.
22333
22334 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
22335
22336         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
22337
22338 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
22339
22340         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
22341         of the mempool. This is slightly faster and uses less memory
22342
22343 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
22344
22345         * mini.c: avoid O(n) allocation for variables.
22346
22347 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
22348
22349         * mini.c: handle items on the stack after inlining methods.
22350
22351 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
22352
22353         * mini.c: make the method->opcode optimization dependent
22354         on MONO_OPT_INSTRINS and do it lazily.
22355
22356 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
22357
22358         * driver.c: print overall results at the end of regression run.
22359
22360 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
22361
22362         * inssel.brg: don't overwrite symbolic registers.
22363
22364 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
22365
22366         * inssel-x86.brg: fix conversion from long to float.
22367
22368 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
22369
22370         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
22371
22372 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
22373
22374         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
22375
22376         * driver.c: Added --print-vtable option as in the old JIT.
22377
22378 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
22379
22380         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
22381
22382 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
22383
22384         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
22385
22386 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
22387
22388         * mini.c regalloc.c regalloc.h: Fix memory leak.
22389
22390 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
22391
22392         * aot.c (mono_aot_get_method): register all used strings
22393
22394 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
22395
22396         * mini.c: always intern strings references with ldstr at compile time.
22397
22398 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
22399
22400         * Makefile.am: add BUILT_SOURCES.
22401
22402 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
22403
22404         * driver.c: give a better error message when the assembly to execute
22405         doesn't have an entry point.
22406
22407 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
22408
22409         * Makefile.am: added hack for automake
22410
22411         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
22412         correct sematics.
22413
22414         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
22415
22416 22003-04-07  Martin Baulig  <martin@ximian.com>
22417
22418         * Makefile.am: Added Makefile.am.
22419
22420         * debugger-main.c: Removed, this is now in the debugger where it
22421         belongs.
22422
22423         * mini.pc.in: Call this package `mini' for the moment.
22424
22425
22426
22427
22428
22429
22430
22431
22432
22433
22434
22435
22436
22437
22438