2009-04-11 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / ChangeLog
1 2009-04-11  Zoltan Varga  <vargaz@gmail.com>
2
3         * mini.c (mini_method_compile): Disable sharing of stack slots/registers
4         and extend live ranges to cover the whole method when using xdb.
5
6         * jit-icalls.c (ldvirtfn_internal): Avoid creating rgctx wrappers here,
7         do it in the trampolines.
8
9         * mini-trampolines.c (mono_magic_trampoline): Add an rgctx wrapper if
10         needed.
11
12         * mini-trampolines.c (mono_delegate_trampoline): Ditto.
13         
14         * method-to-ir.c (mono_method_to_ir): Avoid using the fast virtual method
15         call code in full-aot mode since IMT is disabled there.
16         (mono_method_to_ir): Inline ldfld wrappers which return structures too, the
17         new JIT no longer has that restriction.
18
19         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
20
21         * aot-compiler.c (emit_extra_methods): Emit the wrapper method names in
22         a more compact format.
23         (mono_aot_wrapper_name): New function to return a unique name for a
24         wrapper method, also used by the AOT runtime.
25
26         * aot-runtime.c (find_extra_method_in_amodule): Update after the changes to
27         aot-compiler.c.
28
29         * aot-compiler.c (add_generic_class): Add the helper methods from T[]
30         when a ICollection<T> etc is encountered.
31         (add_generic_instances): Process method arguments/locals too.
32         (emit_trampolines): Emit unbox trampolines for extra methods too. Shorten
33         trampoline names.
34
35         * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle extra methods too.
36         
37 2009-04-10  Zoltan Varga  <vargaz@gmail.com>
38
39         * aot-compiler.c: Disable the AOT compiler if the JIT is disabled.
40
41         * dwarfwriter.c (emit_type): Emit byref to reference types as 'int' for now.
42
43         * decompose.c (mono_decompose_opcode): Make this return a MonoInst*
44         representing the result of the decomposition. Nullify instructions
45         instead of setting them to OP_NOP since nops can't have registers
46         set.
47
48 2009-04-09  Zoltan Varga  <vargaz@gmail.com>
49
50         * aot-compiler.c (mono_compile_assembly): Split this huge function into
51         smaller parts. Add 'nodebug' option to prevent generation of DWARF debug
52         info. Strip 'mapping symbols' on ARM.
53
54         * iltests.il.in (test_0_fconv_to_i): Disable this on ARM too.
55         
56         * genmdesc.pl: Applied patch by Martin Fuzzey (mfuzzey@parkeon.com). Sync
57         this with the native genmdesc.
58
59 2009-04-08  Bill Holmes  <billholmes54@gmail.com>
60
61         * aot-runtime.c:  Fixing the MSVC build.
62
63         Code is contributed under MIT/X11 license.
64
65 2009-04-08  Zoltan Varga  <vargaz@gmail.com>
66
67         * mini-llvm.c (mono_llvm_emit_method): Pass i1/i2 arguments as i4 since 
68         JITted code depends on it.
69
70 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
71
72         * aot-compiler.c: Use new MonoGenericParam accessors.
73
74 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
75
76         Reduce memory usage and improve correctness wrt MonoGenericParam
77         * aot-runtime.c (decode_klass_ref): Simplify generic parameter
78         handing.  Avoid allocating MonoGenericParams, but use the ones in
79         the container itself.
80
81 2009-04-07  Miguel de Icaza  <miguel@novell.com>
82
83         * tasklets.c: Return exceptions in the out argument.
84
85 2009-04-08  Zoltan Varga  <vargaz@gmail.com>
86
87         * mini-llvm.c (mono_llvm_emit_method): Fix alignment in the LOCALLOC_IMM
88         opcode. Use pointer types in more places instead of casting them to 
89         integers.
90
91         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Create a pass manager to run
92         optimizations.
93         (mono_llvm_optimize_method): New helper function to optimize a method.
94
95         * method-to-ir.c (mono_emit_widen_call_res): Extract the call result 
96         widening code so it could be called from more places.
97         (mono_method_to_ir): Call mono_emit_widne_call_res () in several more
98         code paths in the call opcodes.
99
100 Mon Apr 6 14:19:54 CEST 2009 Paolo Molaro <lupus@ximian.com>
101
102         * exceptions-amd64.c, mini-amd64.h: amd64 support code for continuations.
103
104 2009-04-06  Zoltan Varga  <vargaz@gmail.com>
105
106         * dwarfwriter.c: Use _ to separate class name 
107         components as gdb can't handle '.'. Represent reference variables
108         as 'class <NAME>&'.
109         
110         * mini.h (MonoCompile): Add locals_min_stack_offset/locals_max_stack_offset.
111
112         * mini-amd64.c (mono_arch_allocate_vars): Save min/max stack offset.
113         
114         * mini-gc.c: New file, contains the SGEN GC related parts of the JIT.
115
116         * gc-test.cs: New file with GC stack marking tests.
117         
118         * mini-arm.c (mono_arch_output_basic_block): Fix int->float conversion of
119         negative numbers for vfp.
120
121         * basic-float.cs: Add a test.
122         
123 Mon Apr 6 14:12:10 CEST 2009 Paolo Molaro <lupus@ximian.com>
124
125         * exceptions-x86.c, mini-x86.h: x86 support code for continuations.
126
127 Mon Apr 6 14:09:53 CEST 2009 Paolo Molaro <lupus@ximian.com>
128
129         * tasklets.h, tasklets.c, mini.h, mini.c, Makefile.am: arch-indep
130         part of tasklet/continuation support.
131
132 2009-04-05  Zoltan Varga  <vargaz@gmail.com>
133
134         * mini-llvm.c (mono_llvm_emit_method): Move the handling of
135         amd64 opcodes inside an ifdef.
136
137         * dwarfwriter.c: Emit inheritance information for classes, emit fields
138         of complex types.
139         
140         * dwarfwriter.c (emit_type): Emit the class info for classes.
141
142 2009-04-04  Zoltan Varga  <vargaz@gmail.com>
143
144         * Makefile.am (AM_CXXFLAGS): Add GLIB_CFLAGS to this.
145
146         * mini-llvm-cpp.h: New header file for mini-llvm-cpp.cpp.
147
148         * mini-llvm.c: Remove unused fields from EmitContext, fix memory leaks.
149
150         * ssa.c (mono_ssa_compute): Fix some memory leaks.
151
152 2009-04-03  Zoltan Varga  <vargaz@gmail.com>
153
154         * mini.c mini-amd64.c method-to-ir.c: Use COMPILE_LLVM in a few more places.
155
156         * mini-llvm.c: Update comments.
157
158         * mini.h (COMPILE_LLVM): New macro.
159
160         * decompose.c (mono_decompose_opcode): Use the COMPILE_LLVM macro.
161
162         * ssa.c (mono_ssa_compute): Ditto.
163         
164         * unwind.c (mono_unwind_get_ops_from_fde): New helper function to extract
165         the unwind ops from a DWARF FDE.
166
167         * mini-llvm.c: Implement generation of unwind info for LLVM compiled
168         methods by extracting the dwarf unwind ops from the unwind info generated
169         by LLVM.
170         
171         * mini-llvm.c (mono_llvm_emit_method): Enable support for non-IMT virtual
172         calls.
173
174         * mini-amd64.c (mono_arch_get_vcall_slot): Handle more kinds of the SIB
175         addressing modes.
176
177 2009-04-02  Zoltan Varga  <vargaz@gmail.com>
178
179         * Makefile.am (llvm_sources): Enable this.
180
181         * mini.c (mini_method_compile): Add support for compiling with LLVM, 
182         failing back to the JIT if something cannot be handled.
183
184         * mini-amd64.c (mono_arch_emit_call): Emit the arguments more simple when
185         compiling with LLVM.
186
187         * decompose.c (mono_decompose_opcode): Avoid decomposing some opcodes when
188         compiling with LLVM.
189
190         * method-to-ir.c (mono_method_to_ir): Avoid decomposing SWITCH when 
191         compiling with LLVM.
192
193         * mini-ops.h: Add a few opcodes needed by LLVM.
194
195         * dwarfwriter.c (mono_dwarf_writer_emit_method): Avoid crashes if the method
196         has no unwind info.
197
198         * mini-llvm.c mini-llvm-cpp.cpp: New files containing the experimental llvm
199         backend.
200
201         * mini-arm.c (mono_arch_output_basic_block): Fix the ARM_FPU_NONE build.
202
203         * mini-arm.h mini-arm.c cpu-arm.md: Finish VFP support.
204
205 2009-04-01  Mark Probst  <mark.probst@gmail.com>
206
207         * regalloc.h, mini-codegen.c: Make vassign members gint32 to fix
208         ridiculously large methods.
209
210 2009-03-31  Martin Baulig  <martin@ximian.com>
211
212         * debug-debugger.c (debugger_remove_breakpoint): Call
213         mono_debugger_remove_class_init_callback ().
214
215 2009-03-31  Zoltan Varga  <vargaz@gmail.com>
216
217         * aot-compiler.c (mono_compile_assembly): Call img_writer_emit_start ()
218         right before emitting code, not at the start.
219
220         * mini.c (mono_postprocess_patches): Extract this into a separate function
221         from mono_codegen ().
222
223         * ssa.c (mono_ssa_compute): Set ins->klass for every PHI node, handle
224         byref types correctly.
225
226 2009-03-30  Zoltan Varga  <vargaz@gmail.com>
227
228         * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix a crash introduced
229         by the last change.
230
231 2009-03-29  Zoltan Varga  <vargaz@gmail.com>
232
233         * mini-amd64.c (mono_arch_output_basic_block): Emit a few nops before 
234         indirect calls, this avoids problems where get_vcall_slot () would get
235         confused by the native code for the instruction preceeding the call.
236         (mono_arch_get_vcall_slot): Simplify this.
237         (mono_arch_emit_imt_argument): Remove this, it is no longer needed.
238
239         * mini-ops.h: Fix the definitions of the OP_IA64 opcodes, since the local
240         register allocator now seems to depend on them instead of the data in
241         cpu-<ARCH>.md.
242
243         * mini.c (mini_method_compile): Throw the correct type of exception if
244         mono_method_get_header () fails because of a loading error.
245
246 2009-03-28  Zoltan Varga  <vargaz@gmail.com>
247
248         * mini.c (mini_method_compile): Clear the loader error if the method
249         header cannot be decoded.
250
251         * mini-trampolines.c (mono_magic_trampoline): Handle generic virtual 
252         interface methods on proxies correctly.
253
254         * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix handling of the
255         this argument for vtype methods. Add precise liveness info for arguments.
256
257         * mini-codegen.c (mono_print_ins_index): Print the vreg of the
258         LIVERANGE_START/END opcodes.
259
260         * method-to-ir.c (mono_spill_global_vars): Fix liverange calculation
261         for arguments and values in registers.
262
263 2009-03-27  Zoltan Varga  <vargaz@gmail.com>
264
265         * method-to-ir.c (mono_method_to_ir): Disable tail calls for calls which
266         return a valuetype. Fixes #487518.
267
268         * iltests.il: Add a test.
269         
270         * aot-compiler.c: Use mono_thread_create () to create helper threads.
271
272         * mini-trampolines.c (mono_delegate_trampoline): Handle static delegates
273         closed over a null reference correctly.
274
275 2009-03-26  Zoltan Varga  <vargaz@gmail.com>
276
277         * method-to-ir.c (mono_handle_global_vregs): Fix support for ternary ops.
278
279 2009-03-25  Mark Probst  <mark.probst@gmail.com>
280
281         * mini-codegen.c (mono_local_regalloc): Don't let sregs get
282         allocated to the same registers as fixed sregs.
283
284 2009-03-24  Mark Probst  <mark.probst@gmail.com>
285
286         * mini-ops.h: New ternary ATOMIC_CAS ops replace the old
287         ATOMIC_CAS_IMM ops.
288
289         * method-to-ir.c: Handle more cases for
290         Interlocked.CompareExchange.
291
292         * cpu-x86.md, mini-x86.c, mini-x86.h, cpu-amd64.md, mini-amd64.c,
293         mini-amd64.h, cpu-ppc.md, cpu-ppc64.md, mini-ppc.c, mini-ppc.h:
294         ATOMIC_CAS implementations for x86, AMD64, PPC and PPC64.
295
296 2009-03-23  Zoltan Varga  <vargaz@gmail.com>
297
298         * aot-runtime.c (decode_method_ref): Fix a warning.
299
300         * unwind.c (mono_unwind_frame): Ditto.  
301
302 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
303
304         * aot-compiler.c (arch_emit_unbox_trampoline): Fix the binary writer support.
305         (mono_compile_assembly): Enable the binary writer for full-aot as well.
306
307         * image-writer.c (do_reloc): Add support for the JUMP24 relocation,
308         fix the handling of large values in the ALU_PC_G0_NC relocation.
309
310 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
311
312         * local-propagation.c method-to-ir.c local-propagation.c: Fix warnings.
313
314 2009-03-22  Mark Probst  <mark.probst@gmail.com>
315
316         * method-to-ir.c (mono_spill_global_vars): Support for ternary
317         ops.
318
319 2009-03-22  Mark Probst  <mark.probst@gmail.com>
320
321         * method-to-ir.c: MINI_OP3 needs a comma.
322
323         * method-to-ir.c, mini.h, mini.c: Remove
324         mono_init_op_sreg_counts ().
325
326 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
327
328         * mini-arm.c (mono_arch_output_basic_block): Fix aot support in
329         OP_JMP.
330         
331         * mini-arm.c (mono_arch_build_imt_thunk): Disable the !fail_tramp
332         assertion.
333
334         * mini-ops.h: Fix arguments of the MEMINDEX opcodes.
335
336         * mini-amd64.c (mono_arch_build_imt_thunk): Simplify the fail handling
337         code somewhat.
338
339 2009-03-21  Mark Probst  <mark.probst@gmail.com>
340
341         * cfold.c, cprop.c, decompose.c, genmdesc.c, helpers.c, ir-emit.h,
342         liveness.c, local-propagation.c, method-to-ir.c, mini-codegen.c,
343         mini.c, mini.h, simd-intrinsics.c, ssa.c: Support for ternary IR
344         operations.
345
346 2009-03-20  Zoltan Varga  <vargaz@gmail.com>
347
348         * driver.c: Change location of gc_wrapper.h.
349
350         * method-to-ir.c (mono_find_block_region): Handle try clauses nested
351         inside finally clauses correctly. Fixes #485721.
352
353         * mini.c (mono_find_spvar_for_region): This needs to handle try regions
354         after the change above.
355
356         * exceptions.cs: Add a test.
357         
358 2009-03-19  Zoltan Varga  <vargaz@gmail.com>
359
360         * unwind.c (mono_unwind_ops_encode): Increase the size of the encode buffer.
361
362         * mini-amd64.c (mono_arch_emit_epilog): Remove the encoding of stack size
363         into cfg->used_int_regs, it is not needed with the dwarf unwinder.
364         (mono_arch_compute_omit_fp): Remove the emit_epilog () workaround.
365
366         * mini-amd64.c (mono_arch_compute_omit_fp): Add another check to avoid hitting
367         the stack_alloc_size < (1 << 16) assertion in emit_prolog ().
368
369 2009-03-19  Sebastien Pouliot  <sebastien@ximian.com>
370
371         * method-to-ir.c: Allow CoreCLR to throw FieldAccessException. 
372         Simplify logic for ensure_method_is_allowed_to_call_method. 
373         Handle wrappers on callers.
374
375 2009-03-19  Zoltan Varga  <vargaz@gmail.com>
376
377         * Makefile.am (fullaotcheck): Don't run the generics tests, some of
378         them don't run yet.
379
380         * basic-simd.cs: Fix the names of some test methods.
381
382 2009-03-18  Geoff Norton  <gnorton@novell.com>
383
384         * mini.c: Only chain sigfpe if it wasn't generated in mangaed code.
385
386 2009-03-18  Zoltan Varga  <vargaz@gmail.com>
387
388         * dwarfwriter.c (token_handler): Fix a crash caused by the last change.
389
390 2009-03-17  Jb Evain  <jbevain@novell.com>
391
392         * driver.c: remove now uneeded call to mono_gc_base_init before
393         mono_profiler_load.
394
395 2009-03-17  Jb Evain  <jbevain@novell.com>
396
397         * dwarfwriter.c (token_handler): handle more cases.
398
399 2009-03-17  Sebastien Pouliot  <sebastien@ximian.com> 
400
401         * method-to-ir.c: Remove more dead code (that was required only
402         because of method_is_safe). Fix compiler warnings.
403
404 2009-03-17  Sebastien Pouliot  <sebastien@ximian.com>
405
406         * method-to-ir.c: Remove unneeded/useless method_is_safe
407         http://lists.ximian.com/archives/public/mono-devel-list/2009-March/031404.html
408
409 2009-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
410
411         * mini.c (mini_method_compile): Print the method been compiled with
412         verbose level 1 instead of 3 as this helps a lot debugging JIT crashes
413         for people not familiar with the runtime.
414
415 2009-03-17  Zoltan Varga  <vargaz@gmail.com>
416
417         * mini-exceptions.c (get_generic_info_from_stack_frame): Avoid returning
418         a managed object which is later put into a GList. Return its class instead.
419
420         * mini.c (mono_allocate_stack_slots_full): Avoid sharing ref and non-ref
421         stack slots when using sgen.
422
423 2009-03-16  Zoltan Varga  <vargaz@gmail.com>
424
425         * dwarfwriter.c (emit_line_number_info): Really fix the eglib build.
426
427 2009-03-14  Zoltan Varga  <vargaz@gmail.com>
428
429         * local-propagation.c (reg_is_softreg_no_fpstack): Use >= instead of
430         > so it works on the first vreg as well.
431
432 2009-03-13  Zoltan Varga  <vargaz@gmail.com>
433
434         * dwarfwriter.c (emit_line_number_info): Disable an assert which seems to
435         trigger randomly.
436
437         * aot-compiler.c: Get rid of xdebug_lock (), use the loader lock instead.
438         
439         * dwarfwriter.c (emit_line_number_info): Fix eglib build as eglib doesn't
440         implement GArray.
441
442 2009-03-12  Zoltan Varga  <vargaz@gmail.com>
443
444         * dwarfwriter.c (emit_line_number_info): Optimize the computation of the
445         native->IL offset mapping.
446
447 2009-03-11  Zoltan Varga  <vargaz@gmail.com>
448
449         * mini-amd64.c (mono_arch_output_basic_block): Fix % 1. Fixes #484323.
450
451         * basic.cs: Add a test.
452
453 2009-03-11  Mark Probst  <mark.probst@gmail.com>
454
455         * mini-x86.c (mono_arch_output_basic_block): Use different
456         registers in case the ones we want to overwrite are used by the
457         other operand.  Fixes regression in #480807.
458
459 2009-03-10  Zoltan Varga  <vargaz@gmail.com>
460
461         * aot-compiler.c (mono_compile_assembly): Make the output less verbose.
462
463         * dwarfwriter.c (emit_line_number_info): The line number info for
464         IL code was off by one. Fix that.
465
466         * mini-s390x.c: Fix support for vtypes whose addresses are passed on the
467         stack.
468
469 2009-03-09  Mark Probst  <mark.probst@gmail.com>
470
471         Contributed under the terms of the MIT/X11 license by Steven
472         Munroe <munroesj@us.ibm.com>.
473
474         * mini-ppc.c: Correct handling of OP_LOADI4_MEMINDEX for ppc64.
475         Fixes #483462.
476
477 2009-03-08  Zoltan Varga  <vargaz@gmail.com>
478
479         * dwarfwriter.c (token_handler): Decode method references in non-wrappers
480         as well.
481
482 2009-03-06  Zoltan Varga  <vargaz@gmail.com>
483
484         * method-to-ir.c (mono_method_to_ir): Check for type load exceptions in
485         the delegate ctor handling code. Fixes #482638.
486         
487         * method-to-ir.c (mini_emit_memset): Fix the handling of size '3'. Fixes
488         #481458.
489
490         * iltests.il.in: Add a test.
491         
492         * mini-darwin.c (mono_chain_signal): Remove this, it is already in
493         mini-posix.c.
494
495 2009-03-05  Mark Probst  <mark.probst@gmail.com>
496
497         * mini-trampolines.c (mono_create_jump_trampoline): If the method
498         is shared generic code, return the trampoline, even if the method
499         has already been compiled.  Fixes #479763.
500
501         * mini.c, mini.h: New function
502         mono_jit_find_compiled_method_with_jit_info() which is the same as
503         mono_jit_find_compiled_method() but also returns the jit info.
504
505 2009-03-05  Mark Probst  <mark.probst@gmail.com>
506
507         * method-to-ir.c (mono_method_to_ir): Only force the vtable var
508         for methods which actually have one.  For all other methods, make
509         sure the this argument var is live the whole method.
510
511         * mini.c (mini_method_compile): Every shared method has a
512         this/vtable/mrgctx info.  Fixes #480807.
513
514 2009-03-05  Mark Probst  <mark.probst@gmail.com>
515
516         * mini-ppc.c (mono_arch_build_imt_thunk): Add support for mixed
517         generic/imt thunks where some entries branch through the vtable,
518         while other entries branch directly.
519
520 2009-03-05  Zoltan Varga  <vargaz@gmail.com>
521
522         * mini-darwin.c (mono_chain_signal): Define this to fix the build.
523
524         * mini-windows.c: Ditto.
525         
526         * mini.c (mono_jit_runtime_invoke): Speed up the invoking of parameterless
527         ctors.
528
529 2009-03-04  Zoltan Varga  <vargaz@gmail.com>
530
531         * dwarfwriter.c (emit_line_number_info): Add some debug code to help track
532         down an assert.
533
534 2009-03-04  Mark Probst  <mark.probst@gmail.com>
535
536         * method-to-ir.c: Don't inline methods that use JMP.  Fixes
537         #481403.
538
539 2009-03-04  Mark Probst  <mark.probst@gmail.com>
540
541         * exceptions-x86.c: Include debug-mini.h - fixes build.
542
543 2009-03-04  Martin Baulig  <martin@ximian.com>
544
545         * debug-mini.c: Clean up the exception API and add documentation.
546         (mono_debugger_handle_exception): New public method; this is
547         called when throwing an exception or encountering an unhandled one.
548         (mono_debugger_call_exception_handler): Formerly known as
549         mono_debugger_handle_exception(); this is used to tell the
550         debugger that we're about to invoke an exception handler.
551
552 2009-03-04  Martin Baulig  <martin@ximian.com>
553
554         * debug-mini.c (mono_debugger_runtime_invoke): Moved here from
555         ../metadata/mono-debug-debugger.c; save and reset exception state.
556
557 2009-03-02  Martin Baulig  <martin@ximian.com>
558
559         * debug-mini.c: Moved the debugger exception handling here from
560         ../metadata/mono-debug-debugger.c.
561
562         * debug-mini.h
563         (MonoDebuggerExceptionAction): New exception typedef.
564
565         * debug-mini.c
566         (MonoDebuggerThreadInfo): Added `MonoObject *last_exception'.
567
568         * exceptions-amd64.c
569         (mono_amd64_throw_exception): Use the new debugger exception
570         handling code.
571
572         * mini-exceptions.c
573         (mono_handle_exception_internal): Don't call
574         mono_debugger_unhandled_exception() here.
575
576 2009-03-03  Zoltan Varga  <vargaz@gmail.com>
577
578         * mini.c aot-compiler.c: Update after the changes to 
579         mono_marshal_get_runtime_invoke ().
580
581         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): 
582         Virtual generic methods might not have method->slot set, work around
583         that.
584
585         * generics.cs: Add a test.
586
587 2009-03-02  Geoff Norton  <gnorton@novell.com>
588
589         * mini.c:
590         * driver.c: Allow signal chaining of SIGFPE as well.
591
592 2009-03-02  Zoltan Varga  <vargaz@gmail.com>
593
594         * mini-trampolines.c (mono_generic_virtual_remoting_trampoline): Update
595         this since it now receives the method not its generic context in the
596         IMT reg.
597
598         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for mixed
599         generic/imt thunks where some entries branch through the vtable, while
600         other entries branch directly.
601
602         * mini-x86.c (mono_arch_build_imt_thunk): Ditto.
603
604         * method-to-ir.c (mono_method_to_ir): Enable fast virtual generic call 
605         support for interface methods as well.
606
607         * mini-trampolines.c: Add support for virtual generic methods in interfaces
608         using the normal IMT thunks.
609
610         generics.cs: Add new tests.
611         
612         * method-to-ir.c (mono_method_to_ir): Pass the method instead of
613         the generic inst to the generic imt thunks. This fixes AOT support, 
614         improves consistency with the normal IMT thunks, and makes it easier to
615         add support for interface generic virtual methods later.
616
617         * mini-trampolines.c (mono_magic_trampoline): Ditto.    
618         
619 2009-02-28  Zoltan Varga  <vargaz@gmail.com>
620
621         * driver.c (mono_set_signal_chaining): New public API function to enable
622         signal chaining on POSIX platforms.
623
624         * mini-posix.c mini.c: Applied a variant of a patch by Simon Rowland 
625         (si@lindenlab.com) to implement signal chaining. The original patch was
626         contributed under the MIT X/11 license:
627         https://bugzilla.novell.com/show_bug.cgi?id=318894
628
629 2009-02-27  Zoltan Varga  <vargaz@gmail.com>
630
631         * iltests.il.in (test_0_implicit_float_to_double_conversion): Disable this
632         too until it can be made to run on amd64.
633
634 2009-02-26  Zoltan Varga  <vargaz@gmail.com>
635
636         * mini-x86.c (mono_arch_get_this_arg_from_call): Avoid expensive calls
637         to  get_generic_context_from_code () + get_call_info () if possible.
638
639 2009-02-25  Zoltan Varga  <vargaz@gmail.com>
640
641         * mini-exceptions.c (mono_handle_native_sigsegv): Implement the
642         suspend-on-sigsegv functionality.
643
644         * mini.c (mini_parse_debug_options): Add a new 'suspend-on-sigsegv' option
645         to suspend when a native SIGSEGV is received. This is useful for debugging
646         crashes which don't happen under gdb, since a live process contains more
647         information than a core file.
648
649         * mini-exceptions.c (mono_print_thread_dump): Use 
650         MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX instead of platform defines.
651
652         * mini-x86.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): New define.
653
654         * mini-amd64.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): Ditto.
655         
656         * basic-float.cs: Disable the tests which currently fail on amd64.
657
658         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass a non-null 
659         value to mono_arch_patch_callsite () to fix crashes.
660         
661         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix a warning.
662
663 2009-02-23  Zoltan Varga  <vargaz@gmail.com>
664
665         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Replace the
666         nop code by patching the call address to point to the nullified class init
667         trampoline, as the former does not seem to be safe on SMP machines.
668
669 2009-02-23  Mark Probst  <mark.probst@gmail.com>
670
671         * mini-ops.h: Fix the argument types for a few x86 opcodes where
672         they were wrong.
673
674 2009-02-23  Zoltan Varga  <vargaz@gmail.com>
675
676         * basic-float.cs basic-calls.cs: Fix warnings.
677
678 2009-02-22  Mark Probst  <mark.probst@gmail.com>
679
680         * tramp-ppc.c (mono_arch_create_trampoline_code): Store the
681         correct frame pointer in the LMF.  Should fix #478394.
682
683 2009-02-22  Zoltan Varga  <vargaz@gmail.com>
684
685         * Makefile.am (fullaotcheck): Copy Mono.Simd.dll as well.
686
687         * image-writer.c: Make the binary writer less verbose.
688
689 2009-02-21  Zoltan Varga  <vargaz@gmail.com>
690
691         * method-to-ir.c (mono_method_to_ir): Don't assert if string ctors
692         are called from runtime invoke wrappers.
693
694 2009-02-20  Zoltan Varga  <vargaz@gmail.com>
695
696         * cpu-ppc.md (store_memindex): Increase the size of this.
697
698 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
699
700         Extracted from a patch by Kornél Pál <kornelpal@gmail.com>.
701
702         * cpu-x86.md: Fix the sizes for long_conv_to_r_un and long_conv_to_r_un_2.
703
704         * mini-x86.c (mono_arch_output_basic_block): Use only 64bits of precision for
705         OP_LCONV_TO_R_UN.
706
707         Last fix for of #467201.
708
709
710 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
711
712         Extracted from a patch by Kornél Pál <kornelpal@gmail.com>.
713
714         * cpu-x86.md: Fix the sizes for fcall(_reg,_membase), long_conv_to_r4_2
715         and long_conv_to_r8_2:
716
717         Fixed part of #467201.
718
719 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
720
721         Extracted from a patch by Kornél Pál <kornelpal@gmail.com>.
722
723         * mini-x86.c (mono_arch_output_basic_block): Adjust precision of int to float
724         conversion to 32 bits.
725
726         * cpu-x86.md: Increase the size of int_conv_to_r4.
727
728         * basic-float.cs: Add a test for this.
729
730         Fixed part of #467201.
731
732 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
733
734         Extracted from a patch by Kornél Pál <kornelpal@gmail.com>.
735
736         * mini-x86.c (mono_arch_output_basic_block): Adjust precision of long to double
737         conversion to 64 bits.
738
739         * basic-float.cs: Add a test for this.
740
741         Fixed part of #467201.
742
743 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
744
745         Extracted from a patch by Kornél Pál <kornelpal@gmail.com>.
746
747         * mini-x86.c (emit_move_return_value): Don't reduce precision of functions returning float.
748         This behavior is compatible with MS.
749
750         * iltest.il.in: Add a test for this.
751
752         Fixed part of #467201.
753
754 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
755
756         Extracted from a patch by Kornél Pál <kornelpal@gmail.com>.
757
758         * mini-x86.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_R4, it must
759         change the precision of the value.
760
761         * cpu-x86.md: Define len for float_conv_to_r4.
762
763         * basic-float.cs: Add a test for this.
764
765         Fixed part of #467201.
766
767 2009-02-19 Rodrigo Kumpera  <rkumpera@novell.com>
768
769         * mini.c: Adjust locking order to the new semantics where the loader lock
770         comes first.
771
772 2009-02-18  Rodrigo Kumpera  <rkumpera@novell.com>
773
774         * aot-runtime.c:
775         * mini-amd64.c:
776         * mini-arm.c:
777         * mini-ia64.c:
778         * mini-mips.c:
779         * mini-ppc.c:
780         * mini-sparc.c:
781         * mini-trampolines.c:
782         * mini-x86.c:
783         * mini.c:
784         * tramp-alpha.c:
785         * tramp-amd64.c:
786         * tramp-arm.c:
787         * tramp-hppa.c:
788         * tramp-ia64.c:
789         * tramp-mips.c:
790         * tramp-ppc.c:
791         * tramp-s390.c:
792         * tramp-s390x.c:
793         * tramp-sparc.c:
794         * tramp-x86.c: Use mono_domain_code_* functions instead of using MonoDomain::code_mp directly.
795
796 2009-02-18  Zoltan Varga  <vargaz@gmail.com>
797
798         * mini-codegen.c (mono_local_regalloc): Remove a ! from if (!dest_sreg1)
799         as it is incorrect.
800
801 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
802
803         * aot-compiler.c (add_generic_class): Only add rgctx invoke wrappers
804         for cctors if needed.
805
806 2009-02-17  Mark Probst  <mark.probst@gmail.com>
807
808         * mini-ppc.c: Fix build on Darwin.
809
810 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
811
812         * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Use 2 as the DWARF
813         version instead of 3 as valgrind doesn't like version 3.
814
815         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
816
817         * aot-compiler.c (mono_aot_method_hash): New function to return a hash
818         usable for hashing methods.
819         (emit_extra_methods): Use the new hash to avoid putting every method in the
820         same hash bucket.
821
822         * aot-runtime.c (find_extra_method_in_amodule): Use the new hash.
823
824         * aot-runtime.c (can_method_ref_match_method): New function to quickly check
825         whenever a method ref could match a method.
826         
827         * aot-runtime.c (load_image): Revert the previous change, it causes an AOT
828         test to fail.
829         
830         * aot-runtime.c (find_extra_method_in_amodule): Add a cache for decoded 
831         methods refs.
832
833         * aot-runtime.c (load_image): Pass our basedir to mono_assembly_load.
834
835         * aot-compiler.c (emit_exception_debug_info): Bump the maximum size of
836         the encoding buffer.
837
838         * method-to-ir.c (mono_method_check_inlining): Avoid calling 
839         mono_method_get_header () on inflated methods as an optimization.
840
841 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
842
843         * ssa.c (fold_ins): Fix another crash if the instruction following the
844         switch was optimized away.
845
846 2009-02-16  Mark Probst  <mark.probst@gmail.com>
847
848         Contributed under the terms of the MIT/X11 license by Steven
849         Munroe <munroesj@us.ibm.com>.
850
851         * mini-ppc.c, mini-ppc.h: Implement TLS for PPC64.
852
853 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
854
855         * mini.c method-to-ir.c mini-trampolines.c aot-runtime.c: Remove locking
856         around the mono_domain_alloc calls, it is now done by the functions
857         themselves.
858
859         * aot-compiler.c (compile_method): Only add wrappers referenced by
860         the method if compiling with full AOT.
861         (mono_compile_assembly): Error out if --aot=full is specified on
862         a platform where it is not supported.
863
864         * aot-compiler.c (emit_trampolines): Emit generic class init trampolines
865         on ARM too.
866
867         * tramp-arm.c (mono_arch_create_generic_class_init_trampoline_full): Add
868         AOT support.
869
870         * aot-runtime.c (load_named_code): Handle 
871         mono_arm_throw_exception_by_token.
872
873         * mini-arm.h: Add declaration of mono_arm_throw_exception_by_token.
874
875         * image-writer.c (asm_writer_emit_pointer_unaligned): Make this really
876         unaligned.
877
878         * Makefile.am (fullaotcheck): Exit if a test fails.
879
880         * aot-compiler.c (mono_compile_assembly): Use the ASM writer for full aot
881         on ARM.
882         (mono_compile_assembly): Handle the assembler failing.
883
884         * image-writer.c (asm_writer_emit_section_change): Handle ARM gas not
885         accepting subsections of .bss.
886
887         * ssa.c (visit_inst): Fix a crash if the instruction following a switch
888         was optimized away.
889
890         * aot-compiler.c: Remove some unused includes.
891         
892         * aot-compiler.c (MonoAotCompile): Remove some unused fields which are
893         now in MonoImageWriter.
894
895         * mini-x86.c (mono_arch_get_vcall_slot): Handle yet another
896         code sequence which matches a non-virtual call. Fixes #472654.
897
898 2009-02-15  Zoltan Varga  <vargaz@gmail.com>
899
900         * aot-compiler.c: Use xdebug_lock ()/unlock () macros for locking in the
901         xdebug code.
902         
903         * aot-compiler.c: Make the xdebug code not depend on the AOT compiler,
904         use the image/dwarf writers directly.
905
906         * image-writer.c (struct _MonoImageWriter): Remove the unused 'image'
907         field.
908
909         * aot-compiler.c (MonoAotCompile): Remove fields which are now in
910         MonoDwarfWriter.
911
912         * image-writer.h: Fix some typos.
913
914         * dwarfwriter.h dwarfwriter.c: New files.
915         
916         * aot-compiler.c: Extract the DWARF info writing functionality into a 
917         separate module.
918
919         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add a 'out_unwind_ops'
920         argument to return unwind info.
921
922         * tramp-arm.c (mono_arch_create_trampoline_code_full): Ditto.
923
924         * aot-compiler.c: Emit unwind info for trampolines in full-aot mode.
925         
926         * aot-runtime.c (decode_method_ref): Add a case for 
927         MONO_AOT_METHODREF_WRAPPER_NAME.
928
929         * mini.h: Add constants for the magic numbers used in encode_method_ref ()
930         for AOT.
931
932         * aot-compiler.c (encode_method_ref): Use the new constants.
933
934         * aot-runtime.c (decode_method_ref): Ditto.
935
936         * aot-compiler.c (compile_method): For generic icalls, queue the wrapper to
937         be compiled, not the icall itself.
938
939 2009-02-14  Zoltan Varga  <vargaz@gmail.com>
940
941         * aot-runtime.c (find_extra_method_in_amodule): Avoid decoding wrapper names
942         using decode_method_ref ().
943
944         * method-to-ir.c (mini_emit_ldelema_1_ins): If the array index is a long,
945         convert it to an in32. Fixes #475859.
946
947         * arrays.cs: Add a test.
948
949 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
950
951         * mini-s390x.c (mono_arch_output_basic_block): Fix the shift amounts in 
952         OP_LCONV_TO_U2.
953
954         * basic-long.cs: Add a test.
955
956 2009-02-12  Mark Probst  <mark.probst@gmail.com>
957
958         * mini-x86.c, mini-x86.h: Very simple frame pointer removal.  We
959         remove the frame pointer in leaf methods which don't receive any
960         arguments, don't throw exceptions and don't do dynamic stack
961         allocations.
962
963 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
964
965         * mini-amd64.c (mono_arch_build_imt_thunk): Fix size calculation after
966         the fail_tramp changes. Hopefully fixes #475132.
967
968 2009-02-12  Rodrigo Kumpera  <rkumpera@novell.com>
969
970         * method-to-ir.c (mono_emit_method_call_full): Use mono_metadata_signature_dup_mempool
971         instead of mono_metadata_signature_dup_full.
972
973 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
974
975         * ssa.c (fold_ins): Use MONO_IS_JUMP_TABLE () and MONO_JUMP_TABLE_FROM_INS ()
976         for processing jump tables. Fixes #473787.
977
978 2009-02-11  Mark Probst  <mark.probst@gmail.com>
979
980         * mini-generic-sharing.c: mini_method_get_context() just calls
981         mono_method_get_context_general() now.
982
983         * mini.c, mini.h: Moved get_object_generic_inst(),
984         construct_object_context_for_method() and
985         mono_domain_lookup_shared_generic() to metadata/generic-sharing.c.
986
987 2009-02-11  Zoltan Varga  <vargaz@gmail.com>
988
989         * branch-opts.c (mono_if_conversion): Handle the case where the merged 
990         basic block fell through to its successor bblock without a branch. Fixes
991         #474718.
992
993         * iltests.il.in: Add a test.
994         
995         * aot-compiler.c (encode_method_ref): Encode methods of array types.
996         (can_encode_patch): We can now handle arrays of generic parameters and
997         array methods.
998
999         * aot-runtime.c (decode_method_ref_2): Handle methods of array types.
1000
1001         * aot-compiler.c aot-runtime.c: Emit the size of specific trampolines into
1002         the AOT file to avoid some #ifdefs in aot-runtime.c
1003
1004         * mini.h: Bump AOT file format version.
1005
1006 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
1007
1008         * Makefile.am (fullaotcheck): Make this run the tests.
1009
1010         * aot-compiler.c: Make the printing of skipped methods runtime configurable.
1011
1012 2009-02-10  Mark Probst  <mark.probst@gmail.com>
1013
1014         * mini-x86.c (mono_arch_context_get_int_reg): Handle all registers
1015         individually.  Fixes #473482.
1016
1017 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
1018
1019         * mini-arm.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
1020
1021 2009-02-09  Jeffrey Stedfast  <fejj@novell.com>
1022
1023         * aot-compiler.c (arch_emit_plt_entry): Fixed to compile.
1024         (mono_compile_assembly): Hush compile warnings about
1025         uninitialized [tmp_]outfile_name variables in the !use_bin_writer
1026         code path.
1027
1028 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
1029
1030         * exceptions-arm.c (mono_arch_find_jit_info): Fix aot support.
1031
1032         * mini-arm.c: Checkin unwind related changes missing from an earlier commit.
1033
1034         * aot-compiler.c: Fix arm support.
1035
1036         * image-writer.c: Move the R_ARM constants to image-writer.h. Export a
1037         img_writer_emit_unset_mode () function.
1038
1039         * unwind.c (mono_unwind_get_dwarf_data_align): New helper function.
1040         (mono_unwind_get_dwarf_pc_reg): Ditto.
1041
1042         * aot-compiler.c (emit_dwarf_abbrev): Another large reorganization.
1043         Move almost all platform specific code to a set of arch_ functions, 
1044         and document them to ease porting.
1045         
1046         * aot-compiler.c (mono_xdebug_init): Fix xdebug support.
1047
1048         * image-writer.h image-writer.c: New files, extracted from aot-compiler.c.
1049
1050         * aot-compiler.c: Extract the image writing functionality into a separate
1051         module to reduce the size of this file.
1052
1053 2009-02-09  Geoff Norton  <gnorton@novell.com>
1054
1055         * mini-s390.c: Fix the signature of emit_sig_cookie.
1056
1057 2009-02-09  Zoltan Varga  <vargaz@gmail.com>
1058
1059         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_IMAGE.
1060
1061         * aot-runtime.c (is_shared_got_patch): Ditto.
1062
1063         * aot-runtime.c (load_named_code): Cope with the fact that 
1064         decode_got_entry () won't decode the patch fully if its corresponding got
1065         entry is already filled.
1066         
1067         * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): 
1068         Initialize *ji.
1069         (mono_arch_create_monitor_exit_trampoline_full): Ditto.
1070
1071         * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): Use 'code'
1072         as the moving pointer instead of 'buf' for consistency with the rest of the
1073         codebase.
1074         (mono_arch_create_monitor_exit_trampoline): Ditto.
1075
1076         * aot-compiler.c (emit_trampolines): Add throw_pending_exception/
1077         generic_class_init trampolines.
1078         (add_generic_class): Extract some code from add_generic_instances () into a
1079         separate function so it can be called from other places too.
1080         (compile_method): Call add_generic_class () for the classes of inflated methods
1081         referenced by the method.
1082         (can_encode_patch): Allow references to generic parameters.
1083
1084         * aot-runtime.c: Add support the patches required by the new trampolines.
1085         
1086         * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Add full-aot
1087         support.
1088
1089         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline_full): Add
1090         full-aot support.
1091
1092         * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Rename
1093         this from get_throw_pending_exception, make the signature full aot compatible.
1094
1095         * Makefile.am (fullaotcheck): New target to run full-aot tests.
1096
1097         * method-to-ir.c (inline_method): Save/Restore cfg->ret_var_set too.
1098
1099         * exceptions.cs: Add a test.
1100
1101 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
1102
1103         * unwind.c (mono_unwind_frame): Eliminate the data_align_factor argument,
1104         use the DWARF_DATA_ALIGN constant instead.
1105
1106         * exception-<ARCH>.c: Update after the above change.
1107
1108         * exceptions-arm.c (mono_arch_find_jit_info): Transition this to use the
1109         dwarf unwinder.
1110
1111         * mini-arm.c: Enable the dwarf unwinder.
1112
1113         * mini-trampolines.c (mono_magic_trampoline): Use mono_class_get_vtable_entry ()
1114         instead of mono_class_setup_vtable ().
1115
1116 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
1117
1118         * exceptions-x86.c (mono_arch_find_jit_info): Transition this to use the
1119         dwarf unwinder.
1120
1121         * mini-x86.h: Enable the dwarf unwinder.
1122
1123 2009-02-06  Raja R Harinath  <harinath@hurrynot.org>
1124
1125         Fix mcs/tests/test-7.cs
1126         * mini-amd64.c (mono_arch_allocate_vars): Revert change from
1127         2009-02-03.
1128
1129 2009-02-06  Zoltan Varga  <vargaz@gmail.com>
1130
1131         * mini.c (print_jit_stats): Remove some unused statistics.
1132
1133 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
1134
1135         * aot-compiler.c (emit_klass_info): Update after MonoClass changes.
1136
1137 2009-02-05  Mark Probst  <mark.probst@gmail.com>
1138
1139         * jit-icalls.c (mono_helper_compile_generic_method): Don't inflate
1140         the method we get from mono_object_get_virtual_method() because
1141         that function does it properly, now.
1142
1143 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
1144
1145         * unwind.c (mono_unwind_ops_encode): Handle offsets greater than 32 between
1146         opcodes. Fixes #472775.
1147
1148 2009-02-05  Mark Probst  <mark.probst@gmail.com>
1149
1150         * mini-exceptions.c (ves_icall_get_frame_info): Account for the
1151         fact that mono_find_jit_info() sometimes returns the context
1152         corresponding to the jit info in new_ctx.  Fixes #472600.
1153
1154 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
1155
1156         * method-to-ir.c mini-hppa.c mini.c trace.c mini-s390x.c aot-compiler.c
1157         mini-s390.c: Use mono_class_enum_basetype () instead of accessing
1158         klass->enum_basetype directly.
1159
1160         * aot-compiler.c (emit_class_dwarf_info): Add support for all possible
1161         enum subtypes.
1162
1163         * unwind.c: Avoid 0 sized arrays.
1164
1165 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
1166
1167         * mini-exceptions.c (mono_setup_altstack): Use a more reasonable altstack
1168         size on systems with 64k pages. Fixes #471389.
1169
1170 2009-02-04  Mark Probst  <mark.probst@gmail.com>
1171
1172         Contributed under the terms of the MIT/X11 license by Steven
1173         Munroe <munroesj@us.ibm.com>.
1174
1175         * mini-ppc.c (mono_arch_output_basic_block): Generate better code
1176         for LOADI4_MEMBASE.  Use addi instead of addic if it's not
1177         necessary.
1178
1179 2009-02-04  Mark Probst  <mark.probst@gmail.com>
1180
1181         Contributed under the terms of the MIT/X11 license by Steven
1182         Munroe <munroesj@us.ibm.com>.
1183
1184         * exceptions-ppc.c (mono_arch_get_restore_context): Code size
1185         comparison fix.
1186
1187         * tramp-ppc.c (mono_arch_create_generic_class_init_trampoline):
1188         The trampoline can be longer on PPC64.
1189
1190 2009-02-04  Mark Probst  <mark.probst@gmail.com>
1191
1192         Contributed under the terms of the MIT/X11 license by Steven
1193         Munroe <munroesj@us.ibm.com>.
1194
1195         * mini-ppc.c: Compiler warning fixes and trivial code
1196         simplifications.
1197
1198 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
1199
1200         * method-to-ir.c (mono_spill_global_vars): Fix problems caused by reading
1201         ins->dreg which could be a hardware register, not a vreg.
1202
1203         * aot-compiler.c (emit_method_dwarf_info): Ditto.
1204         
1205         * mini.h (MonoCompile): Remove vreg_to_var_num array, it is no longer used.
1206         (struct MonoMethodVar): Add a vreg field, holding the vreg of variable.
1207
1208         * mini.c (mono_compile_create_var_for_vreg): Set var->vreg.
1209         
1210         * mini-amd64.c (mono_arch_output_basic_block): Avoid reading cfg->varinfo[..]
1211         ->dreg, that is not the vreg we are looking for.
1212
1213         * mini-amd64.h mini-x86.h: Enable MONO_ARCH_LIVENESS_OPS again.
1214
1215         * mini-x86.c (mono_arch_output_basic_block): Add support for LIVERANGE_START/
1216         LIVERANGE_END.
1217
1218         * method-to-ir.c (mono_spill_global_vars): Add an assert to help track down
1219         strange crashes.
1220
1221 2009-02-03  Zoltan Varga  <vargaz@gmail.com>
1222
1223         * mini-x86.c (mono_arch_emit_prolog): Emit unwind info.
1224
1225         * aot-compiler.c (emit_line_number_info): Fix line number emission when
1226         the line diff is 0.
1227
1228         * aot-compiler.c: Add xdebug support on x86.
1229
1230         * unwind.c: Add x86 support.
1231         
1232         * aot-compiler.c (emit_exception_debug_info): Control the emission of
1233         unwind info using a new MONO_ARCH_HAVE_XP_UNWIND define.
1234
1235         * mini.c (mini_method_compile): Ditto.
1236         
1237         * mini-amd64.c (mono_arch_allocate_vars): Avoid setting cfg->ret->dreg to
1238         the variable index.
1239
1240         * aot-compiler.c: Add emit_push_section ()/emit_pop_section () helper functions
1241         which mimic .push_section/.pop_section in GAS.
1242         
1243         * aot-compiler.c: Emit precise live range information for variables.
1244
1245         * mini-amd64.c (mono_arch_output_basic_block): Add OP_LIVERANGE_START/END.
1246
1247         * method-to-ir.c (mono_spill_global_vars): Compute the instructions marking
1248         the live ranges of variables, and emit OP_LIVERANGE_START/END opcodes for
1249         them.
1250
1251         * mini-ops.h: Add OP_LIVERANGE_START/END opcodes to mark
1252         the live ranges of variables.
1253
1254         * mini.h (struct MonoMethodVar): Add two fields containing the live range
1255         of the variable in terms of native offsets.
1256
1257 2009-02-03  Rodrigo Kumpera  <rkumpera@novell.com>
1258
1259         * arrays.cs: Test for Get/SetValue of array with negate lower bounds.
1260         
1261 2009-02-02  Mark Probst  <mark.probst@gmail.com>
1262
1263         Contributed under the terms of the MIT/X11 license by Steven
1264         Munroe <munroesj@us.ibm.com>.
1265
1266         * exceptions-ppc.c (restore_regs_from_context): Correct operand
1267         order (offset then base reg) for ppc_load_multiple_regs.
1268         (emit_save_saved_regs) Correct operand order for
1269         ppc_store_multiple_regs.
1270         (mono_arch_get_call_filter): Correct operand order for
1271         ppc_load_multiple_regs.
1272
1273         * mini-ppc.c (emit_memcpy): Fix operand order for
1274         ppc_load_reg_update and ppc_store_reg_update.
1275         (mono_arch_output_basic_block): Correct operand order for ppc_lha.
1276         (mono_arch_emit_epilog): Correct operand order for
1277         ppc_load_multiple_regs.
1278
1279         * tramp-ppc.c (mono_arch_create_trampoline_code): Correct operand
1280         order for ppc_store_multiple_regs and ppc_load_multiple_regs.
1281
1282 2009-02-02  Mark Probst  <mark.probst@gmail.com>
1283
1284         * cpu-ppc64.md: Fixed storer4_memindex length.
1285
1286 2009-02-02  Zoltan Varga  <vargaz@gmail.com>
1287
1288         * aot-compiler.c (emit_line_number_info): Optimize the size of the emitted
1289         line number info.
1290         
1291         * aot-compiler.c (emit_line_number_info): Optimize this.
1292
1293 2009-02-01  Zoltan Varga  <vargaz@gmail.com>
1294
1295         * aot-compiler.c: Disassemble tokens in the IL disassembly.
1296         
1297         * aot-compiler.c: Add debug info for methods without debug info by
1298         emitting an IL file and having the line number info referencing that file.
1299
1300         * aot-compiler.c: Optimize the size of the generated line number info.
1301
1302         * aot-compiler.c: Emit line number info in xdebug mode.
1303
1304         * aot-compiler.c (mono_save_xdebug_info): Receive a MonoCompile instead of a
1305         million arguments.
1306
1307 2009-01-31  Zoltan Varga  <vargaz@gmail.com>
1308
1309         * aot-compiler.c (emit_method_dwarf_info): Emit names for local variables.
1310
1311         * driver.c (mono_main): Enable debugging support automatically if XDEBUG
1312         is used.
1313
1314 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
1315
1316         * basic-calls.cs: Test for the weird crash found on arm.
1317         
1318 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
1319
1320         * cpu-arm.md: Increase the size of storer8_membase_reg and
1321         loadr8_membase_reg to 24 bytes to accomodate the extra add.
1322
1323         * mini-arm.c (mono_arch_output_basic_block): Under FPA, when emitting
1324         OP_STORER8_MEMBASE_REG and OP_LOADR8_MEMBASE_REG, add the original
1325         reg to LR otherwise we'll be loading/storing from just the offset.
1326
1327 2009-01-30  Miguel de Icaza  <miguel@novell.com>
1328
1329         Question: if we are storing gint32's inside the "*native_offset",
1330         should we change the signature to "gint32 *native_offset" to
1331         ensure that we do not have type definition problems?
1332         
1333         * mini-exceptions.c (ves_icall_get_frame_info): Cast the gint32 to
1334         an int * as this is what the other function expects, causes
1335         problems with Freescale's compiler that defined int32_t to be a
1336         long and makes int incompatible 
1337
1338 2009-01-30  Miguel de Icaza  <miguel@novell.com>
1339
1340         * Rename generic-sharing.c to mini-generic-sharing.c to avoid the
1341         filename conflict with bjam.
1342
1343 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
1344
1345         * cpu-arm.md: Increase the size of storer8_membase_reg to 20 bytes
1346         as it might use decomposed ops.
1347
1348 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
1349
1350         * jit-icalls.c (mono_imul_ovf): Fix one of the literals.
1351
1352         * mini.c (mini_init): Emulate mul.ovf opcodes if MONO_ARCH_EMULATE_MUL_OVF
1353         is defined.
1354
1355         * mini-arm.h (MONO_ARCH_EMULATE_MUL_OVF): New define.
1356
1357         * mini-arm.c (mono_arch_build_imt_thunk): Rewrite this to allow large vtable
1358         offsets.
1359
1360         * mini-arm.c (mono_arch_context_get_int_reg): Adapt this to the "clever"
1361         way registers are stored in MonoContext on arm.
1362
1363         * unwind.c: Rewrite the handling of the cached_info array to use hazard pointers
1364         instead of locking so mono_get_cached_unwind_info () becomes signal safe.
1365
1366         * mini.c (mini_init): Emuate OP_FCONV_TO_I when using soft float.
1367
1368         * mini-arm.c (emit_load_volatile_arguments): Avoid an unneccesary assert.
1369
1370         * mini.c (mini_init): Register mono_isfinite.
1371
1372         * jit-icalls.c (mono_isfinite): New jit icall.
1373
1374         * method-to-ir.c (mono_decompose_soft_float): Add support for OP_CKFINITE.
1375         
1376         * exceptions-arm.c (mono_arch_find_jit_info): When unwinding using the LMF,
1377         set esp to ARMREG_FP instead of R12, since R12 stores the value of sp for
1378         the parent frame.
1379
1380 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
1381
1382         * exceptions-arm.c (mono_arch_find_jit_info): The frame layout on arm have
1383         separate frame and stack pointers, so we must use FP to find the register
1384         spill area.
1385         The FP reg is retrieved from the MonoContext::regs array.
1386
1387 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
1388
1389         * mini-arm.c (mono_arch_output_basic_block): Emit two cond ops for OP_FBGE
1390         as FPA requires it.
1391
1392 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
1393
1394         * mini-arm.c (mono_arch_emit_setret): Emit OP_FMOVE for methods that
1395         return R4 and R8 when not running under softfloat.
1396
1397         Fixes basic-calls.exe
1398
1399 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
1400
1401         * mini-arm.c: Implement some overflow opcodes.
1402
1403 2009-01-29  Miguel de Icaza  <miguel@novell.com>
1404
1405         * ssa.c: handle another alloca.h
1406
1407         * mini-exceptions.c (mono_handle_native_sigsegv): Do not use
1408         PLATFORM_WIN32 for detecting if we have sigaction.   Instead use
1409         MONO_ARCH_USE_SIGACTION. 
1410
1411         * aot-runtime.c, mini-exceptions.c: Replace platform define with
1412         capability defines.
1413
1414         * method-to-ir.c (mono_method_to_ir): Type cast fix on some platforms.
1415
1416         * mini-ppc.h (MONO_ARCH_USE_SIGACTION): Do not define this for all
1417         PPC targets as sigaction does not exist on all platforms, define
1418         this on a per-platform basis.
1419
1420         Instead of erroring out if the platform is not defined, include
1421         mini-ppc-os.h, and expect that the OS specific setting provides
1422         the required information.   
1423
1424 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
1425
1426         * aot-compiler.c: Fix --enable-minimal=aot.
1427
1428 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
1429
1430         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Fix the
1431         previous change.
1432
1433 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
1434
1435         * exceptions-arm.c: Fix warnings.
1436
1437         * tramp-arm.c aot-compiler.c unwind.h unwind.c: Implement xdebug support for
1438         ARM.
1439
1440         * mini-x86.c: Fix --enable-minimal=jit build.
1441
1442         * mini.c: Really fix --enable-minimal=jit build.
1443         
1444         * mini.c (construct_object_context_for_method): Move this outside
1445         the DISABLE_JIT block to fix the --enable-minimal=jit build.
1446
1447         "Backported" of r124984 from 2.0 branch.
1448         
1449         * aot-compiler.c aot-runtime.c: Add full-aot support delegate BeginInvoke/EndInvoke.
1450
1451         "Backport" of r124977 + r124978 from 2.0 branch.
1452         
1453         * exceptions-arm.c (mono_arm_throw_exception_by_token): New helper function
1454         to avoid calling mono_exception_from_token () from the throw trampoline.
1455         (mono_arch_get_throw_exception_generic): call throw_exception_by_token
1456         for throwing corlib exceptions, this fixes full-aot support for corlib
1457         exceptions.
1458
1459         * aot-compiler.c (compile_method): Make a copy of cfg->locals to fix the build.
1460
1461 2009-01-29  Miguel de Icaza  <miguel@novell.com>
1462
1463         * mini-darwin.c, mini-windows.c, mini-posix.c: Commit the first
1464         part of the changes to split the code in mini into operating
1465         system specific files.
1466
1467         This patch was done by copying mini.c to the respective files to
1468         preserve SVN history.
1469
1470 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
1471
1472         * aot-compiler.c (emit_method_dwarf_info): Add minimal support for locals.
1473
1474 2009-01-28  Zoltan Varga  <vargaz@gmail.com>
1475
1476         * method-to-ir.c (mono_method_to_ir): Avoid generic sharing for calls made to
1477         remoting-invoke-with-check wrappers of shared methods.
1478
1479         * mini.c (print_jit_stats): Print out major gc count/time for libgc too.
1480
1481 2009-01-27  Mark Probst  <mark.probst@gmail.com>
1482
1483         * method-to-ir.c (emit_stloc_ir): Only apply the reg-reg move
1484         optimization if the top of stack is the last instruction in the
1485         bblock.  Otherwise it might have been used after its definition.
1486         Fixes #469742.
1487
1488 2009-01-27  Zoltan Varga  <vargaz@gmail.com>
1489
1490         * mini-trampolines.c (mono_magic_trampoline): Print out the caller
1491         method as well when get_vcall_slot () fails to match a code sequence.
1492
1493         * mini-arm.c: Fix the android build, which doesn't have
1494         __aeabi_read_tp.
1495
1496 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
1497
1498         * mini-s390x.c: Remove a stray declaration of emit_sig_cookie () to fix
1499         the s390x build.
1500
1501 2009-01-26  Rodrigo Kumpera  <rkumpera@novell.com>
1502
1503         * unwind.c (mono_unwind_cleanup): Don't crash if cached_info is NULL.
1504
1505 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
1506
1507         * mini.c (mini_method_compile): Save the unwind info generated by the JIT
1508         and put its id into jinfo->used_regs. This is only used on amd64,
1509         which is currently the only platform generating unwind info.
1510
1511         * exceptions-amd64.c: Instead of unwinding based on a register mask, use
1512         the dwarf unwinder. This is required to correctly handle async exceptions
1513         like thread abort and stack overflows, which can happen while a method
1514         is in the middle of its prolog or epilog.
1515         
1516         * aot-runtime.c (mono_aot_get_unwind_info): New helper function to obtain
1517         the unwind info belonging to an AOTed method.
1518
1519         * aot-compiler.c aot-runtime.c: Save/Load the unwind info emitted by the JIT
1520         into cfg->unwind_ops.
1521         
1522         * unwind.c (mono_unwind_frame): Use <= instead of < for the loop exit check.
1523
1524         * mini.c (mini_init): Call mono_unwind_init ().
1525         (mini_cleanup): Call mono_unwind_cleanup ().
1526
1527         * unwind.c: Add functions for managing a set of unwind info entries, allowing
1528         unwind info to be shared between methods.
1529
1530         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info for the registers
1531         saved in the LMF.
1532
1533         * exceptions-amd64.c (mono_arch_exceptions_init): Call 
1534         get_throw_pending_exception () to avoid initialization races.
1535
1536         * mini-exceptions.c (mono_exceptions_init): Call an arch specific
1537         mono_arch_exceptions_init () function.
1538
1539         * mini.h (MONO_INST_NEW): Remove duplicate setting of cil_code.
1540
1541 2009-01-25  Zoltan Varga  <vargaz@gmail.com>
1542
1543         * mini.c (mono_get_domain_intrinsic): New helper function.
1544         (mono_get_thread_intrinsic): Ditto.
1545
1546         * mini-arm.c mini-ia64.c: Use the new helper functions.
1547         
1548         * method-to-ir.c (mono_method_to_ir): Fix the comment for
1549         the last constrained_call change, since it is needed in the non-AOT
1550         case as well.
1551
1552         * mini-arm.c: Implement OP_TLS_GET on arm eabi linux.
1553         
1554         * mini-arm.c (mono_arch_emit_prolog): Add an inlined version of 
1555         mono_get_lmf_addr () on arm eabi linux.
1556
1557 2009-01-24  Zoltan Varga  <vargaz@gmail.com>
1558
1559         * mini-amd64.c (mono_arch_get_vcall_slot): Handle yet another
1560         code sequence which matches a non-virtual call.
1561
1562 2009-01-23  Mark Probst  <mark.probst@gmail.com>
1563
1564         * mini-ppc.c (mono_arch_context_get_int_reg): Allow access to the
1565         stack pointer (r1).
1566
1567 2009-01-23  Zoltan Varga  <vargaz@gmail.com>
1568
1569         * aot-compiler.c aot-runtime.c: Treat delegate-invoke wrappers similarly to
1570         runtime-invoke wrappers, since they are also shared based on signature.
1571
1572 2009-01-22  Mark Probst  <mark.probst@gmail.com>
1573
1574         * mini-exceptions.c (ves_icall_get_frame_info): Fetch the generic
1575         info from the (correct) context.
1576
1577 2009-01-22  Zoltan Varga  <vargaz@gmail.com>
1578
1579         * unwind.c (mono_unwind_frame): Remove a stray g_free ().
1580         
1581         * unwind.c (mono_unwind_frame): New function to unwind through a frame
1582         using dwarf unwinding info. Not yet used.
1583
1584         * mini.c (mini_init): When using xdebug, disable freeing of domains.
1585
1586 2009-01-21  Mark Probst  <mark.probst@gmail.com>
1587
1588         * mini-ppc.c (mono_arch_delegate_invoke_impl): Return function
1589         descriptors.
1590
1591         * mini-trampolines.c (mono_delegate_trampoline): Remove the PPC64
1592         special case and handle mono_arch_delegate_invoke_impl() returning
1593         function descriptors.
1594
1595         * tramp-ppc.c (mono_arch_create_trampoline_code): Delegate
1596         trampolines return function descriptors, too.
1597
1598 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
1599
1600         * method-to-ir.c (handle_alloc): Avoid generic instances in the
1601         out_of_line optimization.
1602
1603 2009-01-21  Martin Baulig  <martin@ximian.com>
1604
1605         * mini.h
1606         (MonoCompile): Added `disable_deadce_vars' to disable removing
1607         unused variables.
1608
1609         * mini.c
1610         (mini_method_compile): Set `cfg->disable_deadce_vars' when running
1611         inside the debugger.
1612
1613         * liveness.c (mono_analyze_liveness): Don't remove any unused
1614         variables if `cfg->disable_deadce_vars' is set.
1615
1616 2009-01-21  Mark Probst  <mark.probst@gmail.com>
1617
1618         * method-to-ir.c: Only apply exception constructor optimization if
1619         the the method actually belongs to an exception class.  Fixes
1620         #467456.
1621
1622 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
1623
1624         * mini-trampolines.c (mono_delegate_trampoline): Put back the previous
1625         change inside a #ifdef __mono_ppc64__.
1626
1627         * aot-compiler.c (compile_method): Remove the previous limitation.
1628
1629         * method-to-ir.c (method-to-ir.c): Add support for the constrained prefix
1630         on type variables in AOTed code.
1631         
1632         * aot-compiler.c (compile_method): Skip generic methods having type 
1633         constraints on their generic parameters.
1634
1635         * aot-compiler.c (compile_method): Check for methods which cannot be
1636         encoded inside RGCTX_FETCH patches as well.
1637
1638         * mini-exceptions.c (mono_print_thread_dump): Fix the windows
1639         build.
1640
1641 2009-01-20  Mark Probst  <mark.probst@gmail.com>
1642
1643         * method-to-ir.c: Force the vtable variable in shared generic code
1644         for the case that they might show up on a stack trace where they
1645         are needed.
1646
1647         * mini-exceptions.c: Save and use generic sharing info as well as
1648         IP in stack traces to resolve shared generic instantiations.
1649
1650 2009-01-20  Zoltan Varga  <vargaz@gmail.com>
1651
1652         * mini-trampolines.c (mono_delegate_trampoline): Revert the change which
1653         added a mono_get_addr_from_ftnptr () as it breaks the ia64 build.
1654
1655 2009-01-20  Mark Probst  <mark.probst@gmail.com>
1656
1657         * method-to-ir.c: Do generic sharing for array constructors.
1658
1659 2009-01-20  Rodrigo Kumpera  <rkumpera@novell.com>
1660
1661         * mini-exceptions.c (mono_print_thread_dump): Add information
1662         about the thread state using wapi_current_thread_desc.
1663
1664 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
1665
1666         * basic-simd.cs: Tests for the new constructors. 
1667
1668 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
1669
1670         * mini-ops.h: Added OP_EXPAND_*
1671
1672         * cpu-x86.md: Same.
1673
1674         * mini-x86.c (mono_arch_output_basic_block): Same.
1675         
1676         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for single element constructors.
1677
1678 2009-01-19  Zoltan Varga  <vargaz@gmail.com>
1679
1680         * iltests.il.in: Add a test for #467385.
1681
1682 2009-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
1683
1684         * mini.c (mini_thread_cleanup): Don't cleanup TLS storage if the
1685         thread been cleaned up is not the same currently in execution.
1686
1687         Fixes appdomain-unload crashes on windows, osx and linux variants
1688         without the __thread keyword.
1689
1690 2009-01-18  Zoltan Varga  <vargaz@gmail.com>
1691
1692         * mini-arm.c (mono_arch_flush_icache): Applied patch from Koushik Dutta
1693         (koush@koushikdutta.com). Implement this for android.
1694
1695         * helpers.c (mono_disassemble_code): Avoid assembler errors if the id
1696         begins with a digit.
1697
1698         * method-to-ir.c: Call mono_gc_get_write_barrier () instead of
1699         mono_marshal_get_write_barrier ().
1700
1701 2009-01-17  Rodrigo Kumpera  <rkumpera@novell.com>
1702
1703         * decompose.c (mono_decompose_vtype_opts): Fix the decomposition
1704         of OP_VCALL_* ops for 8 bytes vtypes on 32 bits archs and platorms
1705         that pass them on a register pair.
1706
1707         This affects windows, OSX and FreeBSD. The mono/tests/handleref.exe
1708         test was crashing due to that.
1709
1710 Fri Jan 16 15:21:21 CET 2009 Paolo Molaro <lupus@ximian.com>
1711
1712         * exceptions-ppc.c: tweaks from malc (OV-Soft) to fix the size of the
1713         trampoline code. Include ucontext.h only if available.
1714
1715 2009-01-15  Mark Probst  <mark.probst@gmail.com>
1716
1717         * mini.c: mono_domain_lookup_shared_generic() takes an open method
1718         and doesn't check whether it's sharable, like it was before
1719         removing the shared generics hash.  This brings IronPython
1720         performance back to what it was before that change.
1721
1722 2009-01-14  Mark Probst  <mark.probst@gmail.com>
1723
1724         * method-to-ir.c: Handle delegate invocation optimization earlier,
1725         otherwise it would be handled (much more slowly) by the
1726         final/sealed optimization.
1727
1728 2009-01-13  Zoltan Varga  <vargaz@gmail.com>
1729
1730         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes when the current thread or
1731         domain is not set. Fixes #465864.
1732
1733 2009-01-12  Mark Probst  <mark.probst@gmail.com>
1734
1735         * method-to-ir.c: Don't stop sharing of generic methods with catch
1736         clauses - we already handle those.
1737
1738 2009-01-12  Mark Probst  <mark.probst@gmail.com>
1739
1740         * mini.c, mini.h: lookup_generic_method() is now
1741         mono_domain_lookup_shared_generic() and uses the jit_code_hash,
1742         making the shared_generics_hash obsolete.
1743
1744 2009-01-12  Mark Probst  <mark.probst@gmail.com>
1745
1746         * mini-ppc.c, exceptions-ppc.c, cpu-ppc.md, cpu-ppc64.md: Don't
1747         use the red zone.  Make room on the stack first and then use it,
1748         not the other way around.
1749
1750 2009-01-12  Zoltan Varga  <vargaz@gmail.com>
1751
1752         * mini.c (mini_init): Call mono_xdebug_init ().
1753
1754         * aot-compiler.c (mono_xdebug_init): Make this non-static.
1755
1756 2009-01-11  Zoltan Varga  <vargaz@gmail.com>
1757
1758         * TestDriver.cs: Add an --iter argument to run tests multiple times.
1759
1760         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Emit debug info for
1761         trampolines.
1762
1763         * aot-compiler.c (mono_save_trampoline_xdebug_info): New function to emit
1764         debug+unwind info for trampolines.
1765
1766         * mini.c (mono_create_unwind_op): New helper function.
1767
1768         * unwind.h: Add macros for emitting unwind ops without a MonoCompile.
1769
1770 2009-01-10  Zoltan Varga  <vargaz@gmail.com>
1771
1772         * aot-compiler.c: Fix the build.
1773
1774 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
1775
1776         * Makefile.am: Update dtrace-prelink.sh location.
1777
1778 2009-01-08  Zoltan Varga  <vargaz@gmail.com>
1779
1780         * method-to-ir.c (mono_method_to_ir): Fix the check for the mscorlib ldstr 
1781         optimization. Fixes #464520.
1782
1783 2009-01-07  Bill Holmes  <billholmes54@gmail.com>
1784
1785         * mini-amd64.c : Adding code to save/restore non-volatile registers
1786            on Winx64.
1787
1788         * exceptions-amd64.c : Adding code to save/restore non-volatile 
1789           registers on Winx64.
1790
1791         Contributed under MIT/X11 license.
1792
1793 2009-01-07  Zoltan Varga  <vargaz@gmail.com>
1794
1795         * mini-arm.c (mono_arch_flush_icache): Use __GNUC_PREREQ instead of checking
1796         __GNUC_MINOR__ which can break when the major version changes.
1797
1798 2009-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
1799
1800         * basic-simd.cs: Add tests for usage of the sizeof opcode.
1801
1802 2009-01-07  Geoff Norton  <gnorton@novell.com>
1803
1804         * helpers.c:  Allow mono -v -v -v to work on darwin.
1805
1806 2009-01-05  Bill Holmes  <billholmes54@gmail.com>
1807
1808         * mini-amd64.c (mono_arch_get_vcall_slot) : Handle an additional instruction
1809           pattern. 
1810
1811         Contributed under MIT/X11 license.
1812
1813 2009-01-05  Zoltan Varga  <vargaz@gmail.com>
1814
1815         * mini.c (mono_allocate_stack_slots_full2): Use mono_class_from_mono_type
1816         instead of directly accessing type->data.klass. Fixes #462016.
1817         (mono_allocate_stack_slots_full): Ditto.
1818
1819         * mini-arm.c (mono_arch_flush_icache): Applied patch from Riku Voipio 
1820         <novell@kos.to>. Fix cache flush on kernels without OLDABI compat option.
1821
1822         * aot-compiler.c (emit_plt): Fix ARM build.
1823
1824 2009-01-04  Zoltan Varga  <vargaz@gmail.com>
1825
1826         * branch-opts.c (mono_if_conversion): Optimize this using ins->prev.
1827         
1828         * branch-opts.c (mono_if_conversion): Fix an assert introduced by the last
1829         change.
1830
1831         * branch-opts.c (mono_if_conversion): Use branch->inst_true_bb/inst_false_bb
1832         instead of bblock->out_bb [0]/[1], the two might not be the same. Fixes
1833         #463357.
1834
1835         * iltests.il.in: Add a regression test.
1836
1837 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
1838
1839         * mini-codegen.c (mono_print_ins_index): Pretty print XPHI and VPHI.
1840
1841 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
1842
1843         * basic-simd.cs: Add a regression test for #462457.
1844
1845 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
1846
1847         * mini-ops.h: Add a definition of XPHI.
1848
1849         * mini.h (MONO_IS_PHI): Make is aware of simd instrincs. 
1850
1851         * ssa.c (op_phi_to_move): Handle XPHI.
1852
1853         * ssa.c (mono_ssa_compute): Generate a XPHI for simd intrinsics instead of VPHI.
1854
1855         Fixes #462457
1856
1857 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
1858
1859         * method-to-ir.c (mono_emit_rgctx_calli): Fix a warning.
1860
1861 2008-12-31  Geoff Norton  <gnorton@novell.com>
1862
1863         * mini-ppc.c: The prolog size allocated can be too small for darwin
1864         ppc32 under certain circumstances.  Also fix a small logic bug.
1865
1866 2008-12-29  Zoltan Varga  <vargaz@gmail.com>
1867
1868         * mini.c (mono_jit_compile_method_inner): Avoid holding the domain lock
1869         while loading AOT methods.
1870
1871         * mini-exceptions.c: Check jit_tls->class_cast_from instead of class_cast_to
1872         since only the former is nulled out after a successful cast. This prevents
1873         crashes with rethrown exceptions when using --debug=casts.
1874
1875 2008-12-24  Mark Probst  <mark.probst@gmail.com>
1876
1877         * mini.h: New macro for checking whether a method is final,
1878         i.e. whether the method or its class is marked final.
1879
1880         * method-to-ir.c: Use the new macro for all final-checks
1881         consistently.  Fixes the crash in the System.ServiceModel tests.
1882
1883 2008-12-23  Mark Probst  <mark.probst@gmail.com>
1884
1885         * mini-exceptions.c (get_exception_catch_class): Corrected another
1886         overly strict assertion.
1887
1888 2008-12-23  Mark Probst  <mark.probst@gmail.com>
1889
1890         * mini-ppc.c (mono_arch_build_imt_thunk): Save and restore r11.
1891         Clobbering it is not allowed because the caller might use it as
1892         the vtable register in the interface call.
1893
1894 2008-12-19  Mark Probst  <mark.probst@gmail.com>
1895
1896         * mini-exceptions.c (get_exception_catch_class): Corrected an
1897         overly strict assertion.
1898
1899 2008-12-18  Mark Mason  <mmason@upwardaccess.com>
1900         
1901         * method-to-ir.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P or sizeof(gpointer) when appropriate.
1902
1903         * mini.h: Move typedef to mgreg_t up above include of mini-arch.h
1904
1905         * local-propogation.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P when appropriate
1906
1907         * cpu-mips.md: correct lengths for certain long_ opcodes.
1908
1909         * mini-mips.h: Only emulate long operations when SIZEOF_REGISTER==4. Add missing func decl.
1910
1911         * 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().
1912         
1913 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
1914
1915         * exceptions-mips.c (mono_arch_find_jit_info): decode sd instructions as well when looking for registers.
1916         
1917 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
1918         
1919         * mini-mips.c (mono_arch_output_basic_block): OP_JUMP_TABLE stores patch type in inst_c1, not inst_i1.
1920         
1921 2008-12-16  Rodrigo Kumpera  <rkumpera@novell.com>
1922
1923         * branch-opts.c (remove_block_if_useless): Even if BB0 falls through, don't add a br to the
1924         next basic block.
1925         
1926 2008-12-16  Mark Mason  <mmason@upwardaccess.com>
1927
1928         * 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
1929
1930         * 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)
1931         
1932 2008-12-15  Mark Mason  <mmason@upwardaccess.com>
1933         
1934         * trace.c (mono_trace_enter_method): correctly handle arguments smaller than the stack slot size on big endian systems.
1935         
1936 2008-12-14  Zoltan Varga  <vargaz@gmail.com>
1937
1938         * liveness.c (mono_analyze_liveness): Avoid eliminating the 'this' var in
1939         gshared code. Fixes #458947.
1940
1941         * generics.cs: Add a test.
1942
1943 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
1944         
1945         * method-to-ir.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
1946         
1947         * mini-mips.c: first pass n32 code generation.
1948
1949         * mini-mips.h: datatypes and defines for n32 support.
1950
1951         * exceptions-mips.c: first pass n32 code generation.
1952         
1953         * tramp-mips.c: first pass n32 code generation.
1954         
1955         * cpu-mips.md: add long_ opcodes.
1956         
1957 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
1958
1959         * liveness.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
1960
1961         * cfold.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
1962         
1963         * local-propogation.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
1964         
1965         * regalloc2.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
1966
1967         * mini.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
1968
1969         * mini-codegen.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
1970
1971         * ssa.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
1972
1973         * decompose.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
1974
1975         * helpers.c: for mips/n32, don't pass -mips32 to objdump
1976
1977 2008-12-12  Zoltan Varga  <vargaz@gmail.com>
1978
1979         * mini-arm.c tramp-arm.c: Fix calls to mono_arch_flush_icache.
1980
1981 2008-12-12  Andrés G. Aragoneses  <aaragoneses@novell.com>
1982
1983         * driver.c: Sync --help-trace with man page (EXPR,EXPR).
1984
1985 2008-12-12  Mark Probst  <mark.probst@gmail.com>
1986
1987         * mini-ppc.h, exceptions-ppc.c, tramp-ppc.c: Create function
1988         descriptors for helper functions directly in front of the code.
1989
1990 2008-12-11  Mark Probst  <mark.probst@gmail.com>
1991
1992         * method-to-ir.c: Removed an unnecessary assertion.
1993
1994 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
1995
1996         * method-to-ir.c: Merge SGEN changes from the old JIT.
1997
1998 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
1999
2000         * driver.c (compile_all_methods_thread_main): Handle failure of
2001         mono_get_method ().
2002
2003 2008-12-10  Mark Probst  <mark.probst@gmail.com>
2004
2005         * mini-ppc.c: Merged with mini-ppc64.c.
2006
2007         * mini-ppc.h: Define PPC_MINIMAL_PARAM_AREA_SIZE on all targets.
2008
2009         * Makefile.am: Use the same sources for PPC and PPC64.
2010
2011         * mini-ppc64.c: Removed.
2012
2013 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
2014
2015         * branch-opts.c (remove_block_if_useless): Extract fall through detection
2016         code to mono_bb_is_fall_through.
2017         
2018         * branch-opts.c (mono_remove_critical_edges): Same.
2019
2020 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
2021
2022         * ssa.c (fold_ins): branch opt can kill dummy switch ops so we can't
2023         expect that an OP_BR_REG will be there.
2024
2025 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
2026
2027         * branch-opts.c (remove_block_if_useless): Use MONO_IS_BRANCH_OP instead of checking
2028         for the many branch ops. The original check miss OP_BR_REG.
2029
2030         Fixes #457574.
2031         
2032 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
2033
2034         * mini-mips.h mini-mips.c exceptions-mips.c tramp-mips.c: first round of changes necessary to eventually support n32.
2035
2036 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
2037
2038         * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
2039         while holding the aot lock.
2040
2041 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
2042
2043         * mini-mips.c (mono_arch_output_basic_block): use mfc1/lwc1 instead of mfc1d/ldc1
2044         
2045 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
2046
2047         * mini.c (mini_cleanup) : Adding a call to cominterop_release_all_rcws 
2048           to release all runtime callable wrappers held by the runtime.
2049
2050         Contributed under MIT/X11 license.
2051
2052 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
2053
2054         * tramp-amd64.c (mono_arch_create_trampoline_code_full) : Increase the code size for
2055           for Winx64.
2056
2057         Contributed under MIT/X11 license.
2058
2059 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
2060
2061         * aot-runtime.c (decode_exception_debug_info): Acquire the domain
2062         lock when calling mono_domain_alloc (). Hopefully fixes #415608.
2063
2064 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
2065
2066         * cpu-mips.md: fix ckfinite length
2067
2068         * mini-mips.c: at least recognize n32 ABI when used (not yet supported)
2069         (mono_arch_lowering_pass): cleanup, rearrange for clarity
2070         (mono_arch_output_basic_block): implement OP_CKFINITE, add more asserts
2071         
2072 2008-12-08  Mark Mason   <mmason@upwardaccess.com>
2073
2074         * exceptions-mips.c (mono_arch_find_jit_info): init new_ctx with ctx, dont' call setup_context.
2075         
2076 2008-12-08  Geoff Norton  <gnorton@novell.com>
2077
2078         * tramp-amd64.c: r120895 stores RAX, so we need to increase the window
2079         size by 8 bytes as well.
2080
2081 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
2082
2083         * basic-simd.cs: Fix method names for Vector16b.
2084         
2085 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
2086
2087         * basic-simd.cs: Fix method names for Vector16sb.
2088
2089 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
2090
2091         * basic-simd.cs: Fix method names for Vector8us.
2092         
2093 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
2094
2095         * basic-simd.cs: Fix method names for Vector8s.
2096         
2097 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
2098
2099         * basic-simd.cs: Fix method names for Vector4ui.
2100
2101 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
2102
2103         * basic-simd.cs: Fix method names for Vector2l.
2104
2105 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
2106
2107         * basic-simd.cs: Fix method names for Vector2d.
2108
2109 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
2110
2111         * simd-intrinsics.c (mono_emit_simd_intrinsics): Add support for intrinsics
2112         that are extension methods.
2113
2114 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
2115
2116         * basic-simd.cs: Fix method names for Vector4f.
2117
2118 2008-12-08  Zoltan Varga  <vargaz@gmail.com>
2119
2120         * mini-exceptions.c (mono_print_thread_dump): Mark threadpool threads
2121         as such. Fixes #456669.
2122
2123 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
2124
2125         * mini-mips.c (mono_arch_emit_call): narrow float arguments when passing as args.
2126         
2127 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
2128
2129         * mini-mips.c (mono_arch_lowering_pass): don't handle OP_ICONV_TO_R* or OP_R*CONST
2130         (mono_arch_emit_setret): use OP_MIPS_CVTSD to return SP floats
2131         (mono_arch_output_basic_block): simplify FP load/store, handle OP_MIPS_FBLT_UN
2132         (mips_adjust_stackframe): handle FP spills
2133                 
2134         * mini-ops.h: add mips_mtc1_s2
2135         
2136         * cpu-mips.md: add mips_mtc1_s2
2137         
2138 2008-12-07  Zoltan Varga  <vargaz@gmail.com>
2139
2140         * unwind.c: New file, move the unwind info encoding functions here from
2141         aot-compiler.c, so they could be used at runtime too.
2142
2143 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
2144
2145         * mini-mips.c (mono_arch_lowering_pass): handle OP_IMUL_IMM as well
2146         (mono_arch_output_basic_block): fix OP_LOCALLOC code generation
2147         
2148 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
2149
2150         * mini-mips.c: cleanup warnings
2151         (mono_arch_lowering_pass): handle OP_LOCALLOC_IMM
2152         (mips_adjust_stackframe): handle case of taking the address of stack locals
2153         
2154 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
2155
2156         * aot-compiler.c: Implement a few functions missing from the asm writer.
2157         (emit_method_code): Only write symbols for methods when using the bin
2158         writer, since the assembler can't deal with the characters in our method
2159         names.
2160
2161         * aot-compiler.c (is_plt_patch): ICALL_ADDR is also a plt patch.
2162
2163         * method-to-ir.c (mono_method_to_ir): Transform aotconst+calli into a direct
2164         call.
2165
2166         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Rework the code
2167         a bit to also restore %rax.
2168
2169 2008-12-05  Mark Probst  <mark.probst@gmail.com>
2170
2171         * mini-ppc.c: Some simple merges from mini-ppc64.c.
2172
2173 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
2174
2175         * ssa.c (mono_ssa_compute): Only add an implicit reference at start for
2176         arguments.
2177
2178 2008-12-05  Mark Probst  <mark.probst@gmail.com>
2179
2180         * exceptions-ppc.c: Merged with exceptions-ppc64.c.
2181
2182         * mini-ppc.c, mini-ppc.h: Remove PPC_STACK_ALIGNMENT and use
2183         MONO_ARCH_FRAME_ALIGNMENT.  Struct for PPC64 function descriptors.
2184
2185         * exceptions-ppc64.c: Removed.
2186
2187         * Makefile.am: Use exceptions-ppc.c instead of exceptions-ppc64.c.
2188
2189 2008-12-05  Mark Probst  <mark.probst@gmail.com>
2190
2191         * tramp-ppc.c, mini-ppc.c, mini-ppc.h: Merged tramp-ppc.c with
2192         tramp-ppc64.c.
2193
2194         * Makefile.am: Use tramp-ppc.c instead of tramp-ppc64.c.
2195
2196         * tramp-ppc64.c: Removed.
2197
2198 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
2199
2200         * aot-compiler.c (add_generic_instances): Skip non-generic classes in
2201         the TYPESPEC table.
2202
2203 2008-12-05  Mark Probst  <mark.probst@gmail.com>
2204
2205         * mini-ppc.h: Merged mini-ppc64.h with mini-ppc.h.
2206
2207         * exceptions-ppc64.c, tramp-ppc64.c, mini-arch.h, Makefile.am: Use
2208         mini-ppc.h instead of mini-ppc64.h.
2209
2210         * mini-ppc64.h: Removed.
2211
2212 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
2213
2214         * mini-mips.c: introduce USE_LDC_SDC: use ldc1/sdc1 to load/store doubles, disabled by default
2215         
2216         * mini-mips.c (mono_arch_emit_outarg_vt): fix offset calculation for memcpy in structure passing.
2217         
2218 2008-12-05  Mark Probst  <mark.probst@gmail.com>
2219
2220         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c:
2221         Removed FIRST/LAST_[GF]REG macros, to make merging PPC64 with PPC
2222         code easier.
2223
2224 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
2225
2226         * basic-simd.cs: Tests for operator == and != on  Vector8us and Vector16b.
2227
2228 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
2229
2230         * simd-intrinsics.c: Add support for operator == and != to Vector8(u)s and Vector16(s)b.
2231
2232 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
2233
2234         * basic-simd.cs: Tests for operator == and != on Vector4f.
2235
2236 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
2237
2238         * simd-intrinsics.c (simd_intrinsic_emit_equality): Adapt to support Vector4f.
2239
2240         * simd-intrinsics.c: Kill useless enum.
2241
2242 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
2243
2244         * cpu-mips.md: add long_conv_to_ovf_i4_2
2245         * mini-mips.c: update/add various _OVF_ opcodes to fix test failures
2246
2247 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
2248
2249         * mini-mips.c: ifdef protect automatic promotions of R4 to R8.
2250         
2251         * mini-mips.c (mono_arch_emit_setret): handle R4 case with FCONV_TO_R4 instead of FMOVE
2252
2253 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
2254
2255         * mini-mips.c (mono_arch_output_basic_block): fix codegen for OP_OR_IMM/OP_IOR_IMM
2256         
2257 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
2258
2259         * basic-simd.cs: Add tests for new methods.
2260
2261 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
2262
2263         * simd-intrinsics.c: Add support for operator == and !=
2264         on Vector4(u)i.
2265
2266         * simd-methods.h: Add SN_op_Inequality and SN_op_Equality.
2267
2268 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
2269
2270         * simd-intrinsics.c: Remove ExtractByteMask intrinsics.
2271
2272 2008-12-04  Zoltan Varga  <vargaz@gmail.com>
2273
2274         * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
2275
2276         * mini.c (mono_resolve_patch_target): Allow pinvoke methods in 
2277         MONO_PATCH_INFO_ICALL_ADDR.
2278
2279         * aot-runtime.c (MonoAotFileInfo): Correct order of fields.
2280
2281         * aot-compiler.c: Resurrect full-aot support.
2282
2283 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
2284
2285         * mini-mips.c (mono_arch_lowering_pass): handle OP_COMPARE and OP_ICOMPARE
2286         
2287 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
2288
2289         * mini-mips.c (mono_arch_output_basic_block): fix OP_IREM_UN code generation
2290         
2291 2008-12-03  Rodrigo Kumpera  <rkumpera@novell.com>
2292
2293         * basic-simd.cs: Fix tests to work under ppc.
2294         Remove tests for methods that will be removed.
2295
2296 2008-12-03  Mark Probst  <mark.probst@gmail.com>
2297
2298         * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
2299         generic type (via a typedef or typeref) correctly.
2300
2301 2008-12-03  Zoltan Varga  <vargaz@gmail.com>
2302
2303         * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
2304         diagnose an assertion failure.
2305
2306 2008-12-02  Mark Probst  <mark.probst@gmail.com>
2307
2308         * tramp-ppc64.c (mono_arch_create_rgctx_lazy_fetch_trampoline):
2309         Fix trampoline size.
2310
2311         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: A few floating point
2312         conversion opcodes are implemented natively instead via emulation.
2313
2314 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
2315
2316         * cpu-mips.md: remove mips_xori
2317
2318         * mini-ops.h:  remove mips_xori
2319
2320         * mini-mips.h: replace OP_MIPS_XORI with OP_IXOR
2321
2322         * mini-mips.c (mono_arch_decompose_long_opts): Add ladd_imm, lsub, lsub_imm, lneg, lsub_ovf, lsub_ovf_un.
2323         
2324         * mini-mips.c (mono_arch_lowering_pass, mono_arch_output_basic_block): fix IXOR handling
2325         
2326 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
2327
2328         * cpu-mips.md: fix instruction lengths.
2329
2330         * mini-mips.h: define MONO_ARCH_NO_IOV_CHECK
2331
2332         * mini-mips.c: move most instruction rewriting into decompose_ops. Implement conditional branches and exceptions. Fix jump table patch handling. Implement add/sub OVF.
2333
2334         * mini-ops.h: fix slti / sltiu op profiles.
2335         
2336 2008-12-02  Martin Baulig  <martin@ximian.com>
2337
2338         * method-to-ir.c (mono_method_to_ir): Disable debugging
2339         information for the init locals block to make the debugger stop
2340         after all locals have been initalized.
2341
2342 2008-12-02  Martin Baulig  <martin@ximian.com>
2343
2344         * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
2345         running inside the debugger.
2346
2347 2008-12-01  Zoltan Varga  <vargaz@gmail.com>
2348
2349         * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
2350         is enabled.
2351
2352         * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the 
2353         alu->alu imm optimization which only shows if deadce is disabled.
2354
2355         * aot-compiler.c: Rename the function names for the binary and asm writers
2356         so they can coexist in the same process. Rework the xdebug code to use the
2357         asm writer. This avoids the need to call into the runtime to dump the
2358         debugging info. Add more debugging info for types.
2359
2360         * mini-<ARCH>.h: Kill MONO_ARCH_HAVE_NORMALIZE_OPCODES define.
2361
2362         * genmdesc.c genmdesc.pl mini.h: Don't put the CEE_ opcodes into the
2363         cpu description tables, they can't occur in cpu-<ARCH>.md.
2364
2365         * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
2366         the stack in CEE_LDFLDA. Fixes #450542.
2367
2368         * generics.cs: Add a new test.
2369
2370 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
2371
2372         * mini-ops.h: updated MIPS opcodes
2373         * mini-mips.c: decompose long opts
2374         * mini-mips.h: decompose long opts
2375         
2376 2008-11-29  Mark Mason   <mmason@upwardaccess.com>
2377
2378         * cpu-mips.md: fix length on int_rem_un
2379         * mini-mips.c (mips_stackframe_adjust): fix insertion of spillvars region in MIPS stackframes.
2380         
2381 2008-11-29  Zoltan Varga  <vargaz@gmail.com>
2382
2383         * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
2384
2385         * mini-codegen.c (mono_print_ins_index): Handle OP_VOIDCALL_MEMBASE.
2386
2387 2008-11-29  Martin Baulig  <martin@ximian.com>
2388
2389         * mini-exceptions.c (mono_handle_native_sigsegv): Check
2390         mono_debug_using_mono_debugger() in addition to the
2391         `no_gdb_backtrace' flag in the `MonoDebugOptions'.
2392
2393 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
2394
2395         * mini-ops.h: updated more MIPS opcodes
2396         * mini-mips.c: FP compare/branch working again, clean up last of CEE_ -> OP_ mappings
2397         * cpu-mips.md: Added MIPS versions of new FP compare/branch opcodes.
2398         
2399 2008-11-28  Mark Probst  <mark.probst@gmail.com>
2400
2401         * mini-ppc64.c: Patch the RGCTX fetch trampoline correctly.
2402
2403 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
2404
2405         * mini-mips.c (mono_arch_emit_call): adding missing conversion to fp single when passing in integer arg register.
2406         * mini-mips.c (mips_adjust_stackframe): compensate for spill-down logic.
2407         * mini-ops.h: correct selected mips opcode entries
2408         
2409 2008-11-28  Mark Probst  <mark.probst@gmail.com>
2410
2411         * mini-ppc64.c, mini-ppc64.h: Enable generalized IMT thunks and
2412         make them work.
2413
2414 2008-11-28  Mark Probst  <mark.probst@gmail.com>
2415
2416         * mini-ppc64.h, tramp-ppc64.c: Make generic code sharing work.
2417
2418 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
2419
2420         * method-to-ir.c, mini-trampolines.c: protect IMG code with #ifdef MONO_ARCH_HAVE_IMT to fix compile errors.
2421         * mini-mips.c: Fixup stackframe assignments after allocation of spillvars.
2422         * mini-mips.h: disable IMT
2423         * tramp-mips.c (mono_arch_get_vcall_slot): fix offset extraction
2424         
2425 2008-11-28  Mark Probst  <mark.probst@gmail.com>
2426
2427         * mini-ppc64.c, mini-ppc64.h: Don't emulate long ops.
2428
2429 2008-11-28  Mark Probst  <mark.probst@gmail.com>
2430
2431         * mini-ppc64.c, exceptions-ppc64.c: Several fixes.
2432
2433 2008-11-28  Zoltan Varga  <vargaz@gmail.com>
2434
2435         * method-to-ir.c (handle_isinst): Use PCONST instead of ICONST for
2436         consistency.
2437
2438 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
2439
2440         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
2441         for Set/GetVector aligned versions.
2442
2443 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
2444
2445         * basic-simd.cs: Add tests for Get/SetVector.
2446
2447 2008-11-27  Mark Probst  <mark.probst@gmail.com>
2448
2449         * mini.c: Removed g_slist_append_mempool().  Now in
2450         metadata/mempool.c.
2451
2452 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
2453
2454         * simd-intrinsics.c (mono_emit_vector_ldelema): Extract the element
2455         size properly and make the bounds check optional.
2456
2457         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
2458         for SetVector and IsAligned.
2459
2460 2008-11-27  Zoltan Varga  <vargaz@gmail.com>
2461
2462         * mini.c: Remove unused mono_normalize_opcodes () function.
2463
2464 2008-11-26  Mark Probst  <mark.probst@gmail.com>
2465
2466         * method-to-ir.c (mini_emit_inst_for_method): Small fix: we're
2467         using the new atomic add ops now.
2468
2469         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Implemented atomic
2470         add.
2471
2472 2008-11-26  Mark Probst  <mark.probst@gmail.com>
2473
2474         * mini-ppc64.c: Several fixes.
2475
2476 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
2477
2478         * cpu-mips.md: added jump_table
2479         * mini-mips.c: added jump_table. Eliminate compare-imm when lowering. Remove dead function.             
2480
2481 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
2482
2483         * mini-mips.c, mini-mips.h, tramp-mips.c, cpu-mips.md: Initial upgrade of MIPS port to new IR.
2484
2485 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
2486
2487         * mini-ops.h: corrected a handful of MIPS opcodes.
2488
2489 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
2490
2491         * aot-compiler.c: MIPS to use ELF writer
2492
2493 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
2494
2495         * mini-codegen.c: remove MIPS specific assert.
2496
2497 2008-11-25  Mark Probst  <mark.probst@gmail.com>
2498
2499         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Several
2500         fixes.  PPC64 now passes most of the runtime regressions.
2501
2502 2008-11-24  Zoltan Varga  <vargaz@gmail.com>
2503
2504         * regalloc2.c: Distinguish between use/def positions. Optimize the creation of
2505         volatile intervals a bit.
2506
2507 2008-11-24  Mark Probst  <mark.probst@gmail.com>
2508
2509         * basic-long.cs: New test case.
2510
2511 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
2512
2513         * mini.c (mini_method_compile): Disable globalra for large methods for 
2514         now.
2515
2516         * regalloc2.c (order_moves): Add fp support.
2517
2518         * branch-opts.c (mono_remove_critical_edges): Split non-critical edges whose
2519         source bblock ends with an OP_BR_REG.
2520
2521         * ratests.cs: Add a new test.
2522
2523 2008-11-23  Mark Probst  <mark.probst@gmail.com>
2524
2525         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c: Disable generic code
2526         sharing.  PPC64 now passes generics.exe.
2527
2528 2008-11-23  Mark Probst  <mark.probst@gmail.com>
2529
2530         * mini-ppc64.c: Several fixes.  PPC64 now runs iltests.exe.
2531
2532 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
2533
2534         * exceptions-x86.c (mono_arch_find_jit_info): Avoid reading uninitialized
2535         memory when mono_jit_info_table_find () can't find the method in the
2536         LMF case.
2537
2538         * aot-compiler.c (mono_save_xdebug_info): Emit complete debug info for
2539         AOTed code too.
2540         
2541         * aot-compiler.c (mono_save_xdebug_info): Make this work with the assembly
2542         writer too.
2543
2544 2008-11-23  Mark Probst  <mark.probst@gmail.com>
2545
2546         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, cpu-ppc64.md:
2547         Several fixes.  PPC64 now runs exceptions.exe and
2548         devirtualization.exe.
2549
2550 2008-11-22  Mark Probst  <mark.probst@gmail.com>
2551
2552         * mini-ppc64.c, tramp-ppc64.c: Small fixes.  PPC64 now runs
2553         arrays.exe and basic-math.exe.
2554
2555 2008-11-22  Mark Probst  <mark.probst@gmail.com>
2556
2557         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c,
2558         cpu-ppc64.md: Several fixes.  PPC64 now runs objects.exe.
2559
2560 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
2561
2562         * simd-intrinsics.c: Add support ArrayExtension intrinsics.
2563
2564 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
2565
2566         * method-to-ir.c: Move bounds checking macros to ir-emit.h
2567
2568         * ir-emit.h: Move macros from method-to-ir.c to here.
2569
2570 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
2571
2572         * mini-ops.h: Correct the long simd ops to use LREG.
2573
2574 2008-11-21  Zoltan Varga  <vargaz@gmail.com>
2575
2576         * mini-ops.h: Correct the dreg type of OP_LOADI8_MEMBASE.
2577         
2578         * mini-ops.h: Correct the dreg type of a few long opcodes.
2579
2580         * mini-amd64.h: Applied patch from Mihai Chelaru <kefren@ngnetworks.ro>.
2581         Add netbsd support.
2582
2583 Fri Nov 21 12:52:23 CET 2008 Paolo Molaro <lupus@ximian.com>
2584
2585         * mini-ppc.c: remove negative stack references in epilog
2586         for platforms that don't support the red zone.
2587
2588 2008-11-21  Mark Probst  <mark.probst@gmail.com>
2589
2590         * mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved floating
2591         point regs.  Now PPC64 passes basic-calls.exe.
2592
2593 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
2594
2595         * basic-simd.cs: Add tests for accessors of Vector2l.
2596
2597 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
2598
2599         * mini-ops.h: Added OP_INSERTX_I8_SLOW,.
2600
2601         * mini-x86.c (mono_arch_decompose_long_opts): Decompose OP_INSERTX_I8_SLOW.
2602         
2603         * simd-intrinsics.c: Add support for Vector2l and Vector2ul.
2604
2605 2008-11-21  Mark Probst  <mark.probst@gmail.com>
2606
2607         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes.  Now
2608         PPC64 passes basic-long.exe.
2609
2610 2008-11-20  Mark Probst  <mark.probst@gmail.com>
2611
2612         * decompose.c: Decompose carry and overflow add on PPC64 like on
2613         other 64 bit archs.  Don't decompose sub at all on PPC64.
2614
2615         * mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c, cpu-ppc64.md:
2616         Several fixes and new opcodes.  Now PPC64 runs (but doesn't pass)
2617         basic-long.exe.
2618
2619 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
2620
2621         * basic-simd.cs: Add tests for accessors of Vector2d.
2622
2623 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
2624
2625         * mini-ops.h: Added OP_INSERTX_R8_SLOW,.
2626
2627         * cpu-x86.md: Same.
2628
2629         * mini-x86.c (mono_arch_output_basic_block): Same.
2630         
2631         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector2d.
2632
2633 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
2634
2635         * basic-simd.cs: Add tests for accessors of Vector4f.
2636
2637 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
2638
2639         * mini-ops.h: Added OP_INSERTX_R4_SLOW,.
2640
2641         * cpu-x86.md: Same.
2642
2643         * mini-x86.c (mono_arch_output_basic_block): Same.
2644         
2645         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4f.
2646
2647 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
2648
2649         * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
2650
2651 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
2652
2653         * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
2654
2655         * cpu-x86.md: Same.
2656
2657         * mini-x86.c (mono_arch_output_basic_block): Same.
2658         
2659         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
2660
2661 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
2662
2663         * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
2664
2665 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
2666
2667         * simd-intrinsics.c: Enable setters for Vector16sb.
2668
2669 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
2670
2671         * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
2672
2673         * cpu-x86.md: Same.
2674
2675         * mini-x86.c (mono_arch_output_basic_block): Same.
2676         
2677         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
2678
2679 2008-11-19  Rodrigo Kumpera  <rkumpera@novell.com>
2680
2681         * simd-intrinsics.c: Implement setter for Vector8us.
2682
2683 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
2684
2685         * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
2686         for dead variables.
2687
2688 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
2689
2690         * mini-ppc.c: remove references to the red zone in the prolog
2691         (for systems that don't support it).
2692
2693 2008-11-19  Mark Probst  <mark.probst@gmail.com>
2694
2695         * cpu-ppc64.md: Fixed a few instruction lengths.
2696
2697         * mini-ppc64.c: Don't emit SETLRET.  PPC64 passes basic-float.exe,
2698         now.
2699
2700 2008-11-19  Mark Probst  <mark.probst@gmail.com>
2701
2702         * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes.  PPC64 passes
2703         basic.exe now.
2704
2705 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
2706
2707         * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
2708
2709 2008-11-18  Rodrigo Kumpera  <rkumpera@novell.com>
2710
2711         * mini-ops.h: Added OP_INSERT_I2.
2712
2713         * cpu-x86.md: Same.
2714
2715         * mini-x86.c (mono_arch_output_basic_block): Same.
2716         
2717         * simd-intrinsics.c: Implement setter for Vector8s.
2718
2719         * simd-methods.h: Add the names of get setters of Vector8s.
2720
2721 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
2722
2723         * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
2724         
2725         * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
2726         parameters.
2727
2728         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
2729
2730 2008-11-18  Mark Probst  <mark.probst@gmail.com>
2731
2732         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
2733         for PPC64.  An empty program runs now.
2734
2735 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
2736
2737         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
2738
2739         * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
2740         a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
2741         info for JITted code is emitted into a shared library, loadable into gdb.
2742
2743 2008-11-18  Mark Probst  <mark.probst@gmail.com>
2744
2745         * Makefile.am: Changes to build PPC64.
2746
2747         * mini-arch.h: Include mini-ppc64.h on PPC64.
2748
2749 2008-11-18  Mark Probst  <mark.probst@gmail.com>
2750
2751         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
2752         in PPC code up to r119147.
2753
2754 2008-11-18  Mark Probst  <mark.probst@gmail.com>
2755
2756         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
2757         cpu-ppc64.md: Changes for PPC64.
2758
2759         Based on code submitted by andreas.faerber@web.de at
2760         https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
2761         X11/MIT license.
2762
2763 2008-11-18  Mark Probst  <mark.probst@gmail.com>
2764
2765         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
2766         cpu-ppc64.md: Copied from the corresponding PPC files from
2767         r118846.
2768
2769 2008-11-18  Scott Peterson  <lunchtimemama@novell.com>
2770
2771         * mini-ops.h: Added OP_ROUND.
2772
2773         * cpu-x86.md: Added round.
2774
2775         * mini-x86.c: Added support for intrinsicing Math.Round (double).
2776
2777         * basic-math.cs: Added test_0_round to test rounding.
2778
2779         Contributed under MIT/X11 license.
2780
2781 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
2782
2783         * aot-compiler.c : Fix the Winx64 build.
2784
2785         Contributed under MIT/X11 license.
2786
2787 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
2788
2789         * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
2790         in OP_EXTRACT_R8 to avoid possible stack corruption.
2791
2792 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
2793
2794         * mini-ops.h: Added OP_EXTRACT_R8/I8.
2795
2796         * cpu-x86.md: Added extract_r8.
2797
2798         * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
2799         
2800         * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
2801         a couple of OP_EXTRACT_I4.
2802
2803         * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
2804
2805         * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
2806
2807 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
2808
2809         * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
2810         and not 4.1. 
2811
2812 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
2813
2814         * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
2815         trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
2816
2817         * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
2818         are not needed any more.
2819
2820         * mini.h: Remove the unused INS_LIST macros.
2821
2822         * mini.c (mini_method_compile): Remove a disable globalra case which is no
2823         longer needed.
2824
2825         * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
2826         ir-emit.h.
2827
2828         * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
2829         mono_alloc_ireg () instead.
2830
2831         * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
2832         macros.
2833
2834         * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
2835         on amd64.
2836
2837         * aot-runtime.c (load_aot_module): Disable AOT when running under
2838         CAS.
2839
2840         * mini-amd64.h: Change the monitor fastpath defines to check for
2841         !PLATFORM_WIN32 so they work on *bsd too.
2842
2843         * mini.h mini.c mini-hhpa.c: Remove more unused code.
2844
2845         * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
2846
2847         * mini.h (MonoCompile): Remove new_ir flag.
2848
2849         * regalloc.h regalloc.c: Remove unused code.
2850
2851         * cpu-*.md: Remove more unused opcodes.
2852
2853         * simple-cee-ops.h simple-mini-ops.h: Removed.
2854
2855         * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
2856         
2857 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
2858
2859         * aliasing.h: Removed.
2860
2861         * *.c: Remove references to aliasing.h and inssel.h.
2862
2863         * mini.c: Remove additional unused functions.
2864
2865         * mini-ops.h cpu-*.md: Remove unused opcodes.
2866
2867 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
2868
2869         Remove the old JIT code.
2870
2871         * inssel*.brg: Removed.
2872
2873         * ssa.c abcremoval.c aliasing.c: Removed.
2874
2875         * ssa2.c: Renamed to ssa.c.
2876
2877         * abcremoval2.c: Renamed to abcremoval.c.
2878
2879         * *.c: Removed all !cfg->new_ir code.
2880
2881         * mini-<ARCH>.c: Removed mono_arch_call_opcode (), 
2882         mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
2883
2884         * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
2885         
2886 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
2887
2888         * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
2889         to simplify the code and cut back on the number of global symbols in the AOT
2890         file.
2891         
2892         * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
2893
2894 2008-11-15  Zoltan Varga  <vargaz@gmail.com>
2895
2896         * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
2897         with the got/got_info tables.
2898
2899         * mini.h: Bump AOT file format version.
2900         
2901         * unwind.h: New file, contains definitions for stack unwinding.
2902
2903         * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
2904         to cfg->unwind_ops.
2905         
2906         * aot-compiler.c: Generalize the emitting of unwind information to use the
2907         information in cfg->unwind_ops.
2908
2909         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
2910
2911         * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
2912         AOT method frames. Enable writing symbols for methods by default.
2913
2914 2008-11-14  Rodrigo Kumpera  <rkumpera@novell.com>
2915
2916         * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
2917         and make it work with vectors of element sizes 1, 2 and 4.
2918
2919         * simd-intrinsics.c: Enable getter for all vectors with element size
2920         1, 2 or 4.
2921
2922         * simd-methods.h: Add the names of other getters.
2923
2924         * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
2925
2926         * cpu-x86.md: Same.
2927
2928         * mini-x86.c: Same.
2929
2930 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
2931
2932         * mini-ppc.h: portability fix.
2933
2934 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
2935
2936         * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
2937         buggy and will overwrite it.
2938
2939 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
2940
2941         * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
2942         Use it to emit local symbols for all methods so AOTed methods show up with
2943         their full name in gdb/valgrind output.
2944
2945 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
2946
2947         * mini-ppc.c: portability fixes.
2948
2949 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
2950
2951         * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
2952         entries out of the if (!generic_shared...) code so it is always done.
2953         (mono_class_init_trampoline): Do the patching when running under valgrind
2954         too, newer versions of valgrind have no problems with it.
2955
2956 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
2957
2958         * aot-compiler.c (emit_writeout): Rework this to make it easier to add
2959         further sections.
2960
2961 2008-11-13  Mark Probst  <mark.probst@gmail.com>
2962
2963         * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
2964         filters.
2965
2966 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
2967
2968         * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui. 
2969
2970 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
2971
2972         * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
2973
2974         * cpu-x86.md: Same.
2975
2976         * mini-x86.c: Same.
2977
2978         * simd-intrinsics.c: Same.
2979
2980 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
2981
2982         * simd-intrinsics.c: Enable constructor intrinsics for all types.
2983
2984 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
2985
2986         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
2987         to work with more Vector types.
2988
2989 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
2990
2991         * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
2992         store the elemens directly instead of using and intermediate.
2993
2994 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
2995
2996         * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
2997
2998         * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
2999         to preserve %eax for aot plt trampolines.
3000
3001         * aot-compiler.c (compile_method): Don't skip synchronized methods.
3002         (encode_method_ref): Flag synchronized methods so they won't go through
3003         the AOT trampoline.
3004
3005         * aot-compiler.c: Additional work to support AOTing synchronized methods/
3006         wrappers.
3007
3008         * cpu-ia64.md (jmp): Increase max length.
3009
3010 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
3011
3012         * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
3013         open generic classes.
3014
3015         * aot-compiler.c: Enable the ELF writer on ELF platforms.
3016
3017         * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
3018         box+brtrue optimization since it causes test failures on x86.
3019
3020 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
3021
3022         * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
3023
3024         * cpu-x86.md: Same.
3025
3026         * mini-x86.c: Same.
3027
3028         * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
3029         for simd ctor values. 
3030
3031         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
3032         instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
3033
3034 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
3035
3036         * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
3037         LogicalRightShift.
3038
3039         * simd-instrincs.c: Same.
3040
3041         * basic-simd.cs: Same.
3042
3043 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
3044
3045         * ratests.cs: Add more tests.
3046
3047         * regalloc2.c (add_spill_code): Handle more corner cases.
3048
3049 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
3050
3051         * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
3052         (update_liveness): Avoid holes in the liveness ranges of hregs if they are
3053         both the source an destination of an instruction.
3054
3055 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
3056
3057         * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
3058         wapihandles.c: more portability changes.
3059
3060 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
3061
3062         * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
3063         * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
3064         safe to execute in a signal handler and the kernel provides better
3065         the info in /proc/self/smaps. Avoid the assert on sigaction during
3066         cleanup.
3067
3068 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
3069
3070         * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
3071         do the bblock linking hack if it is actually needed.
3072
3073         * Makefile.am (patch-libtool): New helper target to patch libtool to speed
3074         up linking.
3075
3076         * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
3077         crash problem is fixed.
3078
3079         * branch-opts.c (mono_remove_critical_edges): Link up newly added
3080         bblocks.
3081
3082         * mini.c (mini_method_compile): Compute unreachable bblocks properly even
3083         for catch clauses.
3084         (mini_method_compile): Set the starting value of next_vreg to 
3085         MAX_IREGS + MAX_FREGS when using globalra.
3086
3087         * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
3088         filter clauses with BB_EXCEPTION_HANDLER.
3089
3090         * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
3091
3092 2008-11-10  Mark Probst  <mark.probst@gmail.com>
3093
3094         * mini-x86.c (mono_arch_get_argument_info): Don't align argument
3095         space for stdcall.  Fixes regressions on Win32.
3096
3097 2008-11-10  Zoltan Varga  <vargaz@gmail.com>
3098
3099         * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
3100         bblocks.
3101         (linear_scan): Remove an assert which doesn't seem to be needed.
3102
3103         * local-propagation.c (mono_local_deadce): Avoid a call to
3104         MONO_DELETE_INS which would screw up the instruction linking.
3105
3106         * mini.c (mono_decompose_op_imm): Make this work with globalra.
3107
3108         * regalloc2.c: Upgrade to work the current JIT code.
3109
3110 2008-11-09  Zoltan Varga  <vargaz@gmail.com>
3111
3112         * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
3113         case.
3114
3115         * aot-runtime.c: Remove some dead code.
3116
3117         * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
3118         consistency.
3119         (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
3120
3121         * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
3122         trampolines using sscanf since atoi doesn't work on large unsigned values.
3123
3124         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): 
3125         Initialize code_size.
3126
3127 2008-11-08  Mark Probst  <mark.probst@gmail.com>
3128
3129         * method-to-ir.c (mini_emit_inst_for_method): Make
3130         Interlocked.CompareExchange work for Int arguments on 32 bit
3131         archs, as well.
3132
3133 2008-11-07  Mark Probst  <mark.probst@gmail.com>
3134
3135         * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
3136
3137 2008-11-06  Bill Holmes  <billholmes54@gmail.com>
3138
3139         * main.c Fix MSVC build.
3140
3141         Contributed under MIT/X11 license.
3142
3143 2008-11-06  Mark Probst  <mark.probst@gmail.com>
3144
3145         * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
3146         alignment larger than 8 bytes are aligned correctly, too.
3147
3148         * mini.c: Honor the min_align field of MonoClass when laying out
3149         the stack.
3150
3151 2008-11-06  Zoltan Varga  <vargaz@gmail.com>
3152
3153         * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
3154
3155         * aot-compiler.c (emit_plt): Fix a warning.
3156         
3157         * aot-compiler.c: Implement ARM support in the binary writer.
3158
3159 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
3160
3161         * basic-simd.cs: Add test for getter with byref arg.
3162         Fix the naming of a few tests.
3163         Add missing checks to a test.
3164
3165 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
3166
3167         * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
3168
3169         * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
3170         most of the full-aot support for monitor enter/exit trampolines.
3171
3172         * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
3173         enter/exit trampoline creation functions.
3174
3175         * Makefile.am: Fix the generation of buildver.h so it is not invoked during
3176         make dist.
3177
3178 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
3179
3180         * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
3181         incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
3182         implement the needed functionality without adding crap to the runtime.
3183
3184 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
3185
3186         * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
3187         non-x86 builds.
3188
3189         * mini.c (mono_build_date): New global version holding the build date in
3190         string format.
3191         
3192         * Makefile.am (buildver.c): Generate a file containing the build date.
3193
3194         * main.c: Set the build date from the generated file.
3195
3196         * mini.c (mono_get_runtime_build_info): New helper function returning build
3197         information in a string format.
3198         
3199         * driver.c (mono_main): Print the build date in --version.
3200
3201         * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
3202         file when the bind-to-runtime-version option is used.
3203
3204 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
3205
3206         * simd-intrinsics.c: Fix bug when using getters and byref args. 
3207
3208 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
3209
3210         * simd-methods.h: Rename prefetch methods.
3211
3212         * simd-intrinsics.c: Same.      
3213
3214 2008-11-05  Mark Probst  <mark.probst@gmail.com>
3215
3216         * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
3217         sizes.
3218
3219 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
3220
3221         * aot-compiler.c: Use the bundled elf header files instead of depending on
3222         the system one.
3223         
3224         * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
3225         mempool.
3226
3227         * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
3228         on every call.
3229
3230 2008-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
3231
3232         * cpu-x86.md: Add store nta ops.
3233
3234         * mini-ops.h: Same.
3235
3236         * mini-x86.c: Same.
3237
3238         * mini.h: Add an enum for simd prefetch modes.
3239
3240         * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
3241         of store. Use the changed code to support store nta.
3242
3243         * simd-intrinsics.c: Add prefetch ops for all vector types.
3244
3245 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
3246
3247         * aot-compiler.c: Add an option for JIT compiling the methods by multiple 
3248         threads.
3249         
3250         * aot-compiler.c: Use statically allocated buffers for constructing symbol 
3251         names.
3252
3253         * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
3254         trampolines.
3255
3256 2008-11-04  Mark Probst  <mark.probst@gmail.com>
3257
3258         * mini-x86.c: Fixed commit.
3259
3260 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
3261
3262         * aot-compiler.c (emit_plt): Align the plt section only on x86.
3263
3264 2008-11-04  Mark Probst  <mark.probst@gmail.com>
3265
3266         * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
3267         and MONITOR_EXIT, for the ASM fastpaths.
3268
3269         * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
3270         available.
3271
3272         * mini.c, patch-info.h: Signature and patch infos for
3273         Monitor.Enter/Exit trampolines.
3274
3275         * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
3276
3277         * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
3278         Monitor.Enter/Exit ASM fastpath for Linux.
3279
3280 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
3281
3282         * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
3283
3284         * objects.cs: Add a new test.
3285         
3286         * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
3287
3288         * aot-runtime.c (load_method): Run class initialization in the PLT case even
3289         if MONO_LOG_LEVEL is set.
3290
3291         * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
3292
3293         * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
3294
3295         * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
3296         
3297         * aot-compiler.c: Change the relocation code to use virtual addresses instead
3298         of file offsets. Align the sections belonging to the data segment to 
3299         PAGESIZE.
3300
3301 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
3302
3303         * aot-compiler.c: Simplify the elf writer by depending on the definitions in
3304         elf.h. Port it to amd64.
3305
3306 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
3307
3308         * driver.c: Enable SIMD by default.
3309
3310 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
3311
3312         * cpu-x86.md: Add prefetch op.
3313
3314         * mini-ops.h: Same.
3315
3316         * mini-x86.c: Same.
3317
3318         * mini.h: Add an enum for simd prefetch modes.
3319
3320         * simd-methods.h: Add prefetch function names.
3321
3322         * simd-intrinsics.c: Add prefetch ops for all vector types.
3323
3324 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
3325
3326         * aot-compiler.c (emit_bytes): Speed this up a little.
3327
3328 2008-11-02  Zoltan Varga  <vargaz@gmail.com>
3329
3330         * aot-compiler.c: Add JIT time etc. statistics.
3331         
3332         * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
3333
3334         * mini.h (MonoCompile): Add 'got_offset' field.
3335
3336         * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
3337         method_got_offsets array.
3338
3339         * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
3340         wrappers.
3341
3342         * aot-compiler.c (compile_method): Add generic method instances referenced
3343         by the method to the list of methods to be compiled, this is required so if
3344         A<T> references B<T>, and another assembly references A<int>, then it will
3345         also get a copy of B<int>.
3346
3347         * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
3348         when checking for monitor enter/exit.
3349
3350 2008-10-30  Mark Probst  <mark.probst@gmail.com>
3351
3352         * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
3353         for Monitor.Enter and Monitor.Exit if enabled.
3354
3355         * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
3356         Solaris.
3357
3358 2008-10-30  Zoltan Varga  <vargaz@gmail.com>
3359
3360         * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
3361         of an OP_MOVE. Fixes #440046.
3362
3363         * basic-long.cs: Add a new test.
3364
3365 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
3366
3367         * mini.h: Add synchronization note for the managed counter-part.
3368
3369         * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
3370         returns the simd caps of the current cpu.
3371
3372 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
3373
3374         * basic-simd.cs: Remove Console.WriteLine.
3375
3376 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
3377
3378         * basic-simd.cs: New tests for Vector2ul.
3379
3380 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
3381
3382         * simd-intrinsics.c: Add new vector type Vector2ul.
3383
3384 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
3385
3386         * basic-simd.cs: New tests for Vector2l.
3387
3388 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
3389
3390         * cpu-x86.md: Add long version of most packed int ops.
3391
3392         * mini-ops.h: Same.
3393
3394         * mini-x86.h: Same.
3395
3396         * simd-intrinsics.c: Add new vector type Vector2l.
3397
3398 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
3399
3400         * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
3401
3402         * simd-methods.h: Remove SN_op_BitwiseXor.
3403
3404 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
3405
3406         * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
3407         alignment.
3408
3409 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
3410
3411         * basic-simd.cs: Test for Vector2d.
3412
3413         * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
3414         value.
3415
3416 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
3417
3418         * cpu-x86.md: Add double version of all packed float ops.
3419
3420         * mini-ops.h: Same.
3421
3422         * mini-x86.h: Same.
3423
3424         * simd-intrinsics.c: Add new vector type Vector2d.
3425
3426         * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
3427
3428         * simd-methods.h: Add Duplicate.
3429
3430 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
3431
3432         * basic-simd.cs: Test for packing with signed saturation.
3433
3434 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
3435
3436         * aot-compiler.c (add_generic_instances): Add all methods of generic instances
3437         found in the TYPESPEC table.
3438
3439 2008-10-26  Zoltan Varga  <vargaz@gmail.com>
3440
3441         * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
3442         too.
3443
3444         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
3445
3446         * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
3447         instead of the RVA, since the RVA can be changed by tools like the cil 
3448         stripper.
3449
3450         * method-to-ir.c (mono_method_to_ir2): Ditto.
3451
3452         * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
3453         (deserialize_variable): Ditto.
3454
3455 2008-10-25  Martin Baulig  <martin@ximian.com>
3456
3457         * debug-mini.c (write_variable): Use
3458         `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
3459
3460 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
3461
3462         * cpu-x86.md: Add unsigned variants of packd and packw.
3463
3464         * mini-ops.h: Same.
3465
3466         * mini-x86.h: Emit the right instruction for packd and packw.
3467         Add unsigned variants of packd and packw.
3468
3469         * simd-intrinsics.c: Packd and packw were used in place of their
3470         unsigned variants. Change that.
3471         Add intrinsics for (Signed)PackWithSignedSaturation.
3472
3473         * simd-methods.h: Add (Signed)PackWithSignedSaturation.
3474
3475 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
3476
3477         * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
3478
3479 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
3480
3481         * mini-ops.h: Remove dword packed add/sub with saturation ops.
3482
3483         * cpu-x86.md: Remove dword packed add/sub with saturation ops.
3484
3485         * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
3486         sse instructions.
3487
3488         * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
3489
3490 2008-10-24  Mark Probst  <mark.probst@gmail.com>
3491
3492         * method-to-ir.c, mini.c: Special casing for the synchronized
3493         wrapper for the ldtoken+GetTypeFromHandle case.
3494
3495 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
3496
3497         * mini.c (mono_replace_ins): Move this to branch-opts.c.
3498
3499         * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
3500         created/split bblocks.
3501
3502 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
3503
3504         * mini-ops.h: Add packed signed mul high.
3505         
3506         * cpu-x86.md: Same.
3507
3508         * mini-x86.c (mono_arch_output_basic_block): Same.
3509
3510         * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
3511
3512         * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
3513
3514 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
3515
3516         * basic-simd.cs: Tests for Vector16sb.
3517
3518 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
3519
3520         * inssel.brg (stmt): Fix OP_HARD_NOP rule.
3521
3522 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
3523
3524         * mini-ops.h: Add packed signed min, max and compare greater.
3525         
3526         * cpu-x86.md: Same.
3527
3528         * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
3529         saturation.
3530
3531         * simd-methods.h: Add CompareGreaterThan.
3532
3533         * simd-methods.h: Remove CompareEquals.
3534
3535         * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
3536
3537         * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
3538
3539         * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
3540         CompareEqual.
3541
3542 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
3543
3544         * basic-simd.cs: Fix tests due to change in the API.
3545
3546 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
3547
3548         * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
3549
3550 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
3551
3552         * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
3553
3554         * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
3555         inst_offset as this has invalid values for LDADDR.
3556
3557 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
3558
3559         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
3560
3561         * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
3562
3563 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
3564
3565         * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
3566         for accessing field->data.
3567
3568 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
3569
3570         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
3571
3572 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
3573
3574         * simd-methods.h: Add SignedPackWithUnsignedSaturation.
3575
3576         * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
3577
3578 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
3579
3580         * dominators.c (mono_compute_natural_loops): Allocate GList enties
3581         from the cfg mempool.
3582
3583 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
3584
3585         * basic-simd.cs: Tests for new methods in Vector8us.
3586
3587 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
3588
3589         * mini-ops.h: Add multiply and store high.
3590         
3591         * cpu-x86.md: Same.
3592
3593         * mini-x86.c (mono_arch_output_basic_block): Same.
3594
3595         * simd-methods.h: Same.
3596
3597         * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
3598         and CompareEqual.
3599
3600 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
3601
3602         * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
3603         mono_class_setup_vtable ().
3604
3605         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
3606         mono_class_get_vtable_entry () for accessing klass->vtable.
3607
3608         * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
3609
3610         * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
3611         found.
3612
3613         * method-to-ir.c (mono_save_token_info): Don't save references made from
3614         wrappers.
3615
3616         * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
3617         of generic instances.
3618
3619         * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
3620
3621 2008-10-19  Mark Probst  <mark.probst@gmail.com>
3622
3623         * cpu-ppc.md, mini-ppc.c: The length of the code generated for
3624         OP_JMP depends on the method signature.  Calculate it properly.
3625
3626 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
3627         
3628         * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
3629         called directly.
3630
3631         * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
3632         instances.
3633         (emit_extra_methods): Add another table mapping method indexes to 
3634         offsets in the extra_method_info table.
3635
3636         * mini.h: Bump AOT file format version.
3637         
3638         * aot-runtime.c: Merge most of the code from mono_aot_get_method
3639         and mono_aot_get_method_from_token () into one function.
3640
3641 2008-10-19  Mark Probst  <mark.probst@gmail.com>
3642
3643         * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
3644         separate counter.
3645
3646 2008-10-18  Zoltan Varga  <vargaz@gmail.com>
3647
3648         * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
3649         methods.
3650
3651         * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
3652         disable_aot.
3653
3654         * mini.c (mono_patch_info_equal): Compare the generic context as well.
3655
3656         * mini.h: Bump aot file format version.
3657
3658         * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
3659         AOT file can contain native code for methods which are not in the METHOD
3660         table. Generate code for non-sharable generic instances of generic methods
3661         found in the METHODSPEC table.
3662         
3663         * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
3664         encoding generic type handles.
3665
3666         * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
3667         (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
3668
3669         * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
3670         macros + MONO_ADD_INS.
3671
3672         * mini.c (mono_jump_info_token_new2): New function which takes a generic
3673         context as well.
3674
3675         * mini.h (MonoJumpInfoToken): Include fields for a generic context.
3676
3677         * mini.h: Bump aot file format version.
3678
3679         * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
3680
3681 2008-10-17  Mark Probst  <mark.probst@gmail.com>
3682
3683         * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
3684         platforms, with definable stack alignment value.  Set to 16 now
3685         for all platforms.
3686
3687         * mini.c, mini.h, driver.c: Command line option for disabling
3688         stack alignment.
3689
3690 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
3691
3692         * basic-simd.cs: Tests for new methods in Vector4ui.
3693
3694 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
3695
3696         * mini-ops.h: Add packed int shuffle.
3697         
3698         * cpu-x86.md: Same.
3699
3700         * mini-x86.c (mono_arch_output_basic_block): Same.
3701
3702         * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
3703         extract mask, max, min, shuffle.
3704
3705         * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
3706
3707 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
3708
3709         * basic-simd.cs: Tests for new methods in Vector8us.
3710
3711 2008-10-17  Mark Probst  <mark.probst@gmail.com>
3712
3713         * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
3714         RuntimeTypeHandle, not a TypedReference.
3715
3716 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
3717
3718         * simd-intrinsics.c: remove relocations.
3719
3720 2008-10-17  Zoltan Varga  <vargaz@gmail.com>
3721
3722         * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM 
3723         optimizations from the x86 backend.
3724
3725 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
3726
3727         * simd-methods.h, simd-intrinsics.c: debloat method names and
3728         prepare for no relocations.
3729
3730 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
3731
3732         * mini-ops.h: Add packed min/equal and sum of absolute differences.
3733         
3734         * cpu-x86.md: Same.
3735
3736         * mini-x86.c (mono_arch_output_basic_block): Same.
3737
3738         * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
3739         extract mask, max, min and sum of absolute differences.
3740
3741         * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
3742         method name.
3743
3744 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
3745
3746         * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
3747         Renamed one test for consistency.
3748
3749 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
3750
3751         * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
3752         fix to the code that deal with other blocks.
3753
3754 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
3755
3756         * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
3757
3758 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
3759
3760         * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
3761         that deals with vreg interference. Explicitly check for OP_LDADDR to be
3762         able to process the source reg.
3763
3764 2008-10-16  Martin Baulig  <martin@ximian.com>
3765
3766         * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
3767
3768         * inssel.brg: Add `OP_HARD_NOP'.
3769
3770         * mini.h (MonoCompile): Added `keep_cil_nops' flag.
3771
3772         * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
3773         `OP_HARD_NOP' instruction when running inside the debugger.
3774
3775         * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
3776         `OP_HARD_NOP' instruction when running inside the debugger.
3777
3778 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
3779
3780         * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
3781         now works. The issue with the regalloc tripping up no longer
3782         happens.
3783
3784         * simd-intrinsics.c (load_simd_vreg): Same.
3785
3786 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
3787         
3788         * basic-simd.cs: Tests for new Vector8ui methods.
3789
3790 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
3791
3792         * simd-intrinsics.c (get_simd_vreg): Simplify code and test
3793         only for type. This fixes crashes where MonoInst::klass is checked
3794         for ops of type != VTYPE or OBJ.
3795
3796         * simd-intrinsics.c (load_simd_vreg): Same.
3797
3798 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
3799
3800         * mini-ops.h: Add ops for packed shuffle/max/avg and
3801         extract mask.
3802         
3803         * cpu-x86.md: Same.
3804
3805         * mini-x86.c (mono_arch_output_basic_block): Same.
3806
3807         * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
3808         extract mask.
3809
3810         * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
3811         to emit extract mask op.
3812
3813         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
3814         to emit word shuffles.
3815
3816 2008-10-15  Mark Probst  <mark.probst@gmail.com>
3817
3818         * mini.c (mono_allocate_stack_slots_full): Align stack frame to
3819         the largest alignment needed by a variable, but at least
3820         sizeof(gpointer).
3821
3822 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
3823
3824         * basic-simd.cs: Tests for the fixes in the last commit.
3825
3826 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
3827
3828         * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
3829         no longer handles STACK_PTR input.
3830
3831         * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
3832
3833         * simd-intrinsics.c (load_simd_vreg): New function that works like 
3834         get_simd_vreg   but handles STACK_PTR input.
3835
3836         * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
3837         as the input can be an arbitrary pointer.
3838
3839         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
3840         LDADDR local optimization directly otherwise use a store op.
3841
3842 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
3843
3844         * basic-simd.cs: Tests for dup low and dup high.
3845
3846 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
3847
3848         * mini-ops.h: Add dup low and dup high ops.
3849         
3850         * cpu-x86.md: Same.
3851
3852         * mini-x86.c (mono_arch_output_basic_block): Same.
3853
3854         * simd-intrinsics.c (vector4f_intrinsics): Same.
3855
3856 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
3857
3858         * basic-simd.cs: Tests for recently added functionality.
3859
3860 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
3861
3862         * mini-ops.h: Add remaining sse1 fp ops.
3863         
3864         * cpu-x86.md: Add remaining sse1 fp ops.
3865
3866         * mini-x86.c (mono_arch_output_basic_block): Same.
3867
3868         * mini.h: Add enum for simd FP compare conditions.
3869
3870         * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
3871
3872         * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
3873         so the backed can generate the appropriate op.
3874
3875 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
3876         This patch squeese one more byte from the SimdIntrinsc struct.
3877
3878         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
3879         a a shift amount intead of simply or'ing it.
3880
3881         * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
3882
3883         * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
3884         byte so we can have an aditional flags field without increasing struct size.
3885
3886         * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
3887         against the simd_supported_versions bitmask.
3888
3889         * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
3890
3891 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
3892
3893         * mini.c: remove rawbuffer code (the only use here is unsafe because
3894         it takes locks during signal handling and the kernel now provides much
3895         better info in proc/pid/smaps these days).
3896
3897 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
3898
3899         * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
3900         OP_X86_PUSH_OBJ. Fixes #434620.
3901
3902         * objects.cs: Add a test.
3903         
3904 2008-10-12  Rodrigo Kumpera  <rkumpera@novell.com>
3905
3906         * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
3907         that the packuswb/packusdw don't work with unsigned numbers for what
3908         would be negative numbers in signed format.
3909
3910         * cpu-x86.md: Add doubleword forms of many ops and packing ones.
3911         Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
3912
3913         * mini-ops.h: Add doubleword forms of many ops and packing ones.
3914
3915         * mini-x86.c: Emit doubleword forms of many ops and packing ones.
3916
3917         * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
3918
3919         * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
3920
3921         * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
3922         add more ops.
3923
3924         * simd-intrinsics.c (simd_version_name): New function, returns the name of the
3925         version as the enum in mini.h.
3926
3927         * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
3928         for sse3 ops, check the simd_version field if present. This way the code
3929         works with all versions of sse.
3930
3931 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
3932
3933         * simd-intrinsics.c: Fixed intrinsic name typo.
3934
3935         * mini.h: Added missing simd exported function.
3936
3937         * basic-simd.cs: Added tests for Vector4ui.
3938         Fixed broken test for Vector16b.
3939
3940 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
3941
3942         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
3943         the max length to 64.
3944
3945 2008-10-10  Mark Probst  <mark.probst@gmail.com>
3946
3947         * method-to-ir.c: Only do the fast virtual generic method call for
3948         non-wrapper methods.
3949
3950         * mini.h, mini-trampolines.c: The new generic virtual remoting
3951         trampoline handles virtual method calls via the vtable (as done by
3952         the fast virtual generic method calls) to remoting proxies.
3953
3954         * mini.c (mono_jit_create_remoting_trampoline): For generic
3955         methods reate a generic virtual remoting trampoline.
3956
3957         * mini-amd64.h: Enable fast virtual generic method calls again.
3958
3959 2008-10-10  Mark Probst  <mark.probst@gmail.com>
3960
3961         * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
3962         restore registers when doing tail calls.
3963
3964 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
3965
3966         * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
3967         Vector4ui.
3968
3969 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
3970
3971         * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
3972
3973 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
3974
3975         * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
3976
3977 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
3978
3979         * basic-simd.cs: Retrofit for API changes.
3980
3981 2008-10-10  Mark Probst  <mark.probst@gmail.com>
3982
3983         * mini-ppc.c: Handle integer stack arguments for tail calls.
3984
3985 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
3986
3987         * optflags-def.h: Removed sse3 optimization.
3988
3989         * driver.c: Same.
3990
3991         * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
3992         sse3.
3993
3994         * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
3995
3996         * mini.h: Added enumeration with simd versions.
3997
3998         * simd-intrinsics.c (emit_intrinsics): Use the new static var
3999         for detecting SSE3.
4000
4001         * simd-intrinsics.c: Added mono_simd_intrinsics_init.
4002
4003         * mini.c (mini_init): Call mono_simd_intrinsics_init.
4004
4005 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
4006
4007         * basic-simd.cs: Added tests for Vector8u and Vector16u.
4008
4009         * basic-simd.cs: Fixed test naming.
4010
4011 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
4012
4013         * mini-ops.h: Added ops for packed and saturated math, shifts
4014         and packing/unpacking.
4015
4016         * cpu-x86.md: Added descriptors for the above ops.
4017
4018         * mini-x86.c: Added code to emmit the above ops.
4019
4020         * simd-intrinsics.c: Added support for Vector16u and Vector8u.
4021
4022 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
4023
4024         * aot-compiler.c (compile_method): Enable AOT for generic code.
4025
4026         * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
4027
4028 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
4029
4030         * mini.c: add a workaround for a common screwup that ends up blamed
4031         to mono (other processes blocking signal delivery).
4032
4033 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
4034
4035         * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
4036         in the LDFLD/STFLD opcodes. Fixes #432673.
4037
4038         * iltests.il.in: Add a new test.
4039
4040 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
4041
4042         * mini-arm.c: attach the thread in unmanaged->managed transitions
4043         using delegates (bug #433148).
4044
4045 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
4046
4047        * basic-simd.cs: Use new ShuffleSel constants.
4048
4049 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
4050
4051         * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
4052
4053         * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
4054         only disable simd intrinsics if no sse2 is detected.
4055
4056         * optflags-def.h: Added sse3.
4057
4058         * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
4059         is disabled.
4060
4061 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
4062
4063         * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
4064         when adding delegate-invoke wrappers.
4065
4066 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
4067
4068         * Makefile.am: Reenable the simd tests.
4069
4070 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
4071
4072         * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
4073           add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
4074           other vreg is allocated to that hreg.
4075
4076         Contributed under MIT/X11 license.
4077
4078 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
4079
4080         * Makefile.am: Disable the simd tests for now as Mono.Simd is not
4081         yet checked in.
4082
4083 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
4084
4085         * basic-simd.cs: New test suite for SIMD intrinsics.
4086
4087         * Makefile.am: Added new tests.
4088
4089 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
4090
4091         * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
4092
4093         * mini-ops.h: Same.
4094
4095         * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
4096
4097         * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
4098         using SSE2 aware opcodes.
4099
4100         * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
4101         is enabled, this code path is only reachable if conversion ops are emmited after
4102         mono_method_to_ir.
4103
4104         * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
4105
4106         This optimization saves 6 bytes per conversion against the old version.
4107
4108 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
4109
4110         * aot-compiler.c (compile_method): Don't skip methods referencing 
4111         generic methods without a corresponding entry in token_info_hash, since
4112         encode_method_ref () can handle all generic methods now.
4113
4114         * method-to-ir.c (mono_save_token_info): Don't save the token info if a 
4115         generic context is set.
4116         
4117         * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
4118         generic sharing of LDTOKEN.
4119
4120 2008-10-06  Mark Probst  <mark.probst@gmail.com>
4121
4122         * mini-amd64.h: Temporarily disabled fast virtual generic method
4123         calls because it breaks the System.Runtime.Remoting tests.
4124
4125 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
4126
4127         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
4128
4129         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
4130         so inlining actually works.
4131         (check_inline_caller_method_name_limit): Ditto.
4132
4133 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
4134
4135         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
4136         64 bit safety (from Olaf Hering and Andreas Färber).
4137
4138 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
4139         
4140         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
4141         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
4142         unused virtual call support code.
4143
4144         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
4145         
4146         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
4147         which can't use aot trampolines.
4148         (decode_patch): Don't create aot trampolines for methods which can't use
4149         them.
4150
4151         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
4152         use aot trampolines.
4153
4154         * mini.h: Bump AOT image format version.
4155         
4156 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
4157
4158         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
4159         to save_token_info () since cmethod is inflated for constrained calls.
4160
4161         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
4162
4163 2008-10-04  Andreas Färber  <andreas.faerber@web.de>
4164
4165         * Makefile.am: Add build rules for ppc64.
4166         This avoids the build failing at pedump with unresolved symbols
4167         due to lack of arch_sources. Instead it will now fail earlier
4168         due to lack of cpu-ppc64.md.
4169
4170         Contributed under MIT/X11 license.
4171
4172 2008-10-04  Mark Probst  <mark.probst@gmail.com>
4173
4174         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
4175         tail calls.
4176
4177         * iltests.il.in: Add test case for tail call with many arguments.
4178
4179 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
4180
4181         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
4182         to the fast virtual generic method code until the aot case is fixed.
4183
4184 2008-10-03  Mark Probst  <mark.probst@gmail.com>
4185
4186         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
4187
4188 2008-10-03  Mark Probst  <mark.probst@gmail.com>
4189
4190         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
4191         thunks.
4192
4193 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
4194         
4195         * simd-intrinsics.c: Forgot to add this one.
4196
4197         * mini-codegen.c: Fix macro in case SIMD is not supported.
4198
4199 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
4200         
4201         This patch land initial JIT support for simd intrinsics.
4202
4203         * mini-x86.h: Added new define to make --enable_minimal work on x86.
4204
4205         * Makefile.am: Added simd-intrinsics.c
4206
4207         * simd-intrinsics.c: New file with simd instrinsic related
4208         code.
4209
4210         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
4211
4212         * cpu-x86.md: Add simd related instructions.
4213
4214         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
4215
4216         * driver.c: Added two new --regression variants.
4217
4218         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
4219
4220         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
4221
4222         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
4223         extract some complicated logic to helper functions.
4224
4225         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
4226
4227         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
4228
4229         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
4230         the specialized simplification pass.
4231
4232         * method-to-ir.c (mono_spill_global_vars): Use new macro.
4233
4234         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
4235
4236         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
4237         table.
4238
4239         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
4240         if MONO_ARCH_NEED_SIMD_BANK is defined.
4241
4242         * mini-ops.h: Added the new simd ops.
4243
4244         * mini-x86.c: Added mono_arch_xregname.
4245
4246         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
4247
4248         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
4249
4250         * mini-x86.h: Define simd related MONO_ARCH macros.
4251
4252         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
4253
4254         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
4255
4256         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
4257         MONO_CLASS_IS_SIMD to deal with simd related IR.
4258
4259         * mini.h (MonoInst): Added spill_var to the backend union.
4260
4261         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
4262
4263         * mini.h: Added forward declarations of the new simd fuctions.
4264
4265         * optflags-def.h: Added new optimization names SIMD.
4266
4267         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
4268
4269         * regalloc.h: Added support for working with 3 register banks.
4270
4271         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
4272
4273         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
4274
4275 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
4276
4277         * mini-exceptions.c: remove 64 bit related ifdef clutter.
4278
4279 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
4280
4281         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
4282         instead of one on 64 bit systems.
4283
4284         * method-to-ir.c: Remove unused includes.
4285
4286 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
4287
4288         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
4289         cfg->used_int_regs, since the two are different on arm.
4290
4291 2008-10-02  Mark Probst  <mark.probst@gmail.com>
4292
4293         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
4294         mono_method_get_vtable_index() to get the vtable index.
4295
4296 2008-10-02  Mark Probst  <mark.probst@gmail.com>
4297
4298         * method-to-ir.c (mono_method_to_ir2): Don't create native
4299         wrappers for array methods, because they're never called (and if
4300         they were called they wouldn't work).
4301
4302 2008-10-02  Mark Probst  <mark.probst@gmail.com>
4303
4304         * method-to-ir.c (mono_method_to_ir2): Array methods are
4305         special-cased and must not be invoked indirectly via the (M)RGCTX
4306         when generic sharing is turned on.  Fixes #431413.
4307
4308 2008-10-01  Mark Probst  <mark.probst@gmail.com>
4309
4310         * method-to-ir.c: When generic sharing is active, call
4311         non-interface virtual generic methods via the standard trampoline.
4312
4313         * mini-trampolines.c: Handle virtual generic shared methods.
4314
4315         * mini.h, mini-x86.c, mini-x86.h: New argument for
4316         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
4317         method thunks and which is the trampoline to call if the lookup
4318         fails.  Enable the virtual generic method thunk for x86.
4319
4320         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
4321         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
4322         argument but assert that it's NULL, because these archs don't yet
4323         implement the virtual generic method thunk.  Changes in the IMT
4324         thunk data structures.
4325
4326 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
4327
4328         * aot-compiler.c (emit_globals): Avoid invalid characters in
4329         the static linking symbol.
4330
4331         * objects.cs: Add a test for the range check optimization. Fix warnings.
4332
4333         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
4334         optimization from the current JIT.
4335
4336         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
4337         later in decompose_array_access_opts () to allow more optimizations.
4338
4339         * method-to-ir.c (mono_handle_soft_float): Rename this to 
4340         mono_decompose_soft_float () for consistency.
4341
4342         * mini-ops.h: Fix arguments of OP_STRLEN.
4343
4344         * method-to-ir.c (save_cast_details): Extract the cast details saving code
4345         into a separate function.
4346         (reset_cast_details): Ditto.
4347         (handle_unbox): Save cast details. Fixes #431254.
4348
4349         * method-to-ir.c: Remove some obsolete FIXMEs.
4350
4351 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
4352
4353         * ir-emit.h (alloc_dreg): Write a warning before crashing.
4354
4355 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
4356
4357         * mini-codegen.c: More work on macros to make them
4358         ready for multiple regbanks.
4359
4360 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
4361
4362         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
4363
4364         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
4365
4366 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
4367
4368         * mini-codegen.c (mono_spillvar_offset): Proper support for
4369         multiple regbanks.
4370
4371 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
4372
4373         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
4374         the stack overflow changes.
4375
4376 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
4377
4378         * mini-codegen.c: Make all bank macros depend on reg_bank.
4379
4380         * mini-codegen.c (mono_local_regalloc): Make free mask
4381         initialization regbank aware.
4382
4383 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
4384
4385         * mini-codegen.c (mono_local_regalloc): Extract callee
4386         mask selection to a function and make it regbank aware.
4387
4388 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
4389
4390         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
4391         code to deal with many regbanks.
4392
4393 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
4394
4395         * mini-codegen.c: More fp->regbank changes.
4396
4397 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
4398
4399         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
4400         of a hardcoded constant.
4401
4402 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
4403
4404         * method-to-ir.c (type_from_stack_type): Fix typo.
4405
4406 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
4407
4408         * mini-ia64.c (emit_move_return_value): Convert float return values to
4409         double.
4410
4411         * objects.cs: Add a new test.
4412         
4413         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
4414         VARARG methods to fix an assert later.
4415
4416         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
4417         end so it at least compiles.
4418
4419 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
4420
4421         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
4422
4423 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
4424
4425         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
4426         optimization to a new function (emit_optimized_ldloca_ir) and enable
4427         it for both ldloca and ldloca_s.
4428
4429 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
4430
4431         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
4432         gshared CASTCLASS code.
4433
4434         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
4435         amd64, where the libc stack unwinder encounters stack frames referring to
4436         native code in unmapped memory.
4437
4438         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
4439         sharing.
4440
4441         * generics.cs: Add new test.
4442
4443 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
4444
4445         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
4446         add a check that one of the ARM_FPU_ constants is defined.
4447
4448         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
4449         
4450         * mini-exceptions.c: Fix build on non-altstack platforms.
4451
4452         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
4453         sharing of vtypes.
4454
4455         * ir-emit.h: Add a comment to NEW_PCONST.
4456
4457         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
4458
4459         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
4460
4461         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
4462         after the changes to MonoJitDomainInfo.
4463
4464 2008-09-27  Mark Probst  <mark.probst@gmail.com>
4465
4466         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
4467
4468 2008-09-27  Mark Probst  <mark.probst@gmail.com>
4469
4470         * mini-ppc.c: Compiler warning fixes.
4471
4472 2008-09-27  Mark Probst  <mark.probst@gmail.com>
4473
4474         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
4475         for pinvokes.
4476
4477 2008-09-27  Mark Probst  <mark.probst@gmail.com>
4478
4479         * exceptions-ppc.c, mini-ppc.h: Compile
4480         mono_arch_handle_altstack_exception() on Darwin, too.
4481
4482 2008-09-27  Mark Probst  <mark.probst@gmail.com>
4483
4484         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
4485         work on archs which don't have generic sharing implemented, only
4486         without the vtable_arg.
4487
4488 2008-09-26  Mark Probst  <mark.probst@gmail.com>
4489
4490         * mini.c: Added comment explaining why delegate ctor icall
4491         wrappers are compiled.
4492
4493 2008-09-26  Mark Probst  <mark.probst@gmail.com>
4494
4495         * mini.c: Don't produce trampolines to delegate ctor icall
4496         wrappers but compile them upfront.
4497
4498 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
4499
4500         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
4501         runtime-set function when going back to managed code. Currently this
4502         is used to set back the protection on the soft ovf pages and/or to
4503         throw the stack overflow exception that happened in unmanaged code.
4504
4505 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
4506
4507         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
4508         runtime-set function when going back to managed code. Currently this
4509         is used to set back the protection on the soft ovf pages and/or to
4510         throw the stack overflow exception that happened in unmanaged code.
4511
4512 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
4513
4514         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
4515         the support code for restoring stack protection after stack overflows
4516         that happen in unmanaged code. Don't set the exec permission on the
4517         soft overflow area.
4518
4519 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
4520
4521         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
4522         delegate->method_ptr is set. Fixes #428054.
4523
4524 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
4525
4526         * tests.cs: Rename to ratests.cs.
4527
4528         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
4529         emit_get_rgctx_... functions.
4530
4531 2008-09-25  Mark Probst  <mark.probst@gmail.com>
4532
4533         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
4534
4535 2008-09-25  Mark Probst  <mark.probst@gmail.com>
4536
4537         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
4538         before asserting that method is sharable.
4539
4540 2008-09-25  Mark Probst  <mark.probst@gmail.com>
4541
4542         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
4543         whether method needs a static RGCTX wrapper used instead of
4544         complex conditions.
4545
4546         * generic-sharing.c, mini.h: A few functions moved to
4547         metadata/generic-sharing.c.
4548
4549 2008-09-25  Mark Probst  <mark.probst@gmail.com>
4550
4551         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
4552         Generic code sharing for value types, which essentially means
4553         treating value type methods like static methods.  The RGCTX is
4554         passed in the same way.
4555
4556 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
4557
4558         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
4559         opcode when creating multi-dimensional arrays of open types.
4560
4561         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
4562         open generic types.
4563
4564         * generics.cs: Add a test.
4565
4566         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
4567
4568 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
4569
4570         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
4571
4572         * mini.c (mini_method_compile): Set it when running under the debugger. 
4573
4574         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
4575         vreg optimization if the flag is set.
4576
4577         * driver.c (mono_main): Add --attach= option to pass options to
4578         the attach agent.
4579
4580         * mini.c (sigquit_signal_handler): Start the attach agent.
4581
4582         * ssapre.c: Disable this to save space since it is not yet ported to
4583         linear IR.
4584
4585         * regalloc2.c: Disable this to save space.
4586
4587         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
4588
4589 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
4590
4591         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
4592         the -v option useful again.
4593
4594 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
4595
4596         * mini-amd64.c (mono_arch_output_basic_block): Add support for
4597         --break-at-bb.
4598
4599         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
4600         arrays of arrays. Fixes #428406.
4601
4602         * method-to-ir.c (mini_emit_castclass): Ditto.
4603
4604         * objects.cs: Add new test.
4605         
4606 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
4607
4608         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
4609         was wrong at it choked against target_type_is_incompatible for byref types.
4610
4611 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
4612
4613         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
4614         places.
4615
4616 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
4617
4618         * mini-exceptions.c: update a few more exceptions-related counters.
4619
4620 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
4621
4622         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
4623         new functions to allocate from persistent mempools.
4624
4625 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
4626
4627         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
4628         multiple register banks in the future.
4629
4630         * mini-codegen.c (mono_local_regalloc): Fix a warning.
4631
4632 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
4633
4634         * mini.c (type_to_eval_stack_type): Remove duplicated function.
4635
4636         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
4637
4638         * mini.h: Export type_to_eval_stack_type.
4639
4640         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
4641         is only ins->klass of byref types.
4642
4643 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
4644
4645         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
4646         (mini_emit_memcpy2): Ditto.
4647
4648         * mini-amd64.c: Fix a warning.
4649
4650 2008-09-21  Mark Probst  <mark.probst@gmail.com>
4651
4652         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
4653         linking.
4654
4655 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
4656
4657         * method-to-ir.c: Extract stloc micro-optimization to a
4658         function and apply it to all cases.
4659
4660 2008-09-19  Mark Probst  <mark.probst@gmail.com>
4661
4662         * method-to-ir.c: Don't fail generic code sharing in cases we
4663         already support.
4664
4665 2008-09-18  Mark Probst  <mark.probst@gmail.com>
4666
4667         * mini-ppc.c: Handle structs in tailcalls on Darwin.
4668
4669 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
4670
4671         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
4672         implementation.
4673
4674 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
4675
4676         * trace.c: make tracing more useful and correct, with per-thread
4677         id and indent info.
4678
4679 2008-09-15  Mark Probst  <mark.probst@gmail.com>
4680
4681         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
4682         doing a method call and the argument is an R4.
4683
4684 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
4685
4686         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
4687         generic methods.
4688
4689 2008-09-13  Mark Probst  <mark.probst@gmail.com>
4690
4691         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
4692
4693 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
4694
4695         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
4696         (MONO_JUMP_TABLE_FROM_INS): Ditto.
4697
4698 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
4699
4700         * driver.c: Add a --agent argument (not supported yet) to load managed
4701         agent assemblies before loading the main assembly, similarly to how the
4702         Java VM handles agents.
4703
4704 2008-09-11  Mark Probst  <mark.probst@gmail.com>
4705
4706         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
4707         function to do stack layout of local variables.
4708
4709 2008-09-11  Mark Probst  <mark.probst@gmail.com>
4710
4711         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
4712         calculation.
4713
4714 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
4715
4716         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
4717         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
4718         JIT if DISABLE_JIT is defined.
4719
4720         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
4721         defined.
4722
4723 2008-09-10  Mark Probst  <mark.probst@gmail.com>
4724
4725         * iltests.il.in: Disable the fconv test on PPC (the result is
4726         undefined according to ECMA).
4727
4728 2008-09-10  Mark Probst  <mark.probst@gmail.com>
4729
4730         * iltests.il.in: Enable tail call tests for PPC.
4731
4732         * mini.h: Add variable for storing incoming valuetype argument
4733         addresses for tail calls.
4734
4735         * mini-ppc.c: Implement valuetype arguments and return values for
4736         tailcalls on Linux.
4737
4738 2008-09-09  Mark Probst  <mark.probst@gmail.com>
4739
4740         * mini-ppc.c: Partially implement tail calls (struct arguments and
4741         return values not supported).
4742
4743         * method-to-ir.c: Enable tail calls on PPC.
4744
4745 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
4746
4747         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
4748         runtime-invoke wrappers to work around the problem of them getting
4749         assigned to a random class.
4750
4751         * aot-runtime.c (mono_aot_get_method): Ditto.
4752         
4753 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
4754
4755         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
4756         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
4757
4758 2008-09-07  Mark Probst  <mark.probst@gmail.com>
4759
4760         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
4761         until they're implemented properly.
4762
4763         * exceptions-ppc.c: Use arch-independent exception-handling code
4764         instead of custom one.
4765
4766         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
4767         for Linear IR.
4768
4769         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
4770
4771         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
4772         applies when __powerpc__ is defined.
4773
4774 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
4775
4776         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
4777         methods to their code to avoid computing the full name of wrappers and
4778         doing a lookup in a string hash table.
4779
4780 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
4781
4782         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
4783         we identify bblocks before method_to_ir () is ran.
4784
4785         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
4786         Also avoid optimizing branches pointing to themselves.
4787
4788         * mini.c (mini_method_compile): Ditto. Fixes #422947.
4789
4790 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
4791
4792         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
4793
4794 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
4795
4796         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
4797         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
4798         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
4799         'buf'.
4800
4801         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
4802         jumped to the same entry in plt_jump_table.
4803
4804 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
4805
4806         * method-to-ir.c (initialize_array_data): Handle field with RVA from
4807         dynamic images.
4808
4809 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
4810
4811         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
4812         other assignment can be if converted. Saves 1.5% on corlib size and fixes
4813         #421807.
4814
4815 2008-08-29  Geoff Norton  <gnorton@novell.com>
4816
4817         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
4818         segment, and doesn't properly handle .space as .text.  Fixes
4819         AOT Mach/ARM
4820
4821 2008-08-29  Geoff Norton  <gnorton@novell.com>
4822
4823         * mini.c: Disable the mach exception handler when running on 
4824         ARM
4825
4826 2008-08-29  Geoff Norton  <gnorton@novell.com>
4827
4828         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
4829         globals on Darwin/ARM
4830
4831 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
4832
4833         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
4834         since too many things depend on it. Instead, call 
4835         mono_runtime_set_no_exec ().
4836         
4837         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
4838         the new JIT.
4839
4840         * aot-compiler.c: Add an 'asm-only' AOT option.
4841
4842         * mini.c: Avoid initializing the runtime when doing AOT compilation.
4843                 
4844         * aot-compiler.c (compile_method): Disable gshared support for now as it
4845         doesn't yet work.
4846
4847 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
4848
4849         * mini-amd64.h : Fix a compiler warning.
4850
4851         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
4852           Changed to use a callback function to retrieve the unwind info.
4853           This avoids problems observed when code blocks were removed by
4854           unloading an app domain.
4855
4856         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
4857           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
4858           to work properly.
4859
4860         Contributed under MIT/X11 license.
4861
4862 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
4863
4864         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
4865           case to keep the stack aligned to 8.
4866
4867         Contributed under MIT/X11 license.
4868
4869 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
4870
4871         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
4872         avoid repeated linear searches.
4873
4874 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
4875
4876         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
4877         methods it can't handle.
4878         
4879         * aot-compiler.c (add_method): Avoid adding a method twice.
4880         (add_wrappers): Add runtime invoke wrappers for all methods.
4881
4882         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
4883         function to create an aot-compatible version of this trampoline.
4884
4885         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
4886
4887 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
4888
4889         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
4890
4891         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
4892         with a generic sharing failure.
4893
4894         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
4895
4896         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
4897         CEE_RETHROW. Fixes #419634.
4898
4899         * mini.c (mono_method_to_ir): Ditto.
4900
4901         * exceptions.cs: Add a new test.
4902         
4903         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
4904         to mono_type_stack_size_internal () since some callers might not pass in
4905         an rgctx.
4906
4907         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
4908         instrument_prolog. Fixes #419878.
4909
4910         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
4911         doubles in soft float mode volatile.
4912
4913 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
4914
4915         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
4916
4917         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
4918         to handle soft float correctly.
4919
4920         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
4921         the fast path.
4922
4923         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
4924
4925         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
4926         to sp, since the generics catch code requires it.
4927
4928         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
4929         copying.
4930
4931         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
4932         mono_arch_emit_imt_argument ().
4933
4934         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
4935
4936         * mini-arm.c tramp-arm.c: Generic sharing updates.
4937
4938 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
4939
4940         * mini-arm.c: Fix the arm build.
4941
4942         * generic-sharing.c (mini_type_get_underlying_type): New helper function
4943         handling enums, generic instances and generic sharing.
4944         (mini_type_stack_size_full): Ditto.
4945
4946         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
4947         
4948         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
4949
4950         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
4951
4952         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
4953         trampolines.
4954
4955         * mini-arm.c: Various small generic sharing changes.
4956
4957         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
4958         this for x86.
4959         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
4960         custom code.
4961
4962         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
4963         helper function to return a generic class init trampoline.
4964
4965         * method-to-ir.c mini.c: Use it.
4966         
4967         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
4968         arch-specfic function to return a generic class init trampoline.
4969
4970         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
4971         the GENERIC_CLASS_INIT custom code.
4972
4973         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
4974         a fatal error, not a sharing failure.
4975
4976         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
4977         needed.
4978
4979         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
4980         trampoline argument from MONO_ARCH_VTABLE_REG.
4981
4982         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
4983         order of the arguments to the C trampoline: pass 'slot' as the trampoline
4984         argument, and pass the vtable in VTABLE_REG.
4985
4986         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
4987         order of the arguments to the C trampoline: pass 'slot' as the trampoline
4988         argument, and pass the vtable in VTABLE_REG.
4989         (mono_arch_create_trampoline_code_full): Remove some special casing for
4990         the rgctx fetch trampoline.
4991
4992         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
4993         Fixes #419273.
4994
4995         * iltests.il: Add a test for it.
4996
4997 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
4998
4999         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
5000
5001         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
5002         no longer needed.
5003
5004         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
5005         use mono_jit_info_table_find () to avoid recursion.
5006         (mono_delegate_trampoline): Add a sync wrapper here.
5007
5008         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
5009         here.
5010
5011         * mini.c (mono_method_to_ir): Ditto.
5012         
5013         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
5014         add_sync_wrapper argument. Don't add a sync wrapper here.
5015         (mono_create_jump_trampoline): Don't add a sync wrapper here.
5016
5017         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
5018         
5019 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
5020
5021         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
5022           of nonvolatile registers back from MonoContext to CONTEXT.
5023
5024         Contributed under MIT/X11 license.
5025
5026 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
5027
5028         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
5029           arguments on Winx64 there are only 4 argument registers.  For this
5030           logic to work the last argument must be pulled from the stack.  
5031
5032         Contributed under MIT/X11 license.
5033
5034 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
5035
5036         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
5037
5038         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
5039         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
5040         encode/decode_method_ref ().
5041
5042         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
5043
5044         * aot-runtime.c (decode_patch): Ditto.  
5045
5046         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
5047         MONO_PATCH_INFO_METHOD.
5048
5049         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
5050         MonoGenericJitInfo.
5051
5052         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
5053         MonoGenericJitInfo.
5054
5055         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
5056
5057         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
5058         one from the caller.
5059
5060         * aot-runtime.c (decode_generic_inst): New function to decode and
5061         return a interned generic inst.
5062         (decode_klass_ref): Use it.
5063         (decode_method_ref): Ditto.
5064
5065         * aot-compiler.c (emit_exception_debug_info): Save 
5066         jinfo->has_generic_jit_info too.
5067
5068 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
5069
5070         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
5071
5072         * iltests.il.in: Add a test for fconv_to_i.
5073
5074         * liveness.c: Disable the liveness2 pass for now to save space.
5075
5076         * regalloc2.c: Include mempool-internals.h to fix warnings.
5077
5078         * aot-compiler.c (encode_method_ref): Encode the context of generic
5079         instance methods.
5080
5081         * aot-runtime.c (decode_method_ref): Inflate generic methods using
5082         the context saved in the aot file.
5083
5084         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
5085
5086         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
5087
5088         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
5089         volatile so they won't be optimized away.
5090
5091 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
5092
5093         * ssa.c:
5094         * ssa2.c:
5095         * mini.c:
5096         * regalloc2.c:
5097         * dominators.c: Remove duplicated functions that now are in
5098         mempool-internals.h.
5099
5100 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
5101
5102         * aot-compiler.c: Fix warnings.
5103
5104         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
5105
5106         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
5107
5108         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
5109         as the patch type.
5110
5111         * mini.c (mono_resolve_patch_target): Ditto.
5112         
5113         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
5114         (encode_klass_ref): Add support for encoding VARs/MVARs.
5115
5116         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
5117
5118         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
5119         the handling of the got entries into a separate 'decode_got_entry' function.
5120         Add support for RGCTX_FETCH.
5121
5122         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
5123         clobbered by the trampoline code.
5124
5125         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
5126         not clobbered by the indirect calling code.
5127
5128 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
5129
5130         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
5131         to fix the build.
5132
5133 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
5134
5135         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
5136         signature using the compilation mempool otherwise we would leak it.
5137
5138 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
5139
5140         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
5141         mono_emit_abs_call ().
5142
5143         * patch-info.h: Add GENERIC_CLASS_INIT.
5144
5145         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
5146
5147         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
5148         as their target as a near call.
5149
5150         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
5151         ABS handling code.
5152         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
5153
5154         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
5155         call to a runtime function described by a patch.
5156
5157         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
5158         mono_emit_abs_call, this has the advantage that the ABS handling code in
5159         mono_codegen () can handle them both, and can handle other stuff in the
5160         future without additional code.
5161
5162         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
5163         entry.
5164         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
5165         abs addresses.
5166
5167         * mini.h: Add missing bblock related prototypes.
5168
5169         * mini.h (MonoCompile): Remove unused reverse_inst_list and
5170         reverse_inst_list_len fields.
5171
5172         * mini.c: Refactor this file a bit by moving branch optimizations to 
5173         branch-opts.c.
5174
5175         * method-to-ir.c: Merge generic sharing changes missed earlier.
5176
5177         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
5178
5179         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
5180         shared patches. Process METHODCONST as a shared patch.
5181
5182         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
5183         as it crashes on the 2.0 mscorlib.
5184
5185         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
5186         to cause crashes.
5187         
5188         * aot-compiler.c: Use is_plt_patch () in a few additional places.
5189         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
5190         by IMT.
5191
5192         * aot-compiler.c: Reorganize the got handling code to be a bit more
5193         understandable.
5194
5195 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
5196
5197         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
5198         mono_patch_info_equals/hash, and use it to massively simplify
5199         get_plt_index ().
5200
5201         * mini.c (mono_patch_info_hash): Simplify this and add support for
5202         more patch types.
5203
5204         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
5205
5206         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
5207         handling code, since an offset is not enough to identify a trampoline.
5208
5209         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
5210
5211 2008-08-17  Mark Probst  <mark.probst@gmail.com>
5212
5213         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
5214
5215         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
5216
5217         * mini-ops.h: Argument and result types for OVF_CARRY ops.
5218
5219         * decompose.c: PPC decompositions for various ops.
5220
5221         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
5222
5223 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
5224
5225         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
5226         call the generic trampoline code using a call, instead of a jump, to
5227         remove some special casing from the generic trampoline code.
5228
5229         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
5230         (mono_codegen): Ditto.
5231
5232         * aot-compiler.c aot-runtime.c: Ditto.
5233
5234         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
5235
5236         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
5237         helper function to find the offset corresponding to a lazy fetch trampoline.
5238
5239         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
5240         when doing generic sharing.
5241
5242         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
5243         places.
5244         
5245         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
5246         mini-trampolines.c to be with the other trampoline creation functions.
5247
5248         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
5249         as it is equal to method->signature in most cases, add a 
5250         mono_emit_method_call_full variant which takes a signature and an imt
5251         argument as well.
5252
5253 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
5254
5255         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
5256         to this function, since it could be computed easily from the method 
5257         argument.
5258         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
5259         more.
5260
5261         * method-to-ir.c mini.c: Remove references to 
5262         compile_generic_method_wo_context.
5263
5264         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
5265         generic method calls.
5266         
5267         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
5268         dimensional non-szarrays.
5269
5270         * mini.c (mini_init): Register mono_array_new_1.
5271
5272         * jit-icalls.c (mono_array_new_1): New jit icall.
5273
5274         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
5275         pointing to the method.
5276
5277         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
5278         method addresses belonging to METHOD_JUMP patches in the 
5279         jump_target_got_slot_hash.
5280         (mono_aot_load_method): Ditto.
5281
5282         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
5283         METHOD_JUMP patches.
5284
5285         * mini.c (mini_create_jit_domain_info): New helper function which 
5286         initializes/frees domain->runtime_info.
5287         (mini_free_jit_domain_info): Ditto.
5288         (mini_init): Install the domain hook functions with the runtime.
5289
5290         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
5291         information maintained by the JIT.
5292
5293         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
5294         insertion into jump_table_hash into mono_codegen (), also implement proper
5295         locking.
5296
5297         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
5298         tail calls, it is already done by the aot code.
5299         
5300         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
5301         mechanism on amd64.
5302
5303         * iltests.il.in: Make the jmp test a bit more complex.
5304
5305         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
5306         generic instances which doesn't have a token.
5307
5308         * aot-runtime.c (decode_method_ref): Ditto.
5309         
5310         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
5311         can handle this case now.
5312         (handle_box): Ditto.
5313
5314 2008-08-15  Geoff Norton  <gnorton@novell.com>
5315
5316         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
5317         debugging check.
5318
5319 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
5320
5321         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
5322         calling generic methods.
5323
5324         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
5325
5326         * aot-runtime.c (decode_patch_info): Ditto.
5327
5328         * mini.c (mono_resolve_patch_target): Ditto.
5329         
5330         * patch-info.h: Add METHOD_RGCTX.
5331
5332         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
5333
5334 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
5335
5336         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
5337         arguments in registers.
5338
5339         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
5340         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
5341
5342         * mini.c (mini_method_compile): Abort aot compilation for generic
5343         methods if generic sharing is disabled.
5344         
5345         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
5346         an mrgctx.
5347
5348         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
5349         requiring an mrgctx.
5350
5351         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
5352         store instructions when converting a vcall to a normal call.
5353
5354         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
5355         mono_arch_find_jit_info.
5356
5357 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
5358
5359         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
5360         avoid calling mono_method_full_name () for every method even if the
5361         env var is not set.
5362         (check_inline_caller_method_name_limit): Ditto.
5363
5364 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
5365
5366         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
5367         assemblies in one run.
5368
5369         * aot-compiler.c (mono_compile_assembly): Only print out a count of
5370         skipped methods if it is not 0.
5371
5372         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
5373
5374 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
5375
5376         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
5377           MONO_ARCH_HAVE_UNWIND_TABLE.
5378
5379         Contributed under MIT/X11 license.
5380
5381 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
5382
5383         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
5384           from default optimizaton list on Winx64.
5385
5386         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
5387
5388         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
5389           the LMF from the MonoJitTlsData structure.
5390
5391         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
5392
5393         Contributed under MIT/X11 license.
5394
5395 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
5396
5397         * mini.c (sigsegv_signal_handler): Fix the build.
5398
5399         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
5400         assembly->aot_module.
5401
5402         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
5403         hash table. This simplifies and speeds up a lot of code, and fixes support
5404         for .netmodules.
5405
5406         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
5407         with the runtime.
5408
5409         * mini-exceptions.c: Ditto.
5410         
5411         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
5412         'native_offset' argument, since these are computed in the 
5413         mono_find_jit_info () function.
5414
5415         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
5416         is used by exceptions-ppc.c.
5417
5418         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
5419         mono_arch_find_jit_info ().
5420         
5421         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
5422         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
5423         generic code in mini-exceptions.c.
5424
5425 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
5426
5427         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
5428
5429         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
5430         
5431         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
5432         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
5433         called while holding the loader lock. Fixes #415608.
5434         (mono_aot_get_method_from_token_inner): Ditto.
5435
5436 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
5437
5438         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
5439         to reduce differences between this and the generic implementation in
5440         mini-exceptions.c.
5441         (ves_icall_get_frame_info): Ditto.
5442
5443         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
5444
5445         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
5446         longer neccesarry.
5447
5448         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
5449         mono_arch_get_call_filter () and make it non-static, for consistency with the
5450         other architectures.
5451
5452 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
5453
5454         * mini.c:
5455         * local-propagation.c:
5456         * mini-x86.c: Correct the name of arch defines.
5457
5458 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
5459
5460         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
5461         NO_EMULATE_LONG_SHIFT_OPS define.
5462
5463 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
5464
5465         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
5466         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
5467
5468         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
5469         MACH fixes. Merged from the 2.0 branch.
5470
5471         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
5472
5473         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
5474         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
5475
5476         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
5477
5478         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
5479         mono_marshal_get_native_wrapper () signature changes.
5480
5481 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
5482
5483         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
5484         conversion bug under arm.
5485
5486 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
5487
5488         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
5489
5490         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
5491         with overflow checking.
5492
5493 2008-08-05  Marek Habersack  <mhabersack@novell.com>
5494
5495         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
5496         to the genmdesc.pl file
5497
5498 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
5499
5500         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
5501         arg_array in the soft-float versions of the LOAD/STORE macros.
5502
5503         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
5504         implementation.
5505
5506         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
5507
5508 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
5509
5510         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
5511         a float HFA. Fixes #413621.
5512
5513 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
5514
5515         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
5516         frame_size to args_size. Fixes build.
5517
5518 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
5519
5520         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
5521         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
5522
5523         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
5524         the stack are not unaligned. Fixes #413247.
5525         
5526 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
5527
5528         * mini.c: update jitted methods performance counters.
5529
5530 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
5531
5532         * mini-exceptions.c: increase the exceptions thrown performance
5533         counter in mono_handle_exception ().
5534
5535 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
5536
5537         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
5538         can work with netmodules.
5539
5540 2008-07-28  Geoff Norton  <gnorton@novell.com>
5541
5542         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
5543         regression tests.
5544
5545 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
5546
5547         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
5548         correct place.
5549
5550 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
5551
5552         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
5553           The float param registers and other param registers must be the 
5554           same index on Windows x64.
5555
5556         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
5557           ArgValuetypeAddrInIReg argument case.  Setting the argument
5558           op to OP_VTARG_ADDR (OP_REGOFFSET)).
5559
5560         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
5561           variable computed above as the copy length for arguments of storage
5562           type ArgValuetypeAddrInIReg.
5563
5564         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
5565           ArgValuetypeAddrInIReg argument case.  This case will rely on
5566           mono_arch_emit_outarg_vt to emit the correct code later in the process.
5567
5568         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
5569           a 32 byte stack allocation for all calls.  We will omit the adjustment for
5570           jump and tail call instructoins as they do not follow the typical call behavior.
5571
5572         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
5573           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
5574           local variable and pass the local variable by reference to the called method.
5575
5576         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
5577           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
5578           of a struct is passed in a register it must be saved with the other
5579           volatile argument on the stack.
5580
5581         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
5582           frame pointer the stack adjustment value must be saved to the unwind 
5583           info structure.
5584
5585         Contributed under MIT/X11 license.
5586
5587 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
5588
5589         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
5590         which got lost in the merge.
5591
5592 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
5593
5594         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
5595         build.
5596
5597         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
5598         
5599         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
5600         icalls, since they won't be patched.
5601
5602         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
5603         different code sequence when running under valgrind to prevent some valgrind
5604         errors.
5605
5606         * iltests.il.in: Add new regression test.
5607
5608         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
5609         end with a throw.
5610
5611         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
5612         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
5613
5614         * iltests.il.in: Add new test.
5615
5616         * aot-compiler.c: Fix some warnings.
5617
5618         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
5619         Fixes #412494.
5620
5621 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
5622
5623         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
5624         (mini_usage_jitdeveloper): Add a missing --wapi option.
5625
5626 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
5627
5628         * mini-codegen.c: Simplify the is_fp macros.
5629         (free_up_ireg): Remove, use free_up_reg instead.
5630         (free_up_reg): Fix the fp case.
5631
5632 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
5633
5634         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
5635         lowered earlier.
5636
5637         * exceptions-x86.c: Merge some changes which seemed to have got lost
5638         in the linear-ir merge.
5639
5640         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
5641
5642         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
5643         long vreg volatile even if the variable was already created.
5644
5645         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
5646         volatile variables.
5647
5648 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
5649
5650         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
5651
5652         * mini.c (mono_jit_compile_method_inner): Add support for 
5653         MONO_EXCEPTION_BAD_IMAGE.
5654
5655         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
5656         mini_method_get_context () returns NULL. Fixes #356531.
5657
5658         * mini.c (mono_method_to_ir): Ditto.
5659         
5660         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
5661         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
5662
5663 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
5664
5665         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
5666         in the LDFTN implementation.
5667
5668 2008-07-25  Mark Probst  <mark.probst@gmail.com>
5669
5670         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
5671         code, patch calls to icalls, too, even if they're not in the
5672         shared generic code hash.  Fixes #411962.
5673
5674 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
5675
5676         * cpu-x86.md: Increase the length of the fcall opcodes.
5677
5678         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
5679         calls returning floats.
5680
5681         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
5682         on NEWARR.
5683         
5684         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
5685         missed earlier.
5686
5687         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
5688         into the domain->method_code_hash.
5689
5690         * aot-compiler.c: Fix win32 build.
5691
5692         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
5693         
5694         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
5695         gshared NEWARR implementation.
5696
5697         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
5698
5699         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
5700         can be used outside of method_to_ir.
5701
5702         * mini.h (MonoCompile): Add arg_types field.
5703
5704         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
5705         
5706         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
5707         the values of the local arg_array and param_types array.
5708
5709 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
5710
5711         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
5712         got accesses might only get generated later when NEWOBJ is decomposed.
5713         
5714         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
5715         looking up the native code of the target method when a delegate is called
5716         for the first time.
5717
5718         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
5719         optimization.
5720
5721         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
5722
5723         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
5724         AOT work on platforms without a working dlsym implementation.
5725
5726         * mini.h: Bump AOT image format version.
5727         
5728 2008-07-24  Mark Probst  <mark.probst@gmail.com>
5729
5730         * mini-exceptions.c: Free a MonoType with
5731         mono_metadata_free_type() instead of g_free().
5732
5733         * aot-runtime.c: Free a MonoType.
5734
5735 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
5736
5737         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
5738         optimization.
5739
5740         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
5741         fp stack on x86.
5742
5743 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
5744         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
5745         profiler hook.
5746
5747 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
5748
5749         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
5750         NEWOBJ calls on valuetypes.
5751
5752         * iltests.il.in: Add new test.
5753
5754         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
5755
5756 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
5757
5758         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
5759         is no longer needed.
5760
5761         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
5762         non register sized integer arguments.
5763         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
5764         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
5765         emit_memcpy2 ().
5766
5767         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
5768         CEE_MONO_RETOBJ.
5769         
5770         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
5771         two a binop with different sized arguments is emitted.
5772
5773         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
5774         instruction in the ins==NULL case.
5775
5776 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
5777
5778         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
5779
5780         * mini-x86.c: Fix osx build.
5781
5782         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
5783         opcodes as well.
5784
5785         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
5786         instruction for non int sized variables.
5787
5788         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
5789         implementation.
5790
5791 2008-07-23  Robert Jordan  <robertj@gmx.net>
5792
5793         * method-to-ir.c: Fix MSVC build.
5794
5795 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
5796
5797         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
5798         a non int sized type, widen it to an int since newer versions of gcc seem to
5799         generate code which needs this.
5800
5801         * ssa2.c abcremoval2.c: Fix warnings.
5802
5803         * *: Merge the Linear IR branch.
5804
5805         The original branch is at trunk/branches/vargaz/mini-linear-il, and
5806         the ChangeLog file there describes all the changes done over the years. 
5807         Further documentation can be found at www.mono-project.com/Linear_IL.
5808
5809 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
5810
5811         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
5812           The float param registers and other param registers must be the 
5813           same index on Windows x64.
5814
5815         Contributed under MIT/X11 license.
5816
5817 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
5818
5819         * mini.c: Make the previous fix GC safe.
5820
5821 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
5822
5823         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
5824
5825 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
5826
5827         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
5828           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
5829           ArgValuetypeAddrInIReg instead.
5830
5831         Contributed under MIT/X11 license.
5832
5833 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
5834
5835         * mini-codegen.c (get_register_spilling): Fix a warning.
5836
5837 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
5838
5839         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
5840         for types which the initialization fails. Raises the provided exception
5841         at the right stop after cleanup.
5842
5843 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
5844
5845         * aot-compiler.c: Free most of the memory allocated during compilation.
5846
5847         * mini.c (mini_parse_debug_options): Fix a leak.
5848         
5849         * mini.c (mini_method_compile): Don't add the method to the jit info tables
5850         during aot compilation.
5851
5852 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
5853
5854         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
5855         it has too much register pressure.
5856
5857 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
5858
5859         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
5860
5861 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
5862
5863         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
5864         on x86.
5865
5866         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
5867         on amd64 similar to the way it is done on arm.
5868
5869         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
5870
5871         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
5872         consistency, normalize error messages, avoid loading aot-only modules in
5873         normal mode.
5874
5875         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
5876         for consistency.
5877
5878         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
5879
5880 2008-07-11  Martin Baulig  <martin@ximian.com>
5881
5882         * debug-debugger.h
5883         (MonoDebuggerInfo): Add `interruption_request'.
5884
5885 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
5886
5887         * aot-compiler.c (emit_plt): Remove some dead code.
5888
5889         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
5890
5891         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
5892         return the plt info offset belonging to a given plt entry.
5893
5894         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
5895         mono_aot_get_plt_info_offset.
5896         
5897         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
5898         similar to the amd64 code by makeing jumps through a separate jump table 
5899         instead of embedding the jump addresses into the code.
5900
5901 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
5902
5903         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
5904         method.
5905
5906 2008-07-10  Martin Baulig  <martin@ximian.com>
5907
5908         * mini.c (mini_method_compile): Disable generics sharing when
5909         running in the debugger.
5910
5911 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
5912
5913         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
5914
5915         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
5916         the local register allocator from running out of registers on x86 when 
5917         using aot.
5918
5919 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
5920
5921         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
5922         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
5923         C4146.
5924
5925         Contributed under MIT/X11 license.
5926
5927 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
5928
5929         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
5930         speed up the assembler.
5931
5932 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
5933
5934         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
5935         support.
5936
5937         * mini.c: Move the soft float handling macros a bit earlier, add 
5938         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
5939         place.
5940
5941         * mini.h: Add prototype for mono_arch_fixup_jinfo.
5942
5943         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
5944         read-only to help catch code allocation requests.
5945         
5946         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
5947         and turn it off when using --aot-only or when compiling with --aot=full.
5948
5949         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
5950         jump table for switches from the normal domain mempool, not the code
5951         manager.
5952
5953         * mini-trampolines.c (get_unbox_trampoline): New function to return an
5954         unbox trampoline which handles aot-only mode too.
5955
5956         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
5957         an AOTed unbox trampoline.
5958
5959         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
5960
5961 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
5962
5963         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
5964         ""
5965
5966         Contributed under MIT/X11 license.
5967
5968 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
5969
5970         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
5971           the unwind information for the method at the end of the allocated block.
5972           
5973         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
5974           MonoCompileArch to hold the unwind info for SEH on Winx64
5975         
5976         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
5977           frame pointer info for the method being compiled.
5978           
5979         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
5980           the call to mono_exception_from_token.
5981           
5982         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
5983           storing the method prolog information in a format that the Winx64 SEH can understand.  This
5984           information is stored a the end of the method block because it is all 32-bit offset based.
5985
5986         Contributed under MIT/X11 license.
5987
5988 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
5989
5990         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
5991
5992         * wapihandles.c: Fix warnings.
5993
5994         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
5995         mode.
5996
5997         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
5998         mono_jit_compile_method in aot-only mode since that calls the type 
5999         initializer.
6000         
6001         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
6002         get_delegate_invoke_impl in aot-only mode.
6003
6004         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
6005
6006 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
6007
6008         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
6009
6010         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
6011         is on by default.
6012
6013         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
6014
6015         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
6016         init trampoline from the AOT file as well.
6017
6018         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
6019         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
6020         code.
6021
6022         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
6023         mono_init.
6024
6025         * exceptions-amd64.c: Add _full variants for the remaining exception code
6026         creation functions as well, allow emission of relocatable code, remove
6027         caching since that is now done by the caller.
6028
6029         * mini-exceptions.c: Add _full variants for the remaining exception code
6030         creation functions as well, add aot-only support.
6031
6032         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
6033         if we can determine a proper token for them.
6034         (add_wrappers): Add a few more wrappers.
6035         (emit_method_code): Remove some dead code.
6036         (emit_trampolines): Emit exception code too.
6037
6038         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
6039
6040         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
6041         mono_array_new_va which avoids varargs.
6042
6043         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
6044
6045         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
6046         mono_arch_create_specific_trampoline () in all places.
6047
6048         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
6049         a bit so it can be used for other things as well.
6050         
6051         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
6052         on demand as well.
6053
6054         * exceptions-amd64.c: Rename the caching from the exception code creation
6055         functions, it is done by the caller instead.
6056         
6057         * exceptions-amd64.c: Change the signature of the exception code creation 
6058         functions to allow the creation of relocatable code later.
6059
6060         * mini-exceptions.c: Add a set of functions to query the various 
6061         runtime-generated exception functions.
6062
6063         * mini.c mini-exceptions.c: Use the newly added functions instead of the
6064         mono_arch_.. () functions.
6065         
6066 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
6067
6068         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
6069
6070         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
6071
6072         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
6073         (mini_get_vtable_trampoline): Ditto.
6074
6075         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
6076         code in the AOT case by returning the code size and a list of relocations to
6077         the caller.
6078
6079         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
6080
6081 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
6082
6083         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
6084           clean the stack.
6085
6086         Contributed under MIT/X11 license.
6087
6088 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
6089
6090         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
6091         so the buffer size can be computed correctly. Fixes #404735.
6092
6093         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
6094         normally as cfg->debug_info is already freed.
6095
6096 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
6097
6098         * mini-amd64.c: For calls returning vtypes in registers, don't store
6099         the return address on the stack, instead allocate a separate local for
6100         it. Fixes #404729.
6101
6102 2008-07-05  Mark Probst  <mark.probst@gmail.com>
6103
6104         * mini-trampolines.c, mini.h: Add an argument to
6105         mono_create_jit_trampoline_in_domain() for turning off the adding
6106         of the sync wrapper.
6107
6108         * mini.c: Use the JIT trampoline without sync instead of
6109         ldftn_nosync in static RGCTX invoke wrappers so that the call can
6110         be patched.
6111
6112 2008-07-04  Mark Probst  <mark.probst@gmail.com>
6113
6114         * driver.c: Turn on GSHARED optimization by default.
6115
6116 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
6117
6118         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
6119         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
6120
6121         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
6122         create a variant of the generic trampoline code callable from AOTed trampolines.
6123
6124         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
6125         trampoline code callable from AOTed trampolines.
6126
6127         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
6128
6129 2008-07-04  Mark Probst  <mark.probst@gmail.com>
6130
6131         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
6132         pass-through manner.
6133
6134         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
6135         and don't fail sharing for them anymore.
6136
6137         * mini-exceptions.c: Handle exceptions in shared generic methods.
6138
6139         * generic-sharing.c: When checking the context of a generic
6140         method, also check its class's context.  Don't treat wrappers as
6141         sharable.
6142
6143         * mini-trampolines.c: Some code factored out to
6144         metadata/generic-sharing.c.  Handle the MRGCTX case.
6145
6146         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
6147         we must deal with the method being of another instantiation of the
6148         class.  Add static rgctx invoke wrappers to generic methods.
6149
6150 2008-07-04  Mark Probst  <mark.probst@gmail.com>
6151
6152         * mini.c: Provide all jit infos of generic shared methods with a
6153         generic jit info.
6154
6155         * mini-exceptions.c: Handle the new situation that a generic info
6156         might be available, but not info about the this/vtable/mrgctx
6157         variable.
6158
6159 2008-07-03  Mark Probst  <mark.probst@gmail.com>
6160
6161         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
6162         generic methods.
6163
6164 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
6165
6166         * dominators.c (check_dominance_frontier): Fix a warning.
6167
6168         * mini.h: Add some missing prototypes.
6169
6170         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
6171
6172         * driver.c (mono_jit_init_version): Correct the comments since the first
6173         argument should be the name of the root domain, not a filename.
6174
6175         * aot-runtime.c (make_writable): Error out if this is called while running
6176         with --aot-only.
6177         (load_aot_module): Ditto.
6178
6179         * aot-compiler.c: Really fix the computation of method indexes.
6180
6181         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
6182         optimizations as this is no longer called frequently.
6183
6184         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
6185         method and the invoke impl code and pass it to the delegate trampoline instead of
6186         just the delegate class.
6187
6188 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
6189
6190         * aot-compiler.c: Fixup the computation of method indexes.
6191         (add_wrappers): Create the base methods of the runtime invoke wrappers using
6192         the method builder infrastructure.
6193
6194         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
6195         has no header.
6196
6197         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
6198         mode, load the method right away instead of creating a trampoline.
6199
6200         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
6201
6202         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
6203         some checks a bit.
6204
6205 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
6206
6207         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
6208         (mono_aot_load_method): Use method_index instead of method->token.
6209
6210         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
6211         can handle icalls etc. properly.
6212
6213         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
6214
6215         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
6216
6217         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
6218         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
6219         JIT_ICALL_ADDR patch type.
6220
6221         * patch-info.h: Add JIT_ICALL_ADDR patch type.
6222
6223         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
6224         request flag.
6225         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
6226
6227         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
6228
6229 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
6230
6231         * mini.c: Use domain->jit_code_hash_lock for controlling access to
6232         domain->jit_code_hash.
6233
6234 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
6235
6236         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
6237
6238 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
6239
6240         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
6241         get_this_arg_from_call, let it compute it when needed.
6242
6243         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
6244         gsctx from code only when needed.
6245
6246         * mini-trampolines.c (get_generic_context): Rename this to 
6247         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
6248         it can be called by the arch backends.
6249
6250         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
6251
6252 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
6253
6254         * driver.c (mono_main): Add experimental --aot-only command line option.
6255
6256         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
6257         set.
6258
6259 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
6260
6261         * driver.c (DllMain): Remove mono_module_handle.
6262
6263         Contributed under MIT/X11 license.
6264
6265 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
6266
6267         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
6268         for emitting methods which are not in the source assembly. Detect and report
6269         failure of assembling+linking.
6270         
6271         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
6272
6273         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
6274
6275 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
6276
6277         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
6278
6279 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
6280
6281         * mini.h: Remove some obsolete prototypes.
6282
6283         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
6284
6285 2008-06-24  Mark Probst  <mark.probst@gmail.com>
6286
6287         * mini.c (get_object_generic_inst): Variable-sized arrays are not
6288         supported by Visual Studio, so use alloca().
6289
6290 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
6291
6292         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
6293         Fixes #402585.
6294
6295 2008-06-23  Mark Probst  <mark.probst@gmail.com>
6296
6297         * mini.c: Fail sharing of a generic method if it contains an open
6298         catch clause (because we don't pass MRGCTXs yet).
6299
6300 2008-06-23  Mark Probst  <mark.probst@gmail.com>
6301
6302         * mini.c: When compiling a method with generic sharing, insert the
6303         method instantiated with an all-Object generic context into the
6304         jit info table, instead of the context of the first instantiation
6305         of the method we happen to compile.
6306
6307 2008-06-18  Martin Baulig  <martin@ximian.com>
6308
6309         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
6310         `major_version' and `minor_version'.
6311
6312 2008-06-17  Mark Probst  <mark.probst@gmail.com>
6313
6314         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
6315         mono_method_is_generic_sharable_impl() takes an additional
6316         argument specifying whether to treat type variables as reference
6317         types.
6318
6319 2008-06-17  Mark Probst  <mark.probst@gmail.com>
6320
6321         * mini.h: Removed obsolete prototypes.
6322
6323 2008-06-17  Mark Probst  <mark.probst@gmail.com>
6324
6325         * mini.c: Don't fail generic sharing for initobj and sizeof - we
6326         already handle them.
6327
6328 2008-06-17  Mark Probst  <mark.probst@gmail.com>
6329
6330         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
6331         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
6332         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
6333         tramp-x86.c: Added a MonoGenericContext* argument to
6334         mono_arch_get_unbox_trampoline() so that it can call other
6335         functions which require it.
6336
6337 2008-06-17  Mark Probst  <mark.probst@gmail.com>
6338
6339         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
6340         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
6341         mono_arch_get_this_arg_from_call() takes a
6342         MonoGenericSharingContext* as well.
6343
6344 2008-06-17  Mark Probst  <mark.probst@gmail.com>
6345
6346         * mini.c: Factor out code for emitting unbox into emit_unbox() and
6347         implement generic sharing of unbox.
6348
6349 2008-06-17  Mark Probst  <mark.probst@gmail.com>
6350
6351         * mini.c: Don't compute the vtable to determine whether a field is
6352         special static, because it might not work for open types.
6353
6354 2008-06-17  Mark Probst  <mark.probst@gmail.com>
6355
6356         * mini.c: Removed the unused token_type and token_source arguments
6357         from get_runtime_generic_context_ptr().
6358
6359 2008-06-17  Marek Habersack  <mhabersack@novell.com>
6360
6361         * mini.c (ADD_BINOP): fix the build
6362
6363 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
6364
6365         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
6366         a widening op.
6367
6368 2008-06-16  Mark Probst  <mark.probst@gmail.com>
6369
6370         * mini.h: Removed class relations enum that's not used anymore.
6371
6372 2008-06-16  Mark Probst  <mark.probst@gmail.com>
6373
6374         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
6375
6376         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
6377         the lazy fetch trampoline access code.
6378
6379 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
6380
6381         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
6382
6383 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
6384
6385         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
6386
6387         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
6388
6389         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
6390
6391 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
6392
6393         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
6394         intrinsics.
6395
6396         * mini-ops.h: Add MIN/MAX_UN opcodes.
6397
6398         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
6399         intrinsics.
6400
6401         * basic-math.cs: Add more min/max tests.
6402
6403         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
6404
6405 2008-06-13  Mark Probst  <mark.probst@gmail.com>
6406
6407         * mini.c: Small fix in the prologue of emit_castclass.
6408
6409 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
6410
6411         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
6412
6413         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
6414         do not work even for unsigned types. Fixes #400014.
6415
6416         * basic-math.cs: Add regression tests for unsigned Min/Max.
6417
6418 2008-06-13  Mark Probst  <mark.probst@gmail.com>
6419
6420         * mini.c: Added additional context_used argument to several
6421         functions, which will be needed for sharing generic methods.  Use
6422         GET_RGCTX macro wherever appropriate.  Declare only one
6423         context_used in mono_method_to_ir().
6424
6425 2008-06-13  Mark Probst  <mark.probst@gmail.com>
6426
6427         * mini.c, generic-sharing.c: Removed generic class relations.
6428
6429         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
6430         functions due to MRGCTX changes.
6431
6432 2008-06-13  Mark Probst  <mark.probst@gmail.com>
6433
6434         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
6435         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
6436         with calculated IMT.
6437
6438         * mini.c: Generic sharing of calls via generic interfaces.
6439
6440         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
6441         generic method with non-constant MonoGenericContext*.  Instead,
6442         the context is taken out of the method itself.
6443
6444 2008-06-13  Mark Probst  <mark.probst@gmail.com>
6445
6446         * mini.c: Generic sharing of ldvirtftn.
6447
6448 2008-06-13  Mark Probst  <mark.probst@gmail.com>
6449
6450         * mini.c: Generic sharing of ldftn.
6451
6452 2008-06-13  Mark Probst  <mark.probst@gmail.com>
6453
6454         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
6455
6456 2008-06-13  Mark Probst  <mark.probst@gmail.com>
6457
6458         * mini.c: Generic sharing of the special case of ldtoken followed
6459         by a call to GetTypeFromHandle.
6460
6461 2008-06-13  Mark Probst  <mark.probst@gmail.com>
6462
6463         * mini.c: Generic sharing of box for nullable types.
6464
6465 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
6466
6467         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
6468         are passed on the stack. Fixes #324807.
6469
6470 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
6471
6472         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
6473         for the ArgValuetypeAddrInIReg case.
6474
6475         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
6476         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
6477
6478         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
6479         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
6480         local variable and pass the local variable by reference to the called method.
6481           
6482         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
6483         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
6484
6485         Contributed under MIT/X11 license.
6486
6487 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
6488
6489         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
6490
6491         * debug-mini.c (mono_debug_print_vars): Release memory after printing
6492         everything.
6493
6494 2008-06-10  Martin Baulig  <martin@ximian.com>
6495
6496         * debug-mini.c
6497         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
6498
6499 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
6500
6501         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
6502         possible error when no arguments are passed.
6503
6504         Contributed under MIT/X11 license.
6505
6506 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
6507
6508         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
6509         where the file name is NULL.
6510
6511 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
6512
6513         * mini.c: Fix s390 build.
6514
6515 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
6516
6517         * trace.c (mono_trace_parse_options): Fix warnings.
6518
6519         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
6520
6521 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
6522
6523         * mini.c (remove_block_if_useless): Avoid printing the method name.
6524         
6525         * mini.c: Remove needless setting of ins->cil_code which is now done by 
6526         MONO_INST_NEW.
6527
6528         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
6529         LMF. Not yet used.
6530
6531         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
6532         translated code after it has been patched.
6533
6534 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
6535
6536         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
6537         avoid problems during code patching on SMP systems.
6538         (emit_call): Avoid adding a patch info which is already added by 
6539         emit_call_body.
6540         (mono_arch_emit_exceptions): Ditto.
6541
6542 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
6543
6544         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
6545         MONO_TYPE_ISSTRUCT already checks for it.
6546
6547 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
6548
6549         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
6550           structs with floats on Winx64 the float registers are not used.  
6551           The integer registers are always used..
6552         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
6553           only one register will be used and only if the size of the struct 
6554           is 1,2,4, or 8 bytes.
6555
6556         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
6557           to work for Winx64.
6558
6559         Contributed under MIT/X11 license.
6560
6561 2008-06-05  Martin Baulig  <martin@ximian.com>
6562
6563         * debug-debugger.c (debugger_lookup_class): Also call
6564         mono_class_setup_methods() here; we're only called from RTI.
6565
6566 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
6567
6568         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
6569         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
6570         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
6571         Post-process object files and add dtrace-generated object, if necessary.
6572
6573         Contributed under MIT/X11 license.
6574
6575 2008-06-04  Mark Probst  <mark.probst@gmail.com>
6576
6577         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
6578         element class.
6579
6580         * mini.c: Generic sharing for unbox.any and castclass.
6581
6582 2008-06-04  Mark Probst  <mark.probst@gmail.com>
6583
6584         * mini.c: Ignore tailcall prefix in shared generic code and when
6585         doing calls which require a vtable/rgctx argument.
6586
6587 2008-06-04  Mark Probst  <mark.probst@gmail.com>
6588
6589         * mini.c: Don't free the JIT info.
6590
6591         * driver.c: Changes in the JIT info table testing code.
6592
6593 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
6594
6595         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
6596         interruption. Fix some warnings.
6597
6598         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
6599         interruption_checkpoint.
6600
6601 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
6602
6603         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
6604         from embedding applications.
6605
6606 2008-06-02  William Holmes  <billholmes54@gmail.com>
6607
6608         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
6609           reserving 32 bytes on the stack when making calls. 
6610
6611         Contributed under MIT/X11 license.
6612
6613 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
6614
6615         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
6616         the linear IL branch.
6617
6618         * driver.c: Print out more information for --version on arm.
6619
6620 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
6621
6622         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
6623         bb_exit instead, since out of line bblocks might not actually be emitted
6624         out-of-line.
6625         
6626         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
6627         maximum epilog size for out of line bblocks if tracing is enabled.
6628
6629         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
6630
6631 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
6632
6633         * arrays.cs: Regression tests for allocating arrays with negative sizes.
6634
6635 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
6636
6637         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
6638         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
6639         opcodes.
6640
6641 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
6642
6643         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
6644         the 'value' to store is a constant.
6645
6646         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
6647
6648         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
6649         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
6650
6651 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
6652
6653         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
6654         for accessing method->generic_container.
6655
6656 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
6657
6658         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
6659         
6660         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
6661
6662         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
6663
6664         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
6665         fails.
6666
6667 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
6668
6669         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
6670
6671         * mini.c: Handle the case when mono_class_vtable () fails.
6672
6673 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
6674         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
6675         the stat profiler.
6676
6677 2008-05-22  Mark Probst  <mark.probst@gmail.com>
6678
6679         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
6680         together with domain sharing.
6681
6682 2008-05-22  Mark Probst  <mark.probst@gmail.com>
6683
6684         * mini.c: Treat callvirts to final methods like non-virtual calls
6685         when doing generic sharing, i.e. look them up in the runtime
6686         generic context.
6687
6688 2008-05-22  Mark Probst  <mark.probst@gmail.com>
6689
6690         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
6691         with computed types (for generic sharing).
6692
6693         * mini.c: Generic sharing for mkrefany and refanyval.
6694
6695 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
6696
6697         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
6698         possible.
6699
6700         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
6701         the generic sharing code.
6702         
6703         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
6704         when needed.
6705
6706 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
6707
6708         * mini.h: Remove the declaration of mono_aot_init_vtable ().
6709
6710 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
6711
6712         * driver.c: updated copyright date
6713
6714 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
6715
6716         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
6717         needed.
6718
6719 2008-05-19  Martin Baulig  <martin@ximian.com>
6720
6721         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
6722         pointing to the new `_mono_debug_using_mono_debugger' variable.
6723
6724         * driver.c
6725         (mono_main): Check mono_debug_using_mono_debugger() rather than
6726         the `MONO_INSIDE_MDB' environment variable to check whether we're
6727         inside the debugger.
6728
6729 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
6730
6731         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
6732         argument.
6733
6734 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
6735
6736         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
6737
6738         * mini.c: Added mini_assembly_can_skip_verification. This
6739         function checks if the assembly requested to skip verification. 
6740         Fixes part of #387274.
6741
6742 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
6743
6744         * mini.c (mini_get_method): Disable the check for open generic classes when
6745         using generic sharing.
6746
6747         * generics.cs: Add a test for #387034.
6748
6749         * mini.c (mini_get_method): Check whenever the method class is an open generic
6750         type, and return NULL in that case, causing a verification error. Fixes
6751         #384123.
6752
6753 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
6754
6755         * driver.c (mono_main): Revert r102623. The right
6756         thing to do is to enable the verifier under verifiable
6757         unless a --security flag was passed.
6758
6759         We need this non-trivial behavior for --verify-all otherwise
6760         mcs-compileall won't be able to use it. As it needs everything to
6761         be verified under validil.
6762
6763 2008-05-06  Martin Baulig  <martin@ximian.com>
6764
6765         Fix #383749.
6766
6767         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
6768         (mono_debugger_thread_cleanup): Likewise.
6769         (mono_debugger_extended_notification): Likewise.
6770
6771 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
6772
6773         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
6774         against both inflated and non-inflated methods. We need to check against the
6775         generic definition for cases where the instantiated method is not visible.
6776         We need to check against the inflated types for cases where the instantiation
6777         changes any super type. This fixes #382986.
6778
6779         Note that this doesn't need to be applied to other parts of mono_method_to_ir
6780         that check for visibiliy as generic params only appears as the type subject
6781         of tokens on call opcodes. Field manipulation and ldftn must always
6782         target an exact type.
6783
6784 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
6785
6786         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
6787         if no related --security flag is passed.
6788
6789 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
6790
6791         * mini-arch.h: Prepare support for ppc64.
6792
6793         Contributed under MIT/X11 license.
6794
6795 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
6796
6797         * aot-runtime.c: Prepare support for ppc64.
6798
6799         Contributed under MIT/X11 license.
6800
6801 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
6802
6803         * mini-ops.h: Prepare support for ppc64.
6804
6805         Contributed under MIT/X11 license.
6806
6807 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
6808
6809         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
6810
6811         Contributed under MIT/X11 license.
6812
6813 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
6814
6815         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
6816         assemblies, since aot_name is not a full path, causing us to load MS.NET 
6817         assemblies on windows.
6818
6819 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
6820
6821         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
6822         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
6823         * main.c: Use UTF-8 encoded command line instead of Windows default code
6824         page on Windows to support Unicode.
6825         * driver.c (DllMain): New function for mixed-mode assembly support.
6826         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
6827         export __stdcall functions without decoration.
6828
6829         Contributed under MIT/X11 license.
6830
6831 2008-04-28  Mark Probst  <mark.probst@gmail.com>
6832
6833         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
6834         saving it very early.
6835
6836 2008-04-28  Mark Probst  <mark.probst@gmail.com>
6837
6838         * mini.h, mini.c: Lots of code for accessing the old RGCTX
6839         deleted.  The only way to access the new RGCTX is via the
6840         trampline.
6841
6842         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
6843         vtable instead of the RGCTX to static methods.
6844
6845         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
6846         accessing the new RGCTX.
6847
6848         * generic-sharing.c: There is no separation between self, type
6849         arguments and other types in the RGCTX anymore.
6850
6851 2008-04-25  Jonathan Chambers <joncham@gmail.com>
6852
6853         * mini-amd64.c (add_general): Remove previous stack adjustment.
6854         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
6855         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
6856         for 32 bytes of stack space reserved for all calls.
6857         
6858         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
6859         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
6860         adjustment.
6861         
6862         Code contributed under MIT/X11 license.
6863
6864 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
6865
6866         * mini.c (mini_method_verify): Only verify non-inflated methods, check
6867         against the root definition, peeling out method and type instantiations.
6868         Cache verify success results, code that fails verification is still
6869         checked multiple times.
6870
6871 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
6872
6873         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
6874
6875 2008-04-23  Jonathan Chambers <joncham@gmail.com>
6876
6877         * mini-amd64.c (add_general): Always increment stack on Win64.
6878         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
6879         on Win64.
6880         
6881         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
6882         stack based argument handling on Win64.
6883         
6884         Code contributed under MIT/X11 license.
6885
6886 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
6887
6888         * Makefile.am (version.h): Add support for git-svn.
6889
6890 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
6891
6892         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
6893         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
6894         avoiding allocations and libc functions which might deadlock.
6895         
6896         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
6897         'no-gdb-backtrace' option is set.
6898
6899         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
6900
6901         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
6902
6903 2008-04-21  Martin Baulig  <martin@ximian.com>
6904
6905         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
6906         and `get_lmf_addr'; `notification_address' is no longer a pointer.
6907
6908 2008-04-21  Martin Baulig  <martin@ximian.com>
6909
6910         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
6911         `thread_vtable', `event_handler_ptr' and `event_handler'.
6912
6913 2008-04-21  Martin Baulig  <martin@ximian.com>
6914
6915         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
6916         allows delayed initialization of the `executable_code_buffer' when
6917         attaching.
6918
6919 2008-04-21  Martin Baulig  <martin@ximian.com>
6920
6921         * mini.h (mono_debugger_create_notification_function): Removed.
6922         * tramp-*.c (mono_debugger_create_notification_function): Removed.
6923
6924         * mdb-debug-info64.s
6925         (MONO_DEBUGGER__notification_function): Added this in the .text section.
6926
6927         * mdb-debug-info32.s
6928         (MONO_DEBUGGER__notification_function): Added this in the .text section.
6929
6930         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
6931         currently only works on x86 and x86_64, so don't create it on ppc.
6932
6933 2008-04-21  Martin Baulig  <martin@ximian.com>
6934
6935         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
6936
6937         * mini.c
6938         (mini_method_compile): In the fp elimination check, check
6939         `debug_options.mdb_optimizations' in addition to
6940         mono_debug_using_mono_debugger().       
6941
6942         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
6943         disable some JIT optimizations which are only disabled when
6944         running inside the debugger.
6945         Added `--help-debug' option to describe the debugging options.
6946         (parse_debug_options): New static function to parse the `--debug'
6947         options, so we can easily add more stuff in future.
6948
6949 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
6950
6951         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
6952         the method has no body.
6953
6954 2008-04-19  Jonathan Chambers <joncham@gmail.com>
6955
6956         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
6957         assembly is not allowed in MSVC 64-bit compiler. 
6958         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
6959         as we get floating point exceptions everywhere.
6960         
6961         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
6962         correctly align arguments for call to throw_exception.
6963         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
6964         
6965         Code contributed under MIT/X11 license.
6966
6967 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
6968
6969         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
6970
6971 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
6972
6973         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
6974
6975         * mini-amd64.c (NEW_INS): Set cil_code.
6976
6977         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
6978         from mini-amd64.c so all debugger related logic is in one place.
6979
6980         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
6981         later won't have a random ip assigned to them.
6982
6983 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
6984
6985         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
6986         the arch specific function initializes code_size.
6987         (mono_create_delegate_trampoline): Ditto.
6988
6989         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
6990         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
6991         platforms.
6992
6993         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
6994         running under the debugger.
6995
6996         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
6997         debugger.
6998
6999         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
7000         debugger. Also move the disabling of optimizations here from driver.c.
7001         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
7002         debugger.
7003
7004         * mini.h (MonoCompile): Add a few new flags.
7005
7006 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
7007
7008         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
7009         so the cil_code field of created MonoInst's is properly set.
7010         (mini_select_instructions): Ditto.
7011
7012         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
7013         (MONO_INST_NEW_CALL): Ditto.
7014
7015         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
7016         in many places so the ins->cil_code field is properly initialized.
7017
7018         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
7019         place.
7020
7021 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
7022
7023         * mini.c (mini_method_compile): Print a different message when compiling a 
7024         shared method.
7025         
7026         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
7027         > 1.
7028
7029 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
7030
7031         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
7032         SSE2 instructions.
7033
7034         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
7035         
7036 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
7037
7038         * mini.c (handle_stack_args): Make this return void since its return value was
7039         never used. Also set cfg->unverifiable for invalid IL instead of calling
7040         G_BREAKPOINT ().
7041
7042 2008-04-10  Mark Probst  <mark.probst@gmail.com>
7043
7044         * mini.c: Make sure "this" is live in catch clauses with type
7045         variables in shared generic code.
7046
7047 2008-04-08  Mark Probst  <mark.probst@gmail.com>
7048
7049         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
7050         generic_class_is_reference_type() to ensure the proper behaviour
7051         when sharing generic code and the type in question is a type
7052         argument.
7053
7054 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
7055
7056         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
7057         race conditions when printing thread dumps. Fixes #377738.
7058
7059 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
7060         
7061         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
7062         shows up when both MonoInst arguments can cause aliasig.
7063         There is likely no way in the current JIT to trigger this problem, but
7064         it showed up in the development of generics sharing, when in a new
7065         opcode both args of an OP_GROUP can be aliases (addresses of a local).
7066         When the generics sharing code will be committed, its tests will be
7067         valid also for this bug.
7068
7069 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
7070
7071         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
7072         PATCH_INFO_METHOD.
7073
7074         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
7075         NULL.
7076
7077 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
7078
7079         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
7080         use a more detailed exception message for InvalidCastException.
7081
7082         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
7083
7084         * driver.c (mono_main): Add --debug=casts option to turn on better 
7085         InvalidCastException message details.
7086
7087         * mini.c (mini_get_debug_options): New helper function to return the address of
7088         the debug_options variable.
7089
7090         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
7091         the jit_tls TLS variable.
7092
7093         * mini.c (mono_jit_tls): New TLS variable.
7094
7095         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
7096         option is used.
7097
7098 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
7099
7100         * mini.h: Removed verifer related stuff. This code was moved to verify.c
7101
7102         * mini.c: Removed verifer related stuff, code moved to verify.c.
7103
7104         * driver.c: Using code from verify.c instead of mini.c.
7105
7106 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
7107
7108         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
7109         longer valid.
7110
7111 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
7112
7113         * mini.c (check_for_method_verify): Enabling verification of
7114         corlib if mono_verify_all is set. Bugs in the verifier preventing that
7115         have been fixed.
7116
7117 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
7118
7119         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
7120         caller saved registers as well.
7121         
7122         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
7123         saved registers as well.
7124
7125 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
7126
7127         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
7128
7129         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
7130         code.
7131
7132 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
7133
7134         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
7135         to get_call_info.
7136         (get_call_info): Take a gsctx argument instead of 'cfg'.
7137
7138 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
7139
7140         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
7141         mono_verify_all is set.
7142
7143         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
7144
7145         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
7146
7147 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
7148
7149         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
7150         an exception.
7151
7152         * driver.c mini.c mini.h: Add a --verify-all development option to test the
7153         verifier and the code generated by the compiler.
7154
7155 2008-03-25  Mark Probst  <mark.probst@gmail.com>
7156
7157         * mini.c: Generic sharing of the non-nullable case of the box
7158         instruction.
7159
7160 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
7161
7162         * inssel.brg: Fix the build.
7163
7164         * iltests.il.in: Add a test for lconv.ovf.u8.un.
7165
7166 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
7167
7168         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
7169         Array:Address. Fixes #372410.
7170
7171         * iltests.il.in: New tests for readonly prefix.
7172
7173 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
7174
7175         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
7176         mini-trampolines.c.
7177
7178         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
7179         mini-exceptions.c.
7180
7181         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
7182         
7183         * mini.c (mono_decompose_op_imm): New helper function.
7184
7185         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
7186         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
7187         return value.
7188
7189         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
7190         mono_arch_output_basic_block. Fix warnings.
7191
7192         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
7193         for now.
7194
7195 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
7196
7197         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
7198         since the extra frame is now detected automatically inside the loop.
7199
7200         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
7201         opts which are now in mono_peephole_ins ().
7202         
7203         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
7204
7205         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
7206         frames and skip duplicate managed-to-native frames. Fixes #367665.
7207
7208         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
7209         opts which are now in mono_peephole_ins ().
7210         (mono_arch_peephole_pass_2): Ditto.
7211
7212         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
7213
7214         * mini-codegen.c (mono_peephole_ins): New helper function containing the
7215         arch independent peephole optimizations.
7216
7217         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
7218         opts which are now in mono_peephole_ins ().
7219
7220         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
7221         
7222         * mini-s390.c (mono_arch_output_basic_block): Fix build.
7223
7224         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
7225         pattern.
7226
7227         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
7228         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
7229         opcode. 
7230
7231 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
7232
7233         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
7234         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
7235         return value.
7236
7237         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
7238         mono_arch_output_basic_block. Fix warnings.
7239
7240 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
7241
7242         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
7243         conv.ovf.u.un.
7244
7245 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
7246
7247         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
7248         conv.ovf.u.un.
7249
7250         * iltests.il: Add new tests.
7251
7252 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
7253
7254         * mini.c: Removed Windows version macros.
7255
7256 2008-03-20  Mark Probst  <mark.probst@gmail.com>
7257
7258         * generic-sharing.c: Put reflection types in the extensible part
7259         of the runtime generic context.
7260
7261         * mini.c: Generic sharing of the GetTypeHandle special case of the
7262         ldtoken instruction.
7263
7264 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
7265
7266         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
7267
7268         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
7269         
7270         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
7271         consistency with the other version on the linear IR branch.
7272
7273         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
7274
7275         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
7276
7277         * iltests.il.in: Add new tests.
7278
7279 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
7280
7281         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
7282
7283         * iltests.il.in: Add new tests.
7284
7285 2008-03-19  Mark Probst  <mark.probst@gmail.com>
7286
7287         * mini.c: Two variables with the same name were declared in
7288         nesting contexts and one wasn't initialized.  Fixed.
7289
7290 2008-03-19  Mark Probst  <mark.probst@gmail.com>
7291
7292         * mini.c: Generic sharing of the initobj instruction.
7293
7294 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
7295
7296         * mini.c: make the test to optimize ldtoken from typeof() more
7297         precise.
7298
7299 2008-03-18  Mark Probst  <mark.probst@gmail.com>
7300
7301         * mini.c: Generic sharing of the initobj instruction for reference
7302         types.
7303
7304 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
7305
7306         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
7307         the mono_breakpoint_clean_code() code to perform bound checks.
7308
7309 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
7310
7311         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
7312         mono_arch_patch_callsite() to include the start of the managed method
7313         to be able to perform bound checks.
7314
7315 2008-03-17  Mark Probst  <mark.probst@gmail.com>
7316
7317         * mini.c: Generic sharing for the isinst instruction.
7318
7319 2008-03-17  Mark Probst  <mark.probst@gmail.com>
7320
7321         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
7322         inssel-long32-mips.brg: Added opcodes for doing indirect calls
7323         with the runtime generic context argument.
7324
7325         * mini.c: Share calls to several types of unsharable methods by
7326         putting the address of the method code in the runtime generic
7327         context and doing an indirect call.
7328
7329         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
7330         to switches.
7331
7332 2008-03-16  Mark Probst  <mark.probst@gmail.com>
7333
7334         * generic-sharing.c: Change due to a change in the runtime genric
7335         context API.
7336
7337 2008-03-15  Martin Baulig  <martin@ximian.com>
7338
7339         * tramp-x86.c
7340         (mono_arch_nullify_class_init_trampoline): Add call to
7341         mono_breakpoint_clean_code() to make things work when running
7342         inside the debugger.
7343
7344         * tramp-amd64.c
7345         (mono_arch_nullify_class_init_trampoline): Add call to
7346         mono_breakpoint_clean_code() to make things work when running
7347         inside the debugger.
7348
7349 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
7350
7351         * inssel-long.brg (reg): Fix 64 bit build.
7352
7353 2008-03-14  Mark Probst  <mark.probst@gmail.com>
7354
7355         * mini.c, mini.h: Share static generic code by passing it an
7356         implicit argument pointing to the runtime generic context.
7357
7358         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
7359         inssel-long32-mips.brg: New opcodes for calling shared static,
7360         which need to be passed the runtime generic context.
7361
7362         * mini-amd64.c, mini-x86.c: Save the runtime generic context
7363         argument on the stack in the prologue if needed.  New function for
7364         finding the runtime generic context argument from the registers
7365         saved by the trampoline.
7366
7367         * mini-amd64.h, mini-x86.h: Specify which register to use for the
7368         runtime generic context argument.
7369
7370         * tramp-amd64.c: Also restore the register used for the runtime
7371         generic context argument.
7372
7373         * mini-trampoline.c: Resolve shared static calls by consulting the
7374         runtime generic context via the new argument.
7375
7376         * generic-sharing.c: Add an argument to sharability-checking
7377         functions that specifies whether type variables should be treated
7378         as sharable type arguments.
7379
7380         * inssel-x86.brg: Removed a superfluous, buggy rule.
7381
7382         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
7383         to switches.
7384
7385 2008-03-14  Martin Baulig  <martin@ximian.com>
7386
7387         * debug-debugger.c (main_thread_handler): Call
7388         mono_runtime_run_main() without sending any notifications.
7389
7390         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
7391
7392 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
7393
7394         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
7395
7396 2008-03-14  Mark Probst  <mark.probst@gmail.com>
7397
7398         * tramp-x86.c: Fixed register restore offsets in the trampoline
7399         code for ECX and EDX.
7400
7401 2008-03-12  Geoff Norton  <gnorton@novell.com>
7402
7403         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
7404         different ucontext_t implementations.
7405         * exceptions-arm.c: Use the above defines to get exceptions working on 
7406         iPhone (based on a patch by Luke Howard lukeh@padl.com)
7407         * mini-arm.c: Implement iPhone icache support (based on a patch by
7408         Luke Howard lukeh@padl.com)
7409
7410 2008-03-12  Mark Probst  <mark.probst@gmail.com>
7411
7412         * mini.c: Enable generic sharing of calls to non-static
7413         non-interface non-generic non-value-type methods.
7414
7415         * mini-trampolines.c: Resolve calls from shared generic code.
7416
7417 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
7418
7419         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
7420
7421         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
7422
7423 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
7424
7425         * mini.c: some fixes for the AOT compiler.
7426
7427 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
7428
7429         * cpu-amd64.md: Add clob:1 to some float opcodes.
7430
7431 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
7432
7433         * mini.h: Added MiniVerifierMode enumeration.
7434
7435         * mini.c: Added mini_verifier_set_mode to control
7436         the usage of the new verifier.
7437
7438         * mini.c (mono_method): Integrated the new verifier.
7439
7440         * driver.c: Extended --security option with validil and
7441         verifiable options to activate the new verifier.
7442
7443 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
7444
7445         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
7446         optimization to ctors taking 0 or 2 arguments too.
7447
7448         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
7449         a bit.
7450
7451         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
7452
7453         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
7454
7455 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
7456
7457         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
7458         non-aot case as well.
7459
7460         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
7461
7462         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
7463         changes.
7464
7465         * aot-compiler.c (encode_patch): Ditto.
7466
7467         * mini.h (G_MININT32): Fix the definition of this.
7468
7469 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
7470
7471         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
7472
7473         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
7474
7475 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
7476
7477         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
7478         methods returning vtypes in registers.
7479         (mono_arch_allocate_vars): Ditto.
7480
7481         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
7482
7483         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
7484
7485         * generics.cs: Add a test from the linear IR branch.
7486
7487         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
7488
7489         * mini.c (inline_method): Cache failed inline attempts.
7490
7491 2008-03-04  Mark Probst  <mark.probst@gmail.com>
7492
7493         * mini.c: For shared methods of generic classes put the location
7494         of "this" into the MonoGenericJitInfo.
7495
7496         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
7497         register out of a MonoContext by register number.  Add the generic
7498         sharing context as an argument to mono_arch_find_this_argument().
7499
7500         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
7501         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
7502         for new arch function.
7503
7504         * mini-exception.c: Handle open exception clauses in shared
7505         generic code.
7506
7507         * mini-trampolines.c: Supply additional argument to
7508         mono_arch_find_this_argument().
7509
7510 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
7511
7512         * Makefile.am (regtests): Run the bench.exe tests last.
7513
7514 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
7515
7516         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
7517         a bit.
7518
7519 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
7520
7521         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
7522         with MS.
7523
7524         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
7525         
7526         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
7527
7528         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
7529         whose class has no cctor.
7530
7531         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
7532
7533 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
7534
7535         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
7536         unverified.
7537
7538 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
7539
7540         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
7541         to be in sync with the code on the linear IR branch.
7542
7543         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
7544
7545         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
7546
7547 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
7548
7549         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
7550
7551         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
7552
7553         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
7554
7555         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
7556
7557         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
7558         
7559         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
7560         body.
7561
7562 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
7563
7564         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
7565         OP_LOADR4_MEMBASE emission.
7566
7567         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
7568         (mono_spillvar_offset_float): Ditto.
7569
7570         * mini-mips.c (mono_arch_emit_prolog): Ditto.
7571
7572         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
7573         emission.
7574
7575         * basic-long.cs: Add regression tests for them.
7576
7577         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
7578         use.
7579         (mono_arch_allocate_vars): Fix representation of single-precision float
7580         argument.
7581         (mono_arch_output_basic_block): Ditto.
7582
7583         * inssel-mips.brg: Ditto, remove duplicate items.
7584
7585         * mini-mips.c (emit_load_volatile_arguments): New function to handle
7586         arguments of tail calls as on other platforms.
7587         (mono_arch_output_basic_block): Handle tail calls.
7588
7589         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
7590         register.
7591
7592         * objects.cs (test_5_pass_static_struct): Add test for it.
7593
7594         Contributed under MIT/X11 license.
7595
7596 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
7597
7598         * Makefile.am: Use gmcs for compiling the regression tests.
7599
7600         * *.2.cs *.2.il: Rename to *.cs and *.il.
7601
7602 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
7603
7604         * regalloc.h: Make the vassign array smaller.
7605
7606         * mini.c (mini_method_compile): Remove an unused field in cfg.
7607
7608         * mini-codegen.c: Add a bunch of micro optimizations.
7609
7610 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
7611
7612         * regalloc.h: Remove some unused fields.
7613
7614 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
7615
7616         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
7617
7618         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
7619
7620 2008-02-22  Mark Probst  <mark.probst@gmail.com>
7621
7622         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
7623
7624         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
7625         trampoline: Fetch an entry from the runtime generic context.  If
7626         it's NULL, jump to the actual trampoline to fill the runtime
7627         generic context.  Otherwise, return it.
7628
7629         * mini.c: Call the lazy fetch trampoline to get entries out of the
7630         runtime generic context.
7631
7632         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
7633         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
7634         tramp-sparc.c: Stubs for the lazy fetch trampoline.
7635
7636 2008-02-21  Mark Probst  <mark.probst@gmail.com>
7637
7638         * mini.c: Fetch data out of the extensible part of the runtime
7639         generic context instead of calling a helper function.
7640
7641         * generic-sharing.c: Some functions moved into
7642         metadata/generic-sharing.c.  Helper function for fetching other
7643         types now checks and asserts against extensible rgctx (just for
7644         debugging purposes - the helper function isn't called anymore
7645         unless for debugging).
7646
7647 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
7648
7649         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
7650         for tail calls up to the point that the tests in iltests.exe run. Also add a
7651         dummy CKFINITE implementation.
7652         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
7653         needed for trampoline LMF frames.
7654
7655         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
7656         trampoline LMF frames.
7657
7658 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
7659
7660         * mini.c (inline_method): clean any pending loader error when inlining fail.
7661         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
7662
7663 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
7664
7665         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
7666
7667         * aot-runtime.c (decode_patch_info): Ditto.
7668
7669         * mini.c (mono_resolve_patch_target): Ditto.
7670         
7671         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
7672         icall wrappers.
7673
7674         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
7675         
7676         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
7677         if it references an icall address.
7678
7679 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
7680
7681         * cpu-s390x.md: Remove some more unused opcodes.
7682         
7683         * cpu-s390x.md: Remove some unused opcodes.
7684
7685         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
7686         mono_op_imm_to_op ().
7687
7688         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
7689         instead of a switch statement.
7690         
7691         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
7692         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
7693
7694         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
7695         
7696         * mini-codegen.c: Remove unused mono_regstate2_... functions.
7697
7698         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
7699         -1.
7700
7701 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
7702
7703         * driver.c (mono_main): Improve error reporting when an assembly cannot be
7704         opened. Fixes #362607.
7705
7706         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
7707
7708         * iltests.il.in: Add a test for static methods in interfaces.
7709
7710 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
7711
7712         * genmdesc.c (build_table): Fix a crash on older glib versions.
7713
7714         * cpu-sparc.md: Remove some unused opcodes.
7715         
7716         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
7717         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
7718
7719         * cpu-amd64.md: Remove some unused opcodes.
7720
7721         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
7722         like the other opcodes.
7723
7724 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
7725
7726         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
7727
7728         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
7729
7730         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
7731         variables 'cfg' instead of 'm' for consistency.
7732
7733         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
7734
7735         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
7736         argument holding the vtype return address, to avoid the ambigious use of
7737         cfg->ret for this purpose.
7738
7739         * mini.c (NEW_RETLOADA): Use vret_addr if set.
7740
7741         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
7742         
7743         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
7744         new mono_print_ins () function which only takes one argument.
7745
7746 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
7747
7748         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
7749         macro arguments.
7750
7751 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
7752
7753         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
7754
7755         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
7756
7757         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
7758         opcodes and other small changes.
7759
7760         * mini-ops.h: Add some new opcodes from the linear IR branch.
7761
7762         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
7763
7764         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
7765         opcodes, use the REG_MEMBASE opcodes instead.
7766         
7767         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
7768         opcodes, use the REG_MEMBASE opcodes instead.
7769         
7770         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
7771         linear IR branch.
7772
7773         * mini.c (mono_op_imm_to_op): New helper function.
7774
7775         * mini-ops.h: Add some opcodes from linear IR branch.
7776
7777 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
7778
7779         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
7780         <tsv@solvo.ru>.
7781
7782 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
7783
7784         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
7785         OP_ICONV_TO_R4/R8.
7786
7787         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
7788
7789 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
7790
7791         * aot-compiler.c (emit_method_code): Add an assert.
7792
7793         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
7794         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
7795         methods.
7796
7797 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
7798
7799         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
7800         some load/store opcodes so they are consistent. 
7801         (mono_arch_emit_prolog): Simplify some code.
7802
7803         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
7804
7805         * objects.cs: Add tests for large argument offsets on ARM.
7806
7807         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
7808         stack offsets. Fixes #359651.
7809
7810         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
7811
7812         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
7813
7814         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
7815
7816         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
7817
7818         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
7819
7820         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
7821         rid of CEE_CONV_R_UN.
7822
7823         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
7824
7825 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
7826
7827         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
7828
7829         * mini.c (mono_normalize_opcodes): Add some more opcodes.
7830
7831         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
7832
7833         * cpu-amd64.md: Remove some unused opcodes.
7834
7835         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
7836
7837         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
7838
7839         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
7840         arch specific functions for its parts. Call the peephole pass after local
7841         regalloc so the prolog can compute a more accurate max_offset.
7842         
7843         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
7844         the corresponding OP_I/OP_L opcodes.
7845
7846         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
7847
7848         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
7849
7850 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
7851
7852         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
7853         as they are handled in mini.c.
7854
7855         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
7856         
7857         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
7858         case since it is handled in mini.c.
7859
7860         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
7861
7862         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
7863
7864         * *.c: Use the new opcodes in the IR and back end code.
7865
7866         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
7867
7868         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
7869
7870 2008-02-06  Mark Probst  <mark.probst@gmail.com>
7871
7872         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
7873         an assert because it has a race condition.
7874
7875 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
7876
7877         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
7878
7879         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
7880
7881         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
7882
7883         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
7884         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
7885
7886 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
7887
7888         * cpu-amd64.md (move): Correct the maximum size of move.
7889
7890 2008-02-05  Mark Probst  <mark.probst@gmail.com>
7891
7892         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
7893         the generic class init trampoline to return quickly if the class
7894         is already inited.
7895
7896 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
7897
7898         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
7899         issues where an 32 bit callsite cannot be patched by a 64 bit address.
7900
7901 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
7902
7903         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
7904         branch.
7905
7906 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
7907
7908         * objects.cs: Add some soft-float tests.
7909
7910         * mini.c: Fix a couple more soft-float issues.
7911
7912         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
7913
7914         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
7915         avoid a REX prefix.
7916
7917 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
7918
7919         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
7920         exception happens while compiling a virtual method.
7921
7922 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
7923
7924         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
7925         
7926         * mini-sparc.c: Fix build.
7927
7928         * mini-sparc.c (get_call_info): Add support for generic sharing.
7929
7930         * mini-exceptions.c: Add a FIXME.
7931
7932 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
7933
7934         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
7935         altstack handling code.
7936
7937         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
7938         
7939         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
7940
7941         * mini-s390.c: Add support for generic sharing.
7942
7943         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
7944         Fix CAS on s390.
7945         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
7946
7947         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
7948
7949         * mini-s390x.c: Add support for generic sharing.
7950         
7951         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
7952         Fix CAS on ia64.
7953         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
7954
7955         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
7956         can be used since it takes a 16 bit signed immediate.
7957
7958         * inssel-s390x.brg: Fix OP_SETRET.
7959
7960         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
7961
7962         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
7963
7964         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
7965
7966         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
7967
7968         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
7969         in one place.
7970
7971         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
7972         stuff.
7973
7974         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
7975         of the unused mono_arch_patch_delegate_trampoline stuff.
7976
7977 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
7978
7979         * basic-long.cs: Move the fp related tests to basic-float.cs.
7980
7981         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
7982
7983         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
7984
7985         * basic-calls.cs: Add a test for proper float argument passing.
7986
7987         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
7988         if the context corresponds to an exception received through a signal.
7989
7990         * exceptions.cs: Add a test for nullref handling at the start of a try
7991         clause.
7992
7993         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
7994
7995         * jit-icalls.c (mono_break): New JIT icall.
7996
7997         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
7998
7999         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
8000
8001 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
8002
8003         * cpu-*.md: Get rid of unused opcodes.
8004
8005         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
8006
8007         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
8008         by all platforms.
8009
8010         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
8011         define.
8012
8013         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
8014         the arch independent trampoline code in mini-trampolines.c.
8015
8016         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
8017
8018         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
8019
8020         * mini-s390.h: Remove an unused define.
8021         
8022         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
8023         the arch independent trampoline code in mini-trampolines.c.
8024
8025         * mini-arm.c (mono_arch_emit_prolog): Fix build.
8026
8027 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
8028
8029         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
8030
8031         * mini-s390.c (mono_arch_emit_prolog): Fix build.
8032
8033         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
8034
8035         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
8036
8037         * cpu-amd64.md: Use smaller sizes for int opcodes.
8038
8039         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
8040
8041         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
8042         objects.cs.
8043
8044         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
8045         debugging.
8046
8047         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
8048         instead of though a pointer to save an indirection when accessing elements of
8049         the array.
8050
8051         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
8052         some typos.
8053         (NOT_IMPLEMENTED): New helper macro.
8054         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
8055         of a bb.
8056
8057         * *.c: Use the new helper macro.
8058
8059 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
8060
8061         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
8062
8063 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
8064
8065         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
8066         stack slots.
8067
8068 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
8069
8070         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
8071         profiling is enabled.
8072         
8073         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
8074         the end.
8075         (mono_arch_emit_prolog): Add more first bblock optimizations.
8076
8077         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
8078         in order if possible.
8079         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
8080         bblock, since the arguments are still in their original registers.
8081
8082         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
8083
8084 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
8085
8086         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
8087         as well.
8088
8089         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
8090         offset 0.
8091
8092         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
8093
8094         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
8095         process async exceptions received while in unmanaged code.
8096
8097         * mini.c (mini_init): Install a callback with the runtime which will be called
8098         when a thread receives an async exception while in unmanaged code.
8099
8100         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
8101
8102         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
8103
8104 2008-01-16  Wade Berrier  <wberrier@novell.com>
8105
8106         * cpu-g4.md:
8107         * cpu-arm.md:
8108         * cpu-s390x.md:
8109         fix build
8110
8111 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
8112
8113         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
8114         compilation with sun cc.
8115
8116         * cpu-*.md: Fix the build.
8117
8118         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
8119
8120         * mini-amd64.h: Add some comments to the MonoLMF structure.
8121
8122         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
8123         
8124         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
8125         in the LMF structure if possible. This saves two instructions in the
8126         managed->native wrappers.
8127
8128         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
8129
8130 2008-01-16  Mark Probst  <mark.probst@gmail.com>
8131
8132         * generic-sharing.c: New type argument lookup code which uses the
8133         runtime generic context template.
8134
8135 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
8136
8137         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
8138
8139         * mini-arm.c (add_general): Fix arm eabi parameter passing.
8140         (mono_arch_output_basic_block): Fix localloc implementation.
8141
8142         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
8143
8144         * mini-ia64.c (peephole_pass): Fix ia64 build.
8145
8146         * mini-amd64.c (peephole_pass): Fix a warning.
8147         
8148         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
8149         at a constant offset from sp/fp.
8150
8151         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
8152         instead of obtaining it from *lmf in the managed method case.
8153
8154 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
8155
8156         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
8157
8158 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
8159
8160         * mini.h (MonoInstList): New type.
8161         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
8162         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
8163         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
8164         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
8165         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
8166         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
8167         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
8168         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
8169         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
8170         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
8171         MONO_INST_LIST_FOR_EACH_ENTRY,
8172         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
8173         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
8174         mono_inst_list_first, mono_inst_list_last,
8175         mono_inst_list_next, mono_inst_list_prev): New instruction
8176         list handling interfaces.
8177         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
8178         list head 'ins_list'.
8179         (MonoInst): Replace next pointer with list head 'node'.
8180         (MonoCallInst): Make 'out_args' a MonoInstList.
8181         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
8182         (MonoCompile): Delete reverse_inst_list and
8183         reverse_inst_list_len.
8184         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
8185         mono_arch_lowering_pass, mono_arch_local_regalloc,
8186         mono_arch_output_basic_block, mono_arch_emit_prolog):
8187         Convert to new instruction lists.
8188         (insert_after_ins): Delete.
8189         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
8190         instruction lists.
8191         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
8192         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
8193         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
8194         mono_emulate_opcode, mono_emit_load_got_addr,
8195         inline_method, mono_method_to_ir, mono_print_bb_code,
8196         print_dfn, decompose_pass, nullify_basic_block,
8197         replace_out_block_in_code, remove_block_if_useless,
8198         merge_basic_blocks, move_basic_block_to_end,
8199         try_unsigned_compare, optimize_branches, mono_print_code,
8200         mini_select_instructions, remove_critical_edges): Likewise.
8201         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
8202         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
8203         mono_arch_output_basic_block, mono_arch_emit_prolog):
8204         Likewise.
8205         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
8206         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
8207         mono_arch_output_basic_block): Likewise.
8208         (inst_list_prepend, insert_after_ins): Delete.
8209         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
8210         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
8211         instruction lists.
8212         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
8213         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
8214         mono_arch_emit_prolog): Likewise.
8215         * cfold.c (mono_constant_fold): Likewise.
8216         * liveness.c (visit_bb, mono_analyze_liveness,
8217         optimize_initlocals): Likewise.
8218         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
8219         * graph.c (mono_draw_code_cfg): Likewise.
8220         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
8221         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
8222         mono_ssa_cprop): Likewise.
8223         * abcremoval (get_relations_from_previous_bb, process_block):
8224         Likewise.
8225         * local-propagation (mono_cprop_invalidate_values,
8226         mono_local_cprop_bb): Likewise.
8227         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
8228         peephole_pass, mono_arch_output_basic_block,
8229         mono_arch_emit_prolog): Likewise.
8230         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
8231         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
8232         mono_arch_emit_prolog): Likewise.
8233         (insert_after_ins): Delete.
8234         * aliasing.c (print_code_with_aliasing_information,
8235         mono_build_aliasing_information, mono_aliasing_deadce):
8236         Convert to new instruction lists.
8237         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
8238         peephole_pass, NEW_INS, mono_arch_lowering_pass,
8239         mono_arch_local_regalloc, mono_arch_output_basic_block):
8240         Likewise.
8241         (insert_after_ins): Delete.
8242         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
8243         peephole_pass, mono_arch_output_basic_block): Convert to
8244         new instruction lists.
8245         * mini-codegen (InstList, inst_list_prepend,
8246         insert_after_ins): Delete.
8247         (insert_before_ins, get_register_force_spilling,
8248         get_register_spilling, free_up_ireg, free_up_reg,
8249         create_copy_ins, create_spilled_store, alloc_int_reg,
8250         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
8251         to new instruction lists.
8252         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
8253         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
8254         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
8255         (insert_after_ins): Delete.
8256         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
8257         mono_arch_local_regalloc, mono_arch_output_basic_block,
8258         mono_arch_call_opcode): Convert to new instruction lists.
8259         (insert_after_ins): Delete.
8260         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
8261         peephole_pass, mono_arch_output_basic_block,
8262         mono_arch_emit_prolog): Convert to new instruction lists.
8263
8264 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
8265
8266         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
8267
8268         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
8269         Fixes #353182.
8270
8271         * Makefile.am (version.h): Make this work with non-bash shells.
8272
8273 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
8274
8275         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
8276
8277 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
8278
8279         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
8280         the InitializeArray optimization.
8281
8282 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
8283
8284         * mini.c driver.c: Don't include os/gc_wrapper.h.
8285
8286 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
8287
8288         * mini.c (print_jit_stats): Print GC statistics if available.
8289
8290 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
8291
8292         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
8293
8294 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
8295
8296         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
8297
8298 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
8299
8300         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
8301         
8302         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
8303
8304         * driver.c (mono_main): Ditto.
8305
8306 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
8307
8308         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
8309
8310         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
8311         in the vtable can't be encoded.
8312         (compile_method): Ditto.
8313
8314 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
8315
8316         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
8317         defined.
8318
8319         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
8320         lmf->rbp.
8321
8322         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
8323         the top LMF entry belongs to the current method.
8324
8325         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
8326
8327 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
8328
8329         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
8330         
8331         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
8332
8333         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
8334
8335         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
8336
8337         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
8338
8339         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
8340         implementation.
8341
8342         * basic-float.cs: Add an ulong->double cast test.
8343
8344 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
8345
8346         * mini.c (mono_method_to_ir): Fix a warning.
8347
8348 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
8349
8350         * mini-ops.h: Add OP_SWITCH.
8351
8352         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
8353         CEE_SWITCH in back-end code, use OP_SWITCH instead.
8354
8355 2007-12-11  Geoff Norton  <gnorton@novell.com>
8356
8357         * mini-s390x.c: Minor change to the MAX() define to allow
8358         it to compile with other gcc versions.
8359
8360 2007-12-11  Geoff Norton  <gnorton@novell.com>
8361
8362         * cpu-s390x.md:
8363         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
8364
8365 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
8366
8367         exceptions-arm.c (mono_arch_get_restore_context): Restore
8368         the frame pointer.
8369
8370         exceptions-arm.c (throw_exception): Save the frame pointer.
8371         This is a partial fix for #323747. Only the client side is
8372         fixed.
8373
8374 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
8375
8376         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
8377         was using an unrelated variable to log the class which
8378         needed the cctor to be called. This was crashing on arm.
8379
8380 2007-12-09  Robert Jordan  <robertj@gmx.net>
8381
8382         * mini-x86.c (mono_arch_emit_epilog):
8383         Consider all kinds of 64-bit types. Fixes #323114.
8384
8385 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
8386
8387         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
8388
8389 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
8390
8391         * mini-amd64.c (peephole_pass): Add a missing instruction check.
8392
8393 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
8394
8395         * mini.c: run type ctor before allocating an object, not only
8396         when running it's constructor method (fixes at least part of bug #342507).
8397
8398 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
8399         
8400         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
8401         
8402         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
8403         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
8404         function.
8405
8406         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
8407         mono_generic_class_init_trampoline () the same as it is done with the other
8408         trampolines.
8409
8410         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
8411         aot-runtime.c aot-compiler.c: Implement AOT support.    
8412
8413 2007-12-07  Mark Probst  <mark.probst@gmail.com>
8414
8415         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
8416         build for archs which don't have the vtable trampoline defined
8417         yet.
8418
8419 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
8420
8421         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
8422
8423         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
8424
8425         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
8426
8427         * tramp-<ARCH>.c: Use the new helper function.
8428
8429 2007-12-07  Mark Probst  <mark.probst@gmail.com>
8430
8431         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
8432         trampoline call, which takes a vtable argument.
8433
8434         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
8435         OP_TRAMPCALL_VTABLEs like other calls.
8436
8437         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
8438         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
8439         call.  Implemented a support function which fetches the vtable
8440         from a register set.
8441
8442         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
8443         Implemented a generic class init trampoline, using the
8444         OP_TRAMPCALL_VTABLE opcode.
8445
8446         * mini.c: Implemented static field access when sharing generic
8447         code.  This implies initing the class using the new
8448         OP_TRAMPCALL_VTABLE call.
8449
8450 2007-12-07  Mark Probst  <mark.probst@gmail.com>
8451
8452         * mini.c: Don't compile methods with sharing enabled if their
8453         classes are disabled for sharing.
8454
8455 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
8456
8457         * inssel.brg: Add a missing sign extension to the GETCHR and array access
8458         opcodes. Fixes #346563.
8459
8460         * objects.cs: Add a new test.
8461
8462         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
8463
8464         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
8465         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
8466
8467 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
8468
8469         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
8470
8471 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
8472
8473         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
8474         code stream.
8475
8476 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
8477
8478         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
8479
8480         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
8481         optimization in the AOT case.
8482         
8483 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
8484
8485         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
8486         
8487         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
8488
8489         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
8490
8491         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
8492
8493         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
8494         is created by the inlined delegate ctor.
8495
8496         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
8497
8498         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
8499
8500 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
8501
8502         * cpu-x86.md: Fix the length of ckfinite.
8503
8504 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
8505
8506         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
8507         
8508         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
8509         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
8510
8511         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
8512
8513         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
8514         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
8515
8516 2007-11-28  Martin Baulig  <martin@ximian.com>
8517
8518         * mini-x86.c
8519         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
8520         after creating the trampoline.
8521
8522 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
8523
8524         * aot-runtime.c (load_aot_module): Check runtime version if needed.
8525
8526         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
8527         the same version.
8528
8529         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
8530         instead of the calling method to help AOT.
8531
8532         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
8533
8534 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
8535
8536         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
8537         is defined.
8538
8539 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
8540
8541         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
8542         
8543         * aot-compiler.c (compile_method): Correct check for generic method definitions.
8544         (encode_method_ref): No need to handle generic method definitions specially.
8545
8546         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
8547
8548         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
8549         decode_klass_info.
8550
8551         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
8552         encode_klass_info.
8553         (compile_method): Enable generic sharing.
8554
8555 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
8556
8557         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
8558         (mini_method_compile): Add preliminary support for AOTing shared generic code.
8559
8560         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
8561         generic code.
8562
8563         * mini-trampolines.c: Fix a warning.
8564
8565         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
8566         NEW_PCONST.
8567         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
8568         (generic_class_is_reference_type): Remove unused function.
8569
8570         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
8571         in the generic vtable trampoline case.
8572
8573         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
8574         
8575         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
8576         return an AOT method based on a vtable slot.
8577
8578         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
8579
8580         * mini.c (mini_get_vtable_trampoline): Export this.
8581
8582 2007-11-22  Martin Baulig  <martin@ximian.com>
8583
8584         * debug-debugger.h
8585         (MonoDebuggerInfo): Move `debugger_version' up.
8586
8587 2007-11-22  Martin Baulig  <martin@ximian.com>
8588
8589         * mini-amd64.c
8590         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
8591
8592         * mini-trampolines.c
8593         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
8594         after compiling the method.
8595
8596 2007-11-20  Martin Baulig  <martin@ximian.com>
8597
8598         * debug-mini.c
8599         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
8600         (mono_debugger_remove_breakpoint): Likewise.
8601         (mono_debugger_check_breakpoints): Likewise.
8602
8603         * debug-debugger.c: Implement the new breakpoint interface here.
8604
8605 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
8606
8607         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
8608         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
8609
8610         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
8611
8612 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
8613
8614         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
8615
8616         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
8617         mini.c.
8618
8619         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
8620         mini.c.
8621
8622         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
8623         returning a vtype in a register.
8624
8625         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
8626         here from the arch specific code.
8627
8628         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
8629         mini.c.
8630
8631         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
8632         (mono_arch_emit_prolog): Increment maximum prolog size.
8633
8634         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
8635         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
8636
8637         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
8638         MonoGenericSharingContext.
8639
8640         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
8641         MonoGenericSharingContext. Allocate memory from the cfg mempool.
8642
8643 2007-11-15  Mark Probst  <mark.probst@gmail.com>
8644
8645         * mini.c, mini.h, generic-sharing.c: Functions for producing code
8646         which extract fields out of the runtime generic context.  Full
8647         sharing of the NEWARR opcode.
8648
8649 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
8650
8651         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
8652         --enable-minimal=ssa.
8653
8654 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
8655
8656         * mini-trampolines.c (mono_delegate_trampoline): Update after 
8657         mono_marshal_get_delegate_invoke () signature change.
8658
8659 2007-11-13  Mark Probst  <mark.probst@gmail.com>
8660
8661         * mini.c: Removed the shared context in favor of the generic
8662         sharing context.  Allocate the MonoJitInfo structure with room for
8663         the generic sharing context if it's needed.
8664
8665         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
8666         domain-internals.h now.
8667
8668         * mini-x86.c: Pass the generic sharing context to get_call_info ().
8669
8670         * generic-sharing.c: Several changes for working without a shared
8671         context and instead operating on open types instead.
8672
8673 2007-11-12  David S. Miller  <davem@davemloft.net>
8674
8675        * inssel-sparc.brg: Fix double instruction emit.
8676
8677 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
8678
8679         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
8680         Get/Set/Address methods.
8681         
8682         * mini.c debug-debugger.c mini-trampolines.c: Update after 
8683         mono_marshal_get_delegate_invoke signature change.
8684
8685 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
8686
8687         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
8688         This can happens with dynamic methods. Fixes the other bug in #322722.
8689
8690 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
8691
8692         * tramp-arm.c (mono_arch_patch_callsite): Support patching
8693         BX call sequence.
8694
8695         * mini-arm.c (arm_patch): Implement patching of BX call
8696         sequence. Fixes one of the bugs in #322722.
8697
8698 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
8699
8700        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
8701        under Linux.  We only need to flush every 32-byte cache line.    
8702
8703 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
8704
8705         * mini.c:
8706         move_basic_block_to_end: Add branches when needed, eventually creating
8707         a new BB.
8708         optimize_branches: added a parameter that tells if it's ok to create
8709         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
8710         and avoid calling move_basic_block_to_end when it's not ok.
8711         Fixes bug 318677.
8712
8713 2007-11-07  Mark Probst  <mark.probst@gmail.com>
8714
8715         * mini.c: Abort inlining call to InitializeArray if something
8716         looks wrong.  Let the icall handle it, which now has proper safety
8717         checks.
8718
8719 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
8720
8721         * mini.c (mono_spill_call): add support for soft-float.
8722
8723         * mini.c (mono_method_to_ir): add support for soft-float
8724         to inlined functions that return float.
8725
8726         * mini.c (mono_method_to_ir): add support for soft-float
8727         to cee_stsfld opcode on float fields.
8728
8729 2007-11-05  Geoff Norton  <gnorton@novell.com>
8730
8731         * mini-x86.h: Fix the structure access for X86 Leopard.
8732
8733
8734 2007-11-05  Martin Baulig  <martin@ximian.com>
8735
8736         * mini-trampolines.c
8737         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
8738         after compiling the method to notify the debugger.
8739
8740 2007-11-05  Martin Baulig  <martin@ximian.com>
8741
8742         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
8743
8744 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
8745
8746         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
8747         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
8748
8749 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
8750
8751         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
8752         native-to-managed wrappers.
8753         
8754 2007-11-01  Geoff Norton  <gnorton@novell.com>
8755
8756         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
8757         members.
8758
8759 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
8760
8761         * mini.c, mini-x86.c: when getting back from unmanaged code
8762         to managed via a marshaled delegate we also need to set the
8763         right domain.
8764
8765 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
8766
8767         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
8768         for amd64.
8769
8770 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
8771
8772         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
8773         let the debugger or other external agents to tell the JIT when
8774         a sw breakpoint has been inserted in the code that the JIT needs
8775         to be able to inspect.
8776
8777 2007-10-31  Martin Baulig  <martin@ximian.com>
8778
8779         * debug-debugger.h
8780         (MonoDebuggerInfo): Remove `runtime_class_init'.
8781
8782 2007-10-30  Martin Baulig  <martin@ximian.com>
8783
8784         * debug-mini.h
8785         (mono_debugger_thread_created): Added `MonoThread *' argument.
8786         (mono_debugger_extended_notification): New public method.
8787         (mono_debugger_trampoline_compiled): New public method.
8788
8789         * debug-mini.c
8790         (MonoDebuggerThreadInfo): Added `thread' and
8791         `extended_notifications' fields.
8792
8793         * debug-debugger.c
8794         (debugger_executable_code_buffer): New static variable.
8795
8796         * debug-debugger.h
8797         (MonoDebuggerInfo): Added `executable_code_buffer',
8798         `executable_code_buffer_size', `breakpoint_info_area',
8799         `breakpoint_table' and `breakpoint_table_size'.
8800
8801 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
8802
8803         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
8804         that IP  either is an unused value or the vtable pointer. IMT 
8805         calls use vtable + offset now. Reduced by almost half the size
8806         of IMT entries.
8807
8808 2007-10-26  Jonathan Chambers <joncham@gmail.com>
8809
8810         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
8811         defines to access param registers. Replace long usage with
8812         gsize as sizeof(long) != sizeof(void*) on Win64.
8813
8814         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
8815         on Win64. Fix intrinsic, use _AddressOfReturnAddress
8816         instead of non-existant _GetAddressOfReturnAddress.
8817
8818         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
8819         param registers. Save/restore %rdi and %rsi in MonoLMF.
8820
8821         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
8822         param registers. Modify (throw_exception) signature to take 
8823         %rdi and %rsi on Win64. 
8824
8825         Code is contributed under MIT/X11 license.
8826
8827 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
8828
8829         * helpers.c: unlink debugging output files.
8830
8831 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
8832
8833         * mini.c: Move mono_create_ftnptr () to object.c.
8834
8835 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
8836
8837         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
8838         optional. This function can now be used to disassemble code generated
8839         outside the JIT such as trampolines and IMT thunks.
8840
8841         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
8842
8843         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
8844         vtable pointer from a ldr instruction.
8845
8846         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
8847         new IMT call sequence.
8848
8849         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
8850         call sequence for interface invocations.
8851
8852         * mini-arm.c (mono_arch_emit_imt_argument): added, required
8853         for imt support. This function is empty since IMT on ARM requires no
8854         special handling on the IR side.
8855
8856         * mini-arm.c (mono_arch_find_imt_method): added, required for
8857         imt support.
8858
8859         * mini-arm.c (mono_arch_find_this_argument): added, required
8860         for imt support.
8861
8862         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
8863         a ldr instruction to load a value stored in the code stream.
8864
8865         * mini-arm.c (mono_arch_build_imt_thunk):added, required
8866         for imt support.
8867
8868
8869 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
8870
8871         * mini.c (mini_init): Install the jump trampoline callback.
8872
8873 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
8874
8875         * mini-trampolines.c: handle synchronized methods with the common
8876         vtable trampoline (bug #335601).
8877
8878 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
8879
8880         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
8881
8882         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
8883         64 bit platforms.
8884
8885         * mini-ia64.h mini-ia64.c: Add support for IMT.
8886
8887         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
8888         prolog. Fixes #331958.
8889
8890 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
8891
8892         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
8893
8894 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
8895
8896         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
8897         trampoline.
8898
8899 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
8900
8901         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
8902         trampoline.
8903
8904 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
8905
8906         * mini-x86.c, mini-x86.h: x86 support for the common vtable
8907         trampoline.
8908
8909 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
8910
8911         * mini-trampolines.c: changed the magic rampoline to understand
8912         the common vtable trampoline method: the method to invoke is
8913         determined by the vtable displacement of the call.
8914
8915 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
8916
8917         * mini.c, mini.h: register the common vtable trampoline if the
8918         architecture supports it.
8919
8920 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
8921
8922         * cpu-amd64.md: use the correct max length for tls_get.
8923
8924 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
8925
8926         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
8927         CEE_STELEM_ANY. Fixes #333696.
8928
8929 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
8930
8931         * exceptions-x86.c: provide more graceful handling of the case where
8932         we followed a bogus function pointer from managed code (bug #332866).
8933
8934 2007-10-11  Mark Probst  <mark.probst@gmail.com>
8935
8936         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
8937         replaces the generic_shared flag and will carry more information
8938         in the future.
8939
8940         * generic-sharing.c: Added mini_type_stack_size() which allows
8941         allows open types if given a generic sharing context.
8942         mini_get_basic_type_from_generic() takes a
8943         MonoGenericSharingContext* instead of a MonoCompile* now.
8944
8945         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
8946         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
8947         mini-sparc.c, mini-x86.c: Trivial changes required by the two
8948         changes above.  Just passing arguments through to the right
8949         places.
8950
8951 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
8952
8953         * mini-arm.c: unify the call emission to emit_code_seq().
8954
8955 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
8956
8957         * tramp-arm.c: reduced the trampoline size.
8958
8959 2007-10-10  Mark Probst  <mark.probst@gmail.com>
8960
8961         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
8962         variable handling out of arch-specific code.
8963
8964 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
8965
8966         * mini-arm.c: implemented fast delegate dispatch.
8967
8968 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
8969
8970         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
8971         that fp elimination is turned off if the space required by locals is too
8972         big. Fixes #331958.
8973
8974 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
8975
8976         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
8977         ARM to the new style trampoline.
8978
8979 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
8980
8981         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
8982
8983         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
8984
8985 2007-10-09  Martin Baulig  <martin@ximian.com>
8986
8987         * debug-debugger.h
8988         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
8989         `field_info_offset_offset'.     
8990
8991 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
8992
8993         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
8994         removed more internal usage of the r11 register and made it available
8995         to the register allocator.
8996
8997 2007-10-08  Mark Probst  <mark.probst@gmail.com>
8998
8999         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
9000         when sharing generics and treat type variables as references.
9001
9002 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
9003
9004         * mini-ppc.c: started removing the internal uses of register r11
9005         to eventually allow the register allocator to manage it as an
9006         additional available register.
9007
9008 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
9009
9010         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
9011
9012 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
9013
9014         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
9015         specific trampolines as they are not performance critical as a jump
9016         target (maybe align as before only for AOT code?). This saves about
9017         200 KB of native code on x86 for monodevelop startup.
9018
9019 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
9020
9021         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
9022         monodevelop startup.
9023
9024 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
9025
9026         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
9027
9028         * mini-sparc.h mini-sparc.c: Implement IMT support.
9029
9030         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
9031         its smaller and doesn't clobber sparc_g1.
9032
9033         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
9034
9035 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
9036
9037         * mini-ppc.c: optimized the size of the IMT thunks a bit.
9038
9039 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
9040
9041         * mini-ppc.c: implemented fast delegate invocation.
9042
9043 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
9044
9045         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
9046
9047 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
9048
9049         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
9050         code to the new style trampoline in preparation for IMT support.
9051
9052 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
9053
9054         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
9055         systems already. This also reduces the specific trampiline sizes and
9056         prepares for the use of r12 as the IMT identifier register.
9057
9058 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
9059
9060         * mini-mips.h: endianess fix (simplified from a patch by
9061         Thomas Kunze <thommy@tabao.de>, bug #323737).
9062
9063 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
9064
9065         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
9066         to access ucontext fields and enable netbsd support
9067         (partially from Magnus Henoch <mange@freemail.hu>).
9068
9069 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
9070
9071         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
9072         use the preprocessor from the CPP env var if it is set.
9073
9074 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
9075
9076         * mini-trampolines.c: fixed an assertion and moved it earlier in the
9077         code, before interface_offset gets used.
9078
9079 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
9080
9081         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
9082         mono_class_setup_vtable () before accessing klass->vtable.
9083
9084 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
9085
9086         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
9087         hackish.
9088
9089 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
9090
9091         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
9092         IMT slots (this saves hundreds of KB of memory in programs like
9093         IronPython and Monodevelop).
9094
9095 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
9096
9097         * mini.c: print the delegate counter.
9098
9099 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
9100
9101         * mini-x86.c: make it easier to enable the debugging code for IMT
9102         slots.
9103
9104 2007-09-28  Martin Baulig  <martin@ximian.com>
9105
9106         * debug-debugger.h
9107         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
9108         `mono_method_klass_offset' and `mono_method_token_offset'.
9109
9110 2007-09-20  Mark Probst  <mark.probst@gmail.com>
9111
9112         * mini.c: First generics sharing implementation.  Can only share
9113         in very simple cases.  If sharing doesn't work it falls back to
9114         dedicated compilation.
9115
9116         * mini.h: Flag in MonoCompile to specify whether generic
9117         compilation is shared.  Flags enum for marking which generic inst
9118         of a context is used.  Prototypes for helper functions.
9119
9120         * generic-sharing.c: Helper functions for generic method sharing.
9121
9122         * optflags-def.h: Optimization flag (gshared) for enabling generic
9123         method sharing added.
9124
9125         * Makefile.am: generic-sharing.c added.
9126
9127 2007-09-19 Daniel Nauck <dna@mono-project.de>
9128
9129         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
9130
9131 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
9132         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
9133         fixes bug 325507.
9134
9135 2007-09-19  Martin Baulig  <martin@ximian.com>
9136
9137         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
9138         mono_debug_cleanup() is now part of mono_cleanup().
9139
9140 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
9141
9142         * driver.c (mono_main): Fix a warning.
9143
9144 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
9145
9146         * aot-compiler.c: Optimize various parts when processing large assemblies.
9147         Fixes ##325568.
9148
9149         * mini.c (mono_patch_info_hash): Improve hash function.
9150
9151 2007-09-14  Jonathan Chambers <joncham@gmail.com>
9152
9153         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
9154         
9155         Code is contributed under MIT/X11 license.
9156
9157 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
9158
9159         * mini.c (mini_init): Fix a leak.
9160
9161         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
9162
9163 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
9164
9165         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
9166
9167 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
9168
9169         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
9170
9171 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
9172
9173         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
9174         variance tests.
9175
9176         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
9177
9178         * mini.c (handle_alloc): Enable managed allocators in AOT code.
9179
9180         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
9181
9182         * aot-runtime.c (decode_patch_info): Ditto.
9183
9184 2007-09-12  Jonathan Chambers <joncham@gmail.com>
9185
9186         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
9187         static case. Cache delegates in architecture specific code, 
9188         based on number of parameters.
9189         
9190         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
9191         in architecture specific code, based on number of parameters.
9192         
9193         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
9194         caching happen in architecture specific code now.
9195         
9196         Code is contributed under MIT/X11 license.
9197
9198 2007-09-12  Jonathan Chambers <joncham@gmail.com>
9199
9200         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
9201         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
9202         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
9203
9204         Code is contributed under MIT/X11 license.
9205
9206 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
9207         * mini.c: (mono_thread_abort) Fixed bug #82416.
9208
9209 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
9210
9211         * mini.: hook the new managed GC allocation feature into the JIT.
9212
9213 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
9214
9215         * mini.c: implementation for the new runtime tls opcode.
9216
9217 2007-09-11  Martin Baulig  <martin@ximian.com>
9218
9219         * debug-debugger.h
9220         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
9221         `mono_method_inflated_offset'.
9222
9223 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
9224
9225         * driver.c mini.h mini.c: Add a new devel command line option for injecting
9226         async exceptions into a method.
9227
9228         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
9229         purpose of testing whenever the unwinder works at every instruction.
9230
9231 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
9232
9233         * mini.c: check accessibility of method used in ldftn (fixes
9234         bug #82635).
9235
9236 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
9237
9238         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
9239
9240         * inssel.brg: Fix a warning.
9241
9242 2007-09-03  Martin Baulig  <martin@ximian.com>
9243
9244         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
9245         now takes the `main_method' as argument.
9246
9247 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
9248
9249         * cpu-sparc.md (endfilter): Add missing src1:i argument.
9250
9251 2007-08-30  Jonathan Chambers <joncham@gmail.com>
9252
9253         * driver.c: include the cil-coff.h header on Windows.
9254         
9255         Code is contributed under MIT/X11 license.
9256
9257 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
9258
9259         * mini.c, driver.c: don't include the cil-coff.h header.
9260
9261 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
9262
9263         * mini.c: flag places that needs fixes fo soft-float support.
9264
9265 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
9266
9267         * mini.h, inssel-float.brg: fix soft-float constant loads on big
9268         endian systems (partially from Dean Jenkins, bug #81924).
9269
9270 2007-08-28  Mark Probst  <mark.probst@gmail.com>
9271
9272         * mini.c (check_linkdemand): Remove embedded reference object in
9273         call to LinkDemandSecurityException.
9274         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
9275         with an IntPtr instead of a reference object.
9276
9277 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
9278
9279         * mini.c (handle_initobj): Handle alignment properly.
9280
9281         * inssel.brg (mini_emit_memset): Ditto. 
9282
9283         * inssel.brg (mini_emit_memcpy): Ditto. 
9284
9285         * inssel-sparc.brg: Ditto.              
9286
9287         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
9288
9289 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
9290
9291         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
9292         exceptions raised in unmanaged code. Fixes part of #82594.
9293
9294 2007-08-24  Mark Probst  <mark.probst@gmail.com>
9295
9296         * mini.c (mono_method_to_ir), declsec.c
9297         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
9298
9299 2007-08-22  Martin Baulig  <martin@ximian.com>
9300
9301         * debug-mini.h
9302         (MonoDebuggerThreadInfo): New typedef.
9303         (mono_debugger_thread_table): New global variable.
9304         (mono_debugger_thread_created): New public function.
9305         (mono_debugger_thread_cleanup): New public function.
9306
9307         * debug-debugger.h
9308         (MonoDebuggerInfo):
9309         - removed `get_current_thread' and `lookup_assembly'.
9310         - removed `data_table'.
9311         - added `thread_table'.
9312
9313         * mini.c
9314         (mono_thread_start_cb): Call mono_debugger_thread_created().
9315         (mono_thread_attach_cb): Likewise.
9316         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
9317         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
9318         initial domain.
9319
9320         * driver.c (mono_main): Move mono_debug_init() up, before calling
9321         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
9322
9323 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
9324
9325         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
9326         together when passing several arguments of type double (gives a small
9327         speedup and saves a few bytes of generated code).
9328
9329 2007-08-20  Jb Evain  <jbevain@novell.com>
9330
9331         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
9332
9333 2007-08-20  Jb Evain  <jbevain@novell.com>
9334
9335         * mini.c (mono_method_to_ir): throw MethodAccessException
9336         and FieldAccessException instead of InvalidProgramException.
9337
9338 2007-08-20  Mark Probst  <mark.probst@gmail.com>
9339
9340         * mini.c: CoreCLR security checks.
9341
9342         * mini.h: Removed MonoSecurityMode (moved to
9343         metadata/security-manager.h) and mono_security_mode global var
9344         (replaced by set/get functions in security-manager.h).
9345
9346         * driver.c: Added "core-clr-test" security mode for testing.  Used
9347         set-function for setting security mode.
9348
9349 2007-08-17  Mark Probst  <mark.probst@gmail.com>
9350
9351         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
9352         the new jit_info_table.
9353
9354         * driver.c: Test code for the new jit_info_table (enabled by the
9355         define MONO_JIT_INFO_TABLE_TEST).
9356
9357 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
9358
9359         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
9360         detection of call <REG> instruction sequence. Fixes build on freebsd.
9361
9362 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
9363
9364         * mini-exceptions.c: Fix a warning.
9365
9366 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
9367
9368         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
9369         stack overflow handling code on amd64 too.
9370
9371         * mini-exceptions.c (mono_setup_altstack): Make this use 
9372         mono_thread_get_stack_bounds ().
9373
9374         * mini-x86.h: Disable sigaltstack on solaris x86.
9375
9376 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
9377
9378         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
9379
9380 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
9381
9382         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
9383
9384 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
9385
9386         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
9387
9388         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
9389
9390 2007-08-03  Neale Ferguson <neale@sinenomine.net>
9391
9392         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
9393         due to alignment.
9394
9395 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
9396
9397         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
9398         to be emitted (bug #82281).
9399
9400 2007-08-01  Martin Baulig  <martin@ximian.com>
9401
9402         Merged the `debugger-dublin' branch.
9403
9404         * debug-debugger.h (MonoDebuggerInfo):
9405         Removed the `old_*' compatibility entries.
9406         Added `debugger_version' and `data_table'.
9407         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
9408         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
9409
9410         * debug-mini.c
9411         (MiniDebugMethodBreakpointInfo): Add `address_list'.
9412         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
9413         instead of a `gconstpointer'.
9414         (mono_debugger_insert_method_breakpoint): Return a
9415         `MonoDebugMethodAddressList *'.
9416
9417 2007-06-28  Martin Baulig  <martin@ximian.com>
9418
9419         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
9420
9421 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
9422
9423         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
9424         __builtin_frame_address () since it is broken on older gcc versions.
9425
9426 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
9427
9428         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
9429         on the stack overflow handling and made the managed stack overflows
9430         catchable in most cases using soft guard pages.
9431         * exceptions-x86.c: added code to restore the protection in the soft
9432         guard pages at the end of exception handling.
9433
9434 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
9435
9436         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
9437
9438 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
9439
9440         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
9441         exception handling.
9442
9443 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
9444
9445         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
9446         signal handling support until it has been ported to the new mechanism.
9447         * mini.c: fixed stack overflow detection and use the new
9448         architecture code  to handle signals on the altstack.
9449
9450 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
9451
9452         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
9453         stack overflows on the alt stack.
9454
9455 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
9456
9457         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
9458         stack overflows on the alt stack.
9459
9460 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
9461
9462         * exceptions-ppc.c: cleanup preparing for altstack support.
9463
9464 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
9465
9466         * exceptions-arm.c: cleanup preparing for altstack support.
9467
9468 2007-07-27  Mark Probst  <mark.probst@gmail.com>
9469
9470         * mini.c (print_jit_stats): Output hazard pointer stats.
9471
9472 2007-07-26  Mark Probst  <mark.probst@gmail.com>
9473
9474         * driver.c, mini.c: Replaced security mode flags with a single
9475         enum variable.
9476
9477 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
9478
9479         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
9480
9481 2007-07-25  Mark Probst  <mark.probst@gmail.com>
9482
9483         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
9484         (which doesn't do anything yet) for activating Core CLR
9485         (Silverlight) security.
9486
9487 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
9488
9489         * mini-codegen.c: work around a possible gcc bug on arm.
9490
9491 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
9492
9493         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
9494         message for platforms that don't support AOT compilation.
9495
9496 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
9497
9498         * mini.h, mini.c, driver.c: temporary smcs hack.
9499
9500 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
9501
9502         * mini-arm.h, mini-arm.c: arm EABI fixes.
9503
9504 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
9505
9506         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
9507         case.
9508
9509         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
9510         trampolines taking a method argument.
9511
9512         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
9513
9514         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
9515         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
9516
9517         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
9518         JIT compilation throws an exception. Fixes #82050.
9519
9520 2007-07-19  Mark Probst  <mark.probst@gmail.com>
9521
9522         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
9523         with the MONO_EXCEPTION_ defines.
9524
9525 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
9526
9527         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
9528         #82117.
9529         
9530         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
9531         the cause of an assertion.
9532
9533 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
9534
9535         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
9536         removed.
9537
9538 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
9539
9540         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
9541         assert. Should fix #82103.
9542
9543 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
9544
9545         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
9546         here too. Fixes #82095.
9547
9548         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
9549         addresses.
9550
9551         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
9552
9553         * mini-amd64.h: Enable IMT for amd64.
9554         
9555         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
9556
9557 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
9558
9559         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
9560
9561 2007-07-12  Mark Probst  <mark.probst@gmail.com>
9562
9563         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
9564         as soon as check_linkdemand sets an exception_type.
9565
9566 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
9567
9568         * mini-x86.c: fixed offsets for IMT call sequence.
9569         * mini-x86.h: enable IMT again.
9570
9571 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
9572
9573         * trace.c (mono_trace_enter_method): Decode MonoType too.
9574
9575         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
9576
9577         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
9578
9579         * mini-amd64.c: Add preliminary IMT implementation.
9580         
9581 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
9582
9583         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
9584         understand the new IMT-base interface invocation (thanks to
9585         Daniel Nauck for the report and the remote debugging session).
9586
9587 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
9588
9589         * mini-x86.c: size and speed optimizations for the IMT bsearch.
9590
9591 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
9592
9593         * Makefile.am (aotcheck): Make this actually use the AOTed code.
9594
9595 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
9596
9597         * mini-trampolines.c: implement AOT IMT support.
9598         * mini-x86.h: enable IMT support for wider testing.
9599
9600 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
9601
9602         * inssel.brg (emit_imt_argument): Add aot support here.
9603
9604         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
9605
9606 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
9607
9608         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
9609         of the IMT implementation, partially from massi, with my
9610         implementation of the bsearch sequence. Disabled by default until
9611         the AOT code is implemented.
9612
9613 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
9614
9615         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
9616
9617         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
9618
9619 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
9620
9621         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
9622         arch-independent IMT JIT code from Massimiliano
9623         Mantione (massi@ximian.com) with small cleanups from me.
9624
9625 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
9626
9627         * Makefile.am: fix svn invocation to get the svn revision to be
9628         independent of the local language (build fix).
9629
9630 2007-07-09  Mark Probst  <mark.probst@gmail.com>
9631
9632         * mini.c (inline_method): Reset cfg->exception_type if the
9633         inlining is aborted.  Fixes: 82049.
9634
9635 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
9636
9637         * mini.c: remove assert from exception handling code when exception_ptr
9638         is not set.
9639
9640 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
9641
9642         * mini.c (mono_codegen): Add an assert.
9643
9644         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
9645         enter and leave code.
9646         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
9647
9648 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
9649
9650         * mini-ppc.c: fixed memory corruption for localloc(0)
9651         (bug #81852).
9652
9653 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
9654         
9655         * mini.c: Fix warnings.
9656
9657 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
9658
9659         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
9660         to emit better double->int conversions.
9661
9662 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
9663
9664         * mini.c: the provided Min/Max optimizations are valid for unisgned
9665         ints.
9666
9667 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
9668
9669         * 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
9670
9671 2007-06-28  Miguel de Icaza  <miguel@novell.com>
9672
9673         * mini.c (mono_running_on_valgrind): Add support for reporting the
9674         method and  its boundaries to valgrind.
9675
9676 2007-06-28  Martin Baulig  <martin@ximian.com>
9677
9678         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
9679
9680 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
9681
9682         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
9683
9684         * generic.2.cs: Add new test case.
9685
9686 2007-06-25  Martin Baulig  <martin@ximian.com>
9687
9688         Merged the `debugger-dublin' branch.
9689
9690         * debug-mini.c
9691         (mono_debugger_insert_method_breakpoint): New public method.
9692         (mono_debugger_remove_method_breakpoint): Likewise.
9693         (mono_debugger_check_breakpoints): New static method.
9694         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
9695
9696         * debug-debugger.h (MonoDebuggerInfo):
9697         Renamed (to keep backward compatibility in the vtable):
9698         `insert_breakpoint' -> `old_insert_breakpoint'.
9699         `remove_breakpoint' -> `old_remove_breakpoint'.
9700         `create_string' -> `old_create_string'.
9701         `lookup_class' -> `old_lookup_class'.
9702         `lookup_type' -> removed; changed into a dummy field.
9703         `lookup_assembly' -> `old_lookup_assembly'.
9704         Added (same functionality, but different signature):
9705         `create_string', `lookup_class', `lookup_assembly'
9706         Added new:
9707         `get_method_addr_or_bpt', `remove_method_breakpoint',
9708         `runtime_class_init'.
9709
9710         * debug-debugger.c: Merged the `debugger-dublin' branch.
9711
9712 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
9713
9714         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
9715         well.
9716         (peephole_pass): Likewise.
9717
9718 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
9719
9720         * driver.c: hopefully make setaffinity work also for ancient
9721         versions of linux.
9722
9723 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
9724
9725         * driver.c : win32 build fix.
9726
9727 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
9728
9729         * driver.c: check for the MONO_NO_SMP env var and bind to a single
9730         processor if it is set.
9731
9732 2007-06-21  Martin Baulig  <martin@ximian.com>
9733
9734         * debug-mini.h: New file.
9735
9736         * debug-mini.c
9737         (mono_debugger_insert_breakpoint_full): Moved here from
9738         ../metadata/mono-debug-debugger.c.
9739         (mono_debugger_remove_breakpoint): Likewise.
9740         (mono_debugger_breakpoint_callback): Likewise.
9741
9742 2007-06-15  Raja R Harinath  <rharinath@novell.com>
9743
9744         * jit-icalls.c (mono_helper_compile_generic_method): Update to
9745         changes in MonoGenericClass.
9746
9747 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
9748
9749         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
9750
9751 2007-06-14  Raja R Harinath  <rharinath@novell.com>
9752
9753         * jit-icalls.c (mono_helper_compile_generic_method): Update to
9754         removal of MonoGenericMethod.
9755
9756 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
9757
9758         * mini-exceptions.c: hooks for the exception events profiling API.
9759
9760 2007-06-14  Randolph Chung  <tausq@debian.org>
9761
9762         * Makefile.ma: Add hppa target.
9763         * mini-arch.h: Include mini-hppa.h
9764         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
9765         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
9766         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
9767
9768 2007-06-14  Randolph Chung  <tausq@debian.org>
9769
9770         * inssel.brg: Add rules for "chained" compare-branch operations so that
9771         a single compare op can affect multiple branches.  Adjust cost for
9772         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
9773         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
9774         cost for some rules so that they can more easily be overridden by
9775         per-arch rules (with fixes from lupus).
9776         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
9777
9778 2007-06-13  Randolph Chung  <tausq@debian.org>
9779
9780         * mini-ops.h: Reorder branch ops so that they match the order of the
9781         corresponding CEE_* ops.  The code expects them this way.
9782         Add new ops for HPPA target.
9783         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
9784
9785 2007-06-13  Randolph Chung  <tausq@debian.org>
9786
9787         * mini-exceptions.c: Handle cases where the stack grows towards
9788         larger addresses.
9789         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
9790
9791 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
9792
9793         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
9794         counter.
9795         * driver.c: explain where a non-matching corlib is found.
9796
9797 2007-06-13  Mark Probst  <mark.probst@gmail.com>
9798
9799         * mini.c (print_jit_stats): Output dynamic code allocation stats.
9800
9801 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
9802
9803         * mini-exceptions.c: Generate a method profile leave event during
9804         an exception to ensure that the profiler gets notified.
9805
9806 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
9807
9808         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
9809         branch.
9810
9811         * cpu-amd64.md: Add long_and/or/xor opcodes.
9812
9813 2007-06-06  Wade Berrier  <wberrier@novell.com>
9814
9815         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
9816         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
9817         length of instruction shr_imm (expected 8, got 10)
9818
9819 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
9820
9821         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
9822
9823 2007-06-06  Mark Probst  <mark.probst@gmail.com>
9824
9825         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
9826         MonoInternalHashTable again (fixed bug in the internal hash table
9827         code).
9828
9829 2007-06-06  Mark Probst  <mark.probst@gmail.com>
9830
9831         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
9832         Have to figure out what makes it crash the SWF regression.
9833
9834 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
9835
9836         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
9837
9838 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
9839
9840         * mini.c: optimize out the type check when storing null in a
9841         reference array.
9842
9843 2007-06-04  Mark Probst  <mark.probst@gmail.com>
9844
9845         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
9846         MonoInternalHashTable.
9847
9848 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
9849
9850         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
9851         signed integer methods.
9852
9853 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
9854
9855         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
9856         permanently since the current approach doesn't work.
9857
9858 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
9859
9860         * inssel.brg (stmt): Only call delegate->invoke_impl if 
9861         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
9862
9863 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
9864
9865         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
9866         the sreg2==rdx case.
9867         
9868         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
9869         account if it contains a rex prefix.
9870         (peephole_pass): Handle OP_FMOVE as well.
9871
9872 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
9873
9874         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
9875         as it causes regressions.
9876
9877 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
9878
9879         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
9880         static case as well.
9881
9882         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
9883
9884         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
9885         (mono_arch_get_this_arg_from_call): Ditto.
9886
9887         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
9888
9889         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
9890         invoke_impl field.
9891
9892         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
9893         (mono_arch_get_this_arg_from_call): Ditto.
9894
9895         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
9896         
9897         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
9898         try to create optimized invoke code and use that for further invocations. 
9899         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
9900
9901         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
9902
9903 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
9904
9905         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
9906         sealed classes or methods.
9907         *devirtualization.cs: tests for the new optimization
9908
9909 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
9910
9911         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
9912         by the update_volatile () function.
9913
9914 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
9915
9916         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
9917         require it.
9918
9919         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
9920
9921 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
9922
9923         * mini.c: Add configure checks for header files.
9924         * mini-x86.c: Add configure checks for header files.
9925         * trace.c: Add configure checks for header files.
9926         * aot-runtime.c: Add configure checks for header files.
9927         * aot-compiler.c: Add configure checks for header files.
9928         * driver.c: Add configure checks for header files.
9929         * mini-codegen.c: Add configure checks for header files.
9930         
9931         Code is contributed under MIT/X11 license.
9932
9933 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
9934
9935         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
9936         icompare_imm -128 + op_iclt. Fixes #81703.
9937
9938 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
9939
9940         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
9941
9942 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
9943
9944         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
9945         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
9946         so that all isinst checks now use "interface_bitmap".
9947
9948 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
9949
9950         * cpu-amd64.md (jmp): Fix a warning.
9951
9952         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
9953
9954         * basic.cs: Add new regression test.
9955
9956         * basic.cs: Remove test which is now in basic-long.cs.
9957
9958         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
9959
9960         * basic-long.cs: Add new test.
9961         
9962 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
9963
9964         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
9965
9966 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
9967
9968         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
9969
9970         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
9971         places.
9972         
9973         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
9974         throwing code a bit.
9975
9976         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
9977         the exception throwing code a bit.
9978
9979         * mini-x86.c (get_call_info): Allocate result from a mempool.
9980
9981 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
9982
9983         * aot-compiler.c (find_typespec_for_class): Fix the assert.
9984
9985         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
9986
9987         * mini.h (MonoCompile): Add 'token_info_hash' field.
9988
9989         * mini.c: Save token->method associations during compilation so the AOT 
9990         compiler can use it.
9991         
9992         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
9993         which reference generic classes and methods.
9994
9995 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
9996
9997         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
9998
9999         * aot-compiler.c (compile_method): Fix a typo in a comment.
10000
10001         * aot-runtime.c (decode_cached_class_info): Skip generic types.
10002
10003         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
10004         everything generic.
10005
10006         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
10007
10008 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
10009
10010         * mini.h (MonoCompile): Add 'args' field.
10011
10012         * mini.c (mono_compile_create_vars): Store variables representing the arguments
10013         into cfg->args.
10014
10015         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
10016
10017 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
10018
10019         * mini.c (mono_compile_get_interface_var): Remove this unused function.
10020
10021         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
10022
10023         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
10024         opcodes for some opcodes.
10025
10026         * mini.h *.brg *.c: Use the new opcodes.
10027
10028 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
10029
10030         * mini.h: Bumped aot revision.
10031
10032         * inssel.brg: modified code generation of type checks for interfaces
10033         to use the new "MonoClass.interface_bitmap" instead of the old
10034         "MonoClass.interface_offsets".
10035
10036 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
10037
10038         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
10039
10040 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
10041
10042         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
10043         64 bit platforms.
10044
10045 2007-04-27  Neale Ferguson <neale@sinenomine.net>
10046
10047         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
10048
10049 2007-04-27  Wade Berrier  <wberrier@novell.com>
10050
10051         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
10052         mini.h) to fix build.
10053
10054 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
10055
10056         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
10057         
10058         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
10059         causes the corlib unit tests to fail.
10060
10061 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
10062
10063         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
10064
10065         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
10066
10067         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
10068         opcodes to the comparison relations.
10069
10070         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
10071         opcodes to their types.
10072         
10073         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
10074
10075         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
10076         it in cfg->arch.cinfo.
10077
10078         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
10079
10080         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
10081         cfg->cil_offset_to_bb.
10082
10083 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
10084
10085         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
10086         created becase of initlocals.
10087
10088 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
10089
10090         * mini-alpha.c cpu-alpha.md: More alpha port work from 
10091         Sergey Tikhonov <tsv@solvo.ru>.
10092
10093 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
10094
10095         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
10096
10097 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
10098
10099         * cpu-s390.md (break): Correct the length of break instruction.
10100
10101 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
10102
10103         * mini.c: fix a couple of soft-float issues and comments.
10104
10105 2007-04-15  Miguel de Icaza  <miguel@novell.com>
10106
10107         * trace.c (is_filenamechar): - is also a filename char.
10108
10109 2007-04-15  Neale Ferguson <neale@sinenomine.net>
10110
10111         * mini-s390.c: Correct checking for enum type in return value processing.
10112
10113 2007-04-14  Raja R Harinath  <rharinath@novell.com>
10114
10115         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
10116         (version.h): Makefile is in the build directory.
10117
10118 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
10119
10120         * mini-amd64.h: fix for assertion failure on Solaris/amd64
10121
10122 2007-04-11  Martin Baulig  <martin@ximian.com>
10123
10124         * mini.c (can_access_member): Fix handling of generic classes;
10125         fixes #81259.
10126
10127 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
10128
10129         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
10130
10131 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
10132
10133         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
10134
10135 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
10136
10137         * mini-codegen.c: make sure the right spill amount is
10138         used for fp or integer registers (fixes the float_sub_spill() on ppc).
10139
10140 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
10141
10142         * mini-ppc.c: fixes for the fp_branch_nan test.
10143
10144 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
10145
10146         * basic.cs: Comment out new test which still fails on ia64.
10147
10148 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
10149
10150         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
10151
10152 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
10153
10154         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
10155
10156 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
10157
10158         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
10159         on 64 bit machines. Fixes part of #80738.
10160
10161         * basic.cs: Add regression test.
10162
10163 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
10164
10165         * inssel.brg basic.cs: Revert previous change to fix build.
10166
10167         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
10168         platforms.
10169         
10170         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
10171
10172         * basic.cs: Add new regression test.
10173
10174 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
10175
10176         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
10177         many arguments.
10178
10179 2007-03-16  Neale Ferguson <neale@sinenomine.net>
10180
10181         * cpu-s390x.md: Correct length of break instruction.
10182
10183 2007-03-16  Neale Ferguson <neale@sinenomine.net>
10184
10185         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
10186         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
10187
10188 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
10189
10190         * *.c: Begin WIN64 port.
10191         * mini.c:  Use correct register in profiler.
10192         * mini-amd64.c: No inline assembly on Win64.
10193         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
10194         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
10195         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
10196         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
10197         mono_arch_ip_from_context for Win64.
10198         
10199         Contributed under MIT/X11 license.
10200
10201 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
10202
10203         * exceptions-amd64.c (seh_handler): Ditto.
10204
10205         * exceptions-x86.c (seh_handler): Fix a memory leak.
10206
10207 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
10208
10209         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
10210         mini-s390x.c: fixed peephole optimizations to deal
10211         correctly with 1 and 2 byte reload avoidance.
10212
10213 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
10214
10215         * cpu-s390.md, cpu-s390x.md: update localloc length.
10216
10217 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
10218
10219         * cpu-g4.md: added missing descriptions.
10220
10221 2007-03-14  Miguel de Icaza  <miguel@novell.com>
10222
10223         *  Makefile.am: Add support so the tail tests are not executed on
10224         PowerPC as that is a known limitation of the PowerPC port.
10225
10226 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
10227
10228         * runmdesc.bat:  Move to msvc directory.
10229         
10230 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
10231
10232         * runmdesc.bat:  Run executable that was produced by the current
10233         target and sent via an argument.
10234         
10235 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
10236
10237         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
10238         #81102.
10239
10240         * generics.2.cs: Add regression test.
10241
10242 2007-03-09  Wade berrier  <wberrier@novell.com>
10243
10244         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
10245
10246 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
10247
10248         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
10249         AOT code depends on this.
10250
10251 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
10252
10253         * mini.c: more precise tracking of types in the eval stack
10254         (part of fix for bug #81044).
10255
10256 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
10257
10258         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
10259
10260         * aot-compiler.c (encode_patch): Remove an obsolete comment.
10261
10262 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
10263
10264         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
10265
10266         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
10267
10268 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
10269
10270         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
10271         a pointer on 64 bit systems. Fixes #80190.
10272
10273         * iltests.il: Add new regression test.
10274
10275 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
10276
10277         * mini.c: inline a constant for Environment.IsRunningOnWindows.
10278
10279 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
10280
10281         * trace.c: Remove an erroneous alignemnt check when tracing.
10282           Fixes --trace on OSX86.
10283
10284 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
10285
10286         * mini-$(arch).h: initialize SP in context for all the archs.
10287
10288 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
10289
10290         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
10291         regressions in the thread tests.
10292
10293 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
10294
10295         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
10296         - fixed implementation of LOCALLOC opcode
10297         - implemented non-un compare for floats
10298         - code cleanup
10299         - implementation of FDIV and CKFINITE opcodes
10300         - fixes for latest mono updates
10301         - additional arch opcodes
10302
10303 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
10304
10305         * Makefile.am: simplify and merge rules for cross-compilation.
10306
10307 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
10308
10309         * local-propagation.c: Actually *apply* the fix for bug 80591...
10310
10311 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
10312
10313         * mini-exceptions.c: backuot part of the last change
10314         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
10315
10316 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
10317         * inssel.brg: Fix bug 59286.
10318
10319
10320 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
10321
10322         * mini-exceptions.c: patch from Zoltan to correctly check for
10323         stack boundaries (using the stack register, not the frame register),
10324         fixes bugs #80724, #79717.
10325
10326 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
10327
10328         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
10329         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
10330
10331         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
10332         presence of frame pointer elimination.
10333
10334 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
10335         
10336         * mini-x86.h: NetBSD UCONTEX_REG defines.
10337
10338 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
10339
10340         * inssel-amd64.brg: Fix amd64 build.
10341
10342 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
10343
10344         * mini.h: remove extern to workaround what looks likes gcc bug 26905
10345         on amd64.
10346
10347 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
10348
10349         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
10350         ends.
10351
10352         * mini-<ARCH>.c: Use mono_is_regsize_var ().
10353
10354 2007-01-30 Mark Mason <mason@broadcom.com>
10355
10356            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
10357            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
10358            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
10359            beginning support for CEE_JMP [not quite working yet]
10360            * tramp-mips.c: LMF handling now works
10361         
10362 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
10363
10364         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
10365
10366         * mini.h (NULLIFY_INS): New macro.
10367
10368 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
10369
10370         * mini.c: statistical profiler fix for windows, patch
10371         from Tor Lillqvist (tml@novell.com).
10372
10373 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
10374         * local-propagation.c: Fix bug 80591.
10375
10376 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
10377
10378         * Makefile.am: put back the --export-dynamic option as with
10379         the previous gmodule flags (thanks to Robert Jordan).
10380
10381 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
10382
10383         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
10384
10385         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
10386         simplify and speed up the local register allocator. Also rename some fields
10387         like iassign->vassign.
10388         
10389         * regalloc.c: Remove some functions which are no longer used since their
10390         inlined version is in mini-codegen.c.
10391         
10392         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
10393
10394         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
10395
10396 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
10397
10398         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
10399         narrowing. Fixes #80622.
10400
10401         * iltests.il: Add new regresssion test. 
10402
10403 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
10404
10405         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
10406         debug-debugger.c, debug-debugger.h: warning fixes.
10407         * driver.c: updated copyright year and made it fit in one line.
10408
10409 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
10410
10411         * aot-runtime.c: updated to use mono-dl instead of gmodule.
10412
10413 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
10414
10415         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
10416
10417         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
10418
10419         * iltests.il: Add new test for bug #80507.
10420
10421 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
10422
10423         * mini-arm.h: use soft-float also on vfp for now.
10424
10425 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
10426
10427         * mini.c: fix some more soft-float issues.
10428
10429 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
10430
10431         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
10432
10433 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
10434         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
10435         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
10436         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
10437
10438 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
10439
10440         * mini-arm.c: typo fix.
10441
10442 2007-01-23  Neale Ferguson <neale@sinenomine.net>
10443
10444         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
10445
10446 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
10447
10448         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
10449         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
10450
10451         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
10452
10453         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
10454
10455         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
10456         
10457         * inssel.brg: Fix a warning.
10458
10459         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
10460
10461         * abcremoval.c ssa.c ssapre.c: Update after this change.
10462         
10463         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
10464
10465         * dominators.c (df_set): Use mono_bitset_union_fast.    
10466
10467 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
10468
10469         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
10470         mini-codegen.c: reduce relocations and memory usage for the cpu
10471         description.
10472
10473 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
10474
10475         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
10476
10477         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
10478         to reduce their size.
10479
10480 2007-01-19 Mark Mason <mason@broadcom.com>
10481
10482         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
10483         * mini-mips.c: more configuration macros, support long conditional branches, additional
10484         asserts, fix epilog instrumentation.
10485         * mini-mips.h: use standard stack walk
10486         * cpu-mips.md: increase size of div, rem and conditional branches
10487         
10488 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
10489
10490         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
10491         to cpu spec data.
10492
10493 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
10494
10495         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
10496         (compile_method): Ditto.
10497
10498         * aot-runtime.c (decode_klass_info): Ditto.
10499
10500         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
10501         needed by the code generated by inssel.brg. Also fix a warning.
10502
10503 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
10504
10505         * mini.c: deal with enums that become genericinsts by
10506         being nested in a generic class (bug #79956).
10507
10508 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
10509
10510         * mini.c: match the generic definition to check for
10511         private access with generic types (bug #78431).
10512
10513 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
10514
10515         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
10516         to make life easier for people cross-compiling that insist on not
10517         using scratchbox.
10518
10519 2007-01-17 Mark Mason <mason@broadcom.com>
10520
10521         * inssel-long.brg: patch to deal with mips missing flags
10522         * inssel-long32-mips.brg: implement overflow checks
10523         * insset-mips.brg: implement overflow checks
10524         * mini-mips.h: implement conditional exception handling
10525         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
10526           Remove unused code, minor cleanups.
10527         * exceptions-mips.c: minor cleanups
10528         * mini-ops.h: add mips conditional exception ops
10529         * cpu-mips.md: add mips conditional exception ops
10530
10531         
10532 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
10533
10534         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
10535         to deal with mips missing of flags.
10536
10537 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
10538
10539         * exceptions-ppc.c: execute fault handlers.
10540
10541 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
10542
10543         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
10544
10545 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
10546
10547         * mini.c: handle also floating point values in initialize_array.
10548
10549 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
10550
10551         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
10552         array initialization and make it conditional on the intrins option.
10553
10554 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
10555
10556         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
10557         relocations and put the patch info names close to the enum definition.
10558
10559 2007-01-15 Mark Mason <mason@broadcom.com>
10560
10561         * basic.cs, exceptions.cs: break up large tests to increase debugability.
10562
10563 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
10564
10565         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
10566
10567 2007-01-12  Raja R Harinath  <rharinath@novell.com>
10568
10569         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
10570
10571 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
10572
10573         * Makefile.am: distribute the mips sources.
10574
10575 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
10576
10577         * mini-codegen.h: handle bug #80489 here, by excluding ecx
10578         directly.
10579
10580 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
10581
10582         * cpu-x86.md: back out for now as this triggers other regressions.
10583
10584 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
10585
10586         * cpu-x86.md: force src1 and dest regpair for long shift instructions
10587         to eax:edx, so ecx can't get allocated to them (bug #80489).
10588
10589 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
10590
10591         * mini.c, mini-exceptions.c: enabled running fault handlers
10592         (bug #80469).
10593
10594 2007-01-03  Miguel de Icaza  <miguel@novell.com>
10595
10596         * driver.c: If nothing fail, do not use the string "failed",
10597         because it makes it very annoying to view test result logs on the
10598         web. 
10599
10600 2006-12-30  Miguel de Icaza  <miguel@novell.com>
10601
10602         * debug-debugger.c (mono_debugger_main): Rename "main" to
10603         "main_method" to prevent a warning.
10604
10605         Remove a warning for unused field.
10606
10607 2006-12-28  Martin Baulig  <martin@ximian.com>
10608
10609         * debug-debugger.c
10610         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
10611
10612 2006-12-22  Martin Baulig  <martin@ximian.com>
10613
10614         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
10615         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
10616         seperate `.mdb_debug_info' section, so we can access it from the
10617         debugger even if the binary is stripped.
10618
10619         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
10620         from the `.mdb_debug_info' here to prevent the linker from
10621         removing that section.
10622
10623         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
10624         mdb-debug-info64.s.
10625
10626 2006-12-19  Robert Jordan  <robertj@gmx.net>
10627
10628         * mini-x86: enable the code to return small structures in
10629         registers for FreeBSD as well. Fixes bug #80278.
10630         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
10631
10632 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
10633
10634         * mini-x86.c: align the stack when calling the profiler
10635         function instrumenting the prolog (on OSX).
10636
10637 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
10638
10639         * mini.c: emit a break opcode where Debugger.Break () is called.
10640
10641 2006-12-13  Miguel de Icaza  <miguel@novell.com>
10642
10643         * mini.c (mono_method_to_ir): Provide useful information on this
10644         assert, to prevent others from debugging like I did.
10645
10646 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
10647
10648         * mini.c: enable code which was incorrectly commented
10649         (bug #80235).
10650
10651 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
10652
10653         * mini-x86.c: enable on OSX, too, the code to return small
10654         structures in registers.
10655
10656 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
10657
10658         * mini-x86.c: remove the use of the dynamic code manager here, too.
10659
10660 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
10661
10662         * mini.h, debug-debugger.c, tramp-*.c: fixed 
10663         mono_debugger_create_notification_function() to use
10664         mono_global_codeman_reserve () instead of a dynamic code manager.
10665
10666 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
10667
10668         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
10669         ves_array_element_address() jit icall and use a generated
10670         managed method instead (which is about 4 times faster for a rank 3
10671         array access).
10672
10673 2006-11-29  Mark Mason  <mason@broadcom.com>
10674
10675         * basic-calls.cs: additional tests for passing
10676         structures as function arguments.
10677
10678 2006-11-29  Mark Mason  <mason@broadcom.com>
10679
10680         * mini-mips.h: disable custom exception handling
10681         * mini-mips.c: throw/rethrow should use jalr to call
10682         exception stubs.  Fixed bug with passing structures
10683         by value. More support for tracing floating point
10684         functions.
10685
10686 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
10687
10688         * mini.c: fixed typo in the soft-float ldind.r4 handling
10689         (bug #80086).
10690
10691 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
10692
10693         * mini.c, mini.h, driver.c: added --runtime command line
10694         option to select a different runtime than the autodetected one.
10695         * jit.h: added API for embedders to initialize with a specific
10696         runtime version.
10697
10698 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
10699
10700         * mini.c: handle also boxing of r4 values (bug #80024).
10701
10702 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
10703
10704         * mini-ppc.c: force indirect calls until we reserve
10705         enough address space for all the generated code.
10706
10707 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
10708
10709         * exceptions-arm.c: workaround bugs in the libc definition
10710         of struct ucontext.
10711
10712 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
10713
10714         * inssel.brg: fixes from me and Mark Mason.
10715
10716 2006-11-23  Dick Porter  <dick@ximian.com>
10717
10718         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
10719         semaphore display now we've fixed the initial value
10720
10721 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
10722
10723         * inssel.brg: partially revert the last change to fix the build.
10724
10725 2006-11-21  Mark Mason  <mason@broadcom.com>
10726
10727         * inssel.brg: Add and use compare-and-branch macros to support
10728         architectures that do not have condition code registers (ie. MIPS).
10729         * *-mips.{c,brg,md}: Fix copyright statements
10730
10731 2006-11-20  Mark Mason  <mason@broadcom.com>
10732
10733         * Makefile.am: remove mini-codegen.c from list of MIPS sources
10734         * mini.c: Allow GET_CONTEXT to be specified by the arch port
10735         * mini.h: Added declaration for mono_print_ins()
10736         * mini-codegen.c: added ins_spec initializer for MIPS
10737         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
10738         vreg to be virtual and hreg to be non-virtual.
10739         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
10740         is not yet working/implemented correctly.
10741         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
10742         non-static, fixup calls to print_ins() from other parts in the file.
10743
10744 2006-11-20  Mark Mason  <mason@broadcom.com>
10745
10746         * basic-calls.cs: added tests for passing structures as arguments
10747         to calls.
10748
10749 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
10750
10751         * inssel-long32.brg: optimize signed division by power of two.
10752
10753 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
10754
10755         * mini-arm.c: added support for interworking with thumb code
10756         (mono must be still be built using the ARM instruction encoding).
10757
10758 2006-11-19  Miguel de Icaza  <miguel@novell.com>
10759
10760         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
10761         verifier has different rules for it.   Fixes a few verifier issues
10762         in the test suite.
10763
10764         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
10765         at the end, so people know what happened.
10766
10767 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
10768
10769         * brach-opts.c: in optimize_exception_target() make sure we
10770         are in a catch clause (fixes bug #79871).
10771
10772 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
10773
10774         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
10775         more soft-float support fixes.
10776
10777 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
10778
10779         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
10780         that are passed half on the stack and half in registers.
10781
10782 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
10783
10784         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
10785         more mips integration work from Mark E Mason 
10786         <mark.e.mason@broadcom.com>.
10787
10788 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
10789
10790         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
10791         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
10792         tramp-mips.c: added sources for the mips port, not
10793         integrated in the build yet. Contributed by
10794         Mark E Mason <mark.e.mason@broadcom.com>.
10795
10796 2006-11-14  Neale Ferguson <neale@sinenomine.net>
10797
10798         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
10799
10800 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
10801
10802         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
10803         put the soft-float rules in its own file since it seems to
10804         break s390 compilation.
10805
10806 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
10807
10808         * mini-arm.c: fixed wrnings.
10809
10810 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
10811
10812         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
10813         inssel-arm.brg: ARM support for soft-float.
10814
10815 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
10816
10817         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
10818         loads and stores of 32 bit fp values.
10819
10820 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
10821
10822         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
10823
10824         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
10825         works. Fixes #79852 and #79463.
10826
10827 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
10828
10829         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
10830         more soft-float support WIP and fixes.
10831
10832 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
10833
10834         * mini-arm.c: some VFP updates.
10835
10836 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
10837
10838         * mini-exceptions.c: 0 is a valid local var offset in some
10839         architectures, don't assert (bug #78508).
10840
10841 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
10842
10843         * exceptions-arm.c: fixed off by one error in stack walk code.
10844
10845 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
10846
10847         * mini.h, mini.c: more precise tracking of type load exceptions.
10848
10849 2006-11-03  Robert Jordan  <robertj@gmx.net>
10850
10851         * Makefile.am: [WIN32] Add monow.exe target.
10852         * driver.c: [WIN32] Don't detach the console when debugging.
10853         Fixes bug #79797.
10854         
10855 2006-10-30  Miguel de Icaza  <miguel@novell.com>
10856
10857         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
10858
10859 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
10860
10861         * aot-compiler.c (emit_method_info): Add a case missed earlier.
10862
10863         * driver.c (mini_regression): Fix --regression with AOT.
10864
10865         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
10866
10867 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
10868
10869         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
10870
10871         * mini-sparc.h: Don't use sigaction on sparc/linux.
10872
10873         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
10874
10875         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
10876
10877         * mini-exceptions.c: Add proper include files for getpid ().
10878
10879 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
10880
10881         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
10882         address instead of a MonoJitInfo* to avoid decoding the exception info for the
10883         method.
10884
10885         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
10886         name cache to reduce its size.
10887
10888         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
10889
10890 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
10891
10892         * mini-x86.c: Save/restore the current LMF structure more efficiently using
10893         the mono_lmf TLS variable.
10894
10895         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
10896         trampoline lmf frames.  
10897
10898         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
10899
10900 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
10901
10902         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
10903         the mono_lmf TLS variable.
10904
10905         * mini-exceptions.c: Access the LMF structure through accessors.
10906
10907         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
10908         variable instead of in jit_tls->lmf.
10909
10910         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
10911         
10912         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
10913         trampoline lmf frames.
10914
10915         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
10916
10917 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
10918
10919        * mini.c trace.c mini-x86.c: Revert these too.
10920         
10921        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
10922        signature change.
10923
10924 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
10925
10926         * genmdesc.c: removed now dead code.
10927
10928 2006-10-09  Robert Jordan <robertj@gmx.net>
10929
10930         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
10931
10932 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
10933
10934         * mini.h: do not leave gaps in the opcode values.
10935
10936 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
10937
10938         * jit-icalls.h: flag functions as internal here, too.
10939
10940 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
10941
10942         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
10943         functions with the internal attribute.
10944
10945 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
10946
10947         * aot-compiler.c: fclose the file descriptor in the profile read loop.
10948
10949 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
10950
10951         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
10952         for soft-float.
10953
10954 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
10955
10956         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
10957         tail calls as on other platforms.
10958
10959         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
10960
10961         * iltests.il: Add a few tailcall tests.
10962
10963 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
10964
10965         * driver.c: fix loop for old compilers (bug #79521).
10966
10967 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
10968
10969         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
10970
10971         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
10972
10973         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
10974         metadata without any code.
10975
10976         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
10977         more precise debugging information using gdb.
10978
10979 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
10980
10981         * inssel-ia64.brg: Make the helper methods static.
10982
10983 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
10984
10985         * inssel-x86.brg: make the helper methods static.
10986
10987 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
10988
10989         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
10990
10991 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
10992
10993         * mini.c: updates for monoburg changes.
10994         * inssel.brg: make a few helper functions static as they should.
10995
10996 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
10997
10998         * Makefile.am: Move mini-codegen.c to common_sources.
10999
11000 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
11001
11002         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
11003         instructions.
11004         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
11005         mini-ppc.h: port to use the common local register allocator.
11006
11007 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
11008
11009         * mini.h: Remove the comment too then.
11010
11011 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
11012
11013         * mini.h: put back backend.data which is to be used shortly and
11014         doesn't increase the size of MonoInst. If any 64 bit arch aligned
11015         pointers on 4 byte boundaries it'd have much bigger issues running
11016         and you can ifdef it out anyway.
11017
11018 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
11019
11020         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
11021         MonoInst size by 4 bytes on 64 bit machines.
11022
11023 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
11024
11025         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
11026         replacement with more meaningful field names. Arch maintainers, please
11027         check the assigned names are good enough for your arch.
11028
11029 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
11030
11031         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
11032         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
11033
11034 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
11035
11036         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
11037         relocations and memory requirements, put the optimization flags
11038         definitions in their own file.
11039
11040 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
11041
11042         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
11043
11044         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
11045
11046 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
11047
11048         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
11049
11050 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
11051
11052         * inssel.brg: use the correct function to get the size of an item
11053         in an array, given an element class.
11054         * aot-compiler.c: do not access class->class_size directly.
11055
11056 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
11057
11058         * mini.h, debug-mini.c: added a debugging function to print
11059         info about local variables and arguments in a jitted method.
11060
11061 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
11062
11063         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
11064
11065         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
11066
11067 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
11068
11069         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
11070         inner and outer loops when passing vtypes.
11071
11072 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
11073
11074         * mini-ppc.c: take into account the cpu errata for cache flushing
11075         which caused some random errors (bug #79381).
11076
11077 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
11078
11079         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
11080         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
11081
11082 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
11083
11084         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
11085         loaded.
11086
11087         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
11088         freebsd ports tree.
11089
11090         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
11091         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
11092
11093         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
11094         displacement.
11095
11096 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
11097
11098         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
11099
11100 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
11101
11102         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
11103         macro does not have to be changed during debugging.
11104
11105         * 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>.
11106
11107         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
11108
11109         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
11110         
11111         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
11112         MONO_ARCH_NO_EMULATE_MUL is defined.
11113
11114         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
11115
11116         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
11117
11118         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
11119
11120         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
11121         
11122 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
11123
11124         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
11125         stuff to mini-exceptions.c where it is used.
11126
11127         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
11128         setup code, the real one is in mini-exceptions.c.
11129
11130         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
11131         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
11132         some changes from the freebsd ports tree.
11133
11134         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
11135         constants.
11136         
11137         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
11138
11139 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
11140
11141         * mini.c: on Linux, check for /proc to be mounted
11142         (bug# 79351, novell bug#201204).
11143
11144 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
11145
11146         * mini.c: handle cases where pthread_attr_getstack() behaves
11147         incorrectly (bug #78096).
11148
11149 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
11150
11151         * mini-arm.c: support larger stack frames (bug #79272).
11152
11153 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
11154
11155         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
11156
11157         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
11158         tokens.
11159
11160         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
11161         mono_class_from_name () to find a class from its name.
11162
11163         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
11164
11165 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
11166
11167         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
11168
11169 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
11170
11171         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
11172
11173 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
11174
11175         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
11176         callinfo->trampoline.
11177
11178         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
11179         fixes #79271.
11180         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
11181         future.
11182
11183 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
11184
11185         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
11186
11187 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
11188
11189         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
11190         stats.method_trampolines, it is already done by the generic trampoline code.
11191
11192         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
11193         
11194 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
11195
11196         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
11197
11198         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
11199
11200         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
11201
11202         * mini.c (print_jit_stats): Print mscorlib mempool size too.
11203         
11204         * mini.c (print_jit_stats): Print new stats.
11205
11206         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
11207
11208 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
11209
11210         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
11211         Address on two dimensional arrays. Fixes #78729.
11212
11213         * mini.h (MonoCompile): Add a 'skip_visibility' field.
11214
11215         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
11216         a method.
11217
11218         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
11219
11220         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
11221         #79130.
11222         
11223         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
11224         a race condition.
11225         (mini_get_ldelema_ins): Ditto.
11226
11227 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
11228
11229         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
11230         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
11231         Fixes #79213.
11232
11233 2006-08-29 Neale Ferguson <neale@sinenomine.net>
11234
11235         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
11236         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
11237
11238         * exceptions-s390x.c: Cosmetic change.
11239
11240         * tramp-s390.c: Fix warning.
11241
11242         * cpu-s390.md: Correct length of mul_imm.
11243
11244 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
11245
11246         * aot-compiler.c: added binary writer with ELF backend
11247         implementation (only on Linux/x86 for now).
11248
11249 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
11250
11251         * Makefile.am: Don't run net 2.0 AOT tests.
11252
11253         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
11254         (mono_compile_assembly): Skip net 2.0 assemblies as well.
11255
11256         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
11257
11258 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
11259
11260         * aot-compiler.c: simplified and refactored the asm-writing code
11261         to allow different backends.
11262
11263 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
11264
11265         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
11266
11267         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
11268         little. Share patches of type TYPE_FROM_HANDLE as well.
11269
11270         * mini.c (mono_patch_info_equal): New helper function.
11271         (mono_patch_info_hash): Ditto.
11272
11273         * aot-compiler.c (emit_method_code): Fix s390 build.
11274
11275         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
11276         is not handled because it is stored as a flag and not as a type ctor. Fixes
11277         #79016.
11278
11279 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
11280
11281         * aot-compiler.c: Fix computation of GOT slot statistics.
11282         
11283         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
11284         Also remove support for not PIC AOT.
11285
11286         * mini.h: Bump AOT file format version.
11287
11288         * objects.cs: Add a test for #78990.
11289
11290         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
11291         (peter.dettman@iinet.net.au). Fixes #79087.
11292
11293         * basic-long.cs: Add a test for the above.
11294
11295 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
11296
11297         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
11298         
11299         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
11300         code somewhat.
11301
11302 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
11303
11304         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
11305         exceptions.
11306
11307 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
11308
11309         * mini.c: Don't verify COM proxy invoke calls
11310         
11311
11312 2006-08-10  Dick Porter  <dick@ximian.com>
11313
11314         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
11315         which process is holding semaphores locked.
11316
11317 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
11318
11319         * mini-ia64.c mini-amd64.c: Fix #79027.
11320
11321         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
11322
11323         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
11324
11325         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
11326         implicit arguments in a vararg call. Fixes #79027.
11327
11328 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
11329
11330         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
11331         (mono_get_array_new_va_signature): Ditto.
11332
11333 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
11334
11335         * aot-runtime.c: Call init_plt lazily.
11336
11337         * inssel-long.brg: Fix unsigned long->int conversion.
11338
11339         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
11340
11341         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
11342         that most data is now in the .rss/.data section.
11343
11344 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
11345
11346         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
11347
11348         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
11349
11350         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
11351
11352         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
11353
11354         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
11355         virtual call. Fixes #79010.
11356
11357         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
11358         and use the result as the this argument in the real call.
11359
11360         * generics.2.cs: Add a new test for #79010.
11361         
11362 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
11363
11364         * mini-x86.c: Fix a warning.
11365
11366         * aot-compiler.c: Add a bunch of statistics.
11367
11368         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
11369
11370 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
11371
11372         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
11373
11374 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
11375
11376         * 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>.
11377
11378 2006-07-13  Miguel de Icaza  <miguel@novell.com>
11379
11380         * mini.c (mono_method_to_ir): Obtain the original method in the
11381         CIL stream and use this to perform validation.
11382
11383         Fixed: #78816
11384
11385 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
11386
11387         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
11388         (mono_arch_call_opcode): Ditto.
11389
11390         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
11391         #78826.
11392
11393         * mini.c (mono_patch_info_dup_mp): New helper function.
11394         
11395         * aot-compiler.c (compile_method): Fix some of the memory allocated during
11396         compilation. Fixes #78827.
11397
11398 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
11399
11400         * declsec.c: Use original security informations for
11401           MONO_WRAPPER_MANAGED_TO_MANAGED.
11402
11403 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
11404
11405         * mini.c: Allow Com Interop methods/classes and
11406         don't verify COM wrapper calls
11407         
11408
11409 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
11410
11411         * inssel-long32.brg: Fix long->i4 checked conversion.
11412
11413         * exceptions.cs: Add a test for the above.
11414
11415 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
11416
11417         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
11418
11419         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
11420         leaks.
11421
11422         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
11423         #78775.
11424
11425 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
11426
11427         * mini.c: Fix solaris/x86 exception handling.
11428
11429         * Makefile.am: Get rid of $(ICU_LIBS).
11430
11431 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
11432
11433         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
11434         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
11435         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
11436
11437         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
11438
11439         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
11440         this function causes a SIGSEGV.
11441
11442 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
11443
11444         * mini.c: Remove unused solaris/x86 includes.
11445
11446 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
11447
11448         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
11449
11450 2006-06-20  Jb Evain  <jbevain@gmail.com>
11451
11452         * cpu-g4.md: fix max length of start_handler instruction.
11453
11454 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
11455         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
11456
11457 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
11458         * ssa.c: Fixed bug 78653 for SSA based deadce.
11459         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
11460         MonoInst.flags, used in SSA based deadce.
11461         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
11462         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
11463
11464 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
11465
11466         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
11467         it can end up using non executable memory on ppc64 systems
11468         running ppc32 userspace (fix from Johannes Berg).
11469
11470 2006-06-14  Dick Porter  <dick@ximian.com>
11471
11472         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
11473         4.1.1
11474
11475 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
11476         * mini.c: Made so that inline is locally disabled if it would
11477         trigger a .cctor, because too many apps depend on this behavior
11478         (which seems to be also the one of the MS CLR).
11479
11480 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
11481
11482         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
11483         No idea why this worked before.
11484
11485         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
11486         which branch to outer exception clauses since they could skip the
11487         inner finally clauses. Fixes #78633.
11488
11489         * exceptions.cs: Add a test for the above.
11490
11491         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
11492         Fixes #78629.
11493
11494         * iltests.il: Add a test for the above.
11495
11496 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
11497
11498         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
11499         after the end of a try bblock, to prevent asserts in mini_method_compile ().
11500
11501         * iltests.il: Add a test for the above.
11502
11503 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
11504
11505         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
11506         
11507         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
11508         methods as instrinsics.
11509
11510 2006-06-09  Wade Berrier <wberrier@novell.com>
11511
11512         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
11513         (simple-cee-ops.h ssapre-mini-ops.h)
11514
11515 2006-06-09  Neale Ferguson <neale@sinenomine.net>
11516
11517         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
11518         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
11519         instruction).
11520         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
11521         * cpu-s390x.md: Fix max. length values for a couple of instructions.
11522
11523 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
11524
11525         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
11526
11527 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
11528
11529         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
11530         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
11531         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
11532         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
11533         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
11534         of opcodes, so that bug 78549 should not happen again.
11535         * ssapre.c: Updated to use the renamed files.
11536
11537 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
11538
11539         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
11540         in OP_ATOMIC_EXCHANGE_I4.
11541
11542 2006-06-07  Wade Berrier <wberrier@novell.com>
11543
11544         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
11545         in mono_debugger_create_notification_function)
11546
11547 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
11548
11549         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
11550         
11551         * mini.c (type_from_stack_type): Disable some changes which do not
11552         seem to work.
11553
11554         * driver.c: Reenable opts.
11555
11556         * mini.h (MonoStackSlot): New structure to keep track of the verification state
11557         of the evaluation stack.
11558         
11559         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
11560         evaluation stack trace at entry to the bblock.
11561
11562         * mini.c (merge_stacks): New function to perform verification of stack merges.
11563         Turned off by default.
11564
11565         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
11566         STACK_MP.
11567         
11568 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
11569
11570         * local-propagation.c: Fixed bug 78549.
11571
11572 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
11573
11574         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
11575
11576 2006-06-02  Miguel de Icaza  <miguel@novell.com>
11577
11578         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
11579         tramp-arm.c, tramp-ia64.c
11580         (mono_debugger_create_notification_function): Update signature to
11581         new signature and use new protocol for creating the notification
11582         function.  
11583
11584         Should fix the build.
11585
11586 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
11587
11588         * exceptions-ppc.c (mono_jit_walk_stack)
11589         (ves_icall_get_frame_info): Fix the build
11590
11591 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
11592
11593         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
11594
11595 2006-05-31  Raja R Harinath  <rharinath@novell.com>
11596
11597         * il2tests.2.il: New file for generics CIL tests.  Add test for
11598         #78019.
11599         * Makefile.am: Update.
11600
11601         Fix #78019
11602         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
11603         to nullable types.
11604
11605 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
11606
11607         * aliasing.c: Fixed bug 78311.
11608
11609 2006-05-29  Martin Baulig  <martin@ximian.com>
11610
11611         * mini-exceptions.c (mono_find_jit_info): When computing the
11612         native offset, check whether we're actually inside the method's
11613         code; call mono_debug_print_stack_frame() to format the frame.
11614         (ves_icall_System_Exception_get_trace): Call
11615         mono_debug_print_stack_frame() to format the stack frame.
11616         (ves_icall_get_trace): Update to the new debugging API.
11617         (mono_jit_walk_stack_from_ctx): Likewise.
11618         (ves_icall_get_frame_info): Likewise.
11619
11620         * mini.c (get_method_from_ip): Use the new debugging API.
11621         (mono_print_method_from_ip): Likewise.
11622
11623         * exceptions-ppc.c
11624         (mono_jit_walk_stack): Use the new debugging API.
11625         (ves_icall_get_frame_info): Likewise.   
11626
11627 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
11628
11629         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
11630
11631 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
11632
11633         * mini.c: Added "limitator" to inline for debugging.
11634
11635 2006-05-24  Martin Baulig  <martin@ximian.com>
11636
11637         * debug-debugger.c (mono_debugger_init): Create a private,
11638         malloc()-based code manager for the notification function and
11639         intentionally leak it on exit.  This fixes the crash-on-exit race
11640         condition.
11641
11642         * tramp-amd64.c
11643         (mono_debugger_create_notification_function): Added
11644         `MonoCodeManager *' argument.
11645
11646         * tramp-x86.c
11647         (mono_debugger_create_notification_function): Added
11648         `MonoCodeManager *' argument.
11649
11650 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
11651
11652         * aliasing.c: Fixed 64 bit issue.
11653         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
11654         default since all known bugs are fixed (one more time!).
11655
11656 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
11657
11658         * mini.c: write barrier support.
11659
11660 2006-05-23  Martin Baulig  <martin@ximian.com>
11661
11662         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
11663         check at the top of the file.
11664
11665 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
11666
11667         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
11668         reverting changes without reason and without changelog entries.
11669
11670 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
11671
11672         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
11673         to a few opcodes. Fixes #78439.
11674
11675         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
11676         consistency with other archs.
11677
11678         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
11679
11680 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
11681
11682         * debug-debugger.c: fix the build.
11683
11684 2006-05-17  Martin Baulig  <martin@ximian.com>
11685
11686         * debug-debugger.c
11687         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
11688         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
11689         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
11690         (debugger_attach): Call GC_mono_debugger_add_all_threads().
11691
11692 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
11693
11694         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
11695
11696 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
11697
11698         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
11699         MONO_TYPE_GENERICINST.
11700         
11701         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
11702         MONO_TYPE_GENERICINST.
11703
11704 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
11705
11706         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
11707         #78325.
11708
11709 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
11710
11711         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
11712         mempool.
11713         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
11714
11715 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
11716
11717         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
11718         mono_trace_cleanup ().
11719
11720         * iltests.il: Fix problem with the newly added test.
11721
11722         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
11723         due to register constraints, free up the previous hreg. Fixes #78314.
11724
11725         * iltests.il: Add new test for #78314.  
11726
11727         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
11728         Interlocked.Add. Fixes #78312.
11729
11730         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
11731         
11732 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
11733
11734         * inssel.brg (mini_emit_virtual_call): Fix a warning.
11735
11736 2006-05-05  Martin Baulig  <martin@ximian.com>
11737
11738         * debug-mini.c (mono_debug_open_block): New method.
11739
11740         * mini-amd64.c
11741         (mono_arch_output_basic_block): Call mono_debug_open_block() at
11742         the beginning of each basic block.
11743
11744         * mini-x86.c
11745         (mono_arch_output_basic_block): Call mono_debug_open_block() at
11746         the beginning of each basic block.
11747
11748 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
11749
11750         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
11751         default until I understand why they break the build on amd64.
11752
11753 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
11754
11755         * mini.c (mini_cleanup): Call mono_cleanup ().
11756
11757         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
11758         errors.
11759
11760 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
11761
11762         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
11763         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
11764         default since all known bugs are fixed, and I cannot reproduce bug
11765         77944... I'm asking Matt Hargett to test again after this commit.
11766
11767 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
11768
11769         * mini-codegen.c: Fixed typo that thrashed inline.
11770
11771 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
11772
11773         * dominators.c (compute_dominators): Avoid using a worklist since
11774         it is not correct in some cases. Instead, iterate over all bblocks as
11775         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
11776
11777 2006-04-28  Miguel de Icaza  <miguel@novell.com>
11778
11779         * mini.c (mono_jit_compile_method_inner): Use
11780         mono_prepare_exception_from_error that resets the value
11781         internally.
11782
11783 2006-04-27  Miguel de Icaza  <miguel@novell.com>
11784
11785         * mini.c: Move the mini_loader_error_to_exception to metadata. 
11786         
11787 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
11788
11789         * aliasing.c: Fixed bug 78210.
11790
11791 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
11792
11793         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
11794         default until all their problems (or the ones they trigger) are fixed.
11795
11796 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
11797
11798         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
11799         
11800         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
11801         as loaded only after resolving patches since that could invoke the same method.
11802
11803         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
11804
11805         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
11806         functions.
11807
11808         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
11809         AOT loader.
11810
11811         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
11812         stack.
11813
11814         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
11815         made from AOT code through the PLT table.
11816
11817         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
11818         holding the plt offset when a call is made to the aot plt trampoline.
11819         
11820 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
11821
11822         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
11823         amd64 AOT support.
11824
11825         * Makefile.am (common_sources): Fix build breakage.
11826
11827         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
11828         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
11829         intra-assembly calls if possible.
11830         
11831         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
11832
11833         * mini-trampolines.c: Handle PLT entries.
11834
11835         * mini.c: Avoid creating a GOT var for calls.
11836
11837         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
11838         from mscorlib code.
11839
11840         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
11841         from mscorlib code.
11842
11843         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
11844         AOT code.       
11845
11846         * mini.h: Bump AOT file format version.
11847         
11848         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
11849         covers more cases.
11850
11851 2006-04-25  Martin Baulig  <martin@ximian.com>
11852
11853         * driver.c: Disable copyprop, consprop and inline when running
11854         inside the debugger.
11855
11856 2006-04-25  Martin Baulig  <martin@ximian.com>
11857
11858         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
11859         with `get_current_thread' and added `detach'.
11860         (MonoDebuggerMetadataInfo): Added `thread_size',
11861         `thread_tid_offset', `thread_stack_ptr_offset' and
11862         `thread_end_stack_offset'.
11863
11864 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
11865
11866         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
11867         aot-runtime.c.
11868
11869         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
11870         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
11871
11872         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
11873
11874         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
11875
11876         * aot.c: Add support for ADJUSTED_IID.  
11877
11878 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
11879
11880         * aot.c (emit_method_order): Don't align method_order_end.
11881
11882         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
11883         the interface ID changes.
11884
11885 2006-04-21  Dick Porter  <dick@ximian.com>
11886
11887         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
11888         cleaning up a thread.  Fixes the new part of bug 77470.
11889
11890 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
11891
11892         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
11893         to managed wrapper.
11894                      
11895 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
11896
11897         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
11898         
11899         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
11900         SIGSEGV. Fixes #78072.
11901
11902         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
11903         unregister our SIGABRT handler.
11904
11905 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
11906
11907         * mini.c: Disabled inline where it can alter the call stack in a
11908         way visible from managed code.
11909         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
11910         default.
11911
11912 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
11913
11914         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
11915         on other platforms. Fixes #78089.
11916
11917 2006-04-13  Martin Baulig  <martin@ximian.com>
11918
11919         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
11920         determine whether we're inside the debugger.
11921
11922         * debug-debugger.h
11923         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
11924
11925 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
11926
11927         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
11928         handler clauses. Fixes #78024.
11929
11930         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
11931         in the CALL_MEMBASE opcodes. Fixes #78088.
11932         (mono_arch_get_vcall_slot_addr): Ditto.
11933
11934 2006-04-10  Martin Baulig  <martin@ximian.com>
11935
11936         * debug-debugger.c: The thread handling code has now been moved
11937         into ../metadata/threads.c.
11938
11939 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
11940
11941         * driver.c (mono_main): Fix --with-gc=none build.
11942
11943         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
11944         (mono_spillvar_offset_float): Ditto.
11945         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
11946         hreg, not when its !global, since on ia64, there is a third category: stacked
11947         registers.      
11948
11949 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
11950
11951         * mini.c: set MonoInst->klass for load field address and a few other
11952         places.
11953
11954 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
11955
11956         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
11957
11958 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
11959
11960         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
11961         the branch opt changes.
11962
11963 2006-04-06  Dick Porter  <dick@ximian.com>
11964
11965         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
11966         
11967         * wapihandles.c (mini_wapi_seminfo): 
11968         * driver.c (mono_main): Add semaphore info option
11969
11970 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
11971
11972         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
11973         branch optimization changes. Fixes #78009.
11974
11975 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
11976
11977         * mini.c: ignore accessibility of methods in managed->native wrappers.
11978
11979 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
11980
11981         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
11982         
11983         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
11984
11985 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
11986
11987         * mini.c: Modify the branch optimizations to preserve the invariant that
11988         the entries inside the in_bb and out_bb arrays are unique.
11989         (mono_unlink_bblock): Avoid creation of new arrays.
11990
11991 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
11992
11993         * mini.c (mono_unlink_bblock): Fix regression caused by previous
11994         change (#77992).
11995
11996 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
11997
11998         * mini.c (optimize_branches): Remove the "optimizations" in
11999         the cbranch1/cbranch2 -> branch cases which were causing several
12000         problems in the past. Fixes #77986.
12001
12002 2006-03-31  Chris Toshok  <toshok@ximian.com>
12003
12004         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
12005         default optimizations :(
12006
12007 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
12008
12009         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
12010         branch.
12011
12012 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
12013
12014         * local-propagation.c: Added comments to structs and removed
12015         "Mono" prefixes from local tree mover types.
12016
12017 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
12018
12019         * Makefile.am (arch_sources): Define this for each architecture so 
12020         libmono_la_SOURCES is defined in one place.
12021
12022 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
12023
12024         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
12025         from handles/.
12026
12027 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
12028
12029         * driver.c: print the GC name supplied by configure.
12030
12031 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
12032
12033         * local-propagation.c: Added tree mover, and moved here all the
12034         local propagation code from mini.c
12035         * mini.c: Added support for treeprop, and moved all the local
12036         propagation code to local-propagation.c
12037         * mini.h: Added support for treeprop
12038         * driver.c: Added support for treeprop, enabled consprop, copyprop,
12039         treeprop, inline and deadce by default
12040         * Makefile.am: Added local-propagation.c
12041
12042 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
12043
12044         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
12045
12046 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
12047
12048         * debug-debugger.c: make it compile without the Boehm GC.
12049
12050 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
12051
12052         * mini.c: fixed issue with mismatch when an icall is registered
12053         with multiple names but same address.
12054
12055 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
12056
12057         * declsec.c, mini-exceptions.c: use write barrier to set reference
12058         fields of managed objects.
12059
12060 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
12061
12062         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
12063         (can_access_internals): Fix a warning.
12064
12065         * mini.c (print_method_from_ip): Rename this to 
12066         mono_print_method_from_ip so it gets exported.
12067
12068         * trace.c: Deal with strings inside StringBuilder's containing garbage
12069         and fix memory leaks. Fixes #77848.
12070
12071 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
12072
12073         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
12074         fixes #77787.
12075
12076 2006-03-16 Neale Ferguson <neale@sinenomine.net>
12077         
12078         * mini-s390.c: Remove OP_X86_TEST_NULL.
12079
12080 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
12081
12082         * mini.c: use the correct GetHashCode() for the moving collector.
12083
12084 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
12085
12086         * liveness.c: Regalloc spill cost tuning.
12087
12088 2006-03-15 Neale Ferguson <neale@sinenomine.net>
12089         
12090         * mini-s390x.h: Correct S390_LONG macro.
12091
12092         * mini-s390x.c: Cleanup unused code.
12093
12094 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
12095
12096         * jit-icalls.h: New file.
12097
12098         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
12099         icalls and include that instead of including jit-icalls.c.
12100
12101         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
12102         OP_X86 opcodes.
12103
12104 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
12105
12106         * mini.c: when checking for member accessibility, also check for
12107         friend assemblies and for explicit interface implementations.
12108
12109 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
12110
12111         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
12112
12113         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
12114
12115         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
12116         common cases are done first.    
12117
12118         * mini-ops.h: Only define platform specific opcodes on the given platform.
12119
12120         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
12121         branch.
12122         
12123 2006-03-14  Martin Baulig  <martin@ximian.com>
12124
12125         Revert Paolo's change from r57348:
12126
12127         * mini.h: don't use gboolean for bitfields.
12128         * mini.c: verifier changes for fields and methods accessibility.
12129
12130 2006-03-13  Neale Ferguson <neale@sinenomine.net>
12131
12132         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
12133
12134         * mini-s390x.c: Fix conv_r_un.
12135
12136         * cpu-s390, cpu-s390x.md: Fix lengths.
12137
12138 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
12139
12140         * mini.c: nested types have access to all the nesting
12141         levels, not just the enclosing types.
12142
12143 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
12144
12145         * mini.c: added a few more verification checks.
12146
12147 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
12148
12149         * liveness.c: Merge optimizations from the linear-il branch.
12150
12151 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
12152
12153         * mini-ia64.c (emit_call): Add a comment.
12154
12155         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
12156
12157         * tramp-ia64.c: Fix some warnings.
12158
12159 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
12160
12161         * mini.h: don't use gboolean for bitfields.
12162         * mini.c: verifier changes for fields and methods accessibility.
12163
12164 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
12165
12166         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
12167         lazy icall wrapper changes.
12168
12169         * dominators.c: Replace all the dominator algorithms with faster
12170         ones from the linear-il branch.
12171
12172         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
12173         the mempool.
12174
12175         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
12176         common cases are done first.
12177
12178         * mini-amd64.c: Fix some warnings.
12179
12180         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
12181         from the mempool.
12182
12183         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
12184         added code.
12185
12186         * mini.h: Add a missing prototype.
12187
12188 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
12189
12190         * mini.c: Compile icall wrappers lazily.
12191
12192         * mini-codegen.c: Use printf instead of g_print since its much faster.
12193
12194         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
12195         function.
12196
12197         * mini.c (optimize_branches): Cache the negative result from 
12198         remove_block_if_useless ().
12199
12200         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
12201         Also fix some bblock linking issues.
12202
12203         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
12204         assembly files.
12205
12206         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
12207
12208         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
12209         accessed fields first, for better cache behavior.
12210         
12211 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
12212
12213         * mini.c: speedup IList<T> array accesses.
12214
12215 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
12216
12217         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
12218         inline_costs counter. Fixes #77190.
12219
12220 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
12221
12222         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
12223         trace messages. Fixes #77706.
12224
12225 2006-03-04  Martin Baulig  <martin@ximian.com>
12226
12227         * tramp-amd64.c, tramp-x86.c
12228         (mono_debugger_create_notification_function): Use
12229         mono_global_codeman_reserve() to allocate a buffer at runtime and
12230         return it.
12231
12232         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
12233
12234         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
12235         notification function at runtime and then call `initialize' in the
12236         `MONO_DEBUGGER__debugger_info' vtable.
12237
12238 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
12239
12240         * iltests.il: Fix a visibility problem.
12241
12242 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
12243
12244         * driver.c, mini.c: add hooks for the counters API.
12245
12246 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
12247
12248         * driver.c: show disabled options.
12249
12250 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
12251
12252         * linear-scan.c: always use cost-driven selection.
12253
12254 2006-02-28  Raja R Harinath  <rharinath@novell.com>
12255
12256         * jit-icalls.c (helper_compile_generic_method): Revert change from
12257         2006-02-24.
12258
12259 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
12260
12261         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
12262
12263 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
12264
12265         * inssel.brg: style fixes, mostly to force the updated monoburg
12266         to run for people using svn.
12267
12268 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
12269
12270         * mini.c: match monoburg changes.
12271
12272 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
12273
12274         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
12275         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
12276         declaration in the header file.
12277
12278 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
12279
12280         * helpers.c: reduce relocations and mem usage.
12281
12282 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
12283
12284         * mini.h, mini-codegen.c: disable logging features if
12285         requested by configure.
12286
12287 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
12288
12289         * mini.c: tiny verifier changes.
12290
12291 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
12292
12293         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
12294         cpu-pentium.md: stack alignment changes for osx/x86,
12295         partially from Geoff Norton <gnorton@customerdna.com>.
12296
12297 2006-02-24  Raja R Harinath  <harinath@gmail.com>
12298
12299         * jit-icalls.c (helper_compile_generic_method): Update to changes
12300         in metadata/class.c.
12301
12302 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
12303         
12304         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
12305         
12306         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
12307         interface calls with large offsets.
12308
12309 2006-02-23  Raja R Harinath  <rharinath@novell.com>
12310
12311         * jit-icalls.c (helper_compile_generic_method): Document the
12312         special-case we depend on so that we can inflate the method twice
12313         with the same context with no bad side-effects.
12314
12315 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
12316
12317         * mini-x86.c, mini-amd64.c: fix for case when xen support
12318         is disabled.
12319
12320 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
12321
12322         * mini-x86.c, mini-amd64.c: generate code to access tls items
12323         in a faster way for Xen systems.
12324
12325 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
12326
12327         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
12328         updates and compilation fixes for the OSX/x86 port, mostly from
12329         Geoff Norton <gnorton@customerdna.com>.
12330
12331 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
12332
12333         * inssel.brg: faster interface call implementation
12334         to sync with the interface_offsets MonoVTable changes.
12335
12336 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
12337
12338         * mini.c: more verification checks.
12339
12340 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
12341
12342         * mini.c: added a few more verification checks.
12343
12344 2006-02-17      Neale Ferguson <neale@sinenomine.net>
12345
12346         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
12347         facility on the processor and use it if available.
12348
12349 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
12350
12351         * driver.c, aot.c, mini.c: throw exception if the IL code is
12352         invalid or unverifiable.
12353
12354 2006-02-17  Raja R Harinath  <rharinath@novell.com>
12355
12356         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
12357         m.StructField.
12358
12359 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
12360
12361         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
12362
12363 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
12364
12365         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
12366         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
12367         handling of instantiated generic valuetypes.
12368
12369 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
12370
12371         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
12372         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
12373         instead.
12374
12375         * generics.2.cs: Revert the nullable reftypes tests.
12376
12377 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
12378
12379         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
12380         using __builtin_frame_address (1) as it doesn't work in the presence
12381         of optimizations. Hopefully fixes #77273.
12382
12383         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
12384         -> generics.cs change as it doesn't work with some automake versions.
12385
12386 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
12387
12388         * mini.c: handle systems that sue a different way to
12389         retrieve the stack address of the current thread.
12390
12391 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
12392
12393         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
12394         it specially in the makefile.
12395
12396         * generics.2.cs: Add tests for nullable reference types.
12397
12398 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
12399
12400         * mini.c: always handle the case when mono_jit_init()
12401         is called in a thread different from the main thread,
12402         confusing libgc (bug #77309).
12403
12404 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
12405
12406         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
12407
12408 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
12409
12410         * mini.c: change optimize_branches () to use a single loop
12411         and introduce a new optimization to simplify some range checks.
12412
12413 2006-02-03  Martin Baulig  <martin@ximian.com>
12414
12415         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
12416         and merged with debugger_thread_manager_add_thread().
12417         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
12418         inform the debugger about the main thread.
12419
12420 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
12421
12422         * basic.cs: Add test for div.un/rem.un constant folding.
12423
12424 2006-02-03  Neale Ferguson <neale@sinenomine.net>
12425
12426         * cpu-s390x.md: correct int_xor_imm length
12427
12428 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
12429
12430         * generics.2.cs: New test for #77442.
12431
12432         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
12433         #77442.
12434
12435 2006-02-02  Martin Baulig  <martin@ximian.com>
12436
12437         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
12438         <mono/metadata/mono-debug-debugger.h>   
12439
12440         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
12441
12442 2006-02-02  Martin Baulig  <martin@ximian.com>
12443
12444         * debug-debugger.h: New header file for debug-debugger.c.
12445
12446         * debug-debugger.c: Big API cleanup; don't run the managed Main()
12447         function is a separate thread anymore; add support for attaching.
12448
12449 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
12450
12451         * tramp-x86.c: Fix a warning.
12452
12453 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
12454
12455         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
12456         on very large methods.
12457
12458         * aot.c (load_patch_info): Fix a warning.
12459
12460 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
12461
12462         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
12463         mini-ops.h: alu membase optimizations.
12464
12465 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
12466
12467         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
12468         to speedup StringBuilder.
12469
12470 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
12471
12472         * dominators.c (mono_compute_natural_loops): Fix detection of
12473         loop body start blocks.
12474
12475         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
12476
12477 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
12478
12479         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
12480         #75145.
12481
12482 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
12483
12484         * aliasing.c: Fixed aliasing issue on 64 bit archs.
12485
12486 2006-01-25  Martin Baulig  <martin@ximian.com>
12487
12488         * debug-debugger.c: Moved the `MonoDebuggerManager' and
12489         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
12490         started to cleanup this file a little bit.
12491
12492 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
12493
12494         * mini.c: optimize a codepath frequently happening in generics code.
12495
12496 2006-01-23  Martin Baulig  <martin@ximian.com>
12497
12498         * Makefile.am: Only compile debug-debugger.c on supported platforms.
12499
12500         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
12501         functions directly.
12502
12503         * driver.c: debug-debugger.c is only available if
12504         `MONO_DEBUGGER_SUPPORTED' is defined.   
12505
12506 2006-01-23  Martin Baulig  <martin@ximian.com>
12507
12508         * debug-debugger.c: Only enable this on platforms where the Mono
12509         Debugger is working (x86 and x86_64).
12510
12511 2006-01-21  Martin Baulig  <martin@ximian.com>
12512
12513         The Mono Debugger is now using the normal `mono' instead of the
12514         `mono-debugger-mini-wrapper' when executing managed code.
12515
12516         * debug-debugger.c: New file; previously known as
12517         debugger/wrapper/wrapper.c.
12518
12519         * debug-mini.c (mono_init_debugger): Removed.
12520
12521         * driver.c (mono_main): Added new `--inside-mdb' command line
12522         argument which is used when running inside the debugger.
12523
12524 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
12525
12526         * liveness.c (mono_analyze_liveness): Remove some unused data
12527         structures.
12528
12529 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
12530
12531         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
12532
12533 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
12534
12535         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
12536         depends on implementation details of monobitset.
12537
12538         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
12539         Fixes #77271.
12540
12541 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
12542
12543         * liveness.c: Update after monobitset changes.
12544
12545 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
12546
12547         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
12548
12549 2006-01-11 Neale Ferguson <neale@sinenomine.net>
12550
12551         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
12552
12553         * mini-s390x.c: Remove warning messages.
12554
12555 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
12556
12557         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
12558
12559 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
12560
12561         * generics.2.cs: Add ldelem/stelem_any test.
12562
12563 2006-01-10 Neale Ferguson <neale@sinenomine.net>
12564
12565         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
12566
12567 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
12568
12569         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
12570         
12571 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
12572
12573         * generics.2.cs: Reenable vtype tests.
12574
12575         * inssel-x86.brg: Remove an icorrect valuetype rule.
12576
12577 2006-01-06 Neale Ferguson <neale@sinenomine.net>
12578
12579         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
12580         initial support for OP_ABS.
12581
12582 2006-01-05 Neale Ferguson <neale@sinenomine.net>
12583
12584         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
12585
12586 2006-01-05 Neale Ferguson <neale@sinenomine.net>
12587
12588         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
12589         conversion and implement LADD/LSUB.
12590
12591         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
12592         architectures.
12593
12594 2006-01-05 Neale Ferguson <neale@sinenomine.net>
12595
12596         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
12597
12598         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
12599         architectures.
12600
12601 2006-01-05 Neale Ferguson <neale@sinenomine.net>
12602
12603         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
12604         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
12605         (stack walk problem).
12606
12607 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
12608
12609         * aot.c (mono_aot_load_method): Fix a warning.
12610
12611 2006-01-03  Neale Ferguson <neale@sinenomine.net>
12612
12613         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
12614
12615 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
12616
12617         * iltests.il: Add test for #77148.
12618
12619         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
12620         #77148.
12621
12622 2006-01-03  Neale Ferguson <neale@sinenomine.net>
12623
12624         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
12625
12626 2006-01-03  Neale Ferguson <neale@sinenomine.net>
12627
12628         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
12629         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
12630
12631         * basic-long.cs: Add lconv-to-r4/r8 tests.
12632
12633 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
12634
12635         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
12636
12637         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
12638         here as on other archs.
12639
12640 2005-12-29 Neale Ferguson <neale@sinenomine.net>
12641
12642         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
12643
12644 2005-12-29 Neale Ferguson <neale@sinenomine.net>
12645
12646         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
12647         
12648         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
12649
12650         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
12651         instrument_prolog; Add memory_barrier instruction.
12652
12653 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
12654
12655         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
12656
12657 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
12658
12659         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
12660
12661         * aliasing.c inssel.brg: Fix warnings.
12662
12663         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
12664         could skip initialization of some parts of memory.
12665
12666         * mini.c mini-ia64.c: Fix warnings.
12667
12668         * inssel-sparc.brg: Add an implementation of lneg which actually works.
12669
12670 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
12671
12672         * aliasing.c (mono_build_aliasing_information): Add a workaround for
12673         a crash seen on sparc.
12674
12675         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
12676         
12677         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
12678
12679 2005-12-21 Neale Ferguson <neale@sinenomine.net>
12680
12681         * mini-ops.h: Add s390_backchain instruction
12682
12683         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
12684
12685         * cpu-s390.md: Add s390_backchain instruction
12686
12687         * mini-s390.c: Significant ABI changes
12688
12689         * mini-s390.h: Cater for zero length structures
12690
12691 2005-12-20 Neale Ferguson <neale@sinenomine.net>
12692
12693         * mini-s390.c: ABI fixes
12694
12695         * inssel-s390.brg: Remove debug statements
12696
12697         * cpu-s390.md: Fix length of ATOMIC_xx operations
12698
12699 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
12700
12701         * basic-float.cs: Add float<->long conversion tests.
12702
12703 2005-12-16 Neale Ferguson <neale@sinenomine.net>
12704
12705         * mini-s390.c: Fix LOCALLOC processing.
12706
12707         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
12708
12709 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
12710
12711         * iltests.il: Add tests for some opcodes not covered by the other
12712         tests.
12713
12714 2005-12-15 Neale Ferguson <neale@sinenomine.net>
12715
12716         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
12717         register loading for Tail processing; Correct trace output.
12718
12719         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
12720
12721         * cpu-s390.md: Correct size of jmp instruction. 
12722
12723 2005-12-13 Neale Ferguson <neale@sinenomine.net>
12724
12725         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
12726
12727 2005-12-13 Neale Ferguson <neale@sinenomine.net>
12728
12729         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
12730           Bring s390 up to current level.
12731
12732 2005-12-12  Zltan Varga  <vargaz@gmail.com>
12733
12734         * generics.2.cs: Disable the newly added tests as they do not work yet.
12735         
12736         * generics.2.cs: Add valuetype tests.
12737
12738 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
12739
12740         * basic-long.cs: Add i4->u8 test.
12741
12742         * objects.cs: Add tests for JIT intrinsic.
12743
12744         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
12745         optimizations lost by a mistake.
12746
12747 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
12748
12749         * basic-long.cs: Remove a test moved to objects.cs.
12750
12751         * arrays.cs: Add more array tests.
12752
12753 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
12754
12755         * arrays.cs: Add new tests for multi-dimensional arrays.
12756
12757 2005-12-06  Raja R Harinath  <rharinath@novell.com>
12758
12759         * Makefile.am (test_sources2): Add generics.2.cs.
12760         (EXTRA_DIST): Add test_sources2.
12761
12762 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
12763
12764         Support for boxing and unboxing nullable types as well as the
12765         isinst operation on nullables, per the CLI ammendment.
12766
12767         * inssel.brg (CEE_ISINST): Special case for nullable
12768
12769         * mini.c (handle_unbox_nullable): new method
12770         (handle_box): Special case for nullable types
12771         (mono_method_to_ir): Call handle_unbox_nullable in correct
12772         places.
12773
12774         * generics.2.cs: New test suite
12775
12776         * Makefile.am: Support for regression tests with generics.
12777
12778 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
12779
12780         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
12781         allocated to registers. Fixes #76800.
12782
12783 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
12784
12785         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
12786
12787 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
12788
12789         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
12790         of platforms.
12791
12792 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
12793
12794         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
12795         objects.cs.
12796
12797         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
12798         
12799         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
12800 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
12801
12802         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
12803         single precision before storing to a single precision location.
12804
12805 2005-11-28  Raja R Harinath  <rharinath@novell.com>
12806
12807         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
12808
12809 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
12810
12811         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
12812         correct files.
12813
12814         * basic.cs: Remove test_0_byte_compares test which was moved to
12815         objects.cs a long time ago.
12816
12817 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
12818
12819         * aliasing.c: Fixed aliasing issue on 64 bit archs.
12820
12821 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
12822
12823         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
12824         handlers are called.
12825
12826         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
12827         throwing code.
12828
12829          * mini-ia64.c: Add support for the throw->branch exception 
12830         optimization.   
12831
12832         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
12833
12834 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
12835
12836         * mini.c: Enabled "fastpath" deadce :-)
12837         
12838 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
12839
12840         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
12841         alias analysis pass to support it.
12842         * mini.h: Likewise.
12843         * ssa.c: Likewise.
12844         * liveness.c: Likewise (liveness computation can use aliasing
12845         information to be more accurate).
12846         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
12847         moreover made so that "--compile-all" uses the given optimization
12848         flags and not the default ones.
12849         * aliasing.c: Alias analysis (new file).
12850         * aliasing.h: Likewise.
12851         * Makefile.am: added "aliasing.c" and "aliasing.h".
12852         
12853 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
12854
12855         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
12856         OP_L opcodes.
12857
12858 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
12859
12860         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
12861         fp >= end_of_stack exit condition, as it is not needed, and it might
12862         become true for fp eliminated frames.
12863
12864 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
12865
12866         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
12867         coded offsets.
12868
12869 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
12870
12871         * mini-arm.c: fixed alignment of doubles/longs to match
12872         the C ABI (bug #76635).
12873
12874 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
12875
12876         * aot.c: fix compilation with --enable-minimal=aot.
12877
12878 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
12879
12880         * mini-arm.c: fixed compatibility with the new
12881         floating point emulator package for compares.
12882
12883 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
12884
12885         * mini.c : reverted sig->pinvoke changes (r51396-51397).
12886
12887 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
12888
12889         * mini-exceptions.c (print_stack_frame): Output to stderr.
12890         (mono_handle_native_sigsegv): Ditto.
12891
12892 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
12893
12894         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
12895         OP_LCONV_TO_OVF_I implementation.
12896
12897         * mini-amd64.c: Add support for the throw->branch exception 
12898         optimization.
12899
12900         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
12901         when the catch clause catches a more general exception, i.e. Object.
12902
12903 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
12904
12905         * cpu-ia64.md: Remove unused opcodes.
12906
12907         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
12908         specific defines for architectures defining USE_SIGACTION.
12909
12910         * mini-ia64.c: Fix some warnings.
12911
12912         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
12913         version seemed to skip a frame.
12914
12915 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
12916
12917         * mini.c: Clean up the usage of sig->pinvoke flag. Now
12918         only calls which are made to native code use this flag.
12919
12920 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
12921
12922         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
12923         varargs methods as well.
12924         
12925         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
12926         which have save_lmf set. Reorganize methods prologs a bit.
12927
12928         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
12929         debugger to the proper place.
12930
12931 2005-10-29  Martin Baulig  <martin@ximian.com>
12932
12933         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
12934         when running inside the debugger until the debugger has support
12935         for it.
12936
12937 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
12938
12939         * mini.h: Fix a warning.
12940
12941 2005-10-24  Miguel de Icaza  <miguel@novell.com>
12942
12943         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
12944         we expose publicly, this returns the string.
12945
12946 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
12947
12948         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
12949         with fp elimination.
12950
12951 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
12952
12953         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
12954         native stacktrace using the glibc 'backtrace' function if available.
12955
12956 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
12957
12958         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
12959
12960         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
12961         handle SIGSEGVs received while in native code.
12962
12963         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
12964         code, call mono_handle_native_sigsegv which will abort the runtime
12965         after printing some diagnostics, instead of converting it into a
12966         confusing NullReferenceException.
12967
12968 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
12969
12970         * cpu-pentium.md: Remove unused opcodes.
12971
12972 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
12973
12974         * mini-amd64.h (MonoLMF): Add rsp field.
12975
12976         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
12977         the lmf too.
12978
12979 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
12980
12981         * mini-codegen.c (get_register_spilling): Fix some warnings.
12982
12983 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
12984
12985         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
12986         elimination during exception handling. Enable fp elimination by
12987         default.
12988
12989         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
12990         elimination.
12991
12992 2005-10-16  Martin Baulig  <martin@ximian.com>
12993
12994         * mini-exceptions.c
12995         (mono_debugger_run_finally): New public method for the debugger.
12996
12997 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
12998
12999         * debug-mini.c (mono_debug_init_method): Fix warning.
13000
13001         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
13002         the 'exname' parameter const to fix some warnings.
13003
13004 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
13005
13006         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
13007         introduced by the previous patch.
13008
13009 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
13010
13011         * basic-float.cs: Add test for precision of float arithmetic.
13012
13013         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
13014         when loading/storing single values from/to memory.
13015
13016         * mini.c (mono_jit_compile_method_with_opt): Create the function
13017         pointers in the correct domain.
13018
13019 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
13020
13021         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
13022         introduced by previous patch.
13023         
13024         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
13025         when out_filter_idx is NULL.
13026
13027         * mini-exceptions.c: Don't run filter clauses twice during exception
13028         handling. Fixes #75755.
13029
13030 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
13031
13032         * aot.c: Add support for ldflda wrappers.
13033
13034         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
13035         #75902.
13036
13037 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
13038
13039         * mini.c, mini.h: do not consider exception handlers blocks when
13040         setting up interface variables.
13041
13042 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
13043
13044         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
13045
13046 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
13047
13048         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
13049         causes a regression.
13050
13051         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
13052
13053 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
13054
13055         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
13056         of the OP_P definitions.
13057
13058         * TODO: Add a proposal for dealing with the CEE/OP mess.
13059
13060         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
13061         optimizations from the x86 port.
13062
13063         * cpu-amd64.md: Ditto.
13064
13065         * basic.cs basic-long.cs: Add tests.
13066
13067 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
13068
13069         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
13070         Patrik Torstensson's implementation of my exception-handling
13071         optimization idea, when the exception object is not used
13072         (bug #62150).
13073
13074 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
13075
13076         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
13077         of the mul_imm optimizations from the old jit.
13078
13079 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
13080
13081         * mini.c, liveness.c: patch by Patrik Torstensson and
13082         Zoltan Varga to improve performance in methods with
13083         exception clauses.
13084
13085 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
13086
13087         * driver.c: Remove 'Globalization' entry from --version.
13088
13089 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
13090
13091         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
13092         there is a profiler interested in JIT events.
13093
13094         * aot.c: Load profile files produced by the AOT profiling module, and
13095         reorder methods based on the profiling info. Add a 'method_order' table
13096         to the AOT file to make mono_aot_find_jit_info work with the reordered
13097         methods.
13098
13099         * mini.h: Bump AOT file version info.
13100
13101 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
13102
13103         * mini-arm.h: work around what looks like a gcc bug when optimizations
13104         are enabled.
13105
13106 2005-09-28  Raja R Harinath  <rharinath@novell.com>
13107
13108         * Makefile.am (AM_CFLAGS): Don't use += to append inside
13109         conditionals.  Use ...
13110         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
13111
13112 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
13113
13114         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
13115         to determine the amount of memory to copy when passing valuetypes.
13116
13117         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
13118         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
13119
13120 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
13121
13122         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
13123         information about aot.
13124
13125 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
13126
13127         * *.c: Replace the use of {Enter,Leave}CriticalSection with
13128         macros. This will allow a deadlock debugger to easily be plugged
13129         in.
13130
13131 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
13132
13133         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
13134
13135 2005-09-27  Raja R Harinath  <rharinath@novell.com>
13136
13137         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
13138         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
13139         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
13140         ($(arch_built)) [CROSS_COMPILING]: Error out.
13141
13142 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
13143
13144         * aot.c: Add support for the no_special_static flag for classes.
13145
13146 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
13147
13148         * Reapply reverted patches.
13149
13150         * *: Revert r50174 as well.
13151
13152         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
13153
13154 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
13155
13156         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
13157
13158 2005-09-23  Miguel de Icaza  <miguel@novell.com>
13159
13160         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
13161         part of the SIG_HANDLER_SIGNATURE.  
13162
13163 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
13164
13165         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
13166         statistics.
13167
13168         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
13169         introduced by previous patch.
13170
13171 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
13172
13173         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
13174         saved registers too.
13175
13176         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
13177         upon the information returned by get_call_info ().
13178         
13179         * mini-x86.c (add_float): Fix stack size calculation.
13180         (mono_arch_call_opcode): Rewrite this so it works based up the
13181         information returned by get_call_info ().
13182         (mono_arch_get_this_vret_args): Ditto.
13183
13184 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
13185
13186         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
13187         in cinfo to determine the registers which need to be used.
13188
13189 2005-09-20  Miguel de Icaza  <miguel@novell.com>
13190
13191         * driver.c (mono_main): Add --server and --desktop flags. 
13192
13193 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
13194
13195         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
13196         registers as global registers.
13197
13198         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
13199         longer needed with the new register allocator.
13200
13201         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
13202
13203         * cpu-ia64.md: Remove unused opcodes.
13204         
13205         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
13206         
13207 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
13208
13209         * cpu-amd64.md: Remove unused opcodes.
13210
13211         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
13212         needed with the new register allocator.
13213
13214         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
13215         reg-reg moves.
13216
13217 2005-09-16  Raja R Harinath  <rharinath@novell.com>
13218
13219         * Makefile.am (check-local): Don't invoke semdel-wrapper.
13220
13221 2005-09-16  Martin Baulig  <martin@ximian.com>
13222
13223         * exceptions-amd64.c
13224         (throw_exception): Don't call mono_debugger_throw_exception() if
13225         we're a rethrow - see the FIXME in the code.
13226
13227 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
13228
13229         * mini.c (mono_init_exceptions): This only works on some architectures.
13230         
13231 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
13232
13233         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
13234         on ia64.
13235
13236         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
13237
13238         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
13239         now in mini-exceptions.c.
13240
13241 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
13242
13243         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
13244         now in mini-exceptions.c.
13245
13246 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
13247
13248         * exceptions-x86.c: Applied patch from Patrik Torstensson 
13249         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
13250
13251         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
13252         code into mini-exceptions.c. Add some assertions to it.
13253
13254 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
13255
13256         * aot.c (emit_section_change): Applied patch from "The Software Team" 
13257         (<software@solmersa.com>). Fix as errors on windows.
13258
13259 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
13260
13261         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
13262         method info into the LMF.
13263
13264 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
13265         
13266         * mini-ia64.c: Add proper unwind info for method epilogs.
13267
13268         * exceptions-ia64.c: Add some code to help debugging.
13269         
13270         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
13271
13272         * mini-exceptions.c: Fix warning.
13273
13274 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
13275
13276         * mini.c: Really fix build.
13277
13278         * mini-x86.c mini-amd64.c: Fix build.
13279
13280 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
13281
13282         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
13283
13284         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
13285         some Interlocked methods as intrinsics.
13286
13287         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
13288         for Thread methods as well.
13289
13290         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
13291
13292         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
13293
13294         * mini-ia64.c mini-x86.c mini-amd64.c 
13295         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
13296         OP_MEMORY_BARRIER.
13297         
13298         * mini.c (mono_init_exceptions): Fix build breakage.
13299
13300 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
13301
13302         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
13303         of instructions. Use the new ia64_unw_op macros for emitting unwind
13304         info.
13305
13306         * mini.c (mono_init_exceptions): Initialize exception handling
13307         related trampolines at startup.
13308
13309 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
13310
13311         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
13312
13313 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
13314
13315         * mini.c: Handle type loading errors gracefully during compilation and
13316         throw the appropriate exception.
13317
13318 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
13319
13320         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
13321         for the mono binary.
13322
13323 2005-09-09  Martin Baulig  <martin@ximian.com>
13324
13325         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
13326         the release.
13327
13328 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
13329
13330         * mini-arm.h: use emulation for conv.r.un for the release.
13331
13332 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
13333
13334         * mini-arm.c, objects.cs: more fixes and tests for them.
13335
13336 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
13337
13338         * mini-arm.c: align structures to at least 4 bytes to be able
13339         to keep our current optimized memcpy.
13340
13341 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
13342
13343         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
13344
13345 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13346
13347         * mini.c: ignore SIGPIPE.
13348
13349 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
13350
13351         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
13352
13353         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
13354
13355 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
13356
13357         * mini.h: Add prototype for mono_allocate_stack_slots_full.
13358
13359 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
13360
13361         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
13362         exception handling support.
13363         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
13364         patch by Brian Koropoff <briank@marakicorp.com>).
13365
13366 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
13367
13368         * mini.c: revert another 'optimization' which breaks when
13369         items on the eval stack need to be saved at a basic block end
13370         (bug #75940).
13371
13372 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
13373
13374         * jit-icalls.c: for arrays, ensure we always provide
13375         lower bounds.
13376
13377 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
13378
13379         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
13380         
13381         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
13382
13383 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
13384
13385         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
13386         arguments in their original register.
13387
13388 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
13389
13390         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
13391         memset/memcpy.
13392
13393         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
13394         when ssapre is enabled.
13395
13396         * inssel-long.brg: Fix bug in previous patch.
13397
13398         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
13399         multiplication by a constant.
13400
13401 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
13402
13403         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
13404         icc.
13405
13406         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
13407         saving registers.
13408
13409 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
13410
13411         * inssel-arm.brg: apply changes tested by Brian Koropoff
13412         <briank@marakicorp.com>.
13413
13414 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
13415
13416         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
13417         
13418 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
13419
13420         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
13421         to the same register if dreg is just a base register.
13422         (print_ins): Improve printing of membase opcodes.
13423
13424         * inssel-x86.brg: Add optimized ldind(reg) rules.
13425
13426         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
13427
13428 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
13429
13430         * mini.c: when running under valgrind, set the stack bottom for
13431         the GC at the actual approximate stack for the app (fixes running
13432         mono with valgrind).
13433
13434 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
13435
13436         * mini.c: do no break at the first valuetype to init found
13437         (fixes bug #75791).
13438
13439 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
13440
13441         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
13442
13443 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
13444
13445         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
13446
13447 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
13448
13449         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
13450
13451 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
13452
13453         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
13454
13455         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
13456         code.
13457
13458         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
13459         code.
13460
13461         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
13462         methods.
13463
13464 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
13465
13466         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
13467
13468 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
13469
13470         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
13471         in the tail recursion optimization.
13472
13473         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
13474         debug info into the assembly file.
13475
13476         * iltests.il: Add test for filter regions.
13477
13478         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
13479         initial stack of filter regions. Fixes #75755.
13480
13481 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
13482
13483         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
13484         stack requirements.
13485
13486 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
13487
13488         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
13489         the check for an already compiled method on non-ia64 platforms.
13490         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
13491         proper domain.
13492
13493         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
13494
13495         * inssel-x86.brg: Add some optimized call rules.
13496
13497 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
13498
13499         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
13500         method here.
13501
13502         * mini.h mini-trampolines.c: Pass the trampoline argument to 
13503         mono_arch_patch_delegate_trampoline.
13504
13505         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
13506
13507         * mini-trampolines.c: Fix build.
13508
13509         * mini-amd64.h: Add delegate trampolines.
13510
13511         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
13512
13513         * inssel-amd64.brg: Add optimized call rules.
13514         
13515         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
13516
13517         * inssel-ia64.brg: Add optimized ldind(reg) rules.
13518
13519 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
13520
13521         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
13522         change.
13523
13524         * mini-ia64.c: Remove LMF fixmes.
13525
13526         * mini-ia64.h: Remove most fields from LMF.
13527
13528         * inssel-ia64.brg (stmt): Fix unaligned access errors.
13529
13530         * mini-trampolines.c: Add support for IA64 function descriptors.
13531
13532         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
13533         for IA64 function descriptors.
13534
13535 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
13536
13537         * tramp-arm.c: patch the vtable for virtual calls. Added
13538         support code to register/unregister the LMF.
13539         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
13540         more LMF work.
13541
13542 2005-08-19  Dick Porter  <dick@ximian.com>
13543
13544         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
13545         bit value if needed.
13546
13547 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
13548
13549         * mini.c (mini_get_method): Move handling of wrapper data here.
13550
13551         * mini.c (mono_method_to_ir): Add support for dynamic methods.
13552
13553         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
13554         virtual.
13555
13556         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
13557         bblock->code does not remain empty.
13558
13559 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
13560
13561         * arrays.cs: Add regression test for #75832.
13562
13563         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
13564         rules. Fixes #75832.
13565
13566         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
13567         instruction scheduling.
13568
13569 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
13570
13571         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
13572
13573 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
13574
13575         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
13576
13577         * mini-codegen.c: Fix VC build.
13578
13579         * cpu-pentium.md: Increase length of atomic_exhange_i4.
13580
13581 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13582
13583         * mini.h: fix signature for mono_register_opcode_emulation.
13584
13585 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
13586
13587         * mini.c: Get rid of most of the helper_sig_... constants using
13588         mono_create_icall_signature ().
13589
13590 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
13591
13592         * jit-icalls.c (helper_ldstr): New helper function.
13593
13594         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
13595
13596         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
13597         throw, load the string using a helper call instead of creating a string object.
13598
13599         * aot.c: Update after LDSTR changes.
13600
13601         * mini.h: Bump AOT file version.
13602         
13603         * aot.c: Save class size info into the AOT file. Print more statistics during
13604         compilation.
13605
13606         * mini.h: Bump AOT file version.
13607
13608         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
13609         ordering of disasm cases. Fixes #74957.
13610
13611 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
13612
13613         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
13614         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
13615         the generic code needed for the ARM port.
13616
13617 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
13618
13619         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
13620         inssel-arm.brg: more ARM features and fixes.
13621
13622 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
13623
13624         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
13625         ARM port work in progress.
13626
13627 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
13628
13629         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
13630
13631         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
13632
13633         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
13634
13635         * inssel.brg (mini_emit_memset): Add support for unaligned access.
13636
13637         * *-ia64.*: Ongoing IA64 work.
13638         
13639         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
13640
13641 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
13642
13643         * TODO: Remove out-of-data todo stuff.
13644
13645         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
13646         dead code.
13647
13648         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
13649
13650         * mini.h: Bump corlib version.
13651
13652 2005-07-27  Martin Baulig  <martin@ximian.com>
13653
13654         * mini-codegen.c
13655         (create_copy_ins): Added `const unsigned char *ip' argument; set
13656         `copy->cil_code' from it.
13657
13658 2005-07-27  Martin Baulig  <martin@ximian.com>
13659
13660         * mini-exceptions.c (mono_handle_exception): Don't call
13661         mono_debugger_handle_exception() for filters.
13662
13663 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
13664
13665         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
13666         as well.
13667
13668 2005-07-26  Martin Baulig  <martin@ximian.com>
13669
13670         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
13671
13672         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
13673         helper_compile_generic_method() if the method is actually virtual
13674         and non-final.
13675
13676 2005-07-26  Martin Baulig  <martin@ximian.com>
13677
13678         * mini.c
13679         (trampoline_code): Renamed to `mono_trampoline_code' and made it
13680         public; this is now accessed directly by the debugger.
13681         (mono_generic_trampoline_code): Removed.
13682
13683         * debug-mini.c
13684         (mono_debug_init_method): Also add interncalls and wrappers.
13685
13686 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
13687
13688         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
13689
13690 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
13691
13692         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
13693
13694 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
13695
13696         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
13697
13698 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
13699
13700         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
13701         getting TLS offsets on AMD64 too.
13702
13703 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
13704
13705         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
13706
13707 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
13708
13709         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
13710         inssel-arm.brg, mini-arm.h: ARM port work in progress.
13711
13712 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
13713
13714         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
13715
13716         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
13717         to mini.c.
13718
13719         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
13720         mono_sparc_is_virtual_call ().
13721         
13722         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
13723
13724         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
13725         trampoline parameters.
13726
13727         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
13728         
13729         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
13730         to mono_arch_get_vcall_slot_addr.
13731
13732         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
13733         trampoline code.
13734
13735         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
13736
13737 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
13738
13739         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
13740
13741 2005-07-19  Martin Baulig  <martin@ximian.com>
13742
13743         * exceptions-amd64.c (throw_exception): Call
13744         mono_debugger_throw_exception() here like we're doing it on i386.
13745
13746 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
13747
13748         * mini-ia64.c: Add optimized TLS access support.
13749
13750 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
13751
13752         * mini-exceptions.c: Ongoing IA64 work.
13753
13754         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
13755
13756         * mini.c: Use the default optimization set when embedding. Fixes
13757         #75194.
13758
13759 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
13760
13761         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
13762         of trampolines to a separate file.
13763
13764         * mini-trampolines.c: New file.
13765
13766         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
13767         separate file.
13768         
13769         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
13770         amd64/ia64 code.
13771
13772         * mini-codegen.c: Fix cygwin build.
13773
13774 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
13775
13776         * mini.c: Add some minor changes needed by the IA64 port.
13777
13778         * *-ia64.*: Ongoing IA64 work.
13779
13780 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
13781
13782         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
13783         trampolines into arch-independent and arch-dependent parts.
13784
13785         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
13786
13787 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
13788
13789         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
13790
13791         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
13792         the xp-regalloc-branch for amd64.
13793
13794         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
13795         xp-regalloc-branch for x86.
13796
13797 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
13798
13799         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
13800
13801 2005-07-06  Martin Baulig  <martin@ximian.com>
13802
13803         * mini.c
13804         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
13805         (mono_jit_runtime_invoke): Likewise.
13806
13807 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
13808
13809         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
13810         on x86 too.
13811         
13812         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
13813         without loading their metadata. Reorganize the file format so exception handling+
13814         debug info is kept separate from normal method info. Create MonoJitInfo 
13815         structures for methods lazily.
13816
13817         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
13818         loading metadata.
13819         (x86_class_init_trampoline): Patch AOT class init trampolines too.
13820
13821         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
13822
13823         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
13824         in AOT code.
13825
13826         * mini.h: Bump AOT file version.
13827
13828 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
13829
13830         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
13831
13832 2005-07-01  Raja R Harinath  <rharinath@novell.com>
13833
13834         * Makefile.am (check-local): Call semdel-wrapper.
13835
13836 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
13837
13838         * mini-x86.c: Revert the last change as it seems to break the build..
13839
13840 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
13841
13842         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
13843         
13844         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
13845
13846 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
13847
13848         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
13849         outside of the macro, so strange stuff doesn't happen with gcc4
13850         (NEW_AOTCONST_TOKEN): Likewise.
13851
13852 2005-06-28  Martin Baulig  <martin@ximian.com>
13853
13854         * mini.c (mini_class_is_system_array): New static method; use this
13855         instead of `klass->parent == mono_defaults.array_class' everywhere
13856         since this also works for the new generic array class.
13857
13858 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
13859
13860         * inssel.brg: Remove warnings.
13861
13862 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
13863
13864         * mini-ia64.c: Ongoing IA64 work.
13865
13866         * basic-float.cs: Add float->i1 conversion test.
13867
13868         * iltests.il: Add conv.u4 test.
13869
13870 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
13871
13872         * inssel-long.brg: Fix bug caused by last change.
13873
13874 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
13875
13876         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
13877         BSDs.  Allows the x86 JIT to work on OSX86
13878
13879 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
13880
13881         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
13882         u4->i8 conversion.
13883
13884         * mini-ia64.c: Ongoing IA64 work.
13885
13886 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
13887
13888         * mini-ia64.c: Ongoing IA64 work.
13889
13890         * driver.c: Clean up jit_code_hash as well when using --regression.
13891
13892         * inssel-long.brg: Fix long->i4/u4 conversion rules.
13893
13894         * basic-long.cs: Add tests for long->u4 conversion.
13895
13896 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
13897
13898         * mini.c: Take mono_get_domainvar out of macros. This makes sure
13899         that we do not depend on undefined C behavior: the order stuff
13900         gets evaluated within an expression. Fixes mono when compiled on
13901         GCC 4.
13902
13903 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
13904
13905         * *-ia64.*: Ongoing IA64 work.
13906
13907         * aot.c: Lower memory usage while loading AOT methods.
13908
13909         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
13910
13911         * mini.h: Bump AOT file format version.
13912
13913 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
13914
13915         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
13916
13917 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
13918
13919         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
13920         not on callee assembly). Fixed some comments.
13921
13922 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
13923
13924         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
13925         it gets proper disassembly.
13926         (emit_method_info): Remove some dead code.
13927
13928         * mini.c (mini_method_compile): Allways allocate the GOT var in
13929         mono_method_to_ir for emulating opcodes.
13930
13931 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
13932
13933         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
13934         before freeing the code memory. Fixes #74990.
13935
13936         * objects.cs: Add regression test for #74992.
13937
13938         * liveness.c: Extend live ranges of arguments to the beginning of the
13939         method. Fixes #74992.
13940
13941         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
13942         so it points into the faulting instruction.
13943
13944 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
13945
13946         * jit-icalls.c (mono_imul_ovf): Add exception handling.
13947
13948         * *-ia64.*: Ongoing IA64 work.
13949
13950         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
13951
13952 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
13953
13954         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
13955
13956         * *-ia64.*: Ongoing IA64 work.
13957
13958 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
13959
13960         * basic-long.cs: Add tests for add/sub.ovf.
13961
13962         * basic.cs: Add tests for sub.ovf.
13963
13964         * *-ia64.*: Ongoing IA64 work.
13965
13966 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
13967
13968         * *-ia64.*: Ongoing IA64 work.
13969
13970         * basic.cs: Add conv.ovf.i4.un test.
13971
13972 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
13973
13974         * mini.c: (remove_block_if_useless) Fixed bug 75061.
13975         
13976 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13977
13978         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
13979
13980 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
13981
13982         * *-ia64.*: Ongoing IA64 work.
13983
13984 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13985
13986         * trace.[ch]:
13987         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
13988
13989 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
13990
13991         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
13992
13993 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
13994
13995         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
13996
13997         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
13998         of a call is callable by a near call.
13999
14000 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
14001
14002         * mini-ia64.c: Ongoing IA64 work.
14003
14004 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
14005
14006         * genmdesc.c: Make the generated array non-static.
14007
14008         * inssel-long.brg: Fix LSHR_IMM rule.
14009
14010         * *-ia64.*: Ongoing IA64 work.
14011
14012         * *-ia64.*: Ongoing IA64 work.
14013
14014 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
14015
14016         * *-ia64.*: Ongoing IA64 work.
14017
14018         * *-ia64.*: Ongoing IA64 work.
14019         
14020         * mini-ia64.c: Ongoing IA64 work.
14021
14022         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
14023
14024 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
14025
14026         * objects.cs basic-calls.cs: Move some tests to objects.cs.
14027         
14028         * objects.cs basic-long.cs: Move some tests to objects.cs.
14029
14030 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
14031
14032         * *-ia64.*: Ongoing IA64 work.
14033
14034         * iltests.il: Add a new test.
14035
14036         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
14037         newobj. Fixes #75042.
14038
14039 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
14040
14041         * *-ia64.*: Ongoing IA64 work.
14042         
14043         * *-ia64.*: Ongoing IA64 work.
14044         
14045         * *-ia64.*: Ongoing IA64 work.
14046
14047         * basic.cs objects.cs: Move tests accessing static variables as well.
14048
14049         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
14050
14051 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
14052
14053         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
14054
14055         * driver.c: Always print failed tests.
14056
14057         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
14058         frame pointer.
14059
14060         * *ia64*: Ongoing IA64 work.
14061
14062 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
14063
14064         * basic.cs: Add tests for add.ovf. Fix warnings.
14065
14066 2005-05-18  Miguel de Icaza  <miguel@novell.com>
14067
14068         * driver.c (mono_main): Avoid crash if no argument is passed to
14069         --break;  Do not use g_error, but f_printf.   And fix all other
14070         ocurrences of the same crash.
14071
14072 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
14073
14074         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
14075         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
14076         Fixes #74742.
14077
14078 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
14079
14080         * *-ia64.*: Add beginnings of IA64 backend.
14081
14082         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
14083
14084 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
14085
14086         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
14087         Fixes #74925.
14088
14089         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
14090
14091         * mini-amd64.c: Fix a warning.
14092
14093 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
14094
14095         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
14096         in float_neg. Fixes #74897.
14097
14098         * mini-amd64.c (emit_call): Fix another near call bug.
14099
14100 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
14101
14102         * declsec.c: Keep the appdomain information in the structure. Added a 
14103         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
14104         value gets overwritten).
14105         * declsec.h: Set the default MonoArray for the the stack to 6. Added
14106         an MonoAppDomain member to MonoSecurityFrame.
14107         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
14108         used in the stack walk. Now use a MonoArray which grow (double) when
14109         it gets full.
14110
14111 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
14112
14113         * mini.c: Re-enabled runtime cleanup, since running threads should
14114         now properly stop when exiting.
14115
14116 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
14117
14118         * mini-codegen.c: New file contaning the arch-independent local
14119         register allocator. Not used by any architectures yet.
14120
14121         * mini.h linear-scan.c: Merge some changes from the 
14122         mini-xp-local-regalloc branch.
14123
14124 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
14125
14126         * mini-amd64.c (emit_call): Fix calls to native functions when the
14127         runtime is compiled as a shared library. Fixes #74756.
14128
14129         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
14130         on a literal field. Fixes #74751.
14131
14132 2005-04-25  Raja R Harinath  <rharinath@novell.com>
14133
14134         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
14135
14136 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
14137
14138         * objects.cs: Add missing null casting test.
14139
14140 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
14141
14142         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
14143         in wrapper methods. Also rename 'address' variable to 'offset'.
14144
14145 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
14146
14147         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
14148         warnings.
14149         
14150         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
14151
14152         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
14153         work on windows.
14154
14155 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
14156
14157         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
14158
14159 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
14160
14161         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
14162         just the last bytes.
14163
14164 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
14165
14166         * aot.c (mono_compile_assembly): Fix warning.
14167
14168         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
14169         by the _MSC_VER stuff.
14170
14171 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
14172
14173         * inssel-long.brg: Fix #74588.
14174
14175         * cpu-amd64.md: Fix #74591.
14176
14177         * iltests.il: Add new regression tests.
14178
14179 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
14180
14181         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
14182         valuetype.
14183
14184 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
14185
14186         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
14187
14188         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
14189         from Bill Middleton <flashdict@gmail.com>.
14190
14191 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
14192
14193         * arrays.cs: Add new regression test. Fix warnings.
14194
14195 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
14196
14197         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
14198         and leakage in CKFINITE.
14199
14200         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
14201         this to a null op since it is called on amd64 too.
14202
14203         * exceptions-amd64.c (get_throw_trampoline): Align stack.
14204
14205         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
14206         body since this is not used on amd64.
14207         
14208         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
14209
14210         * mini-amd64.c: Remove obsolete fixmes.
14211
14212         * mini.c (print_method_from_ip): Fix debugging support.
14213
14214 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
14215
14216         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
14217         so that expressions that don't give much gain are not reduced.
14218         * ssapre.h: Likewise.
14219
14220 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
14221
14222         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
14223
14224         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
14225
14226         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
14227
14228 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
14229
14230         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
14231
14232         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
14233
14234 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
14235
14236         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
14237         stack touching.
14238
14239         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
14240
14241         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
14242
14243         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
14244
14245         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
14246         MONO_ARCH_USE_SIGACTION. Fixes #74252.
14247
14248         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
14249
14250         * mini-x86.c: Fix up stack overflow handling.   
14251
14252         * exceptions.cs: Add new regression test.
14253
14254 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
14255
14256         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
14257         mono_jit_thread_attach.
14258
14259         * mini.c (mono_method_to_ir): Verify called method is not abstract.
14260
14261 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
14262
14263         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
14264         avoid calling constructors using callvirt.
14265
14266         * inssel.brg: Fix #74073.
14267
14268 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
14269
14270         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
14271         compilation with non-GCC compilers.
14272         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
14273         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
14274
14275 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
14276
14277         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
14278         klass->interface_offsets (will likely fix bug#74073).
14279
14280 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
14281
14282         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
14283
14284 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
14285
14286         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
14287         to amd64_div_reg_size ().
14288         
14289         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
14290
14291 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
14292
14293         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
14294
14295 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
14296
14297         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
14298
14299 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
14300
14301         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
14302         
14303         * mini.c (mono_precompile_assembly): Load and precompile referenced
14304         assemblies as well. Fixes #74015.
14305
14306 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
14307
14308         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
14309
14310 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
14311
14312         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
14313         a lot of checks and (anyway) permissions cannot work until corlib is 
14314         loaded.
14315
14316 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
14317
14318         * mini-ppc.c: fixed ABI issue on sysv/ppc.
14319
14320 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
14321
14322         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
14323         calls (fixes bug#72824).
14324
14325 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
14326
14327         * mini.c: fix tail recursion elimination (see test in bug#73936).
14328
14329 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
14330
14331         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
14332         some fp functions in sse2 mode.
14333
14334 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
14335
14336         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
14337
14338 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
14339
14340         * mini.h mini.c: Add mono_get_jit_tls_key ().
14341
14342         * mini-x86.c: Enable fast TLS support on windows.
14343
14344 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
14345
14346         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
14347         * mini.c: Check for p/invoke method when generating code. If a
14348         p/invoke method, or it's class, isn't decorated with [Suppress
14349         UnmanagedCodeSecurity] then generate code to call System.Security.
14350         UnmanagedDemand (only if the security manager is active).
14351
14352 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
14353
14354         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
14355         last change as it seems to cause strange crashes.
14356         
14357 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
14358
14359         * *.c: handle unsafe function pointers where needed.
14360
14361 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
14362
14363         * mini.c (mono_jit_free_method): Remove the fixme too.
14364
14365 2005-03-15  Miguel de Icaza  <miguel@novell.com>
14366
14367         * mini.c: As discussed, make the code actually free the delegate
14368         thunk now, to enable the debugging of delegate problems, use
14369         MONO_DEBUG=1 when running Mono. 
14370
14371         This takes also care of parts of the leaks as seen by Joe.
14372
14373 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
14374
14375         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
14376         thread_tls_offset calculation.
14377
14378 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
14379
14380         * declsec.c: Reworked linkdemand checks for icall. The previous code
14381         was using the declaration code (untrusted) and didn't work as expected
14382         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
14383         specific case.
14384
14385 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
14386
14387         * iltests.il: Add new localloc test.
14388
14389         * mini-amd64.c: Handle large stack allocations the same way as on
14390         windows if stack overflow handling is working.
14391         
14392         * mini-amd64.c: Allocate the signal stack using mmap.
14393
14394         * mini.c (sigsegv_signal_handler): Fix reading of context.
14395
14396         * mini-exceptions.c: Fix up stack overflow handling.
14397
14398         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
14399
14400         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
14401
14402         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
14403
14404         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
14405
14406         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
14407         tramp_init functions as they are no longer needed.
14408
14409 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
14410
14411         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
14412         
14413         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
14414
14415         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
14416         
14417         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
14418         support that now.
14419
14420         * mini-ops.h: Add OP_LMUL_IMM.
14421
14422         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
14423         long mul/div opcodes as intrinsic.
14424
14425         * mini-amd64.c (emit_call): Handle the case when the callee might be
14426         an AOT method.
14427
14428 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
14429
14430         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
14431         extra safe.
14432         
14433         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
14434
14435         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
14436
14437 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
14438
14439         * mini.c (mono_codegen): Don't leak here, to help people running
14440         monogrind.
14441
14442 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
14443
14444         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
14445         conversions in sse2 mode.
14446
14447         * basic-float.cs: Add regression test.
14448         
14449         * mini-amd64.c: Reenable sse2.
14450
14451 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
14452
14453         * mini-amd64.c: Disable sse2 until some regressions are fixed.
14454
14455 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
14456
14457         * driver.c: Copyright text should include 2005.
14458         
14459 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
14460
14461         * cpu-amd64.md (load_membase): Fix more max lengths.
14462
14463 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
14464
14465         * cpu-amd64.md (load_membase): Fix max length.
14466
14467         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
14468
14469         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
14470
14471         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
14472         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
14473
14474         * basic-float.cs: Add rounding regression test.
14475
14476         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
14477
14478 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
14479
14480         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
14481         structures in registers for pinvoke wrappers.
14482
14483 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
14484
14485         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
14486
14487 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
14488
14489         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
14490         wrapper to mono_jit_thread_attach.
14491
14492         * mini.c (mini_jit_thread_attach): New jit icall.
14493
14494         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
14495         native->managed wrappers.
14496
14497         * exceptions.cs: Add new regression test.
14498
14499         * mini.c (optimize_branches): Check regions in the cbranch to throw
14500         block case as well. Fixes #73242.
14501
14502 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
14503
14504         * mini.c: thread safety fixes.
14505
14506 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
14507
14508         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
14509         patching stuff, since delegates use jump trampolines so there is
14510         no caller.
14511
14512         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
14513         jump trampolines.
14514         
14515         * tramp-amd64.c: Fix build.
14516
14517         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
14518         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
14519
14520         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
14521         Rename this to mono_arch....
14522         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
14523
14524         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
14525
14526         * mini-amd64.c (emit_call): If both the caller and the callee is
14527         guaranteed to have 32 bit addresses, emit a normal call.
14528
14529         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
14530
14531         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
14532         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
14533         method_ptr inside delegates.
14534
14535 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
14536
14537         * mini.c (mono_jit_free_method): Free the method info even if the native code is
14538         invalidated. Fixes #73001.
14539
14540         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
14541
14542         * mini-x86.c: Only use stdcall for pinvokes on windows.
14543
14544 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
14545
14546         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
14547         * mini-x86.c: remove unreliable __thread var offset detection,
14548         use the correct accessors and enable by default.
14549
14550 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
14551
14552         * mini.c (mono_jit_free_method): Fix memory leak.
14553
14554 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
14555
14556         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
14557
14558 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
14559
14560         * cpu-amd64.md: Fix lengths of atomic opcodes.
14561
14562 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
14563
14564         * driver.c: try to not imply using ICU is any good.
14565
14566 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
14567
14568         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
14569         functions as inline ops.
14570
14571         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
14572         some Interlocked functions as inline ops.
14573
14574         * mini.c (move_basic_block_to_end): Fix bug in last patch.
14575
14576         * mini.h (MonoBasicBlock): Reorganize fields a bit.
14577
14578         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
14579
14580         * mini.c: Add support for OP_NOT_TAKEN.
14581
14582         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
14583         structures in registers for pinvoke wrappers.
14584
14585         * mini-amd64.c: Fix warnings.
14586
14587 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
14588
14589         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
14590
14591         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
14592
14593         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
14594         address instead of loading the address from it.
14595
14596         * mini-x86.c: Add support for returning small structs in registers
14597         on Win32. Fixes part of #70864.
14598         
14599 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
14600
14601         * trace.c (get_token): Improve error checking.
14602
14603 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
14604
14605         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
14606
14607 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
14608  
14609         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
14610         it can be reused for MonoClass.
14611         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
14612         _LINKDEMAND.
14613
14614 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
14615
14616         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
14617         instead of a MonoReflectionMethod. The method information wasn't used
14618         when displaying SecurityException details (but will be now).
14619
14620 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
14621
14622         * Makefile.am : windows build fix.
14623
14624 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
14625
14626         * iltests.il: Add new regression test.
14627
14628         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
14629         #72522.
14630
14631 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
14632  
14633         * mini.c: Moved linkdemand check into helper function check_linkdemand
14634         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
14635         LDFTN, LDVIRTFTN).
14636
14637 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
14638
14639         * declsec.c: Added statistics counter for different kinds of 
14640         LinkDemands.
14641         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
14642         (and commented) declaration.
14643         * mini.c: Added statistics counter for security Demand code 
14644         generation. Added display of security statistics.
14645
14646 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
14647
14648         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
14649         Fix compilation errors under gcc-2.95.
14650
14651 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
14652
14653         * mini.c, driver.c: Use the new jit trampoline hashtable
14654
14655 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
14656
14657         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
14658
14659 2005-02-11  Martin Baulig  <martin@ximian.com>
14660
14661         * debug-mini.c (mono_debug_close_method): Free the line number array.
14662
14663 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
14664
14665         * aot.c: Break up large methods into smaller ones. Share GOT slots for
14666         icalls.
14667
14668         * mini.h: Bump AOT file format version. 
14669
14670 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
14671
14672         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
14673         APTC and P/Invoke.
14674         * declsec.h: Added macros to get/set lazyly initialized security 
14675         informations about assemblies. Added new enum for different type of
14676         possible LinkDemand violation. Added function to check LinkDemands.
14677         * mini.h: Added a field to MonoCompile to hold any security violation
14678         detected when JITting a method (so it can be thrown later).
14679         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
14680         and CEE_CALLVIRT. Added code to throw exception at the end of
14681         mini_method_compile (note: the exception is unhandled right now).
14682
14683 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
14684
14685         * mini.c, jit-icalls.c: use the managed implementation of
14686         memset for initobj and memset, to avoid managed <-> unmanaged
14687         transitions.
14688
14689 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
14690
14691         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
14692         optimization if it would need a GOT var.
14693
14694         * basic.cs: Add tests for constant propagation and switch statements.
14695
14696         * ssa.c: Fix out-of-range constant propagation and switch statements.
14697
14698 2005-02-09    <vargaz@freemail.hu>
14699
14700         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
14701
14702 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
14703
14704         * cpu-amd64.md (load_membase): Fix max length of load_membase.
14705
14706 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
14707
14708         * mini.c: update to new signature of mono_class_get_allocation_ftn().
14709
14710 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
14711
14712         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
14713         arithmetic operations.
14714
14715 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
14716
14717         * mini-ppc.c: add a workaround for broken user code that
14718         DllImports vararg functions with non-vararg signatures.
14719
14720 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
14721
14722         * mini.c (mono_jit_compile_method_inner): Add detection and a 
14723         meaningfull error message for assemblies written in Managed C++.
14724
14725         * tramp-amd64.c mini-amd64.h: Add support for 
14726         create_trampoline_from_token ().
14727
14728         * aot.c mini-x86.c abcremoval.c: Applied patch from
14729         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
14730
14731 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
14732
14733         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
14734         which takes a MonoImage/token as parameter instead of a MonoMethod.
14735
14736         * aot.c: Use the new trampoline for initializing vtables.
14737
14738         * aot.c: Add support for ldfld/stfld_remote wrappers.
14739
14740         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
14741         rules for compare <MEM>, IMM.
14742
14743         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
14744
14745         * aot.c: Handle inherited finalizers correctly.
14746
14747 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
14748
14749         * inssel.brg (stmt): Add a missing _setup_... ().
14750
14751         * aot.c: Save some parts of the class state to the AOT file and use it
14752         to recompute that state when a class is initialized.
14753
14754         * mini.c: Install AOT hooks into the runtime.
14755
14756         * mini.h: Bump AOT file format version.
14757         
14758         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
14759         Fixes #72148.
14760
14761         * iltests.il: Add new test.
14762
14763 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
14764
14765         * mini.c: fix typo.
14766
14767 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
14768
14769         * mini.c: setup the statistical profiler in the thread attach
14770         callback to cope with the new single thread code.
14771
14772 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
14773
14774         * mini-ppc.c: ensure we have enough room for the profiler
14775         calls (fixed bug#72084).
14776
14777 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
14778
14779         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
14780         it.
14781
14782 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
14783
14784         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
14785
14786 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
14787
14788         * ssapre.c: Fixed an issue with down safety (this allows IronPython
14789         to succesfully execute parrotbench).
14790         * ssapre.h: Likewise.
14791
14792 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
14793
14794         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
14795         variable for stores to method arguments (fixes a SSAPRE issue).
14796
14797 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
14798
14799         * mini.c: handle value types in dup, fixes gen-112.cs.
14800
14801 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
14802
14803         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
14804         sequence for calls in dynamic methods to avoid thunks.
14805
14806 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
14807
14808         * mini.c: correctly remove dynamic methods from the hashtable.
14809
14810 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
14811
14812         * driver.c: Disabled SSAPRE until fix the bug that appears
14813         in IronPython's parrotbench.
14814
14815 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
14816
14817         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
14818
14819         * mini.c (mono_method_to_ir): Revert the previous change.
14820         
14821         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
14822         when AOT compiling.
14823
14824         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
14825         mono_jit_info_table_find () etc. when running under valgrind.
14826
14827         * inssel.brg: Fix warnings.
14828
14829         * mini-exceptions.c: Fix warnings.
14830
14831 2005-01-31  Martin Baulig  <martin@ximian.com>
14832
14833         * driver.c (compile_all_methods_thread_main): Don't try to compile
14834         generic methods or anything which has type parameters.
14835
14836 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
14837
14838         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
14839
14840         * TestDriver.cs: Add --verbose flags.
14841
14842         * graph.c ssa.c: Fix 64 bit warnings.
14843         
14844         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
14845         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
14846         Fix 64 bit warnings.
14847
14848         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
14849         variable not spotted by gcc.
14850         
14851         * mini-amd64.c inssel-amd64.brg: Applied patch from  
14852         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
14853         X86_COMPARE_MEMBASE opcodes.
14854
14855         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
14856
14857 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
14858
14859         * *: MonoMethod->signature might be NULL now. You *MUST* use
14860         mono_method_signature.
14861
14862 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
14863
14864         * driver.c (compile_all_methods_thread_main): Compile the methods
14865         without invoking cctors.
14866
14867 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
14868
14869         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
14870         * basic-calls.cs: test for the above.
14871
14872 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
14873
14874         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
14875         MonoJitInfo changes.
14876
14877 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
14878
14879         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
14880         eagerly if it contains dynamic methods.
14881         
14882         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
14883
14884         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
14885         trace, it is now computed by an icall from trace_ips.
14886         
14887         * mini-exceptions.c: Fix a warning.
14888
14889 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
14890
14891         * mini-exceptions.c: don't bother getting stack trace info if
14892         it's not going to be used.
14893
14894 2005-01-27  Raja R Harinath  <rharinath@novell.com>
14895
14896         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
14897         ssapre-mini-ops.h.
14898
14899 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
14900
14901         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
14902
14903         * aot.c: Avoid calling mono_method_get_header () if not needed.
14904
14905         * mini.h: Bump AOT file format version.
14906         
14907         * mini.c (mono_emit_native_call): Allocate a GOT var here.
14908
14909         * mini.c (mono_print_tree): Print more info for calls.
14910
14911 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
14912
14913         * declsec.h: Remove warning by adding missing include for marshal.h
14914
14915 2005-01-26  Martin Baulig  <martin@ximian.com>
14916
14917         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
14918         `ip' twice.
14919
14920 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
14921
14922         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
14923         flags.
14924
14925         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
14926
14927         * aot.c (mono_compile_assembly): Fix a warning.
14928
14929 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
14930
14931         * declsec.c: Look for security attributes on the original MonoMethod 
14932         (and not the wrapped one). This fix permissions on icalls.
14933
14934 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
14935
14936         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
14937
14938         * mini.c (mono_allocate_stack_slots): Add a fixme.
14939
14940         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
14941
14942 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
14943
14944         * inssel.brg: optimize casts of sealed types (more
14945         optimizations waiting for fixes in remoting).
14946
14947 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
14948
14949         * inssel.brg (stmt): Add another dummy rule.
14950
14951         * driver.c: Fix warnings.
14952
14953         * driver.c (mono_main): If running under valgrind, instruct glib to use
14954         the system allocation functions so valgrind can track the memory
14955         allocated by the g_... functions.
14956
14957         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
14958
14959         * mini-ops.h: Add OP_DUMMY_STORE opcode.
14960
14961         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
14962
14963         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
14964         variables in try regions.
14965
14966         * mini.c (mini_method_compile): Don't disable optimizations on large
14967         methods when AOT compiling.
14968
14969         * mini.c (mono_allocate_stack_slots): New arch independent method to 
14970         allocate stack slots. Not yet used.
14971
14972 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
14973
14974         * debug-mini.c (mono_debug_close_method): Plug some leaks.
14975
14976 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
14977
14978         * mini-ppc.c: make the branch info relative as the code
14979         buffer can be reallocated.
14980
14981 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
14982
14983         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
14984         * driver.c: Removed the AOT/security restriction. Now initialize the
14985         security manager (in metadata) if --security is used.
14986         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
14987         rather than the pointer to declarative security, when AOT is used.
14988
14989 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
14990
14991         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
14992         basic blocks, reduced intrinsic exception throwing code size.
14993
14994 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
14995
14996         * driver.c (mini_usage): Reorder the usage screen.
14997
14998 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
14999
15000         * mini.c (mono_resolve_patch_target): Fix warning.
15001
15002 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
15003
15004         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
15005         previous patch.
15006
15007         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
15008
15009         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
15010         breaks the amd64 build.
15011
15012         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
15013         register allocation. Fixes #71454.
15014
15015         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
15016
15017         * arrays.cs: Add new regression test.   
15018
15019 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
15020
15021         * ssapre.c: Turned usage of snprintf to GString.
15022         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
15023         (I left it on by mistake in my previous commit).
15024
15025 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
15026
15027         * mini.c, cfold.c, basic-calls.cs: preserve side effects
15028         on cond branch optimization (fixes bug# 71515).
15029
15030 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
15031
15032         * abcremoval.c: Fixed bug 71062.
15033         * abcremoval.h: Likewise.
15034
15035 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
15036
15037         * mini.c: Added a new functionality to optimize_branches, the removal
15038         of useless basic blocks, and fixed some problem in the removal of
15039         critical edges; some utility functions added for both purposes.
15040         * ssapre.c: Added complex expression support, and fixed bug 70637.
15041         * ssapre.h: Likewise.
15042         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
15043         enabled in SSAPRE.
15044         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
15045         * driver.c: Re-enabled SSAPRE.
15046
15047 2005-01-19  Martin Baulig  <martin@ximian.com>
15048
15049         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
15050         the result of mono_get_method_constrained().
15051
15052 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
15053
15054         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
15055         manager.
15056
15057 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
15058
15059         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
15060         be detected.  Fixes #59296.
15061
15062 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
15063
15064         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
15065         which can happen. Fixes #71361.
15066
15067 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
15068
15069         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
15070         manager.
15071
15072 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
15073
15074         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
15075         appdomain-unload.exe to fail.
15076         
15077         * mini.c: Fix some memory leaks.
15078
15079 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
15080
15081         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
15082         Fixed bug and sped up some codepaths.
15083
15084 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
15085
15086         * mini.c: Fix some memory leaks.
15087
15088         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
15089         conversion.
15090
15091         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
15092
15093         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
15094         #71320.
15095
15096         * iltests.il: Add regression test for #71320.
15097
15098 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
15099
15100         * mini.c (mono_codegen): Fix installation of profiler hooks.
15101
15102         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
15103
15104 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
15105
15106         * mini.h, mini.c, cfold.c: optimize access to enum
15107         readonly fields, too. Eval conditional branches if possible
15108         to perform unreachable code removal in more cases.
15109
15110 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
15111
15112         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
15113
15114         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
15115         code manager.
15116
15117         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
15118         WinXP DEP. Fixes #71244.
15119
15120 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
15121
15122         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
15123
15124 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
15125
15126         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
15127
15128 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
15129
15130         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
15131         changes.
15132
15133         * mini.h: Bump AOT version.
15134
15135         * mini.h (MonoCompile): Change exvar to a hash table.
15136
15137         * mini.c: Allocate a separate exvar for each handler block.
15138
15139         * mini.c: Get rid of the computation of filter_lengths, its not needed.
15140
15141         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
15142         ex var with the pending exception and only throw if the two are equal.
15143         Fixes #68552.
15144         
15145         * exceptions.cs: Add tests for rethrow and nested catch clauses.
15146
15147         * mini-x86.c: Fix warnings.
15148
15149         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
15150         used by all the ports now.
15151
15152         * aot.c: Add write-symbols and save-temps options.
15153
15154 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
15155
15156         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
15157
15158 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
15159
15160         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
15161         operations.
15162
15163         * tramp-s390.c: Check vtable slot belongs to the domain.
15164
15165         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
15166         as per other platforms.
15167
15168         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
15169
15170 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
15171
15172         * driver.c: we don't run the Main() code in a subthread anymore.
15173
15174 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
15175
15176         * mini.c: added experimental rtc support in the statistical
15177         profiler: if the user has the permission, more accurate statistics
15178         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
15179         The MONO_RTC value must be restricted to what the linux rtc allows:
15180         power of two from 64 to 8192 Hz.
15181
15182 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
15183
15184         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
15185
15186 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
15187
15188         * mini-ppc.c: better icache flush for smp.
15189
15190 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
15191
15192         * mini-amd64.c (emit_move_return_value): Fix memory leak.
15193
15194         * mini-x86.c (get_call_info): Add the get_call_info () code from the
15195         amd64 port, not yet used.
15196
15197 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
15198
15199         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
15200         a struct type.
15201
15202 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
15203
15204         * driver.c: Added --security option to activate the security manager.
15205         Right now this will allow code generation for declarative demands and
15206         is disabled when AOT is specified.
15207         * mini.c: Add code generation for declarative security demands.
15208         * mini.h: Add mono_use_security_manager as an extern gboolean.
15209
15210 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
15211
15212         * aot.c (mono_compile_assembly): Speed up compilation a bit by
15213         emitting more dense assembly code.
15214
15215         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
15216         exception throwing stuff.
15217
15218 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
15219
15220         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
15221         dead code.
15222
15223         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
15224         left in by mistake.
15225
15226         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
15227         fixed.
15228
15229         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
15230
15231         * tramp-*.c: Only patch vtable slots if the object is in the current
15232         domain. Fixes appdomain-unload.exe.
15233
15234         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
15235         
15236         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
15237         x86 branch.
15238
15239 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
15240
15241         * mini.c (reverse_branch_op): New helper function.
15242
15243         * mini.c (optimize_branches): Run the new optimization only on 
15244         platforms which support it. Also reverse all kinds of branches.
15245
15246         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
15247
15248         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
15249         a throw statement.
15250
15251         * mini.c (optimize_branches): Reverse not-equals branches if the false
15252         bblock is a throw. This happens a lot of time with argument checking in
15253         corlib.
15254
15255         * mini.c (mono_codegen): Add support for placing basic blocks after
15256         the function epilogue.
15257
15258         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
15259         function epilogue.
15260         
15261 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
15262
15263         * mini.c (setup_stat_profiler): Only set this up if the platform
15264         supports ITIMER_PROF.
15265
15266 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
15267
15268         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
15269         previous patch.
15270
15271         * inssel.brg: Fix a warning.
15272
15273 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
15274
15275         * mini.c: added support for statistical profiler 
15276         (run with: --profile=default:stat).
15277
15278 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
15279
15280         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
15281
15282         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
15283
15284         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
15285         related to global registers from the amd64 port.
15286
15287 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
15288
15289         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
15290
15291         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
15292         with global registers.
15293         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
15294
15295         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
15296
15297 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
15298
15299         * debug-mini.c (encode_value): Fix off-by-one.
15300
15301         * aot.c (encode_value): Likewise.
15302
15303         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
15304
15305 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
15306
15307         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
15308         AOT.
15309
15310         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
15311         
15312         * aot.c (emit_method_info): Increase size of temp buffer.
15313
15314         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
15315         the AOT case.
15316
15317 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
15318
15319         * aot.c (emit_method_info): Fix build.
15320         
15321         * aot.c: Further rework of the AOT file format to reduce the size of
15322         the method info data.
15323
15324         * mini.h: Bump AOT file format version.
15325
15326 2004-12-27  Martin Baulig  <martin@ximian.com>
15327
15328         * mini.c (mini_get_method): New static method; call
15329         mono_get_method_full() and mono_get_inflated_method().
15330         (mono_method_to_ir): Use mini_get_method() instead of
15331         mono_get_method_full(). 
15332
15333 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
15334
15335         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
15336
15337 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
15338
15339         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
15340
15341         * inssel-amd64.brg: Add some optimization rules.
15342
15343 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
15344
15345         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
15346         standard not GC'd stuff is fine.
15347
15348 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
15349
15350         * aot.c: Rework the AOT file format to get rid of most of the global
15351         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
15352
15353         * mini.h: Bump AOT file format version.
15354         
15355 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
15356
15357         * mini.h: Bump AOT file format version.
15358
15359         * aot.c (mono_aot_is_got_entry): New function to determine if an 
15360         address is inside a GOT.
15361
15362         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
15363
15364         * cpu-pentium.md: Increase the maximum size of some instructions which
15365         might involve a got access.
15366         
15367         * mini.c (get_method_from_ip): Another debug helper function.
15368
15369         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
15370         when got var accesses are created during the decompose phase.
15371
15372         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
15373
15374         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
15375         argument mini_compile_method and to MonoCompile, and use this to
15376         determine whenever a given method is compiled for AOT. This allows the
15377         other methods compiled during AOT compilation to be free of AOT stuff,
15378         so the backends does not need to add special support for them by
15379         creating a fake GOT etc.
15380
15381         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
15382         longer needed.
15383
15384 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
15385
15386         * mini.c (mono_method_to_ir): It turns out that some of the
15387         x-appdomain wrappers are lax with types, so just ignore this for
15388         all wrappers.
15389
15390         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
15391         at the vtable->klass. If it is non-shared code we can just use the
15392         vtable.
15393
15394 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
15395
15396         * mini-ppc.c: access MonoDomain from tls, too.
15397
15398 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
15399
15400         * declsec.c: Removed unused variable (and related warning ;-)
15401
15402 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
15403
15404         * iltests.il: New test for LDELEMA on an array of ref types.
15405
15406         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
15407         all ldelema's on reftypes.
15408         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
15409         it was the wrong place to put it.
15410
15411         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
15412         register to pop to make this cleaner, at the request of Paolo.
15413
15414 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
15415
15416         * mini-ops.h (OP_GETHASHCODE): New op.
15417
15418         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
15419
15420         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
15421         operation.
15422
15423         For a microbenchmark, this reduces the cost of Hashtable.get_Item
15424         by 25%.
15425         
15426         * mini-x86.c (mono_arch_output_basic_block): Rather than
15427
15428         add ebp, 4
15429
15430         Emit
15431
15432         pop edx
15433
15434         The first is 3 bytes while the second is 1. This saves 36 kb on
15435         mscorlib, quite a big saving. When bootstraping mcs, I was able to
15436         see a small boost because of icache locality.
15437
15438         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
15439
15440 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
15441
15442         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
15443         started code sharing with the generic code.
15444
15445 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
15446
15447         * mini-ppc.c, cpu-g4.md: added code for direct access to
15448         tls data slots.
15449
15450 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
15451
15452         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
15453          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
15454         to OP_TLS_GET.
15455
15456 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
15457
15458         * declsec.c|h: Added functions to cache the declarative stack modifiers
15459         in MonoJitInfo and to create a security frame from a MonoJitInfo 
15460         structure.
15461         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
15462         created. Register internal calls for System.Security.SecurityFrame::
15463         _GetSecurityFrame and _GetSecurityStack.
15464         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
15465         the definitions for the new stack walk/callback mechanism.
15466         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
15467         first security frame for LinkDemands and InheritanceDemands) and
15468         GetSecurityStack for Demands. Both use the new mono_walk_stack code
15469         from lupus.
15470         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
15471         walk initialization (lupus).
15472
15473 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
15474
15475         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
15476         idiom.
15477         (handle_loaded_temps): Do not create a temporary variable for
15478         things that we know are temps. They will never be modified.
15479         (mono_spill_call): Set MONO_INST_IS_TEMP
15480         (mono_emulate_opcode): ditto
15481         (emit_tree): ditto
15482         (mono_method_to_ir.CEE_DUP): ditto
15483
15484 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
15485
15486         * mini.c (type_to_eval_stack_type): Make this handle the void type
15487         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
15488         (emit_tree): use ip_in_bb to special case some common idioms
15489         Update all callers to pass in the IP.
15490         (mono_method_to_ir): Make CEE_CALL* do the above as well.
15491
15492         This gives us a nice 2% speedup in mcs bootstrap.
15493
15494         * mini-x86.c (peephole_pass): Peephole pass to make
15495         mov  [foo], eax
15496         push [foo]
15497
15498         into
15499
15500         mov [foo], eax
15501         push eax
15502
15503         * mini.c (ip_in_bb): new method.
15504         (mono_method_to_ir): use this method rather than doing the hash
15505         lookup ourselves.
15506
15507         * linear-scan.c (mono_linear_scan): When expiring actives, you
15508         don't need to keep around variables that expire on this
15509         instruction. This makes it so that:
15510              a = b + 1
15511         will turn into:
15512              store (ebx add (ebx, 1))
15513         which will become
15514              add ebx, 1
15515
15516 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
15517
15518         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
15519         combination to avoid doing two copies. Fix up problems with previous
15520         patch.
15521
15522         * mini.c: Fix 64 bit warnings.
15523
15524         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
15525
15526 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
15527
15528         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
15529         changes from the x86 code.
15530
15531         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
15532
15533 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
15534
15535         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
15536         throwing code to reduce its size, unify the AOT and non-aot code and 
15537         get rid of relocations in the AOT case.
15538
15539         * mini-x86.h mini.c exceptions-x86.c 
15540         (mono_arch_get_throw_corlib_exception): New arch specific function to 
15541         raise corlib exceptions which doesn't require relocations in the 
15542         caller.
15543
15544         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
15545
15546 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
15547
15548         * mini.c (mono_emit_method_call): Only allocate the got var when it is
15549         needed.
15550
15551         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
15552         in the AOT case.
15553
15554 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
15555
15556         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
15557         with add function when used from Inc/dec atomic 
15558         functions. Re-enabled optimization on x86.
15559         * mini-ops.h: renamed atomic_add functions to
15560         allow _add to match the Interlocked::Add and
15561         _add_next to match Interlocked::Inc/Dec.
15562
15563 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
15564
15565         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
15566         linking of BBs to the end BB, and enabled SSAPRE also with
15567         consprop and copyprop (which was prevented by that bug).
15568
15569 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
15570
15571         * mini-x86.c: disabling the Interlocked optimizing code. 
15572
15573 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
15574
15575         * aot.c (load_aot_module): Move reading of got_addr after the AOT
15576         file version check.
15577         
15578 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
15579
15580         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
15581         interlocked optimization due lack of support on x86, rewrote 
15582         exchange to take into account that base may be in eax.
15583         
15584         xsp works again; activated Interlocked optimizing code.
15585         
15586 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
15587
15588         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
15589
15590 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
15591
15592         * mini-ops.h: Add new opcodes.
15593
15594         * mini.h: Add new patch types. Add got_var to MonoCompile.
15595
15596         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
15597         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
15598         make it work with all kinds of patchable code.
15599
15600         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
15601         address of the GOT, and referencing entries in the GOT.
15602
15603         * mini.c: Add code to load the GOT address if needed by an opcode.
15604
15605         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
15606         independent AOT code on the x86 using an elf-style Global Offset Table.
15607
15608 2004-12-14  Raja R Harinath  <rharinath@novell.com>
15609
15610         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
15611
15612 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15613
15614         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
15615         when running xsp.
15616
15617 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
15618
15619         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
15620         of Interlocked:Increment/Decrement/Add as inline ops.
15621         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
15622
15623 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
15624
15625         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
15626         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
15627
15628 2004-12-12  Duncan Mak  <duncan@ximian.com>
15629
15630         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
15631         again. `patch_info->table_size' is no longer valid after Zoltan's
15632         commit #37636.
15633
15634 2004-12-12  Martin Baulig  <martin@ximian.com>
15635
15636         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
15637         if we are the "real" method, ie. not an inlined method inside it.
15638
15639 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
15640
15641         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
15642         before we look in the special fields table. This fixes
15643         ../tests/thread-static-init.cs.
15644
15645 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15646
15647         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
15648         for Array get_Rank and get_Length. Fixes bug #70465.
15649
15650 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
15651
15652         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
15653         separate structure to reduce the size of MonoJumpInfo.
15654
15655 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
15656
15657         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
15658
15659 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
15660
15661         * mini.c (mini_get_inst_for_method): Changed to allow ports
15662         to return a MonoInst instead of opcode 
15663         (renamed mini_get_opcode_for_method to better reflect the new functionality)
15664         
15665         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
15666         Allow ports to return a created MonoInst instead of op-code, will enable
15667         new optimizations.
15668         (renamed mini_get_opcode_for_method to better reflected the functionality)
15669
15670 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
15671
15672         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
15673
15674 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
15675
15676         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
15677         Fixes #69985.
15678
15679 2004-12-08  Martin Baulig  <martin@ximian.com>
15680
15681         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
15682         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
15683
15684 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
15685
15686         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
15687         correctly.
15688
15689         * exceptions.cs: Disable some tests which depend on properties of x86 fp
15690         arithmetic.
15691
15692 2004-12-08  Raja R Harinath  <rharinath@novell.com>
15693
15694         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
15695
15696 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
15697
15698         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
15699         bug introduced by the previous patch.
15700
15701 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
15702
15703         * mini-ppc.c, objectc.cs: handle large structs passed by value
15704         (fixes bug #69972).
15705
15706 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
15707
15708         * mini-ppc.c: OP_ARGLIST implementation from
15709         Geoff Norton  <gnorton@customerdna.com>.
15710
15711 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
15712
15713         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
15714         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
15715
15716 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
15717
15718         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
15719
15720 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15721
15722         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
15723         support.
15724
15725 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
15726
15727         * mini-sparc.c: Zero out localled-ed memory.
15728
15729         * iltests.il: Add tests for zeroing out localloc-ed memory.
15730
15731 2004-12-04  Martin Baulig  <martin@ximian.com>
15732
15733         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
15734         mono_method_get_signature_full().       
15735
15736 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
15737
15738         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
15739         and some utility functions (always for SSAPRE), integrated SSAPRE.
15740         * mini.h: Likewise.
15741         * driver.c: Added ssapre option.
15742         * ssa.c: Small fix on OP_ARG handling.
15743         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
15744         * Makefile.am: Likewise.
15745
15746 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
15747
15748         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
15749         now in the xp code.
15750
15751         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
15752         icall.
15753
15754 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15755
15756         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
15757         
15758         * cpu-s390.md : Increase instruction length of oparglist.
15759
15760         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
15761
15762 2004-11-30  Martin Baulig  <martin@ximian.com>
15763
15764         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
15765         virtual generic methods.  We call a special helper_compile_generic_method()
15766         icall to retrieve the method from the vtable, inflate and compile
15767         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
15768
15769         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
15770
15771 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
15772
15773         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
15774
15775 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
15776
15777         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
15778         Fixes #69929.
15779
15780 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
15781
15782         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
15783         platforms with PIC aot.
15784
15785 2004-11-28  Martin Baulig  <martin@ximian.com>
15786
15787         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
15788         Fixes gen-112.cs.
15789
15790 2004-11-28  Martin Baulig  <martin@ximian.com>
15791
15792         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
15793         the result of mono_type_get_underlying_type() to check whether
15794         we're byref.
15795
15796 2004-11-26  Martin Baulig  <martin@ximian.com>
15797
15798         * mini.c
15799         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
15800         in the g_assert().
15801
15802 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
15803
15804         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
15805         the same way as the other arguments so they won't get clobbered.
15806
15807         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
15808         calls through R11 since it is clobbered by the trampoline code.
15809
15810 2004-11-26  Raja R Harinath  <rharinath@novell.com>
15811
15812         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
15813         pick up in-tree mscorlib.dll.
15814
15815 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
15816
15817         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
15818
15819         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
15820         runtime data/code are now stored in a table similar to the GOT in ELF. 
15821         This allows the code itself to be position independent.
15822
15823         * aot.c: Fix loading of referenced assemblies after the lazy assembly
15824         loading changes.
15825
15826         * aot.c: Attach ELF type (object/function) directives to all global
15827         symbols.
15828
15829         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
15830
15831         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
15832
15833         * mini-amd64.h: Turn on PIC AOT code.
15834
15835         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
15836         returning the offset within an OP_AOTCONST instruction where the GOT
15837         offset needs to be added.
15838
15839         * mini.h: Bump AOT file format version.
15840
15841 2004-11-25  Martin Baulig  <martin@ximian.com>
15842
15843         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
15844         uninflated generic methods.
15845
15846 2004-11-25  Martin Baulig  <martin@ximian.com>
15847
15848         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
15849
15850 2004-11-24  Martin Baulig  <martin@ximian.com>
15851
15852         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
15853         original klass (this only applies for generic instances).
15854
15855 2004-11-24  Martin Baulig  <martin@ximian.com>
15856
15857         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
15858         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
15859         that array).
15860
15861 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
15862
15863         * mini.c (mono_method_to_ir): Disable inlining for methods containing
15864         localloc. Fixes #69678.
15865
15866         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
15867         
15868 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
15869
15870         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
15871         used SSE registers on pinvoke calls. Fixes #69774.
15872
15873 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
15874
15875         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
15876         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
15877
15878 2004-11-23  Raja R Harinath  <rharinath@novell.com>
15879
15880         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
15881         Refer directly to the mcs/ tree.
15882
15883 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15884
15885         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
15886         Check if a trampoline for a synchronized method is required. 
15887
15888 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
15889
15890         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
15891         with localloc if needed. Throe arithmetric exception in
15892         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
15893         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
15894
15895 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
15896
15897         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
15898         types before switching on type.  Fixes #69622.
15899
15900 2004-11-19  Raja R Harinath  <rharinath@novell.com>
15901
15902         * Makefile.am (check-local): New.  Integrate into 'make check'.
15903         (MCS,RUNTIME): Define using in-tree mono and mcs.
15904         (ILASM): New.
15905         (%.exe): Use $(ILASM).
15906
15907 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
15908
15909         * mini-ppc.c: adjust initial prolog size (bug #69691).
15910
15911 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
15912
15913         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
15914         #69664.
15915
15916 2004-11-17  Raja R Harinath  <rharinath@novell.com>
15917
15918         * Makefile.am (clean-local): Rename from 'clean'.
15919
15920 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15921
15922         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
15923         to mono_arch_is_int_overflow. 
15924         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
15925         SIGFPE events.
15926
15927 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
15928
15929         * declsec.c|h: New files to support declarative security attributes.
15930         Added function to check if a method has (applicable) security.
15931         * mini.c|h: Add check for declarative security attributes in
15932         mono_method_check_inlining.
15933         * Makefile.am: Added declsec.c and declsec.h to the build.
15934
15935 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
15936
15937         * mini.c, mini.h: update to keep dynamic code info per-domain.
15938
15939 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
15940
15941         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
15942         (mini_init): Get rid of it from here too.
15943
15944 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
15945
15946         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
15947         implemented OP_RETHROW (patch by Geoff Norton
15948         <gnorton@customerdna.com>).
15949
15950 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
15951
15952         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
15953         between appdomains.  Fixes appdomain-unload on PPC.
15954
15955 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
15956
15957         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
15958         mini-exceptions.c: handle the new wrapper types.
15959         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
15960         token value as a MonoClass* when compiling a wrapper.
15961         mono_jit_create_remoting_trampoline now takes an additional
15962         MonoRemotingTarget parameter.
15963         
15964 2004-11-10  Martin Baulig  <martin@localhost>
15965
15966         * mini.c (mono_method_to_ir): Use `generic_container->context'
15967         rather than creating a new one.
15968
15969 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15970
15971         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
15972
15973         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
15974
15975 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
15976
15977         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
15978         the experimental aot cache stuff.
15979
15980 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
15981
15982         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
15983         mini-exceptions.c: update to exception clause structure changes.
15984
15985 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
15986
15987         * exceptions-x86.c (throw_exception): Fix warnings.
15988
15989         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
15990         for OP_RETHROW.
15991
15992 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
15993
15994         * exceptions-sparc.c (get_throw_exception): Really fix this.
15995
15996 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
15997
15998         * tramp-*.c: we no longer support icalls without wrappers, so
15999         a bit of code can be removed here
16000
16001 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
16002
16003         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
16004         patch.
16005
16006         * cpu-sparc.md: Add op_rethrow.
16007
16008         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
16009
16010         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
16011
16012         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
16013         * mini-ops.h: Add OP_RETHROW.
16014
16015         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
16016
16017         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
16018
16019 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
16020         
16021         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
16022         Makes the output much easier to read
16023
16024 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
16025
16026         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
16027         prevents another huge leak when compiling with ssa. Secondly, the
16028         performance of doing this rather than freeing the lists is much
16029         better. GList does a lock every time you allocate a list link,
16030         so that it can use a memory pool. So, it is better to just use
16031         a memory pool of our own.
16032         
16033         * ssa.c, linear-scan.c: replace g_list_remove_link with
16034         g_list_delete.  The remove one does not free the GList, so we were
16035         leaking memory. On -O=all --compile-all with corlib, this cut down
16036         3 MB of allocations.
16037
16038 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
16039
16040         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
16041
16042         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
16043
16044         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
16045         into a new function mono_create_jit_trampoline ().
16046
16047 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
16048
16049         * trace.c (get_spec): Allow tracing of classes without a namespace.
16050
16051 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
16052
16053         * mini.c: Fix pointer overwrite in mini_method_compile.
16054
16055 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
16056
16057         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
16058         The darwin ABI needs some special handling for 1 and 2 byte structs
16059         Lets use lbz/lhz instead of lwz everywhere.
16060         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
16061         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
16062         Use stb/sth for the former, and put the latter always on stack instead of in
16063         argument registers.
16064
16065 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
16066
16067         * trace.c (is_filenamechar): Add '_'.
16068
16069 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
16070
16071         * mini-s390.c: Fix prolog length to allow for large trace requirements.
16072
16073         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
16074
16075 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
16076
16077         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
16078         depends on libmonogc. Fixes #68805.
16079
16080 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
16081
16082         * mini.c (mono_jit_free_method): Provide extra information for
16083         this error.  Currently this leaks, but will be turned into a
16084         developer option in the future.
16085
16086 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
16087
16088         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
16089
16090 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
16091
16092         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
16093         boundary. Fixes reading of PATCH_INFO_R4 and R8.
16094         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
16095
16096 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
16097
16098         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
16099         trampolines for AOT code.
16100
16101 2004-10-22    <vargaz@freemail.hu>
16102
16103         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
16104         constructed types. Fixes #68136.
16105
16106 2004-10-21  Martin Baulig  <martin@ximian.com>
16107
16108         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
16109         if it returns true, unwind the stack to the call instruction.
16110
16111 2004-10-21    <vargaz@freemail.hu>
16112
16113         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
16114
16115         * mini.h: Bump AOT version number.
16116
16117         * objects.cs: Add another test for unbox trampolines.
16118
16119         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
16120         valuetype methods.
16121
16122 2004-10-20    <vargaz@freemail.hu>
16123
16124         * driver.c: Add SHARED to the set of optimizations tested.
16125
16126         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
16127
16128         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
16129         used by CEE_NEWARR.
16130
16131         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
16132
16133 2004-10-20  Martin Baulig  <martin@ximian.com>
16134
16135         * mini-exceptions.c (mono_handle_exception): Call
16136         mono_debugger_handle_exception() to tell the debugger about
16137         catch/finally clauses.
16138
16139 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
16140
16141         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
16142
16143         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
16144         #68447.
16145
16146 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
16147
16148         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
16149         methods as their native size, fixed bug #57543, #57545.
16150         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
16151         This saves a temporary register and mullw call down into 1 (minor perf
16152         increase for cases like sum = sum * 5;  This use to translate into:
16153             li r11,5
16154             mullw r28,r28,r11
16155         It now translates to
16156             mulli r28,r28,5
16157
16158 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
16159
16160         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
16161         #68388.
16162
16163 2004-10-11  Martin Baulig  <martin@ximian.com>
16164
16165         * mini.c (mono_method_to_ir): If we're a generic method, get the
16166         MonoGenericContainer from our MonoMethodNormal and create a
16167         MonoGenericContext from it.
16168
16169 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
16170
16171         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
16172
16173         * basic-long.cs: Add test for checked i8->i2 cast.
16174
16175 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16176
16177         * inssel-ppc.brg: added a couple of speedup rules.
16178
16179 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
16180
16181         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
16182         to speed up rebuilds.
16183
16184 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
16185
16186         * mini-s390.c: Minor fix to OP_OR_IMM.
16187
16188 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
16189
16190         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
16191         better. Fixes appdomain-unload.exe on sparc.
16192
16193 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
16194
16195         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
16196         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
16197         see bug 67324.
16198
16199 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
16200
16201         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
16202
16203 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
16204
16205         * mini.c: Always generate a field read/write wrapper for members
16206         of the class MarshalByRefObject since the actual instance could
16207         be a CBO.
16208
16209 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
16210
16211         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
16212
16213 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
16214
16215         * driver.c mini.h trace.c: Move the setting of the main assembly into
16216         a separate function called mono_trace_set_assembly () and call it after
16217         actually loading the main assembly. Fixes #66872.
16218
16219 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
16220
16221         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
16222         using the code manager.
16223
16224 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
16225
16226         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
16227
16228 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
16229
16230         * cpu-amd64.md: Fix bug in previous patch.
16231         
16232         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
16233         #66650.
16234
16235 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
16236
16237         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
16238         mini-exceptions.c: updates for changed stack walk interface.
16239
16240 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
16241
16242         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
16243
16244 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
16245
16246         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
16247
16248 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
16249
16250         * driver.c (mini_regression_list): Do not call mono_assembly_close 
16251         since assemblies can't be unloaded.
16252         
16253 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
16254
16255         * cpu-amd64.md: Fix more instruction lengths.
16256
16257         * cpu-amd64.md: Fix lengths of some instructions.
16258
16259 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
16260
16261         * inssel.brg: Make the array ldelema check aot friendly.
16262
16263 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
16264
16265         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
16266
16267         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
16268
16269 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
16270
16271         * mini-x86.c: Fix build.
16272
16273         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
16274         mono_type_get_underlying_type () helper function to simplify code.
16275         
16276 2004-09-09  Martin Baulig  <martin@ximian.com>
16277
16278         * mini-amd64.c: Don't access `type->data.klass' directly, call
16279         mono_class_from_mono_type() instead since the type may be a
16280         generic instance.
16281
16282 2004-09-09  Martin Baulig  <martin@ximian.com>
16283
16284         * mini-amd64.c (get_call_info): Fix support for generic instances.
16285         (add_valuetype): Use mono_class_from_mono_type() to get the class
16286         since we can be a generic instance.
16287
16288 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
16289
16290         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
16291
16292 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
16293
16294         * liveness.c: reset spill costs on each scan: bug 62107
16295
16296 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
16297
16298         * exceptions-sparc.c (mono_arch_find_jit_info): remove
16299         unnecessary line that doesn't compile
16300
16301 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
16302
16303         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
16304         trampolines, make them call an error function so people can fix their
16305         code.
16306
16307 2004-09-06  Martin Baulig  <martin@ximian.com>
16308
16309         * mini.c (mono_method_to_ir): When initializing locals, handle a
16310         generic instances like a valuetype if it's a valuetype and like a
16311         class if it's a class.
16312
16313 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
16314
16315         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
16316         stack. Fixes #64674.
16317
16318         * exceptions.cs: Add test for unwinding of call arguments.
16319
16320 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
16321
16322         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
16323         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
16324         set the carry/borrow flag). The sparc and s390 implementations
16325         can now use optimized versions (and simplify the code). ppc bugfixes.
16326
16327 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
16328
16329         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
16330
16331 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
16332
16333         * inssel-amd64.brg: Remove leftover 32 bit rule.
16334
16335         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
16336
16337 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
16338
16339         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
16340         mono_arch_find_jit_info functions into a new function. Fix a memory
16341         leak.
16342
16343         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
16344         refactored code.
16345         
16346 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
16347
16348         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
16349         as well.
16350         
16351         * exceptions.cs: Add array size tests.
16352
16353         * mini.c: Allocate a separate icall wrapper for each arity of 
16354         mono_array_new_va. Fixes #59509.
16355
16356         * exceptions.cs: Add testcase for 64578.
16357
16358         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
16359
16360         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
16361         
16362 2004-09-02  Martin Baulig  <martin@ximian.com>
16363
16364         * mini.c (mono_method_to_ir): When initializing the locals, call
16365         handle_initobj() on the generic instance itself, not its
16366         underlying type.
16367
16368 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
16369
16370         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
16371         MonoJitInfo for dynamic methods.
16372
16373         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
16374
16375         * mini.c: Add support for freeing JIT data for dynamic methods.
16376         
16377 2004-09-01  Martin Baulig  <martin@ximian.com>
16378
16379         * mini-x86.c (is_regsize_var): Added support for generic
16380         instances.
16381         (mono_arch_emit_prolog): Make this compile again, use
16382         `x86_push_imm_template (code)'.
16383
16384 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
16385
16386         * mini-x86.c: make all push_imm instructions that get
16387         patched always emit the long form
16388
16389 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
16390
16391         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
16392         in a per-domain hash.
16393
16394         * mini-amd64.c (merge_argument_class_from_type): Handle generic
16395         types.
16396
16397 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
16398
16399         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
16400         work.
16401         
16402         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
16403         work.
16404
16405         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
16406         Beginnings of SSE2 support.
16407
16408         * exceptions.cs: Add more tests for checked int<->uint casts.
16409
16410 2004-08-28  Martin Baulig  <martin@ximian.com>
16411
16412         * mini-x86.c (mono_arch_instrument_epilog): Added support for
16413         generic instances.
16414
16415         * mini.c
16416         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
16417         Handle generic instances recursively.
16418
16419 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
16420
16421         * iltests.il: test for conv.u8 on a constant
16422
16423 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
16424
16425         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
16426         LCONV_x4 (shrun_32 (membase)).
16427
16428 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
16429
16430         * inssel-x86.brg: c&p rules for push/setret of long
16431
16432 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
16433
16434         * inssel-x86.brg: c&p rules for compare (base, regvar) and
16435         compare (regvar, base)
16436
16437         * inssel-x86.brg: more burg love
16438
16439         * inssel.brg: more cleanup
16440
16441         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
16442
16443 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
16444
16445         * basic-long.cs, basic-calls.cs: new tests for optimization.
16446
16447 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
16448
16449         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
16450         patch.
16451
16452 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
16453
16454         * mini-amd64.c (read_tls_offset_from_method): Add another case.
16455         
16456 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
16457
16458         * inssel.brg (mini_emit_memcpy): use 
16459         NO_UNALIGNED_ACCESS to disable memcpy optimization
16460
16461 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
16462
16463         * mini-amd64.c: Handle generic types in various places.
16464
16465         * mini.c (mono_method_to_ir): Handle generic types in init locals.
16466
16467 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
16468
16469         * mini.c (handle_box): Fix warning.
16470
16471         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
16472
16473         * mini-amd64.h: Enable the emit_state optimization.
16474
16475         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
16476
16477         * mini-amd64.c: Add some new 64 bit peephole opts.
16478
16479         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
16480
16481         * cpu-amd64.md: sreg1 of div instructions must be %rax.
16482
16483         * mini-amd64.c: Register allocator fixes.
16484
16485         * mini.c: Add an optimization to emit_state to avoid allocation of new
16486         registers on some platforms.
16487
16488 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
16489
16490         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
16491
16492         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
16493         allocation. Fixes #63085.
16494
16495         * basic-long.cs: Add new regression test.
16496
16497         * mini-amd64.c: Register allocator improvements.
16498
16499 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
16500
16501         * mini-amd64.c (read_tls_offset_from_method): Add another code
16502         sequence.
16503
16504         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
16505         instruction sequence for nullifying class init trampolines.
16506
16507         * objects.cs: Add new regalloc test.
16508
16509         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
16510
16511 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
16512
16513         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
16514         
16515         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
16516         arguments.
16517
16518         * driver.c: Fix profiling after TLS changes.
16519         
16520         * driver.c (mono_main): Set mono_stats.enabled if needed.
16521
16522         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
16523         CEE_BOX.
16524
16525 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
16526
16527         * mini-x86.c: use a 1 op rather than a 2 op tls access
16528         instruction -> faster.
16529
16530 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
16531
16532         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
16533         x86 backend.
16534
16535 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
16536
16537         * exceptions-sparc.c (throw_exception): fix typo
16538
16539 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
16540
16541         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
16542         set tree->dreg correctly with tls. Allow any
16543         register to be used.
16544
16545         * mini-x86.c (read_tls_offset_from_method): add new code
16546         generation pattern seen with GCC.
16547
16548
16549 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
16550
16551         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
16552         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
16553         exceptions-sparc.c: fix some performance issues in exception
16554         handling and setting of the stack trace for exceptions that were
16555         already thrown.
16556
16557 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
16558
16559         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
16560         x86 backend.
16561         
16562         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
16563         registers.
16564
16565 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
16566
16567         This patch inlines tls access, when possible.
16568         
16569         * mini.h: new arch functions for TLS intrinsics.
16570         All platforms updated with a stub.
16571
16572         * mini.c: use the new intrinsics
16573
16574         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
16575         arch specific intrinsic for tls variables
16576
16577 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
16578
16579         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
16580         under windows.
16581
16582 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
16583
16584         * mini.c: thread local allocation
16585
16586 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
16587
16588         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
16589
16590         * Makefile.am: Link against the static version of libmonogc.
16591         
16592         * Makefile.am: Link the static versions of the convenience libraries
16593         into the mono executable.
16594
16595         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
16596
16597 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
16598
16599         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
16600         on integer overflow.
16601
16602         * mini-amd64.c: Reorganize function call code.
16603
16604         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
16605
16606 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
16607
16608         * inssel-x86.brg: use xor eax,eax.
16609         
16610         * basic.cs: new tests
16611
16612 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
16613
16614         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
16615         in exception throwing code.
16616         
16617 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
16618
16619         * inssel-x86.brg: use xor esi,esi.
16620
16621 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
16622
16623         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
16624         can trace methods compiled during mini_init () too.
16625
16626         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
16627         CEE_CONV_U4.
16628
16629 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
16630
16631         * Makefile.am: static link on x86 (r=zoltan)
16632
16633 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
16634
16635         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
16636         code since it causes some programs to fail.
16637
16638 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
16639
16640         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
16641
16642 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
16643
16644         * mini.c: ovfops_op_map - add STACK_OBJ case for
16645         CONV_I 
16646         * basic.cs: add test_0_pin_string as test
16647         case for above.
16648
16649 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
16650
16651         * Makefile.am: build C# if srcdir != builddir
16652
16653 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
16654
16655         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
16656         fall-through blocks.
16657
16658 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16659
16660         * driver.c: enable loop by default again and include abcrem in -O=all.
16661
16662 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
16663
16664         * iltests.il: Add some localloc tests.
16665
16666         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
16667
16668         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
16669         Fixes #62574.
16670
16671         * inssel-amd64.brg: Add some optimizations.
16672
16673         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
16674         for gcc-3.4.
16675
16676         * Makefile.am: Statically link mono against libmono on AMD64.
16677         
16678         * mini-amd64.c inssel-amd64.brg: Optimizations.
16679
16680 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
16681
16682         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
16683
16684         * tramp-amd64.c: Patch calling code in trampolines.
16685
16686 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
16687
16688         * mini-amd64.c: pinvoke struct passing fixes.
16689
16690 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
16691
16692         * mini-sparc.c: redo change, make mono_arch_cpu_init call
16693         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
16694
16695 2004-08-05  Duncan Mak  <duncan@ximian.com>
16696
16697         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
16698         CEE_LDELEM_ANY.
16699
16700 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
16701
16702         * mini-amd64.c (emit_move_return_value): Move return value for normal
16703         calls too.
16704
16705 2004-08-05  Martin Baulig  <martin@ximian.com>
16706
16707         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
16708         `type->type'; just modify `type' itself when dealing with enums
16709         and generic instances.
16710         (check_call_signature): Make `simple_type' a `MonoType *'.
16711
16712 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
16713
16714         * mini.c: Use OP_PADD to add offsets to addresses.
16715
16716         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
16717
16718 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
16719
16720         * mini-sparc.c (mono_arch_emit_epilog): fix check
16721         for folding last op into restore instruction
16722
16723 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
16724
16725         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
16726         helper methods using the code manager.
16727         
16728         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
16729
16730         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
16731
16732 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
16733         
16734         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
16735           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
16736
16737         * mini-s390.c: fix tail processing
16738
16739 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
16740
16741         * mini-ppc.c: mul.ovf.un exception name fix.
16742
16743 2004-08-03  Martin Baulig  <martin@ximian.com>
16744
16745         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
16746         instances; before jumping to `handle_enum', also modify `ptype'.
16747
16748 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
16749
16750         * cpu-sparc.md: fcall maximal length too small.
16751
16752 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
16753
16754         * mini-amd64.c mini.h: Add initial support for passing/returning 
16755         structures to/from pinvoked methods.
16756
16757 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
16758
16759         * mini-ppc.c: reg allocator fix.
16760
16761 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
16762
16763         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
16764
16765         * inssel.brg: Optimize memset on 64 bit machines.
16766
16767         * mini-amd64.c: Fix some vararg cases.
16768
16769 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
16770
16771         * mini-s390.c: Corrected macro in emit_float_to_int
16772
16773         * s390-abi.cs: Tests to exercise the s390 ABI
16774
16775 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
16776
16777         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
16778         caller saved regs.
16779
16780         * basic.cs: Add a test for add.ovf.un.
16781
16782 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
16783
16784         * mini-sparc.c: add case for OP_IDIV_UN
16785
16786 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
16787
16788         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
16789         
16790         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
16791
16792 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
16793
16794         * basic.cs: regression tests.
16795
16796         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
16797         regressions.
16798
16799 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
16800
16801         * basic.cs: Add a new test.
16802
16803         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
16804         and AOT. Various fixes and optimizations.
16805
16806         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
16807
16808 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
16809
16810         * mini-ppc.c: make sure temp regs are not used for global reg
16811         allocation.
16812
16813 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
16814
16815         * cpu-sparc.md: conv_i8 fix for 64bits
16816
16817         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
16818
16819 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
16820         
16821         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
16822         add opcode for cmp BYTE PTR [eax], imm.
16823
16824         * inssel.brg: Make memcpy and memset takes bases.
16825
16826 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
16827
16828         * *-amd64.*: More AMD64 work.
16829         
16830 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
16831
16832         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
16833         add a compare-not-equal opcode.
16834         
16835 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
16836
16837         * mini.c: Use mono_init_from_assembly instead of mono_init.
16838         
16839 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
16840
16841         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
16842
16843         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
16844
16845         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
16846
16847         * inssel.brg: 64 bit fixes.
16848
16849         * mini.h (MonoCallInst): Add some AMD64 specific data.
16850
16851         * mini.h: Add some OP_P opcodes.
16852
16853 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
16854
16855         * basic.cs: tests for 61797 and 61740
16856
16857 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
16858
16859         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
16860         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
16861
16862 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
16863
16864         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
16865
16866         * *-amd64*.*: Ongoing AMD64 work.
16867
16868 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
16869
16870         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
16871
16872         * *-amd64*: Ongoing AMD64 work.
16873
16874         * mini-arch.h: Add AMD64 support.
16875
16876         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
16877
16878         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
16879
16880         * mini-ops.h: Add new opcodes.
16881
16882         * Makefile.am: Add AMD64 support.
16883
16884         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
16885         rules into the inssel-long*.brg files.
16886
16887         * *-amd64.*: Add beginnings of AMD64 backend.
16888
16889 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
16890
16891         * mini.c (print_dfn): commenting out the code that prints
16892         the cil. With -O=deadce, this makes -v -v crash.
16893         
16894         * cpu-pentium.md: make checkthis have a length of 2
16895
16896 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
16897
16898         * mini-sparc.h: fix implementations of __builtin
16899         functions for Sun compiler for V9.
16900
16901 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
16902
16903         * mini.c: use the new stelem.ref wrapper
16904         * exceptions.cs, arrays.cs: new stelem.ref tests
16905
16906 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
16907
16908         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
16909         new XSP should work with these changes).
16910
16911 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
16912         
16913         * inssel-{long32,x86,}.brg: trivial optimizations.
16914         
16915 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
16916
16917         * mini.c: load value when emitting box operation in
16918         constrained calls.
16919
16920 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
16921
16922         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
16923         is one byte shorter than cmp DWORD PTR [eax], 0.
16924
16925 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
16926
16927         * inssel-ppc.brg: arguments on the stack are always
16928         relative to the stack pointer (spotted by Neale Ferguson).
16929
16930 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16931
16932         * exceptions-x86.c: delay appending the method name to the trace until
16933         after mono_jit_info_table_find is called, as this gets the real
16934         MonoMethod.
16935
16936 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
16937
16938         * aot.c: register roots
16939
16940 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
16941
16942         * aot.c : I could just use PLATFORM_WIN32 flag.
16943
16944 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
16945
16946         * aot.c : Reverting the previous fix. This time it broke linux build.
16947
16948 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
16949
16950         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
16951
16952 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
16953
16954         * mini.c (handle_stack_args): Remove some more debugging code.
16955         
16956         * mini.c (handle_stack_args): Remove debug output left in by mistake.
16957
16958         * driver.c mini.h aot.c: Allow additional options to be specified with
16959         --aot and pass them to mono_compile_assembly.
16960
16961         * aot.c: Add experimental code to AOT compile all loaded assemblies
16962         on demand and save the code into a cache in the filesystem.
16963
16964         * aot.c: Add support for more wrapper methods.
16965         
16966         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
16967         58863.
16968
16969         * cpu-*.md: Remove removed opcodes.
16970
16971         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
16972         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
16973         related icalls to marshal.c.
16974
16975 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
16976
16977         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
16978
16979         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
16980
16981         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
16982
16983 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
16984         * liveness.c: If liveness is recomputated we need to reset the information
16985         for each variable. This way, if the liveness range has been narrowed
16986         by optimizations that happened after the last computation, we can return
16987         a smaller range.
16988         
16989         For example, if you have
16990         
16991         {
16992                 int i = 0;
16993                 
16994                 // Tons of code that does not affect i
16995                 
16996                 i = foo ();
16997                 ...
16998         }
16999         
17000         i = 0 is dead code and will be removed by SSA. However, when
17001         linear scan gets to the code, i will still appear to be live
17002         throughout the entire block. This prevents good register allocation.
17003
17004 2004-07-06  Martin Baulig  <martin@ximian.com>
17005
17006         * debug-mini.c (mono_debug_init_method): Allow
17007         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
17008         (mono_debug_add_icall_wrapper): New method.
17009
17010         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
17011
17012 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
17013
17014         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
17015         optimization.
17016
17017 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
17018
17019         * aot.c (mono_aot_load_method): Fix loading of debug info.
17020
17021 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
17022
17023         * aot.c: Add logging support.
17024
17025 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
17026
17027         * mini.h: Add prototype for mono_print_method_from_ip.
17028
17029         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
17030
17031         * inssel.brg: 64 bit fixes.
17032
17033         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
17034         inssel-long32.brg.
17035
17036         * Makefile.am: Add SPARC64 support.
17037
17038 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
17039
17040         * aot.c: Fix alignment problems on 32 bit platforms.
17041
17042 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
17043
17044         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
17045         SPARC64.
17046
17047         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
17048         problems.
17049
17050         * mini.h: Bump AOT file version. Some 64 bit fixes.
17051
17052 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
17053
17054         * inssel-sparc.brg: Add new rule to avoid register moves.
17055
17056         * inssel.brg: Add ldind_to_load_membase helper function.
17057
17058 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
17059
17060         * mini.c: OffsetToStringData intrinsic.
17061         
17062 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
17063
17064         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
17065
17066         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
17067         regression tests.
17068
17069         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
17070 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
17071
17072         * mini.c: reinstated mono_compile_get_interface_var()
17073         on x86, too, since the change breaks the Gtk# build there as well.
17074
17075 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
17076
17077         * driver.c: remove loop from the default optimizations: it seems to
17078         interact badly with some of the other options (see bug #60613).
17079
17080 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
17081
17082         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
17083         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
17084
17085 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
17086
17087         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
17088         vararg-using methods.
17089
17090 2004-06-21  Martin Baulig  <martin@ximian.com>
17091
17092         * mini/mini-exceptions.c
17093         (mono_handle_exception): Added `gpointer original_ip' argument.
17094         After calling mono_unhandled_exception(), call
17095         mono_debugger_unhandled_exception() and if that returns true,
17096         restore the context and return.
17097
17098 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
17099
17100         * mini-ppc.c: prefer the use of relative branches so
17101         they won't need to be patched in aot code (patch from Patrick Beard).
17102
17103 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
17104
17105         * aot.c: patch from Patrick Beard to make the output assembly
17106         more correct for the MacOSX assembler. Small tweak to
17107         generate sane images on Linux/PPC, too.
17108
17109 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
17110
17111         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
17112         case until bug #59509 is fixed (shows up in #60332).
17113
17114 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
17115
17116         * mini.c: make sure the needed wrappers are compiled, too, with
17117         precomp.
17118
17119 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
17120
17121         * driver.c: remove NPTL reference in --version output.
17122
17123 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
17124
17125         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
17126         generate valid assembly for the Mach-O assembler.
17127
17128 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
17129
17130         * driver.c: don't include abcrem in the all optimization specifier
17131         since it slows down jit compilation too much for now.
17132
17133 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
17134
17135         * mini.c: use BIGMUL only if both operands have the same signage.
17136         * iltests.il: Test for bug 60056. (errors related to signage in
17137         BIGMUL).
17138
17139         r=lupus.
17140
17141 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
17142
17143         * mini.c, aot.c: memory leak fixes.
17144
17145 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
17146
17147         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
17148
17149 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
17150
17151         * Makefile.am: remove the -static hack completely, it links in
17152         statically glib as well.
17153
17154 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
17155
17156         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
17157         * exceptions.cs: make it compile with new mcs/csc.
17158
17159 2004-06-03 Massimiliano Mantione <massi@ximian.com>
17160         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
17161         and added relevant test case.
17162
17163 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
17164
17165         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
17166         regressions in gtk-sharp.
17167
17168 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
17169
17170         * exceptions.cs: New regression tests.
17171
17172         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
17173
17174 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
17175
17176         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
17177
17178 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
17179
17180         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
17181
17182         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
17183
17184 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
17185
17186         * mini.c (mono_jit_runtime_invoke): Init class in this
17187         method instead of trusting mono_jit_compile_method to
17188         do the work (because wrappers can be in object class)
17189
17190 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
17191
17192         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
17193
17194         * basic-long.cs: New regression test.
17195
17196 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
17197
17198         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
17199         and div/rem checks.
17200
17201 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
17202
17203         * Makefile.am: fix miguel's change to build mono statically against
17204         libmono (track build dependencies).
17205
17206 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
17207
17208         * cfold.c: Some glib versions do not have G_MININT32.
17209
17210 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
17211
17212         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
17213         with precision of tan, atan, sin and cos, and implemented related
17214         regressions tests (fixes bug 54467, but one new problem appeared and
17215         is not fixed yet).
17216
17217 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
17218
17219         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
17220
17221         * exceptions.cs: Add test for constant folding && division by zero.
17222
17223         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
17224         since driver.c is in libmono too, so the optimization was useless.
17225
17226         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
17227         variable to driver.c so the compiler can emit more efficient code to
17228         access them.
17229
17230 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17231
17232         * Makefile.am: don't distribute generated inssel.[ch] files.
17233
17234 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
17235
17236         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
17237         into the default appdomain. Fixes #58707.
17238
17239         * jit-icalls.c: Remove the broken approximation for truncl, doing
17240         no conversion is better.
17241
17242         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
17243         Fixes #58863.
17244
17245 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
17246
17247         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
17248         of the mcrxr instruction which is not available on some processors
17249         even if it's documented to be. Implement add and sub overflow correctly
17250         (still not complete for long unsigned). Speed up icalls a bit.
17251
17252 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
17253
17254         * mini.c (mono_jit_compile_method_with_opt): Make sure that
17255         we run .cctor in the current domain instead of target_domain.
17256         
17257         Fixes bug #58558, .cctor not being called in -O=shared.
17258
17259 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
17260
17261         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
17262
17263 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
17264
17265         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
17266         which can be done with an imm8, do it that way.
17267         (mono_arch_output_basic_block): ditto for a jmp
17268         (mono_arch_emit_prolog): Computate maximum offset of a label.
17269
17270 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
17271
17272         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
17273         now tries to allocate prefered physical reg's for virtual
17274         regs. This reduces the number of emited spills/loads with
17275         20-30% on our core assemblies.
17276
17277 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
17278
17279         * jit-icalls.c: truncl() is not needed and trunc() is
17280         the correct thing to do anyway (bug #58287).
17281
17282 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
17283
17284         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
17285         if available.
17286
17287 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
17288
17289         * driver.c: enable loop optimizations by default.
17290
17291 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
17292
17293         * mini-x86.c: fix calc of max loop size when aligning loops start.
17294
17295 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
17296
17297         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
17298         the stack.
17299
17300 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
17301
17302         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
17303         should set carry.
17304
17305         * basic-long.cs: Add tests for add/subtract of immediates with carry.
17306
17307         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
17308         
17309         * mini.c (inline_method): Allways inline some wrappers even if the cost
17310         is too large. Fixes #58785.
17311
17312         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
17313         
17314 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
17315
17316         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
17317         (crichton@gimp.org). Beginning of support for sparc/linux.
17318
17319         * mini-sparc.c: Optimize retrieval of LMF address.
17320
17321 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
17322
17323         * exceptions-ppc.c:  handle alloca in methods with clauses.
17324
17325 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
17326
17327         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
17328
17329 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
17330
17331         * mini.c: Delegate most of the abort signal work to 
17332           mono_thread_request_interruption, which also handles Stop and Suspend
17333           states.
17334
17335 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
17336
17337         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
17338         supports the save/restore lmf opcodes.
17339
17340 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
17341
17342         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
17343         by gcc-3.4 as well.
17344
17345         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
17346
17347 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
17348
17349         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
17350         methods which contain array accesses.
17351
17352         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
17353         boundaries. Fixes #58537.
17354
17355         * iltests.il: Add regression test for #58537.
17356
17357 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
17358
17359         * mini-x86.c (mono_arch_local_regalloc): Last part of
17360         fix for bug #58633 (releasing register to early).
17361
17362 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
17363
17364         * basic-long.cs: Add new regression test.
17365
17366 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
17367
17368         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
17369         register too early on the chain.
17370
17371 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
17372
17373         * mini.c (create_helper_signature): Use a helper function to reduce
17374         the code which needs to be written. Also set the calling convention of
17375         icalls on windows. Fixes #57840.
17376
17377 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
17378
17379         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
17380         exceptions-ppc.c: added helper function to get the instruction address
17381         from a signal handler context.
17382
17383 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
17384
17385         * helpers.c: use g_get_tmp_dir. Invokes happyness 
17386         from gonzalo.
17387
17388 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
17389
17390         * helpers.c: Add new env variable to pass args to objdump.
17391         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
17392
17393 2004-05-17  Radek Doulik  <rodo@ximian.com>
17394
17395         * Makefile.am (common_sources): added abcremoval.h so it get
17396         disted and daily mono packages on go-mono.com will build again
17397
17398 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
17399
17400         * abcremoval.c: Fixed coding style, added copyright header.
17401
17402         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
17403
17404         * mini.h: Added prototype for abc removal main function.
17405
17406         * build_relations_propagation_table.pl: Added copyright header.
17407
17408 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
17409
17410         * basic-long.cs: reg test for complex ceq_long bug.
17411
17412 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
17413
17414         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
17415         reg in long and clob case (bug #58343). Fixed/added comments.
17416
17417 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
17418
17419         * mini.c (mono_jit_runtime_invoke): Follow new convention
17420         of calling the invoke method with an function pointer.
17421
17422 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
17423
17424         * ChangeLog: Fix author of memory leak patch.
17425
17426 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
17427
17428         * Makefile.am: fix make dist as well...
17429
17430
17431 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
17432
17433         * cfold.c: Made so that conversions from pointer to int4 are no-ops
17434         on archs where pointers are 4 bytes long.
17435
17436         * Makefile.am: Added abcremoval.c source file.
17437
17438         * abcremoval.c: Added abcremoval.c.
17439
17440         * abcremoval.h: Added abcremoval.h.
17441
17442         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
17443
17444         * inssel.brg: Enabled bounds check removal.
17445
17446         * mini.c: Added support for abcrem optimization.
17447
17448         * mini.h: Added abcrem optimization label.
17449
17450         * driver.c: Added support for abcrem optimization.
17451
17452         * propagated_relations_table.def: Added propagated_relations_table.def.
17453
17454 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
17455
17456         * mini.c, cfold.c: fix style.
17457
17458 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
17459
17460         * mini.c: handle issue with the low-level implementation of
17461         some long opcodes (bug #54209).
17462
17463 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
17464
17465         * basic.cs: test for my new cmov stuff.
17466
17467 2004-05-13      Patrik Torstensson
17468
17469         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
17470         opt and added peephole documentation.
17471
17472 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
17473
17474         * tramp-ppc.c: rewrote the generic trampoline code.
17475
17476 2004-05-11      Patrik Torstensson
17477
17478         * mini-x86.c: optimize long shl/shr asm code (one less branch)
17479
17480 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
17481
17482         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
17483
17484         * mini.h mini.c dominators.c: Applied patch from Derek Woo
17485         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
17486
17487         * mini.c: Add new icalls for AsAny marshalling.
17488
17489 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
17490
17491         * tramp-ppc.c, mini-ppc.c: more cleanups.
17492
17493 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17494
17495         * mini.c: no warnings.
17496
17497 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
17498
17499         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
17500
17501 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
17502
17503         * mini.c: In the thread abort signal handler, if the thread is in the
17504         process of being stoped, don't throw the Abort exception, just stop the
17505         thread.
17506
17507 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
17508
17509         * tramp-ppc.c: removed old code.
17510
17511 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
17512
17513         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
17514         do some simple speed optimizations on ppc.
17515
17516 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
17517
17518         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
17519         and large offsets in load/store.
17520
17521 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
17522
17523         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
17524         it causes regressions.
17525
17526 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
17527
17528         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
17529         support.
17530
17531 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
17532
17533         * jit-icalls.c: remove warnings.
17534         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
17535         speedups for unsafe code.
17536
17537 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
17538
17539         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
17540
17541 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
17542
17543         * basic-calls.cs: Add new regression test.
17544
17545         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
17546         more portable.
17547
17548         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
17549
17550         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
17551         is no longer used.
17552
17553 2004-05-06      Patrik Torstensson
17554
17555         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
17556         long reg allocation in any reg (not only eax:edx) and implemented 
17557         long shl/shr ops in asm instead of helpers.
17558
17559 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
17560
17561         * mini-sparc.h: Fix warnings.
17562
17563         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
17564         stack.
17565
17566         * mini-exceptions.c (mono_handle_exception): Call the filter in a
17567         separate statement for clarity.
17568
17569         * mini-sparc.c: Update status.
17570
17571 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
17572
17573         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
17574         here.
17575
17576 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
17577
17578         * inssel-ppc.brg: another small pre-release workaround:
17579         we don't do overflow detection for long_sub_un.
17580
17581 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
17582
17583         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
17584         (also works around a weird ppc bug: 57957).
17585
17586 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
17587
17588         * tramp-ppc.c: trampoline fixes.
17589
17590 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
17591
17592         * mini-ppc.c: fixed typos.
17593
17594 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
17595
17596         * mini-ppc.c, exceptions-ppc.c: more code saves registers
17597         at the top of the stack. Fixed typos. Use a frame registers
17598         for all the methods with exception clauses.
17599
17600 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
17601
17602         * exceptions-ppc.c: restore fp registers.
17603
17604 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
17605
17606         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
17607         order from the stack top (moved the stack room to save the
17608         return value for trace after the param area). Fixed corruption
17609         in restoring registers on unwind.
17610
17611 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
17612
17613         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
17614
17615 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
17616
17617         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
17618         and prolog/epilog for methods that use it. Allow
17619         enough param area room for varargs methods. Fix miguel's
17620         breakage in exception handling.
17621
17622 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
17623
17624         * Makefile.am: run genmdesc only on current arch.
17625
17626 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17627
17628         * exceptions-x86.c:
17629         * mini-x86.h: fix the build on windows.
17630
17631 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
17632
17633         * 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.
17634
17635         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
17636
17637         * mini-exceptions.c: New file.
17638         
17639         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
17640         Move some parts of the x86 exception handling code to an 
17641         arch-independent file so it can be shared with other ports.
17642
17643 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
17644
17645         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
17646
17647 2004-04-26  David Waite  <mass@akuma.org>
17648
17649         * driver.c: remove comma from end of enumeration declaration
17650
17651 2004-04-26  Jackson Harper  <jackson@ximian.com>
17652
17653         * driver.c: parse config file before loading first assembly. This
17654         allows the user gac to be enabled/disabled. 
17655         
17656 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
17657
17658         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
17659         simpler mechanism: we do not care what is encoded initially
17660         (branch absolute or relative), we care about the code and its
17661         target.  I kept the old code for reference for now.
17662
17663         The new code tries first to determine if the jump is anywhere in
17664         the -/+32 absolute meg range, if it succeeds, it encodes using the
17665         absolute branch;  If not, it tried to find something in the
17666         relative range, if not, it uses the handle_thunk code. 
17667
17668 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
17669
17670         * exceptions-ppc.c: use the correct ip register on macosx.
17671
17672 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
17673
17674         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
17675
17676 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
17677
17678         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
17679         Raise exception on integer divide by zero by hand since the hw
17680         doesn't support it. Handle NaNs in FP compares.
17681
17682 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
17683
17684         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
17685         code reducing duplication between the platforms and enabled
17686         signal exception handling (on linux for now).
17687
17688 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
17689
17690         * exceptions-ppc.c: more macosx support.
17691
17692 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
17693
17694         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
17695
17696 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
17697
17698         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
17699
17700 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
17701
17702         * iltests.il: more tests.
17703
17704 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
17705
17706         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
17707         vars as well.
17708
17709 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
17710
17711         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
17712
17713 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
17714
17715         * liveness.c: Mark variables as volatile in all basic blocks reachable
17716         from exception clauses.
17717
17718 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
17719
17720         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
17721         inlining.
17722
17723 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
17724
17725         * iltests.il, basic.cs: more tests for regalloc.
17726
17727 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
17728
17729         * iltests.il: Some tests for register allocation modifications
17730         I have locally.
17731
17732 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
17733
17734         * exceptions.cs: Add regression test for bug #56782.
17735
17736         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
17737         original stack trace if an exception is rethrown. Fixes #56782. Oh,
17738         the beauty of fixing the same thing in 5 different files...
17739
17740 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
17741
17742         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
17743         methods.
17744
17745 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
17746
17747         * mini.c: Add support for STRWLPARRAY marshalling convention.
17748
17749 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
17750
17751         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
17752         to init the context to setup the regs pointer).
17753
17754 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
17755
17756         * exceptions-ppc.c: more exceptions work.
17757
17758 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
17759
17760         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
17761         not allowed.
17762
17763 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
17764
17765         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
17766         can use the memory directly.
17767
17768         * cpu-pentium.md: Update documentation from a post from Zoltan. 
17769
17770         add x86_add_membase, x86_sub_membase, x86_mul_membase
17771
17772 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
17773
17774         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
17775         GENERAL_REGS they were also hardcoded for all PPC ports.
17776
17777         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
17778
17779         Remove hard-coded limit for floating point registers, use
17780         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
17781
17782         Notice that in MacOS X calling conventions you can fit a lot more
17783         floating point values in registers, so I should update the PInvoke
17784         test to excercise the passing of floating point values on the
17785         stack (currently broken).
17786         
17787 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
17788
17789         * tramp-ppc.c (create_trampoline_code): Added
17790         JUMP_TRAMPOLINE_SIZE. 
17791         (ppc_magic_trampoline): Follow the pattern from
17792         x86_magic_trampoline: if code is set to zero, return. 
17793         (create_trampoline_code): Always pass MonoMethod to the jump
17794         trampoline, before it was passing a null.
17795         (mono_arch_create_jump_trampoline): Implement the jump stub, could
17796         share the code with mono_arch_create_jit_trampoline. 
17797
17798         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
17799         implemented.
17800         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
17801         implemented.  
17802
17803         * cpu-g4.md: Added length for jmp instruction, the worst case
17804         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
17805         for save_lmf).
17806
17807 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
17808
17809         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
17810
17811 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
17812
17813         * mini.c: Only set bblock->real_offset when adding a new bblock, and
17814         before each IL instruction.
17815
17816         * mini.c (CEE_BOX): Fix warnings.
17817
17818 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17819
17820         * mini.c: removed a few unused vars and extra whitespace.
17821
17822 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
17823
17824         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
17825         checks.
17826         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
17827         index.
17828         (OP_GETCHR): use the above
17829         (CEE_LDELEMA): use the above.
17830
17831         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
17832         version of the generic impl.
17833         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
17834         (CEE_LDELEMA): use the above.
17835
17836 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
17837
17838         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
17839         Fixes #56317.
17840
17841         * iltests.il: Added new regression test for #56317.
17842
17843 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
17844
17845         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
17846         under NetBSD. Fixes #56450.
17847
17848         * liveness.c (update_gen_kill_set): Fix previous patch.
17849
17850 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17851
17852         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
17853
17854 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
17855
17856         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
17857         ldsfld and ldsflda.
17858
17859         * inssel-sparc.brg: Add more optimizations.
17860
17861         * mini-sparc.c: Replace multiply/divide with shifts if possible.
17862
17863 2004-04-01  Martin Baulig  <martin@ximian.com>
17864
17865         * mini.c (handle_box): New static function; moved the
17866         implementation of CEE_BOX here.
17867         (mono_method_to_ir): Added `constrained_call' variable.
17868         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
17869         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
17870         mono_method_get_constrained() to get the method.
17871
17872 2004-04-01  Martin Baulig  <martin@ximian.com>
17873
17874         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
17875         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
17876         (mono_method_to_ir): We don't need these macros anymore since
17877         mono_class_get_full() already takes care of it. 
17878
17879 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17880
17881         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
17882         use @function (as doesn't accept #function here) and check the return
17883         value of system and stop if fails.
17884
17885 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17886
17887         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
17888
17889 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
17890
17891         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
17892
17893         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
17894
17895         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
17896         #56223.
17897
17898         * basic-long.cs: Add test for negation of Int64.MinValue.
17899
17900 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
17901
17902         * mini-sparc.c: Update status.
17903
17904         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
17905
17906         * exceptions-sparc.c: Fix return value in filters.
17907
17908         * inssel-sparc.brg: Fix register allocation in some rules.
17909
17910 2004-03-28  Martin Baulig  <martin@ximian.com>
17911
17912         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
17913         if neccessary.  
17914
17915 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
17916
17917         * mini-x86.c (mono_arch_patch_code): Fix warnings.
17918         
17919         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
17920         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
17921         remove unused conv_u4 opcode.
17922
17923         * mini-x86.c: Remove valgrind workaround since it slows down things
17924         even when mono is not run under valgrind.
17925
17926 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
17927
17928         * mini-sparc.c: Update status.
17929
17930         * inssel-sparc.brg: Add some optimizations.
17931
17932         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
17933         future delay slot filling. Add support for varargs, tail calls and JMP.
17934
17935         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
17936         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
17937
17938         * inssel.brg: Fix register allocation in OP_ARGLIST.
17939
17940         * inssel.brg: Fix warnings.
17941
17942 2004-03-25  Martin Baulig  <martin@ximian.com>
17943
17944         * mini.c (inflate_generic_field): Removed.
17945         (mini_get_method): Removed, use mono_get_method_full(),
17946         (mini_get_class): Removed, use mono_class_get_full().
17947         (mono_method_to_ir): Pass our generic context to
17948         mono_field_from_token().        
17949
17950 2004-03-25  Martin Baulig  <martin@ximian.com>
17951
17952         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
17953         of a `MonoMethod *'.
17954         (mini_get_method): Take a `MonoGenericContext *' instead
17955         of a `MonoMethod *'.
17956         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
17957         a new local variable called `generic_context' which holds the
17958         current `MonoGenericContext *'; use it to lookup things.
17959
17960 2004-03-24  Martin Baulig  <martin@ximian.com>
17961
17962         * mini.c (mini_get_class): New static method; if we're inside a
17963         generic instance, inflate the class if neccessary.
17964         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
17965
17966 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
17967
17968         * iltests.il: New regression test for #55976.
17969
17970         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
17971         #55976.
17972
17973 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
17974
17975         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
17976         output.
17977
17978 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
17979
17980         * liveness.c: Consider SSA stores as well as loads when making vars
17981         volatile.
17982
17983         * exceptions.cs: New regression tests for register allocation.
17984         
17985 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
17986
17987         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
17988         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
17989           domain lock only to protect puntual access to data structures.
17990           Added access lock for sighash, jit_icall_hash_name, 
17991           jit_icall_hash_addr and domain->code_mp.
17992
17993 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
17994
17995         * driver.c: Print SIGSEGV handling method.
17996
17997         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
17998
17999         * mini.c (setup_jit_tls_data): Handle case when this is called
18000         multiple times for a thread.
18001
18002         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
18003         is different from fbxx_un. Fixes #54303. Also use constants instead of
18004         magic numbers in a lot of places.
18005
18006 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
18007
18008         * exceptions.cs: Fix cctor test when --regression is used.
18009
18010 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
18011
18012         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
18013         for Linux/ppc.
18014
18015 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
18016
18017         * inssel-ppc.brg: fixed register assignments for some rules.
18018
18019 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
18020
18021         * exceptions.cs: Add test for exceptions in static constructors.
18022
18023         * mini.c (mono_jit_compile_method_with_out): Move the calling of
18024         static constructors outside the domain lock. Fixes #55720.
18025
18026 2004-03-17  Martin Baulig  <martin@ximian.com>
18027
18028         * mini.c (get_generic_field_inst): Removed, this'll never happen.
18029         (inflate_generic_field): Take the `MonoMethod *' instead of the
18030         `MonoClass *' and added support for generic method.
18031         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
18032         have a `field->parent->gen_params', only inflate the field if it's
18033         an open constructed type.
18034
18035 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
18036
18037         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
18038         exception object instead of the preconstructed ones.
18039
18040 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18041
18042         * mini.c: reverted changed to sigsegv_signal_handler commited
18043         accidentally in the previous patch.
18044
18045 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18046
18047         * mini.c:
18048         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
18049         running --aot with an old assembly.
18050
18051 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
18052
18053         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
18054         point values.
18055
18056         * mini-sparc.c: Add support for v9 branches with prediction.
18057
18058 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
18059
18060         * mini.c (mini_init): #warning is GNUC only
18061
18062         * mini-sparc.h: implement __builtin_frame_address
18063         and __builtin_return_address for Sun C compiler
18064
18065 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
18066
18067         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
18068
18069 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
18070
18071         * basic-calls.cs: Add test for unaligned byref long argument passing.
18072
18073         * mini-ops.h: Add sparcv9 compare and branch instructions.
18074
18075         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
18076         v9 instructions if we have a v9 cpu.
18077
18078         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
18079         registers for global allocation.
18080
18081         * exceptions-sparc.c: Fixes.
18082         
18083 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
18084
18085         * liveness.c (mono_analyze_liveness): Optimized version.
18086
18087         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
18088
18089         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
18090         sparc work.
18091
18092         * basic-float.cs basic-calls.cs: New regression tests.
18093
18094 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
18095
18096         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
18097         sigaltstack implementation.
18098
18099         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
18100         
18101         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
18102         stuff if SIGSEGV_ON_ALTSTACK is not defined.
18103
18104 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
18105
18106         * mini.c: Fix warnings.
18107         
18108         * mini.c (mono_resolve_patch_target): New function which contains the
18109         arch independent part of the patching process.
18110
18111         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
18112         patching code to a separate function.
18113
18114 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
18115
18116         * mini.c (add_signal_handler): ifdef out on Windows
18117
18118 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
18119
18120         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
18121         cpu-sparc.md: Add exception handling support + other fixes.
18122
18123         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
18124         typed GC detection in --version.
18125
18126         * basic.cs exceptions.cs: New regression tests.
18127
18128         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
18129         the arch specific code can store data during a compilation.
18130
18131         * mini-ops.h: Add OP_SETFRET.
18132
18133         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
18134         function, register a separate icall for each arity, so the icalls can
18135         get a wrapper.
18136         
18137         * mini.c (mono_print_tree): Print negative offsets in a more readable
18138         form.
18139         
18140         * mini.c: Make signal handling work on sparc.
18141         
18142         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
18143
18144         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
18145
18146         * jit-icalls.c: Emulate truncl by aintl on solaris.
18147
18148         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
18149
18150 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
18151
18152         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
18153
18154 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
18155
18156         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
18157         a MarshalByRef type, inline a method that performs the check, taking into
18158         account that the object can be a proxy. Also implemented tow new opcodes:
18159         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
18160         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
18161         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
18162
18163 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
18164
18165         * mini-ppc.c: if a relative branch displacement is too big
18166         but it points to and area reachable with an absolute branch, 
18167         avoid the thunks.
18168
18169 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
18170
18171         * mini.c: optimize small copies in cpblk.
18172
18173 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
18174
18175         * basic-calls.cs basic-float.cs: New regression tests.
18176
18177         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
18178         negative offsets from %fp. Implement localloc. Fix local register 
18179         allocation. Fix the case when the this argument needs to be saved to
18180         the stack. Implement some missing opcodes.
18181
18182 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
18183
18184         * mini.c (mini_method_compile): Reenable global regalloc in methods
18185         with exception handlers.
18186
18187         * linear-scan.c (mono_varlist_sort): Fix warning.
18188
18189         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
18190
18191         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
18192         regalloc costs.
18193
18194         * liveness.c: Make all variables uses in exception clauses volatile, to
18195         prevent them from being allocated to registers. Fixes #42136.
18196
18197 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
18198
18199         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
18200         causes regressions.
18201
18202         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
18203         argument to mono_arch_regalloc_cost.
18204
18205         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
18206         precisely.
18207
18208 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
18209
18210         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
18211         Make the cost of allocating a variable to a register arch dependent.
18212
18213         * basic-calls.cs: Fix compilation of tests.
18214         
18215         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
18216         helper function to cut back on the number of #ifdefs needed.
18217
18218         * mini-ppc.c: Fix compilation.
18219
18220         * basic-calls.cs: New regression tests.
18221
18222         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
18223
18224         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
18225         of l0 since that is callee saved.
18226
18227         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
18228         to virtual calls.
18229
18230         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
18231         of delay instruction.
18232
18233         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
18234
18235         * mini.h (MonoCallInst): Add 'virtual' flag.
18236
18237         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
18238
18239 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
18240
18241         * *.cs: New regression tests.
18242
18243         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
18244         work.
18245
18246         * mini.c (mono_runtime_install_handlers): Fix build.
18247
18248         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
18249         'signal_stack_size' members.
18250
18251         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
18252         alternate signal stack.
18253
18254         * exceptions-x86.c: Add stack overflow handling.
18255
18256         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
18257         functions to arch independent code.
18258
18259         * mini.c (mono_print_tree): Print more detailed info for load_membase
18260         opcodes.
18261         
18262 2004-02-23  Martin Baulig  <martin@ximian.com>
18263
18264         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
18265
18266 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
18267
18268         * mini-x86.c: fixed reg allocation for div/rem.
18269
18270 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
18271
18272         * driver.c (mono_main): Report some configuratio options on --version.
18273
18274 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
18275
18276         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
18277         low in the address space. Correctly flush memory in thunks where we
18278         output native code.
18279
18280 2004-02-20  Martin Baulig  <martin@ximian.com>
18281
18282         * mini.c (mini_get_method): New static method; inflate all generic
18283         methods and methods in open generic instances.
18284         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
18285         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
18286
18287 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
18288
18289         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
18290
18291         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
18292
18293 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
18294
18295         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
18296
18297         * mini-sparc.c (flushi mono_arch_output_basic_block): make
18298         it compile using Sun's compiler.
18299
18300 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
18301
18302         * 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.
18303
18304         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
18305
18306 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
18307
18308         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
18309         code.
18310         * mini-ppc.c: handle calls outside of the allowed range with thunks
18311         allocated using the code manager.
18312         * tramp-ppc.c: use the code manager to hold generated native code.
18313         Fixed the magic trampoline to just patch vtable entries.
18314
18315 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
18316
18317         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
18318         independent file.
18319
18320 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
18321
18322         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
18323         PPC.
18324
18325         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
18326         if we have a working __thread implementation.
18327
18328         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
18329         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
18330
18331 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
18332
18333         * mini-x86.c: Fix compilation under gcc 2.
18334         
18335 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
18336
18337         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
18338         contains a call to the wrapped function.
18339
18340         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
18341         OP_<CALL>_IMM opcodes, and use them under X86.
18342         
18343         * mini.c (mono_jit_find_compiled_method): Fix warning.
18344
18345         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
18346
18347         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
18348
18349         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
18350         functionality to mini.c.
18351
18352         * mini.c (mono_create_jump_trampoline): New function to create a jump
18353         trampoline. Return a compiled method instead of a trampoline if it
18354         exists. Add a cache for jump trampolines.
18355
18356         * mini.c (mono_jit_find_compiled_method): New function to return a
18357         compiled method if it exists.
18358
18359         * mini-x86.c: Call mono_create_jump_trampoline instead of 
18360         mono_arch_create_jit_trampoline.
18361
18362         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
18363         a jump trampoline. Fixes #52092.
18364         
18365 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
18366
18367         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
18368         which is not up-to-date. Add check_corlib_version () instead.
18369
18370         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
18371         have to call it.
18372         
18373         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
18374         since newer valgrind versions do not need it.
18375
18376         * mini.c (mono_jit_compile_method_with_opt): New helper function to
18377         compile a method with a given set of optimizations.
18378
18379         * mini.c: Compile icall wrappers on-demand instead of at startup.
18380
18381         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
18382         wrapper for an icall.
18383
18384 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
18385
18386         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
18387         #54063.
18388
18389         * iltests.il: Add test for non-empty stack before switch instruction.
18390
18391 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
18392
18393         * mini.c: Add support for new stringbuilder marshalling conventions.
18394
18395         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
18396
18397 2004-02-01  Martin Baulig  <martin@ximian.com>
18398
18399         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
18400         in `ginst->mtype_argv'.
18401
18402 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
18403
18404         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
18405         facilitate grepping.
18406
18407 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
18408
18409         * mini.c: fixed buglet in initobj generic implementation for references.
18410
18411 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
18412
18413         * Makefile.am: make the version script conditional.
18414         * jit-icalls.c: handle missing truncl().
18415
18416 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
18417
18418         * exceptions.cs: Add more tests for double->int conversion.
18419
18420         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
18421         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
18422
18423 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
18424
18425         * driver.c: make --verbose --version emit an error
18426         if the loaded corlib doesn't match the runtime version.
18427
18428 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
18429
18430         * mini-ppc.h: export ppc_patch().
18431         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
18432         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
18433         on par or better than on MacOSX.
18434
18435 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
18436
18437         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
18438         mono_lookup_pinvoke_call.
18439
18440         * mini-x86.c: Under windows, the default pinvoke calling convention is
18441         stdcall. Fixes #52834.
18442
18443         * mini.c (optimize_branches): Add an upper bound to the number of
18444         iterations to prevent infinite loops on strange loops. Fixes #53003.
18445
18446 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
18447
18448         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
18449         and ISINST. Fixes #52093.
18450
18451         * objects.cs (test_0_vector_array_cast): New tests.
18452         
18453 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
18454
18455         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
18456         checking in Array.Set ().
18457
18458         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
18459         #52590.
18460
18461         * object.cs (test_0_multi_array_cast): New regression test.
18462
18463 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
18464
18465         * exceptions-ppc.c: fix build on Linux/PPC.
18466
18467 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
18468
18469         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
18470         running under valgrind.
18471         (x86_magic_trampoline): Fix build bustage.
18472
18473         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
18474         negative values as well. This is needed for the encoding of the line number
18475         info, since sometimes the line numbers are not in increasing order.
18476
18477 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
18478
18479         * cpu-pentium.md (localloc): Increase the size of the localloc 
18480         instruction since it is a loop under Win32.
18481
18482         * debug-mini.c (record_line_number): Get rid of unneccesary memory
18483         allocation.
18484
18485 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
18486
18487         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
18488         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
18489         Max Horn (max@quendi.de). Fix file names in comments.
18490
18491 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
18492
18493         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
18494         avoid stack overflow.
18495         (replace_usage): Avoid uninitialized variable warnings.
18496
18497         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
18498         and taking the address of valuetype variables.
18499
18500 2004-01-03  Patrik Torstensson
18501
18502         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
18503         for other purposes than FP later on.
18504
18505 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
18506
18507         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
18508         of tail calls.
18509
18510 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
18511
18512         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
18513
18514 2003-12-30  Patrik Torstensson <p@rxc.se>
18515
18516         * mini-x86.h: Decreased number of availiable fp regs.
18517         Solves corner cases with FP spilling.
18518
18519 2003-12-23  Patrik Torstensson <p@rxc.se>
18520
18521         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
18522         for floating point stack tracking / spilling on x86. 
18523         Fixes bug #49012.
18524         
18525         * basic-float.cs: added float mul overflow test.
18526
18527 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
18528
18529         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
18530
18531 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
18532
18533         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
18534         supports for cond branches that overflow the immediate
18535         overflow offset. mcs can compile simple programs.
18536
18537 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
18538
18539         * exceptions-ppc.c: exception handling support wip:
18540         finally handlers get run on exception.
18541
18542 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
18543
18544         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
18545         profiling.
18546
18547 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
18548
18549         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
18550         initial support for stack walking and unwinding.
18551
18552 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
18553
18554         * driver.c (mono_main): Make corlib-out-of-sync message more 
18555         descriptive. Also remove verify_corlib call.
18556
18557 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
18558
18559         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
18560         not overlap with other call's arguments, too.
18561
18562 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
18563
18564         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
18565         move to arch-specific code the choice of arch-specific
18566         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
18567         * mini.c: ensure emulation calls will not interleave
18568         with other calls.
18569
18570 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
18571
18572         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
18573         the magic trampoline stack frame is dropped before executing
18574         the new method.
18575
18576 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
18577
18578         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
18579         and integer to fp conversions. Added support for overflowing
18580         arguments on the stack. Reserve a couple more registers as temps.
18581         Added support for aot compilation (as output still needs to be
18582         tweaked, though).
18583
18584 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
18585
18586         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
18587         Don't overwrite return register in some corner cases.
18588
18589 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
18590
18591         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
18592         static constructors when AOT compiling.
18593
18594         * driver.c (mono_main): Call mono_check_corlib_version.
18595
18596 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
18597
18598         * cpu-g4.md, basic.cs: fixed div target register.
18599
18600 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
18601
18602         * mini-ppc.c, basic.cs: shl_imm fix with test.
18603
18604 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
18605
18606         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
18607         structures by value. Misc fixes.
18608         * objects.cs: more tests.
18609
18610 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
18611
18612         * mini-ppc.c: lconv.ovf.i implemented.
18613
18614 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18615
18616         * mini.c:
18617         (mini_init): don't error out if someone already called g_thread_init.
18618
18619 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
18620
18621         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
18622         to be any type per the spec. Fix abnormal memory usage when
18623         the same object is repeatedly thrown.
18624
18625 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
18626
18627         * mini.c: check for overruns in IL code.
18628
18629 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
18630
18631         * TODO: Add/remove some todo entries.
18632
18633 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
18634
18635         * driver.c (mono_main): Call mono_verify_corlib.
18636
18637 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
18638
18639         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
18640         This has been moved to mini.c
18641         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
18642         type being casted is marshalbyref it could be a proxy, so instead of
18643         emitting the type check code, emit a call to a runtime method that will
18644         perform the check by calling CanCastTo if needed.
18645
18646 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
18647
18648         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
18649         methods with large stack frames under Win32.
18650
18651 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
18652
18653         * Makefile.am: Distribute regression tests.
18654
18655         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
18656         at the end instead of inserting each variable into the sorted list.
18657
18658         * linear-scan.c (mono_varlist_sort): New helper function.
18659         
18660 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
18661
18662         * mini.c: ensure arguments and locals are within bounds.
18663
18664 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
18665
18666         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
18667         related fixes.
18668
18669 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
18670
18671         * mini.c (mono_cprop_copy_values): Fix crash.
18672
18673         * aot.c: Set verbosity back to 0.
18674         
18675 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
18676
18677         * regalloc.c: complete memory leak fix by Laurent Morichetti
18678         (l_m@pacbell.net).
18679
18680 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
18681
18682         * driver.c (main_thread_handler): Revert the previous patch.
18683
18684         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
18685         under valgrind.
18686
18687         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
18688         memory from the memory pool.
18689
18690         * driver.c (main_thread_handler): Turn on all optimizations when
18691         --aot is used.
18692
18693         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
18694         an array for better performance.
18695
18696         * regalloc.c (mono_regstate_assign): Fix memory leak.
18697
18698         * debug-mini.c (mono_debug_serialize_debug_info): New function to
18699         serialize the debug info.
18700
18701         * debug-mini.c (mono_debug_add_aot_method): New function to load the
18702         debug info from the serialized representation.
18703
18704         * aot.c: Save debug info into the generated file and load it when 
18705         loading a method.
18706
18707         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
18708
18709 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
18710
18711         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
18712         More FP-related fixes.
18713
18714 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
18715
18716         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
18717         and register allocation buglet. Hello world now runs.
18718
18719 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
18720
18721         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
18722         * tramp-ppc.c: fixed class init trampoline.
18723         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
18724
18725 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
18726
18727         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
18728         mini.c: more ppc changes/fixes.
18729
18730 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
18731
18732         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
18733         Also optimize the case when the arguments are the same in the caller 
18734         and in the callee.
18735
18736         * iltests.il: Add tests for tail calls with valuetype arguments.
18737
18738 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
18739
18740         * mini-ppc.c: fixes for struct return type.
18741
18742 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
18743
18744         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
18745         mono_spillvar_offset() to arch-specific code.
18746
18747 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
18748
18749         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
18750
18751 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
18752
18753         * exceptions-x86.c: Fix stack space leaks.
18754         
18755         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
18756         registers from the lmf if the method has save_lmf set.
18757
18758 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
18759
18760         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
18761         of icall wrappers into InvokeInDomain, since these are now per-domain.
18762
18763 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
18764
18765         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
18766         make some opcode emulation and intrinsic ops enabled/disabled 
18767         according to the architecture. More fixes.
18768
18769 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
18770
18771         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
18772
18773 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
18774
18775         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
18776         arch-specific handling for 'this' and struct return type to
18777         arch-specific code.
18778
18779 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18780
18781         * aot.c: prevent divide by zero error when reporting (it happened with
18782         Accessibility.dll).
18783
18784 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
18785
18786         * mini.h (inst_switch): Remove unused macro.
18787
18788 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18789
18790         * aot.c:
18791         (load_aot_module): free 'info->methods' and 'info' properly. No more
18792         "free(): invalid pointer blah" messages when you have an old aot
18793         compiled assembly.
18794
18795 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
18796
18797         * jit-icalls.c, mini.c: Added support for context static fields.
18798
18799 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
18800
18801         * mini.c (mono_method_blittable): Methods which set LastError are not 
18802         blittable either. Fixes #51108.
18803         
18804 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
18805
18806         * mini.c: flush icache.
18807         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
18808
18809 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
18810
18811         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
18812
18813 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
18814
18815         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
18816         safe on IA32.
18817
18818         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
18819         vararg calls.
18820
18821         * inssel.brg (CEE_MKREFANY): Fix AOT case.
18822
18823 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
18824
18825         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
18826         instruction when the result is discarded.
18827
18828         * iltests.il (test_0_div_regalloc): New regression test.
18829
18830         * arrays.cs: Fix compilation error.
18831
18832 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
18833
18834         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
18835         float rules to inssel-x86.brg: sane architectures with FP registers
18836         don't need to implement these rules.
18837
18838 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
18839
18840         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
18841
18842 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
18843
18844         * mini.h, inssel-long32.brg: fixed endianess issues in int64
18845         implementation of 32 bit systems.
18846
18847 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
18848
18849         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
18850         (Jeroen Zwartepoorte).
18851
18852 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
18853
18854         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
18855         the caller and the callee matches.
18856         
18857         * mini.c (mono_method_to_ir): Add comment.
18858
18859         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
18860         signbit is missing on some platforms.
18861
18862 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
18863
18864         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
18865
18866         * mini.c (setup_jit_tls_data): Call the new function.
18867         
18868         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
18869
18870         * mini-x86.c: Add experimental support for fast access to the lmf
18871         structure under NPTL/Linux 2.6.x.
18872
18873 2003-11-06  Martin Baulig  <martin@ximian.com>
18874
18875         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
18876         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
18877         the debugger.
18878
18879 2003-11-02  Martin Baulig  <martin@ximian.com>
18880
18881         * mini.c (inflate_generic_field): New static method.
18882         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
18883         generic instance and the field is declared in a generic type, call
18884         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
18885
18886 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
18887
18888         * mini.h mini.c (mono_method_same_domain): New function to return
18889         whenever the caller and the callee are in the same domain.
18890
18891         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
18892
18893 2003-10-30  Martin Baulig  <martin@ximian.com>
18894
18895         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
18896         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
18897         method parameters.
18898         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
18899         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
18900
18901 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
18902
18903         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
18904         propagation.
18905
18906         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
18907         object here, so it is in the correct appdomain etc.
18908
18909 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
18910
18911         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
18912         already done.
18913         (mono_method_to_ir): Avoid freeing the type created returned from
18914         mono_type_create_from_typespec, since it is put into an internal cache
18915         by the function. Fixes pointer.exe.
18916
18917         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
18918         trampolines for icalls and pinvokes as well. Fixes #33569.
18919
18920 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
18921
18922         * mini.c: Update after appdomain changes.
18923
18924         * mini.c (mono_jit_compile_method_inner): Allways compile native
18925         method wrappers in the root domain, since there can only be one
18926         instance of them, whose address is stored in method->info.
18927
18928 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
18929
18930         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
18931         environment variable. Instead detect automatically whenever running
18932         under valgrind using the magic macro RUNNING_ON_VALGRIND from
18933         valgrind.h.
18934
18935 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
18936
18937         * trace.c, trace.h: New files that implement the new trace option
18938         parsing. 
18939
18940         * driver.c: Document new --trace options.
18941
18942         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
18943         mini-x86.c: Apply:
18944
18945         -       if (mono_jit_trace_calls)
18946         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
18947
18948         * mini.h: prototypes.
18949         
18950 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
18951
18952         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
18953
18954         * mini.c inssel.brg: Implement typedefbyref opcodes.
18955
18956         * mini.c (mono_jit_compile_method): Remove unused local variable.
18957
18958         * mini.c (mono_jit_compile_method_inner): Ditto.
18959         
18960 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
18961
18962         * tramp-x86.c (x86_class_init_trampoline): Fix build.
18963         
18964         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
18965
18966 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
18967
18968         * mini.c (mono_no_aot): Remove unused global variable.
18969
18970         * mini.c: Thread safety fixes.
18971
18972 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
18973
18974         * mini.c (mono_create_class_init_trampoline): Add a lock around
18975         class_init_hash_addr.
18976
18977         * arrays.cs (test_0_newarr_emulation): Add new regression test for
18978         #30073.
18979
18980         * mini.c: Decompose the NEWARR instruction before decomposing its
18981         arguments. Fixes #30073.
18982
18983 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
18984
18985         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
18986         convention.
18987
18988 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
18989
18990         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
18991
18992         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
18993
18994         * driver.c: Add support for compiling icall wrappers to --compile.
18995
18996 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
18997
18998         * inssel.brg: The empty value in class->interface_offsets is -1, not
18999         0. Fixes #49287.
19000
19001 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
19002
19003         * objects.cs: New test for 'is' operator on an array of interfaces.
19004
19005 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
19006
19007         * tramp-ppc.c: update trampoline code to support jumps
19008         and class initialization.
19009
19010 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
19011
19012         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
19013
19014         * inssel.brg (OP_UNBOXCAST): Fix #46027.
19015
19016         * inssel.brg (OP_UNBOX): Remove unused rule.
19017
19018         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
19019         region instead of one for each method. Fixes #47813.
19020
19021 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
19022
19023         * exceptions.cs (test_0_nested_finally): New regression test for
19024         nested exception handlers.
19025
19026         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
19027
19028         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
19029
19030         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
19031         inlining.
19032
19033         * mini.c (mono_method_check_inlining): Make the inlining limit 
19034         configurable by an environment variable.
19035         
19036         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
19037
19038         * mini.h: Bump AOT file version.
19039
19040         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
19041         token, store the image along with the token, since the token might not 
19042         refer to the same image as the method containing the relocation, 
19043         because of inlining.
19044
19045 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
19046
19047         * mini.c (mono_precompile_assemblies): New function to compile
19048         all methods in all loaded assemblies.
19049
19050         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
19051
19052         * regalloc.h regalloc.c (MonoRegState): Change the type of 
19053         iassign and fassign to int*, since they can contain large negative
19054         values if the register is spilled. Also added some comments. Fixes
19055         #45817.
19056
19057         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
19058         under Win32. Fixes #42964.
19059
19060 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
19061
19062         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
19063
19064         * aot.c: Added support for AOT compiling methods which contain calls
19065         to wrappers. Currently, only remoting-invoke-with-check wrappers are
19066         handled.
19067         
19068         * driver.c (compile_all_methods): Run the compilation in a thread
19069         managed by mono. Fixes #44023.
19070
19071         * mini.c (mono_codegen): Print full method name in verbose output.
19072
19073         * mini-x86.c (mono_arch_patch_code): Fix warning.
19074         
19075         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
19076         jumps, since the method we are jumping to might be domain-specific.
19077
19078         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
19079
19080 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
19081
19082         * inssel.brg: string chars are unsigned.
19083
19084 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
19085
19086         * TODO: New todo item.
19087
19088         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
19089         which calls mono_runtime_class_init and patches the call site to
19090         avoid further calls.
19091         (mono_arch_create_class_init_trampoline): New arch specific function 
19092         to create a class init trampoline.
19093         (create_trampoline_code): Generalized so it can create
19094         class init trampolines as well.
19095
19096         * mini.c (helper_sig_class_init_trampoline): New helper variable.
19097         (mono_create_class_init_trampoline): New function to create and cache
19098         class init trampolines.
19099         (mono_find_class_init_trampoline_by_addr): New function to lookup the
19100         vtable given the address of a class init trampoline. Used by the
19101         patching process.
19102         (mono_codegen): Generate a call to a trampoline instead of
19103         mono_runtime_class_init in LDSFLD[A].
19104         (mono_codegen): Add relocations for the new trampoline.
19105         
19106         * mini.h mini-x86.c aot.c: Added a new relocation type: 
19107         MONO_PATCH_INFO_CLASS_INIT.
19108
19109         * mini.h: Bump AOT version number.
19110
19111         * aot.c: Create a copy of the loaded code instead of using the original
19112         so methods which call each other will be close in memory, improving
19113         cache behaviour.
19114         
19115         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
19116         patch since it breaks the regression tests.
19117         
19118         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
19119         for the register saving instruction sequence since the 
19120         frame_state_for function in glibc 2.3.2 don't seem to detect it.
19121
19122 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
19123
19124         * TODO: Fix todo item && remove another.
19125
19126 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
19127
19128         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
19129         previous checkin.
19130
19131         * aot.c: Moved the check for MONO_LASTAOT into the initialization
19132         function of the module.
19133
19134         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
19135         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
19136         --no-aot command line option.
19137
19138 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
19139
19140         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
19141         by Bernie Solomon (bernard@ugsolutions.com).
19142
19143         * inssel.brg: Refactor the interface offset table related code into
19144         its separate functions and add support for the AOT case.
19145
19146 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
19147
19148         * aot.c (mono_aot_get_method_inner): Fix memory leak.
19149         
19150         * aot.c: Added mono_aot_verbose variable and made all debugging
19151         output depend on the value of this variable.
19152
19153         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
19154         method_label and info_label.
19155
19156         * mini.h mini-x86.c aot.c: Added a new relocation type 
19157         MONO_PATCH_INFO_IID for klass->interface_id.
19158
19159         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
19160         the MonoJitInfo structure.
19161
19162         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
19163         a non-root appdomain in shared mode.
19164
19165 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
19166
19167         * aot.c: make aot loader less verbose. Remove free of unused variable.
19168
19169 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
19170
19171         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
19172
19173         * .cvsignore: Added *.dll.
19174
19175         * mini.c (mono_print_tree_nl): New function callable while debugging.
19176
19177         * mini.c (mono_print_code): Export this.
19178
19179         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
19180         patched code.
19181
19182 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
19183
19184         * mini.h (MonoCompile): Added 'jit_info' field.
19185
19186         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
19187         the cfg structure, since it is needed by the AOT compiler.
19188
19189         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
19190
19191         * aot.c: A major rewrite. Changes include:
19192         - save exception tables for methods which have them.
19193         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
19194         to g_module_symbol.
19195         - reworked the file format so it is now much smaller and needs
19196         fewer relocation entries.
19197         
19198 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
19199
19200         * aot.c (load_aot_module): Fix build bustage on platforms without
19201         Boehm GC.
19202
19203 2003-09-04  Martin Baulig  <martin@ximian.com>
19204
19205         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
19206
19207 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
19208
19209         * TODO: Some new optimization ideas.
19210
19211         * aot.c: Move AOT module loading logic here from mono_assembly_open.
19212
19213         * aot.c: Save the optimization flags used to compile the code into
19214         the AOT module.
19215
19216         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
19217         support emitting domain specific code.
19218         
19219         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
19220         no longer domain neutral. It can be made domain neutral by compiling 
19221         with --optimize=shared.
19222
19223         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
19224         between appdomains.
19225
19226         * driver.c mini.h mini.c: New --no-aot debugging option which disables
19227         loading of AOT code.
19228
19229         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
19230         
19231         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
19232         if there is no domain neutrality information.
19233
19234 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
19235
19236         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
19237         format version into the generated library.
19238
19239         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
19240         callee method into the caller since one of them could be shared.
19241
19242         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
19243         system exceptions from AOT code now works.
19244
19245         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
19246         method if it is domain neutral and the callee is not.
19247
19248         * graph.c (cfg_emit_one_loop_level): Fix warning.
19249
19250 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
19251
19252         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
19253         last checkin.
19254
19255 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
19256
19257         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
19258         is needed  by code which is executed before mono_runtime_init ().
19259         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
19260         
19261         * mini.c (mono_thread_abort): Fix warning.
19262         (mono_jit_compile_method): Call static constructor in the AOT case too.
19263
19264         * aot.c (mono_compile_assembly): Fix warning.
19265
19266 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19267
19268         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
19269
19270 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
19271
19272         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
19273
19274         * cpu-pentium.md: Fix the length of call opcodes so they include the
19275         ESP restoring instruction. Fixes #47968.
19276
19277 2003-08-28  Martin Baulig  <martin@ximian.com>
19278
19279         * mini-x86.c (mono_arch_call_opcode): Added support for
19280         MONO_TYPE_GENERICINST.
19281
19282         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
19283
19284 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
19285
19286         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
19287         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
19288
19289         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
19290         metadata_section.
19291
19292 2003-08-26  Martin Baulig  <martin@ximian.com>
19293
19294         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
19295         when reporting an error, set this to the actual error location.
19296         (mono_method_to_ir): Report the correct error location if
19297         get_basic_blocks() returned an error.
19298
19299 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
19300
19301         * mini.c (mono_type_blittable): OBJECT is not blittable.
19302         (mono_method_blittable): Methods which have marshalling descriptors
19303         are not blittable either. Fixes #47842.
19304
19305 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
19306
19307         * driver.c mini.c: Use an environment variable instead of a global 
19308         variable. Also fix the build.
19309
19310         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
19311         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
19312         reporting this. 
19313
19314         * driver.c mini.c: Added --with-valgrind option to turn off some
19315         code which prevents mono from running under valgrind.
19316
19317         * mini.c (mono_emit_call_args): Fixed warning.
19318
19319         * mini.c (mono_emulate_opcode): Fixed warning.
19320
19321 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
19322
19323         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
19324         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
19325         regalloc.c, regalloc.h: specify available registers in arch-specific
19326         code and support floats in the regallocator (patch by Laurent Morichetti 
19327         <l_m@pacbell.net>)
19328
19329 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
19330
19331         * mini.c: mono_thread_current() can be called only after
19332         mono_runtime_init(): rearrange code to not call it early on.
19333
19334 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
19335
19336         * mini.c: allocate jump tables in the code mempools.
19337
19338 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
19339
19340         * mini.c, mini.h: make sure per-thread data allocated by the jit is
19341         freed.
19342
19343 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
19344
19345         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
19346         12 to 16.  This fixes bug #47453.
19347
19348
19349 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
19350
19351         * mini-ppc.c: fixed indexed load and unsigned compares.
19352
19353 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
19354
19355         * mini.c: reenabled installation of handler for
19356           thread abort signal.
19357
19358 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
19359
19360         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
19361         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
19362         until it's fixed and actually useful.
19363
19364 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
19365
19366         * inssel-long32.brg: couple more opcodes implemented.
19367
19368 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
19369         
19370         * mini-sparc.c: Even more opcodes implemeted.
19371
19372 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
19373
19374         * mini-sparc.c: More opcodes implemented.
19375
19376 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
19377
19378         * mini-sparc.c: More opcodes implemented.
19379
19380 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
19381
19382         * inssel-sparc.brg: Add some needed rules.  Direct
19383         copy from PPC.
19384         * Makefile.am: Use inssel-sparc.brg
19385         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
19386         an assert happy for now.
19387
19388 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
19389
19390         * mini-sparc.c: Fixed compile errors.
19391         * exceptions-sparc.c: Same.  We now produce a mono binary 
19392         on sparc-linux.  Yea.
19393
19394 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
19395
19396         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
19397         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
19398         They compile, but do not work.
19399
19400 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
19401
19402         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
19403         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
19404         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
19405         (ct@gentoo.org).
19406
19407 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
19408
19409         * mini.c: more opcodes implemented and better support for generics.
19410
19411 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
19412
19413         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
19414         * mini.c, mini.h: first cut at generics support: some new instructions 
19415         added and changed the behaviour of some of the existing ones.
19416
19417 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
19418
19419         * mini.c: Removed definition of metadata_shared mutex here.
19420
19421 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
19422
19423         * mini-x86.c: make vararg calls work for instance methods.
19424
19425 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
19426
19427         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
19428         returns the arguments in a separte list, now.
19429
19430 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
19431
19432         * aot.c, mini.c: updates for array type representation changes.
19433
19434 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
19435
19436         * mini.c: register function to perform jit shutdown.
19437
19438 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
19439
19440         * mini.c: use a faster allocator if possible.
19441
19442 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
19443
19444         * aot.c: some cleanups and portability changes.
19445
19446 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
19447
19448         * mini.c: use faster allocation for CEE_BOX if possible.
19449
19450 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
19451
19452         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
19453         Moved inlined mempcy code to its own function so that is can be
19454         reused. Added an inline memset function as well (optimized initobj).
19455         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
19456
19457 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
19458
19459         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
19460
19461 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
19462
19463         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
19464         arch code can setup the cpu for CLR execution, if needed.
19465         We use it on x86 to set the precision of FP operations.
19466
19467 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
19468
19469         * mini.c: disable some optimizations if we can guess they'll cost too
19470         much for a given method.
19471
19472 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
19473
19474         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
19475         
19476 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
19477         * mini.h mini.c mini-x86.c: Added instruction level coverage 
19478         info collection support.
19479
19480 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
19481
19482         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
19483         is now implemented in the profiling API. Get rid of a couple of
19484         unnecessary global variables.
19485
19486 2003-06-15  Nick Drochak <ndrochak@gol.com>
19487
19488         * basic-long.cs: tests for negative values for bigmul, and unsigned.
19489         * cpu-g4.md: add op_bigmul and op_bigmul_un
19490         * cpu_pentium.md: add op_bigmul_un
19491         * inssel-long32.brg: add rule for unsigned bigmul
19492         * mini-ops.h: define OP_BIGMUL_UN
19493         * mini-x86.c: THE BUG: handle (un)signed properly
19494         * mini.c: choose unsigned opcode if needed.
19495         This set of patches fixes bug #44291
19496
19497 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
19498
19499         * mini.c (optimize_branches): improved to handle all kinds of
19500         conditional branches.
19501
19502 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
19503
19504         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
19505         don't raise exceptions.
19506
19507 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
19508
19509         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
19510         to arch-specific files.
19511
19512 2003-06-09  Martin Baulig  <martin@ximian.com>
19513
19514         * Makefile.am (libs): Added $(LIBGC_LIBS).
19515
19516 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
19517
19518         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
19519         and OP_ATAN (fixes bug#44293).
19520
19521 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
19522
19523         * Makefile.am, mini-x86.c: rename cpu description array to
19524         pentium_desc, since some compilers define the 'pentium' preprocessor
19525         symbol.
19526
19527 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
19528
19529         * mini.c (mini_select_instructions): add explicit branch if the
19530         following block is not the false target of a conditional branch -
19531         we need this with any optimization that reorder or remove bblocks
19532
19533         * mini.c (optimize_branches): bug fixes
19534
19535 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
19536
19537         * mini.c (mono_method_to_ir): inline static readonly fields
19538
19539         * ssa.c (fold_tree): start cfold support for long (very simple
19540         cases only)
19541
19542         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
19543
19544 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
19545
19546         * inssel.brg: fixed memcpy (bug #44219).
19547
19548 2003-06-05  Dick Porter  <dick@ximian.com>
19549
19550         * driver.c: Set the glib log levels to not abort if g_message
19551         recurses.
19552
19553         g_set_prgname() has to happen before mini_init() so that the
19554         process handle gets the info.
19555         
19556 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
19557
19558         * driver.c: add intrins to the default optimizations to get wider
19559         exposure.
19560
19561 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
19562
19563         * mini.h: some large basic blocks will overflow a 16-bit
19564         integers for symbolic registers.
19565
19566 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
19567
19568         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
19569         (mono_arch_output_basic_block): fix bug 43499 
19570
19571 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
19572
19573         * mini.c: kill duplicated definition of mono_debug_format.
19574
19575 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
19576
19577         * mini-x86.c, arrays.cs: fixed register allocation bug.
19578
19579 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
19580
19581         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
19582
19583         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
19584
19585 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19586
19587         * mini.c:
19588         (print_method_from_ip): also print source location information if
19589         available.
19590
19591 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
19592
19593         * mini.c (mono_find_block_region): bug fix in region code
19594         (mini_method_compile): enable removing unreachable code again, but
19595         only in methods without exception clauses.
19596
19597 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
19598
19599         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
19600         Implemented arglist opcode and handling of TypedReference type.
19601         Fixed x86 call convention when a structure is returned.
19602         Minimal support for calling static vararg methods.
19603
19604 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
19605
19606         * mini.c (mini_method_compile):  always remove unreachable code,
19607         because the code in them may be inconsistent  (access to dead
19608         variables for example).
19609
19610 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
19611
19612         * driver.c, debug-mini.c: warning fixes.
19613
19614 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
19615
19616         * Makefile.am, jit.h, mini.h: install header for embedding mono.
19617
19618 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
19619
19620         * mini.c: thread-static fields are registered in mono_class_vtable(),
19621         so ensure the function is called before checking for them.
19622
19623 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
19624
19625         * mini.c (optimize_branches): fix for bug 43586
19626
19627         * jit-icalls.c (mono_llmult_ovf): added an additional check for
19628         overflow (fixes Bug #43639)
19629
19630 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
19631
19632         * mini.c, objects.cs: allow the use of stobj for primitive types.
19633
19634 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
19635
19636         * mini.c: be less strict about argument checking until we support
19637         running the verifier.
19638
19639 2003-05-27  Nick Drochak <ndrochak@gol.com>
19640
19641         * basic-long.cs: tests for (ulong)int * (ulong)int also
19642         * mini.c: use the same trick for (ulong)int * (ulong)int
19643
19644 2003-05-27  Nick Drochak <ndrochak@gol.com>
19645
19646         * basic-long.cs: add regression test for (long)int * (long)int
19647         * cpu-pentium.md: add op_bigmul specification
19648         * inssel-long32.brg: add OP_BIGMUL rule
19649         * mini-ops.h: add OP_BIGMUL
19650         * mini-x86.c: register allocator: handle case where src1 needs to be
19651         in EAX.
19652         * mini.c: substitute special BIGMUL opcode in the tree for 
19653         (long)int * (long)int
19654
19655 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
19656
19657         * jit-icalls.c: call the type ctor on field access if needed.
19658
19659 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
19660
19661         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
19662         to a method (including results of ldelema, bug#43207).
19663
19664 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
19665
19666         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
19667         colors to show exception handler blocks.
19668
19669         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
19670         (fix for pinvoke7.cs).
19671
19672 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
19673
19674         * mini.h, mini.c: ensure correct initialization order for types that
19675         require it. Prepare for lazy compilation of jit icall wrappers.
19676         Provide a name for opcode emulation to reduce unneeded mallocing.
19677
19678 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
19679
19680         * mini-x86.c: better register restoring code and profiling
19681         support for tail calls.
19682
19683 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
19684
19685         * mini.h, driver.c: prepare for leaf methods optimization.
19686
19687 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
19688
19689         * mini.c: get targets of branches before converting a method.
19690
19691 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
19692
19693         * mini.c (optimize_branches): added some experimental code (disbaled) 
19694
19695 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
19696
19697         * mini.c (optimize_branches): fix branch to branch optimization 
19698
19699         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
19700
19701         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
19702
19703         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
19704
19705         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
19706         if needed.
19707
19708 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
19709
19710         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
19711         enable use of interface variables again.
19712
19713         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
19714         I1 to registers because there is no simply way to sign extend 8bit
19715         quantities in caller saved registers on x86.
19716
19717         * inssel-float.brg: set costs of some rules to 2 so
19718         that monobure always select the arch. specific ones if supplied,
19719         regardless of the order we pass the files to monoburg.
19720
19721 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
19722
19723         * mini.c, mini-x86.c: since the magic trampoline for jumps
19724         can't patch the code directly, we do it as soon as the
19725         method gets compiled.
19726
19727 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
19728
19729         * mini-x86.c, mini.h: introduce a new patching method
19730         to support CEE_JMP and tail calls.
19731         * mini.c: obey tail.call. Don't precompile methods target
19732         of CEE_JMP.
19733         * tramp-x86.c: new trampoline code to handle methods
19734         reached through a jump.
19735
19736 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
19737
19738         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
19739         bit values to registers
19740
19741 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
19742
19743         * mini.c (mono_compile_get_interface_var): share interface
19744         variables if possible.
19745
19746 2003-05-16  Martin Baulig  <martin@ximian.com>
19747
19748         * debug-mini.c (mono_init_debugger): New function to initialize
19749         the debugger.  This is not in the debugger since it needs to
19750         access some of mini's internals.
19751
19752 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
19753
19754         * mini.c (mono_method_to_ir): inlining fixes/cleanups
19755
19756 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
19757
19758         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
19759         for value type handling.
19760
19761 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
19762
19763         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
19764         (mono_method_check_inlining): enable inlining of all kinds of wrappers
19765
19766 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
19767
19768         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
19769           the constructor through a proxy.
19770
19771 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
19772
19773         * jit-icalls.c, inssel.brg: fixes to array element address
19774         calculations.
19775
19776 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
19777
19778         * mini-x86.c (is_regsize_var): allocate pointer to registers
19779
19780 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
19781
19782         * driver.c: fixed typo, added intrins to the set of optimizations
19783         tested with regressions.
19784
19785 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
19786
19787         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
19788         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
19789         test case.
19790
19791 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
19792
19793         * inssel.brg: remove some common pop instructions without side effects
19794
19795 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
19796
19797         * inssel-x86.brg: fixed thinko in int to double conversions.
19798
19799 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
19800
19801         * mini.c, jit-icalls.c: added runtime thread-static variable support.
19802
19803 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
19804
19805         * inssel-long32.brg: two more missing instructions.
19806
19807 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
19808
19809         * mini.c (mono_emit_call_args): set the cil_code for all arguments
19810         if not already set.
19811
19812 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
19813
19814         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
19815         correctly.
19816
19817         * basic-float.cs: Added tests for negative zero.
19818
19819 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
19820
19821         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
19822         a couple of missing operations for long casts, with test cases.
19823
19824 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19825
19826         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
19827
19828 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
19829
19830         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
19831         code size estimation.
19832
19833 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
19834
19835         * mini.c (mono_jit_create_remoting_trampoline): make it work with
19836         abstract methods (fix bug 42542)
19837
19838         * aot.c: add ability to handle array types
19839         
19840 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
19841
19842         * mini.c: Call the _specific versions of the object allocation
19843         functions if possible.
19844
19845 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
19846
19847         * driver.c: call setlocale ().
19848
19849 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
19850
19851         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
19852         windows build.
19853
19854 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
19855
19856         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
19857
19858         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
19859         wrappers (fix bug 42122)
19860
19861 2003-05-04  Martin Baulig  <martin@ximian.com>
19862
19863         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
19864
19865         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
19866         s/mini_set_defaults/mono_set_defaults/g.
19867
19868 2003-05-04  Martin Baulig  <martin@ximian.com>
19869
19870         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
19871
19872 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
19873
19874         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
19875         (reported by Don Roberts).
19876
19877 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
19878
19879         * mini.c: temporarily work around two bugs for this release.
19880
19881 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
19882
19883         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
19884         that contains -export-dynamic and it makes using the ld script
19885         useless.
19886         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
19887
19888 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
19889
19890         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
19891         specific cpu.
19892
19893 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
19894
19895         * mini.c: make sure leave calls all the needed finally blocks,
19896         even when the target jumps out of multiple exception clauses.
19897
19898 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
19899
19900         * ldscript, Makefile.am: add linker script to reduce the number of
19901         exported symbols (should also fix the issues with libwine defining
19902         some of the same symbols in io-layer).
19903
19904 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
19905
19906         * driver.c (mini_main): Avoid assertion when no file name is given on 
19907         the command line.
19908
19909 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
19910
19911         * driver.c: added --version/-V command line option.
19912         Added the inline optimization in the regression tests.
19913
19914 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
19915
19916         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
19917         to the type in the method signature (fixes bug#42134).
19918
19919 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
19920
19921         * mini.c: when inlining, check this is not null only when needed (bug #42135).
19922
19923 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
19924
19925         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
19926
19927 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
19928
19929         * driver.c: fixed bug #42100.
19930
19931 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
19932
19933         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
19934
19935 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
19936
19937         * mini.c: moved most of the code required to do inlining to its own
19938         function so it can be reused. Inline also ctors if appropriate.
19939
19940 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
19941
19942         * Makefile.am: Link with -export-dynamic so shared libs loaded by
19943         the runtime can call mono API functions.
19944
19945 2003-04-27  Martin Baulig  <martin@ximian.com>
19946
19947         * debug-mini.c (mono_debug_init_method): Added
19948         `guint32 breakpoint_id' argument; if the method has a breakpoint,
19949         send a notification to the debugger.
19950
19951         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
19952         running in the Mono Debugger, just pass the breakpoint number to
19953         mono_debug_init_method().
19954
19955         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
19956
19957 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
19958
19959         * mini.c: allow some more unsafe compares.
19960
19961 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
19962
19963         * mini-x86.c, Makefile.am: make distcheck works (partially from
19964         a patch by Richard Lee <r.h.lee@attbi.com>).
19965         * regset.c, regset.h: removed, they are unused.
19966
19967 2003-04-25  Dick Porter  <dick@ximian.com>
19968
19969         * driver.c: Usage reports the name as 'mono' not 'mini'
19970         * exceptions-x86.c: Build and run on freebsd
19971
19972 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
19973
19974         * Makefile.am: install the program with the 'mono' name and
19975         the library as libmono instead of mini and libmini.
19976
19977 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
19978
19979         * driver.c: provide the APIs for the embedding interface of the old jit.
19980
19981 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
19982
19983         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
19984
19985 2003-04-23  Martin Baulig  <martin@ximian.com>
19986
19987         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
19988
19989         * driver.c: Added `--debug' command line argument to enable
19990         debugging support.
19991
19992 2003-04-23  Martin Baulig  <martin@ximian.com>
19993
19994         * debug.[ch]: Removed.  The code is now in
19995         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
19996
19997         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
19998         last six months.
19999
20000 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
20001
20002         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
20003
20004 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
20005
20006         * mini.c:
20007         (mini_cleanup): moved mono_runtime_cleanup call after the call to
20008         mono_domain_finalize.
20009         (mini_method_compile): use mono_method_profile* if the the option is
20010         enabled.
20011
20012 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
20013
20014         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
20015         methods with their wrapper.
20016
20017         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
20018         methods with their wrapper.
20019
20020         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
20021         their wrapper.
20022
20023         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
20024         wrapper.
20025
20026         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
20027         methods.
20028
20029 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
20030
20031         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
20032
20033 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
20034
20035         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
20036         of the mempool. This is slightly faster and uses less memory
20037
20038 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
20039
20040         * mini.c: avoid O(n) allocation for variables.
20041
20042 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
20043
20044         * mini.c: handle items on the stack after inlining methods.
20045
20046 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
20047
20048         * mini.c: make the method->opcode optimization dependent
20049         on MONO_OPT_INSTRINS and do it lazily.
20050
20051 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
20052
20053         * driver.c: print overall results at the end of regression run.
20054
20055 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
20056
20057         * inssel.brg: don't overwrite symbolic registers.
20058
20059 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
20060
20061         * inssel-x86.brg: fix conversion from long to float.
20062
20063 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
20064
20065         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
20066
20067 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
20068
20069         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
20070
20071         * driver.c: Added --print-vtable option as in the old JIT.
20072
20073 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
20074
20075         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
20076
20077 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
20078
20079         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
20080
20081 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
20082
20083         * mini.c regalloc.c regalloc.h: Fix memory leak.
20084
20085 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
20086
20087         * aot.c (mono_aot_get_method): register all used strings
20088
20089 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
20090
20091         * mini.c: always intern strings references with ldstr at compile time.
20092
20093 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
20094
20095         * Makefile.am: add BUILT_SOURCES.
20096
20097 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
20098
20099         * driver.c: give a better error message when the assembly to execute
20100         doesn't have an entry point.
20101
20102 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
20103
20104         * Makefile.am: added hack for automake
20105
20106         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
20107         correct sematics.
20108
20109         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
20110
20111 22003-04-07  Martin Baulig  <martin@ximian.com>
20112
20113         * Makefile.am: Added Makefile.am.
20114
20115         * debugger-main.c: Removed, this is now in the debugger where it
20116         belongs.
20117
20118         * mini.pc.in: Call this package `mini' for the moment.
20119
20120
20121
20122
20123
20124
20125
20126
20127
20128
20129
20130
20131
20132
20133