2010-06-23 Miguel de Icaza <miguel@novell.com>
[mono.git] / mono / mini / ChangeLog
1 2010-06-23  Miguel de Icaza  <miguel@novell.com>
2
3         * Makefile.am: Build the mono-sgen binary a Mono VM with the Sgen
4         GC enabled as well as libmono-sgen-2.0 and libomonosgen-static
5
6         * driver.c: Do not depend on the USED_GC_NAME when using SGen, use
7         it only for Boehm diagnostics.
8
9         * Makefile.am: Make the file a bit more consistent.
10
11         * debug-debugger.c: Wrap the entire file with an #ifdef
12         MONO_DEBUGGER_SUPPORTED to simplify the build.
13
14         * Makefile.am: Fix the opcodes build issue by including the
15         source, not by including the .lo file directly
16
17         Always bring the MDB sources into the build, to drop the
18         dependency on the AM_CONDITIONAL from configure.in as the hard
19         debugger supports Boehm, but not Sgen, this simplifies the build. 
20
21         * Renamed the *.s files into *.S
22
23 2010-06-24 Rodrigo Kumpera  <rkumpera@novell.com>
24
25         * method-to-ir.c (mono_emit_wb_aware_memcpy): Don't emit bitmap
26         wb for now on 64bits systems while issues with valuetype returns
27         are not fixed.
28
29 2010-06-24  Zoltan Varga  <vargaz@gmail.com>
30
31         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Add support for using a standard set of
32         passes by calling createStandardFunctionPasses ().
33
34 2010-06-23  Zoltan Varga  <vargaz@gmail.com>
35
36         * mini.h (MONO_INS_HAS_NO_SIDE_EFFECT): Add OP_LDADDR.
37
38 2010-06-22  Zoltan Varga  <vargaz@gmail.com>
39
40         * method-to-ir.c (mono_method_to_ir): Don't mark loads from OP_LDADDR with
41         MONO_INST_FAULT.
42
43         * mini-llvm.c (mono_llvm_emit_method): Recalculate MONO_INST_INDIRECT flags to
44         allow better optimization if the OP_LDADDR which caused the flag to be set was
45         optimized away.
46
47         * exceptions-amd64.c (get_throw_trampoline): Align the stack properly.
48
49         * mini-amd64.c (mono_arch_emit_exceptions): Pass only the type token index, not
50         the type token.
51
52         * mini-llvm.c (emit_entry_bb): Save the this argument only in gshared methods.
53
54         * mini-llvm.c: Fix a couple memory leaks. Get rid of a few #ifdefs.
55
56 2010-06-22  Zoltan Varga  <vargaz@gmail.com>
57
58         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Call patch_callsite ()
59         to handle the code sequence generated for non-near calls. Fixes #616056.
60
61 2010-06-21  Zoltan Varga  <vargaz@gmail.com>
62
63         * exceptions-x86.c (mono_arch_find_jit_info_ext): Adjust eip in the lmf case too.
64
65         * exceptions-x86.c: Add a resume_unwind trampoline for LLVM.
66
67         * mini-llvm.c (exception_cb): For nested clauses, add the same try range to the
68         nesting clause too.
69         (mono_llvm_check_method_supported): Enable llvm for methods with nested clauses.
70         (mono_llvm_emit_method): Instead of calling 'mono_resume_unwind' directly, call a
71         trampoline which saves the context, so changes made to callee saved registers in
72         finally clauses are visible to a nesting catch clause.
73
74         * exceptions-amd64.c: Add a resume_unwind trampoline for LLVM.
75
76         * mini-exceptions.c (mono_handle_exception_internal): Fix support for nested clauses
77         in LLVM compiled code.
78         (mono_handle_exception_internal): Add a 'ctx' argument containing the state after
79         the finally handler has ran.
80
81         * mini.h (ResumeState): New structure containing information required to resume
82         exception handling after executing LLVM compiled finally clauses.
83
84         * exceptions-amd64.c (get_throw_trampoline): Clean up the amd64 throw trampolines a
85         bit, by passing all the registers as one argument.
86
87 2010-06-19  Zoltan Varga  <vargaz@gmail.com>
88
89         * tramp-amd64.c (mono_arch_create_generic_trampoline): Increase the buf len a little,
90         to avoid an assert.
91
92 2010-06-18  Zoltan Varga  <vargaz@gmail.com>
93
94         * aot-compiler.c (emit_klass_info): Mark unloadable classes properly.
95
96         * aot-compiler.c aot-runtime.c: Fix LLVM support.
97
98         * mini-llvm.c: When emitting OP_CALL_HANDLER, avoid branching directly to the landing
99         pad, branch to a new bblock instead.
100
101         * aot-compiler.c (emit_method_code): Use cfg->header instead of the header of
102         orig_method.
103
104         * exceptions-amd64.c (mono_arch_exceptions_init): Fix fullaot support.
105
106         * mini-llvm.c (process_bb): Add support for OP_SQRT when using the LLVM mono branch.
107
108 2010-06-17  Geoff Norton  <gnorton@novell.com>
109
110         * mini-arm.h:
111         * exceptions-arm.c: Move the UCONTEXT macros to mono-sigcontext.h so they
112         can be used by sgen.
113
114 2010-06-17  Zoltan Varga  <vargaz@gmail.com>
115
116         * aot-compiler.c (emit_klass_info): Handle type load exceptions.
117
118         * method-to-ir.c (mono_method_to_ir): Avoid a crash if mono_method_get_header ()
119         fails.
120
121         * exceptions-x86.c (mono_x86_throw_corlib_exception): Negate the decrement of
122         the ip done by throw_exception (), it is not needed for corlib exceptions.
123
124 2010-06-17 Rodrigo Kumpera  <rkumpera@novell.com>
125
126         * method-to-ir.c (mono_emit_wb_aware_memcpy): Simplify this function.
127         Call new jit icall mono_gc_wbarrier_value_copy_bitmap for vt wbarrier
128         of size > 5 words. This support fast barriers for value types up to
129         256/512 bytes which     beyond that the copying itself is the major issue.
130
131         * method-to-ir.c (mini_emit_stobj): The intrinsic version is safe
132         for gsharing, so use it.
133
134         This eliminate all calls to mono_value_copy from managed code in
135         gmcs, fsharp and ipy.
136
137         This gives a 2% perf boost on ipy and 1% on gmcs over previous patches.
138
139         Even thou a lot of mono_value_copy calls were eliminated from fsharp,
140         performance kept
141
142         * mini.c (mini_init): Register new icall.
143
144 2010-06-17 Rodrigo Kumpera  <rkumpera@novell.com>
145
146         * method-to-ir.c (mono_emit_wb_aware_memcpy): Handle nested valuetypes.
147         This eliminates 2% of mono_value_copy calls on ipy and 12% on fsharp.
148
149 2010-06-17 Rodrigo Kumpera  <rkumpera@novell.com>
150
151         * method-to-ir.c (mini_emit_stobj): Don't call mono_value_copy for small
152         value types as the overhead is huge. Manually expand it up to 5 words to
153         avoid code bloat.
154
155         This improves gmcs times by 5% and unmodified binary-tree by 78%. The later
156         is an exception that performance is dominated by mono_value_copy.
157
158         This puts sgen about 5% ahead of boehm in terms of wall-clock on a Core2Quad.
159
160 2010-06-17  Zoltan Varga  <vargaz@gmail.com>
161
162         * mini-llvm.c (process_call): Disable LLVM for calls to generic class init
163         trampolines on x86, since those have their own cconv.
164
165         * exceptions-x86.c (mono_arch_exceptions_init): Implement the llvm throw corlib
166         exception trampolines.
167
168         * tramp-x86.c: Add xdebug info for a few trampolines.
169
170         * mini-llvm.c: Set the name of the arguments.
171
172         * mini-llvm.c (emit_cond_system_exception): Pass the ip of to throw_corlib_trampoline
173         using a block address if using the LLVM mono branch.
174
175         * exceptions-amd64.c (mono_arch_exceptions_init): Add new LLVM throw corlib exception
176         trampolines.
177
178 2010-06-15  Zoltan Varga  <vargaz@gmail.com>
179
180         * mini-ppc.c (mono_arch_get_cie_program): Define this for powerpc too.
181
182         * mini-llvm.c (process_bb): Add a missing CHECK_FAILURE.
183
184         * mini.c (mini_init): Remove some of the llvm restrictions, they are no longer needed.
185
186         * method-to-ir.c (mono_method_to_ir): Enable fast virtual calls when using llvm.
187
188         * mini-trampolines.c (mono_llvm_vcall_trampoline): Rewrite this to use one vtable
189         trampoline per vtable slot index. The slot, along with the 'this' argument is enough
190         to identify the vtable slot address plus the method which needs to be compiled.
191
192         * mini.c (mini_get_vtable_trampoline): Use one vtable trampoline per vtable slot when
193         using llvm.
194
195         * mini-x86.c (get_call_info_internal): Change the managed calling convention so
196         'this' is always passed as the first argument, before the vtype ret arg. This
197         simplifies get_this_arg_reg () and LLVM integration.
198
199         * mini-amd64.c (get_call_info): Fix the handling of MONO_TYPE_TYPEDBYREF after
200         the latest changes.
201
202         * tramp-x86.c (mono_arch_create_generic_trampoline): Emit unwind info for
203         these trampolines.
204
205         * mini-x86.c (mono_arch_get_cie_program): Implement this for x86.
206
207         * mini-llvm.c: Fix compilation with llvm 2.6.
208
209         * mini-amd64.c (CallInfo): Fix the position of the vret_arg_index field.
210
211         * mini-llvm.c (mono_llvm_emit_method): Fix the build if LLVM_MONO_BRANCH is not
212         defined.
213
214         * mini-amd64.c (get_call_info): Change the managed calling convention so 'this'
215         is always passed as the first argument, before the vtype ret arg. This simplifies
216         get_this_arg_reg () and LLVM integration.
217
218 2010-06-14 Rodrigo Kumpera  <rkumpera@novell.com>
219
220         * method-to-ir.c (mono_method_to_ir): Add support for .ctor intrinsics.
221
222         * method-to-ir.c (mini_emit_inst_for_ctor): New function for .ctor intrinsics.
223         For now just call simd intrinsics. This makes "x[0] = new Vector4f (10)" 
224         translate into much nicer code.
225
226 2010-06-14  Zoltan Varga  <vargaz@gmail.com>
227
228         * mini-llvm.c (sig_to_llvm_sig_full): Add a 'sinfo' out argument which returns
229         parameter index information. Use this to simplify a lot of code.
230
231         * unwind.c (mono_unwind_decode_fde): Handle augmentions using a loop.
232
233 2010-06-12  Zoltan Varga  <vargaz@gmail.com>
234
235         * aot-compiler.c (compile_method): Add a 'depth' parameter to add_generic_class too
236         to fix infinite generic recursion. Fixes #612702.
237
238 2010-06-11  Zoltan Varga  <vargaz@gmail.com>
239
240         * object.c: Use a callback to create IMT trampolines, allowing the usage of one
241         imt trampoline per imt slot when using LLVM.
242
243 2010-06-10  Jonathan Pryor  <jpryor@novell.com>
244
245         * mini.c (mini_cleanup): Call mono_runtime_shutdown(). Fixes #438454.
246
247 2010-06-09  Levi Bard  <levi@unity3d.com>
248
249         * debugger-agent.c: Clear unloaded types on appdomain unload.
250
251 2010-06-08  Zoltan Varga  <vargaz@gmail.com>
252
253         * liveness.c (visit_bb): Make the component vregs of long vars volatile as well.
254         Fixes #612206.
255
256         * exceptions.cs: Add a test.
257
258 2010-06-06  Zoltan Varga  <vargaz@gmail.com>
259
260         * mini-llvm.c (mono_llvm_check_method_supported): Only disable llvm for nested clauses.
261
262         * mini.c (mini_method_compile): Move the LLVM checks to a function in mini-llvm.c.
263
264         * mini.c (mono_jit_runtime_invoke): Initialize *exc to NULL before calling the wrapper,
265         so it doesn't have to do it.
266
267         * helpers.c (mono_disassemble_code): Flush stdout, so the output from the spawned
268         process does not mix with ours.
269
270         * mini-llvm.c (mono_llvm_emit_method): Refactor this giant function into smaller
271         ones.
272
273         * mini-llvm.c method-to-ir.c ir-emit.h: When using the llvm mono branch, allow
274         loads/stores which can throw exceptions inside clauses.
275
276 2010-06-05  Zoltan Varga  <vargaz@gmail.com>
277
278         * mini-llvm.c (mono_llvm_emit_method): Fix support for finally clauses with more than
279         one ENDFINALLY.
280
281         * mini.c (mini_init): Register mono_resume_unwind as an icall.
282
283 2010-06-03  Zoltan Varga  <vargaz@gmail.com>
284
285         * dwarfwriter.c: Update after the mono_debug_lookup_locals () changes.
286
287         * debugger-agent.c (method_commands_internal): Ditto. Return scope information for
288         locals.
289
290 2010-06-03  Zoltan Varga  <vargaz@gmail.com>
291
292         * debugger-agent.c (appdomain_unload): Clear all breakpoint instances in the dying
293         appdomain.
294
295 2010-06-02  Zoltan Varga  <vargaz@gmail.com>
296
297         * method-to-ir.c (set_rgctx_arg): New helper function to remove some duplicate code.
298         Use a separate generic class init trampoline for llvm, since it needs a different
299         signature.
300
301         * unwind.c (mono_unwind_decode_fde): Make this decode the mono specific LSDA which
302         includes the location of this/rgctx.
303
304         * mini-llvm.c aot-runtime.c: Enable generic sharing for llvm if using the LLVM mono
305         branch.
306
307 2010-06-01  Zoltan Varga  <vargaz@gmail.com>
308
309         * mini.c (mini_method_compile): Enable llvm+exceptions on LLVM SVN.
310
311         * mini-llvm.c (emit_cond_system_exception): Disable llvm when this occurs in a
312         clause.
313
314 2010-05-31  Zoltan Varga  <vargaz@gmail.com>
315
316         * unwind.c (mono_unwind_decode_fde): The FDE only has an augmention if the CIE
317         says so.
318
319         * aot-runtime.c (decode_eh_frame): Fix an assert condition.
320
321         * aot-compiler.c (patch_to_string): New debugging helper function.
322
323 2010-05-30  Zoltan Varga  <vargaz@gmail.com>
324
325         * exceptions-amd64.c (get_throw_trampoline): Fix the xdebug name of the corlib
326         trampoline.
327
328         * exceptions-x86.c (mono_arch_exceptions_init): Create an llvm rethrow trampoline too.
329
330         * mini-llvm.c (mono_llvm_emit_method): Implement OP_RETHROW.
331
332         * method-to-ir.c (mono_method_to_ir): Emit a OP_NOT_REACHED after a rethrow.
333
334         * mini-llvm.c (emit_call): Compute the containing try clause correctly for nested
335         clauses.
336
337         * mini.c (create_jit_info): Print EH clause info for LLVM too.
338
339 2010-05-28  Mark Probst  <mark.probst@gmail.com>
340
341         * method-to-ir.c (mono_method_to_ir): Emit a write barrier for
342         cpobj with reference types.
343
344 2010-05-28  Mark Probst  <mark.probst@gmail.com>
345
346         * method-to-ir.c (mono_method_to_ir): Only explicitly add the
347         write barrier for reference types.
348
349 2010-05-27  Zoltan Varga  <vargaz@gmail.com>
350
351         * mini-s390x.c (mono_arch_output_basic_block): Applied patch from Aurelien Minvielle
352         . Fix OP_ATOMIC_EXCHANGE_I4 on s390x. Fixes #609023.
353
354 2010-05-31  Martin Baulig  <martin@ximian.com>
355
356         Fix #608271.
357
358         * debugger-agent.c (breakpoints_cleanup): Iterate over `event_requests', call
359         clear_breakpoint() on all breakpoint events and remove them from the list.
360
361 2010-05-27  Martin Baulig  <martin@ximian.com>
362
363         Fix #605698.
364
365         * debugger-agent.c (method_commands, type_commands): Temporarily
366         set the appdomain while executing this method; do all metadata
367         calls in the debuggee's appdomain where user assemblies are loaded.
368
369 2010-05-27  Zoltan Varga  <vargaz@gmail.com>
370
371         * mini-s390x.c (mono_arch_get_delegate_invoke_impls): Fix the s390x build.
372
373 2010-05-26 Rodrigo Kumpera  <rkumpera@novell.com>
374
375         * method-to-ir.c (mono_method_to_ir): Add missing write barrier to stobj.
376
377 2010-05-26  Zoltan Varga  <vargaz@gmail.com>
378
379         * method-to-ir.c: Instead of freeing method headers immediately, save them in a list in
380         MonoCompile, and free them in mono_destroy_compile (), since the MonoType's in them could
381         be referenced even after the header is freed.
382
383         * aot-runtime.c: Remove the half finished support for decoding the .arm_exidx
384         section.
385
386 2010-05-25  Zoltan Varga  <vargaz@gmail.com>
387
388 2010-05-25  Bill Holmes  <billholmes54@gmail.com>
389
390         * genmdesc.c (main): Fixing the detection of the nacl switch.
391
392         Code is contributed under MIT/X11 license.
393
394 2010-05-25  Zoltan Varga  <vargaz@gmail.com>
395
396         * exceptions-amd64.c (mono_arch_find_jit_info_ext): Adjust the ip for LMF frames too.
397
398         * mini-llvm.c aot-compiler.c: More LLVM 2.8 updates.
399
400         * mini.h (LLVM_CHECK_VERSION): New helper macro.
401
402 2010-05-25  Miguel de Icaza  <miguel@novell.com>
403
404         * genmdesc.pl (build_spec): Add support for nacl: keyword also to
405         the Perl program
406
407         * genmdesc.c: Added support for nacl: key on the machine
408         description files to support the extra space required by Google
409         Native Client.
410
411 2010-05-23  Zoltan Varga  <vargaz@gmail.com>
412
413         * mini.c (mono_jit_compile_method_inner): Propagate exceptions in one more place.
414
415 2010-05-23  Zoltan Varga  <vargaz@gmail.com>
416
417         * mini.c (mono_jit_compile_method_inner): Propagate exceptions from
418         mono_runtime_class_init_full ().
419         (mono_jit_runtime_invoke): Ditto. Fixes #608073.
420
421 2010-05-22  Zoltan Varga  <vargaz@gmail.com>
422
423         * mini-llvm.c mini-llvm-cpp.cpp: Update after LLVM 2.8 changes.
424
425 2010-05-21  Zoltan Varga  <vargaz@gmail.com>
426
427         * mini-ppc.c (mono_arch_output_basic_block): Use ins->inst_c1 instead of p1, the
428         two are not the same on ilp32.
429
430 2010-05-21  Zoltan Varga  <vargaz@gmail.com>
431
432         * mini.c (mono_jit_compile_method_inner): Remove a DISABLE_JIT block which was
433         added by mistake.
434
435         * mini-ppc.c: Fix the DISABLE_JIT build.
436
437 2010-05-20  Zoltan Varga  <vargaz@gmail.com>
438
439         * aot-runtime.c (decode_resolve_method_ref): Rename this from decode_method_ref_2.
440         (make_writable): Remove this unused function.
441
442 2010-05-20  Zoltan Varga  <vargaz@gmail.com>
443
444         * aot-compiler.c: Collect all information about a PLT entry into a separate MonoPltEntry
445         structure. Make the labels to plt entries local symbols instead of assembler local
446         labels, since tha latter causes problems for the iphone linker.
447
448 2010-05-19  Zoltan Varga  <vargaz@gmail.com>
449
450         * mini-ppc.c (mono_ppc_is_direct_call_sequence): Handle one more case with ilp32.
451
452 2010-05-17  Zoltan Varga  <vargaz@gmail.com>
453
454         * mini-ppc.c (mono_ppc_is_direct_call_sequence): Handle ilp32.
455         (ppc_patch_full): Ditto.
456
457         * mini-arm.c (mono_arch_build_imt_thunk): Fix the fail_tramp case.
458
459         * method-to-ir.c (mono_method_to_ir): Use fast generic virtual method invocation
460         if gshared is enabled, to avoid asserts in the trampoline code.
461
462         * mini-ia64.c (mono_arch_build_imt_thunk): Implement generalized imt thunks
463         on ia64.
464
465 2010-05-15  Geoff Norton  <gnorton@novell.com>
466
467         * dwarfwriter.c, xdebug.c: Fix a pretty large leak when running in 
468         xdebug mode.
469
470 2010-05-14  Geoff Norton  <gnorton@novell.com>
471
472         * exceptions-x86.c: Fix the alignment of this trampoline so we dont get a 
473         misaligned stack on darwin.
474
475 2010-05-14  Zoltan Varga  <vargaz@gmail.com>
476
477         * mini-arm.c aot-compiler.c: Implement support for generalized imt thunks on
478         arm.
479
480 2010-05-14  Zoltan Varga  <vargaz@gmail.com>
481
482         * xdebug.c: Fix ARM support.
483
484 2010-05-13  Zoltan Varga  <vargaz@gmail.com>
485
486         * exceptions-x86.c (mono_arch_handle_exception): Resume from the signal handler
487         and do most of the work on the normal stack.
488         (mono_x86_get_signal_exception_trampoline): New x86 specific trampoline function.
489
490 2010-05-13  Zoltan Varga  <vargaz@gmail.com>
491
492         * aot-compiler.c: Put non-code data into the .rodata section on linux.
493
494 2010-05-13  Zoltan Varga  <vargaz@gmail.com>
495
496         * exceptions-arm.c (mono_arch_handle_exception): Fix the cross-compile case.
497
498 2010-05-13  Zoltan Varga  <vargaz@gmail.com>
499
500         * exceptions-arm.c (mono_arch_handle_exception): Resume from the signal handler
501         and do most of the work on the normal stack.
502
503 2010-05-13  Zoltan Varga  <vargaz@gmail.com>
504
505         * exceptions-amd64.c (mono_arch_handle_exception): Resume from the signal handler
506         and do most of the work on the normal stack even if sigaltstack is disabled.
507
508 2010-05-12  Zoltan Varga  <vargaz@gmail.com>
509
510         * exceptions-amd64.c (mono_arch_sigctx_to_monoctx): Simplify this now that
511         UCONTEXT_REG_ constants are available on linux as well.
512         (mono_arch_monoctx_to_sigctx): Ditto.
513         (mono_arch_ip_from_context): Ditto.
514
515 2010-05-12  Zoltan Varga  <vargaz@gmail.com>
516
517         * debugger-agent.c (set_breakpoint): Fix setting of pending breakpoints in
518         other domains.
519
520 2010-05-11  Zoltan Varga  <vargaz@gmail.com>
521
522         * aot-compiler.c (emit_plt): Don't align the plt to a pagesize on x86, it is
523         no longer needed.
524
525 2010-05-10  Zoltan Varga  <vargaz@gmail.com>
526
527         * debugger-agent.c (insert_breakpoint): Print a more descriptive error message
528         if a breakpoint cannot be inserted.
529
530 2010-05-08  Zoltan Varga  <vargaz@gmail.com>
531
532         * aot-compiler.c (emit_and_reloc_code): Fix a warning.
533
534 2010-05-07  Zoltan Varga  <vargaz@gmail.com>
535
536         * debugger-agent.c (frame_commands): Return an error instead of asserting if
537         no JIT info is found for the method.
538
539 2010-05-05 Jonathan Chambers  <joncham@gmail.com>
540
541         * debugger-agent.c (mono_debugger_agent_thread_interrupt): Protect against a NULL sigctx
542         in debug printf.
543
544 2010-05-05  Zoltan Varga  <vargaz@gmail.com>
545
546         * mini-amd64.c (mono_arch_get_trampolines): New arch specific function returning
547         a list of arch specific trampolines.
548
549         * aot-compiler.c (emit_trampolines): Use it.
550
551 2010-05-05  Zoltan Varga  <vargaz@gmail.com>
552
553         * tramp-<ARCH>.c exceptions-<ARCH>.c mini-trampolines.c mini-exceptions.c
554         aot-compiler.c: Use the _full trampoline creation functions on all platforms,
555         get rid of the _full from their name.
556
557 2010-05-05  Zoltan Varga  <vargaz@gmail.com>
558
559         * tramp-x86.c (mono_arch_create_generic_trampoline): Call
560         get_nullified_class_init_trampoline to remove some code duplication.
561
562 2010-05-03  Zoltan Varga  <vargaz@gmail.com>
563
564         * mini-x86.c (mono_arch_emit_prolog): Fix full-aot support for thread
565         attach.
566
567 2010-05-01  Zoltan Varga  <vargaz@gmail.com>
568
569         * mini-amd64.c (mono_arch_emit_load_aotconst): New arch-specific function.
570
571         * tramp-amd64.c: Use emit_load_aotconst to remove some code duplication.
572
573         * aot-runtime.c (init_plt): Make the default entries point to the AOT trampoline,
574         there is no need to jump through the first plt entry.
575
576         * aot-runtime.c (mono_aot_get_named_code): Rename to mono_aot_get_trampoline.
577
578         * aot-runtime.c (mono_aot_get_plt_entry): Move the arch specific parts to an
579         arch-specific function.
580         (mono_aot_get_plt_info_offset): Ditto.
581
582         * aot-runtime.c (mono_aot_register_jit_icall): New helper function called from
583         mono_arch_init () to register jit icalls called from full-aot trampolines.
584         (load_function): Get rid of the arch specific #ifdefs, move the relevant code
585         to mini-<ARCH>.c.
586
587         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception_full): Get rid of
588         the specialized throw corlib exception trampoline, use a variant of the normal
589         trampoline along with a new C function which does the call to
590         mono_exception_from_token (), just like on x86.
591
592 2010-05-01  Zoltan Varga  <vargaz@gmail.com>
593
594         * mini-trampolines.c aot-compiler.c tramp-<ARCH>.c exceptions-<ARCH>.c:
595         Reorganize the full aot trampoline creation functions, instead of taking a bunch
596         of out arguments, they will now take a MonoTrampInfo** out argument. Simplify
597         some code in aot-compiler.c because of this. Remove the non-full aot trampoline
598         creation functions on architectures which have the full-aot ones.
599
600 2010-05-01  Zoltan Varga  <vargaz@gmail.com>
601
602         * mini-ppc.c (mono_arch_decompose_long_opts): Fix LNEG.
603
604 2010-05-01  Zoltan Varga  <vargaz@gmail.com>
605
606         * mini-ppc.c (mono_arch_emit_exceptions): Initialize exc_throw_pos/found
607         explicitly, this seems to be required by some gcc versions at -O2.
608
609         * mini-arm.c: Ditto.
610
611 2010-05-01  Zoltan Varga  <vargaz@gmail.com>
612
613         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Fix full-aot support for
614         has_target delegate invokes.
615
616 2010-05-01  Zoltan Varga  <vargaz@gmail.com>
617
618         * mini.h (MonoAotTrampInfo): Rename this to MonoTrampInfo, add patches/unwind
619         info fields.
620
621         * aot-compiler.c (mono_aot_tramp_info_create): Rename to mono_tramp_info_create,
622         add patches/unwind info arguments, move to mini.c.
623
624         * mini-<ARCH>.c aot-compiler.c: Update after the above changes.
625
626 2010-04-30  Zoltan Varga  <vargaz@gmail.com>
627
628         * debugger-agent.c (type_commands): Add a new CMD_TYPE_GET_SOURCE_FILES_2
629         command which returns full path names.
630
631 2010-04-29  Zoltan Varga  <vargaz@gmail.com>
632
633         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline_full): Set the
634         code_size output variable.
635
636         * mini-x86.c (mono_arch_emit_prolog): Compute the GOT addr before calling
637         mono_get_lmf_addr.
638         
639 2010-04-29  Zoltan Varga  <vargaz@gmail.com>
640
641         * mini-x86.c (mono_arch_emit_prolog): Remove a disable_aot which is not needed.
642         (mono_arch_cpu_optimizazions): Make this a no-op when running with full aot.
643         (mono_arch_cpu_enumerate_simd_versions): Ditto.
644
645 2010-04-29  Zoltan Varga  <vargaz@gmail.com>
646
647         * image-writer.c (asm_writer_emit_alignment): Use ilog2 for alignments for the
648         apple assembler.
649
650 2010-04-29  Zoltan Varga  <vargaz@gmail.com>
651
652         * mini-x86.c (mono_arch_emit_prolog): Avoid an assert in full-aot mode.
653
654 2010-04-29  Zoltan Varga  <vargaz@gmail.com>
655
656         * aot-runtime.c (load_function): Use TARGET_X86 instead of __i386__.
657
658 2010-04-28  Zoltan Varga  <vargaz@gmail.com>
659
660         * aot-compiler.c (emit_got_info): Double the buffer size to avoid an assert.
661
662 2010-04-27  Zoltan Varga  <vargaz@gmail.com>
663
664         * dwarfwriter.c (emit_line_number_info): Get rid of the usage of GArray, so
665         line number support works with eglib.
666
667 2010-04-27  Miguel de Icaza  <miguel@novell.com>
668
669         * driver.c, mini.c: Since linking with LLVM makes the default Mono
670         dirty an extra 70kb pages on startup we are now going to choose a
671         different strategy: ship mono and mono-llvm binaries, with the
672         second being the one that links with LLVM and defaults to LLVM
673         being enabled.
674
675 2010-04-27  Zoltan Varga  <vargaz@gmail.com>
676
677         * tramp-x86.c exceptions-x86.c mini-x86.c aot-compiler.c aot-runtime.c: 
678         Implement full-aot support on x86.
679
680         * method-to-ir.c: Always use a got var on x86 too, just like on ppc, because the
681         trampolines depend on it. Use MONO_ARCH_GOT_REG as the got register, instead of
682         the first register returned by get_global_int_regs ().
683
684         * cpu-x86.md: Fix the length of insertx_u1_slow.
685
686         * iltests.il.in: Disable tail call tests when running with full-aot.
687
688 2010-04-26  Zoltan Varga  <vargaz@gmail.com>
689
690         * method-to-ir.c (mono_op_to_op_imm_noemul): Fix a warning.
691
692 2010-04-24  Mark Probst  <mark.probst@gmail.com>
693
694         * mini.c, driver.c: Initialize mono_use_llvm in mono_main(), not
695         in the initializer, because it's non-constant.
696
697 2010-04-23  Miguel de Icaza  <miguel@novell.com>
698
699         * mini.c: Use MONO_USE_LLVM as an environment flag to turn the use
700         of LLVM on by default.   Used for buildbots and other setups.
701
702 2010-04-24  Zoltan Varga  <vargaz@gmail.com>
703
704         * mini.c: Set mono_use_llvm to FALSE even if mono is compiled with LLVM.
705
706 2010-04-23  Kornel Pal  <kornelpal@gmail.com>
707
708         * method-to-ir.c (mono_method_to_ir): Enable inlining of pointer-sized unmanaged
709         initonly static fields when using moving GC.
710
711         Contributed under MIT/X11 license.
712
713 2010-04-23  Geoff Norton  <gnorton@novell.com>
714
715         * mini-amd64.h: Darwin x86_64 support.
716
717 2010-04-20  Jonathan Pryor  <jpryor@novell.com>
718
719         * exceptions-arm.c: Remove platform checks in favor of configure checks.
720
721 2010-04-19  Jonathan Pryor  <jpryor@novell.com>
722
723         * exceptions-arm.c: Add Android support for sigcontext structure.
724
725 2010-04-16  Zoltan Varga  <vargaz@gmail.com>
726
727         * mini.c (mono_jit_compile_method_inner): Implement the check for native func
728         wrappers correctly now that their wrapper info is NULL.
729
730 2010-04-16  Zoltan Varga  <vargaz@gmail.com>
731
732         * mini.c (mono_jit_compile_method_inner): Avoid calling
733         mono_marshal_method_from_wrapper () for native func wrappers. Fixes #597189.
734
735 2010-04-16  Zoltan Varga  <vargaz@gmail.com>
736
737         * genmdesc.c (inst_name): Define this as a copy of mono_inst_name in helpers.c,
738         so the latter can be #ifndef DISABLE_JIT-ed.
739
740         * helpers.c: Comment out the opstr array if DISABLE_JIT is set.
741
742 2010-04-16  Zoltan Varga  <vargaz@gmail.com>
743
744         * method-to-ir.c driver.c: Disable a few more things when DISABLE_JIT is set.
745
746 2010-04-16  Zoltan Varga  <vargaz@gmail.com>
747
748         * mini-llvm.c (emit_entry_bb): Fix support for simd arguments passed on the
749         stack.
750
751 2010-04-15  Zoltan Varga  <vargaz@gmail.com>
752
753         * debugger-agent.c (type_commands): Call mono_class_setup_methods () before
754         calling mono_class_num_methods (). Fixes #592244.
755
756 2010-04-14  Zoltan Varga  <vargaz@gmail.com>
757
758         * mini-x86.c (mono_arch_get_llvm_call_info): Handle empty structures correctly.
759
760         * mini-llvm.c: Disable LLVM for calls with non-default calling conventions.
761
762 2010-04-14  Zoltan Varga  <vargaz@gmail.com>
763
764         * method-to-ir.c (handle_box_inst): Merge into handle_box, simplify the merged
765         version.
766         * (handle_alloc): Ditto.
767         (mono_method_to_ir): Remove the constrained call restriction added by a previous
768         change, its not needed anymore.
769
770 2010-04-12  Zoltan Varga   Kumpera  <rkumpera@novell.com>
771
772         * mini-posix.c (sigusr1_signal_handler): Fix build on
773         non x86/amd64 systems.
774
775 2010-04-13  Zoltan Varga  <vargaz@gmail.com>
776
777         * method-to-ir.c (mono_method_to_ir): Disable generic sharing for constrained
778         calls where the constrained class needs a context. Fixes #595863.
779
780         * iltests.il.in: Add a test.
781
782 2010-04-13  Zoltan Varga  <vargaz@gmail.com>
783
784         * mini.c (mini_method_compile): Disable llvm+methods with clauses again, llvm
785         2.6/SVN seems to have broken support for them.
786
787 2010-04-13  Zoltan Varga  <vargaz@gmail.com>
788
789         * mini-llvm.c: Fix support for LLVM 2.6.
790
791 2010-04-10  Zoltan Varga  <vargaz@gmail.com>
792
793         * debugger-agent.c (thread_commands): Add a GET_ID command to get the
794         MonoInternalThread belonging to the thread.
795
796 Fri Apr 9 15:28:01 CEST 2010 Paolo Molaro <lupus@ximian.com>
797
798         * driver.c, optflags-def.h, ir-emit.h: introduce an unsupported
799         unsafe optimization that will remove bound checks.
800
801 2010-04-08  Kornel Pal  <kornelpal@gmail.com>
802
803         * method-to-ir.c (mini_emit_inst_for_method): Fix a typo that caused
804         CompareExchange not to be inlined for I8.
805
806         Contributed under MIT/X11 license.
807
808 2010-04-07 Rodrigo Kumpera  <rkumpera@novell.com>
809
810         * array.cs: Add tests for cast between primitive array types.
811
812 2010-04-07 Andreia Gaita  <avidigal@novell.com>
813
814         * Makefile.am: create a convenience library for moon to link with
815
816 2010-04-07 Paolo Molaro <lupus@ximian.com>
817
818         * method-to-ir.c: optimize array accesses from generic interfaces.
819
820 2010-04-06  Zoltan Varga  <vargaz@gmail.com>
821
822         * mini-llvm.c: Update after the memset/memcpy intrinsics changes in LLVM SVN.
823
824 2010-04-05 Rodrigo Kumpera  <rkumpera@novell.com>
825
826         * method-to-ir.c (mono_method_to_ir): Handle call to virtual final methods
827         of marshalbyref classes.
828
829         Fixes #515884.
830
831 2010-04-05 Rodrigo Kumpera  <rkumpera@novell.com>
832
833         * aot-compiler.c (emit_exception_debug_info): Encode try holes
834         information.
835
836         * aot-runtime.c (decode_exception_debug_info): Decode try holes
837         information.
838
839         * mini.h: Increase AOT version.
840
841 2010-04-04  Andreas Faerber  <andreas.faerber@web.de>
842
843         * mini-x86.h: Only enable soft debugger when using sigaction or on
844         Windows. Fixes build on Haiku (lacks siginfo_t).
845
846         Code is contributed under MIT/X11 license.
847
848 2010-04-02  Andreas Faerber  <andreas.faerber@web.de>
849
850         * mini.h, mini-x86.h: Suppress sigaction for Haiku, add support for
851         BeOS-style signal handlers.
852
853         Code is contributed under MIT/X11 license.
854         
855 2010-04-02  Zoltan Varga  <vargaz@gmail.com>
856
857         * mini-posix.c (sigusr1_signal_handler): Fix openbsd support.
858
859 2010-04-01 Rodrigo Kumpera  <rkumpera@novell.com>
860
861         * mini-exceptions.c: Fix win32 build.
862
863 2010-04-01  Mark Probst  <mark.probst@gmail.com>
864
865         * mini.c, driver.c: Call mono_gc_base_init() before
866         mono_debug_init().
867
868 2010-04-01  Sebastien Pouliot  <sebastien@ximian.com>
869
870         * method-to-ir.c (ensure_method_is_allowed_to_[access_field|
871         call_method]): Delegate the actual work in security-core-clr.c
872         to ease code sharing.
873
874 2010-04-01  Zoltan Varga  <vargaz@gmail.com>
875
876         * decompose.c (mono_decompose_opcode): Set the cfg exception if the unsupported
877         float conv.ovf.un opcodes are encountered, instead of asserting later.
878         Fixes #566296.
879
880 2010-04-01  Zoltan Varga  <vargaz@gmail.com>
881
882         * decompose.c (mono_decompose_opcode): Add OP_ICONV_TO_U4_UN as a no-op.
883
884         * iltests.il.in: Add a test.
885
886 2010-04-01  Zoltan Varga  <vargaz@gmail.com>
887
888         * mini-amd64.c (mono_arch_emit_call): Fail compilation if an argument is too
889         large. Fixes #567040.
890
891         * method-to-ir.c: Call CHECK_CFG_EXCEPTION after emitting a call.
892
893 2010-04-01  Zoltan Varga  <vargaz@gmail.com>
894
895         * method-to-ir.c (handle_ccastclass): Call save_cast_details (). Fixes
896         #592711.
897
898 2010-03-31 Rolf Bjarne Kvinge <RKvinge@novell.com>
899
900         * mini-trampolines.c: Surround mono_handler_block_guard_trampoline and
901         mono_create_handler_block_trampoline with the proper #ifdef so that it
902         compiles on amd64.
903
904 2010-03-30 Rodrigo Kumpera  <rkumpera@novell.com>
905
906         * mini-exceptions.c: Introduce mono_walk_stack_full, which
907         allows to select if it's new or old context that is passed to 
908         the callback.
909
910         * mini-exceptions.c (mono_handle_exception_internal): Handle the
911         case when executing a guarded handler from the EH machinery.
912
913         * mini-exceptions.c (mono_install_handler_block_guard): New function
914         responsible for checking for handler blocks, installing the guard and
915         clearing abort state.
916
917         * mini-posix.c (sigusr1_signal_handler): Call mono_install_handler_block_guard
918         to check for handler blocks and skip interruption logic if one was found.
919
920         * mini-trampolines.c (mono_handler_block_guard_trampoline): Function called
921         by the handler block guard trampoline. Resumes interruption by raising the
922         pending ThreadAbortException.
923
924         * mini.c (create_jit_info): Calculate the end address of a finally block.
925
926         * mini-x86.c (mono_arch_install_handler_block_guard): Patch the return address
927         of a finally block to a specified address and return the old one.
928
929         * tramp-x86.c (mono_arch_create_handler_block_trampoline): The handler block
930         trampoline patches the original return address and calls the trampoline function.
931
932 2010-03-30  Zoltan Varga  <vargaz@gmail.com>
933
934         * mini-trampolines.c (mono_aot_trampoline): Remove some dead code.
935
936         * aot-runtime.c (mono_aot_patch_plt_entry): New helper function, which only
937         does the patching if the callee is in the same domain.
938
939         * aot-runtime.c mini-trampolines.c: Call mono_aot_patch_plt_entry instead
940         of mono_arch_patch_plt_entry ().
941
942 2010-03-30 Rodrigo Kumpera  <rkumpera@novell.com>
943
944         * mini.c (create_jit_info): Fix try block hole length encoding.
945
946 2010-03-30 Rodrigo Kumpera  <rkumpera@novell.com>
947
948         * mini.c (create_jit_info): Emit saner debug spew. Now it doesn't
949         duplicate information and print offsets instead of absolute addresses.
950
951 2010-03-29  Zoltan Varga  <vargaz@gmail.com>
952
953         * debugger-agent.c (jit_end): Send type loads for types loaded before the VMStart
954         event is sent. Fixes #591733.
955
956 2010-03-26  Zoltan Varga  <vargaz@gmail.com>
957
958         * mini-posix.c (SIG_HANDLER_SIGNATURE): Handle the case when ctx is NULL on
959         OpenBSD.
960
961 2010-03-26  Zoltan Varga  <vargaz@gmail.com>
962
963         * debugger-agent.c (mono_debugger_agent_init): Set the GC type of the
964         thread_to_tls hash table.
965
966         * image-writer.c (bin_writer_emit_writeout): Fix the size of the got.plt
967         section. Fixes #591000.
968
969 2010-03-26  Andreas Faerber  <andreas.faerber@web.de>
970
971         * Makefile.am (version.h): Check for pure .git directory only,
972         fixes SVN revision when using git without git-svn.
973
974         Contributed under MIT/X11 license.
975
976 2010-03-26  Zoltan Varga  <vargaz@gmail.com>
977
978         * aot-runtime.c: Apply some openbsd changes from openbsd ports.
979
980 2010-03-24 Rodrigo Kumpera  <rkumpera@novell.com>
981
982         * basic-simd.cs: Test for vector x scalar binary operators.
983
984 2010-03-24 Rodrigo Kumpera  <rkumpera@novell.com>
985
986         * simd-intrincs.c (simd_intrinsic_emit_binary): Support binary
987         intrinsics with expanded scalar arguments.
988
989 2010-03-24 Rodrigo Kumpera  <rkumpera@novell.com>
990
991         * mini-exceptions.c (get_exception_catch_class): Non catch clauses
992         don't have an exception class, so don't decode it. This would crash
993         with filter clauses.
994
995 2010-03-24  U-anarquia\miguel  <miguel@anarquia>
996
997         Make sure that trunk builds with DISABLE_JIT, an update to the
998         PlayStation 3 port.
999         
1000         * mini.c (mini_get_shared_method): this code seems to be necessary
1001         regardless of whether DISABLE_JIT has been defined.
1002
1003         (mono_jit_compile_method_inner): it seems that this method is
1004         required even in full AOT mode, so ifdef out only the pieces that
1005         try to genrate code (the body of code that applies patches to the
1006         code).  
1007
1008         (mini_method_compile): do not compile when using DISABLE_JIT.
1009
1010         * mini-ppc.c (mono_arch_get_allocatable_int_vars)
1011         (mono_arch_output_basic_block, mono-arch_emit_exceptions): Do not
1012         compile when DISABLE_JIT is set.
1013
1014 2010-03-24  Mark Probst  <mark.probst@gmail.com>
1015
1016         * mini.c (mono_create_tls_get): Only create a TLS operation if the
1017         arch really supports it.
1018
1019 2010-03-24  Mark Probst  <mark.probst@gmail.com>
1020
1021         * mini-x86.c, mini-x86.h, mini.c: CEE_MONO_TLS support for Darwin/x86.
1022
1023 2010-03-23  Neale Ferguson <neale@sinenomine.net>
1024
1025         * exceptions-s390x.c: Add support for
1026         mono_arch_get_throw_corlib_exception and fix throw by name.
1027
1028         * mini-s390x.c: Add IMT support; Fix stack parameter passing
1029         logic (especially for varargs); Correct localloc sizing; Add
1030         mono_arch_get_this_arg_from_call and
1031         mono_arch_get_this_arg_from_call.
1032
1033         * mini-s390x.h: Add support for facility list extraction;
1034         Correct/update MONO_ARCH_xxx settings.
1035
1036         * mini-s390.c: Minor corrections to instruction output for
1037         varargs. No IMT implementation - I think it's time to deprecate
1038         s390 and just leave s390x.
1039
1040         * tramp-s390x.c: Correct creation of trampoline instruction
1041
1042
1043         * cpu-s390x.md: Update some instruction lengths
1044
1045 2010-03-23  Zoltan Varga  <vargaz@gmail.com>
1046
1047         * mini-generic-sharing.c (fill_in_rgctx_template_slot): Remove an assert which
1048         can be hit with partial sharing.
1049
1050         * mini-generic-sharing.c (get_shared_class): Handle partially shared methods
1051         in non-shared classes correctly.
1052         (generic_inst_is_sharable): Allow all primitive types in partial sharing.
1053         Turn on partial sharing.
1054
1055 2010-03-23  Zoltan Varga  <vargaz@gmail.com>
1056
1057         * mini-amd64.h: Put back MONO_ARCH_NOMAP32BIT for OpenBSD which was removed
1058         by mistake.
1059
1060 2010-03-23  Zoltan Varga  <vargaz@gmail.com>
1061
1062         * method-to-ir.c (mono_method_to_ir): Handle the failure of
1063         mono_method_signature ().
1064
1065         * mini-trampolines.c (mono_delegate_trampoline): Ditto.
1066
1067         * mini.c (mini_method_compile): Get the signature of cfg->method early with
1068         error checking, so later calls do not need error checking.
1069
1070 2010-03-22  Zoltan Varga  <vargaz@gmail.com>
1071
1072         * exceptions-amd64.c: Add support for OpenBSD which has no UCONTEXT_GREGS.
1073
1074         * mini-amd64.h: Enable MONO_ARCH_USE_SIGACTION on OpenBSD as well.
1075
1076 2010-03-22 Rodrigo Kumpera  <rkumpera@novell.com>
1077
1078         * mini-exceptions.c (mono_handle_exception_internal): Don't
1079         check try_end for archs different than s390. 
1080
1081         * mini.c (create_jit_info): Don't crash if the finallt block is the
1082         last one.
1083
1084 2010-03-22 Rodrigo Kumpera  <rkumpera@novell.com>
1085
1086         * driver.c (mono_main): Don't free global codeman under linux since
1087         glic now peeks at code on stack for more archs than just amd64.
1088
1089 Mon Mar 22 18:09:09 CET 2010 Paolo Molaro <lupus@ximian.com>
1090
1091         * mini.c, method-to-ir.c: changes to support compressed interface
1092         bitmaps.
1093
1094 2010-03-22  Zoltan Varga  <vargaz@gmail.com>
1095
1096         * mini-x86.h: Applied patch from Robert Nagy (Robert@openbsd.org).
1097         Use sigaction on OpenBSD too.
1098
1099 2010-03-22  Zoltan Varga  <vargaz@gmail.com>
1100
1101         * debugger-agent.c (event_req_matches_assembly): Handle request modifiers too.
1102
1103 2010-03-21  Andreas Faerber  <andreas.faerber@web.de>
1104
1105         * debugger-agent.c: #include sys/select.h for fd_set.
1106
1107         Code is contributed under MIT/X11 license.
1108
1109 2010-03-21  Zoltan Varga  <vargaz@gmail.com>
1110
1111         * mini.c (SIG_HANDLER_SIGNATURE): Fix the build on platforms without sigaction
1112         (openbsd+amd64 ?).
1113
1114 2010-03-21  Zoltan Varga  <vargaz@gmail.com>
1115
1116         * mini-ppc.c (mono_arch_emit_exceptions): Avoid an assert in ppc_patch () for
1117         some large methods with lots of exception handlers. Fixes #440924.
1118
1119 Sat Mar 20 11:56:24 CET 2010 Paolo Molaro <lupus@ximian.com>
1120
1121         * method-to-ir.c: remove code duplication for interface checks.
1122
1123 2010-03-19  Zoltan Varga  <vargaz@gmail.com>
1124
1125         * debugger-agent.c (clear_event_requests_for_assembly): New helper function.
1126         (assembly_unload): Clear all event requests referencing the to-be unloaded
1127         assembly.
1128
1129
1130 Fri Mar 19 16:45:20 CET 2010 Paolo Molaro <lupus@ximian.com>
1131
1132         * mini.h, mini-exceptions.c: restore the state of the stack
1133         guard page permissions.
1134
1135 2010-03-19  Zoltan Varga  <vargaz@gmail.com>
1136
1137         * mini-trampolines.c (common_call_trampoline): Remove the condition guarding the
1138         call site patching code, it doesn't appear to be needed.
1139
1140 2010-03-19  Zoltan Varga  <vargaz@gmail.com>
1141
1142         * mini-generic-sharing.c: Add infrastructure for partial sharing, ie.
1143         sharing generic methods whose type arguments are a mix of reference and
1144         non-reference types. Not yet turned on.
1145
1146         * mini.c (mini_get_shared_method): New helper function to return
1147         the method which will be compiled/registered in the JIT tables when doing
1148         generic sharing.
1149         (mono_domain_lookup_shared_generic): Moved to mini.c from mini-generic-sharing.c,
1150         use mini_get_shared_method ().
1151
1152         * mini.c (mini_method_compile): Register the same method which is compiled when
1153         doing generic sharing.
1154
1155         * mini.c aot-compiler.c aot-runtime.c: Add support for partial sharing.
1156
1157         * generics.cs: Add partial sharing tests.
1158
1159 2010-03-17 Jerry Maine  <crashfourit@gmail.com>
1160
1161         * mini.h : Changed the SIMD_VERSION* enum values to match those in Mono.Simd.AccelMode.
1162                    Add an enum value that or's all possable values together. Add an enum value
1163                    that marks the end of the used bit indexes.
1164
1165         * mini-amd64.c : Make changes to match the changes in mini.h 
1166
1167         * mini-x86.c : Make changes to match the changes in mini.h
1168
1169         * simd-intrinsics.c : Reorder the SimdIntrinsc struct to add more bits to
1170                    simd_version to support more simd versions. Changed the name of
1171                    simd_version to simd_version_flags to make it more intuitive that
1172                    it now contains bit flags. Reordered the *_intrinsics arrays to
1173                    match the changes above. Changed emit_intrinsics() to use the new
1174                    setup mentioned above.
1175
1176         Code is contributed under MIT/X11 license.
1177
1178 2010-03-17 Rodrigo Kumpera  <rkumpera@novell.com>
1179
1180         * mini-*.c (mono_arch_output_basic_block): Record try block holes on all
1181         remaining archs. Alpha and hppa maintainers, please stand up.
1182
1183 2010-03-17  Zoltan Varga  <vargaz@gmail.com>
1184
1185         * mini-ppc.c (mono_arch_build_imt_thunk): Always save and restore r11 since it
1186         is needed even when fail_tramp!=NULL.
1187
1188 2010-03-17  Zoltan Varga  <vargaz@gmail.com>
1189
1190         * debugger-agent.c (insert_breakpoint): Write a log message.
1191
1192 2010-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
1193
1194         * iltests.il.in: Add a few tests for LEAVE going over multiple
1195         finally clauses.
1196
1197 2010-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
1198
1199          * mini-x86.c (mono_arch_output_basic_block): Record try block holes.
1200
1201 2010-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
1202
1203         * mini.h (MonoBasicBlock): Add native_length field.
1204         * mini.h (MonoCompile): Add try_block_holes field.
1205         * mini.h (MonoInst): Add exception_clause pointer to
1206         the data union.
1207
1208         * mini.c (mono_codegen): Calculate MonoBasicBlock::native_length.
1209         * mini.c (mono_cfg_add_try_hole): New function to register possible
1210         holes in try blocks.
1211         * mini.c (create_jit_info): Fill in the holes information.
1212
1213         * mini-exceptions.c: Verify for holes when checking if an IP is covered
1214         by a try block.
1215
1216         * method-to-ir.c: Add the EH clause to the CALL_HANDLE instruction.
1217
1218 Tue Mar 16 13:16:16 CET 2010 Paolo Molaro <lupus@ximian.com>
1219
1220         * jit-icalls.c: adjusted for the array API changes.
1221
1222 2010-03-16  Zoltan Varga  <vargaz@gmail.com>
1223
1224         * iltests.il.in: Disable the fconv_to_i test on sparc too.
1225
1226 2010-03-16  Zoltan Varga  <vargaz@gmail.com>
1227
1228         * debugger-agent.c: Simplify the way breakpoints are processed by removing
1229         the 'pending' flag. This fixes support for appdomains too.
1230
1231
1232 Mon Mar 15 18:25:49 CET 2010 Paolo Molaro <lupus@ximian.com>
1233
1234         * mini-amd64.c, mini-ia64.c: remove direct access to method->header.
1235
1236 2010-03-12  Zoltan Varga  <vargaz@gmail.com>
1237
1238         * simd-intrinsics.c (simd_intrinsic_emit_getter): Don't emit shuffle opcodes
1239         when using LLVM, LLVM generates it itself when needed.
1240
1241         * mini-llvm-cpp.cpp (mono_llvm_build_aligned_load): New helper function.
1242
1243         * mini-llvm.c: Use an unaligned load for OP_LOADX_MEMBASE. Add zero extension
1244         to some OP_EXTRACT_ opcodes. Fix the naming of some sse intrinsics. Fix
1245         OP_ANDNPS/OP_ANDNPD.
1246
1247 2010-03-11  Zoltan Varga  <vargaz@gmail.com>
1248
1249         * tramp-x86.c (mono_arch_create_monitor_enter_trampoline_full): Use 'code' for
1250         the pc instead of 'buf'. Fix the call to mono_arch_flush_icache ().
1251         (mono_arch_create_monitor_exit_trampoline_full): Ditto.
1252
1253 2010-03-11  Martin Baulig  <martin@ximian.com>
1254
1255         * debugger-agent.c (type_commands): Add NULL check to
1256         `CMD_TYPE_GET_SOURCE_FILES'.
1257
1258 2010-03-09  Zoltan Varga  <vargaz@gmail.com>
1259
1260         * mini-ppc.c (mono_arch_decompose_opts): Fix OP_ICONV_TO_R_UN when cross-compiling.
1261
1262 2010-03-09  Zoltan Varga  <vargaz@gmail.com>
1263
1264         * mini-codegen.c (mono_peephole_ins): Fix the OP_FMOVE optimization. Fixes
1265         #586664.
1266
1267         * iltests.il.in: Add a test.
1268
1269 2010-03-05  Martin Baulig  <martin@ximian.com>
1270
1271         Add support for aborting invocations.
1272
1273         * debugger-agent.c
1274         (InvokeData): Added `InvokeData *last_invoke'.
1275         (DebuggerTlsData): Renamed `invoke' into `pending_invoke' and
1276         added a new `invoke' field to keep the `InvokeData *' throughout
1277         the invocation.
1278         (ErrorCode): Added `ERR_NO_INVOCATION'.
1279         (CmdVM): Added `CMD_VM_ABORT_INVOKE'.
1280         (mono_debugger_agent_handle_exception): Don't report any exception
1281         if an abort was requested.
1282         (invoke_method): Store the `InvokeData *' in `tls->invoke'; reset
1283         a thread abort if necessary.
1284         (vm_commands): Implement `CMD_VM_ABORT_INVOKE'.
1285
1286 2010-03-08  Rodrigo Kumpera  <rkumpera@novell.com>
1287
1288         * method-to-ir.c: Store the initial basic block returned by mono_basic_block_split
1289         so we can release the whole list and not just the first one. Free
1290         it in more places as well.
1291
1292 2010-03-08  Rodrigo Kumpera  <rkumpera@novell.com>
1293
1294         * method-to-ir.c: Revert r153222 as it doesn't belong here.
1295
1296 Mon Mar 8 17:58:26 CET 2010 Paolo Molaro <lupus@ximian.com>
1297
1298         * mini.h, *.c: prepare for MonoMethodHeader to become a transient entity.
1299
1300 Mon Mar 8 17:35:26 CET 2010 Paolo Molaro <lupus@ximian.com>
1301
1302         * driver.c: report also other misc build options.
1303
1304 2010-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
1305
1306         * method-to-ir.c: Generate better code for the NewObject
1307         intrinsic.
1308         
1309 2010-03-07  Zoltan Varga  <vargaz@gmail.com>
1310
1311         * branch-opts.c (mono_if_conversion): Disable one of the cases when deadce
1312         is disabled. Fixes #582322.
1313
1314         * iltests.il.in: Add a test.
1315
1316 2010-03-06  Zoltan Varga  <vargaz@gmail.com>
1317
1318         * tramp-amd64.c (mono_arch_create_monitor_exit_trampoline_full): Delegate
1319         the handling of obj->synchronization == null and owner != current thread to
1320         mono_monitor_exit ().
1321
1322         * tramp-x86.c (mono_arch_create_monitor_exit_trampoline_full): Ditto.
1323
1324
1325 Sat Mar 6 18:14:15 CET 2010 Paolo Molaro <lupus@ximian.com>
1326
1327         * mini.c: change the way emulated opcode info is stored and save about
1328         4 KB of runtime memory.
1329
1330 2010-03-04  David S. Miller  <davem@davemloft.net>
1331
1332        * mini-sparc.h: Always use MONO_ARCH_USE_SIGACTION.  Linux kernels
1333        that don't provide the siginfo in the second signal handler argument
1334        are buggy, and this has been fixed for years.
1335        * mini.h (GET_CONTEXT): Remove __sparc__ special case.
1336        (SIG_HANDLER_SIGNATURE, SIG_HANDLER_PARMS): Likewise.
1337
1338 2010-03-04  Zoltan Varga  <vargaz@gmail.com>
1339
1340         * aot-runtime.c (find_symbol): Fix a leak.
1341         (decode_patch): Ditto.
1342
1343 2010-03-04  Zoltan Varga  <vargaz@gmail.com>
1344
1345         * mini.h (MONO_INST_IS_TEMP): Kill this unused define.
1346
1347 2010-03-04  Zoltan Varga  <vargaz@gmail.com>
1348
1349         * mini.c (mono_resolve_patch_target): Fix an uninitialized variable.
1350
1351 Wed Mar 3 19:19:21 CET 2010 Paolo Molaro <lupus@ximian.com>
1352
1353         * method-to-ir.c: MONO_PROFILE_STRING_ALLOC is dead.
1354
1355 2010-03-03  Rodrigo Kumpera  <rkumpera@novell.com>
1356
1357         * method-to-ir.c (mono_method_to_ir): Don't create a runtime vtable
1358         to check for errors, it's enough to create the metadata open.
1359
1360         Fixes #562150
1361
1362 2010-03-03  Rolf Bjarne Kvinge  <RKvinge@novell.com>
1363
1364         * trace.c|h:
1365         * mini-exceptions.c: Add support for printing stack traces when handling
1366         exceptions, and when printing exceptions thrown while tracing also print
1367         the exception message.
1368
1369 2010-03-03  Rolf Bjarne Kvinge  <RKvinge@novell.com>
1370
1371         * trace.c: We need to parse exclude tokens ('-') before string tokens,
1372         since the exclude token is a valid string character.
1373
1374 2010-03-02  Levi Bard  <levi@unity3d.com>
1375
1376         * debugger-agent.c: Invalidate thread stacks on domain unload.
1377
1378 2010-03-02  Mark Probst  <mark.probst@gmail.com>
1379
1380         * method-to-ir.c: Emit dummy_use for stored reference after write
1381         barriers to make sure the object is pinned if the GC interrupts
1382         before the write barrier is done.
1383
1384 2010-03-02  Zoltan Varga  <vargaz@gmail.com>
1385
1386         * cpu-<ARCH>.md: dummy_use was missing src1:i.
1387
1388 2010-03-01  Zoltan Varga  <vargaz@gmail.com>
1389
1390         * debugger-agent.c: Add a log message printing the protocol version.
1391
1392 2010-03-01  Zoltan Varga  <vargaz@gmail.com>
1393
1394         * debugger-agent.c: Add a new command to communicate the protocol version used
1395         by the client. This could be used to allow newer runtimes to communicate with
1396         older clients.
1397
1398 2010-03-01  Zoltan Varga  <vargaz@gmail.com>
1399
1400         * debugger-agent.c (domain_commands): Add a new command to create a boxed value.
1401
1402 2010-03-01  Zoltan Varga  <vargaz@gmail.com>
1403
1404         * debugger-agent.c (type_commands): Fix the setting of fields with a reference
1405         type.
1406
1407 Mon Mar 1 15:20:44 CET 2010 Paolo Molaro <lupus@ximian.com>
1408
1409         * mini-arm.c: make the arm cpu arch configurable with the
1410         MONO_CPU_ARCH env var (for example: "armv4 thumb").
1411         Bug #584198.
1412
1413 Mon Mar 1 14:48:35 CET 2010 Paolo Molaro <lupus@ximian.com>
1414
1415         * mini.c, mini.h, driver.c: added the --jitmap option to enable
1416         support for the perf tool on Linux.
1417
1418 Mon Mar 1 14:43:55 CET 2010 Paolo Molaro <lupus@ximian.com>
1419
1420         * method-to-ir.c: make string.InsertenalSetChar() specialization
1421         effective.
1422
1423 2010-03-01  Robert Jordan  <robertj@gmx.net>
1424
1425         * Makefile.am: fix the non-static build.
1426
1427 2010-02-26  Zoltan Varga  <vargaz@gmail.com>
1428
1429         * mini-generic-sharing.c: Move the contents of ../metadata/generic-sharing.c
1430         here.
1431
1432 2010-02-26  Robert Jordan  <robertj@gmx.net>
1433
1434         * tasklets.c (continuation_store): Return from an error condition
1435         immediately.
1436
1437 2010-02-26  Martin Baulig  <martin@ximian.com>
1438
1439         * debug-debugger.c (MonoDebuggerInfo): Added `abort_runtime_invoke'.
1440
1441         * debug-mini.c
1442         (MonoDebuggerThreadInfo): Added `internal_flags'.
1443         (MonoDebuggerInternalThreadFlags): New enum.
1444         (_mono_debugger_throw_exception): Don't signal the debugger if a
1445         type abort was requested.
1446         (_mono_debugger_unhandled_exception): Likewise.
1447         (mono_debugger_abort_runtime_invoke): New method to abort an invocation.
1448         (mono_debugger_runtime_invoke): If the debugger requested a thread
1449         abort during the invocation, reset it here.
1450
1451 2010-02-26  Martin Baulig  <martin@ximian.com>
1452
1453         * debug-mini.c (MonoDebuggerThreadInfo): Use `MonoInternalThread *'
1454         instead of `MonoThread *'.
1455
1456 2010-02-25  Zoltan Varga  <vargaz@gmail.com>
1457
1458         * aot-runtime.c (mono_aot_find_jit_info): Use a merge sort for sorting the
1459         code offsets table, as it is mostly sorted.
1460
1461 2010-02-25  Zoltan Varga  <vargaz@gmail.com>
1462
1463         * debugger-agent.c (do_invoke_method): Fix invoking of static methods on vtypes.
1464         Fixes #582991.
1465
1466 2010-02-25  Zoltan Varga  <vargaz@gmail.com>
1467
1468         * driver.c (mono_main): Get rid of mono_setup_vtable_in_class_init.
1469
1470 Wed Feb 24 15:58:03 CET 2010 Paolo Molaro <lupus@ximian.com>
1471
1472         * Makefile.am: build the new ABI version of the libmono library.
1473         * debugger-agent.c, mini.c: fix warnings with the new API.
1474         * jit.h: don't depend on glib.h being included.
1475
1476 2010-02-24  Zoltan Varga  <vargaz@gmail.com>
1477
1478         * method-to-ir.c (mono_method_to_ir): Implement AOT support for fast TLS access.
1479
1480 2010-02-24  Zoltan Varga  <vargaz@gmail.com>
1481
1482         * method-to-ir.c (mono_method_to_ir): Implement support for fast access to
1483         ThreadStatic variables.
1484
1485 2010-02-24  Zoltan Varga  <vargaz@gmail.com>
1486
1487         * debugger-agent.c (notify_thread): Skip terminated threads, since their tls
1488         data is not freed yet. Fixes #582460.
1489
1490 2010-02-23  Zoltan Varga  <vargaz@gmail.com>
1491
1492         * debugger-agent.c: Add support for the caught/uncaught flags on exception
1493         event requests. Bump protocol minor version.
1494
1495 2010-02-22  Zoltan Varga  <vargaz@gmail.com>
1496
1497         * decompose.c (mono_decompose_long_opts): Handle OP_LCONV_TO_OVF_I8 here too.
1498
1499 2010-02-22  Zoltan Varga  <vargaz@gmail.com>
1500
1501         * decompose.c (mono_decompose_opcode): Handle OP_LCONV_TO_OVF_I8. Fixes
1502         #581950.
1503
1504         * iltests.il.in: Add a test.
1505
1506 2010-02-22  Rodrigo Kumpera  <rkumpera@novell.com>
1507
1508         * mini.c (inline_method): Check for loader errors.
1509
1510 2010-02-22  Rodrigo Kumpera  <rkumpera@novell.com>
1511
1512         * mini.c (mono_method_check_inlining): Use !mono_method_get_header_summary
1513         instead of mono_method_get_header as it doesn't decode locals
1514         so the called method can have unresolved dependencies that will only
1515         be satisfied after the current method is JIT'd.
1516
1517         Fixes #550968.
1518
1519 2010-02-22  Zoltan Varga  <vargaz@gmail.com>
1520
1521         * basic.cs (test_0_div_opt): Speed this up a bit.
1522
1523 2010-02-20  Zoltan Varga  <vargaz@gmail.com>
1524
1525         * mini-amd64.c: Fix DISABLE_JIT support after the latest changes.
1526
1527         * mini.c (mono_jit_create_remoting_trampoline): Call
1528         mono_create_specific_trampoline () instead of
1529         mono_arch_create_specific_trampoline ().
1530
1531         * mini-trampolines.c tramp-arm.c: Disable more stuff when DISABLE_JIT is set.
1532
1533 2010-02-20  Zoltan Varga  <vargaz@gmail.com>
1534
1535         * unwind.c (mono_unwind_get_cie_program): New function, moved here from
1536         aot-compiler.c, so it can be found even if DISABLE_JIT is set.
1537
1538         * aot-compiler.c xdebug.c: Update callers of mono_arch_unwind_get_cie_program ().
1539
1540         * mini-amd64.c: Fix DISABLE_JIT support.
1541
1542 2010-02-20  Geoff Norton  <gnorton@novell.com>
1543
1544         * aot-runtime.c: Ensure we dont leak a held lock when unwinding exceptions.
1545
1546 2010-02-20  Zoltan Varga  <vargaz@gmail.com>
1547
1548         * debugger-agent.c (mono_debugger_agent_handle_exception): Receive two contexts,
1549         one for the throw and one for the catch. Mark uncaught exceptions by a NULL
1550         CATCH_TXT. Send normal exception events for unhandled exceptions too.
1551         (mono_debugger_agent_handle_unhandled_exception): Remove this, merged into
1552         handle_exception.
1553
1554 2010-02-18  Zoltan Varga  <vargaz@gmail.com>
1555
1556         * exceptions-x86.c (mono_arch_get_restore_context): Changes this so it restores
1557         edx/ecx too. This is needed to support OP_SEQ_POINT.
1558
1559 2010-02-18  Zoltan Varga  <vargaz@gmail.com>
1560
1561         * exceptions-amd64.c (get_throw_trampoline): Add xdebug info.
1562
1563         * method-to-ir.c (mono_method_to_ir): Fix SIZEOF in dynamic methods.
1564
1565 2010-02-16  Zoltan Varga  <vargaz@gmail.com>
1566
1567         * mini-llvm.c aot-compiler.c aot-runtime.c unwind.c: Finish support
1568         LLVM+AOT+exceptions, not enabled yet.
1569
1570 2010-02-15  Zoltan Varga  <vargaz@gmail.com>
1571
1572         * mini.c (SIG_HANDLER_SIGNATURE): Fix the windows build.
1573
1574 2010-02-15  Zoltan Varga  <vargaz@gmail.com>
1575
1576         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Emit
1577         xdebug info for these.
1578
1579         * mini-trampolines.c (common_call_trampoline): Use mini_jit_info_table_find ()
1580         in a few places.
1581
1582         * mini.c (mini_get_vtable_trampoline): Make this take a 'slot_index' argument,
1583         not used yet.
1584
1585 2010-02-13  Zoltan Varga  <vargaz@gmail.com>
1586
1587         * aot-compiler.c (load_profile_files): Update after the profiler changes.
1588
1589 2010-02-13  Zoltan Varga  <vargaz@gmail.com>
1590
1591         * mini.c (mono_jit_compile_method_inner): Avoid passing icall wrappers to
1592         mono_profiler_method_end_jit, since the profiler has no way to process wrappers.
1593
1594         * aot-runtime.c mini.c: Resurrect the aot pagefault profiling stuff, it is useful
1595         for mtouch.
1596
1597 2010-02-13 Gonzalo Paniagua Javier <gonzalo@novell.com>
1598
1599         * debugger-agent.c: handle incomplete reads and EINTR in
1600         recv()/send(). This could have been causing random
1601         disconnections.
1602
1603 2010-02-13  Zoltan Varga  <vargaz@gmail.com>
1604
1605         * aot-runtime.c (decode_exception_debug_info): Fix aot support for sequence
1606         points.
1607
1608         * mini-arm.c (mono_arch_allocate_vars): Allocate the seq point related vars first
1609         so they have small offsets. Fixes #566311.
1610
1611 2010-02-12  Rodrigo Kumpera  <rkumpera@novell.com>
1612
1613         * method-to-ir.c (mono_method_check_inlining): Check for loader errors.
1614
1615 2010-02-11  Zoltan Varga  <vargaz@gmail.com>
1616
1617         * mini-amd64.c: Remove the special casing of byref in a few places now that
1618         mini_type_get_underlying_type () handles it.
1619
1620         * mini-generic-sharing.c (mini_type_get_underlying_type): Handle byref as well
1621         by returning native int. Fixes #577984.
1622
1623 2010-02-11  Zoltan Varga  <vargaz@gmail.com>
1624
1625         * method-to-ir.c (handle_isinst): Factor out the is_complex_isinst check into
1626         a macro.
1627
1628         * mini-llvm.c (exception_cb): Put the clause index into the type info instead
1629         of putting the clause itself.
1630
1631         * mini-arm.c mini.c linear-scan.c: Disable more stuff when DISABLE_JIT is used.
1632
1633 2010-02-09  Zoltan Varga  <vargaz@gmail.com>
1634
1635         * unwind.c (mono_unwind_frame): Use read32 for reading a 32 bit value, since it
1636         might be unaligned.
1637
1638 2010-02-10  Geoff Norton  <gnorton@novell.com>
1639
1640         * aot-compiler.c: Make the number of IMT trampolines configurable as well.
1641
1642 2010-02-08  Zoltan Varga  <vargaz@gmail.com>
1643
1644         * aot-compiler.c (emit_code): Create the ut trampolines here, so they work for
1645         llvm methods too.
1646
1647         * aot-compiler.c (emit_code): Don't add the llvm label prefix to 'methods', since
1648         it is not an LLVM generated symbol.
1649
1650         * mini-llvm.c (emit_entry_bb): Fix the handling of simd types.
1651
1652         * method-to-ir.c (handle_castclass): Turn off the more efficient isinst/castclass
1653         implementation in gshared mode because it causes regressions.
1654
1655         * mini-trampolines.c: Add a stat for the number of calls to trampolines.
1656
1657         * image-writer.c (asm_writer_emit_global): Don't prepend the global prefix, it
1658         should be done by the caller.
1659
1660         * mini-llvm.c (mono_llvm_emit_method): Don't make the debug symbols global.
1661
1662         * aot-compiler.c (emit_code): Add the llvm label prefix before 'methods'.
1663
1664         * mini-exceptions.c (mini_jit_info_table_find): Search the root domain as well,
1665         since mono_jit_info_table_find () doesn't do it anymore.
1666
1667         * mini-generic-sharing.c debugger-agent.c: Call mini_jit_info_table_find ()
1668         instead of mono_jit_info_table_find ().
1669
1670 2010-02-07  Zoltan Varga  <vargaz@gmail.com>
1671
1672         * aot-compiler.c aot-runtime.c: Add support for MONO_WRAPPER_WRITE_BARRIER.
1673
1674         * aot-compiler.c (encode_method_ref): Update after the removal of
1675         mono_gc_get_managed_allocator_type ().
1676
1677         * method-to-ir.c (mono_method_to_ir): Place a seq point just before a RET.
1678         Fixes #564538.
1679
1680 2010-02-06  Zoltan Varga  <vargaz@gmail.com>
1681
1682         * method-to-ir.c (handle_castclass): Use the icall for classes with variant
1683         generic params as well.
1684         (handle_isinst): Ditto.
1685
1686         * method-to-ir.c: Make isninst/castclass checks in gshared code more efficient
1687         instead of always calling an icall.
1688
1689         * aot-compiler.c (emit_llvm_file): Take into account trampolines etc when
1690         computing the size of the got.
1691
1692         * aot-compiler.c (emit_code): Change the way the 'methods' symbol is emitted
1693         when using LLVM. Instead of emitting it as an LLVM method, emit it using
1694         the assembly directive '.set' so it points to the first LLVM emitted method.
1695
1696 2010-02-04  Rodrigo Kumpera  <rkumpera@novell.com>
1697
1698         * mini.c (mini_method_verify): Report the method which failed to verify.
1699
1700 2010-02-04  Rodrigo Kumpera  <rkumpera@novell.com>
1701
1702         * method-to-ir.c (mono_method_to_ir): Use the new basic block formation pass
1703         to avoid JIT'ng dead basic blocks. This is the same behavior as the
1704         runtime MS verifier.
1705
1706 2010-02-04  Zoltan Varga  <vargaz@gmail.com>
1707
1708         * debugger-agent.c (decode_value): Fix decoding of vtype instances. Fixes
1709         #561962.
1710
1711 2010-02-04  Zoltan Varga  <vargaz@gmail.com>
1712
1713         * mini-llvm.c: Init the jit module only when first JITting.
1714
1715         * aot-compiler.c (emit_plt): Fix the naming of plt entries of llvm+darwin.
1716
1717         * mini-llvm.c (get_plt_entry): Make the plt entries have hidden visibility.
1718
1719         * mini-llvm.c (mono_llvm_emit_aot_module): Remove the dummy got after it is
1720         replaced with the real got.
1721
1722         * debugger-agent.c (type_commands): Return the enumness if the type as well.
1723
1724         * image-writer.c: Reduce the amount of #ifdefs a bit.
1725
1726         * aot-compiler.c: Reduce the amount of #ifdefs. Add beginnings of support for
1727         llvm on darwin/arm.
1728
1729         * aot-compiler.c (mono_compile_assembly): Handle asmonly+llvm mode.
1730
1731         * mini-llvm.c (mono_llvm_emit_method): Don't make the 'type_info' symbols
1732         global.
1733
1734 2010-02-02  Zoltan Varga  <vargaz@gmail.com>
1735
1736         * mini-llvm.c (mono_llvm_emit_method): Add support for unaligned loads.
1737         (mono_llvm_emit_method): Fix unaligned stores too.
1738
1739         * mini-amd64.c (mono_arch_emit_prolog): Initialize lmf->rsp in the prolog too
1740         so async stack walks don't crash.
1741
1742 2010-02-02  Zoltan Varga  <vargaz@gmail.com>
1743
1744         * mini-trampolines.c (common_call_trampoline): Fix a problem where the callsite
1745         was not patched if the callee needed an rgctx trampoline.
1746
1747 2010-02-01  Zoltan Varga  <vargaz@gmail.com>
1748
1749         * mini-ppc.c (mono_arch_get_global_int_regs): Reserve r29 for holding the
1750         vtable address in AOT code.
1751
1752 2010-02-01  Zoltan Varga  <vargaz@gmail.com>
1753
1754         * mini-codegen.c: Remove support for CEE_ opcodes which cannot occur in
1755         MonoInst's.
1756
1757 Mon Feb 1 16:29:10 CET 2010 Paolo Molaro <lupus@ximian.com>
1758
1759         * genmdesc.pl: remove dependency on external cpp.
1760
1761 2010-02-01  Zoltan Varga  <vargaz@gmail.com>
1762
1763         * method-to-ir.c (mini_emit_ldelema_1_ins): Avoid emitting an OP_SEXT_I4 when
1764         using LLVM, its not needed, and abcrem can't handle it.
1765
1766 Mon Feb 1 14:29:43 CET 2010 Paolo Molaro <lupus@ximian.com>
1767
1768         * genmdesc.c, genmdesc.pl, cpu-x86.md: introduced templates to make
1769         it easier to group instructions and reduce duplication.
1770
1771 2010-02-01  Zoltan Varga  <vargaz@gmail.com>
1772
1773         * decompose.c: Move the array/soft float decompose routines here from
1774         method-to-ir.c.
1775
1776         * method-to-ir.c: Export a few functions so they can be used from decompose.c.
1777
1778 2010-01-31  Zoltan Varga  <vargaz@gmail.com>
1779
1780         * mini-llvm.c (mono_llvm_emit_method): Add a call to llvm.invariant.start
1781         to tell LLVM that the got is constant, not used yet.
1782
1783         * aot-compiler.c: Pass more optimization flags to llvm's 'opt'.
1784
1785 2010-01-30  Zoltan Varga  <vargaz@gmail.com>
1786
1787         * mini-ppc.c (mono_arch_emit_prolog): Fix full aot support for native to
1788         managed wrappers.
1789
1790 2010-01-30  Zoltan Varga  <vargaz@gmail.com>
1791
1792         * aot-compiler.c (add_wrappers): Commit the hack which generates
1793         native-to-managed wrappers for methods decorated with the MonoPInvokeCallback
1794         custom attribute.
1795
1796 2010-01-29  Zoltan Varga  <vargaz@gmail.com>
1797
1798         * mini.h (MONO_INST_FAULT): New instruction flag for loads which can cause
1799         a fault, only used by the LLVM backend.
1800
1801         * ir-emit.h: Add _FAULT variants of the LOAD_MEMBASE macros. Mark
1802         OP_CHECK_THIS with OP_IMPLICIT_EXCEPTION.
1803
1804         * method-to-ir.c: Use the new LOAD_MEMBASE_FAULT opcodes, get rid of the
1805         calls to MONO_EMIT_NULL_CHECK which is automatically done by the new macros.
1806
1807         * mini-llvm.c: Only generate volatile loads from load instructions which have
1808         the MONO_INST_FAULT flag set.
1809
1810 2010-01-29  Zoltan Varga  <vargaz@gmail.com>
1811
1812         * unwind.c (mono_unwind_decode_fde): Fix the decoding of the LSDA offset on
1813         64 bit platforms.
1814
1815 2010-01-28  Zoltan Varga  <vargaz@gmail.com>
1816
1817         * mini.c (mono_save_seq_point_info): Fix the handling of bblocks without
1818         sequence points. Fixes #571236.
1819
1820 2010-01-28  Zoltan Varga  <vargaz@gmail.com>
1821
1822         * debugger-agent.c (mono_debugger_agent_init): Call appdomain_unload at the
1823         end of the appdomain unload process, after assemblies have been unloaded.
1824         Fixes #574842.
1825
1826 2010-01-27  Zoltan Varga  <vargaz@gmail.com>
1827
1828         * abcremoval.c (process_block): Fix the if (region) check so abcrem actually
1829         works.
1830
1831         * mini-amd64.c: Make the soft debugger work on platforms without MAP_32BIT.
1832         Fixes #573988.
1833
1834 2010-01-26  Zoltan Varga  <vargaz@gmail.com>
1835
1836         * dwarfwriter.c (emit_type): Treat MONO_TYPE_PTR as 'I' not 'I4'.
1837
1838 2010-01-26  Geoff Norton  <gnorton@novell.com>
1839
1840         * aot-compiler.c: Fix a logic error introduced when guarding against enums
1841         with struct marshalability.
1842
1843 2010-01-24  Zoltan Varga  <vargaz@gmail.com>
1844
1845         * mini.c (mini_method_compile): Improve the processing MONO_VERBOSE_METHOD so
1846         it supports class names as well.
1847
1848         * mini.h (MonoCompile): Add a few flags to control JIT behavior which are
1849         needed by the GC map code.
1850
1851         * mini.c (mini_method_compile): Call a function in mini-gc.c to set the new
1852         flags if needed.
1853
1854         * method-to-ir.c (mono_method_to_ir): Emit initialization code for ref variables
1855         if cfg->init_ref_vars is set.
1856
1857         * liveness.c (optimize_initlocals): Disable the initlocals opt for ref vars if
1858         cfg->disable_initlocals_op_refs is set.
1859
1860         * method-to-ir.c (mono_spill_global_vars): Compute more precise live ranges
1861         using liveness info if cfg->compute_precise_live_ranges is set.
1862
1863         * mini-gc.c: Ongoing work. Improve logging and debugging support. Handle
1864         volatile variables correctly. Add comments about the live ranges. Not enabled
1865         yet.
1866
1867 2010-01-24  Zoltan Varga  <vargaz@gmail.com>
1868
1869         * mini.h (MonoDebugOptions): Add an option to init stack frames by writing
1870         0x2a into them in method prologs.
1871
1872         * mini-amd64.c (mono_arch_emit_prolog): Implement it.
1873
1874 2010-01-22  Zoltan Varga  <vargaz@gmail.com>
1875
1876         * mini-llvm-cpp.cpp: Remove uses of dynamic_cast, it no longer works with llvm
1877         classes, since llvm is compiled with -fno-rtti.
1878
1879         * mini.h (COMPILE_SOFT_FLOAT): New macro, similar to COMPILE_LLVM.
1880
1881         * method-to-ir.c ir-emit.h: Use if (COMPILE_SOFT_FLOAT) in a few places since
1882         llvm does not require it.
1883
1884         * aot-runtime.c (load_method): Print the full name of the last aot method.
1885
1886 2010-01-21  Zoltan Varga  <vargaz@gmail.com>
1887
1888         * exceptions-amd64.c (mono_arch_notify_pending_exc): Avoid a crash if the
1889         thread has not fully started yet.
1890
1891 2010-01-21  Zoltan Varga  <vargaz@gmail.com>
1892
1893         * aot-compiler.c (can_marshal_struct): Allow marshalling enums.
1894
1895 2010-01-21  Miguel de Icaza  <miguel@novell.com>
1896
1897         * driver.c: Do not abort if LLVM is not supported, print a
1898         warning and add the information to the Mono JIT information.
1899
1900 2010-01-21  Zoltan Varga  <vargaz@gmail.com>
1901
1902         * ir-emit.h (MONO_EMIT_NULL_CHECK): Don't emit an OP_IMPLICIT_EXCEPTION when
1903         using explicit null checks.
1904
1905 2010-01-20  Zoltan Varga  <vargaz@gmail.com>
1906
1907         * xdebug.c: New file extracted from aot-compiler.c, containing the XDEBUG
1908         related code.
1909
1910         * aot-compiler.c (encode_method_ref): Use mono_marshal_wrapper_info_from_wrapper
1911         () in one place.
1912         (mono_aot_wrapper_name): Remove the special handling of delegate invoke wrappers,
1913         its no longer needed.
1914
1915         * method-to-ir.c (mono_method_to_ir): Fix a warning.
1916
1917         * exceptions-<ARCH>.c: Introduce a MONO_ARCH_HAVE_THROW_EXCEPTION_BY_NAME
1918         define for platforms still using it (s390). Get rid of the
1919         mono_arch_get_throw_exception_by_name () routines on all other platforms.
1920
1921         * exceptions-x86.c: Rework the throw trampolines so there is only one function
1922         which can generate throw/rethrow/corlib trampolines for llvm/not llvm code.
1923
1924         * exceptions-x86.c: Add LLVM specific throw trampolines which doesn't assume
1925         the caller pushed the arguments.
1926
1927         * mini-llvm.c: Enable throwing exceptions on x86.
1928
1929         * mini-posix.c (SIG_HANDLER_SIGNATURE): Avoid
1930         "Thread (nil) may have been prematurely finalized" messages if this is called
1931         on a thread not registered with the runtime.
1932
1933         * mini-exceptions.c (mono_handle_native_sigsegv): Ditto.
1934
1935 2010-01-19  Zoltan Varga  <vargaz@gmail.com>
1936
1937         * jit-icalls.c (mono_array_new_3): New jit icall.
1938
1939         * aot-compiler.c aot-runtime.c: Add support for ElementAddr wrappers.
1940
1941         * arrays.cs: Add a test for 3 dimensional arrays.
1942
1943 2010-01-19  Zoltan Varga  <vargaz@gmail.com>
1944
1945         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Emit xdebug info.
1946         (mono_arch_find_jit_info_ext): Disable the popping of arguments when LLVM is
1947         used.
1948
1949         * mini-llvm.c (emit_cond_system_exception): Abort when an implicit exception is
1950         thrown on x86.
1951
1952         * unwind.c (mono_unwind_decode_fde): Fix an assert on x86.
1953
1954         * mini-x86.h (MONO_CONTEXT_SET_LLVM_EXC_REG): Define this for x86.
1955
1956         * mini-llvm.c: Disable OP_THROW on x86, it doesn't work yet.
1957
1958 2010-01-18  Bill Holmes  <billholmes54@gmail.com>
1959
1960         * debugger-agent.c : Changing the PLATFORM_WIN32 preprocessor check to
1961           HOST_WIN32.  Also including winsock2. to define struct in_addr.
1962
1963         * mini-amd64.h : Changing the PLATFORM_WIN32 preprocessor check to HOST_WIN32.
1964
1965         * mini-x86.h : Changing the PLATFORM_WIN32 preprocessor check to HOST_WIN32.
1966
1967         Code is contributed under MIT/X11 license.
1968
1969 2010-01-18  Zoltan Varga  <vargaz@gmail.com>
1970
1971         * mini.h (MonoCompile): Add 'disable_out_of_line_bblocks' flag.
1972
1973         * branch-opts.c (mono_optimize_branches): Honor the new flag.
1974
1975         * mini.c (mini_method_compile): Set the new flag when running under the
1976         debugger.
1977
1978 2010-01-18  Zoltan Varga  <vargaz@gmail.com>
1979
1980         * mini-gc.c: Change the GC map to use a ref/noref/pin value instead of just
1981         a ref/noref value + a global pin flag, so parts of stack frames can still be
1982         precisely marked even if they include stuff which needs pinning. Improve logging.
1983         Fix many bugs. Not enabled yet.
1984
1985         * gc-test.cs: Add a few tests.
1986
1987         * liveness.c (mono_analyze_liveness): Make the debug output controllable by
1988         the normal -v options. Avoid propagating liveness information through bblocks
1989         which end with a NOT_REACHED opcode.
1990
1991         * mini.c (mono_jit_compile_method_inner): Avoid reading cfg->prof_options
1992         after cfg has been freed.
1993
1994 2010-01-17  Zoltan Varga  <vargaz@gmail.com>
1995
1996         * branch-opts.c (mono_branch_optimize_exception_target): Stop the optimization
1997         if a clause is skipped because it uses the exception object, since it could
1998         have caught the exception.
1999
2000         * exceptions.cs: Add a test.
2001
2002 2010-01-16  Zoltan Varga  <vargaz@gmail.com>
2003
2004        * mini-trampolines.c (mono_create_static_rgctx_trampoline): Add an assert.
2005
2006         * aot-runtime.c (mono_aot_get_method): Handle ftnptr's correctly for the
2007         ICollection<T> wrappers.
2008
2009 2010-01-16  Zoltan Varga  <vargaz@gmail.com>
2010
2011         * debugger-agent.c (decode_value): Fix the decoding of I/U/PTR.
2012
2013 2010-01-16  Zoltan Varga  <vargaz@gmail.com>
2014
2015         * mini-amd64.c (emit_call_body): Always use near calls when AOTing even if
2016         NOMAP32BIT or optimize_for_xen is set.
2017
2018 2010-01-16  Zoltan Varga  <vargaz@gmail.com>
2019
2020         * aot-compiler.c aot-runtime.c: Get rid of mono_aot_str_hash (), use
2021         mono_metadata_str_hash () instead.
2022
2023 2010-01-15  Zoltan Varga  <vargaz@gmail.com>
2024
2025         * ir-emit.h (MONO_EMIT_NEW_ICOMPARE_IMM): Use sizeof (mgreg_t) instead of
2026         sizeof (void*).
2027
2028         * unwind.c (mono_unwind_frame): Use mgreg_t instead of gssize.
2029
2030 2010-01-15  Zoltan Varga  <vargaz@gmail.com>
2031
2032         * ir-emit.h (MONO_EMIT_NEW_CHECK_THIS): Emit an explicit null check if the
2033         flag is set.
2034
2035         * mini-ppc.c (mono_arch_emit_exceptions): Compute the size of the exception
2036         throwing code correctly.
2037
2038         * mini.h (MONO_AOT_FILE_VERSION): Bump this because of the IMT hashing changes.
2039
2040 2010-01-15  Zoltan Varga  <vargaz@gmail.com>
2041
2042         * aot-runtime.c (mono_aot_plt_resolve): Reenable the previous assert for
2043         ftnptrs created by us, handle RGCTX_FETCH correctly.
2044         (mono_aot_get_lazy_fetch_trampoline): Add an ftnptr.
2045
2046         * mini-trampolines.c (mono_create_generic_class_init_trampoline): Remove the
2047         ftnptr added by mono_aot_get_named_code ().
2048
2049 2010-01-14  Zoltan Varga  <vargaz@gmail.com>
2050
2051         * mini-arm.c: Fix a few LLVM problems.
2052
2053         * mini-llvm.c (simd_class_to_llvm_type): Fix compilation on !x86/amd64.
2054
2055 2010-01-13  Mark Probst  <mark.probst@gmail.com>
2056
2057         * method-to-ir.c (mini_emit_stobj): Use EMIT_NEW_CLASSCONST when
2058         AOT compiling.
2059
2060 Wed Jan 13 15:54:53 CET 2010 Paolo Molaro <lupus@ximian.com>
2061
2062         * jit.h, method-to-ir.c: added ability to set the policy for
2063         inserting breakpoints from the break IL instruction or the
2064         Debugger.Break () API call.
2065
2066 2010-01-13  Zoltan Varga  <vargaz@gmail.com>
2067
2068         * aot-runtime.c (load_aot_module): Add more comments to explain why referenced
2069         assemblies need to be eagerly loaded.
2070
2071 2010-01-12  Zoltan Varga  <vargaz@gmail.com>
2072
2073         * dwarfwriter.c (emit_line_number_info): Fix the eglib case so it doesn't crash.
2074
2075 2010-01-11  Zoltan Varga  <vargaz@gmail.com>
2076
2077         * debugger-agent.c (mono_debugger_agent_parse_options): Allow onthrow without
2078         an argument which matches any exception.
2079
2080 2010-01-10  Zoltan Varga  <vargaz@gmail.com>
2081
2082         * method-to-ir.c (mono_emit_method_call_full): Avoid the virt->nonvirt
2083         optimization if the called method is gshared and marshalbyref, since gshared
2084         methods can' have wrappers. Fixes #569390.
2085
2086         * generics.cs: Add a test.
2087
2088 2010-01-10  Zoltan Varga  <vargaz@gmail.com>
2089
2090         * mini-exceptions.c (mono_print_thread_dump_from_ctx): New helper function
2091         callable from gdb.
2092
2093 2010-01-10  Zoltan Varga  <vargaz@gmail.com>
2094
2095         * mini.c (mono_print_method_from_ip): Fix the lookup of trampolines.
2096
2097 2010-01-09  Zoltan Varga  <vargaz@gmail.com>
2098
2099         * debugger-agent.c (transport_connect): comment out freeaddrinfo calls under win32,
2100         since it is not supported in win2000.
2101
2102 2010-01-08  Zoltan Varga  <vargaz@gmail.com>
2103
2104         * aot-runtime.c (load_image): Add a SET_ERROR argument to set the loader
2105         error if loading an assembly fails.
2106         (mono_aot_plt_resolve): Return NULL instead of asserting if loading fails.
2107
2108         * mini-trampolines.c (mono_aot_plt_trampoline): Throw a pending loader error
2109         if exists.
2110
2111         * aot-runtime.c (decode_exception_debug_info): Set jinfo->from_llvm for LLVM
2112         compiled methods.
2113
2114         * mini-llvm-cpp.cpp: Remove the unused ctx variable.
2115
2116         * mini-llvm.c (mono_llvm_emit_method): Add some comments about why aot+clauses
2117         is not supported yet.
2118
2119         * unwind.c (DW_EH_PE_absptr): Add more DW_EH_PE_ constants.
2120
2121 2010-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
2122
2123         * method-to-ir.c: All types with variant arguments must fallback to the
2124         slow path. This makes cast of variant delegates work.
2125
2126         * mini-trampolines.c (mono_get_vcall_slot_addr): Add new variance_used out
2127         argument that is set to TRUE is the returned vtable slot is for a variant
2128         interface. Changed a g_print + g_assert_not_reached to a g_error.
2129
2130         * mini-trampilines.c (common_call_trampoline): Handle variant interfaces in
2131         a similar fashion of generic virtual methods.
2132
2133 2010-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
2134
2135         * helpers.c (mono_disassemble_code): Fix a g_hash_table warning
2136         when cfg is null.
2137
2138         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Convert a given
2139         method using a variance aware function.
2140
2141         * mini-x86.c: Add support for dumping IMT thunks if DEBUG_IMT is defined.
2142
2143 2010-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
2144
2145         * method-to-ir.c (mono_method_to_ir): Casts to variant interfaces
2146         do an icall for now.
2147
2148 2010-01-07  Zoltan Varga  <vargaz@gmail.com>
2149
2150         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Add an ugly hack to fix #564695.
2151         If LLVM decides to set the code model to Large, reset it to Default.
2152
2153 2010-01-07  Zoltan Varga  <vargaz@gmail.com>
2154
2155         * aot-compiler.c (mono_xdebug_flush): Export it so it is present in
2156         stripped binaries as well.
2157
2158 2010-01-07  Zoltan Varga  <vargaz@gmail.com>
2159
2160         * mini-trampolines.c (common_call_trampoline): Add an rgctx trampoline if a shared
2161         method is called from LLVM compiled code, as that code can't pass an rgctx arg.
2162
2163         * mini-llvm.c (mono_llvm_emit_method): Enable calls to methods needing an rgctx
2164         reg.
2165
2166 2010-01-06  Zoltan Varga  <vargaz@gmail.com>
2167
2168         * mini.c (mini_method_compile): Extract the JIT info creation code into a
2169         separate function.
2170
2171         * mini-llvm.c (mono_llvm_emit_method): Pass the info in MonoExceptionClause
2172         as the type info to llvm.eh.selector.
2173         (exception_cb): Use the type info for filling out some fields of
2174         MonoJitExceptionInfo like the flags and the exception class. This is needed
2175         because the LLVM produced exception handling clauses might not match the original
2176         IL clauses, i.e. there might be more than one LLVM clause for one IL clause.
2177
2178         * unwind.c (mono_unwind_decode_fde): Extract the LSDA decoding code into a
2179         separate function. Add an extra argument which returns the type infos
2180         corresponding to the exception clauses.
2181
2182         * mini.c (mini_method_compile): Enable LLVM compilation of methods having
2183         exception handling clauses.
2184
2185 2010-01-04  Zoltan Varga  <vargaz@gmail.com>
2186
2187         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call
2188         mono_method_get_vtable_slot () instead of accessing imt_method->slot directly,
2189         to fix an AOT case.
2190
2191 2010-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
2192
2193         * mini.c (mono_compile_is_broken): Skip methods from serialization's
2194         internal assembly.
2195
2196 2010-01-04  Zoltan Varga  <vargaz@gmail.com>
2197
2198         * mini.c (mini_method_compile): Fix a few memory leaks introduced by the
2199         llvm code.
2200
2201 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
2202
2203         * mini.c (mini_method_compile): Verify the method before calling
2204         mono_compile_create_vars as this might crash since it uses method
2205         information.
2206
2207         Fixes #560196.
2208
2209 2010-01-04  Zoltan Varga  <vargaz@gmail.com>
2210
2211         * method-to-ir.c (mono_method_to_ir): Avoid calling mono_class_vtable () in
2212         one case if AOTing, since the class might not be a concrete class.
2213
2214 2010-01-03  Zoltan Varga  <vargaz@gmail.com>
2215
2216         * mini-codegen.c abcremoval.c: Remove the duplicate g_slist_append_mempool
2217         functions which are now defined in mempool-internals.h.
2218
2219         * mini.c (mini_free_jit_domain_info): Free the seq point hash tables.
2220
2221         * mini-llvm.c (mono_llvm_emit_method): Handle OP_ABS.
2222
2223 2009-12-30  Rodrigo Kumpera  <rkumpera@novell.com>
2224
2225         * mini.c:
2226         * method-to.ir.c:
2227         * mini-*.c: Properly handle generic enums.
2228
2229         Fixes #566294
2230
2231 2009-12-28  Zoltan Varga  <vargaz@gmail.com>
2232
2233         * method-to-ir.c (mono_method_to_ir): Handle the failure of mono_class_vtable ()
2234         in a few more places.
2235
2236 2009-12-27  Zoltan Varga  <vargaz@gmail.com>
2237
2238         * aot-compiler.c (add_wrappers): Don't use dyn runtime invoke for methods with
2239         nullable parameters. Fixes #567351.
2240
2241 2009-12-26  Rodrigo Kumpera  <rkumpera@novell.com>
2242
2243         * mini-trampolines.c (common_call_trampoline): Add assert for NULL resolved generic method.
2244
2245 2009-12-26  Zoltan Varga  <vargaz@gmail.com>
2246
2247         * mini-trampolines.c: Use mono_arch_get_this_arg_from_call () to avoid the slow
2248         mono_get_generic_context_from_code () call.
2249
2250         * mini-<ARCH>.c: Get rid of mono_arch_find_this_arg (), it is no longer used.
2251
2252 2009-12-25  Zoltan Varga  <vargaz@gmail.com>
2253
2254         * aot-runtime.c (decode_klass_ref): Don't call mono_class_init (), its not
2255         needed.
2256
2257 2009-12-24  Sebastien Pouliot  <sebastien@ximian.com>
2258
2259         * method-to-ir.c (mono_method_to_ir): Avoid SIGSEGV when
2260         mono_method_get_signature returns NULL. Fix #567084
2261
2262 2009-12-25  Zoltan Varga  <vargaz@gmail.com>
2263
2264         * aot-runtime.c (find_extra_method): Call mono_aot_wrapper_name only once,
2265         instead of once for each module.
2266
2267 2009-12-22  Zoltan Varga  <vargaz@gmail.com>
2268
2269         * debugger-agent.c (ss_start): Implement step over for the last sequence
2270         point in methods.
2271
2272         * mini.c (mono_save_seq_point_info): Don't link sequence points which don't
2273         have the STEP_LOC flag set.
2274
2275         * aot-runtime.c (decode_klass_ref): Avoid a crash if a decode_klass_ref () call
2276         fails. Fixes #566689.
2277
2278 2009-12-21  Zoltan Varga  <vargaz@gmail.com>
2279
2280         * mini.c (mono_add_seq_point): New helper function.
2281         (mono_save_seq_point_info): New function to save sequence point info, extracted
2282         from mini_method_compile ().
2283
2284         * mini-<ARCH>.c: Call mono_add_seq_point to remember sequence points.
2285
2286         * mini.h (MonoSeqPointInfo): New structure containing information about
2287         the sequence points of a JITted method.
2288         (MonoBasicBlock): Add 'seq_points' and 'last_seq_point' fields. Remove unused
2289         'bucket' field.
2290
2291         * mini.c debugger-agent.c aot-compiler.c aot-runtime.c: Change the way sequence
2292         point information is stored, use a MonoSeqPointInfo structure instead of a
2293         GPtrArray. For each seq point, compute a list of successor seq points.
2294
2295         * debugger-agent.c: Use the successor list to implement step-over more
2296         efficiently: instead of single stepping until a different line/IL offset is
2297         reached, place breakpoints into all successor seq points.
2298
2299         * mini.h: Bump AOT file format version.
2300
2301 2009-12-21  Zoltan Varga  <vargaz@gmail.com>
2302
2303         * Makefile.am (AM_CFLAGS): Include LLVM_CFLAGS.
2304
2305         * mini-llvm.c: Avoid defining the __STDC_... macros if already defined.
2306
2307 2009-12-21  Zoltan Varga  <vargaz@gmail.com>
2308
2309         * exceptions-ppc.c (mono_ppc_set_func_into_sigctx): Fix the cross-compiler
2310         build.
2311
2312 2009-12-18  Zoltan Varga  <vargaz@gmail.com>
2313
2314         * mini-x86.c (mono_arch_get_argument_info): Allocate memory for CallInfo using
2315         alloca as g_malloc is not signal safe.
2316
2317 2009-12-18  Zoltan Varga  <vargaz@gmail.com>
2318
2319         * tramp-x86.c (mono_arch_patch_callsite): Fix the call to
2320         VALGRIND_DISCARD_TRANSLATIONS.
2321
2322         * *.c: Include mono/utils/memcheck.h, and remove #ifdef HAVE_VALGRIND_MEMCHECK_H
2323         checks, they are no longer needed.
2324
2325         * exceptions-ppc.c (mono_ppc_set_func_into_sigctx): New helper function to set
2326         a function into a sigctx which can handle function pointers.
2327
2328         * mini-ppc.c: Implement soft debugger support on ppc64.
2329
2330         * mini-ppc.c: Implement soft debugger support.
2331
2332 2009-12-17  Zoltan Varga  <vargaz@gmail.com>
2333
2334         * mini-llvm.c: Handle OP_LADD_OVF_UN. Place all alloca's into the entry bb.
2335
2336 2009-12-17  Marek Habersack  <mhabersack@novell.com>
2337
2338         * mini.c (mono_get_runtime_build_info): include Mono version in
2339         the returned value.
2340
2341         * driver.c (mono_main): VERSION is now included in the string
2342         returned from mono_get_runtime_build_info()
2343
2344 2009-12-17  Zoltan Varga  <vargaz@gmail.com>
2345
2346         * method-to-ir.c (mono_method_to_ir): Add support for CALLI with unmanaged
2347         signatures. Fixes #565143.
2348
2349         * jit-icalls.c (mono_get_native_calli_wrapper): New JIT icall.
2350
2351 2009-12-16  Zoltan Varga  <vargaz@gmail.com>
2352
2353         * aot-compiler.c (arch_emit_autoreg): Align code to 4 in the ppc case.
2354
2355 2009-12-16 Rodrigo Kumpera  <rkumpera@novell.com>
2356
2357         * mini-x86.h: Forgot to add a 0x to MONO_ARCH_MAX_FRAME_SIZE define
2358         making max stack 10x smaller.
2359
2360 2009-12-16  Zoltan Varga  <vargaz@gmail.com>
2361
2362         * mini.c (mono_resolve_patch_target): Comment out an assert which could be hit.
2363
2364 2009-12-15 Rodrigo Kumpera  <rkumpera@novell.com>
2365
2366         * method-to-ir.c (mini_emit_memcpy): Assert if size is too big.
2367
2368 2009-12-15 Rodrigo Kumpera  <rkumpera@novell.com>
2369
2370         * mini-x86.c (mono_arch_allocate_vars): Fail compilation if the frame size is
2371         bigger than MONO_ARCH_MAX_FRAME_SIZE.
2372
2373         * mini-x86.c (mono_arch_emit_prolog): Handle huge frames.
2374
2375         * mini-x86.h: Define MONO_ARCH_MAX_FRAME_SIZE to be 1Mb.
2376
2377         * mini-amd64.c / mini-amd64.h: Same fixes as of above.
2378
2379         * mini.c (mini_method_compile): Check if mono_arch_allocate_vars failed
2380         the compilation.
2381
2382 2009-12-14  Miguel de Icaza  <miguel@novell.com>
2383
2384         * method-to-ir.c (mono_method_to_ir): CEE_UNUSUED opcodes now
2385         raise an invalid program exception.   
2386
2387         For other opcodes that we might not handle use a g_warning and
2388         raise the exception.   Beats termination.
2389
2390         Fixes #561724
2391
2392 2009-12-14  Zoltan Varga  <vargaz@gmail.com>
2393
2394         * method-to-ir.c (mono_emit_rgctx_method_call_full): Fix a warning.
2395
2396         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix the LLVM support
2397         by merging the LLVM and !MAP_32BIT cases.
2398
2399 2009-12-13 Jonathan Chambers <joncham@gmail.com>
2400
2401         * debugger-agent.c (mono_debugger_agent_thread_interrupt): Handle a NULL
2402         sigctx being passed in, as we have no CONTEXT available in the APC.
2403
2404         (mono_debugger_agent_cleanup): Use explicit cond wait implementation
2405         for now.
2406
2407         Code contributed under MIT/X11 license.
2408
2409 2009-12-13  Zoltan Varga  <vargaz@gmail.com>
2410
2411         * method-to-ir.c mini-llvm.c: Fix support for monitor enter/exit trampolines
2412         in the LLVM backend on AMD64.
2413
2414         * aot-runtime.c (decode_eh_frame): Initialize the clauses from the info in the
2415         FDE.
2416
2417         * unwind.c (mono_unwind_decode_fde): Implement decoding of a couple more formats.
2418
2419         * mini-llvm.c: Export mono_personality for AOT.
2420
2421         * mini.c (mini_method_compile): Fix some problems with llvm+aot+clauses.
2422
2423         * mini-ops.h (OP_IMPLICIT_EXCEPTION): New opcode marking the place where an
2424         implicit exception can occur.
2425
2426         * ir-emit.h (MONO_EMIT_NEW_IMPLICIT_EXCEPTION): New macro to emit an
2427         OP_IMPLICIT_EXCEPTION instruction.
2428
2429         * ir-emit.h (MONO_EMIT_NEW_CHECK_THIS): New macro.
2430
2431         * method-to-ir.c: Use MONO_EMIT_NEW_CHECK_THIS in a few places.
2432
2433         * mini-llvm.c: Handle OP_IMPLICIT_EXCEPTION by disabling llvm if it occurs
2434         inside a protected block.
2435
2436         * mini-llvm.c: Revert the last change, the signature of monitor entry/exit
2437         trampolines doesn't include the argument.
2438
2439         * mini-llvm.c (mono_llvm_emit_method): Enable calls to monitor entry/exit
2440         trampolines on amd64.
2441
2442         * mini-amd64.h (MONO_ARCH_MONITOR_OBJECT_REG): Use MONO_AMD64_ARG_REG1 instead
2443         of RDI.
2444
2445         * mini.c (mini_method_compile): Add some comments as to why LLVM is currently
2446         disabled for methods with clauses.
2447
2448         * mini-llvm.c: Enable support for catch clauses.
2449
2450         * mini-exceptions.c (mono_resume_unwind): New function to resume unwinding at the
2451         end of an LLVM compiled finally clause.
2452         (mono_handle_exception_internal): Save the exception handling state in TLS
2453         before calling an LLVM compiled finally clause, so mono_resume_unwind () can
2454         resume unwinding from that point.
2455
2456         * unwind.c (mono_unwind_get_ops_from_fde): Rename this to
2457         mono_unwind_decode_fde, decode the Language Specific Data Area (LSDA) too,
2458         to obtain the addresses of the exception handling regions.
2459
2460         * mini-llvm.c: Add beginnings of support for exception handling, currently only
2461         finally clauses are supported.
2462
2463         * mini.c (mini_method_compile): Add support for LLVM code with exception
2464         handlers.
2465
2466 2009-12-12  Zoltan Varga  <vargaz@gmail.com>
2467
2468         * mini-llvm.c (mono_llvm_emit_method): Allocate the 'pindexes' array with the
2469         proper size.
2470
2471 2009-12-12  Zoltan Varga  <vargaz@gmail.com>
2472
2473         * debugger-agent.c: Encode the this argument of vtype methods as a struct, not
2474         as a primitive type.
2475
2476 2009-12-11  Zoltan Varga  <vargaz@gmail.com>
2477
2478         * driver.c: Applied patch from Matt McClellan (matt@mc-c.net). Add a check
2479         for 2 parameter sched_setaffinity in older glibc versions. Fixes
2480         #564000.
2481
2482 2009-12-11  Marek Habersack  <mhabersack@novell.com>
2483
2484         * method-to-ir.c (mini_redirect_call): do not redirect the
2485         InternalAllocateStr internal call if string profiling is enabled.
2486
2487 2009-12-10  Zoltan Varga  <vargaz@gmail.com>
2488
2489         * aot-compiler.c (add_wrappers): Avoid generating synchronized wrappers for
2490         generic methods.
2491
2492         * unwind.h: Rename this to mini-unwind.h to avoid conflicts with the gcc
2493         unwind.h header file.
2494
2495         * tramp-x86.c (mono_arch_patch_callsite): Patch the code when using valgrind,
2496         newer valgrind versions seems to handle this fine.
2497
2498 2009-12-09  Zoltan Varga  <vargaz@gmail.com>
2499
2500         * debugger-agent.c (start_runtime_invoke): Fix a crash if this is called
2501         on the debugger thread.
2502
2503 2009-12-08  Zoltan Varga  <vargaz@gmail.com>
2504
2505         * mini-llvm.c (mono_llvm_emit_method): Add more SIMD opcodes.
2506
2507         * mini.c (mono_print_method_from_ip): Fix the lookup of trampolines.
2508
2509         * mini-codegen.c (mono_local_regalloc): Allow non-call opcodes with cloc:c.
2510
2511         * cpu-<ARCH>.md: Make call_handler clob:c.
2512
2513         * mini.c: Reenable SSA for methods with clauses.
2514
2515         * mini.c (mini_method_compile): Disable SSA for now for methods with clauses,
2516         as it causes failures on x86.
2517
2518 2009-12-08  Sebastien Pouliot  <sebastien@ximian.com>
2519
2520         * driver.c: Fail gracefully with --compile-all if mono_method_signature
2521         returns NULL (e.g. a bad assembly).
2522
2523 2009-12-08  Geoff Norton  <gnorton@novell.com>
2524
2525         * debugger-agent.c:  Refactor the mono_runtime_invoke guarding against
2526         stepping out into native code.  There were issues with nested invokes
2527         like .cctors.
2528
2529 2009-12-07  Zoltan Varga  <vargaz@gmail.com>
2530
2531         * mini.c (mini_method_compile): Do the disable_llvm checks early
2532         and avoid the LLVM compile pass if the checks fail.
2533
2534         * mini.c ssa.c abcremoval.c: Enable SSA for methods with exception clauses.
2535
2536         * mini-llvm.c: Put our methods/globals into the 'llvm.used' array, so the
2537         LLVM optimizations don't try to remove them.
2538
2539         * aot-compiler.c (emit_llvm_file): Save the result of opt into a
2540         different file so the original remains.
2541
2542 2009-12-06  Zoltan Varga  <vargaz@gmail.com>
2543
2544         * mini-llvm.c mini.c: Fix alignment issues with SIMD vars.
2545
2546         * aot-runtime.c (decode_arm_exidx): Handle most descriptors created by gas.
2547
2548         * aot-runtime.c (decode_arm_exidx): Refactor this into two functions, add
2549         support for non-inline unwind descriptors.
2550
2551 2009-12-07  Geoff Norton  <gnorton@novell.com>
2552
2553         * debugger-agent.c:  Darwin can colesce signals, so we need to handle
2554         the interrupt_count slightly differently.  Native threads were never
2555         marked as resumed.
2556
2557 2009-12-05  Zoltan Varga  <vargaz@gmail.com>
2558
2559         * aot-runtime.c (decode_arm_exidx): New function to initialize a MonoJitInfo
2560         based on the contents of the ARM .exidx section. Not yet used since llvm doesn't
2561         yet generate this info.
2562
2563         * mini-llvm.c: Fix the conversion of call results if they are unsigned.
2564
2565         * debugger-agent.c (buffer_add_value): Treat I/U as a valuetype, so the
2566         client can distinguish between intptrs and longs.
2567
2568 2009-12-05  Zoltan Varga  <vargaz@gmail.com>
2569
2570         * aot-compiler.c (emit_trampoline): Emit the trampoline info into the global
2571         blob.
2572
2573         * aot-runtime.c (load_function): Update after the change above.
2574
2575         * mini.h: Bump AOT file format version.
2576
2577         * method-to-ir.c (mono_method_to_ir): Disallow the delegate optimization
2578         if the delegate class is dynamic.
2579
2580         * method-to-ir.c (handle_delegate_ctor): Allow the method_code optimization
2581         in gshared code too using the new rgctx info type
2582         MONO_RGCTX_INFO_METHOD_DELEGATE_CODE.
2583
2584 2009-12-04  Geoff Norton  <gnorton@novell.com>
2585
2586         * debugger-agent.c: When doing a func-eval invoke on a suspended runtime,
2587         we need to track the original suspend count so the thread properly
2588         wakes up in resume_thread.
2589
2590 2009-12-04  Zoltan Varga  <vargaz@gmail.com>
2591
2592         * method-to-ir.c (handle_delegate_ctor): Add support for using this from gshared
2593         code.
2594
2595         * generics.cs: Add a test.
2596
2597         * method-to-ir.c (emit_get_rgctx_method): Make this work even if context_used
2598         is 0. Simplify a lot of code using this.
2599
2600         * mini-trampolines.c (mono_delegate_trampoline): Call
2601         mono_create_static_rgctx_trampoline () before saving the final address in
2602         delegate->method_code, to avoid calling it each time a delegate is first called.
2603
2604         * method-to-ir.c (mono_method_to_ir): Allow fast delegate creation for methods
2605         which need static rgctx trampolines.
2606
2607         * mini-trampolines.c (mono_create_static_rgctx_trampoline): Use a cache
2608         keyed on the method+addr pair, since addr could be either the method addr or
2609         an unbox trampoline in the AOT case. Fixes #560246.
2610
2611 2009-12-03  Zoltan Varga  <vargaz@gmail.com>
2612
2613         * mini.c (mini_method_compile): Call handle_exception_clauses () in the same
2614         place it was called before too.
2615
2616 2009-12-03  Zoltan Varga  <vargaz@gmail.com>
2617
2618         * mini.c (mono_jit_runtime_invoke): Avoid the call to mono_class_setup_vtable ()
2619         if no security manager is present, to speed up the AOT case. Call
2620         mono_class_vtable () full with raise_on_error == TRUE instead.
2621
2622 2009-12-03  Zoltan Varga  <vargaz@gmail.com>
2623
2624         * mini.c (mini_method_compile): Call handle_exception_clauses earlier so
2625         the local optimization passes can take its result into account. Fixes
2626         #559876.
2627
2628         * exceptions.cs: Add a test.
2629
2630 2009-01-24  Steven Munroe  <munroesj@us.ibm.com>
2631
2632         This patch is contributed under the terms of the MIT/X11 license
2633
2634         * cpu-ppc64.md (load_memindex): Add loadi8_memindex.
2635
2636 2009-12-03  Zoltan Varga  <vargaz@gmail.com>
2637
2638         * mini.h (MonoInst): Remove unused 'ssa_op' field.
2639
2640         * debugger-agent.c: Rework the handling of stack traces of running threads to
2641         avoid crashes if compute_frames () tries to walk the stack of running thread.
2642
2643         * mini.c (mono_print_method_from_ip): Use mini_jit_info_table_find.
2644
2645         * mini-exceptions.c (mono_jit_walk_stack_from_ctx_in_thread): Set frame->lmf.
2646
2647         * mini.h (StackFrameInfo): Add an 'lmf' field.
2648
2649 2009-12-02  Zoltan Varga  <vargaz@gmail.com>
2650
2651         * debugger-agent.c (suspend_current): Always set really_suspended.
2652
2653         * debugger-agent.c (clear_event_request): Clear method entry/exit requests too.
2654
2655         * exceptions-x86.c (mono_arch_get_restore_context): Restore EAX too.
2656
2657 2009-12-01  Zoltan Varga  <vargaz@gmail.com>
2658
2659         * debugger-agent.c (vm_commands): Don't allow invokes on threads which are not
2660         really suspended.
2661
2662 2009-12-01  Zoltan Varga  <vargaz@gmail.com>
2663
2664         * cpu-ppc64.md (store_memindex): Add storei8_memindex.
2665
2666 2009-12-01 Rodrigo Kumpera  <rkumpera@novell.com>
2667
2668         * mini-trampolines.c: Fix MSVC build.
2669
2670 2009-12-01 Rodrigo Kumpera  <rkumpera@novell.com>
2671
2672         * mini-trampolines.c: Check for mono_method_get_vtable_slot failures.
2673
2674 2009-11-30  Zoltan Varga  <vargaz@gmail.com>
2675
2676         * mini-arm.c (mono_arch_lowering_pass): Fix an assert which is hit when
2677         the instruction following an OP_FCOMPARE is optimized away.
2678
2679 2009-11-30  Zoltan Varga  <vargaz@gmail.com>
2680
2681         * aot-compiler.c (arch_emit_autoreg): Extract the auto-registration code from
2682         emit_autoreg () into this arch-specific function.
2683
2684         * aot-compiler.c (emit_exception_debug_info): Don't emit the length of the
2685         code, it is no longer needed.
2686
2687         * aot-runtime.c (decode_exception_debug_info): Don't read the code length.
2688
2689         * mini.h: Bump AOT file format version.
2690
2691         * aot-runtime.c (mono_aot_find_jit_info): Compute the length of the method
2692         using the sorted_code_offsets array, instead of reading it from the
2693         exception debug info.
2694         (load_method): Call mono_aot_find_jit_info instead of
2695         decode_exception_debug_info ().
2696
2697         * aot-compiler.c (emit_exception_debug_info): Emit whenever the method was
2698         LLVM compiled as a flag.
2699
2700 2009-11-29  Zoltan Varga  <vargaz@gmail.com>
2701
2702         * debugger-agent.c (resume_thread): Fix a warning.
2703
2704         * aot-compiler.c: Add an option to set the number of static rgctx trampolines
2705         generated.
2706
2707 2009-11-28  Zoltan Varga  <vargaz@gmail.com>
2708
2709         * aot-compiler.c aot-runtime.c: Get rid of a few global symbols, move their
2710         contents to MonoAotFileInfo.
2711
2712 2009-11-27  Zoltan Varga  <vargaz@gmail.com>
2713
2714         * aot-compiler.c aot-runtime.c: Reorganize the AOT file format once again.
2715         Put all binary data into a giant blob, similarly to the way .net assemblies
2716         store binary data. Emit offset tables in a compact form to reduce their size.
2717
2718         * mini.h: Bump AOT file format version.
2719
2720         * aot-compiler.c (emit_globals_table): Use temp_prefix instead of .L in a few
2721         places.
2722
2723         * aot-compiler.c (emit_globals_table): Emit a hash table for the globals, to
2724         avoid linear searches at runtime.
2725
2726         * aot-runtime.c (find_symbol): Update this to use the hash.
2727
2728         * mini.h: Bump AOT file format version.
2729
2730 2009-11-26  Zoltan Varga  <vargaz@gmail.com>
2731
2732         * aot-compiler.c (emit_klass_info): Save whenever the class has a generic
2733         container.
2734
2735         * aot-runtime.c (decode_cached_class_info): Set the is_generic_container field
2736         too.
2737
2738         * aot-compiler.c (mono_compile_assembly): Add a 'stats' option to print out
2739         the distribution of got slot types.
2740
2741         * mini.h (MonoDebugOptions): Add 'explicit_null_checks' option.
2742
2743         * method-to-ir.c: Add support for generating explicit null checks.
2744
2745 2009-11-25  Zoltan Varga  <vargaz@gmail.com>
2746
2747         * debugger-agent.c (vm_commands): Implement EXIT by invoking Environment.Exit ()
2748         on a random thread if possible.
2749
2750         * aot-runtime.c (mono_aot_plt_resolve): Clean up the handling of function
2751         descriptors a bit, add comments, handle RGCTX_FETCH/GENERIC_CLASS_INIT_TRAMPOLINE
2752         correctly.
2753
2754         * exceptions-ppc.c (mono_arch_find_jit_info_ext): Use mgreg_t as the type of
2755         regs. Pass the real size of the regs array to mono_unwind_frame ().
2756
2757         * unwind.c (mono_unwind_frame): Remove an incorrect assert, add more correct
2758         ones instead.
2759
2760 2009-11-24  Geoff Norton  <gnorton@novell.com>
2761
2762         * mini-darwin.c: Work around apple bug rdar://7209349  See
2763         http://openradar.appspot.com/7209349 for details.  Synopsis,
2764         CoreFoundation SIGTRAP's if you dlopen it off the main thread if its
2765         never been initialized before.
2766
2767 2009-11-24  Zoltan Varga  <vargaz@gmail.com>
2768
2769         * tramp-arm.c: Use blx instead of mov pc, reg to improve support for thumb.
2770
2771         * mini-arm.c (mono_arm_thumb_supported): New helper function.
2772
2773 2009-11-24  Zoltan Varga  <vargaz@gmail.com>
2774
2775         * cfold.c (mono_constant_fold_ins): Fix a problem in the previous change,
2776         OP_SHL_IMM is not 32 bit.
2777
2778 2009-11-24  Zoltan Varga  <vargaz@gmail.com>
2779
2780         * aot-compiler.c (encode_patch): Fix the encoding of R8 on big-endian systems.
2781
2782 2009-11-24  Zoltan Varga  <vargaz@gmail.com>
2783
2784         * aot-compiler.c: Avoid infinite recursion when generic virtual recursion is
2785         encountered.
2786
2787         * debugger-agent.c (resume_vm): Signal the suspend_cond even if suspend_count
2788         > 0 since some threads can resume if their resume_count is > 0.
2789         (invoke_method): Avoid reading freed memory.
2790
2791         * debugger-agent.c (process_suspend): Extract the suspend code from
2792         process_single_step_inner () to a separate function. Rework the code to prevent
2793         races between this function and thread interrupts.
2794
2795         * debugger-agent.c (suspend_current): Check the resume_count field instead
2796         of resume_one so suspends+resumes during single threaded invokes work
2797         correctly.
2798
2799 2009-11-23  Zoltan Varga  <vargaz@gmail.com>
2800
2801         * aot-compiler.c (emit_llvm_file): Enable some llvm optimizations which seem
2802         to make the generated code smaller.
2803
2804         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Add a code
2805         sequence generated by recent LLVM versions.
2806
2807         * mini-llvm.c: Add support for a few simple cases which weren't supported
2808         before.
2809
2810         * mini-trampolines.c (mono_magic_trampoline): Don't call
2811         mono_arch_get_vcall_slot () when llvm is enabled.
2812
2813         * aot-compiler.c (emit_llvm_file): Add code to run the 'opt' llvm tool.
2814
2815         * mini-trampolines.c (mono_magic_trampoline): Extract the bulk of this function
2816         into a new function called common_call_trampoline () which is used by the
2817         llvm vcall trampoline as well.
2818
2819         * debugger-agent.c: Implement single threaded invokes.
2820
2821         * debugger-agent.c: Revert change which broke the agent on linux.
2822
2823         * method-to-ir.c (inline_method): Prevent infinite recursion. Fixes
2824         #557606.
2825
2826         * generics.cs: Add a test.
2827
2828 2009-11-22  Zoltan Varga  <vargaz@gmail.com>
2829
2830         * debugger-agent.c: Fix the cygwin build.
2831
2832 2009-11-21  Zoltan Varga  <vargaz@gmail.com>
2833
2834         * cprop.c: Remove this unused file.
2835
2836 2009-11-21  Zoltan Varga  <vargaz@gmail.com>
2837
2838         * cfold.c (mono_constant_fold_ins): Fix constant folding of shr_imm. Fixes
2839         #557262.
2840
2841         * basic.cs: Add a test.
2842
2843 2009-11-21  Zoltan Varga  <vargaz@gmail.com>
2844
2845         * method-to-ir.c (mono_method_to_ir): Use mono_use_llvm instead of ENABLE_LLVM
2846         in one more place.
2847
2848 2009-11-20  Zoltan Varga  <vargaz@gmail.com>
2849
2850         * mini.c mini-trampolines.c driver.c: Add a 'mono_use_llvm' flag to control
2851         whenever the runtime uses LLVM code. Add a '--llvm' command line option to set
2852         it. Use this flag to control llvm related code paths instead of #ifdef
2853         ENABLE_LLVM, so a runtime configured without --enable-llvm can use LLVM compiled
2854         AOT code.
2855
2856         * aot-runtime.c aot-compiler.c: Add a 'flag' field to MonoAotFileInfo.
2857
2858         * mini.h: Bump AOT file format version.
2859
2860         * tramp-ppc.c (mono_arch_create_generic_class_init_trampoline_full): These
2861         receive their argument in MONO_ARCH_VTABLE_REG, not in the first argument reg.
2862
2863         * debugger-agent.c (create_event_list): Fix a crash if an empty assembly list
2864         was used as an assembly filter.
2865
2866 2009-11-19  Zoltan Varga  <vargaz@gmail.com>
2867
2868         * unwind.c: Fix support for ppc.
2869
2870         * exceptions-ppc.c (mono_arch_find_jit_info): Change this to use dwarf frame
2871         unwind info. Change to the mono_arch_find_jit_info_ext () interface.
2872
2873 2009-11-19  Zoltan Varga  <vargaz@gmail.com>
2874
2875         * mini-ppc.c (mono_arch_emit_prolog): Fix a copy-paste error to fix the ppc64
2876         port.
2877         (mono_arch_cpu_init): Don't set cpu_hw_flags to 0 at the end, this was somehow
2878         added by the ps3 changes.
2879
2880 2009-11-19  Zoltan Varga  <vargaz@gmail.com>
2881
2882         * mini-gc.c: Resurrect this, so at least it compiles.
2883
2884         * debugger-agent.c (assembly_commands): Implement GET_NAME command.
2885
2886 2009-11-18  Zoltan Varga  <vargaz@gmail.com>
2887
2888         * debugger-agent.c (mono_debugger_agent_handle_exception): Pass a MonoJitInfo to
2889         create_event_list () so assembly filters can be used.
2890
2891         * exceptions-ppc.c (mono_arch_find_jit_info): Fix the restoration of registers
2892         from the LMF.
2893
2894 2009-11-17  Zoltan Varga  <vargaz@gmail.com>
2895
2896         * debugger-agent.c (mono_debugger_agent_breakpoint_hit): Fix a warning.
2897         (mono_debugger_agent_thread_interrupt): Make this return FALSE if the agent
2898         is disabled.
2899
2900         * aot-compiler.c (add_generic_instances): Emit instances of common generic
2901         classes for char/bool too.
2902
2903         * debugger-agent.c (DebuggerTlsData): Honor the DISABLE_SOFT_DEBUG option.
2904
2905         * debugger-agent.c (DebuggerTlsData): Add a 'really_suspended' flag, not yet
2906         used.
2907
2908         * debugger-agent.c: Add some definitions to make backporting to 2.6 easier.
2909         Fix warnings.
2910
2911 2009-11-15  Andreas Faerber  <andreas.faerber@web.de>
2912
2913         * debugger-agent.c (mono_debugger_agent_thread_interrupt): Signature fix.
2914         
2915         Code contributed under MIT/X11 license.
2916
2917 2009-11-14  Zoltan Varga  <vargaz@gmail.com>
2918
2919         (mono_debugger_agent_thread_interrupt): Save the context so stacktraces for
2920         threads in native code work.
2921
2922         * debugger-agent.c: Pass the 'flags' argument to VM_INVOKE_METHOD earlier in
2923         the parameter list, so it can be acted upon by vm_commands (). Bump protocol
2924         version.
2925
2926 2009-11-13 Jonathan Chambers <joncham@gmail.com>
2927
2928         * debugger-agent.c: Implementation for Windows platform.
2929
2930         * mini-x86.c: Add support for Windows. Use mono-* synchronization
2931         primitives. Use SEH to implement breakpoints and single stepping.
2932
2933         * mini-x86.h: Enable soft debugger on Windows.
2934
2935         Code contributed under MIT/X11 license.
2936
2937 2009-11-13  Zoltan Varga  <vargaz@gmail.com>
2938
2939         * mini-amd64.c (emit_call_body): Disable usage of near calls when running
2940         under XEN. Fixes #522894.
2941
2942         * patch-info.h: Add LLVM_IMT_TRAMPOLINE.
2943
2944         * mini-llvm.c aot-compiler.c aot-runtime.c mini.c: Add support for making
2945         interface calls in LLVM AOT code.
2946
2947         * aot-compiler.c mini-llvm.c: Abort llvm compilation if a non-encodable patch
2948         is found.
2949
2950         * mini-llvm.c: Add support for OP_VPHI.
2951
2952         * objects.cs: Add a test.
2953
2954 2009-11-13  Zoltan Varga  <vargaz@gmail.com>
2955
2956         * debugger-agent.c (mono_debugger_agent_single_step_event): Avoid a crash if
2957         this is called on the debugger thread.
2958
2959 2009-11-12  Zoltan Varga  <vargaz@gmail.com>
2960
2961         * mini-llvm.c: Add soft-float support.
2962
2963         * method-to-ir.c (mono_decompose_soft_float): Restart after decomposing an
2964         FCALL which returns an R4.
2965
2966         * driver.c (mono_main): Add a missing '\n'.
2967
2968         * mini-trampolines.c (mono_create_llvm_imt_trampoline): Fix the build on
2969         platforms which doesn't support the LLVM IMT trampoline.
2970
2971 2009-11-11  Zoltan Varga  <vargaz@gmail.com>
2972
2973         * mini-llvm.c (mono_llvm_emit_method): Fix LOCALLOC.
2974
2975         * mini-llvm-cpp.cpp: Update to latest LLVM SVN.
2976
2977         * mini-llvm.c (mono_llvm_emit_method): Avoid creating plt entries for
2978         virtual calls.
2979
2980         * aot-runtime.c: Don't define HAVE_DL_ITERATE_PHDR, configure now does that.
2981
2982 2009-11-10  Zoltan Varga  <vargaz@gmail.com>
2983
2984         * aot-compiler.c aot-runtime.c: Change how mono_arch_find_jit_info () works.
2985         Instead of emitting a method_order table, sort the contents of the code_offsets
2986         table and do a binary search in the sorted table. The previous approach doesn't
2987         work with LLVM which emits methods in a arbitrary order.
2988
2989         * aot-runtime.c: Add support for creating MonoJitInfo structures by searching
2990         in the .eh_frame section in ELF files.
2991
2992         * mini.h: Bump corlib file format version.
2993
2994         * mini-llvm.c aot-compiler.c: Add support for AOT to the LLVM back end.
2995
2996         * exceptions-arm.c (mono_arch_get_call_filter_full): Update after the
2997         LDMIA->LDM macro name change.
2998
2999 2009-11-09  Zoltan Varga  <vargaz@gmail.com>
3000
3001         * tramp-x86.c (mono_arch_get_llvm_imt_trampoline): Fix and enable this for
3002         x86.
3003
3004         * mini-llvm-cpp.cpp (JITMemoryManager): Fix compilation with LLVM 2.7
3005         SVN.
3006
3007         * aot-compiler.c: Ditto.
3008
3009         * mini-arm.c (mono_arch_allocate_vars): Fix the previous change by passing
3010         &align to mini_type_stack_size_full ().
3011
3012         * mini-arm.c (mono_arch_emit_prolog): Implement support for varargs.
3013
3014         * mini-ops.h: Add documentation for the OP_ARGLIST opcode.
3015
3016 2009-11-08  Zoltan Varga  <vargaz@gmail.com>
3017
3018         * mini-arm.c: Compute the stack space used by arguments using
3019         mini_type_stack_size_full ().
3020
3021 2009-11-08  Zoltan Varga  <vargaz@gmail.com>
3022
3023         * optflags-def.h: Remove dead TREEPROP optimization.
3024
3025 2009-11-08  Rodrigo Kumpera  <rkumpera@novell.com>
3026
3027         * mini-ppc.h: Make mono compiler under FreeBSD/ppc64. 
3028
3029         Patch by Justin Hibbits <chmeeedalf@gmail.com>.
3030
3031 2009-11-07  Zoltan Varga  <vargaz@gmail.com>
3032
3033         * driver.c (mono_jit_parse_options): New public API function to parse options
3034         as done by the runtime executable.
3035
3036         * debugger-agent.c (buffer_add_cattrs): Fix reading an uninitialized variable
3037         when handling named arguments.
3038
3039 2009-11-07  Zoltan Varga  <vargaz@gmail.com>
3040
3041         * mini-arm.c: Implement support for returning vtypes in registers, fix support
3042         for passing small vtypes in registers, make the CallInfo structures more
3043         similar to the code on the other platforms.
3044
3045         * mini-arm.c (mono_arch_allocate_vars): Align small vtypes to 4 bytes too since
3046         the code in the prolog requires it.
3047
3048 2009-11-06  Zoltan Varga  <vargaz@gmail.com>
3049
3050         * mini-arm.c debugger-agent.c: Android changes from Koushik K. Dutta
3051         (koush@koushikdutta.com).
3052
3053         * mini-arm.c (handle_thunk): Add a domain argument to control the domain
3054         where the thunk memory should be allocated from. Fixes appdomain unloading
3055         on arm.
3056
3057 2009-11-06  Zoltan Varga  <vargaz@gmail.com>
3058
3059         * mini-arm.c exceptions-arm.c: Make ctx->regs map directly to the 16 hardware
3060         registers, instead of r4..r11,ip,lr. Make restore_context () restore r0..r3 too.
3061
3062 2009-11-05  Zoltan Varga  <vargaz@gmail.com>
3063
3064         * mini-amd64.c (mono_arch_output_basic_block): Don't allow OP_SEQ_POINT in
3065         AOT, as it is not implemented yet.
3066
3067         * mini-x86.c (mono_arch_output_basic_block): Ditto.
3068
3069 2009-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
3070
3071         * debugger-agent.c: Fix windows build.
3072
3073 2009-11-05  Zoltan Varga  <vargaz@gmail.com>
3074
3075         * debugger-agent.c (debugger_thread): Call mono_set_is_debugger_attached ()
3076         after the client connects/disconnects.
3077
3078         * debugger-agent.c: Add an 'onthrow' option to start the debugger agent
3079         when an exception of a given type is thrown.
3080
3081         * debugger-agent.c: Add a 'onuncaught' option to start the debugger agent
3082         only on an uncaught exception.
3083
3084         * mini-exceptions.c: Notify the debugger agent on an uncaught exception.
3085
3086         * debugger-agent.c: Add a 'launch' option.
3087
3088 2009-11-05  Zoltan Varga  <vargaz@gmail.com>
3089
3090         * debugger-agent.c: Add a 'timeout' option.
3091
3092 2009-11-05  Zoltan Varga  <vargaz@gmail.com>
3093
3094         * debugger-agent.c: Implement the 'server' and 'suspend' options supported by
3095         the JDWP agent.
3096
3097 2009-11-05  Zoltan Varga  <vargaz@gmail.com>
3098
3099         * debugger-agent.c (set_breakpoint): Emit a log message.
3100
3101 2009-11-04  Zoltan Varga  <vargaz@gmail.com>
3102
3103         * mini-arm.c: Fix the arm build.
3104
3105 2009-11-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
3106
3107         * aot-compiler.c: don't leak the value returned from
3108         mono_type_full_name().
3109
3110 2009-11-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
3111
3112         * debugger-agent.c: defer including mono-mutex.h until we know the
3113         agent is supported.
3114
3115 2009-11-04 Jonathan Chambers <joncham@gmail.com>
3116
3117         * debugger-agent.c: Changes to build on windows. Use mono-mutex instead
3118         of pthreads directly.
3119
3120         * mini.c (mono_sigfpe_signal_handler): Changed signature of Windows
3121         exception handlers. Pass info argument.
3122
3123         * mini.h: Adjust signatures of soft debugger functions to pass void*
3124         instead of siginfo_t. Adjust SIG_HANDLER_SIGNATURE on Windows.
3125
3126         * mini-amd64.c (mono_arch_is_single_step_event): Adjust signature to pass void*
3127         instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
3128         (mono_arch_is_breakpoint_event): Adjust signature to pass void*
3129         instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
3130
3131         * mini-amd64.h: Adjust MonoW32ExceptionHandler signature.
3132
3133         * mini-x86.c (mono_arch_is_single_step_event): Adjust signature to pass void*
3134         instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
3135         (mono_arch_is_breakpoint_event): Adjust signature to pass void*
3136         instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
3137
3138         * mini-x86.h: Adjust MonoW32ExceptionHandler signature.
3139
3140         * exceptions-x86.c: Adjust W32_SEH_HANDLE_EX for new signature.
3141
3142         * exceptions-amd64.c: Adjust W32_SEH_HANDLE_EX for new signature.
3143
3144         * mono-semaphore.h: Skeleton implementation for Windows.
3145
3146         Code contributed under MIT/X11 license.
3147
3148 2009-11-04 Jonathan Chambers <joncham@gmail.com>
3149
3150         * simd-intrinsics.c (simd_intrinsic_emit_setter): Unfix my fix.
3151
3152         Code contributed under MIT/X11 license.
3153
3154 2009-11-04 Jonathan Chambers <joncham@gmail.com>
3155
3156         * simd-intrinsics.c (simd_intrinsic_emit_setter): Fix windows build.
3157
3158         Code contributed under MIT/X11 license.
3159
3160 2009-11-04  Zoltan Varga  <vargaz@gmail.com>
3161
3162         * aot-compiler.c (mono_save_xdebug_info): Bump the threshold for flushing
3163         debug info to 100 because 10 still slows down gdb too much.
3164
3165         * method-to-ir.c (mono_method_to_ir): Avoid rethrowing thread abort exceptions
3166         inside runtime invoke wrappers. This avoids the need to call ResetAbort () on
3167         them in the wrappers.
3168
3169 2009-11-03  Zoltan Varga  <vargaz@gmail.com>
3170
3171         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add an assert.
3172
3173         * simd-intrinsics.c (simd_intrinsic_emit_setter): Fix a warning.
3174
3175         * aot-runtime.c (mono_aot_get_method): Refactor some code into a new helper
3176         function mono_aot_get_array_helper_from_wrapper ().
3177
3178         * aot-compiler.c (add_generic_class): Refactor the code a bit, really emit
3179         array helper methods.
3180
3181 2009-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
3182
3183         * simd-intrinsics.c (load_simd_vreg): Add extra argument to signal if
3184         the value was loaded from memory.
3185
3186         * simd-intrinsics.c (simd_intrinsic_emit_setter): Store back to memory if
3187         the value was loader from there.
3188
3189         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Fail correctly for Shuffle
3190         without constant swizzle.
3191
3192 2009-11-02 Jonathan Chambers <joncham@gmail.com>
3193
3194         * mini-amd64.c: Put soft debugger functions behind a
3195         #ifdef MONO_ARCH_SOFT_DEBUG_SUPPORTED.
3196
3197         * mini-amd64.h: disable the soft debugger in windows.
3198
3199         Code contributed under MIT/X11 license.
3200
3201 2009-11-02 Jonathan Chambers <joncham@gmail.com>
3202
3203         * mini-x86.c: Put soft debugger functions behind a
3204         #ifdef MONO_ARCH_SOFT_DEBUG_SUPPORTED.
3205
3206         Code contributed under MIT/X11 license.
3207
3208 2009-11-02 Jonathan Chambers <joncham@gmail.com>
3209
3210         * exceptions-x86.c (win32_handle_stack_overflow): Fix parameters
3211         to mono_arch_find_jit_info_ext.
3212
3213         Code contributed under MIT/X11 license.
3214
3215 2009-11-03  Zoltan Varga  <vargaz@gmail.com>
3216
3217         * debugger-agent.c: Include netinet/in.h to fix the bsd build.
3218
3219         * debugger-agent.c: Add support for filtering events by assemblies.
3220
3221         * debugger-agent.c (mono_debugger_agent_thread_interrupt): Return false if
3222         the agent is not enabled.
3223
3224 2009-11-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
3225
3226         * exceptions-x86.c: hopefully last change to fix the windows build.
3227         This one courtesy of Jonathan Chambers.
3228
3229 2009-11-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
3230
3231         * debugger-agent.c: remove unused function.
3232
3233 2009-11-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
3234
3235         * debugger-agent.c: add #ifdefs for a few header files.
3236         * mini-x86.h: disable the soft debugger in windows.
3237         Step 1 of 2 to make this compile on windows with gcc.
3238
3239 2009-11-02  Zoltan Varga  <vargaz@gmail.com>
3240
3241         * tramp-x86.c (mono_arch_get_llvm_imt_trampoline): Comment this out for now
3242         as it breaks the build.
3243
3244 2009-07-01  Zoltan Varga  <vargaz@gmail.com>
3245
3246         Merge the soft debugger branch.
3247
3248         * debugger-agent.h debugger-agent.c: New files containing the soft
3249         mode debugger module.
3250
3251         * method-to-ir.c (mono_method_to_ir): Generate OP_SEQ_POINT opcodes
3252         at the appropriate locations.
3253
3254         * mini-<ARCH>.c (mono_arch_output_basic_block): Handle OP_SEQ_POINT
3255         opcode.
3256
3257         * mini-<ARCH>.c: Add new arch-specific functions to set/clear breakpoints,
3258         enable/disable single stepping.
3259
3260         * exceptions-<ARCH>.c (mono_arch_find_jit_info_ext): New stack unwinding api
3261         which returns all information in a StackFrameInfo structure, and can handle the
3262         LMF frames added by the debugger.
3263
3264         * mini-<ARCH>.h (MonoLMFExt): New structure containing additional information
3265         about an LMF frame.
3266
3267         * mini-exceptions.c (mono_jit_walk_stack_from_ctx_in_thread): New stack
3268         walker function which works on a specific thread and passes a StackFrameInfo
3269         structure to its callback.
3270
3271         * mini.c (mini_init): Initialize the debugger agent.
3272
3273         * aot-compiler.c aot-runtime.c: Add soft-debug support.
3274
3275         * mini-ops.h: Add OP_SEQ_POINT opcode.
3276
3277         * driver.c (mono_main): Add new '--debugger-agent' option for passing
3278         arguments to the debugger agent.
3279
3280 2009-11-02  Zoltan Varga  <vargaz@gmail.com>
3281
3282         * mini.c (mini_method_compile): Disable llvm for methods with an lmf here to
3283         speed things up.
3284
3285         * mini-llvm.c (mono_llvm_emit_method): Add support for OP_LOCALLOC.
3286
3287         * tramp-x86.c (mono_arch_get_llvm_imt_trampoline): Implement this for x86.
3288
3289         * mini.c (mini_init): Avoid using the IMT trampoline in the LLVM case.
3290
3291         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add a static rgctx trampoline
3292         if needed.
3293         (mono_create_llvm_imt_trampoline): New function to create a trampoline which
3294         sets the IMT argument and makes a virtual call.
3295
3296         * mini-llvm.c: Enable interface calls using the llvm imt trampoline.
3297
3298 2009-11-01  Zoltan Varga  <vargaz@gmail.com>
3299
3300         * Makefile.am (llvm_sources): Enable the llvm option since it no longer breaks
3301         the windows build.
3302
3303 2009-10-30  Zoltan Varga  <vargaz@gmail.com>
3304
3305         * mini.c (mini_cleanup): Call profiler shutdown before shutting down the
3306         runtime. Fixes #551228.
3307
3308 2009-10-29  Zoltan Varga  <vargaz@gmail.com>
3309
3310         * mini-x86.c (mono_arch_output_basic_block): Fix % 1. Fixes #550970.
3311
3312         * basic.cs: Add a test.
3313
3314         * method-to-ir.c (mono_method_to_ir): Use EMIT_NEW_LOAD_MEMBASE_TYPE to
3315         load vtypes instead if OP_LOADV_MEMBASE in the implementation of
3316         CONSTRAINED. Fixes #550964.
3317
3318         * generics.cs: Add a test.
3319
3320 2009-10-28  Mark Probst  <mark.probst@gmail.com>
3321
3322         * mini-posix.c (add_signal_handler): Use
3323         mono_gc_get_suspend_signal() instead of GC_get_suspend_signal().
3324
3325 2009-10-28 Jerry Maine <crashfourit@gmail.com>
3326
3327         Contributed under the terms of the MIT/X11 license by
3328         Jerry Maine <crashfourit@gail.com>.
3329
3330         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions): Added code to detect
3331         sse4a for simd intrinsics.
3332
3333         * mini-amd64.c (mono_arch_cpu_enumerate_simd_versions): Added code to detect
3334         sse4a for simd intrinsics.
3335
3336 2009-10-27  Zoltan Varga  <vargaz@gmail.com>
3337
3338         * ir-emit.h method-to-ir.c: Change a few _IMM macros to assign to inst_imm
3339         instead of inst_p1 which is not the same on ILP32 platforms.
3340
3341 2009-10-24  Zoltan Varga  <vargaz@gmail.com>
3342
3343         * mini-ppc.c (mono_arch_emit_prolog): Load the current got address,
3344         not the mscorlib one before calling mono_get_lmf_addr.
3345
3346         * tramp-ppc.c (mono_arch_create_trampoline_code_full): Fix the storing
3347         of the ip to the LMF.
3348
3349         * method-to-ir.c (mono_method_to_ir): Fix the handling of the
3350         immediate in the op->op_imm optimization.
3351
3352         * mini-ppc.c: Add a 'vtregs' field to ArgInfo to make the code easier to
3353         understand. VTypes now work, but are not abi compliant, as they are
3354         split into 4 byte parts instead of 8.
3355         (emit_memcpy): Fix the unrolled case to work on the PS3.
3356
3357         * mini-ppc.c (get_delegate_invoke_impl): Fix this for the PS3.
3358
3359         * aot-compiler.c (mono_compile_assembly): Make the autoreg option
3360         the default when static linking.
3361
3362         * mini-ppc.c (mono_arch_emit_prolog): Fix handling of I8 arguments.
3363
3364         * aot-compiler.c: Add an autoreg option to automatically register
3365         statically linked aot modules using ELF .ctors.
3366
3367         * genmdesc.pl: Add __ppc64__ to allowed defines.
3368
3369 2009-10-25  Zoltan Varga  <vargaz@gmail.com>
3370
3371         * mini-posix.c (add_signal_handler): Delay the GC suspend signal while
3372         executing a SIGSEGV handler on an altstack, since libgc can't handle that.
3373
3374 2009-10-24  Mark Probst  <mark.probst@gmail.com>
3375
3376         * exceptions-x86.c (mono_arch_find_jit_info): Fix build.
3377
3378 2009-10-24  Zoltan Varga  <vargaz@gmail.com>
3379
3380         * mini-exceptions.c (mini_jit_info_table_find): Add an 'out_domain' argument
3381         which will contain the domain where the method was found.
3382
3383         * exceptions-<ARCH>.c mini-exceptions.c: Update callers of
3384         mini_jit_info_table_find ().
3385
3386         * aot-compiler.c (xdebug_end_emit): Remove so stray debug code.
3387
3388         * branch-opts.c (mono_if_conversion): Avoid running deadce if it is disabled.
3389
3390 2009-10-22  Zoltan Varga  <vargaz@gmail.com>
3391
3392         * mini-x86.c (mono_arch_emit_prolog): Disable aot for methods with save_lmf
3393         set, its not supported yet.
3394
3395 2009-10-22  Zoltan Varga  <vargaz@gmail.com>
3396
3397         * aot-runtime.c (mono_aot_get_method): Avoid asserting if a array generic
3398         iface wrapper is not found.
3399         (mono_aot_get_method): Ditto for GetGenericValueImpl.
3400
3401 2009-10-21  Zoltan Varga  <vargaz@gmail.com>
3402
3403         * aot-runtime.c (mono_aot_get_method): Fix support for the IList<T> wrappers,
3404         which have a different name.
3405
3406         * aot-runtime.c (mono_aot_get_method): Special case the array generic iface
3407         wrappers and Array.GetGenericValueImpl ().
3408
3409         * aot-compiler.c: Avoid emitting some wrappers which are not needed anymore
3410         because of the change above.
3411
3412         * generics.cs: Add a test for full aot + generic array ifaces.
3413
3414 2009-10-19  Sebastien Pouliot  <sebastien@ximian.com>
3415
3416         * aot-compiler.c (emit_plt): Remove duplicate 'debug_sym' variable 
3417         that hides the previous one.
3418
3419 2009-10-18  Zoltan Varga  <vargaz@gmail.com>
3420
3421         * aot-compiler.c (can_marshal_struct): Allow some System.dll structs to be
3422         marshalled. Fixes #541623.
3423
3424 2009-10-16  Zoltan Varga  <vargaz@gmail.com>
3425
3426         * aot-compiler.c (emit_extra_methods): Remove some asserts which are not needed.
3427
3428 2009-10-15  Zoltan Varga  <vargaz@gmail.com>
3429
3430         * mini.c (mono_op_imm_to_op): Handle OP_AND/OR/XOR_IMM.
3431
3432 2009-10-14  Massimiliano Mantione  <massi@ximian.com>
3433
3434         * mini-posix.c (sigprof_signal_handler):
3435         Implemented support for building stat call chans in different ways.
3436
3437 2009-10-14  Massimiliano Mantione  <massi@ximian.com>
3438
3439         * mini-exceptions.c (mono_find_jit_info):
3440         Also check that a jit info has been found (fixes a profiler crash).
3441
3442 2009-10-14  Massimiliano Mantione  <massi@ximian.com>
3443
3444         * mini.c (mono_codegen):
3445         Call mono_profiler_code_buffer_new with correct code address.
3446
3447 2009-10-14  Zoltan Varga  <vargaz@gmail.com>
3448
3449         * driver.c (mono_main): Change the date in the copyright.
3450
3451 2009-10-14  Mark Probst  <mark.probst@gmail.com>
3452
3453         * method-to-ir.c (mono_method_to_ir): Don't use a managed array
3454         allocator in shared generic code for open classes, because we
3455         can't get those classes' vtables.  We need to make managed
3456         allocators not depend on the vtable at compile-time to solve this.
3457
3458 2009-10-13  Martin Baulig  <martin@ximian.com>
3459
3460         * debug-mini.c (mono_debugger_trampoline_compiled): Add
3461         `const guint8 *trampoline' argument; send both the old and the new
3462         notification.
3463
3464 2009-09-30  Zoltan Varga  <vargaz@gmail.com>
3465
3466         * aot-compiler.c (add_wrappers): Add a runtime invoke wrapper which is used by
3467         mono_runtime_capture_context () without calling mono_runtime_invoke ().
3468         (can_marshal_struct): Skip structures with auto layout.
3469
3470         * tramp-arm.c (GEN_TRAMP_SIZE): Increase this by 4.
3471
3472 2009-10-02  Zoltan Varga  <vargaz@gmail.com>
3473
3474         * mini-sparc.c (mono_arch_emit_setret): Emit long return values using OP_LMOVE.
3475         (mono_arch_create_vars): Instead of allocating a stack slot by hand, allocate
3476         a variable to hold the stack slot used by the int<->float conversion opcodes.
3477
3478         * mini-sparc.c (mono_arch_build_imt_thunk): Implement support for fail_tramp.
3479
3480 2009-10-04  Zoltan Varga  <vargaz@gmail.com>
3481
3482         * aot-compiler.c (add_generic_class): Only add GetGenericValueImpl wrappers
3483         when using full-aot.
3484
3485 2009-10-06  Zoltan Varga  <vargaz@gmail.com>
3486
3487         * aot-compiler.c (add_generic_class): Add an instance of GenericComparer<T> for
3488         each instance of Comparer<T>.
3489
3490         * generics.cs: Add a new test.
3491
3492 2009-10-09  Zoltan Varga  <vargaz@gmail.com>
3493
3494         * driver.c (parse_debug_options): Add a 'gdb' option.
3495
3496         * mini.c (mini_parse_debug_options): Add a 'gdb' option.
3497
3498         * image-writer.c: Add support for emitting the image into a memory buffer.
3499
3500         * dwarfwriter.c: Add support for sharing one IL file between multiple images.
3501
3502         * aot-compiler.c: Add support for registering debug info with GDB using the
3503         new JIT debugging interface in GDB 7.0. It can be turned on by setting
3504         MONO_XDEBUG to 'gdb'.
3505
3506 2009-10-10  Zoltan Varga  <vargaz@gmail.com>
3507
3508         * aot-compiler.c (mono_save_trampoline_xdebug_info): Implement this for the
3509         gdb mode.
3510
3511 2009-10-11  Zoltan Varga  <vargaz@gmail.com>
3512
3513         * aot-compiler.c (mono_save_xdebug_info): Emit a symbol for the method which
3514         can be used to set breakpoints in gdb.
3515
3516         * image-writer.c (bin_writer_emit_writeout): Add support for setting the text
3517         segment to an absolute address.
3518
3519 2009-10-13  Mark Probst  <mark.probst@gmail.com>
3520
3521         * method-to-ir.c: Use the managed array allocator method if
3522         available.
3523
3524 2009-10-13  Bill Holmes  <billholmes54@gmail.com>
3525
3526         * aot-compiler.c : Fix the MSVC builds
3527
3528         Code is contributed under MIT/X11 license.
3529
3530 2009-10-13  Zoltan Varga  <vargaz@gmail.com>
3531
3532         * aot-compiler.c (mono_save_xdebug_info): Group methods into groups of 10 to
3533         avoid registering 1 symbol file per method with gdb.
3534
3535 2009-09-29  Zoltan Varga  <vargaz@gmail.com>
3536
3537         * mini-sparc.c: Fix the handling of enums with base type long.
3538
3539         * mini-sparc.c (mono_arch_output_basic_block): Fix IREM_UN_IMM.
3540
3541         * mini-sparc.c (mono_arch_allocate_vars): Use mono_class_from_mono_type ()
3542         instead of using type->data.klass as the later doesn't work with generics.
3543
3544 2009-09-25  Mark Probst  <mark.probst@gmail.com>
3545
3546         * method-to-ir.c, mini.h, mini-alpha.c, mini-amd64.c, mini-arm.c,
3547         mini-hppa.c, mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c,
3548         mini-s390x.c, mini-sparc.c, mini-x86.c: Thread.get_CurrentThread
3549         works differently now and we don't handle it in the JIT anymore.
3550
3551         * mini.c, mini-exceptions.c, mini-posix.c, debug-debugger.c,
3552         debug-mini.c, tramp-amd64.c, tramp-x86.c: Changes resulting from
3553         the Thread class split.
3554
3555 2009-09-25  Zoltan Varga  <vargaz@gmail.com>
3556
3557         * driver.c: Don't run tests with the obsolete treeprop optimization.
3558
3559         * mini-sparc.c (mono_arch_create_vars): Make the component vars of a long ret
3560         variable volatile. Fixes #541577.
3561
3562         * basic-calls.cs: Add a new test.
3563
3564         * basic-long.cs: Remove tests which are now in basic-calls.cs.
3565
3566 2009-09-24  Zoltan Varga  <vargaz@gmail.com>
3567
3568         * dwarfwriter.c (emit_debug_info_end): Disable this as it doesn't seem to
3569         work/required with recent iphone sdk versions.
3570
3571         * aot-compiler.c (add_wrappers): Generate PtrToStructure wrappers for more
3572         structures.
3573
3574         * decompose.c (mono_decompose_vtype_opts): Avoid reading uninitialized memory
3575         in the VCALL decomposition code.
3576
3577 2009-09-22  Zoltan Varga  <vargaz@gmail.com>
3578
3579         * mini-ia64.c (mono_arch_output_basic_block): Fix ISHR/ISHR_IMM.
3580
3581         * basic.cs: Add a test.
3582
3583         * mini-ia64.c (mono_arch_build_imt_thunk): Implement support the virtual
3584         generic invokes.
3585
3586         * mini-exceptions.c (mini_jit_info_table_find): New helper function which
3587         searches all the domains of the current thread.
3588
3589         * exceptions-<ARCH>.c: Use it. Fixes #539394.
3590
3591 2009-09-21  Zoltan Varga  <vargaz@gmail.com>
3592
3593         * exceptions-arm.c (mono_arm_throw_exception): Set ctx->ebp to fp instead of sp
3594         so catching exceptions thrown in the same method works. Fixes exception17.exe.
3595
3596         * tramp-arm.c (mono_arch_create_trampoline_code_full): Store NULL into lmf->method
3597         for non-jit trampolines.
3598
3599         * mini.c (mono_jit_runtime_invoke): Allow string ctors with dyn runtime invoke.
3600
3601         * aot-compiler.c (add_wrappers): Ditto.
3602
3603         * mini-arm.c: Implement support for passing vtypes and floats, and increase
3604         the size of the param area used by dyn_call to 6 which covers the majority of
3605         methods.
3606
3607         * mini.c aot-compiler.c: Allow dyn_call for string methods except ctors.
3608
3609         * mini-arm.c: Implement support for passing/receiving
3610         longs and receiving floats in the dyn_call code.
3611
3612         * mini-amd64.c: Implement support for receiving vtypes in registers in
3613         the dyn_call code.
3614
3615         * mini.c mini-amd64.c: Implement partial support for passing vtypes in
3616         the dyn_call code.
3617
3618 2009-09-20  Zoltan Varga  <vargaz@gmail.com>
3619
3620         * mini-arm.c (get_call_info): Return more precise information in
3621         ArgInfo->regtype.
3622         (dyn_call_supported): Use the information in CallInfo.
3623
3624         * mini-arm.c: Enable support for returning vtypes in the dyn_call code.
3625
3626         * mini.c mini-amd64.c: Enable support for returning vtypes in the dyn_call
3627         code.
3628
3629         * mini-arm.c: Update after the dyn_call api changes.
3630
3631         * mini.c (mini_create_jit_domain_info): Register a destructor function
3632         for the runtime_invoke_hash.
3633
3634         * mini-amd64.c (mono_arch_get_dyn_call_args): Rename this to
3635         'mono_arch_dyn_call_start'. Pass the pointer to the return value buffer to
3636         this function.
3637         (mono_arch_get_dyn_call_ret): Rename this to 'mono_arch_dyn_call_finish'.
3638         (dyn_call_supported): Simplify this by using get_call_info ().
3639         (mono_arch_dyn_call_free): New destructor function.
3640
3641         * generics.cs: Remove a printf.
3642
3643         * method-to-ir.c (mono_method_to_ir): Allocate some param area for DYN_CALL.
3644
3645         * mini-arm.c: Add support for enum return values and passing a few arguments
3646         on the stack.
3647         
3648         * mini.c (mono_jit_runtime_invoke): Add support for enum return values to
3649         dyn invoke.
3650
3651         * mini-amd64.c (mono_arch_get_dyn_call_ret): Ditto.
3652
3653         * aot-compiler.c (add_wrappers): Add a few restrictions for the use of
3654         the dynamic invoke wrappers.
3655
3656         * mini-arm.c: Implement OP_DYN_CALL for arm.
3657
3658         * aot-compiler.c (add_wrappers): Avoid aot-ing runtime invoke wrappers
3659         supported by the dynamic runtime invoke wrapper.
3660
3661         * aot-compiler.c aot-runtime.c: Add support for encoding the dynamic
3662         runtime invoke wrapper.
3663
3664         * mini.c (mono_jit_runtime_invoke): Use the dynamic runtime invoke wrappers
3665         if possible when running with full-aot.
3666
3667         * mini-ops.h: Add OP_DYN_CALL opcode.
3668
3669         * mini-amd64.c method-to-ir.c: Add infrastructure for making method calls
3670         with dynamic arguments lists similar to libffi.
3671
3672 2009-09-19  Zoltan Varga  <vargaz@gmail.com>
3673
3674         * method-to-ir.c: Fix the previous change on 64 bit platforms.
3675         
3676         * method-to-ir.c: Applied patch from Rodrigo Kumpera. Allow an i8 argument
3677         to NEWARR.
3678
3679         * iltests.il.in: Add a new test.
3680         
3681 2009-09-18  Zoltan Varga  <vargaz@gmail.com>
3682
3683         * aot-compiler.c (add_generic_instances): Add more instances of
3684         GenericEqualityComparer.
3685
3686 2009-09-18  Rodrigo Kumpera  <rkumpera@novell.com>
3687
3688         * mini.c: Add asserts for mono_class_vtable calls that are not meant to fail.
3689
3690 2009-09-18  Rodrigo Kumpera  <rkumpera@novell.com>
3691
3692         * method-to-ir.c: Handle failures from mono_class_vtable. Added some
3693         comments on some functions that now can fail.
3694
3695 2009-09-17  Andrew Jorgensen  <ajorgensen@novell.com>
3696
3697         * Makefile.am: Add Info.plist to EXTRA_DIST
3698
3699 2009-09-16  Zoltan Varga  <vargaz@gmail.com>
3700
3701         * method-to-ir.c (mono_method_to_ir): Allow AOT for CEE_LDTOKEN in
3702         static synchronized wrappers. Fixes #539500.
3703
3704 2009-09-14  Rodrigo Kumpera  <rkumpera@novell.com>
3705
3706         * jit-icalls.c (mono_class_static_field_address): handle vtable failure
3707         properly.
3708
3709 2009-09-16  Zoltan Varga  <vargaz@gmail.com>
3710
3711         * mini-exceptions.c (mono_handle_exception_internal): Store the computed
3712         lmf before calling filter clauses as well. Fixes #539550.
3713
3714         * exceptions.cs: Add a test.
3715         
3716 2009-09-14  Zoltan Varga  <vargaz@gmail.com>
3717
3718         * aot-compiler.c (add_generic_class): Add instances of
3719         Array.GetGenericValueImpl as well.
3720
3721         * Makefile.am (fullaotcheck): Copy and aot more assemblies so linq
3722         can be tested too.
3723
3724         * generics.cs: Add a fullaot linq test.
3725
3726 2009-09-10  Zoltan Varga  <vargaz@gmail.com>
3727
3728         * aot-compiler.c (arch_emit_static_rgctx_trampoline): Don't clobber argument
3729         reg r1 on arm.
3730
3731 2009-09-10  Bill Holmes  <billholmes54@gmail.com>
3732
3733         * mini-trampolines.c (mono_delegate_trampoline) : Call
3734           mono_cominterop_get_invoke if the delegate target object
3735           is a COM object.
3736
3737         Code is contributed under MIT/X11 license.
3738
3739 2009-09-09  Sebastien Pouliot  <sebastien@ximian.com>
3740
3741         * method-to-ir.c: For CoreCLR throw a SecurityException if an 
3742         internal call is defined outside platform code. Reduce code 
3743         duplication with existing [Method|Field]AccessException
3744
3745 2009-09-08  Rodrigo Kumpera  <rkumpera@novell.com>
3746
3747         * mini-x86.c (mono_arch_emit_call): Don't reduce stack usage by 4
3748         if the return value is a small struct passed on regs.
3749
3750 2009-09-09  Zoltan Varga  <vargaz@gmail.com>
3751
3752         * cpu-arm.md mini-arm.c: Remove unused opcodes.
3753
3754         * mini-codegen.c: Enable the cpu description validation for arm.
3755
3756 2009-09-08  Zoltan Varga  <vargaz@gmail.com>
3757
3758         * basic-calls.cs: Move the test_0_float_load_and_store_with_big_offset ()
3759         test which depends on structs to objects.cs.
3760         
3761         * basic-calls.cs: Remove calls to Console.WriteLine and throws, since those
3762         require object model related stuff working.
3763
3764         * cpu-x86.md mini-x86.c: Remove more unused opcodes.
3765
3766         * mini-ops.h: Fix OP_BIGMUL instruction descriptions.
3767
3768         * mini-codegen.c (mono_local_regalloc): Validate the cpu description 
3769         against the instruction metadata in mini-ops.h. amd64 only for now.
3770
3771         * mini-ops.h: Fix some instruction descriptions.
3772
3773         * mini-ops.h mini-x86.c mini-amd64.c cpu-<ARCH>.md: Remove some
3774         unused instructions.
3775
3776 2009-09-06  Zoltan Varga  <vargaz@gmail.com>
3777
3778         * exceptions.cs: Add a new test.
3779
3780 2009-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
3781
3782         * mini-x86.c (needs_stack_frame): OSX requires full frames to keep proper alignment.
3783
3784 2009-09-06  Zoltan Varga  <vargaz@gmail.com>
3785
3786         * mini-llvm.c (mono_llvm_emit_method): Add a few more missing casts,
3787         skip empty phi opcodes.
3788         
3789         * mini-llvm.c (mono_llvm_emit_method): Handle unsigned volatile variables
3790         correctly by zero extending after loads. Skip methods containing calls
3791         to the monitor enter/exit trampolines.
3792
3793         * tramp-x86.c (mono_arch_create_trampoline_code): Align the stack
3794         when calling mono_thread_force_interruption_checkpoint ().
3795
3796         * mini.c (mini_method_compile): Disable llvm when AOT compiling.
3797
3798         * tramp-amd64.c (mono_arch_patch_callsite): Add support for 32 bit ->
3799         64 bit thunks.
3800         (mono_arch_nullify_class_init_trampoline): Read 'buf' instead of 'code'.
3801
3802         * mini-llvm.c (mono_llvm_emit_method): Add a few missing conversions so a 
3803         bootstrap could run.
3804
3805 2009-09-04  Zoltan Varga  <vargaz@gmail.com>
3806
3807         * mini.c (mini_init): Set callbacks.get_runtime_build_info ().
3808
3809 2009-09-03  Zoltan Varga  <vargaz@gmail.com>
3810
3811         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass the start
3812         of the method to
3813         mono_breakpoint_clean_code () when using LLVM as the prologues generated by
3814         LLVM might be very short.
3815
3816         * mini-x86.c (mono_arch_output_basic_block): Maintain stack alignment
3817         in OP_THROW/RETHROW.
3818
3819         * exceptions-x86.c: Rewrite the throw trampolines so they maintain stack
3820         alignment on osx.
3821
3822 2009-09-03  Zoltan Varga  <vargaz@gmail.com>
3823
3824         * mini-amd64.c (mono_arch_get_vcall_slot): Pass the start of the method to
3825         mono_breakpoint_clean_code () when using LLVM as the prologues generated by
3826         LLVM might be very short.
3827
3828 2009-09-01  Zoltan Varga  <vargaz@gmail.com>
3829
3830         * exceptions-x86.c (throw_exception): Fix the previous change by substracting
3831         the alignment for the value of sp.
3832
3833 2009-09-01  Geoff Norton  <gnorton@novell.com>
3834
3835         * mini.c (mono_get_lmf_addr): Fix jit_thread_attach for native to 
3836         managed wrappers in full aot.
3837
3838 2009-08-31  Zoltan Varga  <vargaz@gmail.com>
3839
3840         * exceptions-x86.c (get_throw_exception): Align the stack on osx.
3841
3842 2009-08-28  Zoltan Varga  <vargaz@gmail.com>
3843
3844         * mini-llvm-cpp.cpp mini-llvm.c: Update to latest llvm api.
3845
3846 2009-08-25  Zoltan Varga  <vargaz@gmail.com>
3847
3848         * aot-compiler.c (emit_exception_debug_info): Emit ei->flags too.
3849
3850         * aot-runtime.c (decode_exception_debug_info): Decode ei->flags from the
3851         saved info.
3852
3853         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
3854
3855         * aot-runtime.c aot-compiler.c: Emit exception causes fully so we don't
3856         depend on the info MonoMethodHeader which could be missing in IL stripped
3857         assemblies.
3858
3859 2009-08-25  Zoltan Varga  <vargaz@gmail.com>
3860
3861         * mini-arm.c (add_general): Fix the passing of 64 bit values on darwin, where
3862         they are only 4 byte aligned.
3863
3864 2009-08-21  Zoltan Varga  <vargaz@gmail.com>
3865
3866         * mini-arm.c (mono_arch_allocate_vars): Use FP as the frame pointer as
3867         was done previously, since using SP causes too many problems.
3868
3869         * exceptions-arm.c: Fix the handling of sp/fp so unwinding through
3870         frames without a frame pointer works.
3871
3872         * mini-arm.c (mono_arch_get_global_int_regs): Avoid using V5 as a
3873         global register in methods with calls, since the calls can go through
3874         a static rgctx trampoline which doesn't save it.
3875
3876 2009-08-19  Zoltan Varga  <vargaz@gmail.com>
3877
3878         * mini-arm.c (mono_arch_context_get_int_reg): Handle SP as well.
3879
3880 2009-08-18  Zoltan Varga  <vargaz@gmail.com>
3881
3882         * aot-compiler.c (add_generic_instances): Fix the net 1.1 build.
3883
3884 2009-08-18  Christian Hergert  <chris@dronelabs.com>
3885
3886         * method-to-ir.c: Fix warnings for uninitialized variables.
3887
3888 2009-08-18  Christian Hergert  <chris@dronelabs.com>
3889
3890         * mini-exceptions.c:
3891         * aot-compiler.c: Fix printf warnings.
3892
3893 2009-08-18  Zoltan Varga  <vargaz@gmail.com>
3894
3895         * aot-compiler.c (add_generic_instances): Add string[] wrapper methods.
3896         Add GetGenericValueImpl<string>.
3897         
3898         * aot-compiler.c (add_generic_instances): Add instances of
3899         GenericEqualityComparer<T> for primitive types. Only emit the array
3900         wrappers into the mscorlib image.
3901
3902 2009-08-15  Zoltan Varga  <vargaz@gmail.com>
3903
3904         * aot-runtime.c (load_method): Rename 'aot_module' -> 'amodule'. Allocate
3905         the methods_loaded array using amodule->info->nmethods.
3906
3907         * mini.h (MonoAotFileInfo): Add an 'nmethods' field.
3908         (MONO_AOT_FILE_VERSION): Bump this.
3909
3910         * aot-compiler.c: Emit more generic instances allowing some parts of linq
3911         to work.
3912
3913         * aot-runtime.c (mono_aot_get_unwind_info): Handle the case when the
3914         MonoJitInfo doesn't belong to its methods aot image.
3915
3916 2009-08-14  Zoltan Varga  <vargaz@gmail.com>
3917
3918         * mini-arm.c (mono_arch_allocate_vars): Use SP as the default frame reg.
3919
3920         * mini-arm.c: Fix warnings.
3921         
3922         * mini-arm.c (mono_arm_emit_load_imm): Only emit a movt if needed.
3923
3924         * mini-arm.c (mono_arm_emit_load_imm): Use movt/movw if the cpu
3925         supports it.
3926
3927 2009-08-12  Zoltan Varga  <vargaz@gmail.com>
3928
3929         * aot-compiler.c (arch_emit_imt_thunk): Rework the arm code to
3930         avoid clobbering IP.
3931
3932         * mini-trampolines.c (mono_magic_trampoline): Allocate a local to
3933         hold the trampoline argument, so its initial value is available during
3934         debugging.
3935
3936 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
3937
3938         * exceptions-arm.c:
3939         * exceptions-hppa.c:
3940         * mini.c:
3941         * exceptions-s390x.c:
3942         * exceptions-mips.c:
3943         * exceptions-ppc.c:
3944         * exceptions-sparc.c:
3945         * exceptions-alpha.c:
3946         * aot-runtime.c:
3947         * mini-trampolines.c:
3948         * exceptions-x86.c:
3949         * exceptions-s390.c: add and use #define's instead of sizeof()
3950         for MonoJitInfo and MonoJitInfoTable.
3951
3952 2009-08-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
3953
3954         * tramp-arm.c:
3955         * tramp-amd64.c:
3956         * tramp-ppc.c:
3957         * tramp-x86.c: use a #define instead of sizeof() for a few
3958         structures that use a zero-length array.
3959
3960 2009-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
3961
3962         * method-to-ir.c (mono_method_to_ir/CEE_CONSTRAINED_): Handle the
3963         case when the method is dynamic. Fixes #529238.
3964
3965 2009-08-06  Zoltan Varga  <vargaz@gmail.com>
3966
3967         * mini.c (mono_jit_compile_method_inner): Throw an exception instead
3968         of asserting when a method is JIT compiled in full-aot mode.
3969
3970 2009-08-03  Jerry Maine  <crashfourit@gmail.com>
3971         
3972         Contributed under the terms of the MIT/X11 license by
3973         Jerry Maine <crashfourit@gail.com>.
3974         
3975         * fixed wrong dates in changelog.
3976
3977 2009-08-03  Jerry Maine  <crashfourit@gmail.com>
3978         
3979         Contributed under the terms of the MIT/X11 license by
3980         Jerry Maine <crashfourit@gail.com>.
3981
3982         * basic-simd.cs: added test for packed double square root.
3983         * cpu-amd64.md: added opcode info for packed double square root.
3984         * cpu-x86.md: added opcode info for packed double square root.
3985         * mini-ops.h: added IR opcode for packed double square root.
3986         * mini-x86.c: added IR to native translation code for packed double square root.
3987         * mini-amd64.c: removed todo for packed double square root.
3988         * simd-intrinsics.c: added method to IR opcode converstion for
3989         packed double square root.
3990
3991 2009-08-03 Jerry Maine <crashfourit@gmail.com>
3992
3993         Contributed under the terms of the MIT/X11 license by
3994         Jerry Maine <crashfourit@gail.com>.
3995
3996         * mini-amd64.c: Added a change to help tell the difference as 
3997         to what perpose the xmm register is being used--mainly to help
3998         with debuging.
3999         * mini-amd64.h: Changed callee regs to use 15 out of 16 
4000         (one used for special cases) xmm registers for both fp
4001         and simd ops. Added define to turn on new feature in the regalloc
4002         that allows fp and simd ops to share the xmm regs happily.
4003         * codegen.c: Added code to detect for which perpose an xmm reg is
4004         being used (fp or simd) and to translate back and forth to the
4005         correct logical reg bank (fp or simd) for 'spill load's.
4006
4007 2009-08-03 Jerry Maine <crashfourit@gmail.com>
4008
4009         Contributed under the terms of the MIT/X11 license by
4010         Jerry Maine <crashfourit@gail.com>.
4011
4012         * basic-simd.cs: Added tests for stressing the regalloc when running with
4013         16 simd regs and when simd and fp ops share the same reg bank.
4014
4015 2009-08-01  Mark Probst  <mark.probst@gmail.com>
4016
4017         * method-to-ir.c (mini_emit_stobj): If we call mono_value_copy()
4018         in shared generic code, we might have to look up the class in the
4019         RGCTX.  If we use the class directly, compute its GC descriptor.
4020
4021 2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>
4022
4023         * mini.c (mono_jit_runtime_invoke): Fix a warning.
4024
4025 2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>
4026
4027         * mini.c (mono_jit_runtime_invoke): Initialize the class and
4028         check for errors. Fixed the case when the class with the Main
4029         method is broken.
4030
4031 2009-07-31 Jerry Maine <crashfourit@gmail.com>
4032
4033         Contributed under the terms of the MIT/X11 license by
4034         Jerry Maine <crashfourit@gail.com>.
4035
4036         * cpu-amd64.md: Fixed simple bug in machine discrition file.
4037
4038 2009-07-31  Zoltan Varga  <vargaz@gmail.com>
4039
4040         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_IREM_UN_IMM.
4041
4042 2009-08-30  Rodrigo Kumpera  <rkumpera@novell.com>
4043
4044         * method-to-ir.c: Fix naming of stelem and ldelem.
4045
4046 2009-07-30  Zoltan Varga  <vargaz@gmail.com>
4047
4048         * driver.c (main_thread_handler): Check that the assembly loaded
4049         matches the filename when doing AOT.
4050
4051 2009-07-30  Mark Probst  <mark.probst@gmail.com>
4052
4053         * mini.c: get_ip_from_sigctx installer has been removed, so don't
4054         call it anymore.
4055
4056         * mini-x86.h, mini-amd64.h, mini-ppc.h: UCONTEXT macros moved (to
4057         utils/mono-sigcontext.h).
4058
4059         * exceptions-amd64.c: Use the UCONTEXT_GREGS macro instead of an
4060         #ifdef.
4061
4062 2009-07-29  Massimiliano Mantione  <massi@ximian.com>
4063
4064         * mini.c (mono_codegen):
4065         Call profiler hook to keep track of method code buffers.
4066
4067 2009-07-27  Mark Probst  <mark.probst@gmail.com>
4068
4069         * method-to-ir.c: Invoke write barriers for the
4070         Interlocked.(Compare)Exchange JIT intrinsics.
4071
4072 2009-07-26  Raja R Harinath  <harinath@hurrynot.org>
4073
4074         * Makefile.am (version.h): Fix issues when built out of tree.
4075         Remove some redundant 'grep's piped through 'sed's.
4076
4077 Fri Jul 24 17:28:37 CEST 2009 Steven Munroe  <munroesj@us.ibm.com>
4078
4079         This patch is contributed under the terms of the MIT/X11 license
4080
4081         * mini-ppc.c (mono_arch_output_basic_block):
4082         (OP_STOREI1_MEMBASE_REG): Handle 32-bit offsets combining addis
4083         for bits 32-47 with signed load/store diplacements for bits
4084         48-63.  Use prefered base/offset order for indexed form.
4085         (OP_STOREI2_MEMBASE_REG, OP_STORE_MEMBASE_REG): Same.
4086         (OP_LOAD_MEMBASE, OP_LOADI4_MEMBASE, OP_LOADU4_MEMBASE,
4087         OP_LOADI1_MEMBASE, OP_LOADU1_MEMBASE, OP_LOADU2_MEMBASE,
4088         OP_LOADI2_MEMBASE): Same.
4089         (OP_STORER8_MEMBASE_REG, OP_LOADR8_MEMBASE,
4090         OP_STORER4_MEMBASE_REG, OP_LOADR4_MEMBASE): Same.
4091         (OP_STOREI1_MEMINDEX): Use prefered base/offset order for
4092         indexed form.
4093         (OP_STOREI2_MEMINDEX, OP_STORE_MEMINDEX): Same.
4094         (OP_LOAD_MEMINDEX, OP_LOADI4_MEMINDEX, OP_LOADU4_MEMINDEX,
4095         OP_LOADU2_MEMINDEX, OP_LOADI2_MEMINDEX, OP_LOADU1_MEMINDEX,
4096         OP_LOADI1_MEMINDEX): Same
4097         (OP_LOADR4_MEMINDEX, OP_LOADR8_MEMINDEX, OP_STORER4_MEMINDEX,
4098         OP_STORER8_MEMINDEX): Same
4099         (OP_JMP): Use addis/addi sequence for int cfg->stack_usage
4100         computations.
4101         (mono_arch_emit_prolog): Handle 32-bit offsets combining addis
4102         for bits 32-47 with signed load/store diplacements for bits
4103         48-63.  Use prefered base/offset order for indexed form.
4104
4105 Fri Jul 24 16:57:12 CEST 2009 Steven Munroe  <munroesj@us.ibm.com>
4106
4107 This patch is contributed under the terms of the MIT/X11 license
4108
4109         * mini-ppc.c: Define PPC_MOVE_FPR_GPR and PPC_ISA_64.
4110         (mono_arch_get_vcall_slot): Fx pointer to int cast warning.
4111         (mono_arch_decompose_opts): Make OP_ICONV_TO_R4 and
4112         OP_ICONV_TO_R8 decompose conditional on !PPC_ISA_64.
4113         (mono_arch_output_basic_block) [OP_JMP]: Use ppc_load32 for
4114         cfg->stack_usage to avoid size warnings.
4115         (mono_arch_output_basic_block) [__mono_ppc64__]: Replace
4116         store/load sequence with mffgpr if PPC_MOVE_FPR_GPR is true.
4117         (mono_arch_output_basic_block) [!__mono_ppc64__]: For
4118         OP_ICONV_TO_R4 or OP_ICONV_TO_R8 and PPC_ISA_64 use fcfid
4119         to convert.
4120         (mono_arch_emit_prolog): Move mono_emit_unwind_op_def_cfa 
4121         after code varible is initialized.
4122         Add g_assert ppc_is_imm16 for ainfo->offset. Handle
4123         ainfo->size == 8 when ainfo->offset !ppc_is_imm16.
4124         (mono_arch_emit_epilog): 
4125         Move Use ppc_load32 for cfg->stack_usage to avoid size
4126         warnings.
4127
4128 2009-07-24  Mark Probst  <mark.probst@gmail.com>
4129
4130         * method-to-ir.c: The write barrier doesn't do the store anymore,
4131         so we have always to emit it.  Also, emit the wbarrier after the
4132         store.
4133
4134 2009-07-24  Zoltan Varga  <vargaz@gmail.com>
4135
4136         * mini-arm.c (mono_arch_get_delegate_invoke_impls): Add a trampoline
4137         for argument count 3 too.
4138
4139 2009-07-23  Zoltan Varga  <vargaz@gmail.com>
4140
4141         * mini.c (mono_jit_compile_method_with_opt): Add an 'ex' argument to let
4142         the caller handle the exceptions.
4143         (mono_jit_runtime_invoke): Handle exceptions thrown while compiling the
4144         method. Fixes #524498.
4145
4146 2009-07-22  Geoff Norton  <gnorton@novell.com>
4147
4148         * mini-exceptions.c: Fix build on ia64.
4149
4150 2009-07-22  Mark Probst  <mark.probst@gmail.com>
4151
4152         * mini-exceptions.c (ves_icall_get_frame_info): Use write
4153         barriers.
4154
4155 2009-07-21  Zoltan Varga  <vargaz@gmail.com>
4156
4157         * mini-arm.c (mono_arch_emit_prolog): Fix thread attaching in aot
4158         code.
4159
4160 2009-07-20  Zoltan Varga  <vargaz@gmail.com>
4161
4162         * basic-simd.cs (Main): Pass args to the test driver.
4163
4164 2009-07-20  Geoff Norton  <gnorton@novell.com>
4165
4166         * mini-x86.h: Fix the x86 version guards to use Apple's
4167         properly defined macros.
4168
4169 2009-07-20  Geoff Norton  <gnorton@novell.com>
4170
4171         * mini-x86.c: Fix --trace on darwin-x86 and other systems which require
4172         aligned access.
4173
4174 2009-07-20  Zoltan Varga  <vargaz@gmail.com>
4175
4176         * mini.c (mono_jit_runtime_invoke): Speed this up by adding a hash to
4177         MonoJitDomainInfo which maps MonoMethod's to a structure containing all
4178         the information which is needed for invokes, so only one locking+hash table
4179         lookup is needed.
4180
4181         * aot-compiler.c: Add a 'tool-prefix' option to be used when cross-compiling.
4182         
4183         * aot-compiler.c (add_generic_instances): Emit instances of 
4184         GenericComparer<T> for primitive types.
4185
4186 2009-07-19 Rodrigo Kumpera  <rkumpera@novell.com>
4187
4188         * mini-posix.c: Fix linux build.
4189
4190 2009-07-19  Geoff Norton  <gnorton@novell.com>
4191
4192         * mini.h: Add prototypes for mono_runtime_syscall_fork and
4193         mono_gdb_render_native_backtraces
4194         * mini-darwin.c: Apple's syscall(SYS_fork) is very weird on x86,
4195         so we implement the sane semantics to the runtime here
4196         (mono_gdb_render_native_backtraces).  Apple also uses an ancient gdb
4197         so we need to call it differently (mono_gdb_render_native_backtraces)
4198         * mini-posix.c: Move the old semantics from mini.c to the prototypes
4199         here for default implementations.
4200         * mini.c: Refactor mono_handle_native_sigsegv so that we can properly
4201         support Apple's weird syscall (SYS_fork) implementation and not busy
4202         loop in abort() on native crashes on OSX anymore.
4203
4204 2009-07-18  Zoltan Varga  <vargaz@gmail.com>
4205
4206         * aot-runtime.c (load_method): Change the handling of the
4207         MONO_LASTAOT env variable so MONO_LASTAOT=0 means that no aot methods
4208         are used.
4209
4210         * mini.c (mono_patch_info_equal): Really fix the handling of RGCTX_FETCH.
4211
4212 2009-07-17  Zoltan Varga  <vargaz@gmail.com>
4213
4214         * mini.c (mono_patch_info_equal): Revert the last change for now as it
4215         seems to break the aot tests.
4216         
4217         * mini.c (mono_patch_info_equal): Fix the handling of 
4218         MONO_PATCH_INFO_RGCTX_FETCH.
4219
4220 2009-07-16  Zoltan Varga  <vargaz@gmail.com>
4221
4222         * unwind.c: Use TARGET_AMD64 instead of __x86_64__.
4223
4224         * mini.c (mono_patch_info_hash): Fix the handling of 
4225         MONO_PATCH_INFO_INTERNAL_METHOD.
4226         (mono_patch_info_equal): Ditto.
4227
4228 2009-07-16  Zoltan Varga  <vargaz@gmail.com>
4229
4230         * mini-llvm.c (mono_llvm_emit_method): Use module instead of ctx->module
4231         in a few places.
4232         
4233         * mini-llvm.c: Add some infrastructure for AOT support.
4234
4235 2009-07-15  Zoltan Varga  <vargaz@gmail.com>
4236
4237         * mini-llvm-cpp.c: Update to the latest llvm api.
4238         
4239         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Set the EnablePrettyStackTrace
4240         option to false to prevent llvm from installing signal handlers which
4241         trip up the gc.
4242         
4243 2009-07-15 Rodrigo Kumpera  <rkumpera@novell.com>
4244
4245         * cpu-x86.md:
4246         * cpu-amd64.md: Revert previous change as those instructions
4247         take 2 separate arguments. Remember to read the arch docs more
4248         carefully next time.
4249
4250 2009-07-15  Zoltan Varga  <vargaz@gmail.com>
4251
4252         * mini-llvm-cpp.cpp (mono_llvm_build_alloca): Update to latest llvm api.
4253
4254 Wed Jul 15 17:20:27 CEST 2009 Paolo Molaro <lupus@ximian.com>
4255
4256         * mini-ppc.c: exploit multiple load/store units if available (rest of
4257         the change from Steven Munroe (<munroesj@us.ibm.com>) first patch at 
4258         http://bugzilla.novell.com/show_bug.cgi?id=487846).
4259
4260 Wed Jul 15 16:24:57 CEST 2009 Paolo Molaro <lupus@ximian.com>
4261
4262         * mini-ppc.c: integrate most of Steven Munroe (<munroesj@us.ibm.com>)
4263         first patch at http://bugzilla.novell.com/show_bug.cgi?id=487846.
4264
4265 2009-07-14 Rodrigo Kumpera  <rkumpera@novell.com>
4266
4267         * cpu-x86.md: Fix missing clobbering from trancendental simd
4268         ops.
4269
4270         * cpu-amd64.md: Same.
4271
4272 2009-07-14 Jerry Maine <crashfourit@gmail.com>
4273
4274         Contributed under the terms of the MIT/X11 license by
4275         Jerry Maine <crashfourit@gail.com>.
4276
4277         * basic-simd.cs: Added tests for single and doulble indexers.
4278
4279         * cpu-amd64.md: Added simd opcode information.
4280
4281         * mini-amd64.c: Added IR to native simd generation code.
4282         Added simd register names and function that returns them.
4283
4284         * mini-amd64.h: Added marcos to turn on simd code compilation in
4285         amd64. Added max simd register count marco. Added caller/callee
4286         register mask marcos. Added marcos to use simd register bank.
4287
4288         * mini.h: Added helper marco for shufling dwords and simple
4289         floats.
4290
4291 2009-07-14  Zoltan Varga  <vargaz@gmail.com>
4292
4293         * mini-llvm-cpp.cpp: Update to latest llvm SVN api.
4294
4295         * Makefile.am (mono_LDADD): Pass LLVM_LDFLAGS to the linked.
4296
4297         * unwind.c (mono_unwind_get_ops_from_fde): Make this return
4298         the length of the native code as well.
4299
4300         * basic-simd.cs: Add a test for #521662.
4301
4302 Mon Jul 13 17:58:50 CEST 2009 Paolo Molaro <lupus@ximian.com>
4303
4304         * mini-ppc.c: fixed bug introduced by Steven's TLS changes.
4305
4306 2009-07-13  Mark Probst  <mark.probst@gmail.com>
4307
4308         * mini.c: Register function for getting the IP from a signal
4309         context with metadata.
4310
4311 2009-07-13  Zoltan Varga  <vargaz@gmail.com>
4312
4313         * method-to-ir.c (mono_method_to_ir): When calling a gshared method,
4314         call a generic class init trampoline if needed. Fixes #519336.
4315
4316         * generics.cs: Add a test.
4317         
4318 2009-07-09  Mark Probst  <mark.probst@gmail.com>
4319
4320         * method-to-ir.c: When doing a call which might be remote from
4321         shared generic code to other shared code with open type arguments,
4322         get the remoting invoke wrapper from the RGCTX and do an indirect
4323         call to it.
4324
4325 2009-07-03  Zoltan Varga  <vargaz@gmail.com>
4326
4327         * mini-trampolines.c (get_unbox_trampoline): Add an rgctx trampoline
4328         after the unbox trampoline in the full-aot case.
4329
4330 2009-07-02  jonas echterhoff <jonas@unity3d.com>
4331         
4332         * mini.c: Move initialization of jit_mutex before debugger initialization
4333         
4334         to avoid crashes.
4335         
4336         
4337         * Info.plist: added Info.plist and link flag to enable the mono executable
4338         to access other processes. Requires codesigning of the executable to work.
4339         
4340         * mdb-debug-info32-darwin.s: The same as mdb-debug-info32.s, changed to 
4341         
4342         compile on OS X.
4343         
4344
4345 2009-06-30  Zoltan Varga  <vargaz@gmail.com>
4346
4347         * driver.c (mini_regression): Handle loading errors. Fixes #508869.
4348
4349 2009-06-29  Zoltan Varga  <vargaz@gmail.com>
4350
4351         * mini-exceptions.c (get_generic_context_from_stack_frame): Fix the case
4352         when the generic instance is an instantiation of a subclass of the
4353         methods class. Fixes #517166.
4354
4355 2009-06-26  Zoltan Varga  <vargaz@gmail.com>
4356
4357         * mini-amd64.c (mono_arch_emit_prolog): Fix thread attaching in AOTed
4358         code.
4359
4360         * mini.c (mono_jit_thread_attach): Allow domain to be NULL for calls from
4361         AOTed code.
4362
4363         * CMakeLists.txt: Add minimal support for installation.
4364
4365 2009-06-25  Zoltan Varga  <vargaz@gmail.com>
4366
4367         * aot-compiler.c (emit_and_reloc_code): Factor out the code to
4368         determine whenever a method is directly callable to a separate function.
4369
4370         * mini-<ARCH>.c tramp-<ARCH>.c: Remove needless casts and add new
4371         needed ones as a result of the previous change.
4372
4373         * mini-<ARCH>.c tramp-<ARCH>.c: Use mgreg_t* as the
4374         type of register arrays.
4375
4376         * mini-trampolines.c tramp-<ARCH>.c aot-runtime.c: Use mgreg_t* as the
4377         type of register arrays.
4378
4379 2009-06-24  Jerry Maine  <crashfourit@gmail.com>
4380         
4381         Contributed under the terms of the MIT/X11 license by
4382         Jerry Maine <crashfourit@gail.com>.
4383
4384         * mini-amd64.c: Added code to convert simd IR to native amd64 sse.
4385
4386 2009-06-24  Zoltan Varga  <vargaz@gmail.com>
4387
4388         * aot-compiler.c (emit_plt): Define debug labels for most plt entries.
4389
4390 2009-06-24  Neale Ferguson <neale@sinenomine.net>
4391
4392         * mini-s390x.c: Correct LCONV_TO_Ix and ICONV_TO_Ix routines. Fix leave_method
4393         dump of structure return value. Fix some formatting.
4394         * cpu-s390x.md: Fix lengths of instruction sequences.
4395         * mini-s390.c: Minor formatting changes.
4396
4397 2009-06-24  Zoltan Varga  <vargaz@gmail.com>
4398
4399         * mini-x86.h: Applied patch from Romain Tartiere (romain@blogreen.org).
4400         Use sigaction on freebsd as well.
4401
4402 2009-06-23  Zoltan Varga  <vargaz@gmail.com>
4403
4404         * mini.h: Don't define MONO_ARCH_HAVE_TLS_GET to 0, as some code
4405         uses #ifdef on it.
4406         
4407         * mini.c (mini_init): Revert a change which breaks cross-compilation.
4408
4409 2009-06-22  Mark Probst  <mark.probst@gmail.com>
4410
4411         * mini-ppc.c, cpu-ppc.md: Enable TLS on Darwin/G4.
4412
4413 2009-06-22  Mark Probst  <mark.probst@gmail.com>
4414
4415         * mini.c, mini.h: Tell the runtime whether we support MONO_TLS.
4416
4417 2009-06-20  Martin Baulig  <martin@ximian.com>
4418
4419         * debug-mini.c
4420         (MonoDebuggerThreadFlags): New enum typedef.
4421         (MonoDebuggerThreadInfo): Added `guint32 thread_flags'.
4422         (mono_debugger_thread_created): Added `gpointer func' argument;
4423         initialize the new `thread_flags' field.
4424
4425 2009-06-18  Martin Baulig  <martin@ximian.com>
4426
4427         * debug-debugger.h (MonoDebuggerRuntimeFlags): New enum typedef.
4428         (MonoDebuggerInfo): Renamed the `dummy' field info `runtime_info'.
4429
4430         * debug-debugger.c
4431         (mini_debugger_set_attach_ok): New function; sets the attach-ok
4432         flag in `MONO_DEBUGGER__info.runtime_info'.
4433
4434         * driver.c
4435         (mono_main): Call mini_debugger_set_attach_ok() if generics
4436         sharing is disabled.
4437
4438 2009-06-22  Zoltan Varga  <vargaz@gmail.com>
4439
4440         * aot-compiler.c (add_wrappers): Fix a warning.
4441
4442         * mini-ppc.c tramp-ppc.c exceptions-ppc.c aot-compiler.c: Update after
4443         the ppc load/store macro changes.
4444
4445 2009-06-21  Zoltan Varga  <vargaz@gmail.com>
4446
4447         * tramp-ppc.c (mono_arch_patch_plt_entry): Implement this.
4448
4449         * aot-compiler.c (mono_compile_assembly): Sanitize the plt symbol too,
4450         not just the got symbol.
4451
4452         * mini-ppc.c aot-compiler.c unwind.c: Implement generation of unwind info
4453         on ppc.
4454
4455         * aot-compiler.c unwind.c: Add infrastructure for unwind support on
4456         ppc.
4457         
4458         * aot-compiler.c: Remove some fixmes.
4459
4460         * driver.c (mono_main): Print a helpful message when cross-compiling.
4461
4462         * mini.c (mini_init): Disable signal handlers when cross-compiling.
4463
4464         * method-to-ir.c (initialize_array_data): Do the optimization if the
4465         target byte order is little endian, instead of the host byte order.
4466
4467         * aot-compiler.c: Emit sizes for most symbols, only emit runtime-invoke
4468         wrappers into the mscorlib image, Emit a unique plt symbol for each
4469         image, emit symbols for plt entries.
4470
4471         * image-writer.c (img_writer_emit_symbol_size): New function to emit
4472         a .size directive.
4473         
4474 2009-06-20  Zoltan Varga  <vargaz@gmail.com>
4475
4476         * aot-compiler.c (add_wrappers): Avoid calling 
4477         mono_marshal_get_type_info () since it can assert for some types.
4478
4479         * method-to-ir.c (mono_method_to_ir): Disable aot when some forms of 
4480         ldtoken are used inside wrappers.
4481
4482         * helpers.c: Add support for prefixing tools with the arch name.
4483
4484         * mini.h (OP_LOADR_MEMBASE): New opcodes to load/store pointer sized
4485         quantities when using ilp32.
4486
4487         * mini-codegen.c: Use OP_LOADR_MEMBASE/OP_STORER_MEMBASE for loading/storing
4488         spill slots. Use sizeof(mgreg_t) for the spill slot size.
4489
4490         * image-writer.c: Use .long on ilp32.
4491
4492         * aot-compiler.c: Use 32 bit loads on ilp32.
4493         
4494 2009-06-19  Zoltan Varga  <vargaz@gmail.com>
4495
4496         * tramp-ppc.c (mono_arch_create_trampoline_code): Fix the ppc build.
4497
4498         * mini-ops.h: Use TARGET_POWERPC define for consistency.
4499
4500         * patch-info.h: Add 'MSCORLIB_GOT_ADDR' patch type.
4501
4502         * aot-compiler.c aot-runtime.c: Put the mscorlib got address into the 
4503         second got slot of every aot image.
4504         
4505         * aot-compiler.c aot-runtime.c mini-trampolines.c: Add support for
4506         aot on platforms with function pointers.
4507
4508         * mini-ppc.h mini-ppp.c cpu-ppc.md exceptions-ppc.c tramp-ppc.c: Add
4509         support for aot/full aot on ppc/ppc64.
4510         
4511         * tramp-<ARCH>.c (mono_arch_patch_plt_entry): Add 'got' and 'regs'
4512         arguments which are needed on ppc.
4513
4514         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Add 'regs'
4515         argument.
4516
4517         * mini-trampolines.c aot-runtime.c: Update after the above changes.
4518         
4519         * liveness.c (BITS_PER_CHUNK): Use MONO_BITSET_BITS_PER_CHUNK.
4520
4521         * regalloc2.c (BITS_PER_CHUNK): Ditto.  
4522
4523         * aot-compiler.c (emit_got_info): Fix reading unused memory.
4524
4525         * ir-emit.h (alloc_dreg): Add a 'return -1' to quiet some compilers.
4526
4527 2009-06-17  Geoff Norton  <gnorton@novell.com>
4528
4529         * aot-compiler.c: Ensure we dont try to close a null dwarf writer.
4530
4531 2009-06-17  Zoltan Varga  <vargaz@gmail.com>
4532
4533         * dwarfwriter.c (mono_dwarf_writer_create): Add an 'appending' parameter
4534         to control whenever the dwarf writer is in xdebug or aot mode.
4535         (emit_class_dwarf_info): Use a separate abbrev for structures without
4536         children.
4537
4538         * aot-compiler.c: Pass the appending parameter to 
4539         mono_dwarf_writer_create ().
4540
4541         * branch-opts.c (mono_merge_basic_blocks): Fix the case when bbn
4542         falls through to its next bblock. Fixes #513931.
4543
4544         * iltests.il: Add a test.
4545
4546         * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Emit some line number
4547         infor even if emit_line is FALSE, as the apple linker seems to require it.
4548
4549         * image-writer.c (asm_writer_emit_symbol_diff): Call get_label ().
4550
4551         * dwarfwriter.c (emit_cie): Emit a separate symbol for the cie start, as
4552         gcc does.
4553         (emit_fde): Ditto.
4554
4555 2009-06-15  Zoltan Varga  <vargaz@gmail.com>
4556
4557         * exceptions-mips.c (mono_arch_get_throw_exception_by_name): Fix the
4558         mips build.
4559
4560 2009-06-13  Zoltan Varga  <vargaz@gmail.com>
4561
4562         * mini.h (struct MonoBasicBlock): Add 'has_jump_table' and 
4563         'has_call_handler' fields.
4564
4565         * method-to-ir.c (mono_method_to_ir): Set them if needed.
4566
4567         * branch-opts.c (mono_merge_basic_blocks): Avoid iterating through the
4568         first bblock if not needed. Fixes #512790.
4569         
4570 2009-06-11  Zoltan Varga  <vargaz@gmail.com>
4571
4572         * aot-compiler.c (mono_compile_assembly): Fix a warning.
4573         
4574         * aot-compiler.c (add_wrappers): Don't emit remoting-invoke-with-check
4575         wrappers.
4576
4577         * aot-runtime.c (mono_aot_get_method): Use the original method's code for
4578         remoting-invoke-with-check wrappers, which are not needed when running with
4579         full-aot, since it doesn't support remoting.
4580         
4581 2009-06-10  Zoltan Varga  <vargaz@gmail.com>
4582
4583         * aot-compiler.c (emit_got_info): Don't emit offsets for the plt got entries.
4584
4585         * aot-compiler.c aot-runtime.c: Don't emit the first got offset in the
4586         method info, it is not used anymore.
4587
4588         * mini.h: Bump AOT file format version.
4589         
4590         * aot-compiler.c (arch_emit_plt_entry): Make the arm plt entries one
4591         word smaller.
4592
4593         * aot-runtime.c (mono_aot_get_plt_info_offset): Update after the
4594         change above.
4595         
4596         * tramp-arm.c (mono_arch_patch_plt_entry): Ditto.
4597
4598         * mini.h: Bump AOT file format version.
4599         
4600 2009-06-10  Zoltan Varga  <vargaz@gmail.com>
4601
4602         * image-writer.c (asm_writer_emit_symbol_diff): Disable the 
4603         TARGET_ASM_APPLE stuff for now, as it doesn't seem to work on the
4604         iphone.
4605
4606         * mini-arm.c (mono_arch_output_basic_block): Fix the implementation
4607         of CKFINITE and FBGE for VFP.
4608
4609 2009-06-09  Zoltan Varga  <vargaz@gmail.com>
4610
4611         * aot-compiler.c: Don't align code to 16 bytes on arm.
4612         
4613         * aot-compiler.c (emit_method_code): Emit the unbox trampolines right
4614         before the methods they belong to.
4615
4616         * aot-runtime.c (mono_aot_plt_resolve): Avoid creating trampolines in
4617         the full-aot case if possible, since the trampoline will be called right 
4618         away.
4619
4620         * aot-compiler.c (mono_compile_assembly): Decrease the number of full aot
4621         trampolines to 1024 after the change above.
4622
4623         * aot-compiler.c (arch_emit_specific_trampoline): Rework the arm
4624         trampoline to save 8 bytes per trampoline.
4625
4626         * tramp-arm.c (mono_arch_create_trampoline_code_full): Update after the
4627         change above.
4628
4629 2009-06-08  Zoltan Varga  <vargaz@gmail.com>
4630
4631         * aot-compiler.c: Use acfg->temp_prefix instead of .L to prefix labels.
4632
4633 2009-06-08  Martin Baulig  <martin@ximian.com>
4634
4635         * debug-mini.c
4636         (MonoDebuggerExceptionAction): Moved into debug-mini.h.
4637         (_mono_debugger_throw_exception): Don't make this static.
4638         (_mono_debugger_unhandled_exception): Likewise.
4639         (mono_debugger_handle_exception): Moved to mini-exceptions.c
4640
4641         * debug-mini.c
4642         (MonoDebuggerExceptionAction): Moved here from debug-mini.c.
4643         (_mono_debugger_throw_exception): Add function prototype.
4644         (_mono_debugger_unhandled_exception): Likewise.
4645
4646         * mini-exceptions.c
4647         (mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
4648         arg; return the first exception handler if the exception is caught
4649         and we're running inside the debugger.
4650         (mono_debugger_handle_exception): Moved here from debug-mini.c;
4651         improve exception handle inside runtime-invoke, check whether the
4652         exception is actually caught in the method being invoked and not
4653         by the runtime-invoke-wrapper.
4654
4655 2009-06-08  Zoltan Varga  <vargaz@gmail.com>
4656
4657         * image-writer.c: Improve support for the osx assembler.
4658
4659         * dwarfwriter.c: Avoid the usage of subsections if the assembler doesn't
4660         support them.
4661
4662 2009-06-08  Martin Baulig  <martin@ximian.com>
4663
4664         * debug-mini.c
4665         (MonoDebuggerExceptionAction): Moved into debug-mini.h.
4666         (_mono_debugger_throw_exception): Don't make this static.
4667         (_mono_debugger_unhandled_exception): Likewise.
4668         (mono_debugger_handle_exception): Moved to mini-exceptions.c
4669
4670         * debug-mini.c
4671         (MonoDebuggerExceptionAction): Moved here from debug-mini.c.
4672         (_mono_debugger_throw_exception): Add function prototype.
4673         (_mono_debugger_unhandled_exception): Likewise.
4674
4675         * mini-exceptions.c
4676         (mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
4677         arg; return the first exception handler if the exception is caught
4678         and we're running inside the debugger.
4679         (mono_debugger_handle_exception): Moved here from debug-mini.c;
4680         improve exception handle inside runtime-invoke, check whether the
4681         exception is actually caught in the method being invoked and not
4682         by the runtime-invoke-wrapper.
4683
4684 2009-06-07  Zoltan Varga  <vargaz@gmail.com>
4685
4686         * image-writer.c (append_subsection): Don't align subsections of the
4687         debug_line section as a workaround.
4688
4689         * dwarfwriter.c: Emit line number info in the AOT case as well.
4690
4691 2009-06-06  Steven Munroe  <munroesj@us.ibm.com>
4692
4693         This patch is contributed under the terms of the MIT/X11 license
4694
4695        * mini-ppc.c (mono_arch_emit_exceptions): Change assert to
4696        code_len <= code_size
4697
4698 2009-06-06  Zoltan Varga  <vargaz@gmail.com>
4699
4700         * mini-mips.c (mips_emit_exc_by_name): Fix the mips build.
4701
4702 2009-06-04  Zoltan Varga  <vargaz@gmail.com>
4703
4704         * aot-compiler.c aot-runtime.c: Delete references to static rgctx
4705         invoke wrappers, we now use trampolines instead.
4706
4707 2009-06-04  Mark Probst  <mark.probst@gmail.com>
4708
4709         * mini-darwin.c: The exception thread must not be registered with
4710         the GC.
4711
4712 2009-06-04  Mark Probst  <mark.probst@gmail.com>
4713
4714         * mini-gc.c: Disable the code because it makes SGen crash.
4715
4716 2009-06-03  Zoltan Varga  <vargaz@gmail.com>
4717
4718         * aot-compiler.c (mono_compile_assembly): Handle file open errors gracefully
4719         instead of asserting.
4720
4721 2009-05-31  Zoltan Varga  <vargaz@gmail.com>
4722
4723         * aot-compiler.c (mono_compile_assembly): Move the creation of the
4724         output file after the code has been compiled.
4725
4726 2009-05-30  Zoltan Varga  <vargaz@gmail.com>
4727
4728         * tramp-ppc.c (mono_arch_get_static_rgctx_trampoline): Fix 64 bit support.
4729
4730 2009-05-31  Zoltan Varga  <vargaz@gmail.com>
4731
4732         * aot-compiler.c aot-runtime.c: Get rid of the shared/non-shared got
4733         entries distinction to simplify the code.
4734
4735         * mini.h: Bump AOT file format version.
4736         
4737 2009-05-28  Zoltan Varga  <vargaz@gmail.com>
4738
4739         * objects.cs: Fix the signature of one of the tests.
4740
4741         * mini.c (mini_create_ftnptr): New helper function, moved here from
4742         object.c.
4743         (mini_get_addr_from_ftnptr): Ditto.
4744         (mini_init): Install the new helpers.
4745
4746 2009-05-28  Martin Baulig  <martin@ximian.com>
4747
4748         Correctly initialize the debugger when embedding Mono.
4749
4750         * mdb-debug-info32.s, mdb-debug-info64.s: Add a global variable
4751         `MONO_DEBUGGER__using_debugger' to the `.mdb_debug_info' section;
4752         see documentation in mini_debug_running_inside_mdb().
4753
4754         * debug-debugger.c
4755         (mini_debug_running_inside_mdb): New function to check whether
4756         we're running inside mdb.
4757
4758         * mini.c (mini_init): Call mini_debugger_init() if we're running
4759         inside the debugger.
4760
4761         * driver.c (mono_main): Moved the call to mini_debugger_init()
4762         into mini_init() to make this work when embedding Mono.
4763
4764         * debug-debugger.c (mini_debugger_init): Warn about duplicate
4765         calls to mini_debugger_init().
4766
4767         * mini.h: Rename mono_debugger_init() -> mini_debugger_init(),
4768         mono_debugger_main() -> mini_debugger_main() and put them inside a
4769         `MONO_DEBUGGER_SUPPORTED' conditional.
4770
4771 2009-05-26 Rodrigo Kumpera  <rkumpera@novell.com>
4772
4773         * mini-trampolines.c: Kill mono_find_delegate_trampoline_by_addr as
4774         this is no longer in use.
4775         * mini.h: Same.
4776
4777 2009-05-26  Zoltan Varga  <vargaz@gmail.com>
4778
4779         * mini-sparc.c (add_outarg_load): Fix the sparc build.
4780
4781         * aot-compiler.c (emit_method_code): Always write out C style symbols for
4782         methods.
4783
4784 2009-05-27  Martin Baulig  <martin@ximian.com>
4785
4786 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
4787
4788         * mini-x86.c (mono_arch_output_basic_block): Fix the precision of
4789         long_conv_to_r_un to 64 bits.
4790
4791         * cpu-x86.md: Increase the instruction size due to the changes.
4792
4793         * iltests.il.in: Add regression test.
4794
4795         Fixes #467201.
4796
4797 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
4798
4799         * objects.cs: Move the previous test from basic.cs to here.
4800
4801 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
4802
4803         * basic.cs: Add regression test for #506915.
4804
4805 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
4806
4807         * method-to-ir.c (mono_method_to_ir): When doing the ldobj+stobj
4808         optimization we must check the bb of the first byte of stobj as
4809         it's the only one set in cil_offset_to_bb.
4810
4811         Fixes #506915.  
4812
4813 2009-05-25  Zoltan Varga  <vargaz@gmail.com>
4814
4815         * image-writer.c: Fix pointer directive on ppc64.
4816
4817 2009-05-24  Zoltan Varga  <vargaz@gmail.com>
4818
4819         * image-writer.c (asm_writer_emit_section_change): Avoid using
4820         .bss subsections on ppc too.
4821
4822 2009-05-23  Zoltan Varga  <vargaz@gmail.com>
4823
4824         * image-writer.c: Fix the definition of TARGET_ASM_....
4825         
4826         * image-writer.c: Fix the emission of assembler directives in the last
4827         change.
4828
4829         * mini-ppc.c (mono_arch_emit_exceptions): Increase the size of the
4830         exception throwing code to accomodate ppc64.
4831
4832         * tramp-ppc.c (mono_arch_get_nullified_class_init_trampoline): Increase the
4833         size to work on ppc64 too.
4834
4835         * mini-ppc.h (MonoCompileArch): Enable static rgctx trampolines on ppc64
4836         too.
4837
4838         * image-writer.c: Clean up the #ifdef hell a bit by adding defines for
4839         the assembler dialect instead of using platform specific defines.
4840
4841 2009-05-22  Geoff Norton  <gnorton@novell.com>
4842
4843         * mini-arm.c (get_call_info): If a structure is split between the stack
4844         and argument registers, we should not advance the stack pointer by the entire
4845         native size, but just by the amount that spilled.
4846
4847 2009-05-22  Zoltan Varga  <vargaz@gmail.com>
4848
4849         * mini-arm.c (get_call_info): Handle structures with alignment requirements
4850         correctly.
4851
4852 2009-05-21  Zoltan Varga  <vargaz@gmail.com>
4853
4854         * aot-compiler.c (emit_extra_methods): Encode direct runtime invoke
4855         wrappers normally.
4856         
4857         * aot-compiler.c (add_extra_method): Fix up the collection of extra
4858         methods so wrapper don't get added twice.
4859         (add_generic_instances): Don't add methods of arrays.
4860
4861         * generics.cs: Mark one test as !FULLAOT.
4862
4863 2009-05-21 Rodrigo Kumpera  <rkumpera@novell.com>
4864
4865         * mini-x86.c (emit_move_return_value): Remove unused vars.
4866
4867 2009-05-21 Rodrigo Kumpera  <rkumpera@novell.com>
4868
4869         * mini-x86.c (mono_arch_emit_call): The decompose code now supports
4870         decomposing 8 bytes structs into a LCALL.
4871
4872         * mini-x86.c (emit_move_return_value): We no longer push the vtype
4873         pointer for where to store the returned regs.
4874
4875         * decompose.c (mono_decompose_vtype_opts): Fix the comment to properly
4876         state the concern.
4877
4878         Fixes #471747, #471751 and #4734530 (in fact, it's a bunch of dups).
4879
4880 2009-05-20  Miguel de Icaza  <miguel@novell.com>
4881
4882         * aot-runtime.c (mono_aot_init): Use g_getenv to work on systems
4883         without getenv.
4884
4885 2009-05-21  Zoltan Varga  <vargaz@gmail.com>
4886
4887         * aot-compiler.c (add_wrappers): Add StructureToPtr/PtrToStructure wrappers.
4888
4889         * basic.cs: Move the test_2_cprop_bug () test to generics.cs as it involves
4890         generics.
4891
4892 2009-05-20 Rodrigo Kumpera  <rkumpera@novell.com>
4893
4894         * local-propagation.c (mono_local_cprop): Avoid local propagation
4895         across paired add/sub if the first instruction dest reg is it's
4896         source reg. For example:
4897
4898         int_add_imm R12 <- R12 [1] clobbers: 1
4899         int_sub_imm R42 <- R12 [1] clobbers: 1
4900
4901         The cprop pass would wrongly const prop + 1 to int_sub_imm which doesn't
4902         maintain the math identify.
4903
4904         Fixes #505375.
4905
4906 2009-05-20  Andreia Gaita  <avidigal@novell.com>
4907
4908         * Makefile.am: avoid going on the network just to get the revision,
4909         use git log instead
4910
4911 2009-05-19  Massimiliano Mantione  <massi@ximian.com>
4912
4913         Fixed estimate for short branches on amd64 (they were off mark, and
4914         enabling call prolog-epilog instrumentations caused assertions).
4915         * mini.h (struct MonoBasicBlock): added max_length field to hold the
4916         estimate for the maximum length of this basic block.
4917         * mini-amd64.c:
4918         - mono_arch_emit_prolog: compute max_length for each basic block
4919           (instead of max_offset), and inflate size estimate also for entry bb
4920           in case of code instrumentation.
4921         - mono_arch_output_basic_block: get rid of "cpos" (the current
4922           estimated "position" in the code), and always use "offset" instead,
4923           which is accurate; at the beginning of the function quickly recompute
4924           max_offset for all the remaining blocks, starting from the current
4925           cfg->code_len (which is correct, and not estimated) and using the
4926           estimated block lengths computed previously.
4927
4928 2009-05-17  Zoltan Varga  <vargaz@gmail.com>
4929
4930         * exceptions-ppc.c: Remove the caching from the trampoline creation 
4931         functions, it is already done in the caller.
4932
4933         * mini-trampolines.c (mono_llvm_vcall_trampoline): Fix the llvm build.
4934
4935         * mini-ppc.h mini-arm.h mini-x86.h mini-amd64.h: Add 
4936         MONO_ARCH_GSHARED_SUPPORTED define.
4937
4938         * mini.c (mini_init): Use the MONO_ARCH_GSHARED_SUPPORTED define.
4939
4940         * mini-arm.c mini.c: Get rid of the unused mono_arch_fixup_jinfo ()
4941         function.
4942
4943 2009-05-16  Zoltan Varga  <vargaz@gmail.com>
4944
4945         * jit-icalls.c (mono_helper_compile_generic_method): Get rid of the 
4946         call to mono_marshal_get_rgctx_invoke ().
4947
4948         * mini.c method-to-ir.c mini-trampolines.c: Get rid of the usage of
4949         mono_marshal_get_static_rgctx_invoke (), all platforms which support
4950         gshared use the static rgctx trampolines now.
4951         
4952         * mini.c (mini_init): Call mono_set_generic_sharing_supported () if the
4953         platform supports it.
4954
4955 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
4956
4957         * mini-arm.c (mono_arch_allocate_vars): Correctly save R5 when using AOT.
4958
4959         * aot-compiler.c (emit_method_code): Avoid duplicate labels for methods.
4960
4961 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
4962
4963         * mini-ppc.c (mono_arch_emit_exceptions): Nullify the processed patches.
4964
4965         * tramp-ppc.c (mono_arch_nullify_class_init_trampoline): Implement this
4966         for ppc.
4967
4968 2009-05-15  Massimiliano Mantione  <massi@ximian.com>
4969
4970         Made it possible for mono_arch_instrument_epilog to preserve
4971         argument registers, otherwise instrumenting the "epilogue" before
4972         a tail call would clobber them.
4973         * mini.h: Added "mono_arch_instrument_epilog_full" prototype, which
4974         if like mono_arch_instrument_epilog but with an additional parameter
4975         that states if argument registers must be preserved.
4976         * mini.c: implemented mono_arch_instrument_epilog as a call to
4977         mono_arch_instrument_epilog_full without asking to preserve argument
4978         registers (this makes the existing code work as usual).
4979         * mini-amd64.c:
4980         - mono_arch_instrument_epilog: add parameter to transform it into
4981         mono_arch_instrument_epilog_full, and preserve argument registers
4982         when required.
4983         - mono_arch_output_basic_block, OP_TAILCALL case: call
4984         mono_arch_instrument_epilog_full.
4985         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
4986         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c, mini-x86.c:
4987         only transformed mono_arch_instrument_epilog into
4988         mono_arch_instrument_epilog_full.
4989
4990 2009-05-15  Geoff Norton  <gnorton@novell.com>
4991
4992         * mini-darwin.c: This works on arm now.
4993
4994 2009-05-14  Geoff Norton  <gnorton@novell.com>
4995
4996         * jit.h, driver.c: Allow full-aot to be decided programatically by the
4997         embedding api.
4998
4999 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
5000
5001         * aot-compiler.c (emit_method_code): Skip a few more characters in the debug
5002         label names.
5003
5004         * mini-trampolines.c (mono_magic_trampoline): Handle static rgctx invoke
5005         wrappers during full aot mode correctly.
5006
5007         * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle shared generic
5008         methods correctly.
5009
5010         * aot-compiler.c (mono_aot_method_hash): Use our internal version of
5011         mono_metadata_type_hash ().
5012
5013 2009-05-14  Massimiliano Mantione  <massi@ximian.com>
5014
5015         * mini.h, mini-codegen.c, mini-alpha.c, mini-amd64.c, mini-arm.c,
5016         mini-hppa.h, mini-hppa.c, mini-ia64.c, mini-mips.h, mini-mips.c,
5017         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c, mini-886.c:
5018         Removed MONO_INST_BRLABEL from the instruction flags, and the
5019         remaining code that used it, because we do not support branches inside
5020         basic blocks (and branch target labels) anymore.
5021         * Makefile.am: As part of the above cleanup, remove reference to
5022         BURG files which don't exist anymore.
5023
5024 2009-05-14  Zoltan Varga  <vargaz@gmail.com>
5025
5026         * image-writer.c (asm_writer_emit_local_symbol): Make this a nop on
5027         osx.
5028
5029         * mini-mips.c mini-mips.h exceptions-mips.c: Transition the mips backend
5030         to use mono_arch_throw_corlib_exception.
5031
5032         * mini-ppc.c mini-ppc.h exceptions-ppc.c: Use 
5033         mono_arch_throw_corlib_exception for throwing corlib exceptions.
5034
5035         * aot-runtime.c (decode_patch): Allocate the data for R4/R8 from the
5036         domain mempool.
5037
5038         * mini.c (mono_patch_info_dup_mp): Copy the table of switch targets too.
5039
5040         * aot-compiler.c: Emit a local symbol prefixed with the assembly name 
5041         for the got to make debugging easier and to avoid confusing it with the
5042         system got.
5043         
5044         * aot-compiler.c (emit_method_code): Emit a C style symbol for each
5045         method so a breakpoint can be set when using gdb.
5046
5047 2009-05-13  Zoltan Varga  <vargaz@gmail.com>
5048
5049         * aot-compiler.c (mono_aot_method_hash): Implement this properly based
5050         on mono_method_get_imt_slot ().
5051
5052         * aot-runtime.c (find_extra_method_in_amodule): Get rid of the
5053         num_decodes variables.
5054
5055         * aot-compiler.c (mono_aot_method_hash): Revert part of the last
5056         change as it doesn't seem to work.
5057         
5058         * aot-compiler.c (mono_aot_method_hash): Improve the hashing of
5059         wrappers.
5060
5061 2009-05-12  Zoltan Varga  <vargaz@gmail.com>
5062
5063         * aot-compiler.c mini.c mini-amd64.h mini-arm.h: Kill 
5064         MONO_ARCH_FULL_AOT_IMT_SUPPORTED define, both platforms now support imt.
5065
5066         * mini.c (mini_init): Install mono_aot_get_imt_thunk as the IMT thunk
5067         builder when using full aot.
5068
5069         * mini-amd64.c (mono_arch_build_imt_thunk): Don't handle the full-aot case
5070         here, it is already handled.
5071         
5072         * mini-arm.c (mono_arch_emit_imt_argument): Pass the dynamic imt arg
5073         correctly for IMT.
5074
5075         * aot-compiler.c (arch_emit_imt_thunk): Implement this for ARM.
5076
5077         * mini-arm.h: Enable IMT for full aot.
5078         
5079         * aot-compiler.c (mono_compile_assembly): Don't emit imt thunk if the
5080         arch doesn't support it.
5081
5082         * mini.c (mini_init): Don't disable IMT for full aot if the
5083         architecture supports it.
5084
5085         * mini.h (MonoAotTrampoline): New enum containing the different types
5086         of 'numerous' trampolines.
5087         (MONO_AOT_FILE_VERSION): Bump this.
5088
5089         * aot-compiler.c aot-runtime.c: Unify the handling of specific and
5090         static rgctx trampolines. Add support for full-aot IMT thunks.
5091
5092         * mini-amd64.h: Enable IMT for full aot.
5093
5094         * TestDriver.cs: Add a CategoryAttribute class and an --exclude option
5095         to exclude tests belonging to a category.
5096
5097         * generics.cs: Mark some tests with a !FULLAOT category.
5098
5099         * Makefile.am (fullaotcheck): Run tests with --exclude !FULLAOT. Include
5100         generics tests.
5101
5102 2009-05-11  Zoltan Varga  <vargaz@gmail.com>
5103
5104         * aot-compiler.c (emit_and_reloc_code): Move the implementation of
5105         MONO_PATCH_INFO_GOT_OFFSET to a separate arch-specific function.
5106         (emit_plt): Fix a warning.
5107
5108 2009-05-10  Zoltan Varga  <vargaz@gmail.com>
5109
5110         * aot-compiler.c aot-runtime.c: Fix the build by moving is_shared_got_patch
5111         back into aot-compiler.c to a place where the other functions shared by
5112         the runtime and aot compiler are.
5113         
5114         * aot-compiler.c aot-runtime.c: Emit the got addr using a separate symbol,
5115         as done previously, instead of in MonoAotFileInfo, since pointers might have
5116         alignment requirements.
5117
5118         * mini.h: Bump AOT file format version.
5119
5120 2009-05-10  Miguel de Icaza  <miguel@novell.com>
5121
5122         * aot-runtime.c (mono_aot_is_shared_got_patch): Move this routine
5123         that is used at runtime from the aot-compiler.c, this makes it
5124         work on setups that remove the AOT compiler from the output
5125         image. 
5126
5127 2009-05-09  Zoltan Varga  <vargaz@gmail.com>
5128
5129         * tramp-ppc.c (mono_arch_get_static_rgctx_trampoline): Implement this for
5130         PPC.
5131
5132         * mini-ppc.h: Enable static rgctx trampolines for ppc.
5133
5134         * mini-<ARCH>.h: Kill the MONO_ARCH_ENABLE_EMIT_STATE_OPT define.
5135
5136         * decompose.c (mono_decompose_long_opts): Move the ppc/sparc specific 
5137         stuff to mono_arch_decompose_long_opts ().
5138         (mono_decompose_opcode): Remove some dead code.
5139
5140 2009-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
5141
5142         * method-to-ir.c (mono_method_to_ir): Fix boostrap of non amd64 builds
5143         cmethod can be null for quite a some reasons.
5144
5145 2009-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
5146
5147         * method-to-ir.c (mono_method_to_ir): Fix non amd64 builds.
5148
5149 2009-05-08  Zoltan Varga  <vargaz@gmail.com>
5150
5151         * aot-compiler.c (arch_emit_got_access): Fix the aot-not-supported build.
5152
5153 2009-05-08  Zoltan Varga  <vargaz@gmail.com>
5154
5155         * method-to-ir.c (mono_emit_call_args): Add a 'tail' flag argument.
5156         (mono_method_to_ir): Use MONO_ARCH_USE_OP_TAIL_CALL macro to determine
5157         whenever to make tail calls using OP_TAIL_CALL. Enable support for tail
5158         calls returning structures by addr on amd64.
5159
5160         * mini-amd64.h (MONO_ARCH_USE_OP_TAIL_CALL): New arch-specific macro.
5161
5162         * iltests.il.in: Restructure the tail call tests a bit.
5163         
5164 2009-05-07  Zoltan Varga  <vargaz@gmail.com>
5165
5166         * aot-compiler.c (add_wrappers): Add remoting-invoke-with-check wrappers
5167         for virtual methods too.
5168
5169 2009-05-06  Raja R Harinath  <harinath@hurrynot.org>
5170
5171         * method-to-ir.c (mono_method_to_ir): Revert change of 2009-05-02
5172         due to regression in verifying System.dll.
5173
5174 2009-05-06  Zoltan Varga  <vargaz@gmail.com>
5175
5176         * debug-mini.c (mono_debugger_method_has_breakpoint): Allow breakpoints
5177         in dynamic methods.
5178
5179         * dwarfwriter.c (emit_class_dwarf_info): Add support for generic
5180         instances.
5181
5182         * aot-compiler.c aot-runtime.c: Use our own hash function instead of
5183         g_str_hash () which can change.
5184
5185         * driver.c (mini_regression): Disable optimizations not supported by
5186         the cpu. Fixes #500019.
5187
5188         * aot-runtime.c (mono_aot_get_unwind_info): Fix the --enable-minimal=aot
5189         build.
5190
5191 2009-05-06  Zoltan Varga  <vargaz@gmail.com>
5192
5193         * mini-llvm.c (mono_llvm_emit_method): Update the OP_TLS_GET implementation
5194         to the latest LLVM code.
5195
5196 2009-05-05  Zoltan Varga  <vargaz@gmail.com>
5197
5198         * genmdesc.pl (load_opcodes): Fix this after the TARGET_... changes.
5199
5200 2009-05-04  Zoltan Varga  <vargaz@gmail.com>
5201
5202         * mini-llvm.c (mono_llvm_emit_method): Implement TLS support on 
5203         x86/amd64.
5204
5205         * aot-compiler.c (encode_patch_list): Simplify this considerably as we are
5206         no longer saving offsets, so just save the patch types along with the other
5207         info.
5208         * aot-runtime.c (load_patch_info): Update after the changes to 
5209         encode_patch_list ().
5210         (decode_got_entry): Removed, merged into load_patch_info ().
5211         (is_shared_got_patch): Removed, call the same function from
5212         aot-compiler.c.
5213
5214         * mini.h: Bump aot file format version.
5215         
5216         * aot-compiler.c aot-runtime.c: Resurrect static linking support. Kill the
5217         half-finished no-dlsym code.
5218
5219         * aot-runtime.c (load_method): Kill the old and bit-rotten use_loaded_code
5220         option.
5221
5222         * mini-<ARCH>.h mini-trampolines.c aot-runtime.c: Kill the 
5223         MONO_ARCH_HAVE_CREATE_TRAMPOLINE_FROM_TOKEN define.
5224
5225 2009-05-02  Zoltan Varga  <vargaz@gmail.com>
5226
5227         * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Increase the
5228         buffer length to work with AOT code.
5229
5230         * method-to-ir.c (mono_method_to_ir): Handle loading errors in the
5231         ldfld/stfld opcodes.
5232
5233         * exceptions-x86.c (mono_arch_get_throw_exception_by_name): Simplify this
5234         as it is not used.
5235
5236         * mini-llvm.c mini-x86.c: Implement 32 bit and x86 support.
5237
5238         * ssa.c (mono_ssa_compute): Don't skip I8 values when using LLVM.
5239
5240         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Update to the latest
5241         LLVM API.
5242
5243         * mini.c (mini_method_compile): Set the from_llvm flag in MonoJitInfo
5244         if needed. Don't decompose long operations when using llvm.
5245
5246 2009-05-01  Zoltan Varga  <vargaz@gmail.com>
5247
5248         * aot-compiler.c aot-runtime.c: Use mono_pagesize () instead of the
5249         PAGESIZE constant.
5250
5251         * aot-runtime.c (load_aot_module): Get rid of another mprotect call.
5252
5253 2009-05-03  Martin Baulig  <martin@ximian.com>
5254
5255         * debug-debugger.c (debugger_insert_source_breakpoint): Don't call
5256         mono_debugger_insert_method_breakpoint() since the class init
5257         handler we're inserting at the top of the method already gives us
5258         a notification.
5259
5260 2009-04-30  Zoltan Varga  <vargaz@gmail.com>
5261
5262         * decompose.c (mono_decompose_long_opts): Move the implementation of LNEG
5263         to mono_arch_decompose_long_opts () for x86 and arm.
5264
5265 2009-04-29  Zoltan Varga  <vargaz@gmail.com>
5266
5267         * mini-codegen.c (mono_regstate_alloc_int): Use __x86_64__ instead of
5268         TARGET_AMD64 here.
5269
5270 2009-04-28  Zoltan Varga  <vargaz@gmail.com>
5271
5272         * *.h *.c: Use TARGET_<ARCH> defines instead of __<arch>__ defines in the
5273         JIT code.
5274
5275 2009-04-26  Zoltan Varga  <vargaz@gmail.com>
5276
5277         * aot-runtime.c (mono_aot_create_specific_trampoline): Add a stat for the
5278         number of trampolines used in full-aot mode.
5279
5280         * aot-compiler.c: Add an ntrampolines option to set the number of 
5281         trampolines emitted in full-aot mode.
5282
5283 2009-04-27  Zoltan Varga  <vargaz@gmail.com>
5284
5285         * mini-llvm.c (mono_llvm_emit_method): Implement OP_CHECK_THIS using
5286         a volatile load. Get rid of get_tempname (), llvm assigns names
5287         automatically.
5288
5289         * mini-llvm-cpp.cpp (mono_llvm_build_volatile_load): New instruction
5290         builder function.
5291
5292         * mini-llvm.c (mono_llvm_emit_method): Don't call LLVMGetParam on
5293         a value.
5294
5295         * abcremoval.c (REPORT_ABC_REMOVAL): Don't output messages at verbose
5296         level 1.
5297
5298         * mini-codegen.c (mono_local_regalloc): Prevent sreg1/dreg to be allocated
5299         to the same register as a fixed sreg2. Fixes #497271.
5300
5301         * iltests.il.in: Add a new test.
5302
5303 2009-04-26  Zoltan Varga  <vargaz@gmail.com>
5304
5305         * mini-amd64.c: Use moves instead of pushes for passing arguments on the
5306         stack, since pushes complicate exception handling.
5307
5308         * exceptions-amd64.c (mono_arch_find_jit_info): Don't pop the arguments of
5309         the stack if they are passed using moves.
5310
5311         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add an assert.
5312
5313         * method-to-ir.c (mono_method_to_ir): Disable fast virtual generic methods
5314         when using llvm.
5315
5316         * mini-llvm.c (mono_llvm_emit_method): Call jit icall wrappers, not the 
5317         icalls themselves. Convert arguments of FCOMPARE. Convert the destination
5318         of FMOVE if it is an R4.
5319
5320 2009-04-25  Zoltan Varga  <vargaz@gmail.com>
5321
5322         * mini-ops.h: Add OP_LLVM_OUTARG_VT opcode.
5323
5324         * mini.h (LLVMCallInfo): New structure to store calling convention 
5325         information for the LLVM back end similar to the CallInfo structures in 
5326         the back-ends.
5327
5328         * mini-amd64.c (mono_arch_get_llvm_call_info): New arch function to return
5329         call information in a format usable by LLVM.
5330         (mono_arch_emit_call): Move the LLVM handling code to mono_llvm_emit_call ().
5331
5332         * method-to-ir.c (mono_emit_call_args): Emit calls using 
5333         mono_llvm_emit_call () when compiling using LLVM.
5334
5335         * mini-llvm.c: Implement support for passing/receiving valuetypes. Add
5336         comments to all functions. Fix memory leaks. Add a public init/cleanup
5337         function.
5338
5339         * mini.c: Call the llvm init/cleanup functions in mini_init()/cleanup().
5340
5341         * method-to-ir.c (handle_array_new): Disable llvm when calling the vararg
5342         mono_array_new_va () jit icall.
5343         
5344 Fri Apr 24 16:44:08 CEST 2009 Paolo Molaro <lupus@ximian.com>
5345
5346         * Makefile.am, genmdesc.c, genmdesc.pl: tiny refactor to allow
5347         multiple machine description files to be specified.
5348         * mini-ops.h: fixes for cross-compilation.
5349
5350 2009-04-22  Miguel de Icaza  <miguel@novell.com>
5351
5352         * aot-runtime.c (make_writable): Use mono_mprotect to simplify
5353         some porting work.
5354
5355 2009-04-22  Zoltan Varga  <vargaz@gmail.com>
5356
5357         * method-to-ir.c (mono_method_to_ir): Force init_locals to be TRUE
5358         to prevent asserts in various passes. Fixes #497220.
5359
5360 2009-04-21  Zoltan Varga  <vargaz@gmail.com>
5361
5362         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove
5363         a racy assert.
5364
5365         * aot-compiler.c aot-runtime.c: Emit the unwind info into a separate
5366         table to avoid duplicates.
5367
5368         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
5369         
5370         * aot-compiler.c (emit_method_code): Avoid writing symbols if the nodebug
5371         option is used.
5372
5373 2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>
5374
5375         * mini.c (mini_method_verify): Fail fulltrust code if the exception
5376         is for method or field access.
5377
5378 2009-04-20  Zoltan Varga  <vargaz@gmail.com>
5379
5380         * mini-llvm-cpp.cpp (mono_llvm_dump_value): New helper function to print
5381         a Value to stdout.
5382
5383         * mini-llvm.c (mono_llvm_emit_method): Use it.
5384         
5385         * mini-llvm.c (type_to_llvm_type): Fix the mapping of enums.
5386         (mono_llvm_emit_method): Add support for CAS. Fix handling of CSET opcodes
5387         on volatile values.
5388
5389         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add support for 
5390         synchronized methods.
5391
5392         * mini.c (mini_method_compile): Disable LLVM for dynamic methods.
5393
5394         * mini.c (mini_method_compile): Enable ABCREM when running with LLVM.
5395
5396         * mini-llvm.c (mono_llvm_emit_method): Add support for OP_LOADI4_MEM/
5397         OP_LOADI8_MEM.
5398
5399         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Add a MONO_LLVM env variable
5400         allowing some options to be set dynamically.
5401
5402 2009-04-19  Zoltan Varga  <vargaz@gmail.com>
5403
5404         * mini-llvm.c (mono_llvm_emit_method): Handle compares followed by an
5405         unconditional branch.
5406
5407         * mini.h (MonoTrampolineType): Add new trampoline type 
5408         'MONO_TRAMPOLINE_LLVM_VCALL' which handles virtual calls made from LLVM
5409         compiled code.
5410
5411         * mini-trampolines.c (mono_llvm_vcall_trampoline): New C trampoline 
5412         function.
5413
5414         * mini-trampolines.c (mono_create_llvm_vcall_trampoline): New trampoline
5415         creation function.
5416
5417         * mini.c (mini_init): Avoid using the common vtable trampoline when LLVM
5418         is enabled. Instead, use the llvm vcall trampoline.
5419         
5420         * mini-trampolines.c (mono_get_vcall_slot_addr): New helper function.
5421
5422         * mini-trampolines.c tramp-amd64.c tramp-x86.c: Use it.
5423         
5424         * mini-<ARCH>.c: Get rid of the identical mono_arch_get_vcall_slot_addr ()
5425         functions.
5426
5427         * mini-<ARCH>.h mini-trampolines.c mini.c: Get rid of 
5428         MONO_ARCH_COMMON_VTABLE_TRAMPOLINE, it is supported by all archs.
5429
5430         * mini-ia64.c (mono_arch_lowering_pass): Null out the sregs of the
5431         OP_IA64_CSET opcode.
5432
5433         * mini.c: Fix a warning.
5434
5435         * mini-llvm.c (mono_llvm_emit_method): Convert arguments of SWITCH and
5436         THROW to the appropriate llvm type.
5437
5438 2009-04-18  Zoltan Varga  <vargaz@gmail.com>
5439
5440         * mini.c (mini_method_compile): Add statistics for methods JITted
5441         with/without LLVM.
5442
5443 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
5444
5445         * method-to-ir.c: Fix the computation of ins_sreg_counts for ia64
5446         OP_IA64_CMP_<cond>_IMM opcodes.
5447
5448 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
5449
5450         * mini-llvm.c (emit_cond_system_exception): Implement throwing of
5451         corlib exceptions.
5452
5453         * dwarfwriter.c (mono_dwarf_writer_emit_method): Handle --regression
5454         correctly.
5455
5456         * mini-llvm.c (type_to_llvm_type): Avoid accessing t->data.klass for
5457         GENERICINST.
5458
5459 2009-04-17  Atsushi Enomoto  <atsushi@ximian.com>
5460
5461         * mini-exceptions.c : add thread id to EXCEPTION trace message.
5462
5463 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
5464
5465         * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Fix AOT
5466         support.
5467
5468         * tramp-x86.c (mono_arch_get_unbox_trampoline): Implement static
5469         rgctx invoke trampolines for x86.
5470
5471         * mini-x86.c (mono_arch_output_basic_block): Add a few nops before
5472         indirect calls to simplify get_vcall_slot_addr (). Fixes #494567.
5473         (mono_arch_get_vcall_slot): Simplify this.
5474
5475 2009-04-16  Zoltan Varga  <vargaz@gmail.com>
5476
5477         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Move the calls to
5478         mono_debug_add_delegate_trampoline () to get_delegate_invoke_impl ().
5479
5480 2009-04-14  Zoltan Varga  <vargaz@gmail.com>
5481
5482         * aot-compiler.c tramp-arm.c mini-arm.c: Implement static rgctx 
5483         trampolines for ARM. Add full-aot support for delegate invokes for ARM.
5484
5485         * mini-trampolines.c (mono_magic_trampoline): Fix the build.
5486
5487         * liveness.c (visit_bb): Remove a needless assert.
5488
5489 2009-04-13  Zoltan Varga  <vargaz@gmail.com>
5490
5491         * mini-trampolines.c (mono_create_delegate_trampoline): Delegate the
5492         full aot support to the arch specific code.
5493
5494         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Add full-aot support.
5495
5496         * aot-compiler.c (emit_trampolines): Emit delegate invoke impl trampolines.
5497
5498         * aot-compiler.c (emit_named_code): Rename this to 'emit_trampoline'.
5499         
5500         * mini-amd64.c (mono_arch_get_delegate_invoke_impls): New function to
5501         collect information about the delegate invoke impl trampolines.
5502
5503         * mini.h (MonoAotTrampInfo): New structure collecting the information needed
5504         to save trampolines during full-aot mode.
5505
5506         * mini-trampolines.c (mono_create_static_rgctx_trampoline): New trampoline
5507         creation function which returns a trampoline which sets the rgctx
5508         argument.
5509         (mono_magic_trampoline): Use the rgctx trampoline instead of an rgctx
5510         wrapper if possible.
5511         (mono_delegate_trampoline): Ditto.
5512
5513         * mini.c (mono_jit_runtime_invoke): Ditto.
5514
5515         * tramp-amd64.c: Add an implemention of static rgctx trampolines for AMD64.
5516         
5517         * aot-compiler.c aot-runtime.c: Add support for static rgctx trampolines.
5518
5519         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
5520         
5521 2009-04-12  Zoltan Varga  <vargaz@gmail.com>
5522
5523         * mini-ia64.c (mono_arch_lowering_pass): Use NULLIFY_INS instead of
5524         just setting the opcode to OP_NOP.
5525
5526 2009-04-11  Zoltan Varga  <vargaz@gmail.com>
5527
5528         * mini.c (mini_method_compile): Put the last change inside an 
5529         #ifdef MONO_ARCH_HAVE_LIVERANGE_OPS.
5530         
5531         * mini.c (mini_method_compile): Disable sharing of stack slots/registers
5532         and extend live ranges to cover the whole method when using xdb.
5533
5534         * jit-icalls.c (ldvirtfn_internal): Avoid creating rgctx wrappers here,
5535         do it in the trampolines.
5536
5537         * mini-trampolines.c (mono_magic_trampoline): Add an rgctx wrapper if
5538         needed.
5539
5540         * mini-trampolines.c (mono_delegate_trampoline): Ditto.
5541         
5542         * method-to-ir.c (mono_method_to_ir): Avoid using the fast virtual method
5543         call code in full-aot mode since IMT is disabled there.
5544         (mono_method_to_ir): Inline ldfld wrappers which return structures too, the
5545         new JIT no longer has that restriction.
5546
5547         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
5548
5549         * aot-compiler.c (emit_extra_methods): Emit the wrapper method names in
5550         a more compact format.
5551         (mono_aot_wrapper_name): New function to return a unique name for a
5552         wrapper method, also used by the AOT runtime.
5553
5554         * aot-runtime.c (find_extra_method_in_amodule): Update after the changes to
5555         aot-compiler.c.
5556
5557         * aot-compiler.c (add_generic_class): Add the helper methods from T[]
5558         when a ICollection<T> etc is encountered.
5559         (add_generic_instances): Process method arguments/locals too.
5560         (emit_trampolines): Emit unbox trampolines for extra methods too. Shorten
5561         trampoline names.
5562
5563         * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle extra methods too.
5564         
5565 2009-04-10  Zoltan Varga  <vargaz@gmail.com>
5566
5567         * aot-compiler.c: Disable the AOT compiler if the JIT is disabled.
5568
5569         * dwarfwriter.c (emit_type): Emit byref to reference types as 'int' for now.
5570
5571         * decompose.c (mono_decompose_opcode): Make this return a MonoInst*
5572         representing the result of the decomposition. Nullify instructions
5573         instead of setting them to OP_NOP since nops can't have registers
5574         set.
5575
5576 2009-04-09  Zoltan Varga  <vargaz@gmail.com>
5577
5578         * aot-compiler.c (mono_compile_assembly): Split this huge function into
5579         smaller parts. Add 'nodebug' option to prevent generation of DWARF debug
5580         info. Strip 'mapping symbols' on ARM.
5581
5582         * iltests.il.in (test_0_fconv_to_i): Disable this on ARM too.
5583         
5584         * genmdesc.pl: Applied patch by Martin Fuzzey (mfuzzey@parkeon.com). Sync
5585         this with the native genmdesc.
5586
5587 2009-04-08  Bill Holmes  <billholmes54@gmail.com>
5588
5589         * aot-runtime.c:  Fixing the MSVC build.
5590
5591         Code is contributed under MIT/X11 license.
5592
5593 2009-04-08  Zoltan Varga  <vargaz@gmail.com>
5594
5595         * mini-llvm.c (mono_llvm_emit_method): Pass i1/i2 arguments as i4 since 
5596         JITted code depends on it.
5597
5598 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
5599
5600         * aot-compiler.c: Use new MonoGenericParam accessors.
5601
5602 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
5603
5604         Reduce memory usage and improve correctness wrt MonoGenericParam
5605         * aot-runtime.c (decode_klass_ref): Simplify generic parameter
5606         handing.  Avoid allocating MonoGenericParams, but use the ones in
5607         the container itself.
5608
5609 2009-04-07  Miguel de Icaza  <miguel@novell.com>
5610
5611         * tasklets.c: Return exceptions in the out argument.
5612
5613 2009-04-08  Zoltan Varga  <vargaz@gmail.com>
5614
5615         * mini-llvm.c (mono_llvm_emit_method): Fix alignment in the LOCALLOC_IMM
5616         opcode. Use pointer types in more places instead of casting them to 
5617         integers.
5618
5619         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Create a pass manager to run
5620         optimizations.
5621         (mono_llvm_optimize_method): New helper function to optimize a method.
5622
5623         * method-to-ir.c (mono_emit_widen_call_res): Extract the call result 
5624         widening code so it could be called from more places.
5625         (mono_method_to_ir): Call mono_emit_widne_call_res () in several more
5626         code paths in the call opcodes.
5627
5628 Mon Apr 6 14:19:54 CEST 2009 Paolo Molaro <lupus@ximian.com>
5629
5630         * exceptions-amd64.c, mini-amd64.h: amd64 support code for continuations.
5631
5632 2009-04-06  Zoltan Varga  <vargaz@gmail.com>
5633
5634         * dwarfwriter.c: Use _ to separate class name 
5635         components as gdb can't handle '.'. Represent reference variables
5636         as 'class <NAME>&'.
5637         
5638         * mini.h (MonoCompile): Add locals_min_stack_offset/locals_max_stack_offset.
5639
5640         * mini-amd64.c (mono_arch_allocate_vars): Save min/max stack offset.
5641         
5642         * mini-gc.c: New file, contains the SGEN GC related parts of the JIT.
5643
5644         * gc-test.cs: New file with GC stack marking tests.
5645         
5646         * mini-arm.c (mono_arch_output_basic_block): Fix int->float conversion of
5647         negative numbers for vfp.
5648
5649         * basic-float.cs: Add a test.
5650         
5651 Mon Apr 6 14:12:10 CEST 2009 Paolo Molaro <lupus@ximian.com>
5652
5653         * exceptions-x86.c, mini-x86.h: x86 support code for continuations.
5654
5655 Mon Apr 6 14:09:53 CEST 2009 Paolo Molaro <lupus@ximian.com>
5656
5657         * tasklets.h, tasklets.c, mini.h, mini.c, Makefile.am: arch-indep
5658         part of tasklet/continuation support.
5659
5660 2009-04-05  Zoltan Varga  <vargaz@gmail.com>
5661
5662         * mini-llvm.c (mono_llvm_emit_method): Move the handling of
5663         amd64 opcodes inside an ifdef.
5664
5665         * dwarfwriter.c: Emit inheritance information for classes, emit fields
5666         of complex types.
5667         
5668         * dwarfwriter.c (emit_type): Emit the class info for classes.
5669
5670 2009-04-04  Zoltan Varga  <vargaz@gmail.com>
5671
5672         * Makefile.am (AM_CXXFLAGS): Add GLIB_CFLAGS to this.
5673
5674         * mini-llvm-cpp.h: New header file for mini-llvm-cpp.cpp.
5675
5676         * mini-llvm.c: Remove unused fields from EmitContext, fix memory leaks.
5677
5678         * ssa.c (mono_ssa_compute): Fix some memory leaks.
5679
5680 2009-04-03  Zoltan Varga  <vargaz@gmail.com>
5681
5682         * mini.c mini-amd64.c method-to-ir.c: Use COMPILE_LLVM in a few more places.
5683
5684         * mini-llvm.c: Update comments.
5685
5686         * mini.h (COMPILE_LLVM): New macro.
5687
5688         * decompose.c (mono_decompose_opcode): Use the COMPILE_LLVM macro.
5689
5690         * ssa.c (mono_ssa_compute): Ditto.
5691         
5692         * unwind.c (mono_unwind_get_ops_from_fde): New helper function to extract
5693         the unwind ops from a DWARF FDE.
5694
5695         * mini-llvm.c: Implement generation of unwind info for LLVM compiled
5696         methods by extracting the dwarf unwind ops from the unwind info generated
5697         by LLVM.
5698         
5699         * mini-llvm.c (mono_llvm_emit_method): Enable support for non-IMT virtual
5700         calls.
5701
5702         * mini-amd64.c (mono_arch_get_vcall_slot): Handle more kinds of the SIB
5703         addressing modes.
5704
5705 2009-04-02  Zoltan Varga  <vargaz@gmail.com>
5706
5707         * Makefile.am (llvm_sources): Enable this.
5708
5709         * mini.c (mini_method_compile): Add support for compiling with LLVM, 
5710         failing back to the JIT if something cannot be handled.
5711
5712         * mini-amd64.c (mono_arch_emit_call): Emit the arguments more simple when
5713         compiling with LLVM.
5714
5715         * decompose.c (mono_decompose_opcode): Avoid decomposing some opcodes when
5716         compiling with LLVM.
5717
5718         * method-to-ir.c (mono_method_to_ir): Avoid decomposing SWITCH when 
5719         compiling with LLVM.
5720
5721         * mini-ops.h: Add a few opcodes needed by LLVM.
5722
5723         * dwarfwriter.c (mono_dwarf_writer_emit_method): Avoid crashes if the method
5724         has no unwind info.
5725
5726         * mini-llvm.c mini-llvm-cpp.cpp: New files containing the experimental llvm
5727         backend.
5728
5729         * mini-arm.c (mono_arch_output_basic_block): Fix the ARM_FPU_NONE build.
5730
5731         * mini-arm.h mini-arm.c cpu-arm.md: Finish VFP support.
5732
5733 2009-04-01  Mark Probst  <mark.probst@gmail.com>
5734
5735         * regalloc.h, mini-codegen.c: Make vassign members gint32 to fix
5736         ridiculously large methods.
5737
5738 2009-03-31  Martin Baulig  <martin@ximian.com>
5739
5740         * debug-debugger.c (debugger_remove_breakpoint): Call
5741         mono_debugger_remove_class_init_callback ().
5742
5743 2009-03-31  Zoltan Varga  <vargaz@gmail.com>
5744
5745         * aot-compiler.c (mono_compile_assembly): Call img_writer_emit_start ()
5746         right before emitting code, not at the start.
5747
5748         * mini.c (mono_postprocess_patches): Extract this into a separate function
5749         from mono_codegen ().
5750
5751         * ssa.c (mono_ssa_compute): Set ins->klass for every PHI node, handle
5752         byref types correctly.
5753
5754 2009-03-30  Zoltan Varga  <vargaz@gmail.com>
5755
5756         * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix a crash introduced
5757         by the last change.
5758
5759 2009-03-29  Zoltan Varga  <vargaz@gmail.com>
5760
5761         * mini-amd64.c (mono_arch_output_basic_block): Emit a few nops before 
5762         indirect calls, this avoids problems where get_vcall_slot () would get
5763         confused by the native code for the instruction preceeding the call.
5764         (mono_arch_get_vcall_slot): Simplify this.
5765         (mono_arch_emit_imt_argument): Remove this, it is no longer needed.
5766
5767         * mini-ops.h: Fix the definitions of the OP_IA64 opcodes, since the local
5768         register allocator now seems to depend on them instead of the data in
5769         cpu-<ARCH>.md.
5770
5771         * mini.c (mini_method_compile): Throw the correct type of exception if
5772         mono_method_get_header () fails because of a loading error.
5773
5774 2009-03-28  Zoltan Varga  <vargaz@gmail.com>
5775
5776         * mini.c (mini_method_compile): Clear the loader error if the method
5777         header cannot be decoded.
5778
5779         * mini-trampolines.c (mono_magic_trampoline): Handle generic virtual 
5780         interface methods on proxies correctly.
5781
5782         * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix handling of the
5783         this argument for vtype methods. Add precise liveness info for arguments.
5784
5785         * mini-codegen.c (mono_print_ins_index): Print the vreg of the
5786         LIVERANGE_START/END opcodes.
5787
5788         * method-to-ir.c (mono_spill_global_vars): Fix liverange calculation
5789         for arguments and values in registers.
5790
5791 2009-03-27  Zoltan Varga  <vargaz@gmail.com>
5792
5793         * method-to-ir.c (mono_method_to_ir): Disable tail calls for calls which
5794         return a valuetype. Fixes #487518.
5795
5796         * iltests.il: Add a test.
5797         
5798         * aot-compiler.c: Use mono_thread_create () to create helper threads.
5799
5800         * mini-trampolines.c (mono_delegate_trampoline): Handle static delegates
5801         closed over a null reference correctly.
5802
5803 2009-03-26  Zoltan Varga  <vargaz@gmail.com>
5804
5805         * method-to-ir.c (mono_handle_global_vregs): Fix support for ternary ops.
5806
5807 2009-03-25  Mark Probst  <mark.probst@gmail.com>
5808
5809         * mini-codegen.c (mono_local_regalloc): Don't let sregs get
5810         allocated to the same registers as fixed sregs.
5811
5812 2009-03-24  Mark Probst  <mark.probst@gmail.com>
5813
5814         * mini-ops.h: New ternary ATOMIC_CAS ops replace the old
5815         ATOMIC_CAS_IMM ops.
5816
5817         * method-to-ir.c: Handle more cases for
5818         Interlocked.CompareExchange.
5819
5820         * cpu-x86.md, mini-x86.c, mini-x86.h, cpu-amd64.md, mini-amd64.c,
5821         mini-amd64.h, cpu-ppc.md, cpu-ppc64.md, mini-ppc.c, mini-ppc.h:
5822         ATOMIC_CAS implementations for x86, AMD64, PPC and PPC64.
5823
5824 2009-03-23  Zoltan Varga  <vargaz@gmail.com>
5825
5826         * aot-runtime.c (decode_method_ref): Fix a warning.
5827
5828         * unwind.c (mono_unwind_frame): Ditto.  
5829
5830 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
5831
5832         * aot-compiler.c (arch_emit_unbox_trampoline): Fix the binary writer support.
5833         (mono_compile_assembly): Enable the binary writer for full-aot as well.
5834
5835         * image-writer.c (do_reloc): Add support for the JUMP24 relocation,
5836         fix the handling of large values in the ALU_PC_G0_NC relocation.
5837
5838 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
5839
5840         * local-propagation.c method-to-ir.c local-propagation.c: Fix warnings.
5841
5842 2009-03-22  Mark Probst  <mark.probst@gmail.com>
5843
5844         * method-to-ir.c (mono_spill_global_vars): Support for ternary
5845         ops.
5846
5847 2009-03-22  Mark Probst  <mark.probst@gmail.com>
5848
5849         * method-to-ir.c: MINI_OP3 needs a comma.
5850
5851         * method-to-ir.c, mini.h, mini.c: Remove
5852         mono_init_op_sreg_counts ().
5853
5854 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
5855
5856         * mini-arm.c (mono_arch_output_basic_block): Fix aot support in
5857         OP_JMP.
5858         
5859         * mini-arm.c (mono_arch_build_imt_thunk): Disable the !fail_tramp
5860         assertion.
5861
5862         * mini-ops.h: Fix arguments of the MEMINDEX opcodes.
5863
5864         * mini-amd64.c (mono_arch_build_imt_thunk): Simplify the fail handling
5865         code somewhat.
5866
5867 2009-03-21  Mark Probst  <mark.probst@gmail.com>
5868
5869         * cfold.c, cprop.c, decompose.c, genmdesc.c, helpers.c, ir-emit.h,
5870         liveness.c, local-propagation.c, method-to-ir.c, mini-codegen.c,
5871         mini.c, mini.h, simd-intrinsics.c, ssa.c: Support for ternary IR
5872         operations.
5873
5874 2009-03-20  Zoltan Varga  <vargaz@gmail.com>
5875
5876         * driver.c: Change location of gc_wrapper.h.
5877
5878         * method-to-ir.c (mono_find_block_region): Handle try clauses nested
5879         inside finally clauses correctly. Fixes #485721.
5880
5881         * mini.c (mono_find_spvar_for_region): This needs to handle try regions
5882         after the change above.
5883
5884         * exceptions.cs: Add a test.
5885         
5886 2009-03-19  Zoltan Varga  <vargaz@gmail.com>
5887
5888         * unwind.c (mono_unwind_ops_encode): Increase the size of the encode buffer.
5889
5890         * mini-amd64.c (mono_arch_emit_epilog): Remove the encoding of stack size
5891         into cfg->used_int_regs, it is not needed with the dwarf unwinder.
5892         (mono_arch_compute_omit_fp): Remove the emit_epilog () workaround.
5893
5894         * mini-amd64.c (mono_arch_compute_omit_fp): Add another check to avoid hitting
5895         the stack_alloc_size < (1 << 16) assertion in emit_prolog ().
5896
5897 2009-03-19  Sebastien Pouliot  <sebastien@ximian.com>
5898
5899         * method-to-ir.c: Allow CoreCLR to throw FieldAccessException. 
5900         Simplify logic for ensure_method_is_allowed_to_call_method. 
5901         Handle wrappers on callers.
5902
5903 2009-03-19  Zoltan Varga  <vargaz@gmail.com>
5904
5905         * Makefile.am (fullaotcheck): Don't run the generics tests, some of
5906         them don't run yet.
5907
5908         * basic-simd.cs: Fix the names of some test methods.
5909
5910 2009-03-18  Geoff Norton  <gnorton@novell.com>
5911
5912         * mini.c: Only chain sigfpe if it wasn't generated in mangaed code.
5913
5914 2009-03-18  Zoltan Varga  <vargaz@gmail.com>
5915
5916         * dwarfwriter.c (token_handler): Fix a crash caused by the last change.
5917
5918 2009-03-17  Jb Evain  <jbevain@novell.com>
5919
5920         * driver.c: remove now uneeded call to mono_gc_base_init before
5921         mono_profiler_load.
5922
5923 2009-03-17  Jb Evain  <jbevain@novell.com>
5924
5925         * dwarfwriter.c (token_handler): handle more cases.
5926
5927 2009-03-17  Sebastien Pouliot  <sebastien@ximian.com> 
5928
5929         * method-to-ir.c: Remove more dead code (that was required only
5930         because of method_is_safe). Fix compiler warnings.
5931
5932 2009-03-17  Sebastien Pouliot  <sebastien@ximian.com>
5933
5934         * method-to-ir.c: Remove unneeded/useless method_is_safe
5935         http://lists.ximian.com/archives/public/mono-devel-list/2009-March/031404.html
5936
5937 2009-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
5938
5939         * mini.c (mini_method_compile): Print the method been compiled with
5940         verbose level 1 instead of 3 as this helps a lot debugging JIT crashes
5941         for people not familiar with the runtime.
5942
5943 2009-03-17  Zoltan Varga  <vargaz@gmail.com>
5944
5945         * mini-exceptions.c (get_generic_info_from_stack_frame): Avoid returning
5946         a managed object which is later put into a GList. Return its class instead.
5947
5948         * mini.c (mono_allocate_stack_slots_full): Avoid sharing ref and non-ref
5949         stack slots when using sgen.
5950
5951 2009-03-16  Zoltan Varga  <vargaz@gmail.com>
5952
5953         * dwarfwriter.c (emit_line_number_info): Really fix the eglib build.
5954
5955 2009-03-14  Zoltan Varga  <vargaz@gmail.com>
5956
5957         * local-propagation.c (reg_is_softreg_no_fpstack): Use >= instead of
5958         > so it works on the first vreg as well.
5959
5960 2009-03-13  Zoltan Varga  <vargaz@gmail.com>
5961
5962         * dwarfwriter.c (emit_line_number_info): Disable an assert which seems to
5963         trigger randomly.
5964
5965         * aot-compiler.c: Get rid of xdebug_lock (), use the loader lock instead.
5966         
5967         * dwarfwriter.c (emit_line_number_info): Fix eglib build as eglib doesn't
5968         implement GArray.
5969
5970 2009-03-12  Zoltan Varga  <vargaz@gmail.com>
5971
5972         * dwarfwriter.c (emit_line_number_info): Optimize the computation of the
5973         native->IL offset mapping.
5974
5975 2009-03-11  Zoltan Varga  <vargaz@gmail.com>
5976
5977         * mini-amd64.c (mono_arch_output_basic_block): Fix % 1. Fixes #484323.
5978
5979         * basic.cs: Add a test.
5980
5981 2009-03-11  Mark Probst  <mark.probst@gmail.com>
5982
5983         * mini-x86.c (mono_arch_output_basic_block): Use different
5984         registers in case the ones we want to overwrite are used by the
5985         other operand.  Fixes regression in #480807.
5986
5987 2009-03-10  Zoltan Varga  <vargaz@gmail.com>
5988
5989         * aot-compiler.c (mono_compile_assembly): Make the output less verbose.
5990
5991         * dwarfwriter.c (emit_line_number_info): The line number info for
5992         IL code was off by one. Fix that.
5993
5994         * mini-s390x.c: Fix support for vtypes whose addresses are passed on the
5995         stack.
5996
5997 2009-03-09  Mark Probst  <mark.probst@gmail.com>
5998
5999         Contributed under the terms of the MIT/X11 license by Steven
6000         Munroe <munroesj@us.ibm.com>.
6001
6002         * mini-ppc.c: Correct handling of OP_LOADI4_MEMINDEX for ppc64.
6003         Fixes #483462.
6004
6005 2009-03-08  Zoltan Varga  <vargaz@gmail.com>
6006
6007         * dwarfwriter.c (token_handler): Decode method references in non-wrappers
6008         as well.
6009
6010 2009-03-06  Zoltan Varga  <vargaz@gmail.com>
6011
6012         * method-to-ir.c (mono_method_to_ir): Check for type load exceptions in
6013         the delegate ctor handling code. Fixes #482638.
6014         
6015         * method-to-ir.c (mini_emit_memset): Fix the handling of size '3'. Fixes
6016         #481458.
6017
6018         * iltests.il.in: Add a test.
6019         
6020         * mini-darwin.c (mono_chain_signal): Remove this, it is already in
6021         mini-posix.c.
6022
6023 2009-03-05  Mark Probst  <mark.probst@gmail.com>
6024
6025         * mini-trampolines.c (mono_create_jump_trampoline): If the method
6026         is shared generic code, return the trampoline, even if the method
6027         has already been compiled.  Fixes #479763.
6028
6029         * mini.c, mini.h: New function
6030         mono_jit_find_compiled_method_with_jit_info() which is the same as
6031         mono_jit_find_compiled_method() but also returns the jit info.
6032
6033 2009-03-05  Mark Probst  <mark.probst@gmail.com>
6034
6035         * method-to-ir.c (mono_method_to_ir): Only force the vtable var
6036         for methods which actually have one.  For all other methods, make
6037         sure the this argument var is live the whole method.
6038
6039         * mini.c (mini_method_compile): Every shared method has a
6040         this/vtable/mrgctx info.  Fixes #480807.
6041
6042 2009-03-05  Mark Probst  <mark.probst@gmail.com>
6043
6044         * mini-ppc.c (mono_arch_build_imt_thunk): Add support for mixed
6045         generic/imt thunks where some entries branch through the vtable,
6046         while other entries branch directly.
6047
6048 2009-03-05  Zoltan Varga  <vargaz@gmail.com>
6049
6050         * mini-darwin.c (mono_chain_signal): Define this to fix the build.
6051
6052         * mini-windows.c: Ditto.
6053         
6054         * mini.c (mono_jit_runtime_invoke): Speed up the invoking of parameterless
6055         ctors.
6056
6057 2009-03-04  Zoltan Varga  <vargaz@gmail.com>
6058
6059         * dwarfwriter.c (emit_line_number_info): Add some debug code to help track
6060         down an assert.
6061
6062 2009-03-04  Mark Probst  <mark.probst@gmail.com>
6063
6064         * method-to-ir.c: Don't inline methods that use JMP.  Fixes
6065         #481403.
6066
6067 2009-03-04  Mark Probst  <mark.probst@gmail.com>
6068
6069         * exceptions-x86.c: Include debug-mini.h - fixes build.
6070
6071 2009-03-04  Martin Baulig  <martin@ximian.com>
6072
6073         * debug-mini.c: Clean up the exception API and add documentation.
6074         (mono_debugger_handle_exception): New public method; this is
6075         called when throwing an exception or encountering an unhandled one.
6076         (mono_debugger_call_exception_handler): Formerly known as
6077         mono_debugger_handle_exception(); this is used to tell the
6078         debugger that we're about to invoke an exception handler.
6079
6080 2009-03-04  Martin Baulig  <martin@ximian.com>
6081
6082         * debug-mini.c (mono_debugger_runtime_invoke): Moved here from
6083         ../metadata/mono-debug-debugger.c; save and reset exception state.
6084
6085 2009-03-02  Martin Baulig  <martin@ximian.com>
6086
6087         * debug-mini.c: Moved the debugger exception handling here from
6088         ../metadata/mono-debug-debugger.c.
6089
6090         * debug-mini.h
6091         (MonoDebuggerExceptionAction): New exception typedef.
6092
6093         * debug-mini.c
6094         (MonoDebuggerThreadInfo): Added `MonoObject *last_exception'.
6095
6096         * exceptions-amd64.c
6097         (mono_amd64_throw_exception): Use the new debugger exception
6098         handling code.
6099
6100         * mini-exceptions.c
6101         (mono_handle_exception_internal): Don't call
6102         mono_debugger_unhandled_exception() here.
6103
6104 2009-03-03  Zoltan Varga  <vargaz@gmail.com>
6105
6106         * mini.c aot-compiler.c: Update after the changes to 
6107         mono_marshal_get_runtime_invoke ().
6108
6109         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): 
6110         Virtual generic methods might not have method->slot set, work around
6111         that.
6112
6113         * generics.cs: Add a test.
6114
6115 2009-03-02  Geoff Norton  <gnorton@novell.com>
6116
6117         * mini.c:
6118         * driver.c: Allow signal chaining of SIGFPE as well.
6119
6120 2009-03-02  Zoltan Varga  <vargaz@gmail.com>
6121
6122         * mini-trampolines.c (mono_generic_virtual_remoting_trampoline): Update
6123         this since it now receives the method not its generic context in the
6124         IMT reg.
6125
6126         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for mixed
6127         generic/imt thunks where some entries branch through the vtable, while
6128         other entries branch directly.
6129
6130         * mini-x86.c (mono_arch_build_imt_thunk): Ditto.
6131
6132         * method-to-ir.c (mono_method_to_ir): Enable fast virtual generic call 
6133         support for interface methods as well.
6134
6135         * mini-trampolines.c: Add support for virtual generic methods in interfaces
6136         using the normal IMT thunks.
6137
6138         generics.cs: Add new tests.
6139         
6140         * method-to-ir.c (mono_method_to_ir): Pass the method instead of
6141         the generic inst to the generic imt thunks. This fixes AOT support, 
6142         improves consistency with the normal IMT thunks, and makes it easier to
6143         add support for interface generic virtual methods later.
6144
6145         * mini-trampolines.c (mono_magic_trampoline): Ditto.    
6146         
6147 2009-02-28  Zoltan Varga  <vargaz@gmail.com>
6148
6149         * driver.c (mono_set_signal_chaining): New public API function to enable
6150         signal chaining on POSIX platforms.
6151
6152         * mini-posix.c mini.c: Applied a variant of a patch by Simon Rowland 
6153         (si@lindenlab.com) to implement signal chaining. The original patch was
6154         contributed under the MIT X/11 license:
6155         https://bugzilla.novell.com/show_bug.cgi?id=318894
6156
6157 2009-02-27  Zoltan Varga  <vargaz@gmail.com>
6158
6159         * iltests.il.in (test_0_implicit_float_to_double_conversion): Disable this
6160         too until it can be made to run on amd64.
6161
6162 2009-02-26  Zoltan Varga  <vargaz@gmail.com>
6163
6164         * mini-x86.c (mono_arch_get_this_arg_from_call): Avoid expensive calls
6165         to  get_generic_context_from_code () + get_call_info () if possible.
6166
6167 2009-02-25  Zoltan Varga  <vargaz@gmail.com>
6168
6169         * mini-exceptions.c (mono_handle_native_sigsegv): Implement the
6170         suspend-on-sigsegv functionality.
6171
6172         * mini.c (mini_parse_debug_options): Add a new 'suspend-on-sigsegv' option
6173         to suspend when a native SIGSEGV is received. This is useful for debugging
6174         crashes which don't happen under gdb, since a live process contains more
6175         information than a core file.
6176
6177         * mini-exceptions.c (mono_print_thread_dump): Use 
6178         MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX instead of platform defines.
6179
6180         * mini-x86.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): New define.
6181
6182         * mini-amd64.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): Ditto.
6183         
6184         * basic-float.cs: Disable the tests which currently fail on amd64.
6185
6186         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass a non-null 
6187         value to mono_arch_patch_callsite () to fix crashes.
6188         
6189         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix a warning.
6190
6191 2009-02-23  Zoltan Varga  <vargaz@gmail.com>
6192
6193         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Replace the
6194         nop code by patching the call address to point to the nullified class init
6195         trampoline, as the former does not seem to be safe on SMP machines.
6196
6197 2009-02-23  Mark Probst  <mark.probst@gmail.com>
6198
6199         * mini-ops.h: Fix the argument types for a few x86 opcodes where
6200         they were wrong.
6201
6202 2009-02-23  Zoltan Varga  <vargaz@gmail.com>
6203
6204         * basic-float.cs basic-calls.cs: Fix warnings.
6205
6206 2009-02-22  Mark Probst  <mark.probst@gmail.com>
6207
6208         * tramp-ppc.c (mono_arch_create_trampoline_code): Store the
6209         correct frame pointer in the LMF.  Should fix #478394.
6210
6211 2009-02-22  Zoltan Varga  <vargaz@gmail.com>
6212
6213         * Makefile.am (fullaotcheck): Copy Mono.Simd.dll as well.
6214
6215         * image-writer.c: Make the binary writer less verbose.
6216
6217 2009-02-21  Zoltan Varga  <vargaz@gmail.com>
6218
6219         * method-to-ir.c (mono_method_to_ir): Don't assert if string ctors
6220         are called from runtime invoke wrappers.
6221
6222 2009-02-20  Zoltan Varga  <vargaz@gmail.com>
6223
6224         * cpu-ppc.md (store_memindex): Increase the size of this.
6225
6226 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
6227
6228         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
6229
6230         * cpu-x86.md: Fix the sizes for long_conv_to_r_un and long_conv_to_r_un_2.
6231
6232         * mini-x86.c (mono_arch_output_basic_block): Use only 64bits of precision for
6233         OP_LCONV_TO_R_UN.
6234
6235         Last fix for of #467201.
6236
6237
6238 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
6239
6240         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
6241
6242         * cpu-x86.md: Fix the sizes for fcall(_reg,_membase), long_conv_to_r4_2
6243         and long_conv_to_r8_2:
6244
6245         Fixed part of #467201.
6246
6247 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
6248
6249         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
6250
6251         * mini-x86.c (mono_arch_output_basic_block): Adjust precision of int to float
6252         conversion to 32 bits.
6253
6254         * cpu-x86.md: Increase the size of int_conv_to_r4.
6255
6256         * basic-float.cs: Add a test for this.
6257
6258         Fixed part of #467201.
6259
6260 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
6261
6262         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
6263
6264         * mini-x86.c (mono_arch_output_basic_block): Adjust precision of long to double
6265         conversion to 64 bits.
6266
6267         * basic-float.cs: Add a test for this.
6268
6269         Fixed part of #467201.
6270
6271 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
6272
6273         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
6274
6275         * mini-x86.c (emit_move_return_value): Don't reduce precision of functions returning float.
6276         This behavior is compatible with MS.
6277
6278         * iltest.il.in: Add a test for this.
6279
6280         Fixed part of #467201.
6281
6282 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
6283
6284         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
6285
6286         * mini-x86.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_R4, it must
6287         change the precision of the value.
6288
6289         * cpu-x86.md: Define len for float_conv_to_r4.
6290
6291         * basic-float.cs: Add a test for this.
6292
6293         Fixed part of #467201.
6294
6295 2009-02-19 Rodrigo Kumpera  <rkumpera@novell.com>
6296
6297         * mini.c: Adjust locking order to the new semantics where the loader lock
6298         comes first.
6299
6300 2009-02-18  Rodrigo Kumpera  <rkumpera@novell.com>
6301
6302         * aot-runtime.c:
6303         * mini-amd64.c:
6304         * mini-arm.c:
6305         * mini-ia64.c:
6306         * mini-mips.c:
6307         * mini-ppc.c:
6308         * mini-sparc.c:
6309         * mini-trampolines.c:
6310         * mini-x86.c:
6311         * mini.c:
6312         * tramp-alpha.c:
6313         * tramp-amd64.c:
6314         * tramp-arm.c:
6315         * tramp-hppa.c:
6316         * tramp-ia64.c:
6317         * tramp-mips.c:
6318         * tramp-ppc.c:
6319         * tramp-s390.c:
6320         * tramp-s390x.c:
6321         * tramp-sparc.c:
6322         * tramp-x86.c: Use mono_domain_code_* functions instead of using MonoDomain::code_mp directly.
6323
6324 2009-02-18  Zoltan Varga  <vargaz@gmail.com>
6325
6326         * mini-codegen.c (mono_local_regalloc): Remove a ! from if (!dest_sreg1)
6327         as it is incorrect.
6328
6329 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
6330
6331         * aot-compiler.c (add_generic_class): Only add rgctx invoke wrappers
6332         for cctors if needed.
6333
6334 2009-02-17  Mark Probst  <mark.probst@gmail.com>
6335
6336         * mini-ppc.c: Fix build on Darwin.
6337
6338 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
6339
6340         * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Use 2 as the DWARF
6341         version instead of 3 as valgrind doesn't like version 3.
6342
6343         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
6344
6345         * aot-compiler.c (mono_aot_method_hash): New function to return a hash
6346         usable for hashing methods.
6347         (emit_extra_methods): Use the new hash to avoid putting every method in the
6348         same hash bucket.
6349
6350         * aot-runtime.c (find_extra_method_in_amodule): Use the new hash.
6351
6352         * aot-runtime.c (can_method_ref_match_method): New function to quickly check
6353         whenever a method ref could match a method.
6354         
6355         * aot-runtime.c (load_image): Revert the previous change, it causes an AOT
6356         test to fail.
6357         
6358         * aot-runtime.c (find_extra_method_in_amodule): Add a cache for decoded 
6359         methods refs.
6360
6361         * aot-runtime.c (load_image): Pass our basedir to mono_assembly_load.
6362
6363         * aot-compiler.c (emit_exception_debug_info): Bump the maximum size of
6364         the encoding buffer.
6365
6366         * method-to-ir.c (mono_method_check_inlining): Avoid calling 
6367         mono_method_get_header () on inflated methods as an optimization.
6368
6369 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
6370
6371         * ssa.c (fold_ins): Fix another crash if the instruction following the
6372         switch was optimized away.
6373
6374 2009-02-16  Mark Probst  <mark.probst@gmail.com>
6375
6376         Contributed under the terms of the MIT/X11 license by Steven
6377         Munroe <munroesj@us.ibm.com>.
6378
6379         * mini-ppc.c, mini-ppc.h: Implement TLS for PPC64.
6380
6381 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
6382
6383         * mini.c method-to-ir.c mini-trampolines.c aot-runtime.c: Remove locking
6384         around the mono_domain_alloc calls, it is now done by the functions
6385         themselves.
6386
6387         * aot-compiler.c (compile_method): Only add wrappers referenced by
6388         the method if compiling with full AOT.
6389         (mono_compile_assembly): Error out if --aot=full is specified on
6390         a platform where it is not supported.
6391
6392         * aot-compiler.c (emit_trampolines): Emit generic class init trampolines
6393         on ARM too.
6394
6395         * tramp-arm.c (mono_arch_create_generic_class_init_trampoline_full): Add
6396         AOT support.
6397
6398         * aot-runtime.c (load_named_code): Handle 
6399         mono_arm_throw_exception_by_token.
6400
6401         * mini-arm.h: Add declaration of mono_arm_throw_exception_by_token.
6402
6403         * image-writer.c (asm_writer_emit_pointer_unaligned): Make this really
6404         unaligned.
6405
6406         * Makefile.am (fullaotcheck): Exit if a test fails.
6407
6408         * aot-compiler.c (mono_compile_assembly): Use the ASM writer for full aot
6409         on ARM.
6410         (mono_compile_assembly): Handle the assembler failing.
6411
6412         * image-writer.c (asm_writer_emit_section_change): Handle ARM gas not
6413         accepting subsections of .bss.
6414
6415         * ssa.c (visit_inst): Fix a crash if the instruction following a switch
6416         was optimized away.
6417
6418         * aot-compiler.c: Remove some unused includes.
6419         
6420         * aot-compiler.c (MonoAotCompile): Remove some unused fields which are
6421         now in MonoImageWriter.
6422
6423         * mini-x86.c (mono_arch_get_vcall_slot): Handle yet another
6424         code sequence which matches a non-virtual call. Fixes #472654.
6425
6426 2009-02-15  Zoltan Varga  <vargaz@gmail.com>
6427
6428         * aot-compiler.c: Use xdebug_lock ()/unlock () macros for locking in the
6429         xdebug code.
6430         
6431         * aot-compiler.c: Make the xdebug code not depend on the AOT compiler,
6432         use the image/dwarf writers directly.
6433
6434         * image-writer.c (struct _MonoImageWriter): Remove the unused 'image'
6435         field.
6436
6437         * aot-compiler.c (MonoAotCompile): Remove fields which are now in
6438         MonoDwarfWriter.
6439
6440         * image-writer.h: Fix some typos.
6441
6442         * dwarfwriter.h dwarfwriter.c: New files.
6443         
6444         * aot-compiler.c: Extract the DWARF info writing functionality into a 
6445         separate module.
6446
6447         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add a 'out_unwind_ops'
6448         argument to return unwind info.
6449
6450         * tramp-arm.c (mono_arch_create_trampoline_code_full): Ditto.
6451
6452         * aot-compiler.c: Emit unwind info for trampolines in full-aot mode.
6453         
6454         * aot-runtime.c (decode_method_ref): Add a case for 
6455         MONO_AOT_METHODREF_WRAPPER_NAME.
6456
6457         * mini.h: Add constants for the magic numbers used in encode_method_ref ()
6458         for AOT.
6459
6460         * aot-compiler.c (encode_method_ref): Use the new constants.
6461
6462         * aot-runtime.c (decode_method_ref): Ditto.
6463
6464         * aot-compiler.c (compile_method): For generic icalls, queue the wrapper to
6465         be compiled, not the icall itself.
6466
6467 2009-02-14  Zoltan Varga  <vargaz@gmail.com>
6468
6469         * aot-runtime.c (find_extra_method_in_amodule): Avoid decoding wrapper names
6470         using decode_method_ref ().
6471
6472         * method-to-ir.c (mini_emit_ldelema_1_ins): If the array index is a long,
6473         convert it to an in32. Fixes #475859.
6474
6475         * arrays.cs: Add a test.
6476
6477 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
6478
6479         * mini-s390x.c (mono_arch_output_basic_block): Fix the shift amounts in 
6480         OP_LCONV_TO_U2.
6481
6482         * basic-long.cs: Add a test.
6483
6484 2009-02-12  Mark Probst  <mark.probst@gmail.com>
6485
6486         * mini-x86.c, mini-x86.h: Very simple frame pointer removal.  We
6487         remove the frame pointer in leaf methods which don't receive any
6488         arguments, don't throw exceptions and don't do dynamic stack
6489         allocations.
6490
6491 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
6492
6493         * mini-amd64.c (mono_arch_build_imt_thunk): Fix size calculation after
6494         the fail_tramp changes. Hopefully fixes #475132.
6495
6496 2009-02-12  Rodrigo Kumpera  <rkumpera@novell.com>
6497
6498         * method-to-ir.c (mono_emit_method_call_full): Use mono_metadata_signature_dup_mempool
6499         instead of mono_metadata_signature_dup_full.
6500
6501 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
6502
6503         * ssa.c (fold_ins): Use MONO_IS_JUMP_TABLE () and MONO_JUMP_TABLE_FROM_INS ()
6504         for processing jump tables. Fixes #473787.
6505
6506 2009-02-11  Mark Probst  <mark.probst@gmail.com>
6507
6508         * mini-generic-sharing.c: mini_method_get_context() just calls
6509         mono_method_get_context_general() now.
6510
6511         * mini.c, mini.h: Moved get_object_generic_inst(),
6512         construct_object_context_for_method() and
6513         mono_domain_lookup_shared_generic() to metadata/generic-sharing.c.
6514
6515 2009-02-11  Zoltan Varga  <vargaz@gmail.com>
6516
6517         * branch-opts.c (mono_if_conversion): Handle the case where the merged 
6518         basic block fell through to its successor bblock without a branch. Fixes
6519         #474718.
6520
6521         * iltests.il.in: Add a test.
6522         
6523         * aot-compiler.c (encode_method_ref): Encode methods of array types.
6524         (can_encode_patch): We can now handle arrays of generic parameters and
6525         array methods.
6526
6527         * aot-runtime.c (decode_method_ref_2): Handle methods of array types.
6528
6529         * aot-compiler.c aot-runtime.c: Emit the size of specific trampolines into
6530         the AOT file to avoid some #ifdefs in aot-runtime.c
6531
6532         * mini.h: Bump AOT file format version.
6533
6534 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
6535
6536         * Makefile.am (fullaotcheck): Make this run the tests.
6537
6538         * aot-compiler.c: Make the printing of skipped methods runtime configurable.
6539
6540 2009-02-10  Mark Probst  <mark.probst@gmail.com>
6541
6542         * mini-x86.c (mono_arch_context_get_int_reg): Handle all registers
6543         individually.  Fixes #473482.
6544
6545 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
6546
6547         * mini-arm.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
6548
6549 2009-02-09  Jeffrey Stedfast  <fejj@novell.com>
6550
6551         * aot-compiler.c (arch_emit_plt_entry): Fixed to compile.
6552         (mono_compile_assembly): Hush compile warnings about
6553         uninitialized [tmp_]outfile_name variables in the !use_bin_writer
6554         code path.
6555
6556 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
6557
6558         * exceptions-arm.c (mono_arch_find_jit_info): Fix aot support.
6559
6560         * mini-arm.c: Checkin unwind related changes missing from an earlier commit.
6561
6562         * aot-compiler.c: Fix arm support.
6563
6564         * image-writer.c: Move the R_ARM constants to image-writer.h. Export a
6565         img_writer_emit_unset_mode () function.
6566
6567         * unwind.c (mono_unwind_get_dwarf_data_align): New helper function.
6568         (mono_unwind_get_dwarf_pc_reg): Ditto.
6569
6570         * aot-compiler.c (emit_dwarf_abbrev): Another large reorganization.
6571         Move almost all platform specific code to a set of arch_ functions, 
6572         and document them to ease porting.
6573         
6574         * aot-compiler.c (mono_xdebug_init): Fix xdebug support.
6575
6576         * image-writer.h image-writer.c: New files, extracted from aot-compiler.c.
6577
6578         * aot-compiler.c: Extract the image writing functionality into a separate
6579         module to reduce the size of this file.
6580
6581 2009-02-09  Geoff Norton  <gnorton@novell.com>
6582
6583         * mini-s390.c: Fix the signature of emit_sig_cookie.
6584
6585 2009-02-09  Zoltan Varga  <vargaz@gmail.com>
6586
6587         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_IMAGE.
6588
6589         * aot-runtime.c (is_shared_got_patch): Ditto.
6590
6591         * aot-runtime.c (load_named_code): Cope with the fact that 
6592         decode_got_entry () won't decode the patch fully if its corresponding got
6593         entry is already filled.
6594         
6595         * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): 
6596         Initialize *ji.
6597         (mono_arch_create_monitor_exit_trampoline_full): Ditto.
6598
6599         * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): Use 'code'
6600         as the moving pointer instead of 'buf' for consistency with the rest of the
6601         codebase.
6602         (mono_arch_create_monitor_exit_trampoline): Ditto.
6603
6604         * aot-compiler.c (emit_trampolines): Add throw_pending_exception/
6605         generic_class_init trampolines.
6606         (add_generic_class): Extract some code from add_generic_instances () into a
6607         separate function so it can be called from other places too.
6608         (compile_method): Call add_generic_class () for the classes of inflated methods
6609         referenced by the method.
6610         (can_encode_patch): Allow references to generic parameters.
6611
6612         * aot-runtime.c: Add support the patches required by the new trampolines.
6613         
6614         * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Add full-aot
6615         support.
6616
6617         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline_full): Add
6618         full-aot support.
6619
6620         * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Rename
6621         this from get_throw_pending_exception, make the signature full aot compatible.
6622
6623         * Makefile.am (fullaotcheck): New target to run full-aot tests.
6624
6625         * method-to-ir.c (inline_method): Save/Restore cfg->ret_var_set too.
6626
6627         * exceptions.cs: Add a test.
6628
6629 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
6630
6631         * unwind.c (mono_unwind_frame): Eliminate the data_align_factor argument,
6632         use the DWARF_DATA_ALIGN constant instead.
6633
6634         * exception-<ARCH>.c: Update after the above change.
6635
6636         * exceptions-arm.c (mono_arch_find_jit_info): Transition this to use the
6637         dwarf unwinder.
6638
6639         * mini-arm.c: Enable the dwarf unwinder.
6640
6641         * mini-trampolines.c (mono_magic_trampoline): Use mono_class_get_vtable_entry ()
6642         instead of mono_class_setup_vtable ().
6643
6644 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
6645
6646         * exceptions-x86.c (mono_arch_find_jit_info): Transition this to use the
6647         dwarf unwinder.
6648
6649         * mini-x86.h: Enable the dwarf unwinder.
6650
6651 2009-02-06  Raja R Harinath  <harinath@hurrynot.org>
6652
6653         Fix mcs/tests/test-7.cs
6654         * mini-amd64.c (mono_arch_allocate_vars): Revert change from
6655         2009-02-03.
6656
6657 2009-02-06  Zoltan Varga  <vargaz@gmail.com>
6658
6659         * mini.c (print_jit_stats): Remove some unused statistics.
6660
6661 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
6662
6663         * aot-compiler.c (emit_klass_info): Update after MonoClass changes.
6664
6665 2009-02-05  Mark Probst  <mark.probst@gmail.com>
6666
6667         * jit-icalls.c (mono_helper_compile_generic_method): Don't inflate
6668         the method we get from mono_object_get_virtual_method() because
6669         that function does it properly, now.
6670
6671 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
6672
6673         * unwind.c (mono_unwind_ops_encode): Handle offsets greater than 32 between
6674         opcodes. Fixes #472775.
6675
6676 2009-02-05  Mark Probst  <mark.probst@gmail.com>
6677
6678         * mini-exceptions.c (ves_icall_get_frame_info): Account for the
6679         fact that mono_find_jit_info() sometimes returns the context
6680         corresponding to the jit info in new_ctx.  Fixes #472600.
6681
6682 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
6683
6684         * method-to-ir.c mini-hppa.c mini.c trace.c mini-s390x.c aot-compiler.c
6685         mini-s390.c: Use mono_class_enum_basetype () instead of accessing
6686         klass->enum_basetype directly.
6687
6688         * aot-compiler.c (emit_class_dwarf_info): Add support for all possible
6689         enum subtypes.
6690
6691         * unwind.c: Avoid 0 sized arrays.
6692
6693 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
6694
6695         * mini-exceptions.c (mono_setup_altstack): Use a more reasonable altstack
6696         size on systems with 64k pages. Fixes #471389.
6697
6698 2009-02-04  Mark Probst  <mark.probst@gmail.com>
6699
6700         Contributed under the terms of the MIT/X11 license by Steven
6701         Munroe <munroesj@us.ibm.com>.
6702
6703         * mini-ppc.c (mono_arch_output_basic_block): Generate better code
6704         for LOADI4_MEMBASE.  Use addi instead of addic if it's not
6705         necessary.
6706
6707 2009-02-04  Mark Probst  <mark.probst@gmail.com>
6708
6709         Contributed under the terms of the MIT/X11 license by Steven
6710         Munroe <munroesj@us.ibm.com>.
6711
6712         * exceptions-ppc.c (mono_arch_get_restore_context): Code size
6713         comparison fix.
6714
6715         * tramp-ppc.c (mono_arch_create_generic_class_init_trampoline):
6716         The trampoline can be longer on PPC64.
6717
6718 2009-02-04  Mark Probst  <mark.probst@gmail.com>
6719
6720         Contributed under the terms of the MIT/X11 license by Steven
6721         Munroe <munroesj@us.ibm.com>.
6722
6723         * mini-ppc.c: Compiler warning fixes and trivial code
6724         simplifications.
6725
6726 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
6727
6728         * method-to-ir.c (mono_spill_global_vars): Fix problems caused by reading
6729         ins->dreg which could be a hardware register, not a vreg.
6730
6731         * aot-compiler.c (emit_method_dwarf_info): Ditto.
6732         
6733         * mini.h (MonoCompile): Remove vreg_to_var_num array, it is no longer used.
6734         (struct MonoMethodVar): Add a vreg field, holding the vreg of variable.
6735
6736         * mini.c (mono_compile_create_var_for_vreg): Set var->vreg.
6737         
6738         * mini-amd64.c (mono_arch_output_basic_block): Avoid reading cfg->varinfo[..]
6739         ->dreg, that is not the vreg we are looking for.
6740
6741         * mini-amd64.h mini-x86.h: Enable MONO_ARCH_LIVENESS_OPS again.
6742
6743         * mini-x86.c (mono_arch_output_basic_block): Add support for LIVERANGE_START/
6744         LIVERANGE_END.
6745
6746         * method-to-ir.c (mono_spill_global_vars): Add an assert to help track down
6747         strange crashes.
6748
6749 2009-02-03  Zoltan Varga  <vargaz@gmail.com>
6750
6751         * mini-x86.c (mono_arch_emit_prolog): Emit unwind info.
6752
6753         * aot-compiler.c (emit_line_number_info): Fix line number emission when
6754         the line diff is 0.
6755
6756         * aot-compiler.c: Add xdebug support on x86.
6757
6758         * unwind.c: Add x86 support.
6759         
6760         * aot-compiler.c (emit_exception_debug_info): Control the emission of
6761         unwind info using a new MONO_ARCH_HAVE_XP_UNWIND define.
6762
6763         * mini.c (mini_method_compile): Ditto.
6764         
6765         * mini-amd64.c (mono_arch_allocate_vars): Avoid setting cfg->ret->dreg to
6766         the variable index.
6767
6768         * aot-compiler.c: Add emit_push_section ()/emit_pop_section () helper functions
6769         which mimic .push_section/.pop_section in GAS.
6770         
6771         * aot-compiler.c: Emit precise live range information for variables.
6772
6773         * mini-amd64.c (mono_arch_output_basic_block): Add OP_LIVERANGE_START/END.
6774
6775         * method-to-ir.c (mono_spill_global_vars): Compute the instructions marking
6776         the live ranges of variables, and emit OP_LIVERANGE_START/END opcodes for
6777         them.
6778
6779         * mini-ops.h: Add OP_LIVERANGE_START/END opcodes to mark
6780         the live ranges of variables.
6781
6782         * mini.h (struct MonoMethodVar): Add two fields containing the live range
6783         of the variable in terms of native offsets.
6784
6785 2009-02-03  Rodrigo Kumpera  <rkumpera@novell.com>
6786
6787         * arrays.cs: Test for Get/SetValue of array with negate lower bounds.
6788         
6789 2009-02-02  Mark Probst  <mark.probst@gmail.com>
6790
6791         Contributed under the terms of the MIT/X11 license by Steven
6792         Munroe <munroesj@us.ibm.com>.
6793
6794         * exceptions-ppc.c (restore_regs_from_context): Correct operand
6795         order (offset then base reg) for ppc_load_multiple_regs.
6796         (emit_save_saved_regs) Correct operand order for
6797         ppc_store_multiple_regs.
6798         (mono_arch_get_call_filter): Correct operand order for
6799         ppc_load_multiple_regs.
6800
6801         * mini-ppc.c (emit_memcpy): Fix operand order for
6802         ppc_load_reg_update and ppc_store_reg_update.
6803         (mono_arch_output_basic_block): Correct operand order for ppc_lha.
6804         (mono_arch_emit_epilog): Correct operand order for
6805         ppc_load_multiple_regs.
6806
6807         * tramp-ppc.c (mono_arch_create_trampoline_code): Correct operand
6808         order for ppc_store_multiple_regs and ppc_load_multiple_regs.
6809
6810 2009-02-02  Mark Probst  <mark.probst@gmail.com>
6811
6812         * cpu-ppc64.md: Fixed storer4_memindex length.
6813
6814 2009-02-02  Zoltan Varga  <vargaz@gmail.com>
6815
6816         * aot-compiler.c (emit_line_number_info): Optimize the size of the emitted
6817         line number info.
6818         
6819         * aot-compiler.c (emit_line_number_info): Optimize this.
6820
6821 2009-02-01  Zoltan Varga  <vargaz@gmail.com>
6822
6823         * aot-compiler.c: Disassemble tokens in the IL disassembly.
6824         
6825         * aot-compiler.c: Add debug info for methods without debug info by
6826         emitting an IL file and having the line number info referencing that file.
6827
6828         * aot-compiler.c: Optimize the size of the generated line number info.
6829
6830         * aot-compiler.c: Emit line number info in xdebug mode.
6831
6832         * aot-compiler.c (mono_save_xdebug_info): Receive a MonoCompile instead of a
6833         million arguments.
6834
6835 2009-01-31  Zoltan Varga  <vargaz@gmail.com>
6836
6837         * aot-compiler.c (emit_method_dwarf_info): Emit names for local variables.
6838
6839         * driver.c (mono_main): Enable debugging support automatically if XDEBUG
6840         is used.
6841
6842 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
6843
6844         * basic-calls.cs: Test for the weird crash found on arm.
6845         
6846 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
6847
6848         * cpu-arm.md: Increase the size of storer8_membase_reg and
6849         loadr8_membase_reg to 24 bytes to accomodate the extra add.
6850
6851         * mini-arm.c (mono_arch_output_basic_block): Under FPA, when emitting
6852         OP_STORER8_MEMBASE_REG and OP_LOADR8_MEMBASE_REG, add the original
6853         reg to LR otherwise we'll be loading/storing from just the offset.
6854
6855 2009-01-30  Miguel de Icaza  <miguel@novell.com>
6856
6857         Question: if we are storing gint32's inside the "*native_offset",
6858         should we change the signature to "gint32 *native_offset" to
6859         ensure that we do not have type definition problems?
6860         
6861         * mini-exceptions.c (ves_icall_get_frame_info): Cast the gint32 to
6862         an int * as this is what the other function expects, causes
6863         problems with Freescale's compiler that defined int32_t to be a
6864         long and makes int incompatible 
6865
6866 2009-01-30  Miguel de Icaza  <miguel@novell.com>
6867
6868         * Rename generic-sharing.c to mini-generic-sharing.c to avoid the
6869         filename conflict with bjam.
6870
6871 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
6872
6873         * cpu-arm.md: Increase the size of storer8_membase_reg to 20 bytes
6874         as it might use decomposed ops.
6875
6876 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
6877
6878         * jit-icalls.c (mono_imul_ovf): Fix one of the literals.
6879
6880         * mini.c (mini_init): Emulate mul.ovf opcodes if MONO_ARCH_EMULATE_MUL_OVF
6881         is defined.
6882
6883         * mini-arm.h (MONO_ARCH_EMULATE_MUL_OVF): New define.
6884
6885         * mini-arm.c (mono_arch_build_imt_thunk): Rewrite this to allow large vtable
6886         offsets.
6887
6888         * mini-arm.c (mono_arch_context_get_int_reg): Adapt this to the "clever"
6889         way registers are stored in MonoContext on arm.
6890
6891         * unwind.c: Rewrite the handling of the cached_info array to use hazard pointers
6892         instead of locking so mono_get_cached_unwind_info () becomes signal safe.
6893
6894         * mini.c (mini_init): Emuate OP_FCONV_TO_I when using soft float.
6895
6896         * mini-arm.c (emit_load_volatile_arguments): Avoid an unneccesary assert.
6897
6898         * mini.c (mini_init): Register mono_isfinite.
6899
6900         * jit-icalls.c (mono_isfinite): New jit icall.
6901
6902         * method-to-ir.c (mono_decompose_soft_float): Add support for OP_CKFINITE.
6903         
6904         * exceptions-arm.c (mono_arch_find_jit_info): When unwinding using the LMF,
6905         set esp to ARMREG_FP instead of R12, since R12 stores the value of sp for
6906         the parent frame.
6907
6908 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
6909
6910         * exceptions-arm.c (mono_arch_find_jit_info): The frame layout on arm have
6911         separate frame and stack pointers, so we must use FP to find the register
6912         spill area.
6913         The FP reg is retrieved from the MonoContext::regs array.
6914
6915 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
6916
6917         * mini-arm.c (mono_arch_output_basic_block): Emit two cond ops for OP_FBGE
6918         as FPA requires it.
6919
6920 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
6921
6922         * mini-arm.c (mono_arch_emit_setret): Emit OP_FMOVE for methods that
6923         return R4 and R8 when not running under softfloat.
6924
6925         Fixes basic-calls.exe
6926
6927 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
6928
6929         * mini-arm.c: Implement some overflow opcodes.
6930
6931 2009-01-29  Miguel de Icaza  <miguel@novell.com>
6932
6933         * ssa.c: handle another alloca.h
6934
6935         * mini-exceptions.c (mono_handle_native_sigsegv): Do not use
6936         PLATFORM_WIN32 for detecting if we have sigaction.   Instead use
6937         MONO_ARCH_USE_SIGACTION. 
6938
6939         * aot-runtime.c, mini-exceptions.c: Replace platform define with
6940         capability defines.
6941
6942         * method-to-ir.c (mono_method_to_ir): Type cast fix on some platforms.
6943
6944         * mini-ppc.h (MONO_ARCH_USE_SIGACTION): Do not define this for all
6945         PPC targets as sigaction does not exist on all platforms, define
6946         this on a per-platform basis.
6947
6948         Instead of erroring out if the platform is not defined, include
6949         mini-ppc-os.h, and expect that the OS specific setting provides
6950         the required information.   
6951
6952 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
6953
6954         * aot-compiler.c: Fix --enable-minimal=aot.
6955
6956 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
6957
6958         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Fix the
6959         previous change.
6960
6961 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
6962
6963         * exceptions-arm.c: Fix warnings.
6964
6965         * tramp-arm.c aot-compiler.c unwind.h unwind.c: Implement xdebug support for
6966         ARM.
6967
6968         * mini-x86.c: Fix --enable-minimal=jit build.
6969
6970         * mini.c: Really fix --enable-minimal=jit build.
6971         
6972         * mini.c (construct_object_context_for_method): Move this outside
6973         the DISABLE_JIT block to fix the --enable-minimal=jit build.
6974
6975         "Backported" of r124984 from 2.0 branch.
6976         
6977         * aot-compiler.c aot-runtime.c: Add full-aot support delegate BeginInvoke/EndInvoke.
6978
6979         "Backport" of r124977 + r124978 from 2.0 branch.
6980         
6981         * exceptions-arm.c (mono_arm_throw_exception_by_token): New helper function
6982         to avoid calling mono_exception_from_token () from the throw trampoline.
6983         (mono_arch_get_throw_exception_generic): call throw_exception_by_token
6984         for throwing corlib exceptions, this fixes full-aot support for corlib
6985         exceptions.
6986
6987         * aot-compiler.c (compile_method): Make a copy of cfg->locals to fix the build.
6988
6989 2009-01-29  Miguel de Icaza  <miguel@novell.com>
6990
6991         * mini-darwin.c, mini-windows.c, mini-posix.c: Commit the first
6992         part of the changes to split the code in mini into operating
6993         system specific files.
6994
6995         This patch was done by copying mini.c to the respective files to
6996         preserve SVN history.
6997
6998 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
6999
7000         * aot-compiler.c (emit_method_dwarf_info): Add minimal support for locals.
7001
7002 2009-01-28  Zoltan Varga  <vargaz@gmail.com>
7003
7004         * method-to-ir.c (mono_method_to_ir): Avoid generic sharing for calls made to
7005         remoting-invoke-with-check wrappers of shared methods.
7006
7007         * mini.c (print_jit_stats): Print out major gc count/time for libgc too.
7008
7009 2009-01-27  Mark Probst  <mark.probst@gmail.com>
7010
7011         * method-to-ir.c (emit_stloc_ir): Only apply the reg-reg move
7012         optimization if the top of stack is the last instruction in the
7013         bblock.  Otherwise it might have been used after its definition.
7014         Fixes #469742.
7015
7016 2009-01-27  Zoltan Varga  <vargaz@gmail.com>
7017
7018         * mini-trampolines.c (mono_magic_trampoline): Print out the caller
7019         method as well when get_vcall_slot () fails to match a code sequence.
7020
7021         * mini-arm.c: Fix the android build, which doesn't have
7022         __aeabi_read_tp.
7023
7024 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
7025
7026         * mini-s390x.c: Remove a stray declaration of emit_sig_cookie () to fix
7027         the s390x build.
7028
7029 2009-01-26  Rodrigo Kumpera  <rkumpera@novell.com>
7030
7031         * unwind.c (mono_unwind_cleanup): Don't crash if cached_info is NULL.
7032
7033 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
7034
7035         * mini.c (mini_method_compile): Save the unwind info generated by the JIT
7036         and put its id into jinfo->used_regs. This is only used on amd64,
7037         which is currently the only platform generating unwind info.
7038
7039         * exceptions-amd64.c: Instead of unwinding based on a register mask, use
7040         the dwarf unwinder. This is required to correctly handle async exceptions
7041         like thread abort and stack overflows, which can happen while a method
7042         is in the middle of its prolog or epilog.
7043         
7044         * aot-runtime.c (mono_aot_get_unwind_info): New helper function to obtain
7045         the unwind info belonging to an AOTed method.
7046
7047         * aot-compiler.c aot-runtime.c: Save/Load the unwind info emitted by the JIT
7048         into cfg->unwind_ops.
7049         
7050         * unwind.c (mono_unwind_frame): Use <= instead of < for the loop exit check.
7051
7052         * mini.c (mini_init): Call mono_unwind_init ().
7053         (mini_cleanup): Call mono_unwind_cleanup ().
7054
7055         * unwind.c: Add functions for managing a set of unwind info entries, allowing
7056         unwind info to be shared between methods.
7057
7058         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info for the registers
7059         saved in the LMF.
7060
7061         * exceptions-amd64.c (mono_arch_exceptions_init): Call 
7062         get_throw_pending_exception () to avoid initialization races.
7063
7064         * mini-exceptions.c (mono_exceptions_init): Call an arch specific
7065         mono_arch_exceptions_init () function.
7066
7067         * mini.h (MONO_INST_NEW): Remove duplicate setting of cil_code.
7068
7069 2009-01-25  Zoltan Varga  <vargaz@gmail.com>
7070
7071         * mini.c (mono_get_domain_intrinsic): New helper function.
7072         (mono_get_thread_intrinsic): Ditto.
7073
7074         * mini-arm.c mini-ia64.c: Use the new helper functions.
7075         
7076         * method-to-ir.c (mono_method_to_ir): Fix the comment for
7077         the last constrained_call change, since it is needed in the non-AOT
7078         case as well.
7079
7080         * mini-arm.c: Implement OP_TLS_GET on arm eabi linux.
7081         
7082         * mini-arm.c (mono_arch_emit_prolog): Add an inlined version of 
7083         mono_get_lmf_addr () on arm eabi linux.
7084
7085 2009-01-24  Zoltan Varga  <vargaz@gmail.com>
7086
7087         * mini-amd64.c (mono_arch_get_vcall_slot): Handle yet another
7088         code sequence which matches a non-virtual call.
7089
7090 2009-01-23  Mark Probst  <mark.probst@gmail.com>
7091
7092         * mini-ppc.c (mono_arch_context_get_int_reg): Allow access to the
7093         stack pointer (r1).
7094
7095 2009-01-23  Zoltan Varga  <vargaz@gmail.com>
7096
7097         * aot-compiler.c aot-runtime.c: Treat delegate-invoke wrappers similarly to
7098         runtime-invoke wrappers, since they are also shared based on signature.
7099
7100 2009-01-22  Mark Probst  <mark.probst@gmail.com>
7101
7102         * mini-exceptions.c (ves_icall_get_frame_info): Fetch the generic
7103         info from the (correct) context.
7104
7105 2009-01-22  Zoltan Varga  <vargaz@gmail.com>
7106
7107         * unwind.c (mono_unwind_frame): Remove a stray g_free ().
7108         
7109         * unwind.c (mono_unwind_frame): New function to unwind through a frame
7110         using dwarf unwinding info. Not yet used.
7111
7112         * mini.c (mini_init): When using xdebug, disable freeing of domains.
7113
7114 2009-01-21  Mark Probst  <mark.probst@gmail.com>
7115
7116         * mini-ppc.c (mono_arch_delegate_invoke_impl): Return function
7117         descriptors.
7118
7119         * mini-trampolines.c (mono_delegate_trampoline): Remove the PPC64
7120         special case and handle mono_arch_delegate_invoke_impl() returning
7121         function descriptors.
7122
7123         * tramp-ppc.c (mono_arch_create_trampoline_code): Delegate
7124         trampolines return function descriptors, too.
7125
7126 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
7127
7128         * method-to-ir.c (handle_alloc): Avoid generic instances in the
7129         out_of_line optimization.
7130
7131 2009-01-21  Martin Baulig  <martin@ximian.com>
7132
7133         * mini.h
7134         (MonoCompile): Added `disable_deadce_vars' to disable removing
7135         unused variables.
7136
7137         * mini.c
7138         (mini_method_compile): Set `cfg->disable_deadce_vars' when running
7139         inside the debugger.
7140
7141         * liveness.c (mono_analyze_liveness): Don't remove any unused
7142         variables if `cfg->disable_deadce_vars' is set.
7143
7144 2009-01-21  Mark Probst  <mark.probst@gmail.com>
7145
7146         * method-to-ir.c: Only apply exception constructor optimization if
7147         the the method actually belongs to an exception class.  Fixes
7148         #467456.
7149
7150 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
7151
7152         * mini-trampolines.c (mono_delegate_trampoline): Put back the previous
7153         change inside a #ifdef __mono_ppc64__.
7154
7155         * aot-compiler.c (compile_method): Remove the previous limitation.
7156
7157         * method-to-ir.c (method-to-ir.c): Add support for the constrained prefix
7158         on type variables in AOTed code.
7159         
7160         * aot-compiler.c (compile_method): Skip generic methods having type 
7161         constraints on their generic parameters.
7162
7163         * aot-compiler.c (compile_method): Check for methods which cannot be
7164         encoded inside RGCTX_FETCH patches as well.
7165
7166         * mini-exceptions.c (mono_print_thread_dump): Fix the windows
7167         build.
7168
7169 2009-01-20  Mark Probst  <mark.probst@gmail.com>
7170
7171         * method-to-ir.c: Force the vtable variable in shared generic code
7172         for the case that they might show up on a stack trace where they
7173         are needed.
7174
7175         * mini-exceptions.c: Save and use generic sharing info as well as
7176         IP in stack traces to resolve shared generic instantiations.
7177
7178 2009-01-20  Zoltan Varga  <vargaz@gmail.com>
7179
7180         * mini-trampolines.c (mono_delegate_trampoline): Revert the change which
7181         added a mono_get_addr_from_ftnptr () as it breaks the ia64 build.
7182
7183 2009-01-20  Mark Probst  <mark.probst@gmail.com>
7184
7185         * method-to-ir.c: Do generic sharing for array constructors.
7186
7187 2009-01-20  Rodrigo Kumpera  <rkumpera@novell.com>
7188
7189         * mini-exceptions.c (mono_print_thread_dump): Add information
7190         about the thread state using wapi_current_thread_desc.
7191
7192 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
7193
7194         * basic-simd.cs: Tests for the new constructors. 
7195
7196 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
7197
7198         * mini-ops.h: Added OP_EXPAND_*
7199
7200         * cpu-x86.md: Same.
7201
7202         * mini-x86.c (mono_arch_output_basic_block): Same.
7203         
7204         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for single element constructors.
7205
7206 2009-01-19  Zoltan Varga  <vargaz@gmail.com>
7207
7208         * iltests.il.in: Add a test for #467385.
7209
7210 2009-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
7211
7212         * mini.c (mini_thread_cleanup): Don't cleanup TLS storage if the
7213         thread been cleaned up is not the same currently in execution.
7214
7215         Fixes appdomain-unload crashes on windows, osx and linux variants
7216         without the __thread keyword.
7217
7218 2009-01-18  Zoltan Varga  <vargaz@gmail.com>
7219
7220         * mini-arm.c (mono_arch_flush_icache): Applied patch from Koushik Dutta
7221         (koush@koushikdutta.com). Implement this for android.
7222
7223         * helpers.c (mono_disassemble_code): Avoid assembler errors if the id
7224         begins with a digit.
7225
7226         * method-to-ir.c: Call mono_gc_get_write_barrier () instead of
7227         mono_marshal_get_write_barrier ().
7228
7229 2009-01-17  Rodrigo Kumpera  <rkumpera@novell.com>
7230
7231         * decompose.c (mono_decompose_vtype_opts): Fix the decomposition
7232         of OP_VCALL_* ops for 8 bytes vtypes on 32 bits archs and platorms
7233         that pass them on a register pair.
7234
7235         This affects windows, OSX and FreeBSD. The mono/tests/handleref.exe
7236         test was crashing due to that.
7237
7238 Fri Jan 16 15:21:21 CET 2009 Paolo Molaro <lupus@ximian.com>
7239
7240         * exceptions-ppc.c: tweaks from malc (OV-Soft) to fix the size of the
7241         trampoline code. Include ucontext.h only if available.
7242
7243 2009-01-15  Mark Probst  <mark.probst@gmail.com>
7244
7245         * mini.c: mono_domain_lookup_shared_generic() takes an open method
7246         and doesn't check whether it's sharable, like it was before
7247         removing the shared generics hash.  This brings IronPython
7248         performance back to what it was before that change.
7249
7250 2009-01-14  Mark Probst  <mark.probst@gmail.com>
7251
7252         * method-to-ir.c: Handle delegate invocation optimization earlier,
7253         otherwise it would be handled (much more slowly) by the
7254         final/sealed optimization.
7255
7256 2009-01-13  Zoltan Varga  <vargaz@gmail.com>
7257
7258         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes when the current thread or
7259         domain is not set. Fixes #465864.
7260
7261 2009-01-12  Mark Probst  <mark.probst@gmail.com>
7262
7263         * method-to-ir.c: Don't stop sharing of generic methods with catch
7264         clauses - we already handle those.
7265
7266 2009-01-12  Mark Probst  <mark.probst@gmail.com>
7267
7268         * mini.c, mini.h: lookup_generic_method() is now
7269         mono_domain_lookup_shared_generic() and uses the jit_code_hash,
7270         making the shared_generics_hash obsolete.
7271
7272 2009-01-12  Mark Probst  <mark.probst@gmail.com>
7273
7274         * mini-ppc.c, exceptions-ppc.c, cpu-ppc.md, cpu-ppc64.md: Don't
7275         use the red zone.  Make room on the stack first and then use it,
7276         not the other way around.
7277
7278 2009-01-12  Zoltan Varga  <vargaz@gmail.com>
7279
7280         * mini.c (mini_init): Call mono_xdebug_init ().
7281
7282         * aot-compiler.c (mono_xdebug_init): Make this non-static.
7283
7284 2009-01-11  Zoltan Varga  <vargaz@gmail.com>
7285
7286         * TestDriver.cs: Add an --iter argument to run tests multiple times.
7287
7288         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Emit debug info for
7289         trampolines.
7290
7291         * aot-compiler.c (mono_save_trampoline_xdebug_info): New function to emit
7292         debug+unwind info for trampolines.
7293
7294         * mini.c (mono_create_unwind_op): New helper function.
7295
7296         * unwind.h: Add macros for emitting unwind ops without a MonoCompile.
7297
7298 2009-01-10  Zoltan Varga  <vargaz@gmail.com>
7299
7300         * aot-compiler.c: Fix the build.
7301
7302 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
7303
7304         * Makefile.am: Update dtrace-prelink.sh location.
7305
7306 2009-01-08  Zoltan Varga  <vargaz@gmail.com>
7307
7308         * method-to-ir.c (mono_method_to_ir): Fix the check for the mscorlib ldstr 
7309         optimization. Fixes #464520.
7310
7311 2009-01-07  Bill Holmes  <billholmes54@gmail.com>
7312
7313         * mini-amd64.c : Adding code to save/restore non-volatile registers
7314            on Winx64.
7315
7316         * exceptions-amd64.c : Adding code to save/restore non-volatile 
7317           registers on Winx64.
7318
7319         Contributed under MIT/X11 license.
7320
7321 2009-01-07  Zoltan Varga  <vargaz@gmail.com>
7322
7323         * mini-arm.c (mono_arch_flush_icache): Use __GNUC_PREREQ instead of checking
7324         __GNUC_MINOR__ which can break when the major version changes.
7325
7326 2009-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
7327
7328         * basic-simd.cs: Add tests for usage of the sizeof opcode.
7329
7330 2009-01-07  Geoff Norton  <gnorton@novell.com>
7331
7332         * helpers.c:  Allow mono -v -v -v to work on darwin.
7333
7334 2009-01-05  Bill Holmes  <billholmes54@gmail.com>
7335
7336         * mini-amd64.c (mono_arch_get_vcall_slot) : Handle an additional instruction
7337           pattern. 
7338
7339         Contributed under MIT/X11 license.
7340
7341 2009-01-05  Zoltan Varga  <vargaz@gmail.com>
7342
7343         * mini.c (mono_allocate_stack_slots_full2): Use mono_class_from_mono_type
7344         instead of directly accessing type->data.klass. Fixes #462016.
7345         (mono_allocate_stack_slots_full): Ditto.
7346
7347         * mini-arm.c (mono_arch_flush_icache): Applied patch from Riku Voipio 
7348         <novell@kos.to>. Fix cache flush on kernels without OLDABI compat option.
7349
7350         * aot-compiler.c (emit_plt): Fix ARM build.
7351
7352 2009-01-04  Zoltan Varga  <vargaz@gmail.com>
7353
7354         * branch-opts.c (mono_if_conversion): Optimize this using ins->prev.
7355         
7356         * branch-opts.c (mono_if_conversion): Fix an assert introduced by the last
7357         change.
7358
7359         * branch-opts.c (mono_if_conversion): Use branch->inst_true_bb/inst_false_bb
7360         instead of bblock->out_bb [0]/[1], the two might not be the same. Fixes
7361         #463357.
7362
7363         * iltests.il.in: Add a regression test.
7364
7365 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
7366
7367         * mini-codegen.c (mono_print_ins_index): Pretty print XPHI and VPHI.
7368
7369 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
7370
7371         * basic-simd.cs: Add a regression test for #462457.
7372
7373 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
7374
7375         * mini-ops.h: Add a definition of XPHI.
7376
7377         * mini.h (MONO_IS_PHI): Make is aware of simd instrincs. 
7378
7379         * ssa.c (op_phi_to_move): Handle XPHI.
7380
7381         * ssa.c (mono_ssa_compute): Generate a XPHI for simd intrinsics instead of VPHI.
7382
7383         Fixes #462457
7384
7385 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
7386
7387         * method-to-ir.c (mono_emit_rgctx_calli): Fix a warning.
7388
7389 2008-12-31  Geoff Norton  <gnorton@novell.com>
7390
7391         * mini-ppc.c: The prolog size allocated can be too small for darwin
7392         ppc32 under certain circumstances.  Also fix a small logic bug.
7393
7394 2008-12-29  Zoltan Varga  <vargaz@gmail.com>
7395
7396         * mini.c (mono_jit_compile_method_inner): Avoid holding the domain lock
7397         while loading AOT methods.
7398
7399         * mini-exceptions.c: Check jit_tls->class_cast_from instead of class_cast_to
7400         since only the former is nulled out after a successful cast. This prevents
7401         crashes with rethrown exceptions when using --debug=casts.
7402
7403 2008-12-24  Mark Probst  <mark.probst@gmail.com>
7404
7405         * mini.h: New macro for checking whether a method is final,
7406         i.e. whether the method or its class is marked final.
7407
7408         * method-to-ir.c: Use the new macro for all final-checks
7409         consistently.  Fixes the crash in the System.ServiceModel tests.
7410
7411 2008-12-23  Mark Probst  <mark.probst@gmail.com>
7412
7413         * mini-exceptions.c (get_exception_catch_class): Corrected another
7414         overly strict assertion.
7415
7416 2008-12-23  Mark Probst  <mark.probst@gmail.com>
7417
7418         * mini-ppc.c (mono_arch_build_imt_thunk): Save and restore r11.
7419         Clobbering it is not allowed because the caller might use it as
7420         the vtable register in the interface call.
7421
7422 2008-12-19  Mark Probst  <mark.probst@gmail.com>
7423
7424         * mini-exceptions.c (get_exception_catch_class): Corrected an
7425         overly strict assertion.
7426
7427 2008-12-18  Mark Mason  <mmason@upwardaccess.com>
7428         
7429         * method-to-ir.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P or sizeof(gpointer) when appropriate.
7430
7431         * mini.h: Move typedef to mgreg_t up above include of mini-arch.h
7432
7433         * local-propogation.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P when appropriate
7434
7435         * cpu-mips.md: correct lengths for certain long_ opcodes.
7436
7437         * mini-mips.h: Only emulate long operations when SIZEOF_REGISTER==4. Add missing func decl.
7438
7439         * 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().
7440         
7441 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
7442
7443         * exceptions-mips.c (mono_arch_find_jit_info): decode sd instructions as well when looking for registers.
7444         
7445 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
7446         
7447         * mini-mips.c (mono_arch_output_basic_block): OP_JUMP_TABLE stores patch type in inst_c1, not inst_i1.
7448         
7449 2008-12-16  Rodrigo Kumpera  <rkumpera@novell.com>
7450
7451         * branch-opts.c (remove_block_if_useless): Even if BB0 falls through, don't add a br to the
7452         next basic block.
7453         
7454 2008-12-16  Mark Mason  <mmason@upwardaccess.com>
7455
7456         * 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
7457
7458         * 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)
7459         
7460 2008-12-15  Mark Mason  <mmason@upwardaccess.com>
7461         
7462         * trace.c (mono_trace_enter_method): correctly handle arguments smaller than the stack slot size on big endian systems.
7463         
7464 2008-12-14  Zoltan Varga  <vargaz@gmail.com>
7465
7466         * liveness.c (mono_analyze_liveness): Avoid eliminating the 'this' var in
7467         gshared code. Fixes #458947.
7468
7469         * generics.cs: Add a test.
7470
7471 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
7472         
7473         * method-to-ir.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
7474         
7475         * mini-mips.c: first pass n32 code generation.
7476
7477         * mini-mips.h: datatypes and defines for n32 support.
7478
7479         * exceptions-mips.c: first pass n32 code generation.
7480         
7481         * tramp-mips.c: first pass n32 code generation.
7482         
7483         * cpu-mips.md: add long_ opcodes.
7484         
7485 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
7486
7487         * liveness.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
7488
7489         * cfold.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
7490         
7491         * local-propogation.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
7492         
7493         * regalloc2.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
7494
7495         * mini.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
7496
7497         * mini-codegen.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
7498
7499         * ssa.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
7500
7501         * decompose.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
7502
7503         * helpers.c: for mips/n32, don't pass -mips32 to objdump
7504
7505 2008-12-12  Zoltan Varga  <vargaz@gmail.com>
7506
7507         * mini-arm.c tramp-arm.c: Fix calls to mono_arch_flush_icache.
7508
7509 2008-12-12  Andres G. Aragoneses  <aaragoneses@novell.com>
7510
7511         * driver.c: Sync --help-trace with man page (EXPR,EXPR).
7512
7513 2008-12-12  Mark Probst  <mark.probst@gmail.com>
7514
7515         * mini-ppc.h, exceptions-ppc.c, tramp-ppc.c: Create function
7516         descriptors for helper functions directly in front of the code.
7517
7518 2008-12-11  Mark Probst  <mark.probst@gmail.com>
7519
7520         * method-to-ir.c: Removed an unnecessary assertion.
7521
7522 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
7523
7524         * method-to-ir.c: Merge SGEN changes from the old JIT.
7525
7526 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
7527
7528         * driver.c (compile_all_methods_thread_main): Handle failure of
7529         mono_get_method ().
7530
7531 2008-12-10  Mark Probst  <mark.probst@gmail.com>
7532
7533         * mini-ppc.c: Merged with mini-ppc64.c.
7534
7535         * mini-ppc.h: Define PPC_MINIMAL_PARAM_AREA_SIZE on all targets.
7536
7537         * Makefile.am: Use the same sources for PPC and PPC64.
7538
7539         * mini-ppc64.c: Removed.
7540
7541 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
7542
7543         * branch-opts.c (remove_block_if_useless): Extract fall through detection
7544         code to mono_bb_is_fall_through.
7545         
7546         * branch-opts.c (mono_remove_critical_edges): Same.
7547
7548 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
7549
7550         * ssa.c (fold_ins): branch opt can kill dummy switch ops so we can't
7551         expect that an OP_BR_REG will be there.
7552
7553 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
7554
7555         * branch-opts.c (remove_block_if_useless): Use MONO_IS_BRANCH_OP instead of checking
7556         for the many branch ops. The original check miss OP_BR_REG.
7557
7558         Fixes #457574.
7559         
7560 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
7561
7562         * mini-mips.h mini-mips.c exceptions-mips.c tramp-mips.c: first round of changes necessary to eventually support n32.
7563
7564 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
7565
7566         * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
7567         while holding the aot lock.
7568
7569 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
7570
7571         * mini-mips.c (mono_arch_output_basic_block): use mfc1/lwc1 instead of mfc1d/ldc1
7572         
7573 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
7574
7575         * mini.c (mini_cleanup) : Adding a call to cominterop_release_all_rcws 
7576           to release all runtime callable wrappers held by the runtime.
7577
7578         Contributed under MIT/X11 license.
7579
7580 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
7581
7582         * tramp-amd64.c (mono_arch_create_trampoline_code_full) : Increase the code size for
7583           for Winx64.
7584
7585         Contributed under MIT/X11 license.
7586
7587 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
7588
7589         * aot-runtime.c (decode_exception_debug_info): Acquire the domain
7590         lock when calling mono_domain_alloc (). Hopefully fixes #415608.
7591
7592 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
7593
7594         * cpu-mips.md: fix ckfinite length
7595
7596         * mini-mips.c: at least recognize n32 ABI when used (not yet supported)
7597         (mono_arch_lowering_pass): cleanup, rearrange for clarity
7598         (mono_arch_output_basic_block): implement OP_CKFINITE, add more asserts
7599         
7600 2008-12-08  Mark Mason   <mmason@upwardaccess.com>
7601
7602         * exceptions-mips.c (mono_arch_find_jit_info): init new_ctx with ctx, dont' call setup_context.
7603         
7604 2008-12-08  Geoff Norton  <gnorton@novell.com>
7605
7606         * tramp-amd64.c: r120895 stores RAX, so we need to increase the window
7607         size by 8 bytes as well.
7608
7609 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
7610
7611         * basic-simd.cs: Fix method names for Vector16b.
7612         
7613 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
7614
7615         * basic-simd.cs: Fix method names for Vector16sb.
7616
7617 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
7618
7619         * basic-simd.cs: Fix method names for Vector8us.
7620         
7621 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
7622
7623         * basic-simd.cs: Fix method names for Vector8s.
7624         
7625 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
7626
7627         * basic-simd.cs: Fix method names for Vector4ui.
7628
7629 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
7630
7631         * basic-simd.cs: Fix method names for Vector2l.
7632
7633 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
7634
7635         * basic-simd.cs: Fix method names for Vector2d.
7636
7637 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
7638
7639         * simd-intrinsics.c (mono_emit_simd_intrinsics): Add support for intrinsics
7640         that are extension methods.
7641
7642 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
7643
7644         * basic-simd.cs: Fix method names for Vector4f.
7645
7646 2008-12-08  Zoltan Varga  <vargaz@gmail.com>
7647
7648         * mini-exceptions.c (mono_print_thread_dump): Mark threadpool threads
7649         as such. Fixes #456669.
7650
7651 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
7652
7653         * mini-mips.c (mono_arch_emit_call): narrow float arguments when passing as args.
7654         
7655 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
7656
7657         * mini-mips.c (mono_arch_lowering_pass): don't handle OP_ICONV_TO_R* or OP_R*CONST
7658         (mono_arch_emit_setret): use OP_MIPS_CVTSD to return SP floats
7659         (mono_arch_output_basic_block): simplify FP load/store, handle OP_MIPS_FBLT_UN
7660         (mips_adjust_stackframe): handle FP spills
7661                 
7662         * mini-ops.h: add mips_mtc1_s2
7663         
7664         * cpu-mips.md: add mips_mtc1_s2
7665         
7666 2008-12-07  Zoltan Varga  <vargaz@gmail.com>
7667
7668         * unwind.c: New file, move the unwind info encoding functions here from
7669         aot-compiler.c, so they could be used at runtime too.
7670
7671 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
7672
7673         * mini-mips.c (mono_arch_lowering_pass): handle OP_IMUL_IMM as well
7674         (mono_arch_output_basic_block): fix OP_LOCALLOC code generation
7675         
7676 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
7677
7678         * mini-mips.c: cleanup warnings
7679         (mono_arch_lowering_pass): handle OP_LOCALLOC_IMM
7680         (mips_adjust_stackframe): handle case of taking the address of stack locals
7681         
7682 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
7683
7684         * aot-compiler.c: Implement a few functions missing from the asm writer.
7685         (emit_method_code): Only write symbols for methods when using the bin
7686         writer, since the assembler can't deal with the characters in our method
7687         names.
7688
7689         * aot-compiler.c (is_plt_patch): ICALL_ADDR is also a plt patch.
7690
7691         * method-to-ir.c (mono_method_to_ir): Transform aotconst+calli into a direct
7692         call.
7693
7694         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Rework the code
7695         a bit to also restore %rax.
7696
7697 2008-12-05  Mark Probst  <mark.probst@gmail.com>
7698
7699         * mini-ppc.c: Some simple merges from mini-ppc64.c.
7700
7701 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
7702
7703         * ssa.c (mono_ssa_compute): Only add an implicit reference at start for
7704         arguments.
7705
7706 2008-12-05  Mark Probst  <mark.probst@gmail.com>
7707
7708         * exceptions-ppc.c: Merged with exceptions-ppc64.c.
7709
7710         * mini-ppc.c, mini-ppc.h: Remove PPC_STACK_ALIGNMENT and use
7711         MONO_ARCH_FRAME_ALIGNMENT.  Struct for PPC64 function descriptors.
7712
7713         * exceptions-ppc64.c: Removed.
7714
7715         * Makefile.am: Use exceptions-ppc.c instead of exceptions-ppc64.c.
7716
7717 2008-12-05  Mark Probst  <mark.probst@gmail.com>
7718
7719         * tramp-ppc.c, mini-ppc.c, mini-ppc.h: Merged tramp-ppc.c with
7720         tramp-ppc64.c.
7721
7722         * Makefile.am: Use tramp-ppc.c instead of tramp-ppc64.c.
7723
7724         * tramp-ppc64.c: Removed.
7725
7726 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
7727
7728         * aot-compiler.c (add_generic_instances): Skip non-generic classes in
7729         the TYPESPEC table.
7730
7731 2008-12-05  Mark Probst  <mark.probst@gmail.com>
7732
7733         * mini-ppc.h: Merged mini-ppc64.h with mini-ppc.h.
7734
7735         * exceptions-ppc64.c, tramp-ppc64.c, mini-arch.h, Makefile.am: Use
7736         mini-ppc.h instead of mini-ppc64.h.
7737
7738         * mini-ppc64.h: Removed.
7739
7740 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
7741
7742         * mini-mips.c: introduce USE_LDC_SDC: use ldc1/sdc1 to load/store doubles, disabled by default
7743         
7744         * mini-mips.c (mono_arch_emit_outarg_vt): fix offset calculation for memcpy in structure passing.
7745         
7746 2008-12-05  Mark Probst  <mark.probst@gmail.com>
7747
7748         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c:
7749         Removed FIRST/LAST_[GF]REG macros, to make merging PPC64 with PPC
7750         code easier.
7751
7752 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
7753
7754         * basic-simd.cs: Tests for operator == and != on  Vector8us and Vector16b.
7755
7756 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
7757
7758         * simd-intrinsics.c: Add support for operator == and != to Vector8(u)s and Vector16(s)b.
7759
7760 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
7761
7762         * basic-simd.cs: Tests for operator == and != on Vector4f.
7763
7764 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
7765
7766         * simd-intrinsics.c (simd_intrinsic_emit_equality): Adapt to support Vector4f.
7767
7768         * simd-intrinsics.c: Kill useless enum.
7769
7770 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
7771
7772         * cpu-mips.md: add long_conv_to_ovf_i4_2
7773         * mini-mips.c: update/add various _OVF_ opcodes to fix test failures
7774
7775 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
7776
7777         * mini-mips.c: ifdef protect automatic promotions of R4 to R8.
7778         
7779         * mini-mips.c (mono_arch_emit_setret): handle R4 case with FCONV_TO_R4 instead of FMOVE
7780
7781 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
7782
7783         * mini-mips.c (mono_arch_output_basic_block): fix codegen for OP_OR_IMM/OP_IOR_IMM
7784         
7785 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
7786
7787         * basic-simd.cs: Add tests for new methods.
7788
7789 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
7790
7791         * simd-intrinsics.c: Add support for operator == and !=
7792         on Vector4(u)i.
7793
7794         * simd-methods.h: Add SN_op_Inequality and SN_op_Equality.
7795
7796 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
7797
7798         * simd-intrinsics.c: Remove ExtractByteMask intrinsics.
7799
7800 2008-12-04  Zoltan Varga  <vargaz@gmail.com>
7801
7802         * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
7803
7804         * mini.c (mono_resolve_patch_target): Allow pinvoke methods in 
7805         MONO_PATCH_INFO_ICALL_ADDR.
7806
7807         * aot-runtime.c (MonoAotFileInfo): Correct order of fields.
7808
7809         * aot-compiler.c: Resurrect full-aot support.
7810
7811 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
7812
7813         * mini-mips.c (mono_arch_lowering_pass): handle OP_COMPARE and OP_ICOMPARE
7814         
7815 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
7816
7817         * mini-mips.c (mono_arch_output_basic_block): fix OP_IREM_UN code generation
7818         
7819 2008-12-03  Rodrigo Kumpera  <rkumpera@novell.com>
7820
7821         * basic-simd.cs: Fix tests to work under ppc.
7822         Remove tests for methods that will be removed.
7823
7824 2008-12-03  Mark Probst  <mark.probst@gmail.com>
7825
7826         * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
7827         generic type (via a typedef or typeref) correctly.
7828
7829 2008-12-03  Zoltan Varga  <vargaz@gmail.com>
7830
7831         * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
7832         diagnose an assertion failure.
7833
7834 2008-12-02  Mark Probst  <mark.probst@gmail.com>
7835
7836         * tramp-ppc64.c (mono_arch_create_rgctx_lazy_fetch_trampoline):
7837         Fix trampoline size.
7838
7839         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: A few floating point
7840         conversion opcodes are implemented natively instead via emulation.
7841
7842 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
7843
7844         * cpu-mips.md: remove mips_xori
7845
7846         * mini-ops.h:  remove mips_xori
7847
7848         * mini-mips.h: replace OP_MIPS_XORI with OP_IXOR
7849
7850         * mini-mips.c (mono_arch_decompose_long_opts): Add ladd_imm, lsub, lsub_imm, lneg, lsub_ovf, lsub_ovf_un.
7851         
7852         * mini-mips.c (mono_arch_lowering_pass, mono_arch_output_basic_block): fix IXOR handling
7853         
7854 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
7855
7856         * cpu-mips.md: fix instruction lengths.
7857
7858         * mini-mips.h: define MONO_ARCH_NO_IOV_CHECK
7859
7860         * mini-mips.c: move most instruction rewriting into decompose_ops. Implement conditional branches and exceptions. Fix jump table patch handling. Implement add/sub OVF.
7861
7862         * mini-ops.h: fix slti / sltiu op profiles.
7863         
7864 2008-12-02  Martin Baulig  <martin@ximian.com>
7865
7866         * method-to-ir.c (mono_method_to_ir): Disable debugging
7867         information for the init locals block to make the debugger stop
7868         after all locals have been initalized.
7869
7870 2008-12-02  Martin Baulig  <martin@ximian.com>
7871
7872         * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
7873         running inside the debugger.
7874
7875 2008-12-01  Zoltan Varga  <vargaz@gmail.com>
7876
7877         * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
7878         is enabled.
7879
7880         * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the 
7881         alu->alu imm optimization which only shows if deadce is disabled.
7882
7883         * aot-compiler.c: Rename the function names for the binary and asm writers
7884         so they can coexist in the same process. Rework the xdebug code to use the
7885         asm writer. This avoids the need to call into the runtime to dump the
7886         debugging info. Add more debugging info for types.
7887
7888         * mini-<ARCH>.h: Kill MONO_ARCH_HAVE_NORMALIZE_OPCODES define.
7889
7890         * genmdesc.c genmdesc.pl mini.h: Don't put the CEE_ opcodes into the
7891         cpu description tables, they can't occur in cpu-<ARCH>.md.
7892
7893         * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
7894         the stack in CEE_LDFLDA. Fixes #450542.
7895
7896         * generics.cs: Add a new test.
7897
7898 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
7899
7900         * mini-ops.h: updated MIPS opcodes
7901         * mini-mips.c: decompose long opts
7902         * mini-mips.h: decompose long opts
7903         
7904 2008-11-29  Mark Mason   <mmason@upwardaccess.com>
7905
7906         * cpu-mips.md: fix length on int_rem_un
7907         * mini-mips.c (mips_stackframe_adjust): fix insertion of spillvars region in MIPS stackframes.
7908         
7909 2008-11-29  Zoltan Varga  <vargaz@gmail.com>
7910
7911         * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
7912
7913         * mini-codegen.c (mono_print_ins_index): Handle OP_VOIDCALL_MEMBASE.
7914
7915 2008-11-29  Martin Baulig  <martin@ximian.com>
7916
7917         * mini-exceptions.c (mono_handle_native_sigsegv): Check
7918         mono_debug_using_mono_debugger() in addition to the
7919         `no_gdb_backtrace' flag in the `MonoDebugOptions'.
7920
7921 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
7922
7923         * mini-ops.h: updated more MIPS opcodes
7924         * mini-mips.c: FP compare/branch working again, clean up last of CEE_ -> OP_ mappings
7925         * cpu-mips.md: Added MIPS versions of new FP compare/branch opcodes.
7926         
7927 2008-11-28  Mark Probst  <mark.probst@gmail.com>
7928
7929         * mini-ppc64.c: Patch the RGCTX fetch trampoline correctly.
7930
7931 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
7932
7933         * mini-mips.c (mono_arch_emit_call): adding missing conversion to fp single when passing in integer arg register.
7934         * mini-mips.c (mips_adjust_stackframe): compensate for spill-down logic.
7935         * mini-ops.h: correct selected mips opcode entries
7936         
7937 2008-11-28  Mark Probst  <mark.probst@gmail.com>
7938
7939         * mini-ppc64.c, mini-ppc64.h: Enable generalized IMT thunks and
7940         make them work.
7941
7942 2008-11-28  Mark Probst  <mark.probst@gmail.com>
7943
7944         * mini-ppc64.h, tramp-ppc64.c: Make generic code sharing work.
7945
7946 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
7947
7948         * method-to-ir.c, mini-trampolines.c: protect IMG code with #ifdef MONO_ARCH_HAVE_IMT to fix compile errors.
7949         * mini-mips.c: Fixup stackframe assignments after allocation of spillvars.
7950         * mini-mips.h: disable IMT
7951         * tramp-mips.c (mono_arch_get_vcall_slot): fix offset extraction
7952         
7953 2008-11-28  Mark Probst  <mark.probst@gmail.com>
7954
7955         * mini-ppc64.c, mini-ppc64.h: Don't emulate long ops.
7956
7957 2008-11-28  Mark Probst  <mark.probst@gmail.com>
7958
7959         * mini-ppc64.c, exceptions-ppc64.c: Several fixes.
7960
7961 2008-11-28  Zoltan Varga  <vargaz@gmail.com>
7962
7963         * method-to-ir.c (handle_isinst): Use PCONST instead of ICONST for
7964         consistency.
7965
7966 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
7967
7968         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
7969         for Set/GetVector aligned versions.
7970
7971 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
7972
7973         * basic-simd.cs: Add tests for Get/SetVector.
7974
7975 2008-11-27  Mark Probst  <mark.probst@gmail.com>
7976
7977         * mini.c: Removed g_slist_append_mempool().  Now in
7978         metadata/mempool.c.
7979
7980 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
7981
7982         * simd-intrinsics.c (mono_emit_vector_ldelema): Extract the element
7983         size properly and make the bounds check optional.
7984
7985         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
7986         for SetVector and IsAligned.
7987
7988 2008-11-27  Zoltan Varga  <vargaz@gmail.com>
7989
7990         * mini.c: Remove unused mono_normalize_opcodes () function.
7991
7992 2008-11-26  Mark Probst  <mark.probst@gmail.com>
7993
7994         * method-to-ir.c (mini_emit_inst_for_method): Small fix: we're
7995         using the new atomic add ops now.
7996
7997         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Implemented atomic
7998         add.
7999
8000 2008-11-26  Mark Probst  <mark.probst@gmail.com>
8001
8002         * mini-ppc64.c: Several fixes.
8003
8004 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
8005
8006         * cpu-mips.md: added jump_table
8007         * mini-mips.c: added jump_table. Eliminate compare-imm when lowering. Remove dead function.             
8008
8009 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
8010
8011         * mini-mips.c, mini-mips.h, tramp-mips.c, cpu-mips.md: Initial upgrade of MIPS port to new IR.
8012
8013 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
8014
8015         * mini-ops.h: corrected a handful of MIPS opcodes.
8016
8017 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
8018
8019         * aot-compiler.c: MIPS to use ELF writer
8020
8021 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
8022
8023         * mini-codegen.c: remove MIPS specific assert.
8024
8025 2008-11-25  Mark Probst  <mark.probst@gmail.com>
8026
8027         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Several
8028         fixes.  PPC64 now passes most of the runtime regressions.
8029
8030 2008-11-24  Zoltan Varga  <vargaz@gmail.com>
8031
8032         * regalloc2.c: Distinguish between use/def positions. Optimize the creation of
8033         volatile intervals a bit.
8034
8035 2008-11-24  Mark Probst  <mark.probst@gmail.com>
8036
8037         * basic-long.cs: New test case.
8038
8039 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
8040
8041         * mini.c (mini_method_compile): Disable globalra for large methods for 
8042         now.
8043
8044         * regalloc2.c (order_moves): Add fp support.
8045
8046         * branch-opts.c (mono_remove_critical_edges): Split non-critical edges whose
8047         source bblock ends with an OP_BR_REG.
8048
8049         * ratests.cs: Add a new test.
8050
8051 2008-11-23  Mark Probst  <mark.probst@gmail.com>
8052
8053         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c: Disable generic code
8054         sharing.  PPC64 now passes generics.exe.
8055
8056 2008-11-23  Mark Probst  <mark.probst@gmail.com>
8057
8058         * mini-ppc64.c: Several fixes.  PPC64 now runs iltests.exe.
8059
8060 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
8061
8062         * exceptions-x86.c (mono_arch_find_jit_info): Avoid reading uninitialized
8063         memory when mono_jit_info_table_find () can't find the method in the
8064         LMF case.
8065
8066         * aot-compiler.c (mono_save_xdebug_info): Emit complete debug info for
8067         AOTed code too.
8068         
8069         * aot-compiler.c (mono_save_xdebug_info): Make this work with the assembly
8070         writer too.
8071
8072 2008-11-23  Mark Probst  <mark.probst@gmail.com>
8073
8074         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, cpu-ppc64.md:
8075         Several fixes.  PPC64 now runs exceptions.exe and
8076         devirtualization.exe.
8077
8078 2008-11-22  Mark Probst  <mark.probst@gmail.com>
8079
8080         * mini-ppc64.c, tramp-ppc64.c: Small fixes.  PPC64 now runs
8081         arrays.exe and basic-math.exe.
8082
8083 2008-11-22  Mark Probst  <mark.probst@gmail.com>
8084
8085         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c,
8086         cpu-ppc64.md: Several fixes.  PPC64 now runs objects.exe.
8087
8088 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
8089
8090         * simd-intrinsics.c: Add support ArrayExtension intrinsics.
8091
8092 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
8093
8094         * method-to-ir.c: Move bounds checking macros to ir-emit.h
8095
8096         * ir-emit.h: Move macros from method-to-ir.c to here.
8097
8098 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
8099
8100         * mini-ops.h: Correct the long simd ops to use LREG.
8101
8102 2008-11-21  Zoltan Varga  <vargaz@gmail.com>
8103
8104         * mini-ops.h: Correct the dreg type of OP_LOADI8_MEMBASE.
8105         
8106         * mini-ops.h: Correct the dreg type of a few long opcodes.
8107
8108         * mini-amd64.h: Applied patch from Mihai Chelaru <kefren@ngnetworks.ro>.
8109         Add netbsd support.
8110
8111 Fri Nov 21 12:52:23 CET 2008 Paolo Molaro <lupus@ximian.com>
8112
8113         * mini-ppc.c: remove negative stack references in epilog
8114         for platforms that don't support the red zone.
8115
8116 2008-11-21  Mark Probst  <mark.probst@gmail.com>
8117
8118         * mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved floating
8119         point regs.  Now PPC64 passes basic-calls.exe.
8120
8121 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
8122
8123         * basic-simd.cs: Add tests for accessors of Vector2l.
8124
8125 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
8126
8127         * mini-ops.h: Added OP_INSERTX_I8_SLOW,.
8128
8129         * mini-x86.c (mono_arch_decompose_long_opts): Decompose OP_INSERTX_I8_SLOW.
8130         
8131         * simd-intrinsics.c: Add support for Vector2l and Vector2ul.
8132
8133 2008-11-21  Mark Probst  <mark.probst@gmail.com>
8134
8135         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes.  Now
8136         PPC64 passes basic-long.exe.
8137
8138 2008-11-20  Mark Probst  <mark.probst@gmail.com>
8139
8140         * decompose.c: Decompose carry and overflow add on PPC64 like on
8141         other 64 bit archs.  Don't decompose sub at all on PPC64.
8142
8143         * mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c, cpu-ppc64.md:
8144         Several fixes and new opcodes.  Now PPC64 runs (but doesn't pass)
8145         basic-long.exe.
8146
8147 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
8148
8149         * basic-simd.cs: Add tests for accessors of Vector2d.
8150
8151 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
8152
8153         * mini-ops.h: Added OP_INSERTX_R8_SLOW,.
8154
8155         * cpu-x86.md: Same.
8156
8157         * mini-x86.c (mono_arch_output_basic_block): Same.
8158         
8159         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector2d.
8160
8161 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
8162
8163         * basic-simd.cs: Add tests for accessors of Vector4f.
8164
8165 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
8166
8167         * mini-ops.h: Added OP_INSERTX_R4_SLOW,.
8168
8169         * cpu-x86.md: Same.
8170
8171         * mini-x86.c (mono_arch_output_basic_block): Same.
8172         
8173         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4f.
8174
8175 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
8176
8177         * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
8178
8179 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
8180
8181         * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
8182
8183         * cpu-x86.md: Same.
8184
8185         * mini-x86.c (mono_arch_output_basic_block): Same.
8186         
8187         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
8188
8189 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
8190
8191         * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
8192
8193 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
8194
8195         * simd-intrinsics.c: Enable setters for Vector16sb.
8196
8197 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
8198
8199         * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
8200
8201         * cpu-x86.md: Same.
8202
8203         * mini-x86.c (mono_arch_output_basic_block): Same.
8204         
8205         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
8206
8207 2008-11-19  Rodrigo Kumpera  <rkumpera@novell.com>
8208
8209         * simd-intrinsics.c: Implement setter for Vector8us.
8210
8211 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
8212
8213         * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
8214         for dead variables.
8215
8216 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
8217
8218         * mini-ppc.c: remove references to the red zone in the prolog
8219         (for systems that don't support it).
8220
8221 2008-11-19  Mark Probst  <mark.probst@gmail.com>
8222
8223         * cpu-ppc64.md: Fixed a few instruction lengths.
8224
8225         * mini-ppc64.c: Don't emit SETLRET.  PPC64 passes basic-float.exe,
8226         now.
8227
8228 2008-11-19  Mark Probst  <mark.probst@gmail.com>
8229
8230         * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes.  PPC64 passes
8231         basic.exe now.
8232
8233 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
8234
8235         * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
8236
8237 2008-11-18  Rodrigo Kumpera  <rkumpera@novell.com>
8238
8239         * mini-ops.h: Added OP_INSERT_I2.
8240
8241         * cpu-x86.md: Same.
8242
8243         * mini-x86.c (mono_arch_output_basic_block): Same.
8244         
8245         * simd-intrinsics.c: Implement setter for Vector8s.
8246
8247         * simd-methods.h: Add the names of get setters of Vector8s.
8248
8249 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
8250
8251         * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
8252         
8253         * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
8254         parameters.
8255
8256         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
8257
8258 2008-11-18  Mark Probst  <mark.probst@gmail.com>
8259
8260         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
8261         for PPC64.  An empty program runs now.
8262
8263 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
8264
8265         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
8266
8267         * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
8268         a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
8269         info for JITted code is emitted into a shared library, loadable into gdb.
8270
8271 2008-11-18  Mark Probst  <mark.probst@gmail.com>
8272
8273         * Makefile.am: Changes to build PPC64.
8274
8275         * mini-arch.h: Include mini-ppc64.h on PPC64.
8276
8277 2008-11-18  Mark Probst  <mark.probst@gmail.com>
8278
8279         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
8280         in PPC code up to r119147.
8281
8282 2008-11-18  Mark Probst  <mark.probst@gmail.com>
8283
8284         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
8285         cpu-ppc64.md: Changes for PPC64.
8286
8287         Based on code submitted by andreas.faerber@web.de at
8288         https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
8289         X11/MIT license.
8290
8291 2008-11-18  Mark Probst  <mark.probst@gmail.com>
8292
8293         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
8294         cpu-ppc64.md: Copied from the corresponding PPC files from
8295         r118846.
8296
8297 2008-11-18  Scott Peterson  <lunchtimemama@novell.com>
8298
8299         * mini-ops.h: Added OP_ROUND.
8300
8301         * cpu-x86.md: Added round.
8302
8303         * mini-x86.c: Added support for intrinsicing Math.Round (double).
8304
8305         * basic-math.cs: Added test_0_round to test rounding.
8306
8307         Contributed under MIT/X11 license.
8308
8309 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
8310
8311         * aot-compiler.c : Fix the Winx64 build.
8312
8313         Contributed under MIT/X11 license.
8314
8315 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
8316
8317         * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
8318         in OP_EXTRACT_R8 to avoid possible stack corruption.
8319
8320 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
8321
8322         * mini-ops.h: Added OP_EXTRACT_R8/I8.
8323
8324         * cpu-x86.md: Added extract_r8.
8325
8326         * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
8327         
8328         * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
8329         a couple of OP_EXTRACT_I4.
8330
8331         * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
8332
8333         * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
8334
8335 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
8336
8337         * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
8338         and not 4.1. 
8339
8340 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
8341
8342         * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
8343         trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
8344
8345         * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
8346         are not needed any more.
8347
8348         * mini.h: Remove the unused INS_LIST macros.
8349
8350         * mini.c (mini_method_compile): Remove a disable globalra case which is no
8351         longer needed.
8352
8353         * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
8354         ir-emit.h.
8355
8356         * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
8357         mono_alloc_ireg () instead.
8358
8359         * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
8360         macros.
8361
8362         * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
8363         on amd64.
8364
8365         * aot-runtime.c (load_aot_module): Disable AOT when running under
8366         CAS.
8367
8368         * mini-amd64.h: Change the monitor fastpath defines to check for
8369         !PLATFORM_WIN32 so they work on *bsd too.
8370
8371         * mini.h mini.c mini-hhpa.c: Remove more unused code.
8372
8373         * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
8374
8375         * mini.h (MonoCompile): Remove new_ir flag.
8376
8377         * regalloc.h regalloc.c: Remove unused code.
8378
8379         * cpu-*.md: Remove more unused opcodes.
8380
8381         * simple-cee-ops.h simple-mini-ops.h: Removed.
8382
8383         * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
8384         
8385 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
8386
8387         * aliasing.h: Removed.
8388
8389         * *.c: Remove references to aliasing.h and inssel.h.
8390
8391         * mini.c: Remove additional unused functions.
8392
8393         * mini-ops.h cpu-*.md: Remove unused opcodes.
8394
8395 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
8396
8397         Remove the old JIT code.
8398
8399         * inssel*.brg: Removed.
8400
8401         * ssa.c abcremoval.c aliasing.c: Removed.
8402
8403         * ssa2.c: Renamed to ssa.c.
8404
8405         * abcremoval2.c: Renamed to abcremoval.c.
8406
8407         * *.c: Removed all !cfg->new_ir code.
8408
8409         * mini-<ARCH>.c: Removed mono_arch_call_opcode (), 
8410         mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
8411
8412         * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
8413         
8414 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
8415
8416         * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
8417         to simplify the code and cut back on the number of global symbols in the AOT
8418         file.
8419         
8420         * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
8421
8422 2008-11-15  Zoltan Varga  <vargaz@gmail.com>
8423
8424         * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
8425         with the got/got_info tables.
8426
8427         * mini.h: Bump AOT file format version.
8428         
8429         * unwind.h: New file, contains definitions for stack unwinding.
8430
8431         * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
8432         to cfg->unwind_ops.
8433         
8434         * aot-compiler.c: Generalize the emitting of unwind information to use the
8435         information in cfg->unwind_ops.
8436
8437         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
8438
8439         * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
8440         AOT method frames. Enable writing symbols for methods by default.
8441
8442 2008-11-14  Rodrigo Kumpera  <rkumpera@novell.com>
8443
8444         * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
8445         and make it work with vectors of element sizes 1, 2 and 4.
8446
8447         * simd-intrinsics.c: Enable getter for all vectors with element size
8448         1, 2 or 4.
8449
8450         * simd-methods.h: Add the names of other getters.
8451
8452         * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
8453
8454         * cpu-x86.md: Same.
8455
8456         * mini-x86.c: Same.
8457
8458 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
8459
8460         * mini-ppc.h: portability fix.
8461
8462 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
8463
8464         * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
8465         buggy and will overwrite it.
8466
8467 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
8468
8469         * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
8470         Use it to emit local symbols for all methods so AOTed methods show up with
8471         their full name in gdb/valgrind output.
8472
8473 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
8474
8475         * mini-ppc.c: portability fixes.
8476
8477 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
8478
8479         * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
8480         entries out of the if (!generic_shared...) code so it is always done.
8481         (mono_class_init_trampoline): Do the patching when running under valgrind
8482         too, newer versions of valgrind have no problems with it.
8483
8484 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
8485
8486         * aot-compiler.c (emit_writeout): Rework this to make it easier to add
8487         further sections.
8488
8489 2008-11-13  Mark Probst  <mark.probst@gmail.com>
8490
8491         * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
8492         filters.
8493
8494 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
8495
8496         * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui. 
8497
8498 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
8499
8500         * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
8501
8502         * cpu-x86.md: Same.
8503
8504         * mini-x86.c: Same.
8505
8506         * simd-intrinsics.c: Same.
8507
8508 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
8509
8510         * simd-intrinsics.c: Enable constructor intrinsics for all types.
8511
8512 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
8513
8514         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
8515         to work with more Vector types.
8516
8517 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
8518
8519         * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
8520         store the elemens directly instead of using and intermediate.
8521
8522 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
8523
8524         * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
8525
8526         * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
8527         to preserve %eax for aot plt trampolines.
8528
8529         * aot-compiler.c (compile_method): Don't skip synchronized methods.
8530         (encode_method_ref): Flag synchronized methods so they won't go through
8531         the AOT trampoline.
8532
8533         * aot-compiler.c: Additional work to support AOTing synchronized methods/
8534         wrappers.
8535
8536         * cpu-ia64.md (jmp): Increase max length.
8537
8538 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
8539
8540         * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
8541         open generic classes.
8542
8543         * aot-compiler.c: Enable the ELF writer on ELF platforms.
8544
8545         * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
8546         box+brtrue optimization since it causes test failures on x86.
8547
8548 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
8549
8550         * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
8551
8552         * cpu-x86.md: Same.
8553
8554         * mini-x86.c: Same.
8555
8556         * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
8557         for simd ctor values. 
8558
8559         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
8560         instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
8561
8562 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
8563
8564         * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
8565         LogicalRightShift.
8566
8567         * simd-instrincs.c: Same.
8568
8569         * basic-simd.cs: Same.
8570
8571 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
8572
8573         * ratests.cs: Add more tests.
8574
8575         * regalloc2.c (add_spill_code): Handle more corner cases.
8576
8577 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
8578
8579         * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
8580         (update_liveness): Avoid holes in the liveness ranges of hregs if they are
8581         both the source an destination of an instruction.
8582
8583 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
8584
8585         * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
8586         wapihandles.c: more portability changes.
8587
8588 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
8589
8590         * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
8591         * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
8592         safe to execute in a signal handler and the kernel provides better
8593         the info in /proc/self/smaps. Avoid the assert on sigaction during
8594         cleanup.
8595
8596 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
8597
8598         * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
8599         do the bblock linking hack if it is actually needed.
8600
8601         * Makefile.am (patch-libtool): New helper target to patch libtool to speed
8602         up linking.
8603
8604         * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
8605         crash problem is fixed.
8606
8607         * branch-opts.c (mono_remove_critical_edges): Link up newly added
8608         bblocks.
8609
8610         * mini.c (mini_method_compile): Compute unreachable bblocks properly even
8611         for catch clauses.
8612         (mini_method_compile): Set the starting value of next_vreg to 
8613         MAX_IREGS + MAX_FREGS when using globalra.
8614
8615         * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
8616         filter clauses with BB_EXCEPTION_HANDLER.
8617
8618         * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
8619
8620 2008-11-10  Mark Probst  <mark.probst@gmail.com>
8621
8622         * mini-x86.c (mono_arch_get_argument_info): Don't align argument
8623         space for stdcall.  Fixes regressions on Win32.
8624
8625 2008-11-10  Zoltan Varga  <vargaz@gmail.com>
8626
8627         * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
8628         bblocks.
8629         (linear_scan): Remove an assert which doesn't seem to be needed.
8630
8631         * local-propagation.c (mono_local_deadce): Avoid a call to
8632         MONO_DELETE_INS which would screw up the instruction linking.
8633
8634         * mini.c (mono_decompose_op_imm): Make this work with globalra.
8635
8636         * regalloc2.c: Upgrade to work the current JIT code.
8637
8638 2008-11-09  Zoltan Varga  <vargaz@gmail.com>
8639
8640         * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
8641         case.
8642
8643         * aot-runtime.c: Remove some dead code.
8644
8645         * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
8646         consistency.
8647         (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
8648
8649         * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
8650         trampolines using sscanf since atoi doesn't work on large unsigned values.
8651
8652         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): 
8653         Initialize code_size.
8654
8655 2008-11-08  Mark Probst  <mark.probst@gmail.com>
8656
8657         * method-to-ir.c (mini_emit_inst_for_method): Make
8658         Interlocked.CompareExchange work for Int arguments on 32 bit
8659         archs, as well.
8660
8661 2008-11-07  Mark Probst  <mark.probst@gmail.com>
8662
8663         * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
8664
8665 2008-11-06  Bill Holmes  <billholmes54@gmail.com>
8666
8667         * main.c Fix MSVC build.
8668
8669         Contributed under MIT/X11 license.
8670
8671 2008-11-06  Mark Probst  <mark.probst@gmail.com>
8672
8673         * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
8674         alignment larger than 8 bytes are aligned correctly, too.
8675
8676         * mini.c: Honor the min_align field of MonoClass when laying out
8677         the stack.
8678
8679 2008-11-06  Zoltan Varga  <vargaz@gmail.com>
8680
8681         * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
8682
8683         * aot-compiler.c (emit_plt): Fix a warning.
8684         
8685         * aot-compiler.c: Implement ARM support in the binary writer.
8686
8687 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
8688
8689         * basic-simd.cs: Add test for getter with byref arg.
8690         Fix the naming of a few tests.
8691         Add missing checks to a test.
8692
8693 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
8694
8695         * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
8696
8697         * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
8698         most of the full-aot support for monitor enter/exit trampolines.
8699
8700         * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
8701         enter/exit trampoline creation functions.
8702
8703         * Makefile.am: Fix the generation of buildver.h so it is not invoked during
8704         make dist.
8705
8706 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
8707
8708         * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
8709         incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
8710         implement the needed functionality without adding crap to the runtime.
8711
8712 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
8713
8714         * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
8715         non-x86 builds.
8716
8717         * mini.c (mono_build_date): New global version holding the build date in
8718         string format.
8719         
8720         * Makefile.am (buildver.c): Generate a file containing the build date.
8721
8722         * main.c: Set the build date from the generated file.
8723
8724         * mini.c (mono_get_runtime_build_info): New helper function returning build
8725         information in a string format.
8726         
8727         * driver.c (mono_main): Print the build date in --version.
8728
8729         * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
8730         file when the bind-to-runtime-version option is used.
8731
8732 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
8733
8734         * simd-intrinsics.c: Fix bug when using getters and byref args. 
8735
8736 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
8737
8738         * simd-methods.h: Rename prefetch methods.
8739
8740         * simd-intrinsics.c: Same.      
8741
8742 2008-11-05  Mark Probst  <mark.probst@gmail.com>
8743
8744         * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
8745         sizes.
8746
8747 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
8748
8749         * aot-compiler.c: Use the bundled elf header files instead of depending on
8750         the system one.
8751         
8752         * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
8753         mempool.
8754
8755         * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
8756         on every call.
8757
8758 2008-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
8759
8760         * cpu-x86.md: Add store nta ops.
8761
8762         * mini-ops.h: Same.
8763
8764         * mini-x86.c: Same.
8765
8766         * mini.h: Add an enum for simd prefetch modes.
8767
8768         * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
8769         of store. Use the changed code to support store nta.
8770
8771         * simd-intrinsics.c: Add prefetch ops for all vector types.
8772
8773 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
8774
8775         * aot-compiler.c: Add an option for JIT compiling the methods by multiple 
8776         threads.
8777         
8778         * aot-compiler.c: Use statically allocated buffers for constructing symbol 
8779         names.
8780
8781         * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
8782         trampolines.
8783
8784 2008-11-04  Mark Probst  <mark.probst@gmail.com>
8785
8786         * mini-x86.c: Fixed commit.
8787
8788 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
8789
8790         * aot-compiler.c (emit_plt): Align the plt section only on x86.
8791
8792 2008-11-04  Mark Probst  <mark.probst@gmail.com>
8793
8794         * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
8795         and MONITOR_EXIT, for the ASM fastpaths.
8796
8797         * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
8798         available.
8799
8800         * mini.c, patch-info.h: Signature and patch infos for
8801         Monitor.Enter/Exit trampolines.
8802
8803         * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
8804
8805         * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
8806         Monitor.Enter/Exit ASM fastpath for Linux.
8807
8808 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
8809
8810         * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
8811
8812         * objects.cs: Add a new test.
8813         
8814         * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
8815
8816         * aot-runtime.c (load_method): Run class initialization in the PLT case even
8817         if MONO_LOG_LEVEL is set.
8818
8819         * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
8820
8821         * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
8822
8823         * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
8824         
8825         * aot-compiler.c: Change the relocation code to use virtual addresses instead
8826         of file offsets. Align the sections belonging to the data segment to 
8827         PAGESIZE.
8828
8829 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
8830
8831         * aot-compiler.c: Simplify the elf writer by depending on the definitions in
8832         elf.h. Port it to amd64.
8833
8834 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
8835
8836         * driver.c: Enable SIMD by default.
8837
8838 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
8839
8840         * cpu-x86.md: Add prefetch op.
8841
8842         * mini-ops.h: Same.
8843
8844         * mini-x86.c: Same.
8845
8846         * mini.h: Add an enum for simd prefetch modes.
8847
8848         * simd-methods.h: Add prefetch function names.
8849
8850         * simd-intrinsics.c: Add prefetch ops for all vector types.
8851
8852 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
8853
8854         * aot-compiler.c (emit_bytes): Speed this up a little.
8855
8856 2008-11-02  Zoltan Varga  <vargaz@gmail.com>
8857
8858         * aot-compiler.c: Add JIT time etc. statistics.
8859         
8860         * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
8861
8862         * mini.h (MonoCompile): Add 'got_offset' field.
8863
8864         * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
8865         method_got_offsets array.
8866
8867         * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
8868         wrappers.
8869
8870         * aot-compiler.c (compile_method): Add generic method instances referenced
8871         by the method to the list of methods to be compiled, this is required so if
8872         A<T> references B<T>, and another assembly references A<int>, then it will
8873         also get a copy of B<int>.
8874
8875         * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
8876         when checking for monitor enter/exit.
8877
8878 2008-10-30  Mark Probst  <mark.probst@gmail.com>
8879
8880         * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
8881         for Monitor.Enter and Monitor.Exit if enabled.
8882
8883         * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
8884         Solaris.
8885
8886 2008-10-30  Zoltan Varga  <vargaz@gmail.com>
8887
8888         * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
8889         of an OP_MOVE. Fixes #440046.
8890
8891         * basic-long.cs: Add a new test.
8892
8893 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
8894
8895         * mini.h: Add synchronization note for the managed counter-part.
8896
8897         * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
8898         returns the simd caps of the current cpu.
8899
8900 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
8901
8902         * basic-simd.cs: Remove Console.WriteLine.
8903
8904 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
8905
8906         * basic-simd.cs: New tests for Vector2ul.
8907
8908 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
8909
8910         * simd-intrinsics.c: Add new vector type Vector2ul.
8911
8912 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
8913
8914         * basic-simd.cs: New tests for Vector2l.
8915
8916 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
8917
8918         * cpu-x86.md: Add long version of most packed int ops.
8919
8920         * mini-ops.h: Same.
8921
8922         * mini-x86.h: Same.
8923
8924         * simd-intrinsics.c: Add new vector type Vector2l.
8925
8926 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
8927
8928         * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
8929
8930         * simd-methods.h: Remove SN_op_BitwiseXor.
8931
8932 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
8933
8934         * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
8935         alignment.
8936
8937 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
8938
8939         * basic-simd.cs: Test for Vector2d.
8940
8941         * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
8942         value.
8943
8944 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
8945
8946         * cpu-x86.md: Add double version of all packed float ops.
8947
8948         * mini-ops.h: Same.
8949
8950         * mini-x86.h: Same.
8951
8952         * simd-intrinsics.c: Add new vector type Vector2d.
8953
8954         * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
8955
8956         * simd-methods.h: Add Duplicate.
8957
8958 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
8959
8960         * basic-simd.cs: Test for packing with signed saturation.
8961
8962 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
8963
8964         * aot-compiler.c (add_generic_instances): Add all methods of generic instances
8965         found in the TYPESPEC table.
8966
8967 2008-10-26  Zoltan Varga  <vargaz@gmail.com>
8968
8969         * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
8970         too.
8971
8972         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
8973
8974         * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
8975         instead of the RVA, since the RVA can be changed by tools like the cil 
8976         stripper.
8977
8978         * method-to-ir.c (mono_method_to_ir2): Ditto.
8979
8980         * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
8981         (deserialize_variable): Ditto.
8982
8983 2008-10-25  Martin Baulig  <martin@ximian.com>
8984
8985         * debug-mini.c (write_variable): Use
8986         `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
8987
8988 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
8989
8990         * cpu-x86.md: Add unsigned variants of packd and packw.
8991
8992         * mini-ops.h: Same.
8993
8994         * mini-x86.h: Emit the right instruction for packd and packw.
8995         Add unsigned variants of packd and packw.
8996
8997         * simd-intrinsics.c: Packd and packw were used in place of their
8998         unsigned variants. Change that.
8999         Add intrinsics for (Signed)PackWithSignedSaturation.
9000
9001         * simd-methods.h: Add (Signed)PackWithSignedSaturation.
9002
9003 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
9004
9005         * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
9006
9007 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
9008
9009         * mini-ops.h: Remove dword packed add/sub with saturation ops.
9010
9011         * cpu-x86.md: Remove dword packed add/sub with saturation ops.
9012
9013         * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
9014         sse instructions.
9015
9016         * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
9017
9018 2008-10-24  Mark Probst  <mark.probst@gmail.com>
9019
9020         * method-to-ir.c, mini.c: Special casing for the synchronized
9021         wrapper for the ldtoken+GetTypeFromHandle case.
9022
9023 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
9024
9025         * mini.c (mono_replace_ins): Move this to branch-opts.c.
9026
9027         * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
9028         created/split bblocks.
9029
9030 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
9031
9032         * mini-ops.h: Add packed signed mul high.
9033         
9034         * cpu-x86.md: Same.
9035
9036         * mini-x86.c (mono_arch_output_basic_block): Same.
9037
9038         * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
9039
9040         * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
9041
9042 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
9043
9044         * basic-simd.cs: Tests for Vector16sb.
9045
9046 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
9047
9048         * inssel.brg (stmt): Fix OP_HARD_NOP rule.
9049
9050 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
9051
9052         * mini-ops.h: Add packed signed min, max and compare greater.
9053         
9054         * cpu-x86.md: Same.
9055
9056         * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
9057         saturation.
9058
9059         * simd-methods.h: Add CompareGreaterThan.
9060
9061         * simd-methods.h: Remove CompareEquals.
9062
9063         * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
9064
9065         * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
9066
9067         * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
9068         CompareEqual.
9069
9070 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
9071
9072         * basic-simd.cs: Fix tests due to change in the API.
9073
9074 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
9075
9076         * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
9077
9078 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
9079
9080         * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
9081
9082         * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
9083         inst_offset as this has invalid values for LDADDR.
9084
9085 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
9086
9087         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
9088
9089         * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
9090
9091 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
9092
9093         * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
9094         for accessing field->data.
9095
9096 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
9097
9098         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
9099
9100 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
9101
9102         * simd-methods.h: Add SignedPackWithUnsignedSaturation.
9103
9104         * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
9105
9106 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
9107
9108         * dominators.c (mono_compute_natural_loops): Allocate GList enties
9109         from the cfg mempool.
9110
9111 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
9112
9113         * basic-simd.cs: Tests for new methods in Vector8us.
9114
9115 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
9116
9117         * mini-ops.h: Add multiply and store high.
9118         
9119         * cpu-x86.md: Same.
9120
9121         * mini-x86.c (mono_arch_output_basic_block): Same.
9122
9123         * simd-methods.h: Same.
9124
9125         * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
9126         and CompareEqual.
9127
9128 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
9129
9130         * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
9131         mono_class_setup_vtable ().
9132
9133         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
9134         mono_class_get_vtable_entry () for accessing klass->vtable.
9135
9136         * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
9137
9138         * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
9139         found.
9140
9141         * method-to-ir.c (mono_save_token_info): Don't save references made from
9142         wrappers.
9143
9144         * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
9145         of generic instances.
9146
9147         * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
9148
9149 2008-10-19  Mark Probst  <mark.probst@gmail.com>
9150
9151         * cpu-ppc.md, mini-ppc.c: The length of the code generated for
9152         OP_JMP depends on the method signature.  Calculate it properly.
9153
9154 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
9155         
9156         * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
9157         called directly.
9158
9159         * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
9160         instances.
9161         (emit_extra_methods): Add another table mapping method indexes to 
9162         offsets in the extra_method_info table.
9163
9164         * mini.h: Bump AOT file format version.
9165         
9166         * aot-runtime.c: Merge most of the code from mono_aot_get_method
9167         and mono_aot_get_method_from_token () into one function.
9168
9169 2008-10-19  Mark Probst  <mark.probst@gmail.com>
9170
9171         * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
9172         separate counter.
9173
9174 2008-10-18  Zoltan Varga  <vargaz@gmail.com>
9175
9176         * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
9177         methods.
9178
9179         * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
9180         disable_aot.
9181
9182         * mini.c (mono_patch_info_equal): Compare the generic context as well.
9183
9184         * mini.h: Bump aot file format version.
9185
9186         * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
9187         AOT file can contain native code for methods which are not in the METHOD
9188         table. Generate code for non-sharable generic instances of generic methods
9189         found in the METHODSPEC table.
9190         
9191         * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
9192         encoding generic type handles.
9193
9194         * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
9195         (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
9196
9197         * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
9198         macros + MONO_ADD_INS.
9199
9200         * mini.c (mono_jump_info_token_new2): New function which takes a generic
9201         context as well.
9202
9203         * mini.h (MonoJumpInfoToken): Include fields for a generic context.
9204
9205         * mini.h: Bump aot file format version.
9206
9207         * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
9208
9209 2008-10-17  Mark Probst  <mark.probst@gmail.com>
9210
9211         * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
9212         platforms, with definable stack alignment value.  Set to 16 now
9213         for all platforms.
9214
9215         * mini.c, mini.h, driver.c: Command line option for disabling
9216         stack alignment.
9217
9218 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
9219
9220         * basic-simd.cs: Tests for new methods in Vector4ui.
9221
9222 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
9223
9224         * mini-ops.h: Add packed int shuffle.
9225         
9226         * cpu-x86.md: Same.
9227
9228         * mini-x86.c (mono_arch_output_basic_block): Same.
9229
9230         * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
9231         extract mask, max, min, shuffle.
9232
9233         * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
9234
9235 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
9236
9237         * basic-simd.cs: Tests for new methods in Vector8us.
9238
9239 2008-10-17  Mark Probst  <mark.probst@gmail.com>
9240
9241         * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
9242         RuntimeTypeHandle, not a TypedReference.
9243
9244 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
9245
9246         * simd-intrinsics.c: remove relocations.
9247
9248 2008-10-17  Zoltan Varga  <vargaz@gmail.com>
9249
9250         * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM 
9251         optimizations from the x86 backend.
9252
9253 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
9254
9255         * simd-methods.h, simd-intrinsics.c: debloat method names and
9256         prepare for no relocations.
9257
9258 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
9259
9260         * mini-ops.h: Add packed min/equal and sum of absolute differences.
9261         
9262         * cpu-x86.md: Same.
9263
9264         * mini-x86.c (mono_arch_output_basic_block): Same.
9265
9266         * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
9267         extract mask, max, min and sum of absolute differences.
9268
9269         * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
9270         method name.
9271
9272 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
9273
9274         * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
9275         Renamed one test for consistency.
9276
9277 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
9278
9279         * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
9280         fix to the code that deal with other blocks.
9281
9282 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
9283
9284         * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
9285
9286 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
9287
9288         * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
9289         that deals with vreg interference. Explicitly check for OP_LDADDR to be
9290         able to process the source reg.
9291
9292 2008-10-16  Martin Baulig  <martin@ximian.com>
9293
9294         * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
9295
9296         * inssel.brg: Add `OP_HARD_NOP'.
9297
9298         * mini.h (MonoCompile): Added `keep_cil_nops' flag.
9299
9300         * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
9301         `OP_HARD_NOP' instruction when running inside the debugger.
9302
9303         * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
9304         `OP_HARD_NOP' instruction when running inside the debugger.
9305
9306 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
9307
9308         * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
9309         now works. The issue with the regalloc tripping up no longer
9310         happens.
9311
9312         * simd-intrinsics.c (load_simd_vreg): Same.
9313
9314 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
9315         
9316         * basic-simd.cs: Tests for new Vector8ui methods.
9317
9318 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
9319
9320         * simd-intrinsics.c (get_simd_vreg): Simplify code and test
9321         only for type. This fixes crashes where MonoInst::klass is checked
9322         for ops of type != VTYPE or OBJ.
9323
9324         * simd-intrinsics.c (load_simd_vreg): Same.
9325
9326 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
9327
9328         * mini-ops.h: Add ops for packed shuffle/max/avg and
9329         extract mask.
9330         
9331         * cpu-x86.md: Same.
9332
9333         * mini-x86.c (mono_arch_output_basic_block): Same.
9334
9335         * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
9336         extract mask.
9337
9338         * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
9339         to emit extract mask op.
9340
9341         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
9342         to emit word shuffles.
9343
9344 2008-10-15  Mark Probst  <mark.probst@gmail.com>
9345
9346         * mini.c (mono_allocate_stack_slots_full): Align stack frame to
9347         the largest alignment needed by a variable, but at least
9348         sizeof(gpointer).
9349
9350 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
9351
9352         * basic-simd.cs: Tests for the fixes in the last commit.
9353
9354 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
9355
9356         * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
9357         no longer handles STACK_PTR input.
9358
9359         * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
9360
9361         * simd-intrinsics.c (load_simd_vreg): New function that works like 
9362         get_simd_vreg   but handles STACK_PTR input.
9363
9364         * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
9365         as the input can be an arbitrary pointer.
9366
9367         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
9368         LDADDR local optimization directly otherwise use a store op.
9369
9370 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
9371
9372         * basic-simd.cs: Tests for dup low and dup high.
9373
9374 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
9375
9376         * mini-ops.h: Add dup low and dup high ops.
9377         
9378         * cpu-x86.md: Same.
9379
9380         * mini-x86.c (mono_arch_output_basic_block): Same.
9381
9382         * simd-intrinsics.c (vector4f_intrinsics): Same.
9383
9384 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
9385
9386         * basic-simd.cs: Tests for recently added functionality.
9387
9388 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
9389
9390         * mini-ops.h: Add remaining sse1 fp ops.
9391         
9392         * cpu-x86.md: Add remaining sse1 fp ops.
9393
9394         * mini-x86.c (mono_arch_output_basic_block): Same.
9395
9396         * mini.h: Add enum for simd FP compare conditions.
9397
9398         * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
9399
9400         * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
9401         so the backed can generate the appropriate op.
9402
9403 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
9404         This patch squeese one more byte from the SimdIntrinsc struct.
9405
9406         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
9407         a a shift amount intead of simply or'ing it.
9408
9409         * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
9410
9411         * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
9412         byte so we can have an aditional flags field without increasing struct size.
9413
9414         * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
9415         against the simd_supported_versions bitmask.
9416
9417         * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
9418
9419 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
9420
9421         * mini.c: remove rawbuffer code (the only use here is unsafe because
9422         it takes locks during signal handling and the kernel now provides much
9423         better info in proc/pid/smaps these days).
9424
9425 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
9426
9427         * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
9428         OP_X86_PUSH_OBJ. Fixes #434620.
9429
9430         * objects.cs: Add a test.
9431         
9432 2008-10-12  Rodrigo Kumpera  <rkumpera@novell.com>
9433
9434         * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
9435         that the packuswb/packusdw don't work with unsigned numbers for what
9436         would be negative numbers in signed format.
9437
9438         * cpu-x86.md: Add doubleword forms of many ops and packing ones.
9439         Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
9440
9441         * mini-ops.h: Add doubleword forms of many ops and packing ones.
9442
9443         * mini-x86.c: Emit doubleword forms of many ops and packing ones.
9444
9445         * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
9446
9447         * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
9448
9449         * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
9450         add more ops.
9451
9452         * simd-intrinsics.c (simd_version_name): New function, returns the name of the
9453         version as the enum in mini.h.
9454
9455         * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
9456         for sse3 ops, check the simd_version field if present. This way the code
9457         works with all versions of sse.
9458
9459 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
9460
9461         * simd-intrinsics.c: Fixed intrinsic name typo.
9462
9463         * mini.h: Added missing simd exported function.
9464
9465         * basic-simd.cs: Added tests for Vector4ui.
9466         Fixed broken test for Vector16b.
9467
9468 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
9469
9470         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
9471         the max length to 64.
9472
9473 2008-10-10  Mark Probst  <mark.probst@gmail.com>
9474
9475         * method-to-ir.c: Only do the fast virtual generic method call for
9476         non-wrapper methods.
9477
9478         * mini.h, mini-trampolines.c: The new generic virtual remoting
9479         trampoline handles virtual method calls via the vtable (as done by
9480         the fast virtual generic method calls) to remoting proxies.
9481
9482         * mini.c (mono_jit_create_remoting_trampoline): For generic
9483         methods reate a generic virtual remoting trampoline.
9484
9485         * mini-amd64.h: Enable fast virtual generic method calls again.
9486
9487 2008-10-10  Mark Probst  <mark.probst@gmail.com>
9488
9489         * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
9490         restore registers when doing tail calls.
9491
9492 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
9493
9494         * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
9495         Vector4ui.
9496
9497 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
9498
9499         * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
9500
9501 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
9502
9503         * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
9504
9505 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
9506
9507         * basic-simd.cs: Retrofit for API changes.
9508
9509 2008-10-10  Mark Probst  <mark.probst@gmail.com>
9510
9511         * mini-ppc.c: Handle integer stack arguments for tail calls.
9512
9513 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
9514
9515         * optflags-def.h: Removed sse3 optimization.
9516
9517         * driver.c: Same.
9518
9519         * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
9520         sse3.
9521
9522         * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
9523
9524         * mini.h: Added enumeration with simd versions.
9525
9526         * simd-intrinsics.c (emit_intrinsics): Use the new static var
9527         for detecting SSE3.
9528
9529         * simd-intrinsics.c: Added mono_simd_intrinsics_init.
9530
9531         * mini.c (mini_init): Call mono_simd_intrinsics_init.
9532
9533 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
9534
9535         * basic-simd.cs: Added tests for Vector8u and Vector16u.
9536
9537         * basic-simd.cs: Fixed test naming.
9538
9539 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
9540
9541         * mini-ops.h: Added ops for packed and saturated math, shifts
9542         and packing/unpacking.
9543
9544         * cpu-x86.md: Added descriptors for the above ops.
9545
9546         * mini-x86.c: Added code to emmit the above ops.
9547
9548         * simd-intrinsics.c: Added support for Vector16u and Vector8u.
9549
9550 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
9551
9552         * aot-compiler.c (compile_method): Enable AOT for generic code.
9553
9554         * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
9555
9556 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
9557
9558         * mini.c: add a workaround for a common screwup that ends up blamed
9559         to mono (other processes blocking signal delivery).
9560
9561 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
9562
9563         * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
9564         in the LDFLD/STFLD opcodes. Fixes #432673.
9565
9566         * iltests.il.in: Add a new test.
9567
9568 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
9569
9570         * mini-arm.c: attach the thread in unmanaged->managed transitions
9571         using delegates (bug #433148).
9572
9573 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
9574
9575        * basic-simd.cs: Use new ShuffleSel constants.
9576
9577 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
9578
9579         * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
9580
9581         * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
9582         only disable simd intrinsics if no sse2 is detected.
9583
9584         * optflags-def.h: Added sse3.
9585
9586         * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
9587         is disabled.
9588
9589 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
9590
9591         * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
9592         when adding delegate-invoke wrappers.
9593
9594 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
9595
9596         * Makefile.am: Reenable the simd tests.
9597
9598 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
9599
9600         * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
9601           add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
9602           other vreg is allocated to that hreg.
9603
9604         Contributed under MIT/X11 license.
9605
9606 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
9607
9608         * Makefile.am: Disable the simd tests for now as Mono.Simd is not
9609         yet checked in.
9610
9611 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
9612
9613         * basic-simd.cs: New test suite for SIMD intrinsics.
9614
9615         * Makefile.am: Added new tests.
9616
9617 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
9618
9619         * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
9620
9621         * mini-ops.h: Same.
9622
9623         * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
9624
9625         * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
9626         using SSE2 aware opcodes.
9627
9628         * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
9629         is enabled, this code path is only reachable if conversion ops are emmited after
9630         mono_method_to_ir.
9631
9632         * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
9633
9634         This optimization saves 6 bytes per conversion against the old version.
9635
9636 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
9637
9638         * aot-compiler.c (compile_method): Don't skip methods referencing 
9639         generic methods without a corresponding entry in token_info_hash, since
9640         encode_method_ref () can handle all generic methods now.
9641
9642         * method-to-ir.c (mono_save_token_info): Don't save the token info if a 
9643         generic context is set.
9644         
9645         * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
9646         generic sharing of LDTOKEN.
9647
9648 2008-10-06  Mark Probst  <mark.probst@gmail.com>
9649
9650         * mini-amd64.h: Temporarily disabled fast virtual generic method
9651         calls because it breaks the System.Runtime.Remoting tests.
9652
9653 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
9654
9655         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
9656
9657         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
9658         so inlining actually works.
9659         (check_inline_caller_method_name_limit): Ditto.
9660
9661 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
9662
9663         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
9664         64 bit safety (from Olaf Hering and Andreas Farber).
9665
9666 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
9667         
9668         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
9669         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
9670         unused virtual call support code.
9671
9672         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
9673         
9674         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
9675         which can't use aot trampolines.
9676         (decode_patch): Don't create aot trampolines for methods which can't use
9677         them.
9678
9679         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
9680         use aot trampolines.
9681
9682         * mini.h: Bump AOT image format version.
9683         
9684 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
9685
9686         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
9687         to save_token_info () since cmethod is inflated for constrained calls.
9688
9689         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
9690
9691 2008-10-04  Andreas Farber  <andreas.faerber@web.de>
9692
9693         * Makefile.am: Add build rules for ppc64.
9694         This avoids the build failing at pedump with unresolved symbols
9695         due to lack of arch_sources. Instead it will now fail earlier
9696         due to lack of cpu-ppc64.md.
9697
9698         Contributed under MIT/X11 license.
9699
9700 2008-10-04  Mark Probst  <mark.probst@gmail.com>
9701
9702         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
9703         tail calls.
9704
9705         * iltests.il.in: Add test case for tail call with many arguments.
9706
9707 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
9708
9709         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
9710         to the fast virtual generic method code until the aot case is fixed.
9711
9712 2008-10-03  Mark Probst  <mark.probst@gmail.com>
9713
9714         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
9715
9716 2008-10-03  Mark Probst  <mark.probst@gmail.com>
9717
9718         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
9719         thunks.
9720
9721 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
9722         
9723         * simd-intrinsics.c: Forgot to add this one.
9724
9725         * mini-codegen.c: Fix macro in case SIMD is not supported.
9726
9727 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
9728         
9729         This patch land initial JIT support for simd intrinsics.
9730
9731         * mini-x86.h: Added new define to make --enable_minimal work on x86.
9732
9733         * Makefile.am: Added simd-intrinsics.c
9734
9735         * simd-intrinsics.c: New file with simd instrinsic related
9736         code.
9737
9738         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
9739
9740         * cpu-x86.md: Add simd related instructions.
9741
9742         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
9743
9744         * driver.c: Added two new --regression variants.
9745
9746         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
9747
9748         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
9749
9750         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
9751         extract some complicated logic to helper functions.
9752
9753         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
9754
9755         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
9756
9757         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
9758         the specialized simplification pass.
9759
9760         * method-to-ir.c (mono_spill_global_vars): Use new macro.
9761
9762         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
9763
9764         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
9765         table.
9766
9767         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
9768         if MONO_ARCH_NEED_SIMD_BANK is defined.
9769
9770         * mini-ops.h: Added the new simd ops.
9771
9772         * mini-x86.c: Added mono_arch_xregname.
9773
9774         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
9775
9776         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
9777
9778         * mini-x86.h: Define simd related MONO_ARCH macros.
9779
9780         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
9781
9782         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
9783
9784         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
9785         MONO_CLASS_IS_SIMD to deal with simd related IR.
9786
9787         * mini.h (MonoInst): Added spill_var to the backend union.
9788
9789         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
9790
9791         * mini.h: Added forward declarations of the new simd fuctions.
9792
9793         * optflags-def.h: Added new optimization names SIMD.
9794
9795         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
9796
9797         * regalloc.h: Added support for working with 3 register banks.
9798
9799         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
9800
9801         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
9802
9803 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
9804
9805         * mini-exceptions.c: remove 64 bit related ifdef clutter.
9806
9807 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
9808
9809         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
9810         instead of one on 64 bit systems.
9811
9812         * method-to-ir.c: Remove unused includes.
9813
9814 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
9815
9816         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
9817         cfg->used_int_regs, since the two are different on arm.
9818
9819 2008-10-02  Mark Probst  <mark.probst@gmail.com>
9820
9821         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
9822         mono_method_get_vtable_index() to get the vtable index.
9823
9824 2008-10-02  Mark Probst  <mark.probst@gmail.com>
9825
9826         * method-to-ir.c (mono_method_to_ir2): Don't create native
9827         wrappers for array methods, because they're never called (and if
9828         they were called they wouldn't work).
9829
9830 2008-10-02  Mark Probst  <mark.probst@gmail.com>
9831
9832         * method-to-ir.c (mono_method_to_ir2): Array methods are
9833         special-cased and must not be invoked indirectly via the (M)RGCTX
9834         when generic sharing is turned on.  Fixes #431413.
9835
9836 2008-10-01  Mark Probst  <mark.probst@gmail.com>
9837
9838         * method-to-ir.c: When generic sharing is active, call
9839         non-interface virtual generic methods via the standard trampoline.
9840
9841         * mini-trampolines.c: Handle virtual generic shared methods.
9842
9843         * mini.h, mini-x86.c, mini-x86.h: New argument for
9844         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
9845         method thunks and which is the trampoline to call if the lookup
9846         fails.  Enable the virtual generic method thunk for x86.
9847
9848         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
9849         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
9850         argument but assert that it's NULL, because these archs don't yet
9851         implement the virtual generic method thunk.  Changes in the IMT
9852         thunk data structures.
9853
9854 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
9855
9856         * aot-compiler.c (emit_globals): Avoid invalid characters in
9857         the static linking symbol.
9858
9859         * objects.cs: Add a test for the range check optimization. Fix warnings.
9860
9861         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
9862         optimization from the current JIT.
9863
9864         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
9865         later in decompose_array_access_opts () to allow more optimizations.
9866
9867         * method-to-ir.c (mono_handle_soft_float): Rename this to 
9868         mono_decompose_soft_float () for consistency.
9869
9870         * mini-ops.h: Fix arguments of OP_STRLEN.
9871
9872         * method-to-ir.c (save_cast_details): Extract the cast details saving code
9873         into a separate function.
9874         (reset_cast_details): Ditto.
9875         (handle_unbox): Save cast details. Fixes #431254.
9876
9877         * method-to-ir.c: Remove some obsolete FIXMEs.
9878
9879 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
9880
9881         * ir-emit.h (alloc_dreg): Write a warning before crashing.
9882
9883 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
9884
9885         * mini-codegen.c: More work on macros to make them
9886         ready for multiple regbanks.
9887
9888 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
9889
9890         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
9891
9892         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
9893
9894 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
9895
9896         * mini-codegen.c (mono_spillvar_offset): Proper support for
9897         multiple regbanks.
9898
9899 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
9900
9901         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
9902         the stack overflow changes.
9903
9904 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
9905
9906         * mini-codegen.c: Make all bank macros depend on reg_bank.
9907
9908         * mini-codegen.c (mono_local_regalloc): Make free mask
9909         initialization regbank aware.
9910
9911 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
9912
9913         * mini-codegen.c (mono_local_regalloc): Extract callee
9914         mask selection to a function and make it regbank aware.
9915
9916 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
9917
9918         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
9919         code to deal with many regbanks.
9920
9921 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
9922
9923         * mini-codegen.c: More fp->regbank changes.
9924
9925 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
9926
9927         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
9928         of a hardcoded constant.
9929
9930 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
9931
9932         * method-to-ir.c (type_from_stack_type): Fix typo.
9933
9934 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
9935
9936         * mini-ia64.c (emit_move_return_value): Convert float return values to
9937         double.
9938
9939         * objects.cs: Add a new test.
9940         
9941         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
9942         VARARG methods to fix an assert later.
9943
9944         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
9945         end so it at least compiles.
9946
9947 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
9948
9949         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
9950
9951 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
9952
9953         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
9954         optimization to a new function (emit_optimized_ldloca_ir) and enable
9955         it for both ldloca and ldloca_s.
9956
9957 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
9958
9959         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
9960         gshared CASTCLASS code.
9961
9962         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
9963         amd64, where the libc stack unwinder encounters stack frames referring to
9964         native code in unmapped memory.
9965
9966         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
9967         sharing.
9968
9969         * generics.cs: Add new test.
9970
9971 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
9972
9973         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
9974         add a check that one of the ARM_FPU_ constants is defined.
9975
9976         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
9977         
9978         * mini-exceptions.c: Fix build on non-altstack platforms.
9979
9980         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
9981         sharing of vtypes.
9982
9983         * ir-emit.h: Add a comment to NEW_PCONST.
9984
9985         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
9986
9987         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
9988
9989         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
9990         after the changes to MonoJitDomainInfo.
9991
9992 2008-09-27  Mark Probst  <mark.probst@gmail.com>
9993
9994         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
9995
9996 2008-09-27  Mark Probst  <mark.probst@gmail.com>
9997
9998         * mini-ppc.c: Compiler warning fixes.
9999
10000 2008-09-27  Mark Probst  <mark.probst@gmail.com>
10001
10002         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
10003         for pinvokes.
10004
10005 2008-09-27  Mark Probst  <mark.probst@gmail.com>
10006
10007         * exceptions-ppc.c, mini-ppc.h: Compile
10008         mono_arch_handle_altstack_exception() on Darwin, too.
10009
10010 2008-09-27  Mark Probst  <mark.probst@gmail.com>
10011
10012         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
10013         work on archs which don't have generic sharing implemented, only
10014         without the vtable_arg.
10015
10016 2008-09-26  Mark Probst  <mark.probst@gmail.com>
10017
10018         * mini.c: Added comment explaining why delegate ctor icall
10019         wrappers are compiled.
10020
10021 2008-09-26  Mark Probst  <mark.probst@gmail.com>
10022
10023         * mini.c: Don't produce trampolines to delegate ctor icall
10024         wrappers but compile them upfront.
10025
10026 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
10027
10028         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
10029         runtime-set function when going back to managed code. Currently this
10030         is used to set back the protection on the soft ovf pages and/or to
10031         throw the stack overflow exception that happened in unmanaged code.
10032
10033 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
10034
10035         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
10036         runtime-set function when going back to managed code. Currently this
10037         is used to set back the protection on the soft ovf pages and/or to
10038         throw the stack overflow exception that happened in unmanaged code.
10039
10040 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
10041
10042         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
10043         the support code for restoring stack protection after stack overflows
10044         that happen in unmanaged code. Don't set the exec permission on the
10045         soft overflow area.
10046
10047 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
10048
10049         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
10050         delegate->method_ptr is set. Fixes #428054.
10051
10052 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
10053
10054         * tests.cs: Rename to ratests.cs.
10055
10056         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
10057         emit_get_rgctx_... functions.
10058
10059 2008-09-25  Mark Probst  <mark.probst@gmail.com>
10060
10061         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
10062
10063 2008-09-25  Mark Probst  <mark.probst@gmail.com>
10064
10065         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
10066         before asserting that method is sharable.
10067
10068 2008-09-25  Mark Probst  <mark.probst@gmail.com>
10069
10070         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
10071         whether method needs a static RGCTX wrapper used instead of
10072         complex conditions.
10073
10074         * generic-sharing.c, mini.h: A few functions moved to
10075         metadata/generic-sharing.c.
10076
10077 2008-09-25  Mark Probst  <mark.probst@gmail.com>
10078
10079         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
10080         Generic code sharing for value types, which essentially means
10081         treating value type methods like static methods.  The RGCTX is
10082         passed in the same way.
10083
10084 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
10085
10086         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
10087         opcode when creating multi-dimensional arrays of open types.
10088
10089         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
10090         open generic types.
10091
10092         * generics.cs: Add a test.
10093
10094         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
10095
10096 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
10097
10098         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
10099
10100         * mini.c (mini_method_compile): Set it when running under the debugger. 
10101
10102         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
10103         vreg optimization if the flag is set.
10104
10105         * driver.c (mono_main): Add --attach= option to pass options to
10106         the attach agent.
10107
10108         * mini.c (sigquit_signal_handler): Start the attach agent.
10109
10110         * ssapre.c: Disable this to save space since it is not yet ported to
10111         linear IR.
10112
10113         * regalloc2.c: Disable this to save space.
10114
10115         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
10116
10117 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
10118
10119         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
10120         the -v option useful again.
10121
10122 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
10123
10124         * mini-amd64.c (mono_arch_output_basic_block): Add support for
10125         --break-at-bb.
10126
10127         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
10128         arrays of arrays. Fixes #428406.
10129
10130         * method-to-ir.c (mini_emit_castclass): Ditto.
10131
10132         * objects.cs: Add new test.
10133         
10134 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
10135
10136         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
10137         was wrong at it choked against target_type_is_incompatible for byref types.
10138
10139 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
10140
10141         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
10142         places.
10143
10144 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
10145
10146         * mini-exceptions.c: update a few more exceptions-related counters.
10147
10148 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
10149
10150         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
10151         new functions to allocate from persistent mempools.
10152
10153 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
10154
10155         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
10156         multiple register banks in the future.
10157
10158         * mini-codegen.c (mono_local_regalloc): Fix a warning.
10159
10160 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
10161
10162         * mini.c (type_to_eval_stack_type): Remove duplicated function.
10163
10164         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
10165
10166         * mini.h: Export type_to_eval_stack_type.
10167
10168         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
10169         is only ins->klass of byref types.
10170
10171 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
10172
10173         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
10174         (mini_emit_memcpy2): Ditto.
10175
10176         * mini-amd64.c: Fix a warning.
10177
10178 2008-09-21  Mark Probst  <mark.probst@gmail.com>
10179
10180         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
10181         linking.
10182
10183 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
10184
10185         * method-to-ir.c: Extract stloc micro-optimization to a
10186         function and apply it to all cases.
10187
10188 2008-09-19  Mark Probst  <mark.probst@gmail.com>
10189
10190         * method-to-ir.c: Don't fail generic code sharing in cases we
10191         already support.
10192
10193 2008-09-18  Mark Probst  <mark.probst@gmail.com>
10194
10195         * mini-ppc.c: Handle structs in tailcalls on Darwin.
10196
10197 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
10198
10199         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
10200         implementation.
10201
10202 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
10203
10204         * trace.c: make tracing more useful and correct, with per-thread
10205         id and indent info.
10206
10207 2008-09-15  Mark Probst  <mark.probst@gmail.com>
10208
10209         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
10210         doing a method call and the argument is an R4.
10211
10212 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
10213
10214         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
10215         generic methods.
10216
10217 2008-09-13  Mark Probst  <mark.probst@gmail.com>
10218
10219         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
10220
10221 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
10222
10223         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
10224         (MONO_JUMP_TABLE_FROM_INS): Ditto.
10225
10226 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
10227
10228         * driver.c: Add a --agent argument (not supported yet) to load managed
10229         agent assemblies before loading the main assembly, similarly to how the
10230         Java VM handles agents.
10231
10232 2008-09-11  Mark Probst  <mark.probst@gmail.com>
10233
10234         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
10235         function to do stack layout of local variables.
10236
10237 2008-09-11  Mark Probst  <mark.probst@gmail.com>
10238
10239         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
10240         calculation.
10241
10242 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
10243
10244         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
10245         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
10246         JIT if DISABLE_JIT is defined.
10247
10248         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
10249         defined.
10250
10251 2008-09-10  Mark Probst  <mark.probst@gmail.com>
10252
10253         * iltests.il.in: Disable the fconv test on PPC (the result is
10254         undefined according to ECMA).
10255
10256 2008-09-10  Mark Probst  <mark.probst@gmail.com>
10257
10258         * iltests.il.in: Enable tail call tests for PPC.
10259
10260         * mini.h: Add variable for storing incoming valuetype argument
10261         addresses for tail calls.
10262
10263         * mini-ppc.c: Implement valuetype arguments and return values for
10264         tailcalls on Linux.
10265
10266 2008-09-09  Mark Probst  <mark.probst@gmail.com>
10267
10268         * mini-ppc.c: Partially implement tail calls (struct arguments and
10269         return values not supported).
10270
10271         * method-to-ir.c: Enable tail calls on PPC.
10272
10273 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
10274
10275         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
10276         runtime-invoke wrappers to work around the problem of them getting
10277         assigned to a random class.
10278
10279         * aot-runtime.c (mono_aot_get_method): Ditto.
10280         
10281 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
10282
10283         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
10284         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
10285
10286 2008-09-07  Mark Probst  <mark.probst@gmail.com>
10287
10288         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
10289         until they're implemented properly.
10290
10291         * exceptions-ppc.c: Use arch-independent exception-handling code
10292         instead of custom one.
10293
10294         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
10295         for Linear IR.
10296
10297         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
10298
10299         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
10300         applies when __powerpc__ is defined.
10301
10302 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
10303
10304         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
10305         methods to their code to avoid computing the full name of wrappers and
10306         doing a lookup in a string hash table.
10307
10308 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
10309
10310         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
10311         we identify bblocks before method_to_ir () is ran.
10312
10313         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
10314         Also avoid optimizing branches pointing to themselves.
10315
10316         * mini.c (mini_method_compile): Ditto. Fixes #422947.
10317
10318 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
10319
10320         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
10321
10322 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
10323
10324         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
10325         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
10326         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
10327         'buf'.
10328
10329         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
10330         jumped to the same entry in plt_jump_table.
10331
10332 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
10333
10334         * method-to-ir.c (initialize_array_data): Handle field with RVA from
10335         dynamic images.
10336
10337 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
10338
10339         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
10340         other assignment can be if converted. Saves 1.5% on corlib size and fixes
10341         #421807.
10342
10343 2008-08-29  Geoff Norton  <gnorton@novell.com>
10344
10345         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
10346         segment, and doesn't properly handle .space as .text.  Fixes
10347         AOT Mach/ARM
10348
10349 2008-08-29  Geoff Norton  <gnorton@novell.com>
10350
10351         * mini.c: Disable the mach exception handler when running on 
10352         ARM
10353
10354 2008-08-29  Geoff Norton  <gnorton@novell.com>
10355
10356         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
10357         globals on Darwin/ARM
10358
10359 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
10360
10361         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
10362         since too many things depend on it. Instead, call 
10363         mono_runtime_set_no_exec ().
10364         
10365         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
10366         the new JIT.
10367
10368         * aot-compiler.c: Add an 'asm-only' AOT option.
10369
10370         * mini.c: Avoid initializing the runtime when doing AOT compilation.
10371                 
10372         * aot-compiler.c (compile_method): Disable gshared support for now as it
10373         doesn't yet work.
10374
10375 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
10376
10377         * mini-amd64.h : Fix a compiler warning.
10378
10379         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
10380           Changed to use a callback function to retrieve the unwind info.
10381           This avoids problems observed when code blocks were removed by
10382           unloading an app domain.
10383
10384         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
10385           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
10386           to work properly.
10387
10388         Contributed under MIT/X11 license.
10389
10390 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
10391
10392         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
10393           case to keep the stack aligned to 8.
10394
10395         Contributed under MIT/X11 license.
10396
10397 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
10398
10399         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
10400         avoid repeated linear searches.
10401
10402 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
10403
10404         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
10405         methods it can't handle.
10406         
10407         * aot-compiler.c (add_method): Avoid adding a method twice.
10408         (add_wrappers): Add runtime invoke wrappers for all methods.
10409
10410         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
10411         function to create an aot-compatible version of this trampoline.
10412
10413         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
10414
10415 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
10416
10417         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
10418
10419         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
10420         with a generic sharing failure.
10421
10422         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
10423
10424         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
10425         CEE_RETHROW. Fixes #419634.
10426
10427         * mini.c (mono_method_to_ir): Ditto.
10428
10429         * exceptions.cs: Add a new test.
10430         
10431         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
10432         to mono_type_stack_size_internal () since some callers might not pass in
10433         an rgctx.
10434
10435         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
10436         instrument_prolog. Fixes #419878.
10437
10438         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
10439         doubles in soft float mode volatile.
10440
10441 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
10442
10443         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
10444
10445         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
10446         to handle soft float correctly.
10447
10448         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
10449         the fast path.
10450
10451         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
10452
10453         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
10454         to sp, since the generics catch code requires it.
10455
10456         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
10457         copying.
10458
10459         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
10460         mono_arch_emit_imt_argument ().
10461
10462         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
10463
10464         * mini-arm.c tramp-arm.c: Generic sharing updates.
10465
10466 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
10467
10468         * mini-arm.c: Fix the arm build.
10469
10470         * generic-sharing.c (mini_type_get_underlying_type): New helper function
10471         handling enums, generic instances and generic sharing.
10472         (mini_type_stack_size_full): Ditto.
10473
10474         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
10475         
10476         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
10477
10478         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
10479
10480         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
10481         trampolines.
10482
10483         * mini-arm.c: Various small generic sharing changes.
10484
10485         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
10486         this for x86.
10487         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
10488         custom code.
10489
10490         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
10491         helper function to return a generic class init trampoline.
10492
10493         * method-to-ir.c mini.c: Use it.
10494         
10495         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
10496         arch-specfic function to return a generic class init trampoline.
10497
10498         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
10499         the GENERIC_CLASS_INIT custom code.
10500
10501         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
10502         a fatal error, not a sharing failure.
10503
10504         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
10505         needed.
10506
10507         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
10508         trampoline argument from MONO_ARCH_VTABLE_REG.
10509
10510         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
10511         order of the arguments to the C trampoline: pass 'slot' as the trampoline
10512         argument, and pass the vtable in VTABLE_REG.
10513
10514         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
10515         order of the arguments to the C trampoline: pass 'slot' as the trampoline
10516         argument, and pass the vtable in VTABLE_REG.
10517         (mono_arch_create_trampoline_code_full): Remove some special casing for
10518         the rgctx fetch trampoline.
10519
10520         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
10521         Fixes #419273.
10522
10523         * iltests.il: Add a test for it.
10524
10525 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
10526
10527         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
10528
10529         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
10530         no longer needed.
10531
10532         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
10533         use mono_jit_info_table_find () to avoid recursion.
10534         (mono_delegate_trampoline): Add a sync wrapper here.
10535
10536         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
10537         here.
10538
10539         * mini.c (mono_method_to_ir): Ditto.
10540         
10541         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
10542         add_sync_wrapper argument. Don't add a sync wrapper here.
10543         (mono_create_jump_trampoline): Don't add a sync wrapper here.
10544
10545         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
10546         
10547 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
10548
10549         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
10550           of nonvolatile registers back from MonoContext to CONTEXT.
10551
10552         Contributed under MIT/X11 license.
10553
10554 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
10555
10556         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
10557           arguments on Winx64 there are only 4 argument registers.  For this
10558           logic to work the last argument must be pulled from the stack.  
10559
10560         Contributed under MIT/X11 license.
10561
10562 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
10563
10564         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
10565
10566         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
10567         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
10568         encode/decode_method_ref ().
10569
10570         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
10571
10572         * aot-runtime.c (decode_patch): Ditto.  
10573
10574         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
10575         MONO_PATCH_INFO_METHOD.
10576
10577         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
10578         MonoGenericJitInfo.
10579
10580         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
10581         MonoGenericJitInfo.
10582
10583         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
10584
10585         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
10586         one from the caller.
10587
10588         * aot-runtime.c (decode_generic_inst): New function to decode and
10589         return a interned generic inst.
10590         (decode_klass_ref): Use it.
10591         (decode_method_ref): Ditto.
10592
10593         * aot-compiler.c (emit_exception_debug_info): Save 
10594         jinfo->has_generic_jit_info too.
10595
10596 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
10597
10598         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
10599
10600         * iltests.il.in: Add a test for fconv_to_i.
10601
10602         * liveness.c: Disable the liveness2 pass for now to save space.
10603
10604         * regalloc2.c: Include mempool-internals.h to fix warnings.
10605
10606         * aot-compiler.c (encode_method_ref): Encode the context of generic
10607         instance methods.
10608
10609         * aot-runtime.c (decode_method_ref): Inflate generic methods using
10610         the context saved in the aot file.
10611
10612         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
10613
10614         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
10615
10616         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
10617         volatile so they won't be optimized away.
10618
10619 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
10620
10621         * ssa.c:
10622         * ssa2.c:
10623         * mini.c:
10624         * regalloc2.c:
10625         * dominators.c: Remove duplicated functions that now are in
10626         mempool-internals.h.
10627
10628 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
10629
10630         * aot-compiler.c: Fix warnings.
10631
10632         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
10633
10634         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
10635
10636         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
10637         as the patch type.
10638
10639         * mini.c (mono_resolve_patch_target): Ditto.
10640         
10641         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
10642         (encode_klass_ref): Add support for encoding VARs/MVARs.
10643
10644         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
10645
10646         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
10647         the handling of the got entries into a separate 'decode_got_entry' function.
10648         Add support for RGCTX_FETCH.
10649
10650         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
10651         clobbered by the trampoline code.
10652
10653         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
10654         not clobbered by the indirect calling code.
10655
10656 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
10657
10658         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
10659         to fix the build.
10660
10661 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
10662
10663         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
10664         signature using the compilation mempool otherwise we would leak it.
10665
10666 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
10667
10668         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
10669         mono_emit_abs_call ().
10670
10671         * patch-info.h: Add GENERIC_CLASS_INIT.
10672
10673         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
10674
10675         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
10676         as their target as a near call.
10677
10678         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
10679         ABS handling code.
10680         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
10681
10682         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
10683         call to a runtime function described by a patch.
10684
10685         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
10686         mono_emit_abs_call, this has the advantage that the ABS handling code in
10687         mono_codegen () can handle them both, and can handle other stuff in the
10688         future without additional code.
10689
10690         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
10691         entry.
10692         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
10693         abs addresses.
10694
10695         * mini.h: Add missing bblock related prototypes.
10696
10697         * mini.h (MonoCompile): Remove unused reverse_inst_list and
10698         reverse_inst_list_len fields.
10699
10700         * mini.c: Refactor this file a bit by moving branch optimizations to 
10701         branch-opts.c.
10702
10703         * method-to-ir.c: Merge generic sharing changes missed earlier.
10704
10705         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
10706
10707         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
10708         shared patches. Process METHODCONST as a shared patch.
10709
10710         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
10711         as it crashes on the 2.0 mscorlib.
10712
10713         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
10714         to cause crashes.
10715         
10716         * aot-compiler.c: Use is_plt_patch () in a few additional places.
10717         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
10718         by IMT.
10719
10720         * aot-compiler.c: Reorganize the got handling code to be a bit more
10721         understandable.
10722
10723 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
10724
10725         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
10726         mono_patch_info_equals/hash, and use it to massively simplify
10727         get_plt_index ().
10728
10729         * mini.c (mono_patch_info_hash): Simplify this and add support for
10730         more patch types.
10731
10732         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
10733
10734         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
10735         handling code, since an offset is not enough to identify a trampoline.
10736
10737         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
10738
10739 2008-08-17  Mark Probst  <mark.probst@gmail.com>
10740
10741         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
10742
10743         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
10744
10745         * mini-ops.h: Argument and result types for OVF_CARRY ops.
10746
10747         * decompose.c: PPC decompositions for various ops.
10748
10749         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
10750
10751 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
10752
10753         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
10754         call the generic trampoline code using a call, instead of a jump, to
10755         remove some special casing from the generic trampoline code.
10756
10757         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
10758         (mono_codegen): Ditto.
10759
10760         * aot-compiler.c aot-runtime.c: Ditto.
10761
10762         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
10763
10764         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
10765         helper function to find the offset corresponding to a lazy fetch trampoline.
10766
10767         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
10768         when doing generic sharing.
10769
10770         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
10771         places.
10772         
10773         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
10774         mini-trampolines.c to be with the other trampoline creation functions.
10775
10776         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
10777         as it is equal to method->signature in most cases, add a 
10778         mono_emit_method_call_full variant which takes a signature and an imt
10779         argument as well.
10780
10781 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
10782
10783         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
10784         to this function, since it could be computed easily from the method 
10785         argument.
10786         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
10787         more.
10788
10789         * method-to-ir.c mini.c: Remove references to 
10790         compile_generic_method_wo_context.
10791
10792         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
10793         generic method calls.
10794         
10795         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
10796         dimensional non-szarrays.
10797
10798         * mini.c (mini_init): Register mono_array_new_1.
10799
10800         * jit-icalls.c (mono_array_new_1): New jit icall.
10801
10802         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
10803         pointing to the method.
10804
10805         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
10806         method addresses belonging to METHOD_JUMP patches in the 
10807         jump_target_got_slot_hash.
10808         (mono_aot_load_method): Ditto.
10809
10810         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
10811         METHOD_JUMP patches.
10812
10813         * mini.c (mini_create_jit_domain_info): New helper function which 
10814         initializes/frees domain->runtime_info.
10815         (mini_free_jit_domain_info): Ditto.
10816         (mini_init): Install the domain hook functions with the runtime.
10817
10818         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
10819         information maintained by the JIT.
10820
10821         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
10822         insertion into jump_table_hash into mono_codegen (), also implement proper
10823         locking.
10824
10825         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
10826         tail calls, it is already done by the aot code.
10827         
10828         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
10829         mechanism on amd64.
10830
10831         * iltests.il.in: Make the jmp test a bit more complex.
10832
10833         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
10834         generic instances which doesn't have a token.
10835
10836         * aot-runtime.c (decode_method_ref): Ditto.
10837         
10838         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
10839         can handle this case now.
10840         (handle_box): Ditto.
10841
10842 2008-08-15  Geoff Norton  <gnorton@novell.com>
10843
10844         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
10845         debugging check.
10846
10847 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
10848
10849         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
10850         calling generic methods.
10851
10852         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
10853
10854         * aot-runtime.c (decode_patch_info): Ditto.
10855
10856         * mini.c (mono_resolve_patch_target): Ditto.
10857         
10858         * patch-info.h: Add METHOD_RGCTX.
10859
10860         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
10861
10862 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
10863
10864         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
10865         arguments in registers.
10866
10867         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
10868         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
10869
10870         * mini.c (mini_method_compile): Abort aot compilation for generic
10871         methods if generic sharing is disabled.
10872         
10873         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
10874         an mrgctx.
10875
10876         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
10877         requiring an mrgctx.
10878
10879         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
10880         store instructions when converting a vcall to a normal call.
10881
10882         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
10883         mono_arch_find_jit_info.
10884
10885 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
10886
10887         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
10888         avoid calling mono_method_full_name () for every method even if the
10889         env var is not set.
10890         (check_inline_caller_method_name_limit): Ditto.
10891
10892 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
10893
10894         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
10895         assemblies in one run.
10896
10897         * aot-compiler.c (mono_compile_assembly): Only print out a count of
10898         skipped methods if it is not 0.
10899
10900         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
10901
10902 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
10903
10904         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
10905           MONO_ARCH_HAVE_UNWIND_TABLE.
10906
10907         Contributed under MIT/X11 license.
10908
10909 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
10910
10911         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
10912           from default optimizaton list on Winx64.
10913
10914         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
10915
10916         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
10917           the LMF from the MonoJitTlsData structure.
10918
10919         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
10920
10921         Contributed under MIT/X11 license.
10922
10923 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
10924
10925         * mini.c (sigsegv_signal_handler): Fix the build.
10926
10927         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
10928         assembly->aot_module.
10929
10930         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
10931         hash table. This simplifies and speeds up a lot of code, and fixes support
10932         for .netmodules.
10933
10934         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
10935         with the runtime.
10936
10937         * mini-exceptions.c: Ditto.
10938         
10939         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
10940         'native_offset' argument, since these are computed in the 
10941         mono_find_jit_info () function.
10942
10943         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
10944         is used by exceptions-ppc.c.
10945
10946         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
10947         mono_arch_find_jit_info ().
10948         
10949         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
10950         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
10951         generic code in mini-exceptions.c.
10952
10953 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
10954
10955         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
10956
10957         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
10958         
10959         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
10960         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
10961         called while holding the loader lock. Fixes #415608.
10962         (mono_aot_get_method_from_token_inner): Ditto.
10963
10964 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
10965
10966         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
10967         to reduce differences between this and the generic implementation in
10968         mini-exceptions.c.
10969         (ves_icall_get_frame_info): Ditto.
10970
10971         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
10972
10973         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
10974         longer neccesarry.
10975
10976         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
10977         mono_arch_get_call_filter () and make it non-static, for consistency with the
10978         other architectures.
10979
10980 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
10981
10982         * mini.c:
10983         * local-propagation.c:
10984         * mini-x86.c: Correct the name of arch defines.
10985
10986 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
10987
10988         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
10989         NO_EMULATE_LONG_SHIFT_OPS define.
10990
10991 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
10992
10993         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
10994         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
10995
10996         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
10997         MACH fixes. Merged from the 2.0 branch.
10998
10999         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
11000
11001         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
11002         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
11003
11004         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
11005
11006         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
11007         mono_marshal_get_native_wrapper () signature changes.
11008
11009 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
11010
11011         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
11012         conversion bug under arm.
11013
11014 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
11015
11016         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
11017
11018         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
11019         with overflow checking.
11020
11021 2008-08-05  Marek Habersack  <mhabersack@novell.com>
11022
11023         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
11024         to the genmdesc.pl file
11025
11026 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
11027
11028         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
11029         arg_array in the soft-float versions of the LOAD/STORE macros.
11030
11031         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
11032         implementation.
11033
11034         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
11035
11036 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
11037
11038         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
11039         a float HFA. Fixes #413621.
11040
11041 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
11042
11043         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
11044         frame_size to args_size. Fixes build.
11045
11046 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
11047
11048         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
11049         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
11050
11051         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
11052         the stack are not unaligned. Fixes #413247.
11053         
11054 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
11055
11056         * mini.c: update jitted methods performance counters.
11057
11058 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
11059
11060         * mini-exceptions.c: increase the exceptions thrown performance
11061         counter in mono_handle_exception ().
11062
11063 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
11064
11065         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
11066         can work with netmodules.
11067
11068 2008-07-28  Geoff Norton  <gnorton@novell.com>
11069
11070         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
11071         regression tests.
11072
11073 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
11074
11075         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
11076         correct place.
11077
11078 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
11079
11080         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
11081           The float param registers and other param registers must be the 
11082           same index on Windows x64.
11083
11084         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
11085           ArgValuetypeAddrInIReg argument case.  Setting the argument
11086           op to OP_VTARG_ADDR (OP_REGOFFSET)).
11087
11088         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
11089           variable computed above as the copy length for arguments of storage
11090           type ArgValuetypeAddrInIReg.
11091
11092         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
11093           ArgValuetypeAddrInIReg argument case.  This case will rely on
11094           mono_arch_emit_outarg_vt to emit the correct code later in the process.
11095
11096         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
11097           a 32 byte stack allocation for all calls.  We will omit the adjustment for
11098           jump and tail call instructoins as they do not follow the typical call behavior.
11099
11100         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
11101           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
11102           local variable and pass the local variable by reference to the called method.
11103
11104         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
11105           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
11106           of a struct is passed in a register it must be saved with the other
11107           volatile argument on the stack.
11108
11109         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
11110           frame pointer the stack adjustment value must be saved to the unwind 
11111           info structure.
11112
11113         Contributed under MIT/X11 license.
11114
11115 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
11116
11117         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
11118         which got lost in the merge.
11119
11120 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
11121
11122         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
11123         build.
11124
11125         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
11126         
11127         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
11128         icalls, since they won't be patched.
11129
11130         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
11131         different code sequence when running under valgrind to prevent some valgrind
11132         errors.
11133
11134         * iltests.il.in: Add new regression test.
11135
11136         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
11137         end with a throw.
11138
11139         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
11140         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
11141
11142         * iltests.il.in: Add new test.
11143
11144         * aot-compiler.c: Fix some warnings.
11145
11146         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
11147         Fixes #412494.
11148
11149 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
11150
11151         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
11152         (mini_usage_jitdeveloper): Add a missing --wapi option.
11153
11154 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
11155
11156         * mini-codegen.c: Simplify the is_fp macros.
11157         (free_up_ireg): Remove, use free_up_reg instead.
11158         (free_up_reg): Fix the fp case.
11159
11160 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
11161
11162         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
11163         lowered earlier.
11164
11165         * exceptions-x86.c: Merge some changes which seemed to have got lost
11166         in the linear-ir merge.
11167
11168         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
11169
11170         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
11171         long vreg volatile even if the variable was already created.
11172
11173         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
11174         volatile variables.
11175
11176 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
11177
11178         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
11179
11180         * mini.c (mono_jit_compile_method_inner): Add support for 
11181         MONO_EXCEPTION_BAD_IMAGE.
11182
11183         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
11184         mini_method_get_context () returns NULL. Fixes #356531.
11185
11186         * mini.c (mono_method_to_ir): Ditto.
11187         
11188         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
11189         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
11190
11191 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
11192
11193         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
11194         in the LDFTN implementation.
11195
11196 2008-07-25  Mark Probst  <mark.probst@gmail.com>
11197
11198         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
11199         code, patch calls to icalls, too, even if they're not in the
11200         shared generic code hash.  Fixes #411962.
11201
11202 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
11203
11204         * cpu-x86.md: Increase the length of the fcall opcodes.
11205
11206         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
11207         calls returning floats.
11208
11209         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
11210         on NEWARR.
11211         
11212         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
11213         missed earlier.
11214
11215         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
11216         into the domain->method_code_hash.
11217
11218         * aot-compiler.c: Fix win32 build.
11219
11220         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
11221         
11222         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
11223         gshared NEWARR implementation.
11224
11225         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
11226
11227         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
11228         can be used outside of method_to_ir.
11229
11230         * mini.h (MonoCompile): Add arg_types field.
11231
11232         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
11233         
11234         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
11235         the values of the local arg_array and param_types array.
11236
11237 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
11238
11239         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
11240         got accesses might only get generated later when NEWOBJ is decomposed.
11241         
11242         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
11243         looking up the native code of the target method when a delegate is called
11244         for the first time.
11245
11246         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
11247         optimization.
11248
11249         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
11250
11251         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
11252         AOT work on platforms without a working dlsym implementation.
11253
11254         * mini.h: Bump AOT image format version.
11255         
11256 2008-07-24  Mark Probst  <mark.probst@gmail.com>
11257
11258         * mini-exceptions.c: Free a MonoType with
11259         mono_metadata_free_type() instead of g_free().
11260
11261         * aot-runtime.c: Free a MonoType.
11262
11263 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
11264
11265         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
11266         optimization.
11267
11268         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
11269         fp stack on x86.
11270
11271 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
11272         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
11273         profiler hook.
11274
11275 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
11276
11277         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
11278         NEWOBJ calls on valuetypes.
11279
11280         * iltests.il.in: Add new test.
11281
11282         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
11283
11284 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
11285
11286         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
11287         is no longer needed.
11288
11289         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
11290         non register sized integer arguments.
11291         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
11292         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
11293         emit_memcpy2 ().
11294
11295         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
11296         CEE_MONO_RETOBJ.
11297         
11298         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
11299         two a binop with different sized arguments is emitted.
11300
11301         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
11302         instruction in the ins==NULL case.
11303
11304 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
11305
11306         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
11307
11308         * mini-x86.c: Fix osx build.
11309
11310         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
11311         opcodes as well.
11312
11313         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
11314         instruction for non int sized variables.
11315
11316         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
11317         implementation.
11318
11319 2008-07-23  Robert Jordan  <robertj@gmx.net>
11320
11321         * method-to-ir.c: Fix MSVC build.
11322
11323 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
11324
11325         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
11326         a non int sized type, widen it to an int since newer versions of gcc seem to
11327         generate code which needs this.
11328
11329         * ssa2.c abcremoval2.c: Fix warnings.
11330
11331         * *: Merge the Linear IR branch.
11332
11333         The original branch is at trunk/branches/vargaz/mini-linear-il, and
11334         the ChangeLog file there describes all the changes done over the years. 
11335         Further documentation can be found at www.mono-project.com/Linear_IL.
11336
11337 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
11338
11339         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
11340           The float param registers and other param registers must be the 
11341           same index on Windows x64.
11342
11343         Contributed under MIT/X11 license.
11344
11345 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
11346
11347         * mini.c: Make the previous fix GC safe.
11348
11349 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
11350
11351         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
11352
11353 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
11354
11355         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
11356           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
11357           ArgValuetypeAddrInIReg instead.
11358
11359         Contributed under MIT/X11 license.
11360
11361 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
11362
11363         * mini-codegen.c (get_register_spilling): Fix a warning.
11364
11365 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
11366
11367         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
11368         for types which the initialization fails. Raises the provided exception
11369         at the right stop after cleanup.
11370
11371 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
11372
11373         * aot-compiler.c: Free most of the memory allocated during compilation.
11374
11375         * mini.c (mini_parse_debug_options): Fix a leak.
11376         
11377         * mini.c (mini_method_compile): Don't add the method to the jit info tables
11378         during aot compilation.
11379
11380 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
11381
11382         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
11383         it has too much register pressure.
11384
11385 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
11386
11387         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
11388
11389 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
11390
11391         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
11392         on x86.
11393
11394         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
11395         on amd64 similar to the way it is done on arm.
11396
11397         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
11398
11399         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
11400         consistency, normalize error messages, avoid loading aot-only modules in
11401         normal mode.
11402
11403         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
11404         for consistency.
11405
11406         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
11407
11408 2008-07-11  Martin Baulig  <martin@ximian.com>
11409
11410         * debug-debugger.h
11411         (MonoDebuggerInfo): Add `interruption_request'.
11412
11413 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
11414
11415         * aot-compiler.c (emit_plt): Remove some dead code.
11416
11417         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
11418
11419         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
11420         return the plt info offset belonging to a given plt entry.
11421
11422         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
11423         mono_aot_get_plt_info_offset.
11424         
11425         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
11426         similar to the amd64 code by makeing jumps through a separate jump table 
11427         instead of embedding the jump addresses into the code.
11428
11429 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
11430
11431         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
11432         method.
11433
11434 2008-07-10  Martin Baulig  <martin@ximian.com>
11435
11436         * mini.c (mini_method_compile): Disable generics sharing when
11437         running in the debugger.
11438
11439 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
11440
11441         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
11442
11443         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
11444         the local register allocator from running out of registers on x86 when 
11445         using aot.
11446
11447 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
11448
11449         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
11450         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
11451         C4146.
11452
11453         Contributed under MIT/X11 license.
11454
11455 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
11456
11457         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
11458         speed up the assembler.
11459
11460 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
11461
11462         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
11463         support.
11464
11465         * mini.c: Move the soft float handling macros a bit earlier, add 
11466         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
11467         place.
11468
11469         * mini.h: Add prototype for mono_arch_fixup_jinfo.
11470
11471         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
11472         read-only to help catch code allocation requests.
11473         
11474         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
11475         and turn it off when using --aot-only or when compiling with --aot=full.
11476
11477         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
11478         jump table for switches from the normal domain mempool, not the code
11479         manager.
11480
11481         * mini-trampolines.c (get_unbox_trampoline): New function to return an
11482         unbox trampoline which handles aot-only mode too.
11483
11484         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
11485         an AOTed unbox trampoline.
11486
11487         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
11488
11489 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
11490
11491         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
11492         ""
11493
11494         Contributed under MIT/X11 license.
11495
11496 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
11497
11498         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
11499           the unwind information for the method at the end of the allocated block.
11500           
11501         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
11502           MonoCompileArch to hold the unwind info for SEH on Winx64
11503         
11504         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
11505           frame pointer info for the method being compiled.
11506           
11507         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
11508           the call to mono_exception_from_token.
11509           
11510         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
11511           storing the method prolog information in a format that the Winx64 SEH can understand.  This
11512           information is stored a the end of the method block because it is all 32-bit offset based.
11513
11514         Contributed under MIT/X11 license.
11515
11516 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
11517
11518         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
11519
11520         * wapihandles.c: Fix warnings.
11521
11522         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
11523         mode.
11524
11525         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
11526         mono_jit_compile_method in aot-only mode since that calls the type 
11527         initializer.
11528         
11529         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
11530         get_delegate_invoke_impl in aot-only mode.
11531
11532         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
11533
11534 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
11535
11536         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
11537
11538         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
11539         is on by default.
11540
11541         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
11542
11543         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
11544         init trampoline from the AOT file as well.
11545
11546         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
11547         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
11548         code.
11549
11550         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
11551         mono_init.
11552
11553         * exceptions-amd64.c: Add _full variants for the remaining exception code
11554         creation functions as well, allow emission of relocatable code, remove
11555         caching since that is now done by the caller.
11556
11557         * mini-exceptions.c: Add _full variants for the remaining exception code
11558         creation functions as well, add aot-only support.
11559
11560         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
11561         if we can determine a proper token for them.
11562         (add_wrappers): Add a few more wrappers.
11563         (emit_method_code): Remove some dead code.
11564         (emit_trampolines): Emit exception code too.
11565
11566         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
11567
11568         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
11569         mono_array_new_va which avoids varargs.
11570
11571         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
11572
11573         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
11574         mono_arch_create_specific_trampoline () in all places.
11575
11576         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
11577         a bit so it can be used for other things as well.
11578         
11579         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
11580         on demand as well.
11581
11582         * exceptions-amd64.c: Rename the caching from the exception code creation
11583         functions, it is done by the caller instead.
11584         
11585         * exceptions-amd64.c: Change the signature of the exception code creation 
11586         functions to allow the creation of relocatable code later.
11587
11588         * mini-exceptions.c: Add a set of functions to query the various 
11589         runtime-generated exception functions.
11590
11591         * mini.c mini-exceptions.c: Use the newly added functions instead of the
11592         mono_arch_.. () functions.
11593         
11594 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
11595
11596         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
11597
11598         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
11599
11600         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
11601         (mini_get_vtable_trampoline): Ditto.
11602
11603         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
11604         code in the AOT case by returning the code size and a list of relocations to
11605         the caller.
11606
11607         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
11608
11609 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
11610
11611         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
11612           clean the stack.
11613
11614         Contributed under MIT/X11 license.
11615
11616 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
11617
11618         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
11619         so the buffer size can be computed correctly. Fixes #404735.
11620
11621         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
11622         normally as cfg->debug_info is already freed.
11623
11624 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
11625
11626         * mini-amd64.c: For calls returning vtypes in registers, don't store
11627         the return address on the stack, instead allocate a separate local for
11628         it. Fixes #404729.
11629
11630 2008-07-05  Mark Probst  <mark.probst@gmail.com>
11631
11632         * mini-trampolines.c, mini.h: Add an argument to
11633         mono_create_jit_trampoline_in_domain() for turning off the adding
11634         of the sync wrapper.
11635
11636         * mini.c: Use the JIT trampoline without sync instead of
11637         ldftn_nosync in static RGCTX invoke wrappers so that the call can
11638         be patched.
11639
11640 2008-07-04  Mark Probst  <mark.probst@gmail.com>
11641
11642         * driver.c: Turn on GSHARED optimization by default.
11643
11644 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
11645
11646         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
11647         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
11648
11649         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
11650         create a variant of the generic trampoline code callable from AOTed trampolines.
11651
11652         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
11653         trampoline code callable from AOTed trampolines.
11654
11655         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
11656
11657 2008-07-04  Mark Probst  <mark.probst@gmail.com>
11658
11659         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
11660         pass-through manner.
11661
11662         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
11663         and don't fail sharing for them anymore.
11664
11665         * mini-exceptions.c: Handle exceptions in shared generic methods.
11666
11667         * generic-sharing.c: When checking the context of a generic
11668         method, also check its class's context.  Don't treat wrappers as
11669         sharable.
11670
11671         * mini-trampolines.c: Some code factored out to
11672         metadata/generic-sharing.c.  Handle the MRGCTX case.
11673
11674         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
11675         we must deal with the method being of another instantiation of the
11676         class.  Add static rgctx invoke wrappers to generic methods.
11677
11678 2008-07-04  Mark Probst  <mark.probst@gmail.com>
11679
11680         * mini.c: Provide all jit infos of generic shared methods with a
11681         generic jit info.
11682
11683         * mini-exceptions.c: Handle the new situation that a generic info
11684         might be available, but not info about the this/vtable/mrgctx
11685         variable.
11686
11687 2008-07-03  Mark Probst  <mark.probst@gmail.com>
11688
11689         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
11690         generic methods.
11691
11692 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
11693
11694         * dominators.c (check_dominance_frontier): Fix a warning.
11695
11696         * mini.h: Add some missing prototypes.
11697
11698         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
11699
11700         * driver.c (mono_jit_init_version): Correct the comments since the first
11701         argument should be the name of the root domain, not a filename.
11702
11703         * aot-runtime.c (make_writable): Error out if this is called while running
11704         with --aot-only.
11705         (load_aot_module): Ditto.
11706
11707         * aot-compiler.c: Really fix the computation of method indexes.
11708
11709         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
11710         optimizations as this is no longer called frequently.
11711
11712         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
11713         method and the invoke impl code and pass it to the delegate trampoline instead of
11714         just the delegate class.
11715
11716 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
11717
11718         * aot-compiler.c: Fixup the computation of method indexes.
11719         (add_wrappers): Create the base methods of the runtime invoke wrappers using
11720         the method builder infrastructure.
11721
11722         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
11723         has no header.
11724
11725         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
11726         mode, load the method right away instead of creating a trampoline.
11727
11728         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
11729
11730         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
11731         some checks a bit.
11732
11733 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
11734
11735         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
11736         (mono_aot_load_method): Use method_index instead of method->token.
11737
11738         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
11739         can handle icalls etc. properly.
11740
11741         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
11742
11743         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
11744
11745         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
11746         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
11747         JIT_ICALL_ADDR patch type.
11748
11749         * patch-info.h: Add JIT_ICALL_ADDR patch type.
11750
11751         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
11752         request flag.
11753         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
11754
11755         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
11756
11757 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
11758
11759         * mini.c: Use domain->jit_code_hash_lock for controlling access to
11760         domain->jit_code_hash.
11761
11762 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
11763
11764         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
11765
11766 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
11767
11768         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
11769         get_this_arg_from_call, let it compute it when needed.
11770
11771         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
11772         gsctx from code only when needed.
11773
11774         * mini-trampolines.c (get_generic_context): Rename this to 
11775         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
11776         it can be called by the arch backends.
11777
11778         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
11779
11780 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
11781
11782         * driver.c (mono_main): Add experimental --aot-only command line option.
11783
11784         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
11785         set.
11786
11787 2008-06-26  Kornel Pal  <kornelpal@gmail.com>
11788
11789         * driver.c (DllMain): Remove mono_module_handle.
11790
11791         Contributed under MIT/X11 license.
11792
11793 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
11794
11795         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
11796         for emitting methods which are not in the source assembly. Detect and report
11797         failure of assembling+linking.
11798         
11799         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
11800
11801         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
11802
11803 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
11804
11805         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
11806
11807 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
11808
11809         * mini.h: Remove some obsolete prototypes.
11810
11811         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
11812
11813 2008-06-24  Mark Probst  <mark.probst@gmail.com>
11814
11815         * mini.c (get_object_generic_inst): Variable-sized arrays are not
11816         supported by Visual Studio, so use alloca().
11817
11818 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
11819
11820         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
11821         Fixes #402585.
11822
11823 2008-06-23  Mark Probst  <mark.probst@gmail.com>
11824
11825         * mini.c: Fail sharing of a generic method if it contains an open
11826         catch clause (because we don't pass MRGCTXs yet).
11827
11828 2008-06-23  Mark Probst  <mark.probst@gmail.com>
11829
11830         * mini.c: When compiling a method with generic sharing, insert the
11831         method instantiated with an all-Object generic context into the
11832         jit info table, instead of the context of the first instantiation
11833         of the method we happen to compile.
11834
11835 2008-06-18  Martin Baulig  <martin@ximian.com>
11836
11837         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
11838         `major_version' and `minor_version'.
11839
11840 2008-06-17  Mark Probst  <mark.probst@gmail.com>
11841
11842         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
11843         mono_method_is_generic_sharable_impl() takes an additional
11844         argument specifying whether to treat type variables as reference
11845         types.
11846
11847 2008-06-17  Mark Probst  <mark.probst@gmail.com>
11848
11849         * mini.h: Removed obsolete prototypes.
11850
11851 2008-06-17  Mark Probst  <mark.probst@gmail.com>
11852
11853         * mini.c: Don't fail generic sharing for initobj and sizeof - we
11854         already handle them.
11855
11856 2008-06-17  Mark Probst  <mark.probst@gmail.com>
11857
11858         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
11859         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
11860         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
11861         tramp-x86.c: Added a MonoGenericContext* argument to
11862         mono_arch_get_unbox_trampoline() so that it can call other
11863         functions which require it.
11864
11865 2008-06-17  Mark Probst  <mark.probst@gmail.com>
11866
11867         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
11868         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
11869         mono_arch_get_this_arg_from_call() takes a
11870         MonoGenericSharingContext* as well.
11871
11872 2008-06-17  Mark Probst  <mark.probst@gmail.com>
11873
11874         * mini.c: Factor out code for emitting unbox into emit_unbox() and
11875         implement generic sharing of unbox.
11876
11877 2008-06-17  Mark Probst  <mark.probst@gmail.com>
11878
11879         * mini.c: Don't compute the vtable to determine whether a field is
11880         special static, because it might not work for open types.
11881
11882 2008-06-17  Mark Probst  <mark.probst@gmail.com>
11883
11884         * mini.c: Removed the unused token_type and token_source arguments
11885         from get_runtime_generic_context_ptr().
11886
11887 2008-06-17  Marek Habersack  <mhabersack@novell.com>
11888
11889         * mini.c (ADD_BINOP): fix the build
11890
11891 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
11892
11893         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
11894         a widening op.
11895
11896 2008-06-16  Mark Probst  <mark.probst@gmail.com>
11897
11898         * mini.h: Removed class relations enum that's not used anymore.
11899
11900 2008-06-16  Mark Probst  <mark.probst@gmail.com>
11901
11902         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
11903
11904         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
11905         the lazy fetch trampoline access code.
11906
11907 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
11908
11909         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
11910
11911 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
11912
11913         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
11914
11915         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
11916
11917         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
11918
11919 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
11920
11921         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
11922         intrinsics.
11923
11924         * mini-ops.h: Add MIN/MAX_UN opcodes.
11925
11926         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
11927         intrinsics.
11928
11929         * basic-math.cs: Add more min/max tests.
11930
11931         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
11932
11933 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11934
11935         * mini.c: Small fix in the prologue of emit_castclass.
11936
11937 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
11938
11939         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
11940
11941         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
11942         do not work even for unsigned types. Fixes #400014.
11943
11944         * basic-math.cs: Add regression tests for unsigned Min/Max.
11945
11946 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11947
11948         * mini.c: Added additional context_used argument to several
11949         functions, which will be needed for sharing generic methods.  Use
11950         GET_RGCTX macro wherever appropriate.  Declare only one
11951         context_used in mono_method_to_ir().
11952
11953 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11954
11955         * mini.c, generic-sharing.c: Removed generic class relations.
11956
11957         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
11958         functions due to MRGCTX changes.
11959
11960 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11961
11962         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
11963         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
11964         with calculated IMT.
11965
11966         * mini.c: Generic sharing of calls via generic interfaces.
11967
11968         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
11969         generic method with non-constant MonoGenericContext*.  Instead,
11970         the context is taken out of the method itself.
11971
11972 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11973
11974         * mini.c: Generic sharing of ldvirtftn.
11975
11976 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11977
11978         * mini.c: Generic sharing of ldftn.
11979
11980 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11981
11982         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
11983
11984 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11985
11986         * mini.c: Generic sharing of the special case of ldtoken followed
11987         by a call to GetTypeFromHandle.
11988
11989 2008-06-13  Mark Probst  <mark.probst@gmail.com>
11990
11991         * mini.c: Generic sharing of box for nullable types.
11992
11993 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
11994
11995         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
11996         are passed on the stack. Fixes #324807.
11997
11998 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
11999
12000         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
12001         for the ArgValuetypeAddrInIReg case.
12002
12003         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
12004         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
12005
12006         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
12007         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
12008         local variable and pass the local variable by reference to the called method.
12009           
12010         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
12011         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
12012
12013         Contributed under MIT/X11 license.
12014
12015 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
12016
12017         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
12018
12019         * debug-mini.c (mono_debug_print_vars): Release memory after printing
12020         everything.
12021
12022 2008-06-10  Martin Baulig  <martin@ximian.com>
12023
12024         * debug-mini.c
12025         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
12026
12027 2008-06-09  Kornel Pal  <kornelpal@gmail.com>
12028
12029         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
12030         possible error when no arguments are passed.
12031
12032         Contributed under MIT/X11 license.
12033
12034 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
12035
12036         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
12037         where the file name is NULL.
12038
12039 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
12040
12041         * mini.c: Fix s390 build.
12042
12043 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
12044
12045         * trace.c (mono_trace_parse_options): Fix warnings.
12046
12047         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
12048
12049 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
12050
12051         * mini.c (remove_block_if_useless): Avoid printing the method name.
12052         
12053         * mini.c: Remove needless setting of ins->cil_code which is now done by 
12054         MONO_INST_NEW.
12055
12056         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
12057         LMF. Not yet used.
12058
12059         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
12060         translated code after it has been patched.
12061
12062 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
12063
12064         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
12065         avoid problems during code patching on SMP systems.
12066         (emit_call): Avoid adding a patch info which is already added by 
12067         emit_call_body.
12068         (mono_arch_emit_exceptions): Ditto.
12069
12070 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
12071
12072         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
12073         MONO_TYPE_ISSTRUCT already checks for it.
12074
12075 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
12076
12077         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
12078           structs with floats on Winx64 the float registers are not used.  
12079           The integer registers are always used..
12080         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
12081           only one register will be used and only if the size of the struct 
12082           is 1,2,4, or 8 bytes.
12083
12084         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
12085           to work for Winx64.
12086
12087         Contributed under MIT/X11 license.
12088
12089 2008-06-05  Martin Baulig  <martin@ximian.com>
12090
12091         * debug-debugger.c (debugger_lookup_class): Also call
12092         mono_class_setup_methods() here; we're only called from RTI.
12093
12094 2008-06-05  Andreas Farber  <andreas.faerber@web.de>
12095
12096         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
12097         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
12098         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
12099         Post-process object files and add dtrace-generated object, if necessary.
12100
12101         Contributed under MIT/X11 license.
12102
12103 2008-06-04  Mark Probst  <mark.probst@gmail.com>
12104
12105         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
12106         element class.
12107
12108         * mini.c: Generic sharing for unbox.any and castclass.
12109
12110 2008-06-04  Mark Probst  <mark.probst@gmail.com>
12111
12112         * mini.c: Ignore tailcall prefix in shared generic code and when
12113         doing calls which require a vtable/rgctx argument.
12114
12115 2008-06-04  Mark Probst  <mark.probst@gmail.com>
12116
12117         * mini.c: Don't free the JIT info.
12118
12119         * driver.c: Changes in the JIT info table testing code.
12120
12121 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
12122
12123         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
12124         interruption. Fix some warnings.
12125
12126         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
12127         interruption_checkpoint.
12128
12129 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
12130
12131         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
12132         from embedding applications.
12133
12134 2008-06-02  William Holmes  <billholmes54@gmail.com>
12135
12136         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
12137           reserving 32 bytes on the stack when making calls. 
12138
12139         Contributed under MIT/X11 license.
12140
12141 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
12142
12143         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
12144         the linear IL branch.
12145
12146         * driver.c: Print out more information for --version on arm.
12147
12148 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
12149
12150         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
12151         bb_exit instead, since out of line bblocks might not actually be emitted
12152         out-of-line.
12153         
12154         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
12155         maximum epilog size for out of line bblocks if tracing is enabled.
12156
12157         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
12158
12159 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
12160
12161         * arrays.cs: Regression tests for allocating arrays with negative sizes.
12162
12163 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
12164
12165         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
12166         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
12167         opcodes.
12168
12169 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
12170
12171         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
12172         the 'value' to store is a constant.
12173
12174         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
12175
12176         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
12177         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
12178
12179 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
12180
12181         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
12182         for accessing method->generic_container.
12183
12184 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
12185
12186         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
12187         
12188         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
12189
12190         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
12191
12192         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
12193         fails.
12194
12195 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
12196
12197         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
12198
12199         * mini.c: Handle the case when mono_class_vtable () fails.
12200
12201 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
12202         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
12203         the stat profiler.
12204
12205 2008-05-22  Mark Probst  <mark.probst@gmail.com>
12206
12207         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
12208         together with domain sharing.
12209
12210 2008-05-22  Mark Probst  <mark.probst@gmail.com>
12211
12212         * mini.c: Treat callvirts to final methods like non-virtual calls
12213         when doing generic sharing, i.e. look them up in the runtime
12214         generic context.
12215
12216 2008-05-22  Mark Probst  <mark.probst@gmail.com>
12217
12218         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
12219         with computed types (for generic sharing).
12220
12221         * mini.c: Generic sharing for mkrefany and refanyval.
12222
12223 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
12224
12225         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
12226         possible.
12227
12228         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
12229         the generic sharing code.
12230         
12231         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
12232         when needed.
12233
12234 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
12235
12236         * mini.h: Remove the declaration of mono_aot_init_vtable ().
12237
12238 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
12239
12240         * driver.c: updated copyright date
12241
12242 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
12243
12244         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
12245         needed.
12246
12247 2008-05-19  Martin Baulig  <martin@ximian.com>
12248
12249         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
12250         pointing to the new `_mono_debug_using_mono_debugger' variable.
12251
12252         * driver.c
12253         (mono_main): Check mono_debug_using_mono_debugger() rather than
12254         the `MONO_INSIDE_MDB' environment variable to check whether we're
12255         inside the debugger.
12256
12257 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
12258
12259         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
12260         argument.
12261
12262 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
12263
12264         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
12265
12266         * mini.c: Added mini_assembly_can_skip_verification. This
12267         function checks if the assembly requested to skip verification. 
12268         Fixes part of #387274.
12269
12270 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
12271
12272         * mini.c (mini_get_method): Disable the check for open generic classes when
12273         using generic sharing.
12274
12275         * generics.cs: Add a test for #387034.
12276
12277         * mini.c (mini_get_method): Check whenever the method class is an open generic
12278         type, and return NULL in that case, causing a verification error. Fixes
12279         #384123.
12280
12281 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
12282
12283         * driver.c (mono_main): Revert r102623. The right
12284         thing to do is to enable the verifier under verifiable
12285         unless a --security flag was passed.
12286
12287         We need this non-trivial behavior for --verify-all otherwise
12288         mcs-compileall won't be able to use it. As it needs everything to
12289         be verified under validil.
12290
12291 2008-05-06  Martin Baulig  <martin@ximian.com>
12292
12293         Fix #383749.
12294
12295         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
12296         (mono_debugger_thread_cleanup): Likewise.
12297         (mono_debugger_extended_notification): Likewise.
12298
12299 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
12300
12301         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
12302         against both inflated and non-inflated methods. We need to check against the
12303         generic definition for cases where the instantiated method is not visible.
12304         We need to check against the inflated types for cases where the instantiation
12305         changes any super type. This fixes #382986.
12306
12307         Note that this doesn't need to be applied to other parts of mono_method_to_ir
12308         that check for visibiliy as generic params only appears as the type subject
12309         of tokens on call opcodes. Field manipulation and ldftn must always
12310         target an exact type.
12311
12312 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
12313
12314         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
12315         if no related --security flag is passed.
12316
12317 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
12318
12319         * mini-arch.h: Prepare support for ppc64.
12320
12321         Contributed under MIT/X11 license.
12322
12323 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
12324
12325         * aot-runtime.c: Prepare support for ppc64.
12326
12327         Contributed under MIT/X11 license.
12328
12329 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
12330
12331         * mini-ops.h: Prepare support for ppc64.
12332
12333         Contributed under MIT/X11 license.
12334
12335 2008-05-04  Andreas Farber  <andreas.faerber@web.de>
12336
12337         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
12338
12339         Contributed under MIT/X11 license.
12340
12341 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
12342
12343         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
12344         assemblies, since aot_name is not a full path, causing us to load MS.NET 
12345         assemblies on windows.
12346
12347 ?2008-04-28  Kornel Pal  <kornelpal@gmail.com>
12348
12349         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
12350         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
12351         * main.c: Use UTF-8 encoded command line instead of Windows default code
12352         page on Windows to support Unicode.
12353         * driver.c (DllMain): New function for mixed-mode assembly support.
12354         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
12355         export __stdcall functions without decoration.
12356
12357         Contributed under MIT/X11 license.
12358
12359 2008-04-28  Mark Probst  <mark.probst@gmail.com>
12360
12361         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
12362         saving it very early.
12363
12364 2008-04-28  Mark Probst  <mark.probst@gmail.com>
12365
12366         * mini.h, mini.c: Lots of code for accessing the old RGCTX
12367         deleted.  The only way to access the new RGCTX is via the
12368         trampline.
12369
12370         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
12371         vtable instead of the RGCTX to static methods.
12372
12373         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
12374         accessing the new RGCTX.
12375
12376         * generic-sharing.c: There is no separation between self, type
12377         arguments and other types in the RGCTX anymore.
12378
12379 2008-04-25  Jonathan Chambers <joncham@gmail.com>
12380
12381         * mini-amd64.c (add_general): Remove previous stack adjustment.
12382         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
12383         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
12384         for 32 bytes of stack space reserved for all calls.
12385         
12386         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
12387         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
12388         adjustment.
12389         
12390         Code contributed under MIT/X11 license.
12391
12392 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
12393
12394         * mini.c (mini_method_verify): Only verify non-inflated methods, check
12395         against the root definition, peeling out method and type instantiations.
12396         Cache verify success results, code that fails verification is still
12397         checked multiple times.
12398
12399 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
12400
12401         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
12402
12403 2008-04-23  Jonathan Chambers <joncham@gmail.com>
12404
12405         * mini-amd64.c (add_general): Always increment stack on Win64.
12406         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
12407         on Win64.
12408         
12409         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
12410         stack based argument handling on Win64.
12411         
12412         Code contributed under MIT/X11 license.
12413
12414 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
12415
12416         * Makefile.am (version.h): Add support for git-svn.
12417
12418 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
12419
12420         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
12421         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
12422         avoiding allocations and libc functions which might deadlock.
12423         
12424         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
12425         'no-gdb-backtrace' option is set.
12426
12427         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
12428
12429         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
12430
12431 2008-04-21  Martin Baulig  <martin@ximian.com>
12432
12433         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
12434         and `get_lmf_addr'; `notification_address' is no longer a pointer.
12435
12436 2008-04-21  Martin Baulig  <martin@ximian.com>
12437
12438         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
12439         `thread_vtable', `event_handler_ptr' and `event_handler'.
12440
12441 2008-04-21  Martin Baulig  <martin@ximian.com>
12442
12443         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
12444         allows delayed initialization of the `executable_code_buffer' when
12445         attaching.
12446
12447 2008-04-21  Martin Baulig  <martin@ximian.com>
12448
12449         * mini.h (mono_debugger_create_notification_function): Removed.
12450         * tramp-*.c (mono_debugger_create_notification_function): Removed.
12451
12452         * mdb-debug-info64.s
12453         (MONO_DEBUGGER__notification_function): Added this in the .text section.
12454
12455         * mdb-debug-info32.s
12456         (MONO_DEBUGGER__notification_function): Added this in the .text section.
12457
12458         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
12459         currently only works on x86 and x86_64, so don't create it on ppc.
12460
12461 2008-04-21  Martin Baulig  <martin@ximian.com>
12462
12463         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
12464
12465         * mini.c
12466         (mini_method_compile): In the fp elimination check, check
12467         `debug_options.mdb_optimizations' in addition to
12468         mono_debug_using_mono_debugger().       
12469
12470         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
12471         disable some JIT optimizations which are only disabled when
12472         running inside the debugger.
12473         Added `--help-debug' option to describe the debugging options.
12474         (parse_debug_options): New static function to parse the `--debug'
12475         options, so we can easily add more stuff in future.
12476
12477 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
12478
12479         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
12480         the method has no body.
12481
12482 2008-04-19  Jonathan Chambers <joncham@gmail.com>
12483
12484         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
12485         assembly is not allowed in MSVC 64-bit compiler. 
12486         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
12487         as we get floating point exceptions everywhere.
12488         
12489         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
12490         correctly align arguments for call to throw_exception.
12491         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
12492         
12493         Code contributed under MIT/X11 license.
12494
12495 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
12496
12497         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
12498
12499 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
12500
12501         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
12502
12503         * mini-amd64.c (NEW_INS): Set cil_code.
12504
12505         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
12506         from mini-amd64.c so all debugger related logic is in one place.
12507
12508         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
12509         later won't have a random ip assigned to them.
12510
12511 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
12512
12513         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
12514         the arch specific function initializes code_size.
12515         (mono_create_delegate_trampoline): Ditto.
12516
12517         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
12518         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
12519         platforms.
12520
12521         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
12522         running under the debugger.
12523
12524         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
12525         debugger.
12526
12527         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
12528         debugger. Also move the disabling of optimizations here from driver.c.
12529         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
12530         debugger.
12531
12532         * mini.h (MonoCompile): Add a few new flags.
12533
12534 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
12535
12536         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
12537         so the cil_code field of created MonoInst's is properly set.
12538         (mini_select_instructions): Ditto.
12539
12540         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
12541         (MONO_INST_NEW_CALL): Ditto.
12542
12543         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
12544         in many places so the ins->cil_code field is properly initialized.
12545
12546         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
12547         place.
12548
12549 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
12550
12551         * mini.c (mini_method_compile): Print a different message when compiling a 
12552         shared method.
12553         
12554         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
12555         > 1.
12556
12557 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
12558
12559         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
12560         SSE2 instructions.
12561
12562         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
12563         
12564 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
12565
12566         * mini.c (handle_stack_args): Make this return void since its return value was
12567         never used. Also set cfg->unverifiable for invalid IL instead of calling
12568         G_BREAKPOINT ().
12569
12570 2008-04-10  Mark Probst  <mark.probst@gmail.com>
12571
12572         * mini.c: Make sure "this" is live in catch clauses with type
12573         variables in shared generic code.
12574
12575 2008-04-08  Mark Probst  <mark.probst@gmail.com>
12576
12577         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
12578         generic_class_is_reference_type() to ensure the proper behaviour
12579         when sharing generic code and the type in question is a type
12580         argument.
12581
12582 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
12583
12584         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
12585         race conditions when printing thread dumps. Fixes #377738.
12586
12587 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
12588         
12589         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
12590         shows up when both MonoInst arguments can cause aliasig.
12591         There is likely no way in the current JIT to trigger this problem, but
12592         it showed up in the development of generics sharing, when in a new
12593         opcode both args of an OP_GROUP can be aliases (addresses of a local).
12594         When the generics sharing code will be committed, its tests will be
12595         valid also for this bug.
12596
12597 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
12598
12599         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
12600         PATCH_INFO_METHOD.
12601
12602         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
12603         NULL.
12604
12605 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
12606
12607         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
12608         use a more detailed exception message for InvalidCastException.
12609
12610         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
12611
12612         * driver.c (mono_main): Add --debug=casts option to turn on better 
12613         InvalidCastException message details.
12614
12615         * mini.c (mini_get_debug_options): New helper function to return the address of
12616         the debug_options variable.
12617
12618         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
12619         the jit_tls TLS variable.
12620
12621         * mini.c (mono_jit_tls): New TLS variable.
12622
12623         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
12624         option is used.
12625
12626 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
12627
12628         * mini.h: Removed verifer related stuff. This code was moved to verify.c
12629
12630         * mini.c: Removed verifer related stuff, code moved to verify.c.
12631
12632         * driver.c: Using code from verify.c instead of mini.c.
12633
12634 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
12635
12636         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
12637         longer valid.
12638
12639 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
12640
12641         * mini.c (check_for_method_verify): Enabling verification of
12642         corlib if mono_verify_all is set. Bugs in the verifier preventing that
12643         have been fixed.
12644
12645 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
12646
12647         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
12648         caller saved registers as well.
12649         
12650         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
12651         saved registers as well.
12652
12653 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
12654
12655         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
12656
12657         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
12658         code.
12659
12660 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
12661
12662         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
12663         to get_call_info.
12664         (get_call_info): Take a gsctx argument instead of 'cfg'.
12665
12666 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
12667
12668         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
12669         mono_verify_all is set.
12670
12671         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
12672
12673         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
12674
12675 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
12676
12677         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
12678         an exception.
12679
12680         * driver.c mini.c mini.h: Add a --verify-all development option to test the
12681         verifier and the code generated by the compiler.
12682
12683 2008-03-25  Mark Probst  <mark.probst@gmail.com>
12684
12685         * mini.c: Generic sharing of the non-nullable case of the box
12686         instruction.
12687
12688 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
12689
12690         * inssel.brg: Fix the build.
12691
12692         * iltests.il.in: Add a test for lconv.ovf.u8.un.
12693
12694 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
12695
12696         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
12697         Array:Address. Fixes #372410.
12698
12699         * iltests.il.in: New tests for readonly prefix.
12700
12701 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
12702
12703         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
12704         mini-trampolines.c.
12705
12706         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
12707         mini-exceptions.c.
12708
12709         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
12710         
12711         * mini.c (mono_decompose_op_imm): New helper function.
12712
12713         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
12714         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
12715         return value.
12716
12717         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
12718         mono_arch_output_basic_block. Fix warnings.
12719
12720         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
12721         for now.
12722
12723 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
12724
12725         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
12726         since the extra frame is now detected automatically inside the loop.
12727
12728         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
12729         opts which are now in mono_peephole_ins ().
12730         
12731         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
12732
12733         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
12734         frames and skip duplicate managed-to-native frames. Fixes #367665.
12735
12736         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
12737         opts which are now in mono_peephole_ins ().
12738         (mono_arch_peephole_pass_2): Ditto.
12739
12740         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
12741
12742         * mini-codegen.c (mono_peephole_ins): New helper function containing the
12743         arch independent peephole optimizations.
12744
12745         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
12746         opts which are now in mono_peephole_ins ().
12747
12748         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
12749         
12750         * mini-s390.c (mono_arch_output_basic_block): Fix build.
12751
12752         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
12753         pattern.
12754
12755         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
12756         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
12757         opcode. 
12758
12759 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
12760
12761         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
12762         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
12763         return value.
12764
12765         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
12766         mono_arch_output_basic_block. Fix warnings.
12767
12768 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
12769
12770         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
12771         conv.ovf.u.un.
12772
12773 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
12774
12775         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
12776         conv.ovf.u.un.
12777
12778         * iltests.il: Add new tests.
12779
12780 2008-03-20  Kornel Pal  <kornelpal@gmail.com>
12781
12782         * mini.c: Removed Windows version macros.
12783
12784 2008-03-20  Mark Probst  <mark.probst@gmail.com>
12785
12786         * generic-sharing.c: Put reflection types in the extensible part
12787         of the runtime generic context.
12788
12789         * mini.c: Generic sharing of the GetTypeHandle special case of the
12790         ldtoken instruction.
12791
12792 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
12793
12794         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
12795
12796         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
12797         
12798         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
12799         consistency with the other version on the linear IR branch.
12800
12801         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
12802
12803         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
12804
12805         * iltests.il.in: Add new tests.
12806
12807 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
12808
12809         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
12810
12811         * iltests.il.in: Add new tests.
12812
12813 2008-03-19  Mark Probst  <mark.probst@gmail.com>
12814
12815         * mini.c: Two variables with the same name were declared in
12816         nesting contexts and one wasn't initialized.  Fixed.
12817
12818 2008-03-19  Mark Probst  <mark.probst@gmail.com>
12819
12820         * mini.c: Generic sharing of the initobj instruction.
12821
12822 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
12823
12824         * mini.c: make the test to optimize ldtoken from typeof() more
12825         precise.
12826
12827 2008-03-18  Mark Probst  <mark.probst@gmail.com>
12828
12829         * mini.c: Generic sharing of the initobj instruction for reference
12830         types.
12831
12832 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
12833
12834         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
12835         the mono_breakpoint_clean_code() code to perform bound checks.
12836
12837 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
12838
12839         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
12840         mono_arch_patch_callsite() to include the start of the managed method
12841         to be able to perform bound checks.
12842
12843 2008-03-17  Mark Probst  <mark.probst@gmail.com>
12844
12845         * mini.c: Generic sharing for the isinst instruction.
12846
12847 2008-03-17  Mark Probst  <mark.probst@gmail.com>
12848
12849         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
12850         inssel-long32-mips.brg: Added opcodes for doing indirect calls
12851         with the runtime generic context argument.
12852
12853         * mini.c: Share calls to several types of unsharable methods by
12854         putting the address of the method code in the runtime generic
12855         context and doing an indirect call.
12856
12857         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
12858         to switches.
12859
12860 2008-03-16  Mark Probst  <mark.probst@gmail.com>
12861
12862         * generic-sharing.c: Change due to a change in the runtime genric
12863         context API.
12864
12865 2008-03-15  Martin Baulig  <martin@ximian.com>
12866
12867         * tramp-x86.c
12868         (mono_arch_nullify_class_init_trampoline): Add call to
12869         mono_breakpoint_clean_code() to make things work when running
12870         inside the debugger.
12871
12872         * tramp-amd64.c
12873         (mono_arch_nullify_class_init_trampoline): Add call to
12874         mono_breakpoint_clean_code() to make things work when running
12875         inside the debugger.
12876
12877 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
12878
12879         * inssel-long.brg (reg): Fix 64 bit build.
12880
12881 2008-03-14  Mark Probst  <mark.probst@gmail.com>
12882
12883         * mini.c, mini.h: Share static generic code by passing it an
12884         implicit argument pointing to the runtime generic context.
12885
12886         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
12887         inssel-long32-mips.brg: New opcodes for calling shared static,
12888         which need to be passed the runtime generic context.
12889
12890         * mini-amd64.c, mini-x86.c: Save the runtime generic context
12891         argument on the stack in the prologue if needed.  New function for
12892         finding the runtime generic context argument from the registers
12893         saved by the trampoline.
12894
12895         * mini-amd64.h, mini-x86.h: Specify which register to use for the
12896         runtime generic context argument.
12897
12898         * tramp-amd64.c: Also restore the register used for the runtime
12899         generic context argument.
12900
12901         * mini-trampoline.c: Resolve shared static calls by consulting the
12902         runtime generic context via the new argument.
12903
12904         * generic-sharing.c: Add an argument to sharability-checking
12905         functions that specifies whether type variables should be treated
12906         as sharable type arguments.
12907
12908         * inssel-x86.brg: Removed a superfluous, buggy rule.
12909
12910         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
12911         to switches.
12912
12913 2008-03-14  Martin Baulig  <martin@ximian.com>
12914
12915         * debug-debugger.c (main_thread_handler): Call
12916         mono_runtime_run_main() without sending any notifications.
12917
12918         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
12919
12920 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
12921
12922         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
12923
12924 2008-03-14  Mark Probst  <mark.probst@gmail.com>
12925
12926         * tramp-x86.c: Fixed register restore offsets in the trampoline
12927         code for ECX and EDX.
12928
12929 2008-03-12  Geoff Norton  <gnorton@novell.com>
12930
12931         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
12932         different ucontext_t implementations.
12933         * exceptions-arm.c: Use the above defines to get exceptions working on 
12934         iPhone (based on a patch by Luke Howard lukeh@padl.com)
12935         * mini-arm.c: Implement iPhone icache support (based on a patch by
12936         Luke Howard lukeh@padl.com)
12937
12938 2008-03-12  Mark Probst  <mark.probst@gmail.com>
12939
12940         * mini.c: Enable generic sharing of calls to non-static
12941         non-interface non-generic non-value-type methods.
12942
12943         * mini-trampolines.c: Resolve calls from shared generic code.
12944
12945 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
12946
12947         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
12948
12949         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
12950
12951 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
12952
12953         * mini.c: some fixes for the AOT compiler.
12954
12955 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
12956
12957         * cpu-amd64.md: Add clob:1 to some float opcodes.
12958
12959 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
12960
12961         * mini.h: Added MiniVerifierMode enumeration.
12962
12963         * mini.c: Added mini_verifier_set_mode to control
12964         the usage of the new verifier.
12965
12966         * mini.c (mono_method): Integrated the new verifier.
12967
12968         * driver.c: Extended --security option with validil and
12969         verifiable options to activate the new verifier.
12970
12971 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
12972
12973         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
12974         optimization to ctors taking 0 or 2 arguments too.
12975
12976         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
12977         a bit.
12978
12979         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
12980
12981         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
12982
12983 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
12984
12985         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
12986         non-aot case as well.
12987
12988         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
12989
12990         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
12991         changes.
12992
12993         * aot-compiler.c (encode_patch): Ditto.
12994
12995         * mini.h (G_MININT32): Fix the definition of this.
12996
12997 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
12998
12999         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
13000
13001         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
13002
13003 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
13004
13005         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
13006         methods returning vtypes in registers.
13007         (mono_arch_allocate_vars): Ditto.
13008
13009         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
13010
13011         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
13012
13013         * generics.cs: Add a test from the linear IR branch.
13014
13015         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
13016
13017         * mini.c (inline_method): Cache failed inline attempts.
13018
13019 2008-03-04  Mark Probst  <mark.probst@gmail.com>
13020
13021         * mini.c: For shared methods of generic classes put the location
13022         of "this" into the MonoGenericJitInfo.
13023
13024         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
13025         register out of a MonoContext by register number.  Add the generic
13026         sharing context as an argument to mono_arch_find_this_argument().
13027
13028         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
13029         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
13030         for new arch function.
13031
13032         * mini-exception.c: Handle open exception clauses in shared
13033         generic code.
13034
13035         * mini-trampolines.c: Supply additional argument to
13036         mono_arch_find_this_argument().
13037
13038 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
13039
13040         * Makefile.am (regtests): Run the bench.exe tests last.
13041
13042 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
13043
13044         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
13045         a bit.
13046
13047 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
13048
13049         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
13050         with MS.
13051
13052         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
13053         
13054         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
13055
13056         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
13057         whose class has no cctor.
13058
13059         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
13060
13061 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
13062
13063         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
13064         unverified.
13065
13066 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
13067
13068         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
13069         to be in sync with the code on the linear IR branch.
13070
13071         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
13072
13073         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
13074
13075 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
13076
13077         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
13078
13079         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
13080
13081         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
13082
13083         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
13084
13085         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
13086         
13087         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
13088         body.
13089
13090 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
13091
13092         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
13093         OP_LOADR4_MEMBASE emission.
13094
13095         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
13096         (mono_spillvar_offset_float): Ditto.
13097
13098         * mini-mips.c (mono_arch_emit_prolog): Ditto.
13099
13100         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
13101         emission.
13102
13103         * basic-long.cs: Add regression tests for them.
13104
13105         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
13106         use.
13107         (mono_arch_allocate_vars): Fix representation of single-precision float
13108         argument.
13109         (mono_arch_output_basic_block): Ditto.
13110
13111         * inssel-mips.brg: Ditto, remove duplicate items.
13112
13113         * mini-mips.c (emit_load_volatile_arguments): New function to handle
13114         arguments of tail calls as on other platforms.
13115         (mono_arch_output_basic_block): Handle tail calls.
13116
13117         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
13118         register.
13119
13120         * objects.cs (test_5_pass_static_struct): Add test for it.
13121
13122         Contributed under MIT/X11 license.
13123
13124 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
13125
13126         * Makefile.am: Use gmcs for compiling the regression tests.
13127
13128         * *.2.cs *.2.il: Rename to *.cs and *.il.
13129
13130 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
13131
13132         * regalloc.h: Make the vassign array smaller.
13133
13134         * mini.c (mini_method_compile): Remove an unused field in cfg.
13135
13136         * mini-codegen.c: Add a bunch of micro optimizations.
13137
13138 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
13139
13140         * regalloc.h: Remove some unused fields.
13141
13142 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
13143
13144         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
13145
13146         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
13147
13148 2008-02-22  Mark Probst  <mark.probst@gmail.com>
13149
13150         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
13151
13152         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
13153         trampoline: Fetch an entry from the runtime generic context.  If
13154         it's NULL, jump to the actual trampoline to fill the runtime
13155         generic context.  Otherwise, return it.
13156
13157         * mini.c: Call the lazy fetch trampoline to get entries out of the
13158         runtime generic context.
13159
13160         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
13161         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
13162         tramp-sparc.c: Stubs for the lazy fetch trampoline.
13163
13164 2008-02-21  Mark Probst  <mark.probst@gmail.com>
13165
13166         * mini.c: Fetch data out of the extensible part of the runtime
13167         generic context instead of calling a helper function.
13168
13169         * generic-sharing.c: Some functions moved into
13170         metadata/generic-sharing.c.  Helper function for fetching other
13171         types now checks and asserts against extensible rgctx (just for
13172         debugging purposes - the helper function isn't called anymore
13173         unless for debugging).
13174
13175 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
13176
13177         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
13178         for tail calls up to the point that the tests in iltests.exe run. Also add a
13179         dummy CKFINITE implementation.
13180         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
13181         needed for trampoline LMF frames.
13182
13183         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
13184         trampoline LMF frames.
13185
13186 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
13187
13188         * mini.c (inline_method): clean any pending loader error when inlining fail.
13189         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
13190
13191 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
13192
13193         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
13194
13195         * aot-runtime.c (decode_patch_info): Ditto.
13196
13197         * mini.c (mono_resolve_patch_target): Ditto.
13198         
13199         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
13200         icall wrappers.
13201
13202         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
13203         
13204         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
13205         if it references an icall address.
13206
13207 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
13208
13209         * cpu-s390x.md: Remove some more unused opcodes.
13210         
13211         * cpu-s390x.md: Remove some unused opcodes.
13212
13213         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
13214         mono_op_imm_to_op ().
13215
13216         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
13217         instead of a switch statement.
13218         
13219         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
13220         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
13221
13222         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
13223         
13224         * mini-codegen.c: Remove unused mono_regstate2_... functions.
13225
13226         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
13227         -1.
13228
13229 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
13230
13231         * driver.c (mono_main): Improve error reporting when an assembly cannot be
13232         opened. Fixes #362607.
13233
13234         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
13235
13236         * iltests.il.in: Add a test for static methods in interfaces.
13237
13238 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
13239
13240         * genmdesc.c (build_table): Fix a crash on older glib versions.
13241
13242         * cpu-sparc.md: Remove some unused opcodes.
13243         
13244         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
13245         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
13246
13247         * cpu-amd64.md: Remove some unused opcodes.
13248
13249         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
13250         like the other opcodes.
13251
13252 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
13253
13254         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
13255
13256         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
13257
13258         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
13259         variables 'cfg' instead of 'm' for consistency.
13260
13261         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
13262
13263         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
13264         argument holding the vtype return address, to avoid the ambigious use of
13265         cfg->ret for this purpose.
13266
13267         * mini.c (NEW_RETLOADA): Use vret_addr if set.
13268
13269         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
13270         
13271         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
13272         new mono_print_ins () function which only takes one argument.
13273
13274 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
13275
13276         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
13277         macro arguments.
13278
13279 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
13280
13281         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
13282
13283         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
13284
13285         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
13286         opcodes and other small changes.
13287
13288         * mini-ops.h: Add some new opcodes from the linear IR branch.
13289
13290         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
13291
13292         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
13293         opcodes, use the REG_MEMBASE opcodes instead.
13294         
13295         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
13296         opcodes, use the REG_MEMBASE opcodes instead.
13297         
13298         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
13299         linear IR branch.
13300
13301         * mini.c (mono_op_imm_to_op): New helper function.
13302
13303         * mini-ops.h: Add some opcodes from linear IR branch.
13304
13305 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
13306
13307         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
13308         <tsv@solvo.ru>.
13309
13310 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
13311
13312         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
13313         OP_ICONV_TO_R4/R8.
13314
13315         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
13316
13317 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
13318
13319         * aot-compiler.c (emit_method_code): Add an assert.
13320
13321         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
13322         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
13323         methods.
13324
13325 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
13326
13327         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
13328         some load/store opcodes so they are consistent. 
13329         (mono_arch_emit_prolog): Simplify some code.
13330
13331         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
13332
13333         * objects.cs: Add tests for large argument offsets on ARM.
13334
13335         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
13336         stack offsets. Fixes #359651.
13337
13338         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
13339
13340         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
13341
13342         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
13343
13344         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
13345
13346         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
13347
13348         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
13349         rid of CEE_CONV_R_UN.
13350
13351         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
13352
13353 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
13354
13355         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
13356
13357         * mini.c (mono_normalize_opcodes): Add some more opcodes.
13358
13359         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
13360
13361         * cpu-amd64.md: Remove some unused opcodes.
13362
13363         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
13364
13365         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
13366
13367         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
13368         arch specific functions for its parts. Call the peephole pass after local
13369         regalloc so the prolog can compute a more accurate max_offset.
13370         
13371         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
13372         the corresponding OP_I/OP_L opcodes.
13373
13374         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
13375
13376         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
13377
13378 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
13379
13380         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
13381         as they are handled in mini.c.
13382
13383         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
13384         
13385         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
13386         case since it is handled in mini.c.
13387
13388         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
13389
13390         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
13391
13392         * *.c: Use the new opcodes in the IR and back end code.
13393
13394         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
13395
13396         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
13397
13398 2008-02-06  Mark Probst  <mark.probst@gmail.com>
13399
13400         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
13401         an assert because it has a race condition.
13402
13403 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
13404
13405         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
13406
13407         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
13408
13409         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
13410
13411         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
13412         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
13413
13414 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
13415
13416         * cpu-amd64.md (move): Correct the maximum size of move.
13417
13418 2008-02-05  Mark Probst  <mark.probst@gmail.com>
13419
13420         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
13421         the generic class init trampoline to return quickly if the class
13422         is already inited.
13423
13424 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
13425
13426         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
13427         issues where an 32 bit callsite cannot be patched by a 64 bit address.
13428
13429 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
13430
13431         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
13432         branch.
13433
13434 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
13435
13436         * objects.cs: Add some soft-float tests.
13437
13438         * mini.c: Fix a couple more soft-float issues.
13439
13440         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
13441
13442         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
13443         avoid a REX prefix.
13444
13445 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
13446
13447         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
13448         exception happens while compiling a virtual method.
13449
13450 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
13451
13452         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
13453         
13454         * mini-sparc.c: Fix build.
13455
13456         * mini-sparc.c (get_call_info): Add support for generic sharing.
13457
13458         * mini-exceptions.c: Add a FIXME.
13459
13460 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
13461
13462         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
13463         altstack handling code.
13464
13465         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
13466         
13467         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
13468
13469         * mini-s390.c: Add support for generic sharing.
13470
13471         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
13472         Fix CAS on s390.
13473         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
13474
13475         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
13476
13477         * mini-s390x.c: Add support for generic sharing.
13478         
13479         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
13480         Fix CAS on ia64.
13481         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
13482
13483         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
13484         can be used since it takes a 16 bit signed immediate.
13485
13486         * inssel-s390x.brg: Fix OP_SETRET.
13487
13488         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
13489
13490         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
13491
13492         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
13493
13494         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
13495
13496         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
13497         in one place.
13498
13499         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
13500         stuff.
13501
13502         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
13503         of the unused mono_arch_patch_delegate_trampoline stuff.
13504
13505 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
13506
13507         * basic-long.cs: Move the fp related tests to basic-float.cs.
13508
13509         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
13510
13511         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
13512
13513         * basic-calls.cs: Add a test for proper float argument passing.
13514
13515         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
13516         if the context corresponds to an exception received through a signal.
13517
13518         * exceptions.cs: Add a test for nullref handling at the start of a try
13519         clause.
13520
13521         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
13522
13523         * jit-icalls.c (mono_break): New JIT icall.
13524
13525         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
13526
13527         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
13528
13529 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
13530
13531         * cpu-*.md: Get rid of unused opcodes.
13532
13533         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
13534
13535         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
13536         by all platforms.
13537
13538         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
13539         define.
13540
13541         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
13542         the arch independent trampoline code in mini-trampolines.c.
13543
13544         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
13545
13546         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
13547
13548         * mini-s390.h: Remove an unused define.
13549         
13550         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
13551         the arch independent trampoline code in mini-trampolines.c.
13552
13553         * mini-arm.c (mono_arch_emit_prolog): Fix build.
13554
13555 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
13556
13557         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
13558
13559         * mini-s390.c (mono_arch_emit_prolog): Fix build.
13560
13561         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
13562
13563         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
13564
13565         * cpu-amd64.md: Use smaller sizes for int opcodes.
13566
13567         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
13568
13569         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
13570         objects.cs.
13571
13572         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
13573         debugging.
13574
13575         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
13576         instead of though a pointer to save an indirection when accessing elements of
13577         the array.
13578
13579         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
13580         some typos.
13581         (NOT_IMPLEMENTED): New helper macro.
13582         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
13583         of a bb.
13584
13585         * *.c: Use the new helper macro.
13586
13587 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
13588
13589         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
13590
13591 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
13592
13593         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
13594         stack slots.
13595
13596 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
13597
13598         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
13599         profiling is enabled.
13600         
13601         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
13602         the end.
13603         (mono_arch_emit_prolog): Add more first bblock optimizations.
13604
13605         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
13606         in order if possible.
13607         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
13608         bblock, since the arguments are still in their original registers.
13609
13610         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
13611
13612 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
13613
13614         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
13615         as well.
13616
13617         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
13618         offset 0.
13619
13620         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
13621
13622         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
13623         process async exceptions received while in unmanaged code.
13624
13625         * mini.c (mini_init): Install a callback with the runtime which will be called
13626         when a thread receives an async exception while in unmanaged code.
13627
13628         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
13629
13630         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
13631
13632 2008-01-16  Wade Berrier  <wberrier@novell.com>
13633
13634         * cpu-g4.md:
13635         * cpu-arm.md:
13636         * cpu-s390x.md:
13637         fix build
13638
13639 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
13640
13641         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
13642         compilation with sun cc.
13643
13644         * cpu-*.md: Fix the build.
13645
13646         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
13647
13648         * mini-amd64.h: Add some comments to the MonoLMF structure.
13649
13650         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
13651         
13652         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
13653         in the LMF structure if possible. This saves two instructions in the
13654         managed->native wrappers.
13655
13656         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
13657
13658 2008-01-16  Mark Probst  <mark.probst@gmail.com>
13659
13660         * generic-sharing.c: New type argument lookup code which uses the
13661         runtime generic context template.
13662
13663 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
13664
13665         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
13666
13667         * mini-arm.c (add_general): Fix arm eabi parameter passing.
13668         (mono_arch_output_basic_block): Fix localloc implementation.
13669
13670         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
13671
13672         * mini-ia64.c (peephole_pass): Fix ia64 build.
13673
13674         * mini-amd64.c (peephole_pass): Fix a warning.
13675         
13676         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
13677         at a constant offset from sp/fp.
13678
13679         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
13680         instead of obtaining it from *lmf in the managed method case.
13681
13682 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
13683
13684         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
13685
13686 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
13687
13688         * mini.h (MonoInstList): New type.
13689         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
13690         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
13691         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
13692         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
13693         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
13694         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
13695         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
13696         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
13697         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
13698         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
13699         MONO_INST_LIST_FOR_EACH_ENTRY,
13700         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
13701         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
13702         mono_inst_list_first, mono_inst_list_last,
13703         mono_inst_list_next, mono_inst_list_prev): New instruction
13704         list handling interfaces.
13705         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
13706         list head 'ins_list'.
13707         (MonoInst): Replace next pointer with list head 'node'.
13708         (MonoCallInst): Make 'out_args' a MonoInstList.
13709         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
13710         (MonoCompile): Delete reverse_inst_list and
13711         reverse_inst_list_len.
13712         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
13713         mono_arch_lowering_pass, mono_arch_local_regalloc,
13714         mono_arch_output_basic_block, mono_arch_emit_prolog):
13715         Convert to new instruction lists.
13716         (insert_after_ins): Delete.
13717         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
13718         instruction lists.
13719         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
13720         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
13721         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
13722         mono_emulate_opcode, mono_emit_load_got_addr,
13723         inline_method, mono_method_to_ir, mono_print_bb_code,
13724         print_dfn, decompose_pass, nullify_basic_block,
13725         replace_out_block_in_code, remove_block_if_useless,
13726         merge_basic_blocks, move_basic_block_to_end,
13727         try_unsigned_compare, optimize_branches, mono_print_code,
13728         mini_select_instructions, remove_critical_edges): Likewise.
13729         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
13730         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
13731         mono_arch_output_basic_block, mono_arch_emit_prolog):
13732         Likewise.
13733         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
13734         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
13735         mono_arch_output_basic_block): Likewise.
13736         (inst_list_prepend, insert_after_ins): Delete.
13737         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
13738         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
13739         instruction lists.
13740         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
13741         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
13742         mono_arch_emit_prolog): Likewise.
13743         * cfold.c (mono_constant_fold): Likewise.
13744         * liveness.c (visit_bb, mono_analyze_liveness,
13745         optimize_initlocals): Likewise.
13746         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
13747         * graph.c (mono_draw_code_cfg): Likewise.
13748         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
13749         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
13750         mono_ssa_cprop): Likewise.
13751         * abcremoval (get_relations_from_previous_bb, process_block):
13752         Likewise.
13753         * local-propagation (mono_cprop_invalidate_values,
13754         mono_local_cprop_bb): Likewise.
13755         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
13756         peephole_pass, mono_arch_output_basic_block,
13757         mono_arch_emit_prolog): Likewise.
13758         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
13759         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
13760         mono_arch_emit_prolog): Likewise.
13761         (insert_after_ins): Delete.
13762         * aliasing.c (print_code_with_aliasing_information,
13763         mono_build_aliasing_information, mono_aliasing_deadce):
13764         Convert to new instruction lists.
13765         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
13766         peephole_pass, NEW_INS, mono_arch_lowering_pass,
13767         mono_arch_local_regalloc, mono_arch_output_basic_block):
13768         Likewise.
13769         (insert_after_ins): Delete.
13770         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
13771         peephole_pass, mono_arch_output_basic_block): Convert to
13772         new instruction lists.
13773         * mini-codegen (InstList, inst_list_prepend,
13774         insert_after_ins): Delete.
13775         (insert_before_ins, get_register_force_spilling,
13776         get_register_spilling, free_up_ireg, free_up_reg,
13777         create_copy_ins, create_spilled_store, alloc_int_reg,
13778         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
13779         to new instruction lists.
13780         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
13781         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
13782         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
13783         (insert_after_ins): Delete.
13784         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
13785         mono_arch_local_regalloc, mono_arch_output_basic_block,
13786         mono_arch_call_opcode): Convert to new instruction lists.
13787         (insert_after_ins): Delete.
13788         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
13789         peephole_pass, mono_arch_output_basic_block,
13790         mono_arch_emit_prolog): Convert to new instruction lists.
13791
13792 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
13793
13794         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
13795
13796         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
13797         Fixes #353182.
13798
13799         * Makefile.am (version.h): Make this work with non-bash shells.
13800
13801 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
13802
13803         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
13804
13805 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
13806
13807         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
13808         the InitializeArray optimization.
13809
13810 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
13811
13812         * mini.c driver.c: Don't include os/gc_wrapper.h.
13813
13814 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
13815
13816         * mini.c (print_jit_stats): Print GC statistics if available.
13817
13818 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
13819
13820         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
13821
13822 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
13823
13824         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
13825
13826 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
13827
13828         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
13829         
13830         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
13831
13832         * driver.c (mono_main): Ditto.
13833
13834 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
13835
13836         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
13837
13838         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
13839         in the vtable can't be encoded.
13840         (compile_method): Ditto.
13841
13842 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
13843
13844         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
13845         defined.
13846
13847         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
13848         lmf->rbp.
13849
13850         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
13851         the top LMF entry belongs to the current method.
13852
13853         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
13854
13855 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
13856
13857         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
13858         
13859         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
13860
13861         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
13862
13863         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
13864
13865         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
13866
13867         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
13868         implementation.
13869
13870         * basic-float.cs: Add an ulong->double cast test.
13871
13872 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
13873
13874         * mini.c (mono_method_to_ir): Fix a warning.
13875
13876 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
13877
13878         * mini-ops.h: Add OP_SWITCH.
13879
13880         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
13881         CEE_SWITCH in back-end code, use OP_SWITCH instead.
13882
13883 2007-12-11  Geoff Norton  <gnorton@novell.com>
13884
13885         * mini-s390x.c: Minor change to the MAX() define to allow
13886         it to compile with other gcc versions.
13887
13888 2007-12-11  Geoff Norton  <gnorton@novell.com>
13889
13890         * cpu-s390x.md:
13891         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
13892
13893 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
13894
13895         exceptions-arm.c (mono_arch_get_restore_context): Restore
13896         the frame pointer.
13897
13898         exceptions-arm.c (throw_exception): Save the frame pointer.
13899         This is a partial fix for #323747. Only the client side is
13900         fixed.
13901
13902 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
13903
13904         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
13905         was using an unrelated variable to log the class which
13906         needed the cctor to be called. This was crashing on arm.
13907
13908 2007-12-09  Robert Jordan  <robertj@gmx.net>
13909
13910         * mini-x86.c (mono_arch_emit_epilog):
13911         Consider all kinds of 64-bit types. Fixes #323114.
13912
13913 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
13914
13915         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
13916
13917 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
13918
13919         * mini-amd64.c (peephole_pass): Add a missing instruction check.
13920
13921 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
13922
13923         * mini.c: run type ctor before allocating an object, not only
13924         when running it's constructor method (fixes at least part of bug #342507).
13925
13926 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
13927         
13928         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
13929         
13930         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
13931         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
13932         function.
13933
13934         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
13935         mono_generic_class_init_trampoline () the same as it is done with the other
13936         trampolines.
13937
13938         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
13939         aot-runtime.c aot-compiler.c: Implement AOT support.    
13940
13941 2007-12-07  Mark Probst  <mark.probst@gmail.com>
13942
13943         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
13944         build for archs which don't have the vtable trampoline defined
13945         yet.
13946
13947 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
13948
13949         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
13950
13951         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
13952
13953         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
13954
13955         * tramp-<ARCH>.c: Use the new helper function.
13956
13957 2007-12-07  Mark Probst  <mark.probst@gmail.com>
13958
13959         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
13960         trampoline call, which takes a vtable argument.
13961
13962         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
13963         OP_TRAMPCALL_VTABLEs like other calls.
13964
13965         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
13966         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
13967         call.  Implemented a support function which fetches the vtable
13968         from a register set.
13969
13970         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
13971         Implemented a generic class init trampoline, using the
13972         OP_TRAMPCALL_VTABLE opcode.
13973
13974         * mini.c: Implemented static field access when sharing generic
13975         code.  This implies initing the class using the new
13976         OP_TRAMPCALL_VTABLE call.
13977
13978 2007-12-07  Mark Probst  <mark.probst@gmail.com>
13979
13980         * mini.c: Don't compile methods with sharing enabled if their
13981         classes are disabled for sharing.
13982
13983 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
13984
13985         * inssel.brg: Add a missing sign extension to the GETCHR and array access
13986         opcodes. Fixes #346563.
13987
13988         * objects.cs: Add a new test.
13989
13990         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
13991
13992         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
13993         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
13994
13995 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
13996
13997         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
13998
13999 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
14000
14001         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
14002         code stream.
14003
14004 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
14005
14006         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
14007
14008         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
14009         optimization in the AOT case.
14010         
14011 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
14012
14013         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
14014         
14015         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
14016
14017         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
14018
14019         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
14020
14021         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
14022         is created by the inlined delegate ctor.
14023
14024         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
14025
14026         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
14027
14028 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
14029
14030         * cpu-x86.md: Fix the length of ckfinite.
14031
14032 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
14033
14034         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
14035         
14036         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
14037         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
14038
14039         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
14040
14041         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
14042         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
14043
14044 2007-11-28  Martin Baulig  <martin@ximian.com>
14045
14046         * mini-x86.c
14047         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
14048         after creating the trampoline.
14049
14050 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
14051
14052         * aot-runtime.c (load_aot_module): Check runtime version if needed.
14053
14054         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
14055         the same version.
14056
14057         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
14058         instead of the calling method to help AOT.
14059
14060         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
14061
14062 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
14063
14064         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
14065         is defined.
14066
14067 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
14068
14069         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
14070         
14071         * aot-compiler.c (compile_method): Correct check for generic method definitions.
14072         (encode_method_ref): No need to handle generic method definitions specially.
14073
14074         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
14075
14076         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
14077         decode_klass_info.
14078
14079         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
14080         encode_klass_info.
14081         (compile_method): Enable generic sharing.
14082
14083 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
14084
14085         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
14086         (mini_method_compile): Add preliminary support for AOTing shared generic code.
14087
14088         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
14089         generic code.
14090
14091         * mini-trampolines.c: Fix a warning.
14092
14093         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
14094         NEW_PCONST.
14095         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
14096         (generic_class_is_reference_type): Remove unused function.
14097
14098         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
14099         in the generic vtable trampoline case.
14100
14101         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
14102         
14103         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
14104         return an AOT method based on a vtable slot.
14105
14106         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
14107
14108         * mini.c (mini_get_vtable_trampoline): Export this.
14109
14110 2007-11-22  Martin Baulig  <martin@ximian.com>
14111
14112         * debug-debugger.h
14113         (MonoDebuggerInfo): Move `debugger_version' up.
14114
14115 2007-11-22  Martin Baulig  <martin@ximian.com>
14116
14117         * mini-amd64.c
14118         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
14119
14120         * mini-trampolines.c
14121         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
14122         after compiling the method.
14123
14124 2007-11-20  Martin Baulig  <martin@ximian.com>
14125
14126         * debug-mini.c
14127         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
14128         (mono_debugger_remove_breakpoint): Likewise.
14129         (mono_debugger_check_breakpoints): Likewise.
14130
14131         * debug-debugger.c: Implement the new breakpoint interface here.
14132
14133 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
14134
14135         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
14136         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
14137
14138         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
14139
14140 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
14141
14142         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
14143
14144         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
14145         mini.c.
14146
14147         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
14148         mini.c.
14149
14150         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
14151         returning a vtype in a register.
14152
14153         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
14154         here from the arch specific code.
14155
14156         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
14157         mini.c.
14158
14159         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
14160         (mono_arch_emit_prolog): Increment maximum prolog size.
14161
14162         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
14163         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
14164
14165         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
14166         MonoGenericSharingContext.
14167
14168         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
14169         MonoGenericSharingContext. Allocate memory from the cfg mempool.
14170
14171 2007-11-15  Mark Probst  <mark.probst@gmail.com>
14172
14173         * mini.c, mini.h, generic-sharing.c: Functions for producing code
14174         which extract fields out of the runtime generic context.  Full
14175         sharing of the NEWARR opcode.
14176
14177 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
14178
14179         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
14180         --enable-minimal=ssa.
14181
14182 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
14183
14184         * mini-trampolines.c (mono_delegate_trampoline): Update after 
14185         mono_marshal_get_delegate_invoke () signature change.
14186
14187 2007-11-13  Mark Probst  <mark.probst@gmail.com>
14188
14189         * mini.c: Removed the shared context in favor of the generic
14190         sharing context.  Allocate the MonoJitInfo structure with room for
14191         the generic sharing context if it's needed.
14192
14193         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
14194         domain-internals.h now.
14195
14196         * mini-x86.c: Pass the generic sharing context to get_call_info ().
14197
14198         * generic-sharing.c: Several changes for working without a shared
14199         context and instead operating on open types instead.
14200
14201 2007-11-12  David S. Miller  <davem@davemloft.net>
14202
14203        * inssel-sparc.brg: Fix double instruction emit.
14204
14205 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
14206
14207         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
14208         Get/Set/Address methods.
14209         
14210         * mini.c debug-debugger.c mini-trampolines.c: Update after 
14211         mono_marshal_get_delegate_invoke signature change.
14212
14213 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
14214
14215         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
14216         This can happens with dynamic methods. Fixes the other bug in #322722.
14217
14218 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
14219
14220         * tramp-arm.c (mono_arch_patch_callsite): Support patching
14221         BX call sequence.
14222
14223         * mini-arm.c (arm_patch): Implement patching of BX call
14224         sequence. Fixes one of the bugs in #322722.
14225
14226 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
14227
14228        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
14229        under Linux.  We only need to flush every 32-byte cache line.    
14230
14231 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
14232
14233         * mini.c:
14234         move_basic_block_to_end: Add branches when needed, eventually creating
14235         a new BB.
14236         optimize_branches: added a parameter that tells if it's ok to create
14237         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
14238         and avoid calling move_basic_block_to_end when it's not ok.
14239         Fixes bug 318677.
14240
14241 2007-11-07  Mark Probst  <mark.probst@gmail.com>
14242
14243         * mini.c: Abort inlining call to InitializeArray if something
14244         looks wrong.  Let the icall handle it, which now has proper safety
14245         checks.
14246
14247 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
14248
14249         * mini.c (mono_spill_call): add support for soft-float.
14250
14251         * mini.c (mono_method_to_ir): add support for soft-float
14252         to inlined functions that return float.
14253
14254         * mini.c (mono_method_to_ir): add support for soft-float
14255         to cee_stsfld opcode on float fields.
14256
14257 2007-11-05  Geoff Norton  <gnorton@novell.com>
14258
14259         * mini-x86.h: Fix the structure access for X86 Leopard.
14260
14261
14262 2007-11-05  Martin Baulig  <martin@ximian.com>
14263
14264         * mini-trampolines.c
14265         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
14266         after compiling the method to notify the debugger.
14267
14268 2007-11-05  Martin Baulig  <martin@ximian.com>
14269
14270         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
14271
14272 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
14273
14274         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
14275         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
14276
14277 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
14278
14279         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
14280         native-to-managed wrappers.
14281         
14282 2007-11-01  Geoff Norton  <gnorton@novell.com>
14283
14284         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
14285         members.
14286
14287 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
14288
14289         * mini.c, mini-x86.c: when getting back from unmanaged code
14290         to managed via a marshaled delegate we also need to set the
14291         right domain.
14292
14293 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
14294
14295         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
14296         for amd64.
14297
14298 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
14299
14300         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
14301         let the debugger or other external agents to tell the JIT when
14302         a sw breakpoint has been inserted in the code that the JIT needs
14303         to be able to inspect.
14304
14305 2007-10-31  Martin Baulig  <martin@ximian.com>
14306
14307         * debug-debugger.h
14308         (MonoDebuggerInfo): Remove `runtime_class_init'.
14309
14310 2007-10-30  Martin Baulig  <martin@ximian.com>
14311
14312         * debug-mini.h
14313         (mono_debugger_thread_created): Added `MonoThread *' argument.
14314         (mono_debugger_extended_notification): New public method.
14315         (mono_debugger_trampoline_compiled): New public method.
14316
14317         * debug-mini.c
14318         (MonoDebuggerThreadInfo): Added `thread' and
14319         `extended_notifications' fields.
14320
14321         * debug-debugger.c
14322         (debugger_executable_code_buffer): New static variable.
14323
14324         * debug-debugger.h
14325         (MonoDebuggerInfo): Added `executable_code_buffer',
14326         `executable_code_buffer_size', `breakpoint_info_area',
14327         `breakpoint_table' and `breakpoint_table_size'.
14328
14329 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
14330
14331         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
14332         that IP  either is an unused value or the vtable pointer. IMT 
14333         calls use vtable + offset now. Reduced by almost half the size
14334         of IMT entries.
14335
14336 2007-10-26  Jonathan Chambers <joncham@gmail.com>
14337
14338         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
14339         defines to access param registers. Replace long usage with
14340         gsize as sizeof(long) != sizeof(void*) on Win64.
14341
14342         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
14343         on Win64. Fix intrinsic, use _AddressOfReturnAddress
14344         instead of non-existant _GetAddressOfReturnAddress.
14345
14346         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
14347         param registers. Save/restore %rdi and %rsi in MonoLMF.
14348
14349         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
14350         param registers. Modify (throw_exception) signature to take 
14351         %rdi and %rsi on Win64. 
14352
14353         Code is contributed under MIT/X11 license.
14354
14355 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
14356
14357         * helpers.c: unlink debugging output files.
14358
14359 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
14360
14361         * mini.c: Move mono_create_ftnptr () to object.c.
14362
14363 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
14364
14365         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
14366         optional. This function can now be used to disassemble code generated
14367         outside the JIT such as trampolines and IMT thunks.
14368
14369         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
14370
14371         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
14372         vtable pointer from a ldr instruction.
14373
14374         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
14375         new IMT call sequence.
14376
14377         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
14378         call sequence for interface invocations.
14379
14380         * mini-arm.c (mono_arch_emit_imt_argument): added, required
14381         for imt support. This function is empty since IMT on ARM requires no
14382         special handling on the IR side.
14383
14384         * mini-arm.c (mono_arch_find_imt_method): added, required for
14385         imt support.
14386
14387         * mini-arm.c (mono_arch_find_this_argument): added, required
14388         for imt support.
14389
14390         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
14391         a ldr instruction to load a value stored in the code stream.
14392
14393         * mini-arm.c (mono_arch_build_imt_thunk):added, required
14394         for imt support.
14395
14396
14397 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
14398
14399         * mini.c (mini_init): Install the jump trampoline callback.
14400
14401 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
14402
14403         * mini-trampolines.c: handle synchronized methods with the common
14404         vtable trampoline (bug #335601).
14405
14406 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
14407
14408         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
14409
14410         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
14411         64 bit platforms.
14412
14413         * mini-ia64.h mini-ia64.c: Add support for IMT.
14414
14415         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
14416         prolog. Fixes #331958.
14417
14418 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
14419
14420         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
14421
14422 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
14423
14424         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
14425         trampoline.
14426
14427 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
14428
14429         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
14430         trampoline.
14431
14432 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
14433
14434         * mini-x86.c, mini-x86.h: x86 support for the common vtable
14435         trampoline.
14436
14437 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
14438
14439         * mini-trampolines.c: changed the magic rampoline to understand
14440         the common vtable trampoline method: the method to invoke is
14441         determined by the vtable displacement of the call.
14442
14443 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
14444
14445         * mini.c, mini.h: register the common vtable trampoline if the
14446         architecture supports it.
14447
14448 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
14449
14450         * cpu-amd64.md: use the correct max length for tls_get.
14451
14452 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
14453
14454         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
14455         CEE_STELEM_ANY. Fixes #333696.
14456
14457 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
14458
14459         * exceptions-x86.c: provide more graceful handling of the case where
14460         we followed a bogus function pointer from managed code (bug #332866).
14461
14462 2007-10-11  Mark Probst  <mark.probst@gmail.com>
14463
14464         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
14465         replaces the generic_shared flag and will carry more information
14466         in the future.
14467
14468         * generic-sharing.c: Added mini_type_stack_size() which allows
14469         allows open types if given a generic sharing context.
14470         mini_get_basic_type_from_generic() takes a
14471         MonoGenericSharingContext* instead of a MonoCompile* now.
14472
14473         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
14474         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
14475         mini-sparc.c, mini-x86.c: Trivial changes required by the two
14476         changes above.  Just passing arguments through to the right
14477         places.
14478
14479 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
14480
14481         * mini-arm.c: unify the call emission to emit_code_seq().
14482
14483 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
14484
14485         * tramp-arm.c: reduced the trampoline size.
14486
14487 2007-10-10  Mark Probst  <mark.probst@gmail.com>
14488
14489         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
14490         variable handling out of arch-specific code.
14491
14492 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
14493
14494         * mini-arm.c: implemented fast delegate dispatch.
14495
14496 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
14497
14498         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
14499         that fp elimination is turned off if the space required by locals is too
14500         big. Fixes #331958.
14501
14502 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
14503
14504         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
14505         ARM to the new style trampoline.
14506
14507 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
14508
14509         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
14510
14511         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
14512
14513 2007-10-09  Martin Baulig  <martin@ximian.com>
14514
14515         * debug-debugger.h
14516         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
14517         `field_info_offset_offset'.     
14518
14519 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
14520
14521         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
14522         removed more internal usage of the r11 register and made it available
14523         to the register allocator.
14524
14525 2007-10-08  Mark Probst  <mark.probst@gmail.com>
14526
14527         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
14528         when sharing generics and treat type variables as references.
14529
14530 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
14531
14532         * mini-ppc.c: started removing the internal uses of register r11
14533         to eventually allow the register allocator to manage it as an
14534         additional available register.
14535
14536 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
14537
14538         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
14539
14540 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
14541
14542         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
14543         specific trampolines as they are not performance critical as a jump
14544         target (maybe align as before only for AOT code?). This saves about
14545         200 KB of native code on x86 for monodevelop startup.
14546
14547 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
14548
14549         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
14550         monodevelop startup.
14551
14552 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
14553
14554         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
14555
14556         * mini-sparc.h mini-sparc.c: Implement IMT support.
14557
14558         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
14559         its smaller and doesn't clobber sparc_g1.
14560
14561         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
14562
14563 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
14564
14565         * mini-ppc.c: optimized the size of the IMT thunks a bit.
14566
14567 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
14568
14569         * mini-ppc.c: implemented fast delegate invocation.
14570
14571 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
14572
14573         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
14574
14575 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
14576
14577         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
14578         code to the new style trampoline in preparation for IMT support.
14579
14580 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
14581
14582         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
14583         systems already. This also reduces the specific trampiline sizes and
14584         prepares for the use of r12 as the IMT identifier register.
14585
14586 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
14587
14588         * mini-mips.h: endianess fix (simplified from a patch by
14589         Thomas Kunze <thommy@tabao.de>, bug #323737).
14590
14591 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
14592
14593         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
14594         to access ucontext fields and enable netbsd support
14595         (partially from Magnus Henoch <mange@freemail.hu>).
14596
14597 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
14598
14599         * genmdesc.pl: patch from Henryk Plotz <henryk@openmoko.org> to
14600         use the preprocessor from the CPP env var if it is set.
14601
14602 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
14603
14604         * mini-trampolines.c: fixed an assertion and moved it earlier in the
14605         code, before interface_offset gets used.
14606
14607 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
14608
14609         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
14610         mono_class_setup_vtable () before accessing klass->vtable.
14611
14612 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
14613
14614         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
14615         hackish.
14616
14617 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
14618
14619         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
14620         IMT slots (this saves hundreds of KB of memory in programs like
14621         IronPython and Monodevelop).
14622
14623 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
14624
14625         * mini.c: print the delegate counter.
14626
14627 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
14628
14629         * mini-x86.c: make it easier to enable the debugging code for IMT
14630         slots.
14631
14632 2007-09-28  Martin Baulig  <martin@ximian.com>
14633
14634         * debug-debugger.h
14635         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
14636         `mono_method_klass_offset' and `mono_method_token_offset'.
14637
14638 2007-09-20  Mark Probst  <mark.probst@gmail.com>
14639
14640         * mini.c: First generics sharing implementation.  Can only share
14641         in very simple cases.  If sharing doesn't work it falls back to
14642         dedicated compilation.
14643
14644         * mini.h: Flag in MonoCompile to specify whether generic
14645         compilation is shared.  Flags enum for marking which generic inst
14646         of a context is used.  Prototypes for helper functions.
14647
14648         * generic-sharing.c: Helper functions for generic method sharing.
14649
14650         * optflags-def.h: Optimization flag (gshared) for enabling generic
14651         method sharing added.
14652
14653         * Makefile.am: generic-sharing.c added.
14654
14655 2007-09-19 Daniel Nauck <dna@mono-project.de>
14656
14657         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
14658
14659 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
14660         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
14661         fixes bug 325507.
14662
14663 2007-09-19  Martin Baulig  <martin@ximian.com>
14664
14665         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
14666         mono_debug_cleanup() is now part of mono_cleanup().
14667
14668 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
14669
14670         * driver.c (mono_main): Fix a warning.
14671
14672 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
14673
14674         * aot-compiler.c: Optimize various parts when processing large assemblies.
14675         Fixes ##325568.
14676
14677         * mini.c (mono_patch_info_hash): Improve hash function.
14678
14679 2007-09-14  Jonathan Chambers <joncham@gmail.com>
14680
14681         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
14682         
14683         Code is contributed under MIT/X11 license.
14684
14685 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
14686
14687         * mini.c (mini_init): Fix a leak.
14688
14689         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
14690
14691 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
14692
14693         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
14694
14695 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
14696
14697         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
14698
14699 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
14700
14701         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
14702         variance tests.
14703
14704         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
14705
14706         * mini.c (handle_alloc): Enable managed allocators in AOT code.
14707
14708         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
14709
14710         * aot-runtime.c (decode_patch_info): Ditto.
14711
14712 2007-09-12  Jonathan Chambers <joncham@gmail.com>
14713
14714         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
14715         static case. Cache delegates in architecture specific code, 
14716         based on number of parameters.
14717         
14718         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
14719         in architecture specific code, based on number of parameters.
14720         
14721         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
14722         caching happen in architecture specific code now.
14723         
14724         Code is contributed under MIT/X11 license.
14725
14726 2007-09-12  Jonathan Chambers <joncham@gmail.com>
14727
14728         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
14729         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
14730         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
14731
14732         Code is contributed under MIT/X11 license.
14733
14734 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
14735         * mini.c: (mono_thread_abort) Fixed bug #82416.
14736
14737 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
14738
14739         * mini.: hook the new managed GC allocation feature into the JIT.
14740
14741 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
14742
14743         * mini.c: implementation for the new runtime tls opcode.
14744
14745 2007-09-11  Martin Baulig  <martin@ximian.com>
14746
14747         * debug-debugger.h
14748         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
14749         `mono_method_inflated_offset'.
14750
14751 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
14752
14753         * driver.c mini.h mini.c: Add a new devel command line option for injecting
14754         async exceptions into a method.
14755
14756         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
14757         purpose of testing whenever the unwinder works at every instruction.
14758
14759 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
14760
14761         * mini.c: check accessibility of method used in ldftn (fixes
14762         bug #82635).
14763
14764 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
14765
14766         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
14767
14768         * inssel.brg: Fix a warning.
14769
14770 2007-09-03  Martin Baulig  <martin@ximian.com>
14771
14772         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
14773         now takes the `main_method' as argument.
14774
14775 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
14776
14777         * cpu-sparc.md (endfilter): Add missing src1:i argument.
14778
14779 2007-08-30  Jonathan Chambers <joncham@gmail.com>
14780
14781         * driver.c: include the cil-coff.h header on Windows.
14782         
14783         Code is contributed under MIT/X11 license.
14784
14785 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
14786
14787         * mini.c, driver.c: don't include the cil-coff.h header.
14788
14789 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
14790
14791         * mini.c: flag places that needs fixes fo soft-float support.
14792
14793 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
14794
14795         * mini.h, inssel-float.brg: fix soft-float constant loads on big
14796         endian systems (partially from Dean Jenkins, bug #81924).
14797
14798 2007-08-28  Mark Probst  <mark.probst@gmail.com>
14799
14800         * mini.c (check_linkdemand): Remove embedded reference object in
14801         call to LinkDemandSecurityException.
14802         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
14803         with an IntPtr instead of a reference object.
14804
14805 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
14806
14807         * mini.c (handle_initobj): Handle alignment properly.
14808
14809         * inssel.brg (mini_emit_memset): Ditto. 
14810
14811         * inssel.brg (mini_emit_memcpy): Ditto. 
14812
14813         * inssel-sparc.brg: Ditto.              
14814
14815         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
14816
14817 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
14818
14819         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
14820         exceptions raised in unmanaged code. Fixes part of #82594.
14821
14822 2007-08-24  Mark Probst  <mark.probst@gmail.com>
14823
14824         * mini.c (mono_method_to_ir), declsec.c
14825         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
14826
14827 2007-08-22  Martin Baulig  <martin@ximian.com>
14828
14829         * debug-mini.h
14830         (MonoDebuggerThreadInfo): New typedef.
14831         (mono_debugger_thread_table): New global variable.
14832         (mono_debugger_thread_created): New public function.
14833         (mono_debugger_thread_cleanup): New public function.
14834
14835         * debug-debugger.h
14836         (MonoDebuggerInfo):
14837         - removed `get_current_thread' and `lookup_assembly'.
14838         - removed `data_table'.
14839         - added `thread_table'.
14840
14841         * mini.c
14842         (mono_thread_start_cb): Call mono_debugger_thread_created().
14843         (mono_thread_attach_cb): Likewise.
14844         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
14845         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
14846         initial domain.
14847
14848         * driver.c (mono_main): Move mono_debug_init() up, before calling
14849         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
14850
14851 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
14852
14853         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
14854         together when passing several arguments of type double (gives a small
14855         speedup and saves a few bytes of generated code).
14856
14857 2007-08-20  Jb Evain  <jbevain@novell.com>
14858
14859         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
14860
14861 2007-08-20  Jb Evain  <jbevain@novell.com>
14862
14863         * mini.c (mono_method_to_ir): throw MethodAccessException
14864         and FieldAccessException instead of InvalidProgramException.
14865
14866 2007-08-20  Mark Probst  <mark.probst@gmail.com>
14867
14868         * mini.c: CoreCLR security checks.
14869
14870         * mini.h: Removed MonoSecurityMode (moved to
14871         metadata/security-manager.h) and mono_security_mode global var
14872         (replaced by set/get functions in security-manager.h).
14873
14874         * driver.c: Added "core-clr-test" security mode for testing.  Used
14875         set-function for setting security mode.
14876
14877 2007-08-17  Mark Probst  <mark.probst@gmail.com>
14878
14879         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
14880         the new jit_info_table.
14881
14882         * driver.c: Test code for the new jit_info_table (enabled by the
14883         define MONO_JIT_INFO_TABLE_TEST).
14884
14885 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
14886
14887         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
14888         detection of call <REG> instruction sequence. Fixes build on freebsd.
14889
14890 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
14891
14892         * mini-exceptions.c: Fix a warning.
14893
14894 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
14895
14896         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
14897         stack overflow handling code on amd64 too.
14898
14899         * mini-exceptions.c (mono_setup_altstack): Make this use 
14900         mono_thread_get_stack_bounds ().
14901
14902         * mini-x86.h: Disable sigaltstack on solaris x86.
14903
14904 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
14905
14906         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
14907
14908 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
14909
14910         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
14911
14912 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
14913
14914         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
14915
14916         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
14917
14918 2007-08-03  Neale Ferguson <neale@sinenomine.net>
14919
14920         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
14921         due to alignment.
14922
14923 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
14924
14925         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
14926         to be emitted (bug #82281).
14927
14928 2007-08-01  Martin Baulig  <martin@ximian.com>
14929
14930         Merged the `debugger-dublin' branch.
14931
14932         * debug-debugger.h (MonoDebuggerInfo):
14933         Removed the `old_*' compatibility entries.
14934         Added `debugger_version' and `data_table'.
14935         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
14936         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
14937
14938         * debug-mini.c
14939         (MiniDebugMethodBreakpointInfo): Add `address_list'.
14940         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
14941         instead of a `gconstpointer'.
14942         (mono_debugger_insert_method_breakpoint): Return a
14943         `MonoDebugMethodAddressList *'.
14944
14945 2007-06-28  Martin Baulig  <martin@ximian.com>
14946
14947         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
14948
14949 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
14950
14951         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
14952         __builtin_frame_address () since it is broken on older gcc versions.
14953
14954 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
14955
14956         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
14957         on the stack overflow handling and made the managed stack overflows
14958         catchable in most cases using soft guard pages.
14959         * exceptions-x86.c: added code to restore the protection in the soft
14960         guard pages at the end of exception handling.
14961
14962 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
14963
14964         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
14965
14966 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
14967
14968         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
14969         exception handling.
14970
14971 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
14972
14973         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
14974         signal handling support until it has been ported to the new mechanism.
14975         * mini.c: fixed stack overflow detection and use the new
14976         architecture code  to handle signals on the altstack.
14977
14978 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
14979
14980         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
14981         stack overflows on the alt stack.
14982
14983 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
14984
14985         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
14986         stack overflows on the alt stack.
14987
14988 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
14989
14990         * exceptions-ppc.c: cleanup preparing for altstack support.
14991
14992 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
14993
14994         * exceptions-arm.c: cleanup preparing for altstack support.
14995
14996 2007-07-27  Mark Probst  <mark.probst@gmail.com>
14997
14998         * mini.c (print_jit_stats): Output hazard pointer stats.
14999
15000 2007-07-26  Mark Probst  <mark.probst@gmail.com>
15001
15002         * driver.c, mini.c: Replaced security mode flags with a single
15003         enum variable.
15004
15005 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
15006
15007         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
15008
15009 2007-07-25  Mark Probst  <mark.probst@gmail.com>
15010
15011         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
15012         (which doesn't do anything yet) for activating Core CLR
15013         (Silverlight) security.
15014
15015 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
15016
15017         * mini-codegen.c: work around a possible gcc bug on arm.
15018
15019 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
15020
15021         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
15022         message for platforms that don't support AOT compilation.
15023
15024 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
15025
15026         * mini.h, mini.c, driver.c: temporary smcs hack.
15027
15028 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
15029
15030         * mini-arm.h, mini-arm.c: arm EABI fixes.
15031
15032 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
15033
15034         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
15035         case.
15036
15037         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
15038         trampolines taking a method argument.
15039
15040         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
15041
15042         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
15043         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
15044
15045         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
15046         JIT compilation throws an exception. Fixes #82050.
15047
15048 2007-07-19  Mark Probst  <mark.probst@gmail.com>
15049
15050         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
15051         with the MONO_EXCEPTION_ defines.
15052
15053 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
15054
15055         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
15056         #82117.
15057         
15058         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
15059         the cause of an assertion.
15060
15061 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
15062
15063         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
15064         removed.
15065
15066 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
15067
15068         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
15069         assert. Should fix #82103.
15070
15071 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
15072
15073         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
15074         here too. Fixes #82095.
15075
15076         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
15077         addresses.
15078
15079         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
15080
15081         * mini-amd64.h: Enable IMT for amd64.
15082         
15083         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
15084
15085 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
15086
15087         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
15088
15089 2007-07-12  Mark Probst  <mark.probst@gmail.com>
15090
15091         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
15092         as soon as check_linkdemand sets an exception_type.
15093
15094 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
15095
15096         * mini-x86.c: fixed offsets for IMT call sequence.
15097         * mini-x86.h: enable IMT again.
15098
15099 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
15100
15101         * trace.c (mono_trace_enter_method): Decode MonoType too.
15102
15103         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
15104
15105         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
15106
15107         * mini-amd64.c: Add preliminary IMT implementation.
15108         
15109 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
15110
15111         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
15112         understand the new IMT-base interface invocation (thanks to
15113         Daniel Nauck for the report and the remote debugging session).
15114
15115 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
15116
15117         * mini-x86.c: size and speed optimizations for the IMT bsearch.
15118
15119 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
15120
15121         * Makefile.am (aotcheck): Make this actually use the AOTed code.
15122
15123 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
15124
15125         * mini-trampolines.c: implement AOT IMT support.
15126         * mini-x86.h: enable IMT support for wider testing.
15127
15128 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
15129
15130         * inssel.brg (emit_imt_argument): Add aot support here.
15131
15132         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
15133
15134 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
15135
15136         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
15137         of the IMT implementation, partially from massi, with my
15138         implementation of the bsearch sequence. Disabled by default until
15139         the AOT code is implemented.
15140
15141 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
15142
15143         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
15144
15145         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
15146
15147 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
15148
15149         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
15150         arch-independent IMT JIT code from Massimiliano
15151         Mantione (massi@ximian.com) with small cleanups from me.
15152
15153 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
15154
15155         * Makefile.am: fix svn invocation to get the svn revision to be
15156         independent of the local language (build fix).
15157
15158 2007-07-09  Mark Probst  <mark.probst@gmail.com>
15159
15160         * mini.c (inline_method): Reset cfg->exception_type if the
15161         inlining is aborted.  Fixes: 82049.
15162
15163 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
15164
15165         * mini.c: remove assert from exception handling code when exception_ptr
15166         is not set.
15167
15168 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
15169
15170         * mini.c (mono_codegen): Add an assert.
15171
15172         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
15173         enter and leave code.
15174         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
15175
15176 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
15177
15178         * mini-ppc.c: fixed memory corruption for localloc(0)
15179         (bug #81852).
15180
15181 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
15182         
15183         * mini.c: Fix warnings.
15184
15185 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
15186
15187         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
15188         to emit better double->int conversions.
15189
15190 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
15191
15192         * mini.c: the provided Min/Max optimizations are valid for unisgned
15193         ints.
15194
15195 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
15196
15197         * 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
15198
15199 2007-06-28  Miguel de Icaza  <miguel@novell.com>
15200
15201         * mini.c (mono_running_on_valgrind): Add support for reporting the
15202         method and  its boundaries to valgrind.
15203
15204 2007-06-28  Martin Baulig  <martin@ximian.com>
15205
15206         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
15207
15208 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
15209
15210         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
15211
15212         * generic.2.cs: Add new test case.
15213
15214 2007-06-25  Martin Baulig  <martin@ximian.com>
15215
15216         Merged the `debugger-dublin' branch.
15217
15218         * debug-mini.c
15219         (mono_debugger_insert_method_breakpoint): New public method.
15220         (mono_debugger_remove_method_breakpoint): Likewise.
15221         (mono_debugger_check_breakpoints): New static method.
15222         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
15223
15224         * debug-debugger.h (MonoDebuggerInfo):
15225         Renamed (to keep backward compatibility in the vtable):
15226         `insert_breakpoint' -> `old_insert_breakpoint'.
15227         `remove_breakpoint' -> `old_remove_breakpoint'.
15228         `create_string' -> `old_create_string'.
15229         `lookup_class' -> `old_lookup_class'.
15230         `lookup_type' -> removed; changed into a dummy field.
15231         `lookup_assembly' -> `old_lookup_assembly'.
15232         Added (same functionality, but different signature):
15233         `create_string', `lookup_class', `lookup_assembly'
15234         Added new:
15235         `get_method_addr_or_bpt', `remove_method_breakpoint',
15236         `runtime_class_init'.
15237
15238         * debug-debugger.c: Merged the `debugger-dublin' branch.
15239
15240 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
15241
15242         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
15243         well.
15244         (peephole_pass): Likewise.
15245
15246 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
15247
15248         * driver.c: hopefully make setaffinity work also for ancient
15249         versions of linux.
15250
15251 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
15252
15253         * driver.c : win32 build fix.
15254
15255 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
15256
15257         * driver.c: check for the MONO_NO_SMP env var and bind to a single
15258         processor if it is set.
15259
15260 2007-06-21  Martin Baulig  <martin@ximian.com>
15261
15262         * debug-mini.h: New file.
15263
15264         * debug-mini.c
15265         (mono_debugger_insert_breakpoint_full): Moved here from
15266         ../metadata/mono-debug-debugger.c.
15267         (mono_debugger_remove_breakpoint): Likewise.
15268         (mono_debugger_breakpoint_callback): Likewise.
15269
15270 2007-06-15  Raja R Harinath  <rharinath@novell.com>
15271
15272         * jit-icalls.c (mono_helper_compile_generic_method): Update to
15273         changes in MonoGenericClass.
15274
15275 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
15276
15277         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
15278
15279 2007-06-14  Raja R Harinath  <rharinath@novell.com>
15280
15281         * jit-icalls.c (mono_helper_compile_generic_method): Update to
15282         removal of MonoGenericMethod.
15283
15284 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
15285
15286         * mini-exceptions.c: hooks for the exception events profiling API.
15287
15288 2007-06-14  Randolph Chung  <tausq@debian.org>
15289
15290         * Makefile.ma: Add hppa target.
15291         * mini-arch.h: Include mini-hppa.h
15292         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
15293         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
15294         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
15295
15296 2007-06-14  Randolph Chung  <tausq@debian.org>
15297
15298         * inssel.brg: Add rules for "chained" compare-branch operations so that
15299         a single compare op can affect multiple branches.  Adjust cost for
15300         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
15301         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
15302         cost for some rules so that they can more easily be overridden by
15303         per-arch rules (with fixes from lupus).
15304         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
15305
15306 2007-06-13  Randolph Chung  <tausq@debian.org>
15307
15308         * mini-ops.h: Reorder branch ops so that they match the order of the
15309         corresponding CEE_* ops.  The code expects them this way.
15310         Add new ops for HPPA target.
15311         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
15312
15313 2007-06-13  Randolph Chung  <tausq@debian.org>
15314
15315         * mini-exceptions.c: Handle cases where the stack grows towards
15316         larger addresses.
15317         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
15318
15319 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
15320
15321         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
15322         counter.
15323         * driver.c: explain where a non-matching corlib is found.
15324
15325 2007-06-13  Mark Probst  <mark.probst@gmail.com>
15326
15327         * mini.c (print_jit_stats): Output dynamic code allocation stats.
15328
15329 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
15330
15331         * mini-exceptions.c: Generate a method profile leave event during
15332         an exception to ensure that the profiler gets notified.
15333
15334 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
15335
15336         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
15337         branch.
15338
15339         * cpu-amd64.md: Add long_and/or/xor opcodes.
15340
15341 2007-06-06  Wade Berrier  <wberrier@novell.com>
15342
15343         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
15344         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
15345         length of instruction shr_imm (expected 8, got 10)
15346
15347 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
15348
15349         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
15350
15351 2007-06-06  Mark Probst  <mark.probst@gmail.com>
15352
15353         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
15354         MonoInternalHashTable again (fixed bug in the internal hash table
15355         code).
15356
15357 2007-06-06  Mark Probst  <mark.probst@gmail.com>
15358
15359         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
15360         Have to figure out what makes it crash the SWF regression.
15361
15362 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
15363
15364         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
15365
15366 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
15367
15368         * mini.c: optimize out the type check when storing null in a
15369         reference array.
15370
15371 2007-06-04  Mark Probst  <mark.probst@gmail.com>
15372
15373         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
15374         MonoInternalHashTable.
15375
15376 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
15377
15378         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
15379         signed integer methods.
15380
15381 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
15382
15383         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
15384         permanently since the current approach doesn't work.
15385
15386 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
15387
15388         * inssel.brg (stmt): Only call delegate->invoke_impl if 
15389         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
15390
15391 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
15392
15393         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
15394         the sreg2==rdx case.
15395         
15396         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
15397         account if it contains a rex prefix.
15398         (peephole_pass): Handle OP_FMOVE as well.
15399
15400 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
15401
15402         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
15403         as it causes regressions.
15404
15405 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
15406
15407         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
15408         static case as well.
15409
15410         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
15411
15412         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
15413         (mono_arch_get_this_arg_from_call): Ditto.
15414
15415         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
15416
15417         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
15418         invoke_impl field.
15419
15420         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
15421         (mono_arch_get_this_arg_from_call): Ditto.
15422
15423         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
15424         
15425         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
15426         try to create optimized invoke code and use that for further invocations. 
15427         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
15428
15429         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
15430
15431 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
15432
15433         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
15434         sealed classes or methods.
15435         *devirtualization.cs: tests for the new optimization
15436
15437 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
15438
15439         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
15440         by the update_volatile () function.
15441
15442 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
15443
15444         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
15445         require it.
15446
15447         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
15448
15449 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
15450
15451         * mini.c: Add configure checks for header files.
15452         * mini-x86.c: Add configure checks for header files.
15453         * trace.c: Add configure checks for header files.
15454         * aot-runtime.c: Add configure checks for header files.
15455         * aot-compiler.c: Add configure checks for header files.
15456         * driver.c: Add configure checks for header files.
15457         * mini-codegen.c: Add configure checks for header files.
15458         
15459         Code is contributed under MIT/X11 license.
15460
15461 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
15462
15463         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
15464         icompare_imm -128 + op_iclt. Fixes #81703.
15465
15466 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
15467
15468         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
15469
15470 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
15471
15472         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
15473         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
15474         so that all isinst checks now use "interface_bitmap".
15475
15476 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
15477
15478         * cpu-amd64.md (jmp): Fix a warning.
15479
15480         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
15481
15482         * basic.cs: Add new regression test.
15483
15484         * basic.cs: Remove test which is now in basic-long.cs.
15485
15486         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
15487
15488         * basic-long.cs: Add new test.
15489         
15490 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
15491
15492         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
15493
15494 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
15495
15496         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
15497
15498         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
15499         places.
15500         
15501         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
15502         throwing code a bit.
15503
15504         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
15505         the exception throwing code a bit.
15506
15507         * mini-x86.c (get_call_info): Allocate result from a mempool.
15508
15509 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
15510
15511         * aot-compiler.c (find_typespec_for_class): Fix the assert.
15512
15513         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
15514
15515         * mini.h (MonoCompile): Add 'token_info_hash' field.
15516
15517         * mini.c: Save token->method associations during compilation so the AOT 
15518         compiler can use it.
15519         
15520         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
15521         which reference generic classes and methods.
15522
15523 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
15524
15525         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
15526
15527         * aot-compiler.c (compile_method): Fix a typo in a comment.
15528
15529         * aot-runtime.c (decode_cached_class_info): Skip generic types.
15530
15531         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
15532         everything generic.
15533
15534         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
15535
15536 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
15537
15538         * mini.h (MonoCompile): Add 'args' field.
15539
15540         * mini.c (mono_compile_create_vars): Store variables representing the arguments
15541         into cfg->args.
15542
15543         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
15544
15545 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
15546
15547         * mini.c (mono_compile_get_interface_var): Remove this unused function.
15548
15549         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
15550
15551         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
15552         opcodes for some opcodes.
15553
15554         * mini.h *.brg *.c: Use the new opcodes.
15555
15556 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
15557
15558         * mini.h: Bumped aot revision.
15559
15560         * inssel.brg: modified code generation of type checks for interfaces
15561         to use the new "MonoClass.interface_bitmap" instead of the old
15562         "MonoClass.interface_offsets".
15563
15564 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
15565
15566         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
15567
15568 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
15569
15570         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
15571         64 bit platforms.
15572
15573 2007-04-27  Neale Ferguson <neale@sinenomine.net>
15574
15575         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
15576
15577 2007-04-27  Wade Berrier  <wberrier@novell.com>
15578
15579         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
15580         mini.h) to fix build.
15581
15582 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
15583
15584         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
15585         
15586         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
15587         causes the corlib unit tests to fail.
15588
15589 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
15590
15591         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
15592
15593         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
15594
15595         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
15596         opcodes to the comparison relations.
15597
15598         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
15599         opcodes to their types.
15600         
15601         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
15602
15603         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
15604         it in cfg->arch.cinfo.
15605
15606         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
15607
15608         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
15609         cfg->cil_offset_to_bb.
15610
15611 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
15612
15613         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
15614         created becase of initlocals.
15615
15616 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
15617
15618         * mini-alpha.c cpu-alpha.md: More alpha port work from 
15619         Sergey Tikhonov <tsv@solvo.ru>.
15620
15621 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
15622
15623         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
15624
15625 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
15626
15627         * cpu-s390.md (break): Correct the length of break instruction.
15628
15629 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
15630
15631         * mini.c: fix a couple of soft-float issues and comments.
15632
15633 2007-04-15  Miguel de Icaza  <miguel@novell.com>
15634
15635         * trace.c (is_filenamechar): - is also a filename char.
15636
15637 2007-04-15  Neale Ferguson <neale@sinenomine.net>
15638
15639         * mini-s390.c: Correct checking for enum type in return value processing.
15640
15641 2007-04-14  Raja R Harinath  <rharinath@novell.com>
15642
15643         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
15644         (version.h): Makefile is in the build directory.
15645
15646 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
15647
15648         * mini-amd64.h: fix for assertion failure on Solaris/amd64
15649
15650 2007-04-11  Martin Baulig  <martin@ximian.com>
15651
15652         * mini.c (can_access_member): Fix handling of generic classes;
15653         fixes #81259.
15654
15655 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
15656
15657         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
15658
15659 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
15660
15661         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
15662
15663 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
15664
15665         * mini-codegen.c: make sure the right spill amount is
15666         used for fp or integer registers (fixes the float_sub_spill() on ppc).
15667
15668 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
15669
15670         * mini-ppc.c: fixes for the fp_branch_nan test.
15671
15672 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
15673
15674         * basic.cs: Comment out new test which still fails on ia64.
15675
15676 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
15677
15678         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
15679
15680 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
15681
15682         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
15683
15684 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
15685
15686         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
15687         on 64 bit machines. Fixes part of #80738.
15688
15689         * basic.cs: Add regression test.
15690
15691 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
15692
15693         * inssel.brg basic.cs: Revert previous change to fix build.
15694
15695         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
15696         platforms.
15697         
15698         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
15699
15700         * basic.cs: Add new regression test.
15701
15702 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
15703
15704         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
15705         many arguments.
15706
15707 2007-03-16  Neale Ferguson <neale@sinenomine.net>
15708
15709         * cpu-s390x.md: Correct length of break instruction.
15710
15711 2007-03-16  Neale Ferguson <neale@sinenomine.net>
15712
15713         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
15714         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
15715
15716 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
15717
15718         * *.c: Begin WIN64 port.
15719         * mini.c:  Use correct register in profiler.
15720         * mini-amd64.c: No inline assembly on Win64.
15721         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
15722         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
15723         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
15724         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
15725         mono_arch_ip_from_context for Win64.
15726         
15727         Contributed under MIT/X11 license.
15728
15729 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
15730
15731         * exceptions-amd64.c (seh_handler): Ditto.
15732
15733         * exceptions-x86.c (seh_handler): Fix a memory leak.
15734
15735 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
15736
15737         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
15738         mini-s390x.c: fixed peephole optimizations to deal
15739         correctly with 1 and 2 byte reload avoidance.
15740
15741 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
15742
15743         * cpu-s390.md, cpu-s390x.md: update localloc length.
15744
15745 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
15746
15747         * cpu-g4.md: added missing descriptions.
15748
15749 2007-03-14  Miguel de Icaza  <miguel@novell.com>
15750
15751         *  Makefile.am: Add support so the tail tests are not executed on
15752         PowerPC as that is a known limitation of the PowerPC port.
15753
15754 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
15755
15756         * runmdesc.bat:  Move to msvc directory.
15757         
15758 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
15759
15760         * runmdesc.bat:  Run executable that was produced by the current
15761         target and sent via an argument.
15762         
15763 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
15764
15765         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
15766         #81102.
15767
15768         * generics.2.cs: Add regression test.
15769
15770 2007-03-09  Wade berrier  <wberrier@novell.com>
15771
15772         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
15773
15774 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
15775
15776         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
15777         AOT code depends on this.
15778
15779 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
15780
15781         * mini.c: more precise tracking of types in the eval stack
15782         (part of fix for bug #81044).
15783
15784 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
15785
15786         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
15787
15788         * aot-compiler.c (encode_patch): Remove an obsolete comment.
15789
15790 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
15791
15792         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
15793
15794         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
15795
15796 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
15797
15798         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
15799         a pointer on 64 bit systems. Fixes #80190.
15800
15801         * iltests.il: Add new regression test.
15802
15803 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
15804
15805         * mini.c: inline a constant for Environment.IsRunningOnWindows.
15806
15807 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
15808
15809         * trace.c: Remove an erroneous alignemnt check when tracing.
15810           Fixes --trace on OSX86.
15811
15812 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
15813
15814         * mini-$(arch).h: initialize SP in context for all the archs.
15815
15816 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
15817
15818         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
15819         regressions in the thread tests.
15820
15821 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
15822
15823         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
15824         - fixed implementation of LOCALLOC opcode
15825         - implemented non-un compare for floats
15826         - code cleanup
15827         - implementation of FDIV and CKFINITE opcodes
15828         - fixes for latest mono updates
15829         - additional arch opcodes
15830
15831 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
15832
15833         * Makefile.am: simplify and merge rules for cross-compilation.
15834
15835 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
15836
15837         * local-propagation.c: Actually *apply* the fix for bug 80591...
15838
15839 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
15840
15841         * mini-exceptions.c: backuot part of the last change
15842         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
15843
15844 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
15845         * inssel.brg: Fix bug 59286.
15846
15847
15848 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
15849
15850         * mini-exceptions.c: patch from Zoltan to correctly check for
15851         stack boundaries (using the stack register, not the frame register),
15852         fixes bugs #80724, #79717.
15853
15854 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
15855
15856         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
15857         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
15858
15859         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
15860         presence of frame pointer elimination.
15861
15862 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
15863         
15864         * mini-x86.h: NetBSD UCONTEX_REG defines.
15865
15866 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
15867
15868         * inssel-amd64.brg: Fix amd64 build.
15869
15870 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
15871
15872         * mini.h: remove extern to workaround what looks likes gcc bug 26905
15873         on amd64.
15874
15875 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
15876
15877         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
15878         ends.
15879
15880         * mini-<ARCH>.c: Use mono_is_regsize_var ().
15881
15882 2007-01-30 Mark Mason <mason@broadcom.com>
15883
15884            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
15885            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
15886            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
15887            beginning support for CEE_JMP [not quite working yet]
15888            * tramp-mips.c: LMF handling now works
15889         
15890 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
15891
15892         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
15893
15894         * mini.h (NULLIFY_INS): New macro.
15895
15896 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
15897
15898         * mini.c: statistical profiler fix for windows, patch
15899         from Tor Lillqvist (tml@novell.com).
15900
15901 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
15902         * local-propagation.c: Fix bug 80591.
15903
15904 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
15905
15906         * Makefile.am: put back the --export-dynamic option as with
15907         the previous gmodule flags (thanks to Robert Jordan).
15908
15909 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
15910
15911         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
15912
15913         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
15914         simplify and speed up the local register allocator. Also rename some fields
15915         like iassign->vassign.
15916         
15917         * regalloc.c: Remove some functions which are no longer used since their
15918         inlined version is in mini-codegen.c.
15919         
15920         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
15921
15922         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
15923
15924 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
15925
15926         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
15927         narrowing. Fixes #80622.
15928
15929         * iltests.il: Add new regresssion test. 
15930
15931 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
15932
15933         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
15934         debug-debugger.c, debug-debugger.h: warning fixes.
15935         * driver.c: updated copyright year and made it fit in one line.
15936
15937 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
15938
15939         * aot-runtime.c: updated to use mono-dl instead of gmodule.
15940
15941 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
15942
15943         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
15944
15945         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
15946
15947         * iltests.il: Add new test for bug #80507.
15948
15949 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
15950
15951         * mini-arm.h: use soft-float also on vfp for now.
15952
15953 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
15954
15955         * mini.c: fix some more soft-float issues.
15956
15957 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
15958
15959         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
15960
15961 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
15962         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
15963         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
15964         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
15965
15966 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
15967
15968         * mini-arm.c: typo fix.
15969
15970 2007-01-23  Neale Ferguson <neale@sinenomine.net>
15971
15972         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
15973
15974 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
15975
15976         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
15977         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
15978
15979         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
15980
15981         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
15982
15983         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
15984         
15985         * inssel.brg: Fix a warning.
15986
15987         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
15988
15989         * abcremoval.c ssa.c ssapre.c: Update after this change.
15990         
15991         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
15992
15993         * dominators.c (df_set): Use mono_bitset_union_fast.    
15994
15995 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
15996
15997         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
15998         mini-codegen.c: reduce relocations and memory usage for the cpu
15999         description.
16000
16001 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
16002
16003         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
16004
16005         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
16006         to reduce their size.
16007
16008 2007-01-19 Mark Mason <mason@broadcom.com>
16009
16010         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
16011         * mini-mips.c: more configuration macros, support long conditional branches, additional
16012         asserts, fix epilog instrumentation.
16013         * mini-mips.h: use standard stack walk
16014         * cpu-mips.md: increase size of div, rem and conditional branches
16015         
16016 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
16017
16018         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
16019         to cpu spec data.
16020
16021 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
16022
16023         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
16024         (compile_method): Ditto.
16025
16026         * aot-runtime.c (decode_klass_info): Ditto.
16027
16028         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
16029         needed by the code generated by inssel.brg. Also fix a warning.
16030
16031 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
16032
16033         * mini.c: deal with enums that become genericinsts by
16034         being nested in a generic class (bug #79956).
16035
16036 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
16037
16038         * mini.c: match the generic definition to check for
16039         private access with generic types (bug #78431).
16040
16041 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
16042
16043         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
16044         to make life easier for people cross-compiling that insist on not
16045         using scratchbox.
16046
16047 2007-01-17 Mark Mason <mason@broadcom.com>
16048
16049         * inssel-long.brg: patch to deal with mips missing flags
16050         * inssel-long32-mips.brg: implement overflow checks
16051         * insset-mips.brg: implement overflow checks
16052         * mini-mips.h: implement conditional exception handling
16053         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
16054           Remove unused code, minor cleanups.
16055         * exceptions-mips.c: minor cleanups
16056         * mini-ops.h: add mips conditional exception ops
16057         * cpu-mips.md: add mips conditional exception ops
16058
16059         
16060 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
16061
16062         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
16063         to deal with mips missing of flags.
16064
16065 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
16066
16067         * exceptions-ppc.c: execute fault handlers.
16068
16069 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
16070
16071         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
16072
16073 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
16074
16075         * mini.c: handle also floating point values in initialize_array.
16076
16077 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
16078
16079         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
16080         array initialization and make it conditional on the intrins option.
16081
16082 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
16083
16084         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
16085         relocations and put the patch info names close to the enum definition.
16086
16087 2007-01-15 Mark Mason <mason@broadcom.com>
16088
16089         * basic.cs, exceptions.cs: break up large tests to increase debugability.
16090
16091 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
16092
16093         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
16094
16095 2007-01-12  Raja R Harinath  <rharinath@novell.com>
16096
16097         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
16098
16099 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
16100
16101         * Makefile.am: distribute the mips sources.
16102
16103 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
16104
16105         * mini-codegen.h: handle bug #80489 here, by excluding ecx
16106         directly.
16107
16108 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
16109
16110         * cpu-x86.md: back out for now as this triggers other regressions.
16111
16112 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
16113
16114         * cpu-x86.md: force src1 and dest regpair for long shift instructions
16115         to eax:edx, so ecx can't get allocated to them (bug #80489).
16116
16117 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
16118
16119         * mini.c, mini-exceptions.c: enabled running fault handlers
16120         (bug #80469).
16121
16122 2007-01-03  Miguel de Icaza  <miguel@novell.com>
16123
16124         * driver.c: If nothing fail, do not use the string "failed",
16125         because it makes it very annoying to view test result logs on the
16126         web. 
16127
16128 2006-12-30  Miguel de Icaza  <miguel@novell.com>
16129
16130         * debug-debugger.c (mono_debugger_main): Rename "main" to
16131         "main_method" to prevent a warning.
16132
16133         Remove a warning for unused field.
16134
16135 2006-12-28  Martin Baulig  <martin@ximian.com>
16136
16137         * debug-debugger.c
16138         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
16139
16140 2006-12-22  Martin Baulig  <martin@ximian.com>
16141
16142         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
16143         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
16144         seperate `.mdb_debug_info' section, so we can access it from the
16145         debugger even if the binary is stripped.
16146
16147         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
16148         from the `.mdb_debug_info' here to prevent the linker from
16149         removing that section.
16150
16151         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
16152         mdb-debug-info64.s.
16153
16154 2006-12-19  Robert Jordan  <robertj@gmx.net>
16155
16156         * mini-x86: enable the code to return small structures in
16157         registers for FreeBSD as well. Fixes bug #80278.
16158         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
16159
16160 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
16161
16162         * mini-x86.c: align the stack when calling the profiler
16163         function instrumenting the prolog (on OSX).
16164
16165 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
16166
16167         * mini.c: emit a break opcode where Debugger.Break () is called.
16168
16169 2006-12-13  Miguel de Icaza  <miguel@novell.com>
16170
16171         * mini.c (mono_method_to_ir): Provide useful information on this
16172         assert, to prevent others from debugging like I did.
16173
16174 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
16175
16176         * mini.c: enable code which was incorrectly commented
16177         (bug #80235).
16178
16179 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
16180
16181         * mini-x86.c: enable on OSX, too, the code to return small
16182         structures in registers.
16183
16184 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
16185
16186         * mini-x86.c: remove the use of the dynamic code manager here, too.
16187
16188 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
16189
16190         * mini.h, debug-debugger.c, tramp-*.c: fixed 
16191         mono_debugger_create_notification_function() to use
16192         mono_global_codeman_reserve () instead of a dynamic code manager.
16193
16194 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
16195
16196         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
16197         ves_array_element_address() jit icall and use a generated
16198         managed method instead (which is about 4 times faster for a rank 3
16199         array access).
16200
16201 2006-11-29  Mark Mason  <mason@broadcom.com>
16202
16203         * basic-calls.cs: additional tests for passing
16204         structures as function arguments.
16205
16206 2006-11-29  Mark Mason  <mason@broadcom.com>
16207
16208         * mini-mips.h: disable custom exception handling
16209         * mini-mips.c: throw/rethrow should use jalr to call
16210         exception stubs.  Fixed bug with passing structures
16211         by value. More support for tracing floating point
16212         functions.
16213
16214 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
16215
16216         * mini.c: fixed typo in the soft-float ldind.r4 handling
16217         (bug #80086).
16218
16219 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
16220
16221         * mini.c, mini.h, driver.c: added --runtime command line
16222         option to select a different runtime than the autodetected one.
16223         * jit.h: added API for embedders to initialize with a specific
16224         runtime version.
16225
16226 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
16227
16228         * mini.c: handle also boxing of r4 values (bug #80024).
16229
16230 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
16231
16232         * mini-ppc.c: force indirect calls until we reserve
16233         enough address space for all the generated code.
16234
16235 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
16236
16237         * exceptions-arm.c: workaround bugs in the libc definition
16238         of struct ucontext.
16239
16240 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
16241
16242         * inssel.brg: fixes from me and Mark Mason.
16243
16244 2006-11-23  Dick Porter  <dick@ximian.com>
16245
16246         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
16247         semaphore display now we've fixed the initial value
16248
16249 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
16250
16251         * inssel.brg: partially revert the last change to fix the build.
16252
16253 2006-11-21  Mark Mason  <mason@broadcom.com>
16254
16255         * inssel.brg: Add and use compare-and-branch macros to support
16256         architectures that do not have condition code registers (ie. MIPS).
16257         * *-mips.{c,brg,md}: Fix copyright statements
16258
16259 2006-11-20  Mark Mason  <mason@broadcom.com>
16260
16261         * Makefile.am: remove mini-codegen.c from list of MIPS sources
16262         * mini.c: Allow GET_CONTEXT to be specified by the arch port
16263         * mini.h: Added declaration for mono_print_ins()
16264         * mini-codegen.c: added ins_spec initializer for MIPS
16265         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
16266         vreg to be virtual and hreg to be non-virtual.
16267         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
16268         is not yet working/implemented correctly.
16269         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
16270         non-static, fixup calls to print_ins() from other parts in the file.
16271
16272 2006-11-20  Mark Mason  <mason@broadcom.com>
16273
16274         * basic-calls.cs: added tests for passing structures as arguments
16275         to calls.
16276
16277 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
16278
16279         * inssel-long32.brg: optimize signed division by power of two.
16280
16281 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
16282
16283         * mini-arm.c: added support for interworking with thumb code
16284         (mono must be still be built using the ARM instruction encoding).
16285
16286 2006-11-19  Miguel de Icaza  <miguel@novell.com>
16287
16288         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
16289         verifier has different rules for it.   Fixes a few verifier issues
16290         in the test suite.
16291
16292         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
16293         at the end, so people know what happened.
16294
16295 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
16296
16297         * brach-opts.c: in optimize_exception_target() make sure we
16298         are in a catch clause (fixes bug #79871).
16299
16300 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
16301
16302         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
16303         more soft-float support fixes.
16304
16305 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
16306
16307         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
16308         that are passed half on the stack and half in registers.
16309
16310 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
16311
16312         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
16313         more mips integration work from Mark E Mason 
16314         <mark.e.mason@broadcom.com>.
16315
16316 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
16317
16318         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
16319         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
16320         tramp-mips.c: added sources for the mips port, not
16321         integrated in the build yet. Contributed by
16322         Mark E Mason <mark.e.mason@broadcom.com>.
16323
16324 2006-11-14  Neale Ferguson <neale@sinenomine.net>
16325
16326         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
16327
16328 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
16329
16330         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
16331         put the soft-float rules in its own file since it seems to
16332         break s390 compilation.
16333
16334 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
16335
16336         * mini-arm.c: fixed wrnings.
16337
16338 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
16339
16340         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
16341         inssel-arm.brg: ARM support for soft-float.
16342
16343 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
16344
16345         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
16346         loads and stores of 32 bit fp values.
16347
16348 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
16349
16350         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
16351
16352         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
16353         works. Fixes #79852 and #79463.
16354
16355 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
16356
16357         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
16358         more soft-float support WIP and fixes.
16359
16360 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
16361
16362         * mini-arm.c: some VFP updates.
16363
16364 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
16365
16366         * mini-exceptions.c: 0 is a valid local var offset in some
16367         architectures, don't assert (bug #78508).
16368
16369 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
16370
16371         * exceptions-arm.c: fixed off by one error in stack walk code.
16372
16373 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
16374
16375         * mini.h, mini.c: more precise tracking of type load exceptions.
16376
16377 2006-11-03  Robert Jordan  <robertj@gmx.net>
16378
16379         * Makefile.am: [WIN32] Add monow.exe target.
16380         * driver.c: [WIN32] Don't detach the console when debugging.
16381         Fixes bug #79797.
16382         
16383 2006-10-30  Miguel de Icaza  <miguel@novell.com>
16384
16385         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
16386
16387 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
16388
16389         * aot-compiler.c (emit_method_info): Add a case missed earlier.
16390
16391         * driver.c (mini_regression): Fix --regression with AOT.
16392
16393         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
16394
16395 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
16396
16397         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
16398
16399         * mini-sparc.h: Don't use sigaction on sparc/linux.
16400
16401         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
16402
16403         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
16404
16405         * mini-exceptions.c: Add proper include files for getpid ().
16406
16407 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
16408
16409         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
16410         address instead of a MonoJitInfo* to avoid decoding the exception info for the
16411         method.
16412
16413         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
16414         name cache to reduce its size.
16415
16416         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
16417
16418 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
16419
16420         * mini-x86.c: Save/restore the current LMF structure more efficiently using
16421         the mono_lmf TLS variable.
16422
16423         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
16424         trampoline lmf frames.  
16425
16426         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
16427
16428 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
16429
16430         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
16431         the mono_lmf TLS variable.
16432
16433         * mini-exceptions.c: Access the LMF structure through accessors.
16434
16435         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
16436         variable instead of in jit_tls->lmf.
16437
16438         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
16439         
16440         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
16441         trampoline lmf frames.
16442
16443         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
16444
16445 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
16446
16447        * mini.c trace.c mini-x86.c: Revert these too.
16448         
16449        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
16450        signature change.
16451
16452 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
16453
16454         * genmdesc.c: removed now dead code.
16455
16456 2006-10-09  Robert Jordan <robertj@gmx.net>
16457
16458         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
16459
16460 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
16461
16462         * mini.h: do not leave gaps in the opcode values.
16463
16464 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
16465
16466         * jit-icalls.h: flag functions as internal here, too.
16467
16468 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
16469
16470         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
16471         functions with the internal attribute.
16472
16473 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
16474
16475         * aot-compiler.c: fclose the file descriptor in the profile read loop.
16476
16477 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
16478
16479         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
16480         for soft-float.
16481
16482 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
16483
16484         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
16485         tail calls as on other platforms.
16486
16487         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
16488
16489         * iltests.il: Add a few tailcall tests.
16490
16491 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
16492
16493         * driver.c: fix loop for old compilers (bug #79521).
16494
16495 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
16496
16497         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
16498
16499         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
16500
16501         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
16502         metadata without any code.
16503
16504         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
16505         more precise debugging information using gdb.
16506
16507 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
16508
16509         * inssel-ia64.brg: Make the helper methods static.
16510
16511 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
16512
16513         * inssel-x86.brg: make the helper methods static.
16514
16515 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
16516
16517         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
16518
16519 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
16520
16521         * mini.c: updates for monoburg changes.
16522         * inssel.brg: make a few helper functions static as they should.
16523
16524 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
16525
16526         * Makefile.am: Move mini-codegen.c to common_sources.
16527
16528 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
16529
16530         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
16531         instructions.
16532         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
16533         mini-ppc.h: port to use the common local register allocator.
16534
16535 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
16536
16537         * mini.h: Remove the comment too then.
16538
16539 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
16540
16541         * mini.h: put back backend.data which is to be used shortly and
16542         doesn't increase the size of MonoInst. If any 64 bit arch aligned
16543         pointers on 4 byte boundaries it'd have much bigger issues running
16544         and you can ifdef it out anyway.
16545
16546 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
16547
16548         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
16549         MonoInst size by 4 bytes on 64 bit machines.
16550
16551 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
16552
16553         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
16554         replacement with more meaningful field names. Arch maintainers, please
16555         check the assigned names are good enough for your arch.
16556
16557 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
16558
16559         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
16560         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
16561
16562 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
16563
16564         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
16565         relocations and memory requirements, put the optimization flags
16566         definitions in their own file.
16567
16568 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
16569
16570         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
16571
16572         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
16573
16574 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
16575
16576         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
16577
16578 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
16579
16580         * inssel.brg: use the correct function to get the size of an item
16581         in an array, given an element class.
16582         * aot-compiler.c: do not access class->class_size directly.
16583
16584 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
16585
16586         * mini.h, debug-mini.c: added a debugging function to print
16587         info about local variables and arguments in a jitted method.
16588
16589 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
16590
16591         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
16592
16593         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
16594
16595 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
16596
16597         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
16598         inner and outer loops when passing vtypes.
16599
16600 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
16601
16602         * mini-ppc.c: take into account the cpu errata for cache flushing
16603         which caused some random errors (bug #79381).
16604
16605 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
16606
16607         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
16608         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
16609
16610 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
16611
16612         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
16613         loaded.
16614
16615         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
16616         freebsd ports tree.
16617
16618         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
16619         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
16620
16621         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
16622         displacement.
16623
16624 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
16625
16626         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
16627
16628 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
16629
16630         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
16631         macro does not have to be changed during debugging.
16632
16633         * 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>.
16634
16635         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
16636
16637         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
16638         
16639         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
16640         MONO_ARCH_NO_EMULATE_MUL is defined.
16641
16642         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
16643
16644         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
16645
16646         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
16647
16648         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
16649         
16650 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
16651
16652         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
16653         stuff to mini-exceptions.c where it is used.
16654
16655         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
16656         setup code, the real one is in mini-exceptions.c.
16657
16658         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
16659         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
16660         some changes from the freebsd ports tree.
16661
16662         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
16663         constants.
16664         
16665         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
16666
16667 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
16668
16669         * mini.c: on Linux, check for /proc to be mounted
16670         (bug# 79351, novell bug#201204).
16671
16672 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
16673
16674         * mini.c: handle cases where pthread_attr_getstack() behaves
16675         incorrectly (bug #78096).
16676
16677 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
16678
16679         * mini-arm.c: support larger stack frames (bug #79272).
16680
16681 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
16682
16683         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
16684
16685         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
16686         tokens.
16687
16688         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
16689         mono_class_from_name () to find a class from its name.
16690
16691         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
16692
16693 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
16694
16695         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
16696
16697 2006-09-05  Kornel Pal  <kornelpal@gmail.com>
16698
16699         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
16700
16701 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
16702
16703         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
16704         callinfo->trampoline.
16705
16706         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
16707         fixes #79271.
16708         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
16709         future.
16710
16711 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
16712
16713         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
16714
16715 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
16716
16717         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
16718         stats.method_trampolines, it is already done by the generic trampoline code.
16719
16720         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
16721         
16722 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
16723
16724         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
16725
16726         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
16727
16728         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
16729
16730         * mini.c (print_jit_stats): Print mscorlib mempool size too.
16731         
16732         * mini.c (print_jit_stats): Print new stats.
16733
16734         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
16735
16736 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
16737
16738         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
16739         Address on two dimensional arrays. Fixes #78729.
16740
16741         * mini.h (MonoCompile): Add a 'skip_visibility' field.
16742
16743         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
16744         a method.
16745
16746         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
16747
16748         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
16749         #79130.
16750         
16751         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
16752         a race condition.
16753         (mini_get_ldelema_ins): Ditto.
16754
16755 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
16756
16757         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
16758         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
16759         Fixes #79213.
16760
16761 2006-08-29 Neale Ferguson <neale@sinenomine.net>
16762
16763         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
16764         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
16765
16766         * exceptions-s390x.c: Cosmetic change.
16767
16768         * tramp-s390.c: Fix warning.
16769
16770         * cpu-s390.md: Correct length of mul_imm.
16771
16772 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
16773
16774         * aot-compiler.c: added binary writer with ELF backend
16775         implementation (only on Linux/x86 for now).
16776
16777 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
16778
16779         * Makefile.am: Don't run net 2.0 AOT tests.
16780
16781         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
16782         (mono_compile_assembly): Skip net 2.0 assemblies as well.
16783
16784         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
16785
16786 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
16787
16788         * aot-compiler.c: simplified and refactored the asm-writing code
16789         to allow different backends.
16790
16791 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
16792
16793         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
16794
16795         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
16796         little. Share patches of type TYPE_FROM_HANDLE as well.
16797
16798         * mini.c (mono_patch_info_equal): New helper function.
16799         (mono_patch_info_hash): Ditto.
16800
16801         * aot-compiler.c (emit_method_code): Fix s390 build.
16802
16803         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
16804         is not handled because it is stored as a flag and not as a type ctor. Fixes
16805         #79016.
16806
16807 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
16808
16809         * aot-compiler.c: Fix computation of GOT slot statistics.
16810         
16811         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
16812         Also remove support for not PIC AOT.
16813
16814         * mini.h: Bump AOT file format version.
16815
16816         * objects.cs: Add a test for #78990.
16817
16818         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
16819         (peter.dettman@iinet.net.au). Fixes #79087.
16820
16821         * basic-long.cs: Add a test for the above.
16822
16823 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
16824
16825         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
16826         
16827         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
16828         code somewhat.
16829
16830 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
16831
16832         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
16833         exceptions.
16834
16835 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
16836
16837         * mini.c: Don't verify COM proxy invoke calls
16838         
16839
16840 2006-08-10  Dick Porter  <dick@ximian.com>
16841
16842         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
16843         which process is holding semaphores locked.
16844
16845 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
16846
16847         * mini-ia64.c mini-amd64.c: Fix #79027.
16848
16849         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
16850
16851         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
16852
16853         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
16854         implicit arguments in a vararg call. Fixes #79027.
16855
16856 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
16857
16858         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
16859         (mono_get_array_new_va_signature): Ditto.
16860
16861 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
16862
16863         * aot-runtime.c: Call init_plt lazily.
16864
16865         * inssel-long.brg: Fix unsigned long->int conversion.
16866
16867         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
16868
16869         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
16870         that most data is now in the .rss/.data section.
16871
16872 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
16873
16874         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
16875
16876         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
16877
16878         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
16879
16880         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
16881
16882         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
16883         virtual call. Fixes #79010.
16884
16885         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
16886         and use the result as the this argument in the real call.
16887
16888         * generics.2.cs: Add a new test for #79010.
16889         
16890 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
16891
16892         * mini-x86.c: Fix a warning.
16893
16894         * aot-compiler.c: Add a bunch of statistics.
16895
16896         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
16897
16898 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
16899
16900         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
16901
16902 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
16903
16904         * 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>.
16905
16906 2006-07-13  Miguel de Icaza  <miguel@novell.com>
16907
16908         * mini.c (mono_method_to_ir): Obtain the original method in the
16909         CIL stream and use this to perform validation.
16910
16911         Fixed: #78816
16912
16913 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
16914
16915         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
16916         (mono_arch_call_opcode): Ditto.
16917
16918         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
16919         #78826.
16920
16921         * mini.c (mono_patch_info_dup_mp): New helper function.
16922         
16923         * aot-compiler.c (compile_method): Fix some of the memory allocated during
16924         compilation. Fixes #78827.
16925
16926 2006-07-18  Kornel Pal  <kornelpal@gmail.com>
16927
16928         * declsec.c: Use original security informations for
16929           MONO_WRAPPER_MANAGED_TO_MANAGED.
16930
16931 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
16932
16933         * mini.c: Allow Com Interop methods/classes and
16934         don't verify COM wrapper calls
16935         
16936
16937 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
16938
16939         * inssel-long32.brg: Fix long->i4 checked conversion.
16940
16941         * exceptions.cs: Add a test for the above.
16942
16943 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
16944
16945         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
16946
16947         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
16948         leaks.
16949
16950         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
16951         #78775.
16952
16953 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
16954
16955         * mini.c: Fix solaris/x86 exception handling.
16956
16957         * Makefile.am: Get rid of $(ICU_LIBS).
16958
16959 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
16960
16961         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
16962         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
16963         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
16964
16965         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
16966
16967         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
16968         this function causes a SIGSEGV.
16969
16970 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
16971
16972         * mini.c: Remove unused solaris/x86 includes.
16973
16974 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
16975
16976         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
16977
16978 2006-06-20  Jb Evain  <jbevain@gmail.com>
16979
16980         * cpu-g4.md: fix max length of start_handler instruction.
16981
16982 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
16983         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
16984
16985 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
16986         * ssa.c: Fixed bug 78653 for SSA based deadce.
16987         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
16988         MonoInst.flags, used in SSA based deadce.
16989         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
16990         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
16991
16992 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
16993
16994         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
16995         it can end up using non executable memory on ppc64 systems
16996         running ppc32 userspace (fix from Johannes Berg).
16997
16998 2006-06-14  Dick Porter  <dick@ximian.com>
16999
17000         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
17001         4.1.1
17002
17003 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
17004         * mini.c: Made so that inline is locally disabled if it would
17005         trigger a .cctor, because too many apps depend on this behavior
17006         (which seems to be also the one of the MS CLR).
17007
17008 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
17009
17010         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
17011         No idea why this worked before.
17012
17013         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
17014         which branch to outer exception clauses since they could skip the
17015         inner finally clauses. Fixes #78633.
17016
17017         * exceptions.cs: Add a test for the above.
17018
17019         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
17020         Fixes #78629.
17021
17022         * iltests.il: Add a test for the above.
17023
17024 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
17025
17026         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
17027         after the end of a try bblock, to prevent asserts in mini_method_compile ().
17028
17029         * iltests.il: Add a test for the above.
17030
17031 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
17032
17033         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
17034         
17035         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
17036         methods as instrinsics.
17037
17038 2006-06-09  Wade Berrier <wberrier@novell.com>
17039
17040         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
17041         (simple-cee-ops.h ssapre-mini-ops.h)
17042
17043 2006-06-09  Neale Ferguson <neale@sinenomine.net>
17044
17045         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
17046         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
17047         instruction).
17048         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
17049         * cpu-s390x.md: Fix max. length values for a couple of instructions.
17050
17051 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
17052
17053         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
17054
17055 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
17056
17057         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
17058         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
17059         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
17060         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
17061         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
17062         of opcodes, so that bug 78549 should not happen again.
17063         * ssapre.c: Updated to use the renamed files.
17064
17065 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
17066
17067         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
17068         in OP_ATOMIC_EXCHANGE_I4.
17069
17070 2006-06-07  Wade Berrier <wberrier@novell.com>
17071
17072         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
17073         in mono_debugger_create_notification_function)
17074
17075 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
17076
17077         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
17078         
17079         * mini.c (type_from_stack_type): Disable some changes which do not
17080         seem to work.
17081
17082         * driver.c: Reenable opts.
17083
17084         * mini.h (MonoStackSlot): New structure to keep track of the verification state
17085         of the evaluation stack.
17086         
17087         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
17088         evaluation stack trace at entry to the bblock.
17089
17090         * mini.c (merge_stacks): New function to perform verification of stack merges.
17091         Turned off by default.
17092
17093         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
17094         STACK_MP.
17095         
17096 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
17097
17098         * local-propagation.c: Fixed bug 78549.
17099
17100 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
17101
17102         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
17103
17104 2006-06-02  Miguel de Icaza  <miguel@novell.com>
17105
17106         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
17107         tramp-arm.c, tramp-ia64.c
17108         (mono_debugger_create_notification_function): Update signature to
17109         new signature and use new protocol for creating the notification
17110         function.  
17111
17112         Should fix the build.
17113
17114 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
17115
17116         * exceptions-ppc.c (mono_jit_walk_stack)
17117         (ves_icall_get_frame_info): Fix the build
17118
17119 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
17120
17121         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
17122
17123 2006-05-31  Raja R Harinath  <rharinath@novell.com>
17124
17125         * il2tests.2.il: New file for generics CIL tests.  Add test for
17126         #78019.
17127         * Makefile.am: Update.
17128
17129         Fix #78019
17130         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
17131         to nullable types.
17132
17133 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
17134
17135         * aliasing.c: Fixed bug 78311.
17136
17137 2006-05-29  Martin Baulig  <martin@ximian.com>
17138
17139         * mini-exceptions.c (mono_find_jit_info): When computing the
17140         native offset, check whether we're actually inside the method's
17141         code; call mono_debug_print_stack_frame() to format the frame.
17142         (ves_icall_System_Exception_get_trace): Call
17143         mono_debug_print_stack_frame() to format the stack frame.
17144         (ves_icall_get_trace): Update to the new debugging API.
17145         (mono_jit_walk_stack_from_ctx): Likewise.
17146         (ves_icall_get_frame_info): Likewise.
17147
17148         * mini.c (get_method_from_ip): Use the new debugging API.
17149         (mono_print_method_from_ip): Likewise.
17150
17151         * exceptions-ppc.c
17152         (mono_jit_walk_stack): Use the new debugging API.
17153         (ves_icall_get_frame_info): Likewise.   
17154
17155 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
17156
17157         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
17158
17159 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
17160
17161         * mini.c: Added "limitator" to inline for debugging.
17162
17163 2006-05-24  Martin Baulig  <martin@ximian.com>
17164
17165         * debug-debugger.c (mono_debugger_init): Create a private,
17166         malloc()-based code manager for the notification function and
17167         intentionally leak it on exit.  This fixes the crash-on-exit race
17168         condition.
17169
17170         * tramp-amd64.c
17171         (mono_debugger_create_notification_function): Added
17172         `MonoCodeManager *' argument.
17173
17174         * tramp-x86.c
17175         (mono_debugger_create_notification_function): Added
17176         `MonoCodeManager *' argument.
17177
17178 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
17179
17180         * aliasing.c: Fixed 64 bit issue.
17181         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
17182         default since all known bugs are fixed (one more time!).
17183
17184 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
17185
17186         * mini.c: write barrier support.
17187
17188 2006-05-23  Martin Baulig  <martin@ximian.com>
17189
17190         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
17191         check at the top of the file.
17192
17193 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
17194
17195         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
17196         reverting changes without reason and without changelog entries.
17197
17198 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
17199
17200         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
17201         to a few opcodes. Fixes #78439.
17202
17203         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
17204         consistency with other archs.
17205
17206         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
17207
17208 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
17209
17210         * debug-debugger.c: fix the build.
17211
17212 2006-05-17  Martin Baulig  <martin@ximian.com>
17213
17214         * debug-debugger.c
17215         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
17216         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
17217         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
17218         (debugger_attach): Call GC_mono_debugger_add_all_threads().
17219
17220 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
17221
17222         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
17223
17224 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
17225
17226         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
17227         MONO_TYPE_GENERICINST.
17228         
17229         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
17230         MONO_TYPE_GENERICINST.
17231
17232 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
17233
17234         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
17235         #78325.
17236
17237 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
17238
17239         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
17240         mempool.
17241         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
17242
17243 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
17244
17245         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
17246         mono_trace_cleanup ().
17247
17248         * iltests.il: Fix problem with the newly added test.
17249
17250         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
17251         due to register constraints, free up the previous hreg. Fixes #78314.
17252
17253         * iltests.il: Add new test for #78314.  
17254
17255         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
17256         Interlocked.Add. Fixes #78312.
17257
17258         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
17259         
17260 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
17261
17262         * inssel.brg (mini_emit_virtual_call): Fix a warning.
17263
17264 2006-05-05  Martin Baulig  <martin@ximian.com>
17265
17266         * debug-mini.c (mono_debug_open_block): New method.
17267
17268         * mini-amd64.c
17269         (mono_arch_output_basic_block): Call mono_debug_open_block() at
17270         the beginning of each basic block.
17271
17272         * mini-x86.c
17273         (mono_arch_output_basic_block): Call mono_debug_open_block() at
17274         the beginning of each basic block.
17275
17276 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
17277
17278         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
17279         default until I understand why they break the build on amd64.
17280
17281 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
17282
17283         * mini.c (mini_cleanup): Call mono_cleanup ().
17284
17285         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
17286         errors.
17287
17288 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
17289
17290         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
17291         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
17292         default since all known bugs are fixed, and I cannot reproduce bug
17293         77944... I'm asking Matt Hargett to test again after this commit.
17294
17295 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
17296
17297         * mini-codegen.c: Fixed typo that thrashed inline.
17298
17299 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
17300
17301         * dominators.c (compute_dominators): Avoid using a worklist since
17302         it is not correct in some cases. Instead, iterate over all bblocks as
17303         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
17304
17305 2006-04-28  Miguel de Icaza  <miguel@novell.com>
17306
17307         * mini.c (mono_jit_compile_method_inner): Use
17308         mono_prepare_exception_from_error that resets the value
17309         internally.
17310
17311 2006-04-27  Miguel de Icaza  <miguel@novell.com>
17312
17313         * mini.c: Move the mini_loader_error_to_exception to metadata. 
17314         
17315 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
17316
17317         * aliasing.c: Fixed bug 78210.
17318
17319 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
17320
17321         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
17322         default until all their problems (or the ones they trigger) are fixed.
17323
17324 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
17325
17326         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
17327         
17328         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
17329         as loaded only after resolving patches since that could invoke the same method.
17330
17331         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
17332
17333         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
17334         functions.
17335
17336         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
17337         AOT loader.
17338
17339         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
17340         stack.
17341
17342         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
17343         made from AOT code through the PLT table.
17344
17345         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
17346         holding the plt offset when a call is made to the aot plt trampoline.
17347         
17348 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
17349
17350         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
17351         amd64 AOT support.
17352
17353         * Makefile.am (common_sources): Fix build breakage.
17354
17355         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
17356         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
17357         intra-assembly calls if possible.
17358         
17359         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
17360
17361         * mini-trampolines.c: Handle PLT entries.
17362
17363         * mini.c: Avoid creating a GOT var for calls.
17364
17365         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
17366         from mscorlib code.
17367
17368         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
17369         from mscorlib code.
17370
17371         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
17372         AOT code.       
17373
17374         * mini.h: Bump AOT file format version.
17375         
17376         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
17377         covers more cases.
17378
17379 2006-04-25  Martin Baulig  <martin@ximian.com>
17380
17381         * driver.c: Disable copyprop, consprop and inline when running
17382         inside the debugger.
17383
17384 2006-04-25  Martin Baulig  <martin@ximian.com>
17385
17386         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
17387         with `get_current_thread' and added `detach'.
17388         (MonoDebuggerMetadataInfo): Added `thread_size',
17389         `thread_tid_offset', `thread_stack_ptr_offset' and
17390         `thread_end_stack_offset'.
17391
17392 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
17393
17394         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
17395         aot-runtime.c.
17396
17397         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
17398         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
17399
17400         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
17401
17402         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
17403
17404         * aot.c: Add support for ADJUSTED_IID.  
17405
17406 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
17407
17408         * aot.c (emit_method_order): Don't align method_order_end.
17409
17410         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
17411         the interface ID changes.
17412
17413 2006-04-21  Dick Porter  <dick@ximian.com>
17414
17415         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
17416         cleaning up a thread.  Fixes the new part of bug 77470.
17417
17418 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
17419
17420         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
17421         to managed wrapper.
17422                      
17423 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
17424
17425         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
17426         
17427         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
17428         SIGSEGV. Fixes #78072.
17429
17430         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
17431         unregister our SIGABRT handler.
17432
17433 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
17434
17435         * mini.c: Disabled inline where it can alter the call stack in a
17436         way visible from managed code.
17437         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
17438         default.
17439
17440 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
17441
17442         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
17443         on other platforms. Fixes #78089.
17444
17445 2006-04-13  Martin Baulig  <martin@ximian.com>
17446
17447         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
17448         determine whether we're inside the debugger.
17449
17450         * debug-debugger.h
17451         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
17452
17453 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
17454
17455         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
17456         handler clauses. Fixes #78024.
17457
17458         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
17459         in the CALL_MEMBASE opcodes. Fixes #78088.
17460         (mono_arch_get_vcall_slot_addr): Ditto.
17461
17462 2006-04-10  Martin Baulig  <martin@ximian.com>
17463
17464         * debug-debugger.c: The thread handling code has now been moved
17465         into ../metadata/threads.c.
17466
17467 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
17468
17469         * driver.c (mono_main): Fix --with-gc=none build.
17470
17471         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
17472         (mono_spillvar_offset_float): Ditto.
17473         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
17474         hreg, not when its !global, since on ia64, there is a third category: stacked
17475         registers.      
17476
17477 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
17478
17479         * mini.c: set MonoInst->klass for load field address and a few other
17480         places.
17481
17482 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
17483
17484         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
17485
17486 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
17487
17488         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
17489         the branch opt changes.
17490
17491 2006-04-06  Dick Porter  <dick@ximian.com>
17492
17493         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
17494         
17495         * wapihandles.c (mini_wapi_seminfo): 
17496         * driver.c (mono_main): Add semaphore info option
17497
17498 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
17499
17500         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
17501         branch optimization changes. Fixes #78009.
17502
17503 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
17504
17505         * mini.c: ignore accessibility of methods in managed->native wrappers.
17506
17507 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
17508
17509         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
17510         
17511         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
17512
17513 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
17514
17515         * mini.c: Modify the branch optimizations to preserve the invariant that
17516         the entries inside the in_bb and out_bb arrays are unique.
17517         (mono_unlink_bblock): Avoid creation of new arrays.
17518
17519 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
17520
17521         * mini.c (mono_unlink_bblock): Fix regression caused by previous
17522         change (#77992).
17523
17524 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
17525
17526         * mini.c (optimize_branches): Remove the "optimizations" in
17527         the cbranch1/cbranch2 -> branch cases which were causing several
17528         problems in the past. Fixes #77986.
17529
17530 2006-03-31  Chris Toshok  <toshok@ximian.com>
17531
17532         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
17533         default optimizations :(
17534
17535 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
17536
17537         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
17538         branch.
17539
17540 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
17541
17542         * local-propagation.c: Added comments to structs and removed
17543         "Mono" prefixes from local tree mover types.
17544
17545 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
17546
17547         * Makefile.am (arch_sources): Define this for each architecture so 
17548         libmono_la_SOURCES is defined in one place.
17549
17550 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
17551
17552         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
17553         from handles/.
17554
17555 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
17556
17557         * driver.c: print the GC name supplied by configure.
17558
17559 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
17560
17561         * local-propagation.c: Added tree mover, and moved here all the
17562         local propagation code from mini.c
17563         * mini.c: Added support for treeprop, and moved all the local
17564         propagation code to local-propagation.c
17565         * mini.h: Added support for treeprop
17566         * driver.c: Added support for treeprop, enabled consprop, copyprop,
17567         treeprop, inline and deadce by default
17568         * Makefile.am: Added local-propagation.c
17569
17570 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
17571
17572         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
17573
17574 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
17575
17576         * debug-debugger.c: make it compile without the Boehm GC.
17577
17578 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
17579
17580         * mini.c: fixed issue with mismatch when an icall is registered
17581         with multiple names but same address.
17582
17583 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
17584
17585         * declsec.c, mini-exceptions.c: use write barrier to set reference
17586         fields of managed objects.
17587
17588 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
17589
17590         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
17591         (can_access_internals): Fix a warning.
17592
17593         * mini.c (print_method_from_ip): Rename this to 
17594         mono_print_method_from_ip so it gets exported.
17595
17596         * trace.c: Deal with strings inside StringBuilder's containing garbage
17597         and fix memory leaks. Fixes #77848.
17598
17599 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
17600
17601         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
17602         fixes #77787.
17603
17604 2006-03-16 Neale Ferguson <neale@sinenomine.net>
17605         
17606         * mini-s390.c: Remove OP_X86_TEST_NULL.
17607
17608 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
17609
17610         * mini.c: use the correct GetHashCode() for the moving collector.
17611
17612 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
17613
17614         * liveness.c: Regalloc spill cost tuning.
17615
17616 2006-03-15 Neale Ferguson <neale@sinenomine.net>
17617         
17618         * mini-s390x.h: Correct S390_LONG macro.
17619
17620         * mini-s390x.c: Cleanup unused code.
17621
17622 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
17623
17624         * jit-icalls.h: New file.
17625
17626         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
17627         icalls and include that instead of including jit-icalls.c.
17628
17629         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
17630         OP_X86 opcodes.
17631
17632 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
17633
17634         * mini.c: when checking for member accessibility, also check for
17635         friend assemblies and for explicit interface implementations.
17636
17637 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
17638
17639         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
17640
17641         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
17642
17643         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
17644         common cases are done first.    
17645
17646         * mini-ops.h: Only define platform specific opcodes on the given platform.
17647
17648         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
17649         branch.
17650         
17651 2006-03-14  Martin Baulig  <martin@ximian.com>
17652
17653         Revert Paolo's change from r57348:
17654
17655         * mini.h: don't use gboolean for bitfields.
17656         * mini.c: verifier changes for fields and methods accessibility.
17657
17658 2006-03-13  Neale Ferguson <neale@sinenomine.net>
17659
17660         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
17661
17662         * mini-s390x.c: Fix conv_r_un.
17663
17664         * cpu-s390, cpu-s390x.md: Fix lengths.
17665
17666 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
17667
17668         * mini.c: nested types have access to all the nesting
17669         levels, not just the enclosing types.
17670
17671 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
17672
17673         * mini.c: added a few more verification checks.
17674
17675 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
17676
17677         * liveness.c: Merge optimizations from the linear-il branch.
17678
17679 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
17680
17681         * mini-ia64.c (emit_call): Add a comment.
17682
17683         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
17684
17685         * tramp-ia64.c: Fix some warnings.
17686
17687 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
17688
17689         * mini.h: don't use gboolean for bitfields.
17690         * mini.c: verifier changes for fields and methods accessibility.
17691
17692 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
17693
17694         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
17695         lazy icall wrapper changes.
17696
17697         * dominators.c: Replace all the dominator algorithms with faster
17698         ones from the linear-il branch.
17699
17700         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
17701         the mempool.
17702
17703         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
17704         common cases are done first.
17705
17706         * mini-amd64.c: Fix some warnings.
17707
17708         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
17709         from the mempool.
17710
17711         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
17712         added code.
17713
17714         * mini.h: Add a missing prototype.
17715
17716 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
17717
17718         * mini.c: Compile icall wrappers lazily.
17719
17720         * mini-codegen.c: Use printf instead of g_print since its much faster.
17721
17722         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
17723         function.
17724
17725         * mini.c (optimize_branches): Cache the negative result from 
17726         remove_block_if_useless ().
17727
17728         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
17729         Also fix some bblock linking issues.
17730
17731         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
17732         assembly files.
17733
17734         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
17735
17736         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
17737         accessed fields first, for better cache behavior.
17738         
17739 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
17740
17741         * mini.c: speedup IList<T> array accesses.
17742
17743 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
17744
17745         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
17746         inline_costs counter. Fixes #77190.
17747
17748 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
17749
17750         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
17751         trace messages. Fixes #77706.
17752
17753 2006-03-04  Martin Baulig  <martin@ximian.com>
17754
17755         * tramp-amd64.c, tramp-x86.c
17756         (mono_debugger_create_notification_function): Use
17757         mono_global_codeman_reserve() to allocate a buffer at runtime and
17758         return it.
17759
17760         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
17761
17762         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
17763         notification function at runtime and then call `initialize' in the
17764         `MONO_DEBUGGER__debugger_info' vtable.
17765
17766 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
17767
17768         * iltests.il: Fix a visibility problem.
17769
17770 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
17771
17772         * driver.c, mini.c: add hooks for the counters API.
17773
17774 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
17775
17776         * driver.c: show disabled options.
17777
17778 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
17779
17780         * linear-scan.c: always use cost-driven selection.
17781
17782 2006-02-28  Raja R Harinath  <rharinath@novell.com>
17783
17784         * jit-icalls.c (helper_compile_generic_method): Revert change from
17785         2006-02-24.
17786
17787 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
17788
17789         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
17790
17791 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
17792
17793         * inssel.brg: style fixes, mostly to force the updated monoburg
17794         to run for people using svn.
17795
17796 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
17797
17798         * mini.c: match monoburg changes.
17799
17800 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
17801
17802         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
17803         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
17804         declaration in the header file.
17805
17806 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
17807
17808         * helpers.c: reduce relocations and mem usage.
17809
17810 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
17811
17812         * mini.h, mini-codegen.c: disable logging features if
17813         requested by configure.
17814
17815 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
17816
17817         * mini.c: tiny verifier changes.
17818
17819 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
17820
17821         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
17822         cpu-pentium.md: stack alignment changes for osx/x86,
17823         partially from Geoff Norton <gnorton@customerdna.com>.
17824
17825 2006-02-24  Raja R Harinath  <harinath@gmail.com>
17826
17827         * jit-icalls.c (helper_compile_generic_method): Update to changes
17828         in metadata/class.c.
17829
17830 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
17831         
17832         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
17833         
17834         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
17835         interface calls with large offsets.
17836
17837 2006-02-23  Raja R Harinath  <rharinath@novell.com>
17838
17839         * jit-icalls.c (helper_compile_generic_method): Document the
17840         special-case we depend on so that we can inflate the method twice
17841         with the same context with no bad side-effects.
17842
17843 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
17844
17845         * mini-x86.c, mini-amd64.c: fix for case when xen support
17846         is disabled.
17847
17848 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
17849
17850         * mini-x86.c, mini-amd64.c: generate code to access tls items
17851         in a faster way for Xen systems.
17852
17853 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
17854
17855         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
17856         updates and compilation fixes for the OSX/x86 port, mostly from
17857         Geoff Norton <gnorton@customerdna.com>.
17858
17859 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
17860
17861         * inssel.brg: faster interface call implementation
17862         to sync with the interface_offsets MonoVTable changes.
17863
17864 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
17865
17866         * mini.c: more verification checks.
17867
17868 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
17869
17870         * mini.c: added a few more verification checks.
17871
17872 2006-02-17      Neale Ferguson <neale@sinenomine.net>
17873
17874         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
17875         facility on the processor and use it if available.
17876
17877 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
17878
17879         * driver.c, aot.c, mini.c: throw exception if the IL code is
17880         invalid or unverifiable.
17881
17882 2006-02-17  Raja R Harinath  <rharinath@novell.com>
17883
17884         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
17885         m.StructField.
17886
17887 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
17888
17889         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
17890
17891 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
17892
17893         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
17894         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
17895         handling of instantiated generic valuetypes.
17896
17897 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
17898
17899         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
17900         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
17901         instead.
17902
17903         * generics.2.cs: Revert the nullable reftypes tests.
17904
17905 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
17906
17907         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
17908         using __builtin_frame_address (1) as it doesn't work in the presence
17909         of optimizations. Hopefully fixes #77273.
17910
17911         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
17912         -> generics.cs change as it doesn't work with some automake versions.
17913
17914 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
17915
17916         * mini.c: handle systems that sue a different way to
17917         retrieve the stack address of the current thread.
17918
17919 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
17920
17921         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
17922         it specially in the makefile.
17923
17924         * generics.2.cs: Add tests for nullable reference types.
17925
17926 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
17927
17928         * mini.c: always handle the case when mono_jit_init()
17929         is called in a thread different from the main thread,
17930         confusing libgc (bug #77309).
17931
17932 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
17933
17934         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
17935
17936 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
17937
17938         * mini.c: change optimize_branches () to use a single loop
17939         and introduce a new optimization to simplify some range checks.
17940
17941 2006-02-03  Martin Baulig  <martin@ximian.com>
17942
17943         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
17944         and merged with debugger_thread_manager_add_thread().
17945         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
17946         inform the debugger about the main thread.
17947
17948 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
17949
17950         * basic.cs: Add test for div.un/rem.un constant folding.
17951
17952 2006-02-03  Neale Ferguson <neale@sinenomine.net>
17953
17954         * cpu-s390x.md: correct int_xor_imm length
17955
17956 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
17957
17958         * generics.2.cs: New test for #77442.
17959
17960         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
17961         #77442.
17962
17963 2006-02-02  Martin Baulig  <martin@ximian.com>
17964
17965         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
17966         <mono/metadata/mono-debug-debugger.h>   
17967
17968         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
17969
17970 2006-02-02  Martin Baulig  <martin@ximian.com>
17971
17972         * debug-debugger.h: New header file for debug-debugger.c.
17973
17974         * debug-debugger.c: Big API cleanup; don't run the managed Main()
17975         function is a separate thread anymore; add support for attaching.
17976
17977 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
17978
17979         * tramp-x86.c: Fix a warning.
17980
17981 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
17982
17983         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
17984         on very large methods.
17985
17986         * aot.c (load_patch_info): Fix a warning.
17987
17988 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
17989
17990         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
17991         mini-ops.h: alu membase optimizations.
17992
17993 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
17994
17995         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
17996         to speedup StringBuilder.
17997
17998 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
17999
18000         * dominators.c (mono_compute_natural_loops): Fix detection of
18001         loop body start blocks.
18002
18003         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
18004
18005 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
18006
18007         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
18008         #75145.
18009
18010 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
18011
18012         * aliasing.c: Fixed aliasing issue on 64 bit archs.
18013
18014 2006-01-25  Martin Baulig  <martin@ximian.com>
18015
18016         * debug-debugger.c: Moved the `MonoDebuggerManager' and
18017         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
18018         started to cleanup this file a little bit.
18019
18020 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
18021
18022         * mini.c: optimize a codepath frequently happening in generics code.
18023
18024 2006-01-23  Martin Baulig  <martin@ximian.com>
18025
18026         * Makefile.am: Only compile debug-debugger.c on supported platforms.
18027
18028         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
18029         functions directly.
18030
18031         * driver.c: debug-debugger.c is only available if
18032         `MONO_DEBUGGER_SUPPORTED' is defined.   
18033
18034 2006-01-23  Martin Baulig  <martin@ximian.com>
18035
18036         * debug-debugger.c: Only enable this on platforms where the Mono
18037         Debugger is working (x86 and x86_64).
18038
18039 2006-01-21  Martin Baulig  <martin@ximian.com>
18040
18041         The Mono Debugger is now using the normal `mono' instead of the
18042         `mono-debugger-mini-wrapper' when executing managed code.
18043
18044         * debug-debugger.c: New file; previously known as
18045         debugger/wrapper/wrapper.c.
18046
18047         * debug-mini.c (mono_init_debugger): Removed.
18048
18049         * driver.c (mono_main): Added new `--inside-mdb' command line
18050         argument which is used when running inside the debugger.
18051
18052 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
18053
18054         * liveness.c (mono_analyze_liveness): Remove some unused data
18055         structures.
18056
18057 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
18058
18059         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
18060
18061 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
18062
18063         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
18064         depends on implementation details of monobitset.
18065
18066         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
18067         Fixes #77271.
18068
18069 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
18070
18071         * liveness.c: Update after monobitset changes.
18072
18073 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
18074
18075         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
18076
18077 2006-01-11 Neale Ferguson <neale@sinenomine.net>
18078
18079         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
18080
18081         * mini-s390x.c: Remove warning messages.
18082
18083 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
18084
18085         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
18086
18087 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
18088
18089         * generics.2.cs: Add ldelem/stelem_any test.
18090
18091 2006-01-10 Neale Ferguson <neale@sinenomine.net>
18092
18093         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
18094
18095 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
18096
18097         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
18098         
18099 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
18100
18101         * generics.2.cs: Reenable vtype tests.
18102
18103         * inssel-x86.brg: Remove an icorrect valuetype rule.
18104
18105 2006-01-06 Neale Ferguson <neale@sinenomine.net>
18106
18107         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
18108         initial support for OP_ABS.
18109
18110 2006-01-05 Neale Ferguson <neale@sinenomine.net>
18111
18112         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
18113
18114 2006-01-05 Neale Ferguson <neale@sinenomine.net>
18115
18116         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
18117         conversion and implement LADD/LSUB.
18118
18119         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
18120         architectures.
18121
18122 2006-01-05 Neale Ferguson <neale@sinenomine.net>
18123
18124         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
18125
18126         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
18127         architectures.
18128
18129 2006-01-05 Neale Ferguson <neale@sinenomine.net>
18130
18131         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
18132         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
18133         (stack walk problem).
18134
18135 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
18136
18137         * aot.c (mono_aot_load_method): Fix a warning.
18138
18139 2006-01-03  Neale Ferguson <neale@sinenomine.net>
18140
18141         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
18142
18143 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
18144
18145         * iltests.il: Add test for #77148.
18146
18147         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
18148         #77148.
18149
18150 2006-01-03  Neale Ferguson <neale@sinenomine.net>
18151
18152         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
18153
18154 2006-01-03  Neale Ferguson <neale@sinenomine.net>
18155
18156         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
18157         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
18158
18159         * basic-long.cs: Add lconv-to-r4/r8 tests.
18160
18161 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
18162
18163         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
18164
18165         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
18166         here as on other archs.
18167
18168 2005-12-29 Neale Ferguson <neale@sinenomine.net>
18169
18170         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
18171
18172 2005-12-29 Neale Ferguson <neale@sinenomine.net>
18173
18174         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
18175         
18176         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
18177
18178         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
18179         instrument_prolog; Add memory_barrier instruction.
18180
18181 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
18182
18183         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
18184
18185 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
18186
18187         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
18188
18189         * aliasing.c inssel.brg: Fix warnings.
18190
18191         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
18192         could skip initialization of some parts of memory.
18193
18194         * mini.c mini-ia64.c: Fix warnings.
18195
18196         * inssel-sparc.brg: Add an implementation of lneg which actually works.
18197
18198 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
18199
18200         * aliasing.c (mono_build_aliasing_information): Add a workaround for
18201         a crash seen on sparc.
18202
18203         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
18204         
18205         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
18206
18207 2005-12-21 Neale Ferguson <neale@sinenomine.net>
18208
18209         * mini-ops.h: Add s390_backchain instruction
18210
18211         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
18212
18213         * cpu-s390.md: Add s390_backchain instruction
18214
18215         * mini-s390.c: Significant ABI changes
18216
18217         * mini-s390.h: Cater for zero length structures
18218
18219 2005-12-20 Neale Ferguson <neale@sinenomine.net>
18220
18221         * mini-s390.c: ABI fixes
18222
18223         * inssel-s390.brg: Remove debug statements
18224
18225         * cpu-s390.md: Fix length of ATOMIC_xx operations
18226
18227 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
18228
18229         * basic-float.cs: Add float<->long conversion tests.
18230
18231 2005-12-16 Neale Ferguson <neale@sinenomine.net>
18232
18233         * mini-s390.c: Fix LOCALLOC processing.
18234
18235         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
18236
18237 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
18238
18239         * iltests.il: Add tests for some opcodes not covered by the other
18240         tests.
18241
18242 2005-12-15 Neale Ferguson <neale@sinenomine.net>
18243
18244         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
18245         register loading for Tail processing; Correct trace output.
18246
18247         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
18248
18249         * cpu-s390.md: Correct size of jmp instruction. 
18250
18251 2005-12-13 Neale Ferguson <neale@sinenomine.net>
18252
18253         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
18254
18255 2005-12-13 Neale Ferguson <neale@sinenomine.net>
18256
18257         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
18258           Bring s390 up to current level.
18259
18260 2005-12-12  Zltan Varga  <vargaz@gmail.com>
18261
18262         * generics.2.cs: Disable the newly added tests as they do not work yet.
18263         
18264         * generics.2.cs: Add valuetype tests.
18265
18266 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
18267
18268         * basic-long.cs: Add i4->u8 test.
18269
18270         * objects.cs: Add tests for JIT intrinsic.
18271
18272         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
18273         optimizations lost by a mistake.
18274
18275 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
18276
18277         * basic-long.cs: Remove a test moved to objects.cs.
18278
18279         * arrays.cs: Add more array tests.
18280
18281 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
18282
18283         * arrays.cs: Add new tests for multi-dimensional arrays.
18284
18285 2005-12-06  Raja R Harinath  <rharinath@novell.com>
18286
18287         * Makefile.am (test_sources2): Add generics.2.cs.
18288         (EXTRA_DIST): Add test_sources2.
18289
18290 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
18291
18292         Support for boxing and unboxing nullable types as well as the
18293         isinst operation on nullables, per the CLI ammendment.
18294
18295         * inssel.brg (CEE_ISINST): Special case for nullable
18296
18297         * mini.c (handle_unbox_nullable): new method
18298         (handle_box): Special case for nullable types
18299         (mono_method_to_ir): Call handle_unbox_nullable in correct
18300         places.
18301
18302         * generics.2.cs: New test suite
18303
18304         * Makefile.am: Support for regression tests with generics.
18305
18306 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
18307
18308         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
18309         allocated to registers. Fixes #76800.
18310
18311 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
18312
18313         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
18314
18315 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
18316
18317         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
18318         of platforms.
18319
18320 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
18321
18322         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
18323         objects.cs.
18324
18325         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
18326         
18327         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
18328 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
18329
18330         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
18331         single precision before storing to a single precision location.
18332
18333 2005-11-28  Raja R Harinath  <rharinath@novell.com>
18334
18335         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
18336
18337 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
18338
18339         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
18340         correct files.
18341
18342         * basic.cs: Remove test_0_byte_compares test which was moved to
18343         objects.cs a long time ago.
18344
18345 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
18346
18347         * aliasing.c: Fixed aliasing issue on 64 bit archs.
18348
18349 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
18350
18351         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
18352         handlers are called.
18353
18354         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
18355         throwing code.
18356
18357          * mini-ia64.c: Add support for the throw->branch exception 
18358         optimization.   
18359
18360         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
18361
18362 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
18363
18364         * mini.c: Enabled "fastpath" deadce :-)
18365         
18366 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
18367
18368         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
18369         alias analysis pass to support it.
18370         * mini.h: Likewise.
18371         * ssa.c: Likewise.
18372         * liveness.c: Likewise (liveness computation can use aliasing
18373         information to be more accurate).
18374         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
18375         moreover made so that "--compile-all" uses the given optimization
18376         flags and not the default ones.
18377         * aliasing.c: Alias analysis (new file).
18378         * aliasing.h: Likewise.
18379         * Makefile.am: added "aliasing.c" and "aliasing.h".
18380         
18381 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
18382
18383         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
18384         OP_L opcodes.
18385
18386 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
18387
18388         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
18389         fp >= end_of_stack exit condition, as it is not needed, and it might
18390         become true for fp eliminated frames.
18391
18392 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
18393
18394         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
18395         coded offsets.
18396
18397 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
18398
18399         * mini-arm.c: fixed alignment of doubles/longs to match
18400         the C ABI (bug #76635).
18401
18402 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
18403
18404         * aot.c: fix compilation with --enable-minimal=aot.
18405
18406 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
18407
18408         * mini-arm.c: fixed compatibility with the new
18409         floating point emulator package for compares.
18410
18411 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
18412
18413         * mini.c : reverted sig->pinvoke changes (r51396-51397).
18414
18415 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
18416
18417         * mini-exceptions.c (print_stack_frame): Output to stderr.
18418         (mono_handle_native_sigsegv): Ditto.
18419
18420 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
18421
18422         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
18423         OP_LCONV_TO_OVF_I implementation.
18424
18425         * mini-amd64.c: Add support for the throw->branch exception 
18426         optimization.
18427
18428         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
18429         when the catch clause catches a more general exception, i.e. Object.
18430
18431 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
18432
18433         * cpu-ia64.md: Remove unused opcodes.
18434
18435         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
18436         specific defines for architectures defining USE_SIGACTION.
18437
18438         * mini-ia64.c: Fix some warnings.
18439
18440         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
18441         version seemed to skip a frame.
18442
18443 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
18444
18445         * mini.c: Clean up the usage of sig->pinvoke flag. Now
18446         only calls which are made to native code use this flag.
18447
18448 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
18449
18450         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
18451         varargs methods as well.
18452         
18453         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
18454         which have save_lmf set. Reorganize methods prologs a bit.
18455
18456         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
18457         debugger to the proper place.
18458
18459 2005-10-29  Martin Baulig  <martin@ximian.com>
18460
18461         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
18462         when running inside the debugger until the debugger has support
18463         for it.
18464
18465 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
18466
18467         * mini.h: Fix a warning.
18468
18469 2005-10-24  Miguel de Icaza  <miguel@novell.com>
18470
18471         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
18472         we expose publicly, this returns the string.
18473
18474 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
18475
18476         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
18477         with fp elimination.
18478
18479 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
18480
18481         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
18482         native stacktrace using the glibc 'backtrace' function if available.
18483
18484 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
18485
18486         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
18487
18488         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
18489         handle SIGSEGVs received while in native code.
18490
18491         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
18492         code, call mono_handle_native_sigsegv which will abort the runtime
18493         after printing some diagnostics, instead of converting it into a
18494         confusing NullReferenceException.
18495
18496 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
18497
18498         * cpu-pentium.md: Remove unused opcodes.
18499
18500 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
18501
18502         * mini-amd64.h (MonoLMF): Add rsp field.
18503
18504         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
18505         the lmf too.
18506
18507 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
18508
18509         * mini-codegen.c (get_register_spilling): Fix some warnings.
18510
18511 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
18512
18513         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
18514         elimination during exception handling. Enable fp elimination by
18515         default.
18516
18517         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
18518         elimination.
18519
18520 2005-10-16  Martin Baulig  <martin@ximian.com>
18521
18522         * mini-exceptions.c
18523         (mono_debugger_run_finally): New public method for the debugger.
18524
18525 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
18526
18527         * debug-mini.c (mono_debug_init_method): Fix warning.
18528
18529         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
18530         the 'exname' parameter const to fix some warnings.
18531
18532 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
18533
18534         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
18535         introduced by the previous patch.
18536
18537 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
18538
18539         * basic-float.cs: Add test for precision of float arithmetic.
18540
18541         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
18542         when loading/storing single values from/to memory.
18543
18544         * mini.c (mono_jit_compile_method_with_opt): Create the function
18545         pointers in the correct domain.
18546
18547 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
18548
18549         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
18550         introduced by previous patch.
18551         
18552         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
18553         when out_filter_idx is NULL.
18554
18555         * mini-exceptions.c: Don't run filter clauses twice during exception
18556         handling. Fixes #75755.
18557
18558 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
18559
18560         * aot.c: Add support for ldflda wrappers.
18561
18562         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
18563         #75902.
18564
18565 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
18566
18567         * mini.c, mini.h: do not consider exception handlers blocks when
18568         setting up interface variables.
18569
18570 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
18571
18572         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
18573
18574 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
18575
18576         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
18577         causes a regression.
18578
18579         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
18580
18581 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
18582
18583         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
18584         of the OP_P definitions.
18585
18586         * TODO: Add a proposal for dealing with the CEE/OP mess.
18587
18588         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
18589         optimizations from the x86 port.
18590
18591         * cpu-amd64.md: Ditto.
18592
18593         * basic.cs basic-long.cs: Add tests.
18594
18595 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
18596
18597         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
18598         Patrik Torstensson's implementation of my exception-handling
18599         optimization idea, when the exception object is not used
18600         (bug #62150).
18601
18602 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
18603
18604         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
18605         of the mul_imm optimizations from the old jit.
18606
18607 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
18608
18609         * mini.c, liveness.c: patch by Patrik Torstensson and
18610         Zoltan Varga to improve performance in methods with
18611         exception clauses.
18612
18613 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
18614
18615         * driver.c: Remove 'Globalization' entry from --version.
18616
18617 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
18618
18619         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
18620         there is a profiler interested in JIT events.
18621
18622         * aot.c: Load profile files produced by the AOT profiling module, and
18623         reorder methods based on the profiling info. Add a 'method_order' table
18624         to the AOT file to make mono_aot_find_jit_info work with the reordered
18625         methods.
18626
18627         * mini.h: Bump AOT file version info.
18628
18629 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
18630
18631         * mini-arm.h: work around what looks like a gcc bug when optimizations
18632         are enabled.
18633
18634 2005-09-28  Raja R Harinath  <rharinath@novell.com>
18635
18636         * Makefile.am (AM_CFLAGS): Don't use += to append inside
18637         conditionals.  Use ...
18638         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
18639
18640 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
18641
18642         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
18643         to determine the amount of memory to copy when passing valuetypes.
18644
18645         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
18646         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
18647
18648 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
18649
18650         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
18651         information about aot.
18652
18653 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
18654
18655         * *.c: Replace the use of {Enter,Leave}CriticalSection with
18656         macros. This will allow a deadlock debugger to easily be plugged
18657         in.
18658
18659 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
18660
18661         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
18662
18663 2005-09-27  Raja R Harinath  <rharinath@novell.com>
18664
18665         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
18666         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
18667         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
18668         ($(arch_built)) [CROSS_COMPILING]: Error out.
18669
18670 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
18671
18672         * aot.c: Add support for the no_special_static flag for classes.
18673
18674 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
18675
18676         * Reapply reverted patches.
18677
18678         * *: Revert r50174 as well.
18679
18680         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
18681
18682 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
18683
18684         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
18685
18686 2005-09-23  Miguel de Icaza  <miguel@novell.com>
18687
18688         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
18689         part of the SIG_HANDLER_SIGNATURE.  
18690
18691 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
18692
18693         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
18694         statistics.
18695
18696         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
18697         introduced by previous patch.
18698
18699 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
18700
18701         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
18702         saved registers too.
18703
18704         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
18705         upon the information returned by get_call_info ().
18706         
18707         * mini-x86.c (add_float): Fix stack size calculation.
18708         (mono_arch_call_opcode): Rewrite this so it works based up the
18709         information returned by get_call_info ().
18710         (mono_arch_get_this_vret_args): Ditto.
18711
18712 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
18713
18714         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
18715         in cinfo to determine the registers which need to be used.
18716
18717 2005-09-20  Miguel de Icaza  <miguel@novell.com>
18718
18719         * driver.c (mono_main): Add --server and --desktop flags. 
18720
18721 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
18722
18723         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
18724         registers as global registers.
18725
18726         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
18727         longer needed with the new register allocator.
18728
18729         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
18730
18731         * cpu-ia64.md: Remove unused opcodes.
18732         
18733         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
18734         
18735 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
18736
18737         * cpu-amd64.md: Remove unused opcodes.
18738
18739         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
18740         needed with the new register allocator.
18741
18742         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
18743         reg-reg moves.
18744
18745 2005-09-16  Raja R Harinath  <rharinath@novell.com>
18746
18747         * Makefile.am (check-local): Don't invoke semdel-wrapper.
18748
18749 2005-09-16  Martin Baulig  <martin@ximian.com>
18750
18751         * exceptions-amd64.c
18752         (throw_exception): Don't call mono_debugger_throw_exception() if
18753         we're a rethrow - see the FIXME in the code.
18754
18755 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
18756
18757         * mini.c (mono_init_exceptions): This only works on some architectures.
18758         
18759 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
18760
18761         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
18762         on ia64.
18763
18764         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
18765
18766         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
18767         now in mini-exceptions.c.
18768
18769 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
18770
18771         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
18772         now in mini-exceptions.c.
18773
18774 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
18775
18776         * exceptions-x86.c: Applied patch from Patrik Torstensson 
18777         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
18778
18779         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
18780         code into mini-exceptions.c. Add some assertions to it.
18781
18782 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
18783
18784         * aot.c (emit_section_change): Applied patch from "The Software Team" 
18785         (<software@solmersa.com>). Fix as errors on windows.
18786
18787 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
18788
18789         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
18790         method info into the LMF.
18791
18792 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
18793         
18794         * mini-ia64.c: Add proper unwind info for method epilogs.
18795
18796         * exceptions-ia64.c: Add some code to help debugging.
18797         
18798         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
18799
18800         * mini-exceptions.c: Fix warning.
18801
18802 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
18803
18804         * mini.c: Really fix build.
18805
18806         * mini-x86.c mini-amd64.c: Fix build.
18807
18808 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
18809
18810         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
18811
18812         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
18813         some Interlocked methods as intrinsics.
18814
18815         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
18816         for Thread methods as well.
18817
18818         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
18819
18820         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
18821
18822         * mini-ia64.c mini-x86.c mini-amd64.c 
18823         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
18824         OP_MEMORY_BARRIER.
18825         
18826         * mini.c (mono_init_exceptions): Fix build breakage.
18827
18828 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
18829
18830         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
18831         of instructions. Use the new ia64_unw_op macros for emitting unwind
18832         info.
18833
18834         * mini.c (mono_init_exceptions): Initialize exception handling
18835         related trampolines at startup.
18836
18837 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
18838
18839         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
18840
18841 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
18842
18843         * mini.c: Handle type loading errors gracefully during compilation and
18844         throw the appropriate exception.
18845
18846 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
18847
18848         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
18849         for the mono binary.
18850
18851 2005-09-09  Martin Baulig  <martin@ximian.com>
18852
18853         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
18854         the release.
18855
18856 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
18857
18858         * mini-arm.h: use emulation for conv.r.un for the release.
18859
18860 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
18861
18862         * mini-arm.c, objects.cs: more fixes and tests for them.
18863
18864 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
18865
18866         * mini-arm.c: align structures to at least 4 bytes to be able
18867         to keep our current optimized memcpy.
18868
18869 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
18870
18871         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
18872
18873 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18874
18875         * mini.c: ignore SIGPIPE.
18876
18877 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
18878
18879         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
18880
18881         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
18882
18883 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
18884
18885         * mini.h: Add prototype for mono_allocate_stack_slots_full.
18886
18887 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
18888
18889         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
18890         exception handling support.
18891         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
18892         patch by Brian Koropoff <briank@marakicorp.com>).
18893
18894 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
18895
18896         * mini.c: revert another 'optimization' which breaks when
18897         items on the eval stack need to be saved at a basic block end
18898         (bug #75940).
18899
18900 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
18901
18902         * jit-icalls.c: for arrays, ensure we always provide
18903         lower bounds.
18904
18905 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
18906
18907         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
18908         
18909         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
18910
18911 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
18912
18913         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
18914         arguments in their original register.
18915
18916 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
18917
18918         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
18919         memset/memcpy.
18920
18921         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
18922         when ssapre is enabled.
18923
18924         * inssel-long.brg: Fix bug in previous patch.
18925
18926         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
18927         multiplication by a constant.
18928
18929 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
18930
18931         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
18932         icc.
18933
18934         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
18935         saving registers.
18936
18937 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
18938
18939         * inssel-arm.brg: apply changes tested by Brian Koropoff
18940         <briank@marakicorp.com>.
18941
18942 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
18943
18944         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
18945         
18946 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
18947
18948         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
18949         to the same register if dreg is just a base register.
18950         (print_ins): Improve printing of membase opcodes.
18951
18952         * inssel-x86.brg: Add optimized ldind(reg) rules.
18953
18954         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
18955
18956 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
18957
18958         * mini.c: when running under valgrind, set the stack bottom for
18959         the GC at the actual approximate stack for the app (fixes running
18960         mono with valgrind).
18961
18962 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
18963
18964         * mini.c: do no break at the first valuetype to init found
18965         (fixes bug #75791).
18966
18967 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
18968
18969         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
18970
18971 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
18972
18973         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
18974
18975 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
18976
18977         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
18978
18979 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
18980
18981         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
18982
18983         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
18984         code.
18985
18986         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
18987         code.
18988
18989         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
18990         methods.
18991
18992 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
18993
18994         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
18995
18996 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
18997
18998         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
18999         in the tail recursion optimization.
19000
19001         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
19002         debug info into the assembly file.
19003
19004         * iltests.il: Add test for filter regions.
19005
19006         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
19007         initial stack of filter regions. Fixes #75755.
19008
19009 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
19010
19011         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
19012         stack requirements.
19013
19014 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
19015
19016         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
19017         the check for an already compiled method on non-ia64 platforms.
19018         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
19019         proper domain.
19020
19021         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
19022
19023         * inssel-x86.brg: Add some optimized call rules.
19024
19025 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
19026
19027         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
19028         method here.
19029
19030         * mini.h mini-trampolines.c: Pass the trampoline argument to 
19031         mono_arch_patch_delegate_trampoline.
19032
19033         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
19034
19035         * mini-trampolines.c: Fix build.
19036
19037         * mini-amd64.h: Add delegate trampolines.
19038
19039         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
19040
19041         * inssel-amd64.brg: Add optimized call rules.
19042         
19043         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
19044
19045         * inssel-ia64.brg: Add optimized ldind(reg) rules.
19046
19047 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
19048
19049         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
19050         change.
19051
19052         * mini-ia64.c: Remove LMF fixmes.
19053
19054         * mini-ia64.h: Remove most fields from LMF.
19055
19056         * inssel-ia64.brg (stmt): Fix unaligned access errors.
19057
19058         * mini-trampolines.c: Add support for IA64 function descriptors.
19059
19060         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
19061         for IA64 function descriptors.
19062
19063 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
19064
19065         * tramp-arm.c: patch the vtable for virtual calls. Added
19066         support code to register/unregister the LMF.
19067         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
19068         more LMF work.
19069
19070 2005-08-19  Dick Porter  <dick@ximian.com>
19071
19072         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
19073         bit value if needed.
19074
19075 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
19076
19077         * mini.c (mini_get_method): Move handling of wrapper data here.
19078
19079         * mini.c (mono_method_to_ir): Add support for dynamic methods.
19080
19081         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
19082         virtual.
19083
19084         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
19085         bblock->code does not remain empty.
19086
19087 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
19088
19089         * arrays.cs: Add regression test for #75832.
19090
19091         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
19092         rules. Fixes #75832.
19093
19094         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
19095         instruction scheduling.
19096
19097 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
19098
19099         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
19100
19101 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
19102
19103         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
19104
19105         * mini-codegen.c: Fix VC build.
19106
19107         * cpu-pentium.md: Increase length of atomic_exhange_i4.
19108
19109 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19110
19111         * mini.h: fix signature for mono_register_opcode_emulation.
19112
19113 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
19114
19115         * mini.c: Get rid of most of the helper_sig_... constants using
19116         mono_create_icall_signature ().
19117
19118 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
19119
19120         * jit-icalls.c (helper_ldstr): New helper function.
19121
19122         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
19123
19124         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
19125         throw, load the string using a helper call instead of creating a string object.
19126
19127         * aot.c: Update after LDSTR changes.
19128
19129         * mini.h: Bump AOT file version.
19130         
19131         * aot.c: Save class size info into the AOT file. Print more statistics during
19132         compilation.
19133
19134         * mini.h: Bump AOT file version.
19135
19136         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
19137         ordering of disasm cases. Fixes #74957.
19138
19139 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
19140
19141         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
19142         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
19143         the generic code needed for the ARM port.
19144
19145 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
19146
19147         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
19148         inssel-arm.brg: more ARM features and fixes.
19149
19150 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
19151
19152         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
19153         ARM port work in progress.
19154
19155 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
19156
19157         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
19158
19159         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
19160
19161         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
19162
19163         * inssel.brg (mini_emit_memset): Add support for unaligned access.
19164
19165         * *-ia64.*: Ongoing IA64 work.
19166         
19167         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
19168
19169 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
19170
19171         * TODO: Remove out-of-data todo stuff.
19172
19173         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
19174         dead code.
19175
19176         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
19177
19178         * mini.h: Bump corlib version.
19179
19180 2005-07-27  Martin Baulig  <martin@ximian.com>
19181
19182         * mini-codegen.c
19183         (create_copy_ins): Added `const unsigned char *ip' argument; set
19184         `copy->cil_code' from it.
19185
19186 2005-07-27  Martin Baulig  <martin@ximian.com>
19187
19188         * mini-exceptions.c (mono_handle_exception): Don't call
19189         mono_debugger_handle_exception() for filters.
19190
19191 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
19192
19193         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
19194         as well.
19195
19196 2005-07-26  Martin Baulig  <martin@ximian.com>
19197
19198         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
19199
19200         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
19201         helper_compile_generic_method() if the method is actually virtual
19202         and non-final.
19203
19204 2005-07-26  Martin Baulig  <martin@ximian.com>
19205
19206         * mini.c
19207         (trampoline_code): Renamed to `mono_trampoline_code' and made it
19208         public; this is now accessed directly by the debugger.
19209         (mono_generic_trampoline_code): Removed.
19210
19211         * debug-mini.c
19212         (mono_debug_init_method): Also add interncalls and wrappers.
19213
19214 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
19215
19216         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
19217
19218 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
19219
19220         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
19221
19222 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
19223
19224         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
19225
19226 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
19227
19228         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
19229         getting TLS offsets on AMD64 too.
19230
19231 2005-07-20  Kornel Pal <kornelpal@hotmail.com>
19232
19233         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
19234
19235 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
19236
19237         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
19238         inssel-arm.brg, mini-arm.h: ARM port work in progress.
19239
19240 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
19241
19242         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
19243
19244         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
19245         to mini.c.
19246
19247         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
19248         mono_sparc_is_virtual_call ().
19249         
19250         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
19251
19252         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
19253         trampoline parameters.
19254
19255         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
19256         
19257         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
19258         to mono_arch_get_vcall_slot_addr.
19259
19260         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
19261         trampoline code.
19262
19263         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
19264
19265 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
19266
19267         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
19268
19269 2005-07-19  Martin Baulig  <martin@ximian.com>
19270
19271         * exceptions-amd64.c (throw_exception): Call
19272         mono_debugger_throw_exception() here like we're doing it on i386.
19273
19274 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
19275
19276         * mini-ia64.c: Add optimized TLS access support.
19277
19278 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
19279
19280         * mini-exceptions.c: Ongoing IA64 work.
19281
19282         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
19283
19284         * mini.c: Use the default optimization set when embedding. Fixes
19285         #75194.
19286
19287 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
19288
19289         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
19290         of trampolines to a separate file.
19291
19292         * mini-trampolines.c: New file.
19293
19294         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
19295         separate file.
19296         
19297         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
19298         amd64/ia64 code.
19299
19300         * mini-codegen.c: Fix cygwin build.
19301
19302 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
19303
19304         * mini.c: Add some minor changes needed by the IA64 port.
19305
19306         * *-ia64.*: Ongoing IA64 work.
19307
19308 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
19309
19310         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
19311         trampolines into arch-independent and arch-dependent parts.
19312
19313         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
19314
19315 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
19316
19317         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
19318
19319         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
19320         the xp-regalloc-branch for amd64.
19321
19322         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
19323         xp-regalloc-branch for x86.
19324
19325 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
19326
19327         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
19328
19329 2005-07-06  Martin Baulig  <martin@ximian.com>
19330
19331         * mini.c
19332         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
19333         (mono_jit_runtime_invoke): Likewise.
19334
19335 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
19336
19337         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
19338         on x86 too.
19339         
19340         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
19341         without loading their metadata. Reorganize the file format so exception handling+
19342         debug info is kept separate from normal method info. Create MonoJitInfo 
19343         structures for methods lazily.
19344
19345         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
19346         loading metadata.
19347         (x86_class_init_trampoline): Patch AOT class init trampolines too.
19348
19349         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
19350
19351         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
19352         in AOT code.
19353
19354         * mini.h: Bump AOT file version.
19355
19356 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
19357
19358         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
19359
19360 2005-07-01  Raja R Harinath  <rharinath@novell.com>
19361
19362         * Makefile.am (check-local): Call semdel-wrapper.
19363
19364 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
19365
19366         * mini-x86.c: Revert the last change as it seems to break the build..
19367
19368 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
19369
19370         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
19371         
19372         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
19373
19374 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
19375
19376         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
19377         outside of the macro, so strange stuff doesn't happen with gcc4
19378         (NEW_AOTCONST_TOKEN): Likewise.
19379
19380 2005-06-28  Martin Baulig  <martin@ximian.com>
19381
19382         * mini.c (mini_class_is_system_array): New static method; use this
19383         instead of `klass->parent == mono_defaults.array_class' everywhere
19384         since this also works for the new generic array class.
19385
19386 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
19387
19388         * inssel.brg: Remove warnings.
19389
19390 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
19391
19392         * mini-ia64.c: Ongoing IA64 work.
19393
19394         * basic-float.cs: Add float->i1 conversion test.
19395
19396         * iltests.il: Add conv.u4 test.
19397
19398 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
19399
19400         * inssel-long.brg: Fix bug caused by last change.
19401
19402 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
19403
19404         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
19405         BSDs.  Allows the x86 JIT to work on OSX86
19406
19407 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
19408
19409         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
19410         u4->i8 conversion.
19411
19412         * mini-ia64.c: Ongoing IA64 work.
19413
19414 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
19415
19416         * mini-ia64.c: Ongoing IA64 work.
19417
19418         * driver.c: Clean up jit_code_hash as well when using --regression.
19419
19420         * inssel-long.brg: Fix long->i4/u4 conversion rules.
19421
19422         * basic-long.cs: Add tests for long->u4 conversion.
19423
19424 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
19425
19426         * mini.c: Take mono_get_domainvar out of macros. This makes sure
19427         that we do not depend on undefined C behavior: the order stuff
19428         gets evaluated within an expression. Fixes mono when compiled on
19429         GCC 4.
19430
19431 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
19432
19433         * *-ia64.*: Ongoing IA64 work.
19434
19435         * aot.c: Lower memory usage while loading AOT methods.
19436
19437         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
19438
19439         * mini.h: Bump AOT file format version.
19440
19441 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
19442
19443         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
19444
19445 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
19446
19447         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
19448         not on callee assembly). Fixed some comments.
19449
19450 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
19451
19452         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
19453         it gets proper disassembly.
19454         (emit_method_info): Remove some dead code.
19455
19456         * mini.c (mini_method_compile): Allways allocate the GOT var in
19457         mono_method_to_ir for emulating opcodes.
19458
19459 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
19460
19461         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
19462         before freeing the code memory. Fixes #74990.
19463
19464         * objects.cs: Add regression test for #74992.
19465
19466         * liveness.c: Extend live ranges of arguments to the beginning of the
19467         method. Fixes #74992.
19468
19469         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
19470         so it points into the faulting instruction.
19471
19472 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
19473
19474         * jit-icalls.c (mono_imul_ovf): Add exception handling.
19475
19476         * *-ia64.*: Ongoing IA64 work.
19477
19478         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
19479
19480 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
19481
19482         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
19483
19484         * *-ia64.*: Ongoing IA64 work.
19485
19486 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
19487
19488         * basic-long.cs: Add tests for add/sub.ovf.
19489
19490         * basic.cs: Add tests for sub.ovf.
19491
19492         * *-ia64.*: Ongoing IA64 work.
19493
19494 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
19495
19496         * *-ia64.*: Ongoing IA64 work.
19497
19498         * basic.cs: Add conv.ovf.i4.un test.
19499
19500 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
19501
19502         * mini.c: (remove_block_if_useless) Fixed bug 75061.
19503         
19504 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19505
19506         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
19507
19508 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
19509
19510         * *-ia64.*: Ongoing IA64 work.
19511
19512 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19513
19514         * trace.[ch]:
19515         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
19516
19517 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
19518
19519         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
19520
19521 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
19522
19523         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
19524
19525         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
19526         of a call is callable by a near call.
19527
19528 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
19529
19530         * mini-ia64.c: Ongoing IA64 work.
19531
19532 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
19533
19534         * genmdesc.c: Make the generated array non-static.
19535
19536         * inssel-long.brg: Fix LSHR_IMM rule.
19537
19538         * *-ia64.*: Ongoing IA64 work.
19539
19540         * *-ia64.*: Ongoing IA64 work.
19541
19542 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
19543
19544         * *-ia64.*: Ongoing IA64 work.
19545
19546         * *-ia64.*: Ongoing IA64 work.
19547         
19548         * mini-ia64.c: Ongoing IA64 work.
19549
19550         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
19551
19552 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
19553
19554         * objects.cs basic-calls.cs: Move some tests to objects.cs.
19555         
19556         * objects.cs basic-long.cs: Move some tests to objects.cs.
19557
19558 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
19559
19560         * *-ia64.*: Ongoing IA64 work.
19561
19562         * iltests.il: Add a new test.
19563
19564         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
19565         newobj. Fixes #75042.
19566
19567 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
19568
19569         * *-ia64.*: Ongoing IA64 work.
19570         
19571         * *-ia64.*: Ongoing IA64 work.
19572         
19573         * *-ia64.*: Ongoing IA64 work.
19574
19575         * basic.cs objects.cs: Move tests accessing static variables as well.
19576
19577         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
19578
19579 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
19580
19581         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
19582
19583         * driver.c: Always print failed tests.
19584
19585         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
19586         frame pointer.
19587
19588         * *ia64*: Ongoing IA64 work.
19589
19590 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
19591
19592         * basic.cs: Add tests for add.ovf. Fix warnings.
19593
19594 2005-05-18  Miguel de Icaza  <miguel@novell.com>
19595
19596         * driver.c (mono_main): Avoid crash if no argument is passed to
19597         --break;  Do not use g_error, but f_printf.   And fix all other
19598         ocurrences of the same crash.
19599
19600 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
19601
19602         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
19603         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
19604         Fixes #74742.
19605
19606 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
19607
19608         * *-ia64.*: Add beginnings of IA64 backend.
19609
19610         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
19611
19612 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
19613
19614         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
19615         Fixes #74925.
19616
19617         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
19618
19619         * mini-amd64.c: Fix a warning.
19620
19621 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
19622
19623         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
19624         in float_neg. Fixes #74897.
19625
19626         * mini-amd64.c (emit_call): Fix another near call bug.
19627
19628 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
19629
19630         * declsec.c: Keep the appdomain information in the structure. Added a 
19631         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
19632         value gets overwritten).
19633         * declsec.h: Set the default MonoArray for the the stack to 6. Added
19634         an MonoAppDomain member to MonoSecurityFrame.
19635         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
19636         used in the stack walk. Now use a MonoArray which grow (double) when
19637         it gets full.
19638
19639 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
19640
19641         * mini.c: Re-enabled runtime cleanup, since running threads should
19642         now properly stop when exiting.
19643
19644 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
19645
19646         * mini-codegen.c: New file contaning the arch-independent local
19647         register allocator. Not used by any architectures yet.
19648
19649         * mini.h linear-scan.c: Merge some changes from the 
19650         mini-xp-local-regalloc branch.
19651
19652 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
19653
19654         * mini-amd64.c (emit_call): Fix calls to native functions when the
19655         runtime is compiled as a shared library. Fixes #74756.
19656
19657         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
19658         on a literal field. Fixes #74751.
19659
19660 2005-04-25  Raja R Harinath  <rharinath@novell.com>
19661
19662         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
19663
19664 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
19665
19666         * objects.cs: Add missing null casting test.
19667
19668 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
19669
19670         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
19671         in wrapper methods. Also rename 'address' variable to 'offset'.
19672
19673 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
19674
19675         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
19676         warnings.
19677         
19678         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
19679
19680         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
19681         work on windows.
19682
19683 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
19684
19685         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
19686
19687 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
19688
19689         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
19690         just the last bytes.
19691
19692 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
19693
19694         * aot.c (mono_compile_assembly): Fix warning.
19695
19696         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
19697         by the _MSC_VER stuff.
19698
19699 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
19700
19701         * inssel-long.brg: Fix #74588.
19702
19703         * cpu-amd64.md: Fix #74591.
19704
19705         * iltests.il: Add new regression tests.
19706
19707 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
19708
19709         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
19710         valuetype.
19711
19712 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
19713
19714         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
19715
19716         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
19717         from Bill Middleton <flashdict@gmail.com>.
19718
19719 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
19720
19721         * arrays.cs: Add new regression test. Fix warnings.
19722
19723 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
19724
19725         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
19726         and leakage in CKFINITE.
19727
19728         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
19729         this to a null op since it is called on amd64 too.
19730
19731         * exceptions-amd64.c (get_throw_trampoline): Align stack.
19732
19733         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
19734         body since this is not used on amd64.
19735         
19736         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
19737
19738         * mini-amd64.c: Remove obsolete fixmes.
19739
19740         * mini.c (print_method_from_ip): Fix debugging support.
19741
19742 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
19743
19744         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
19745         so that expressions that don't give much gain are not reduced.
19746         * ssapre.h: Likewise.
19747
19748 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
19749
19750         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
19751
19752         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
19753
19754         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
19755
19756 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
19757
19758         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
19759
19760         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
19761
19762 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
19763
19764         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
19765         stack touching.
19766
19767         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
19768
19769         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
19770
19771         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
19772
19773         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
19774         MONO_ARCH_USE_SIGACTION. Fixes #74252.
19775
19776         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
19777
19778         * mini-x86.c: Fix up stack overflow handling.   
19779
19780         * exceptions.cs: Add new regression test.
19781
19782 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
19783
19784         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
19785         mono_jit_thread_attach.
19786
19787         * mini.c (mono_method_to_ir): Verify called method is not abstract.
19788
19789 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
19790
19791         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
19792         avoid calling constructors using callvirt.
19793
19794         * inssel.brg: Fix #74073.
19795
19796 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
19797
19798         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
19799         compilation with non-GCC compilers.
19800         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
19801         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
19802
19803 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
19804
19805         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
19806         klass->interface_offsets (will likely fix bug#74073).
19807
19808 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
19809
19810         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
19811
19812 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
19813
19814         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
19815         to amd64_div_reg_size ().
19816         
19817         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
19818
19819 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
19820
19821         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
19822
19823 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
19824
19825         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
19826
19827 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
19828
19829         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
19830         
19831         * mini.c (mono_precompile_assembly): Load and precompile referenced
19832         assemblies as well. Fixes #74015.
19833
19834 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
19835
19836         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
19837
19838 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
19839
19840         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
19841         a lot of checks and (anyway) permissions cannot work until corlib is 
19842         loaded.
19843
19844 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
19845
19846         * mini-ppc.c: fixed ABI issue on sysv/ppc.
19847
19848 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
19849
19850         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
19851         calls (fixes bug#72824).
19852
19853 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
19854
19855         * mini.c: fix tail recursion elimination (see test in bug#73936).
19856
19857 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
19858
19859         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
19860         some fp functions in sse2 mode.
19861
19862 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
19863
19864         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
19865
19866 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
19867
19868         * mini.h mini.c: Add mono_get_jit_tls_key ().
19869
19870         * mini-x86.c: Enable fast TLS support on windows.
19871
19872 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
19873
19874         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
19875         * mini.c: Check for p/invoke method when generating code. If a
19876         p/invoke method, or it's class, isn't decorated with [Suppress
19877         UnmanagedCodeSecurity] then generate code to call System.Security.
19878         UnmanagedDemand (only if the security manager is active).
19879
19880 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
19881
19882         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
19883         last change as it seems to cause strange crashes.
19884         
19885 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
19886
19887         * *.c: handle unsafe function pointers where needed.
19888
19889 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
19890
19891         * mini.c (mono_jit_free_method): Remove the fixme too.
19892
19893 2005-03-15  Miguel de Icaza  <miguel@novell.com>
19894
19895         * mini.c: As discussed, make the code actually free the delegate
19896         thunk now, to enable the debugging of delegate problems, use
19897         MONO_DEBUG=1 when running Mono. 
19898
19899         This takes also care of parts of the leaks as seen by Joe.
19900
19901 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
19902
19903         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
19904         thread_tls_offset calculation.
19905
19906 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
19907
19908         * declsec.c: Reworked linkdemand checks for icall. The previous code
19909         was using the declaration code (untrusted) and didn't work as expected
19910         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
19911         specific case.
19912
19913 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
19914
19915         * iltests.il: Add new localloc test.
19916
19917         * mini-amd64.c: Handle large stack allocations the same way as on
19918         windows if stack overflow handling is working.
19919         
19920         * mini-amd64.c: Allocate the signal stack using mmap.
19921
19922         * mini.c (sigsegv_signal_handler): Fix reading of context.
19923
19924         * mini-exceptions.c: Fix up stack overflow handling.
19925
19926         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
19927
19928         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
19929
19930         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
19931
19932         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
19933
19934         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
19935         tramp_init functions as they are no longer needed.
19936
19937 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
19938
19939         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
19940         
19941         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
19942
19943         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
19944         
19945         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
19946         support that now.
19947
19948         * mini-ops.h: Add OP_LMUL_IMM.
19949
19950         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
19951         long mul/div opcodes as intrinsic.
19952
19953         * mini-amd64.c (emit_call): Handle the case when the callee might be
19954         an AOT method.
19955
19956 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
19957
19958         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
19959         extra safe.
19960         
19961         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
19962
19963         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
19964
19965 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
19966
19967         * mini.c (mono_codegen): Don't leak here, to help people running
19968         monogrind.
19969
19970 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
19971
19972         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
19973         conversions in sse2 mode.
19974
19975         * basic-float.cs: Add regression test.
19976         
19977         * mini-amd64.c: Reenable sse2.
19978
19979 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
19980
19981         * mini-amd64.c: Disable sse2 until some regressions are fixed.
19982
19983 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
19984
19985         * driver.c: Copyright text should include 2005.
19986         
19987 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
19988
19989         * cpu-amd64.md (load_membase): Fix more max lengths.
19990
19991 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
19992
19993         * cpu-amd64.md (load_membase): Fix max length.
19994
19995         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
19996
19997         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
19998
19999         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
20000         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
20001
20002         * basic-float.cs: Add rounding regression test.
20003
20004         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
20005
20006 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
20007
20008         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
20009         structures in registers for pinvoke wrappers.
20010
20011 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
20012
20013         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
20014
20015 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
20016
20017         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
20018         wrapper to mono_jit_thread_attach.
20019
20020         * mini.c (mini_jit_thread_attach): New jit icall.
20021
20022         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
20023         native->managed wrappers.
20024
20025         * exceptions.cs: Add new regression test.
20026
20027         * mini.c (optimize_branches): Check regions in the cbranch to throw
20028         block case as well. Fixes #73242.
20029
20030 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
20031
20032         * mini.c: thread safety fixes.
20033
20034 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
20035
20036         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
20037         patching stuff, since delegates use jump trampolines so there is
20038         no caller.
20039
20040         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
20041         jump trampolines.
20042         
20043         * tramp-amd64.c: Fix build.
20044
20045         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
20046         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
20047
20048         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
20049         Rename this to mono_arch....
20050         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
20051
20052         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
20053
20054         * mini-amd64.c (emit_call): If both the caller and the callee is
20055         guaranteed to have 32 bit addresses, emit a normal call.
20056
20057         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
20058
20059         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
20060         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
20061         method_ptr inside delegates.
20062
20063 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
20064
20065         * mini.c (mono_jit_free_method): Free the method info even if the native code is
20066         invalidated. Fixes #73001.
20067
20068         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
20069
20070         * mini-x86.c: Only use stdcall for pinvokes on windows.
20071
20072 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
20073
20074         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
20075         * mini-x86.c: remove unreliable __thread var offset detection,
20076         use the correct accessors and enable by default.
20077
20078 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
20079
20080         * mini.c (mono_jit_free_method): Fix memory leak.
20081
20082 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
20083
20084         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
20085
20086 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
20087
20088         * cpu-amd64.md: Fix lengths of atomic opcodes.
20089
20090 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
20091
20092         * driver.c: try to not imply using ICU is any good.
20093
20094 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
20095
20096         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
20097         functions as inline ops.
20098
20099         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
20100         some Interlocked functions as inline ops.
20101
20102         * mini.c (move_basic_block_to_end): Fix bug in last patch.
20103
20104         * mini.h (MonoBasicBlock): Reorganize fields a bit.
20105
20106         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
20107
20108         * mini.c: Add support for OP_NOT_TAKEN.
20109
20110         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
20111         structures in registers for pinvoke wrappers.
20112
20113         * mini-amd64.c: Fix warnings.
20114
20115 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
20116
20117         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
20118
20119         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
20120
20121         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
20122         address instead of loading the address from it.
20123
20124         * mini-x86.c: Add support for returning small structs in registers
20125         on Win32. Fixes part of #70864.
20126         
20127 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
20128
20129         * trace.c (get_token): Improve error checking.
20130
20131 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
20132
20133         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
20134
20135 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
20136  
20137         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
20138         it can be reused for MonoClass.
20139         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
20140         _LINKDEMAND.
20141
20142 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
20143
20144         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
20145         instead of a MonoReflectionMethod. The method information wasn't used
20146         when displaying SecurityException details (but will be now).
20147
20148 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
20149
20150         * Makefile.am : windows build fix.
20151
20152 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
20153
20154         * iltests.il: Add new regression test.
20155
20156         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
20157         #72522.
20158
20159 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
20160  
20161         * mini.c: Moved linkdemand check into helper function check_linkdemand
20162         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
20163         LDFTN, LDVIRTFTN).
20164
20165 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
20166
20167         * declsec.c: Added statistics counter for different kinds of 
20168         LinkDemands.
20169         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
20170         (and commented) declaration.
20171         * mini.c: Added statistics counter for security Demand code 
20172         generation. Added display of security statistics.
20173
20174 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
20175
20176         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
20177         Fix compilation errors under gcc-2.95.
20178
20179 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
20180
20181         * mini.c, driver.c: Use the new jit trampoline hashtable
20182
20183 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
20184
20185         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
20186
20187 2005-02-11  Martin Baulig  <martin@ximian.com>
20188
20189         * debug-mini.c (mono_debug_close_method): Free the line number array.
20190
20191 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
20192
20193         * aot.c: Break up large methods into smaller ones. Share GOT slots for
20194         icalls.
20195
20196         * mini.h: Bump AOT file format version. 
20197
20198 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
20199
20200         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
20201         APTC and P/Invoke.
20202         * declsec.h: Added macros to get/set lazyly initialized security 
20203         informations about assemblies. Added new enum for different type of
20204         possible LinkDemand violation. Added function to check LinkDemands.
20205         * mini.h: Added a field to MonoCompile to hold any security violation
20206         detected when JITting a method (so it can be thrown later).
20207         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
20208         and CEE_CALLVIRT. Added code to throw exception at the end of
20209         mini_method_compile (note: the exception is unhandled right now).
20210
20211 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
20212
20213         * mini.c, jit-icalls.c: use the managed implementation of
20214         memset for initobj and memset, to avoid managed <-> unmanaged
20215         transitions.
20216
20217 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
20218
20219         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
20220         optimization if it would need a GOT var.
20221
20222         * basic.cs: Add tests for constant propagation and switch statements.
20223
20224         * ssa.c: Fix out-of-range constant propagation and switch statements.
20225
20226 2005-02-09    <vargaz@freemail.hu>
20227
20228         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
20229
20230 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
20231
20232         * cpu-amd64.md (load_membase): Fix max length of load_membase.
20233
20234 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
20235
20236         * mini.c: update to new signature of mono_class_get_allocation_ftn().
20237
20238 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
20239
20240         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
20241         arithmetic operations.
20242
20243 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
20244
20245         * mini-ppc.c: add a workaround for broken user code that
20246         DllImports vararg functions with non-vararg signatures.
20247
20248 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
20249
20250         * mini.c (mono_jit_compile_method_inner): Add detection and a 
20251         meaningfull error message for assemblies written in Managed C++.
20252
20253         * tramp-amd64.c mini-amd64.h: Add support for 
20254         create_trampoline_from_token ().
20255
20256         * aot.c mini-x86.c abcremoval.c: Applied patch from
20257         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
20258
20259 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
20260
20261         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
20262         which takes a MonoImage/token as parameter instead of a MonoMethod.
20263
20264         * aot.c: Use the new trampoline for initializing vtables.
20265
20266         * aot.c: Add support for ldfld/stfld_remote wrappers.
20267
20268         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
20269         rules for compare <MEM>, IMM.
20270
20271         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
20272
20273         * aot.c: Handle inherited finalizers correctly.
20274
20275 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
20276
20277         * inssel.brg (stmt): Add a missing _setup_... ().
20278
20279         * aot.c: Save some parts of the class state to the AOT file and use it
20280         to recompute that state when a class is initialized.
20281
20282         * mini.c: Install AOT hooks into the runtime.
20283
20284         * mini.h: Bump AOT file format version.
20285         
20286         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
20287         Fixes #72148.
20288
20289         * iltests.il: Add new test.
20290
20291 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
20292
20293         * mini.c: fix typo.
20294
20295 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
20296
20297         * mini.c: setup the statistical profiler in the thread attach
20298         callback to cope with the new single thread code.
20299
20300 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
20301
20302         * mini-ppc.c: ensure we have enough room for the profiler
20303         calls (fixed bug#72084).
20304
20305 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
20306
20307         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
20308         it.
20309
20310 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
20311
20312         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
20313
20314 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
20315
20316         * ssapre.c: Fixed an issue with down safety (this allows IronPython
20317         to succesfully execute parrotbench).
20318         * ssapre.h: Likewise.
20319
20320 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
20321
20322         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
20323         variable for stores to method arguments (fixes a SSAPRE issue).
20324
20325 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
20326
20327         * mini.c: handle value types in dup, fixes gen-112.cs.
20328
20329 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
20330
20331         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
20332         sequence for calls in dynamic methods to avoid thunks.
20333
20334 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
20335
20336         * mini.c: correctly remove dynamic methods from the hashtable.
20337
20338 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
20339
20340         * driver.c: Disabled SSAPRE until fix the bug that appears
20341         in IronPython's parrotbench.
20342
20343 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
20344
20345         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
20346
20347         * mini.c (mono_method_to_ir): Revert the previous change.
20348         
20349         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
20350         when AOT compiling.
20351
20352         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
20353         mono_jit_info_table_find () etc. when running under valgrind.
20354
20355         * inssel.brg: Fix warnings.
20356
20357         * mini-exceptions.c: Fix warnings.
20358
20359 2005-01-31  Martin Baulig  <martin@ximian.com>
20360
20361         * driver.c (compile_all_methods_thread_main): Don't try to compile
20362         generic methods or anything which has type parameters.
20363
20364 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
20365
20366         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
20367
20368         * TestDriver.cs: Add --verbose flags.
20369
20370         * graph.c ssa.c: Fix 64 bit warnings.
20371         
20372         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
20373         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
20374         Fix 64 bit warnings.
20375
20376         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
20377         variable not spotted by gcc.
20378         
20379         * mini-amd64.c inssel-amd64.brg: Applied patch from  
20380         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
20381         X86_COMPARE_MEMBASE opcodes.
20382
20383         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
20384
20385 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
20386
20387         * *: MonoMethod->signature might be NULL now. You *MUST* use
20388         mono_method_signature.
20389
20390 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
20391
20392         * driver.c (compile_all_methods_thread_main): Compile the methods
20393         without invoking cctors.
20394
20395 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
20396
20397         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
20398         * basic-calls.cs: test for the above.
20399
20400 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
20401
20402         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
20403         MonoJitInfo changes.
20404
20405 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
20406
20407         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
20408         eagerly if it contains dynamic methods.
20409         
20410         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
20411
20412         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
20413         trace, it is now computed by an icall from trace_ips.
20414         
20415         * mini-exceptions.c: Fix a warning.
20416
20417 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
20418
20419         * mini-exceptions.c: don't bother getting stack trace info if
20420         it's not going to be used.
20421
20422 2005-01-27  Raja R Harinath  <rharinath@novell.com>
20423
20424         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
20425         ssapre-mini-ops.h.
20426
20427 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
20428
20429         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
20430
20431         * aot.c: Avoid calling mono_method_get_header () if not needed.
20432
20433         * mini.h: Bump AOT file format version.
20434         
20435         * mini.c (mono_emit_native_call): Allocate a GOT var here.
20436
20437         * mini.c (mono_print_tree): Print more info for calls.
20438
20439 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
20440
20441         * declsec.h: Remove warning by adding missing include for marshal.h
20442
20443 2005-01-26  Martin Baulig  <martin@ximian.com>
20444
20445         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
20446         `ip' twice.
20447
20448 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
20449
20450         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
20451         flags.
20452
20453         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
20454
20455         * aot.c (mono_compile_assembly): Fix a warning.
20456
20457 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
20458
20459         * declsec.c: Look for security attributes on the original MonoMethod 
20460         (and not the wrapped one). This fix permissions on icalls.
20461
20462 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
20463
20464         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
20465
20466         * mini.c (mono_allocate_stack_slots): Add a fixme.
20467
20468         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
20469
20470 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
20471
20472         * inssel.brg: optimize casts of sealed types (more
20473         optimizations waiting for fixes in remoting).
20474
20475 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
20476
20477         * inssel.brg (stmt): Add another dummy rule.
20478
20479         * driver.c: Fix warnings.
20480
20481         * driver.c (mono_main): If running under valgrind, instruct glib to use
20482         the system allocation functions so valgrind can track the memory
20483         allocated by the g_... functions.
20484
20485         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
20486
20487         * mini-ops.h: Add OP_DUMMY_STORE opcode.
20488
20489         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
20490
20491         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
20492         variables in try regions.
20493
20494         * mini.c (mini_method_compile): Don't disable optimizations on large
20495         methods when AOT compiling.
20496
20497         * mini.c (mono_allocate_stack_slots): New arch independent method to 
20498         allocate stack slots. Not yet used.
20499
20500 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
20501
20502         * debug-mini.c (mono_debug_close_method): Plug some leaks.
20503
20504 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
20505
20506         * mini-ppc.c: make the branch info relative as the code
20507         buffer can be reallocated.
20508
20509 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
20510
20511         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
20512         * driver.c: Removed the AOT/security restriction. Now initialize the
20513         security manager (in metadata) if --security is used.
20514         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
20515         rather than the pointer to declarative security, when AOT is used.
20516
20517 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
20518
20519         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
20520         basic blocks, reduced intrinsic exception throwing code size.
20521
20522 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
20523
20524         * driver.c (mini_usage): Reorder the usage screen.
20525
20526 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
20527
20528         * mini.c (mono_resolve_patch_target): Fix warning.
20529
20530 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
20531
20532         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
20533         previous patch.
20534
20535         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
20536
20537         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
20538         breaks the amd64 build.
20539
20540         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
20541         register allocation. Fixes #71454.
20542
20543         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
20544
20545         * arrays.cs: Add new regression test.   
20546
20547 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
20548
20549         * ssapre.c: Turned usage of snprintf to GString.
20550         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
20551         (I left it on by mistake in my previous commit).
20552
20553 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
20554
20555         * mini.c, cfold.c, basic-calls.cs: preserve side effects
20556         on cond branch optimization (fixes bug# 71515).
20557
20558 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
20559
20560         * abcremoval.c: Fixed bug 71062.
20561         * abcremoval.h: Likewise.
20562
20563 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
20564
20565         * mini.c: Added a new functionality to optimize_branches, the removal
20566         of useless basic blocks, and fixed some problem in the removal of
20567         critical edges; some utility functions added for both purposes.
20568         * ssapre.c: Added complex expression support, and fixed bug 70637.
20569         * ssapre.h: Likewise.
20570         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
20571         enabled in SSAPRE.
20572         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
20573         * driver.c: Re-enabled SSAPRE.
20574
20575 2005-01-19  Martin Baulig  <martin@ximian.com>
20576
20577         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
20578         the result of mono_get_method_constrained().
20579
20580 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
20581
20582         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
20583         manager.
20584
20585 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
20586
20587         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
20588         be detected.  Fixes #59296.
20589
20590 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
20591
20592         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
20593         which can happen. Fixes #71361.
20594
20595 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
20596
20597         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
20598         manager.
20599
20600 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
20601
20602         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
20603         appdomain-unload.exe to fail.
20604         
20605         * mini.c: Fix some memory leaks.
20606
20607 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
20608
20609         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
20610         Fixed bug and sped up some codepaths.
20611
20612 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
20613
20614         * mini.c: Fix some memory leaks.
20615
20616         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
20617         conversion.
20618
20619         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
20620
20621         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
20622         #71320.
20623
20624         * iltests.il: Add regression test for #71320.
20625
20626 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
20627
20628         * mini.c (mono_codegen): Fix installation of profiler hooks.
20629
20630         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
20631
20632 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
20633
20634         * mini.h, mini.c, cfold.c: optimize access to enum
20635         readonly fields, too. Eval conditional branches if possible
20636         to perform unreachable code removal in more cases.
20637
20638 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
20639
20640         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
20641
20642         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
20643         code manager.
20644
20645         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
20646         WinXP DEP. Fixes #71244.
20647
20648 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
20649
20650         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
20651
20652 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
20653
20654         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
20655
20656 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
20657
20658         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
20659         changes.
20660
20661         * mini.h: Bump AOT version.
20662
20663         * mini.h (MonoCompile): Change exvar to a hash table.
20664
20665         * mini.c: Allocate a separate exvar for each handler block.
20666
20667         * mini.c: Get rid of the computation of filter_lengths, its not needed.
20668
20669         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
20670         ex var with the pending exception and only throw if the two are equal.
20671         Fixes #68552.
20672         
20673         * exceptions.cs: Add tests for rethrow and nested catch clauses.
20674
20675         * mini-x86.c: Fix warnings.
20676
20677         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
20678         used by all the ports now.
20679
20680         * aot.c: Add write-symbols and save-temps options.
20681
20682 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
20683
20684         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
20685
20686 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
20687
20688         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
20689         operations.
20690
20691         * tramp-s390.c: Check vtable slot belongs to the domain.
20692
20693         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
20694         as per other platforms.
20695
20696         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
20697
20698 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
20699
20700         * driver.c: we don't run the Main() code in a subthread anymore.
20701
20702 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
20703
20704         * mini.c: added experimental rtc support in the statistical
20705         profiler: if the user has the permission, more accurate statistics
20706         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
20707         The MONO_RTC value must be restricted to what the linux rtc allows:
20708         power of two from 64 to 8192 Hz.
20709
20710 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
20711
20712         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
20713
20714 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
20715
20716         * mini-ppc.c: better icache flush for smp.
20717
20718 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
20719
20720         * mini-amd64.c (emit_move_return_value): Fix memory leak.
20721
20722         * mini-x86.c (get_call_info): Add the get_call_info () code from the
20723         amd64 port, not yet used.
20724
20725 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
20726
20727         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
20728         a struct type.
20729
20730 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
20731
20732         * driver.c: Added --security option to activate the security manager.
20733         Right now this will allow code generation for declarative demands and
20734         is disabled when AOT is specified.
20735         * mini.c: Add code generation for declarative security demands.
20736         * mini.h: Add mono_use_security_manager as an extern gboolean.
20737
20738 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
20739
20740         * aot.c (mono_compile_assembly): Speed up compilation a bit by
20741         emitting more dense assembly code.
20742
20743         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
20744         exception throwing stuff.
20745
20746 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
20747
20748         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
20749         dead code.
20750
20751         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
20752         left in by mistake.
20753
20754         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
20755         fixed.
20756
20757         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
20758
20759         * tramp-*.c: Only patch vtable slots if the object is in the current
20760         domain. Fixes appdomain-unload.exe.
20761
20762         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
20763         
20764         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
20765         x86 branch.
20766
20767 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
20768
20769         * mini.c (reverse_branch_op): New helper function.
20770
20771         * mini.c (optimize_branches): Run the new optimization only on 
20772         platforms which support it. Also reverse all kinds of branches.
20773
20774         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
20775
20776         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
20777         a throw statement.
20778
20779         * mini.c (optimize_branches): Reverse not-equals branches if the false
20780         bblock is a throw. This happens a lot of time with argument checking in
20781         corlib.
20782
20783         * mini.c (mono_codegen): Add support for placing basic blocks after
20784         the function epilogue.
20785
20786         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
20787         function epilogue.
20788         
20789 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
20790
20791         * mini.c (setup_stat_profiler): Only set this up if the platform
20792         supports ITIMER_PROF.
20793
20794 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
20795
20796         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
20797         previous patch.
20798
20799         * inssel.brg: Fix a warning.
20800
20801 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
20802
20803         * mini.c: added support for statistical profiler 
20804         (run with: --profile=default:stat).
20805
20806 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
20807
20808         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
20809
20810         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
20811
20812         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
20813         related to global registers from the amd64 port.
20814
20815 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
20816
20817         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
20818
20819         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
20820         with global registers.
20821         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
20822
20823         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
20824
20825 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
20826
20827         * debug-mini.c (encode_value): Fix off-by-one.
20828
20829         * aot.c (encode_value): Likewise.
20830
20831         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
20832
20833 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
20834
20835         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
20836         AOT.
20837
20838         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
20839         
20840         * aot.c (emit_method_info): Increase size of temp buffer.
20841
20842         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
20843         the AOT case.
20844
20845 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
20846
20847         * aot.c (emit_method_info): Fix build.
20848         
20849         * aot.c: Further rework of the AOT file format to reduce the size of
20850         the method info data.
20851
20852         * mini.h: Bump AOT file format version.
20853
20854 2004-12-27  Martin Baulig  <martin@ximian.com>
20855
20856         * mini.c (mini_get_method): New static method; call
20857         mono_get_method_full() and mono_get_inflated_method().
20858         (mono_method_to_ir): Use mini_get_method() instead of
20859         mono_get_method_full(). 
20860
20861 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
20862
20863         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
20864
20865 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
20866
20867         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
20868
20869         * inssel-amd64.brg: Add some optimization rules.
20870
20871 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
20872
20873         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
20874         standard not GC'd stuff is fine.
20875
20876 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
20877
20878         * aot.c: Rework the AOT file format to get rid of most of the global
20879         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
20880
20881         * mini.h: Bump AOT file format version.
20882         
20883 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
20884
20885         * mini.h: Bump AOT file format version.
20886
20887         * aot.c (mono_aot_is_got_entry): New function to determine if an 
20888         address is inside a GOT.
20889
20890         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
20891
20892         * cpu-pentium.md: Increase the maximum size of some instructions which
20893         might involve a got access.
20894         
20895         * mini.c (get_method_from_ip): Another debug helper function.
20896
20897         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
20898         when got var accesses are created during the decompose phase.
20899
20900         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
20901
20902         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
20903         argument mini_compile_method and to MonoCompile, and use this to
20904         determine whenever a given method is compiled for AOT. This allows the
20905         other methods compiled during AOT compilation to be free of AOT stuff,
20906         so the backends does not need to add special support for them by
20907         creating a fake GOT etc.
20908
20909         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
20910         longer needed.
20911
20912 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
20913
20914         * mini.c (mono_method_to_ir): It turns out that some of the
20915         x-appdomain wrappers are lax with types, so just ignore this for
20916         all wrappers.
20917
20918         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
20919         at the vtable->klass. If it is non-shared code we can just use the
20920         vtable.
20921
20922 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
20923
20924         * mini-ppc.c: access MonoDomain from tls, too.
20925
20926 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
20927
20928         * declsec.c: Removed unused variable (and related warning ;-)
20929
20930 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
20931
20932         * iltests.il: New test for LDELEMA on an array of ref types.
20933
20934         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
20935         all ldelema's on reftypes.
20936         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
20937         it was the wrong place to put it.
20938
20939         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
20940         register to pop to make this cleaner, at the request of Paolo.
20941
20942 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
20943
20944         * mini-ops.h (OP_GETHASHCODE): New op.
20945
20946         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
20947
20948         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
20949         operation.
20950
20951         For a microbenchmark, this reduces the cost of Hashtable.get_Item
20952         by 25%.
20953         
20954         * mini-x86.c (mono_arch_output_basic_block): Rather than
20955
20956         add ebp, 4
20957
20958         Emit
20959
20960         pop edx
20961
20962         The first is 3 bytes while the second is 1. This saves 36 kb on
20963         mscorlib, quite a big saving. When bootstraping mcs, I was able to
20964         see a small boost because of icache locality.
20965
20966         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
20967
20968 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
20969
20970         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
20971         started code sharing with the generic code.
20972
20973 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
20974
20975         * mini-ppc.c, cpu-g4.md: added code for direct access to
20976         tls data slots.
20977
20978 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
20979
20980         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
20981          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
20982         to OP_TLS_GET.
20983
20984 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
20985
20986         * declsec.c|h: Added functions to cache the declarative stack modifiers
20987         in MonoJitInfo and to create a security frame from a MonoJitInfo 
20988         structure.
20989         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
20990         created. Register internal calls for System.Security.SecurityFrame::
20991         _GetSecurityFrame and _GetSecurityStack.
20992         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
20993         the definitions for the new stack walk/callback mechanism.
20994         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
20995         first security frame for LinkDemands and InheritanceDemands) and
20996         GetSecurityStack for Demands. Both use the new mono_walk_stack code
20997         from lupus.
20998         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
20999         walk initialization (lupus).
21000
21001 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
21002
21003         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
21004         idiom.
21005         (handle_loaded_temps): Do not create a temporary variable for
21006         things that we know are temps. They will never be modified.
21007         (mono_spill_call): Set MONO_INST_IS_TEMP
21008         (mono_emulate_opcode): ditto
21009         (emit_tree): ditto
21010         (mono_method_to_ir.CEE_DUP): ditto
21011
21012 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
21013
21014         * mini.c (type_to_eval_stack_type): Make this handle the void type
21015         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
21016         (emit_tree): use ip_in_bb to special case some common idioms
21017         Update all callers to pass in the IP.
21018         (mono_method_to_ir): Make CEE_CALL* do the above as well.
21019
21020         This gives us a nice 2% speedup in mcs bootstrap.
21021
21022         * mini-x86.c (peephole_pass): Peephole pass to make
21023         mov  [foo], eax
21024         push [foo]
21025
21026         into
21027
21028         mov [foo], eax
21029         push eax
21030
21031         * mini.c (ip_in_bb): new method.
21032         (mono_method_to_ir): use this method rather than doing the hash
21033         lookup ourselves.
21034
21035         * linear-scan.c (mono_linear_scan): When expiring actives, you
21036         don't need to keep around variables that expire on this
21037         instruction. This makes it so that:
21038              a = b + 1
21039         will turn into:
21040              store (ebx add (ebx, 1))
21041         which will become
21042              add ebx, 1
21043
21044 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
21045
21046         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
21047         combination to avoid doing two copies. Fix up problems with previous
21048         patch.
21049
21050         * mini.c: Fix 64 bit warnings.
21051
21052         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
21053
21054 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
21055
21056         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
21057         changes from the x86 code.
21058
21059         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
21060
21061 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
21062
21063         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
21064         throwing code to reduce its size, unify the AOT and non-aot code and 
21065         get rid of relocations in the AOT case.
21066
21067         * mini-x86.h mini.c exceptions-x86.c 
21068         (mono_arch_get_throw_corlib_exception): New arch specific function to 
21069         raise corlib exceptions which doesn't require relocations in the 
21070         caller.
21071
21072         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
21073
21074 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
21075
21076         * mini.c (mono_emit_method_call): Only allocate the got var when it is
21077         needed.
21078
21079         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
21080         in the AOT case.
21081
21082 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
21083
21084         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
21085         with add function when used from Inc/dec atomic 
21086         functions. Re-enabled optimization on x86.
21087         * mini-ops.h: renamed atomic_add functions to
21088         allow _add to match the Interlocked::Add and
21089         _add_next to match Interlocked::Inc/Dec.
21090
21091 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
21092
21093         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
21094         linking of BBs to the end BB, and enabled SSAPRE also with
21095         consprop and copyprop (which was prevented by that bug).
21096
21097 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
21098
21099         * mini-x86.c: disabling the Interlocked optimizing code. 
21100
21101 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
21102
21103         * aot.c (load_aot_module): Move reading of got_addr after the AOT
21104         file version check.
21105         
21106 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
21107
21108         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
21109         interlocked optimization due lack of support on x86, rewrote 
21110         exchange to take into account that base may be in eax.
21111         
21112         xsp works again; activated Interlocked optimizing code.
21113         
21114 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
21115
21116         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
21117
21118 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
21119
21120         * mini-ops.h: Add new opcodes.
21121
21122         * mini.h: Add new patch types. Add got_var to MonoCompile.
21123
21124         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
21125         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
21126         make it work with all kinds of patchable code.
21127
21128         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
21129         address of the GOT, and referencing entries in the GOT.
21130
21131         * mini.c: Add code to load the GOT address if needed by an opcode.
21132
21133         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
21134         independent AOT code on the x86 using an elf-style Global Offset Table.
21135
21136 2004-12-14  Raja R Harinath  <rharinath@novell.com>
21137
21138         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
21139
21140 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21141
21142         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
21143         when running xsp.
21144
21145 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
21146
21147         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
21148         of Interlocked:Increment/Decrement/Add as inline ops.
21149         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
21150
21151 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
21152
21153         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
21154         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
21155
21156 2004-12-12  Duncan Mak  <duncan@ximian.com>
21157
21158         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
21159         again. `patch_info->table_size' is no longer valid after Zoltan's
21160         commit #37636.
21161
21162 2004-12-12  Martin Baulig  <martin@ximian.com>
21163
21164         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
21165         if we are the "real" method, ie. not an inlined method inside it.
21166
21167 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
21168
21169         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
21170         before we look in the special fields table. This fixes
21171         ../tests/thread-static-init.cs.
21172
21173 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
21174
21175         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
21176         for Array get_Rank and get_Length. Fixes bug #70465.
21177
21178 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
21179
21180         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
21181         separate structure to reduce the size of MonoJumpInfo.
21182
21183 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
21184
21185         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
21186
21187 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
21188
21189         * mini.c (mini_get_inst_for_method): Changed to allow ports
21190         to return a MonoInst instead of opcode 
21191         (renamed mini_get_opcode_for_method to better reflect the new functionality)
21192         
21193         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
21194         Allow ports to return a created MonoInst instead of op-code, will enable
21195         new optimizations.
21196         (renamed mini_get_opcode_for_method to better reflected the functionality)
21197
21198 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
21199
21200         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
21201
21202 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
21203
21204         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
21205         Fixes #69985.
21206
21207 2004-12-08  Martin Baulig  <martin@ximian.com>
21208
21209         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
21210         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
21211
21212 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
21213
21214         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
21215         correctly.
21216
21217         * exceptions.cs: Disable some tests which depend on properties of x86 fp
21218         arithmetic.
21219
21220 2004-12-08  Raja R Harinath  <rharinath@novell.com>
21221
21222         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
21223
21224 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
21225
21226         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
21227         bug introduced by the previous patch.
21228
21229 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
21230
21231         * mini-ppc.c, objectc.cs: handle large structs passed by value
21232         (fixes bug #69972).
21233
21234 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
21235
21236         * mini-ppc.c: OP_ARGLIST implementation from
21237         Geoff Norton  <gnorton@customerdna.com>.
21238
21239 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
21240
21241         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
21242         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
21243
21244 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
21245
21246         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
21247
21248 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
21249
21250         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
21251         support.
21252
21253 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
21254
21255         * mini-sparc.c: Zero out localled-ed memory.
21256
21257         * iltests.il: Add tests for zeroing out localloc-ed memory.
21258
21259 2004-12-04  Martin Baulig  <martin@ximian.com>
21260
21261         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
21262         mono_method_get_signature_full().       
21263
21264 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
21265
21266         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
21267         and some utility functions (always for SSAPRE), integrated SSAPRE.
21268         * mini.h: Likewise.
21269         * driver.c: Added ssapre option.
21270         * ssa.c: Small fix on OP_ARG handling.
21271         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
21272         * Makefile.am: Likewise.
21273
21274 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
21275
21276         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
21277         now in the xp code.
21278
21279         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
21280         icall.
21281
21282 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
21283
21284         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
21285         
21286         * cpu-s390.md : Increase instruction length of oparglist.
21287
21288         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
21289
21290 2004-11-30  Martin Baulig  <martin@ximian.com>
21291
21292         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
21293         virtual generic methods.  We call a special helper_compile_generic_method()
21294         icall to retrieve the method from the vtable, inflate and compile
21295         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
21296
21297         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
21298
21299 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
21300
21301         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
21302
21303 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
21304
21305         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
21306         Fixes #69929.
21307
21308 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
21309
21310         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
21311         platforms with PIC aot.
21312
21313 2004-11-28  Martin Baulig  <martin@ximian.com>
21314
21315         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
21316         Fixes gen-112.cs.
21317
21318 2004-11-28  Martin Baulig  <martin@ximian.com>
21319
21320         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
21321         the result of mono_type_get_underlying_type() to check whether
21322         we're byref.
21323
21324 2004-11-26  Martin Baulig  <martin@ximian.com>
21325
21326         * mini.c
21327         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
21328         in the g_assert().
21329
21330 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
21331
21332         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
21333         the same way as the other arguments so they won't get clobbered.
21334
21335         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
21336         calls through R11 since it is clobbered by the trampoline code.
21337
21338 2004-11-26  Raja R Harinath  <rharinath@novell.com>
21339
21340         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
21341         pick up in-tree mscorlib.dll.
21342
21343 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
21344
21345         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
21346
21347         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
21348         runtime data/code are now stored in a table similar to the GOT in ELF. 
21349         This allows the code itself to be position independent.
21350
21351         * aot.c: Fix loading of referenced assemblies after the lazy assembly
21352         loading changes.
21353
21354         * aot.c: Attach ELF type (object/function) directives to all global
21355         symbols.
21356
21357         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
21358
21359         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
21360
21361         * mini-amd64.h: Turn on PIC AOT code.
21362
21363         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
21364         returning the offset within an OP_AOTCONST instruction where the GOT
21365         offset needs to be added.
21366
21367         * mini.h: Bump AOT file format version.
21368
21369 2004-11-25  Martin Baulig  <martin@ximian.com>
21370
21371         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
21372         uninflated generic methods.
21373
21374 2004-11-25  Martin Baulig  <martin@ximian.com>
21375
21376         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
21377
21378 2004-11-24  Martin Baulig  <martin@ximian.com>
21379
21380         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
21381         original klass (this only applies for generic instances).
21382
21383 2004-11-24  Martin Baulig  <martin@ximian.com>
21384
21385         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
21386         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
21387         that array).
21388
21389 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
21390
21391         * mini.c (mono_method_to_ir): Disable inlining for methods containing
21392         localloc. Fixes #69678.
21393
21394         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
21395         
21396 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
21397
21398         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
21399         used SSE registers on pinvoke calls. Fixes #69774.
21400
21401 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
21402
21403         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
21404         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
21405
21406 2004-11-23  Raja R Harinath  <rharinath@novell.com>
21407
21408         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
21409         Refer directly to the mcs/ tree.
21410
21411 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
21412
21413         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
21414         Check if a trampoline for a synchronized method is required. 
21415
21416 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
21417
21418         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
21419         with localloc if needed. Throe arithmetric exception in
21420         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
21421         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
21422
21423 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
21424
21425         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
21426         types before switching on type.  Fixes #69622.
21427
21428 2004-11-19  Raja R Harinath  <rharinath@novell.com>
21429
21430         * Makefile.am (check-local): New.  Integrate into 'make check'.
21431         (MCS,RUNTIME): Define using in-tree mono and mcs.
21432         (ILASM): New.
21433         (%.exe): Use $(ILASM).
21434
21435 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
21436
21437         * mini-ppc.c: adjust initial prolog size (bug #69691).
21438
21439 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
21440
21441         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
21442         #69664.
21443
21444 2004-11-17  Raja R Harinath  <rharinath@novell.com>
21445
21446         * Makefile.am (clean-local): Rename from 'clean'.
21447
21448 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
21449
21450         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
21451         to mono_arch_is_int_overflow. 
21452         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
21453         SIGFPE events.
21454
21455 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
21456
21457         * declsec.c|h: New files to support declarative security attributes.
21458         Added function to check if a method has (applicable) security.
21459         * mini.c|h: Add check for declarative security attributes in
21460         mono_method_check_inlining.
21461         * Makefile.am: Added declsec.c and declsec.h to the build.
21462
21463 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
21464
21465         * mini.c, mini.h: update to keep dynamic code info per-domain.
21466
21467 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
21468
21469         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
21470         (mini_init): Get rid of it from here too.
21471
21472 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
21473
21474         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
21475         implemented OP_RETHROW (patch by Geoff Norton
21476         <gnorton@customerdna.com>).
21477
21478 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
21479
21480         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
21481         between appdomains.  Fixes appdomain-unload on PPC.
21482
21483 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
21484
21485         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
21486         mini-exceptions.c: handle the new wrapper types.
21487         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
21488         token value as a MonoClass* when compiling a wrapper.
21489         mono_jit_create_remoting_trampoline now takes an additional
21490         MonoRemotingTarget parameter.
21491         
21492 2004-11-10  Martin Baulig  <martin@localhost>
21493
21494         * mini.c (mono_method_to_ir): Use `generic_container->context'
21495         rather than creating a new one.
21496
21497 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
21498
21499         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
21500
21501         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
21502
21503 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
21504
21505         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
21506         the experimental aot cache stuff.
21507
21508 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
21509
21510         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
21511         mini-exceptions.c: update to exception clause structure changes.
21512
21513 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
21514
21515         * exceptions-x86.c (throw_exception): Fix warnings.
21516
21517         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
21518         for OP_RETHROW.
21519
21520 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
21521
21522         * exceptions-sparc.c (get_throw_exception): Really fix this.
21523
21524 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
21525
21526         * tramp-*.c: we no longer support icalls without wrappers, so
21527         a bit of code can be removed here
21528
21529 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
21530
21531         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
21532         patch.
21533
21534         * cpu-sparc.md: Add op_rethrow.
21535
21536         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
21537
21538         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
21539
21540         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
21541         * mini-ops.h: Add OP_RETHROW.
21542
21543         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
21544
21545         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
21546
21547 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
21548         
21549         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
21550         Makes the output much easier to read
21551
21552 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
21553
21554         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
21555         prevents another huge leak when compiling with ssa. Secondly, the
21556         performance of doing this rather than freeing the lists is much
21557         better. GList does a lock every time you allocate a list link,
21558         so that it can use a memory pool. So, it is better to just use
21559         a memory pool of our own.
21560         
21561         * ssa.c, linear-scan.c: replace g_list_remove_link with
21562         g_list_delete.  The remove one does not free the GList, so we were
21563         leaking memory. On -O=all --compile-all with corlib, this cut down
21564         3 MB of allocations.
21565
21566 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
21567
21568         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
21569
21570         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
21571
21572         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
21573         into a new function mono_create_jit_trampoline ().
21574
21575 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
21576
21577         * trace.c (get_spec): Allow tracing of classes without a namespace.
21578
21579 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
21580
21581         * mini.c: Fix pointer overwrite in mini_method_compile.
21582
21583 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
21584
21585         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
21586         The darwin ABI needs some special handling for 1 and 2 byte structs
21587         Lets use lbz/lhz instead of lwz everywhere.
21588         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
21589         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
21590         Use stb/sth for the former, and put the latter always on stack instead of in
21591         argument registers.
21592
21593 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
21594
21595         * trace.c (is_filenamechar): Add '_'.
21596
21597 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
21598
21599         * mini-s390.c: Fix prolog length to allow for large trace requirements.
21600
21601         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
21602
21603 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
21604
21605         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
21606         depends on libmonogc. Fixes #68805.
21607
21608 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
21609
21610         * mini.c (mono_jit_free_method): Provide extra information for
21611         this error.  Currently this leaks, but will be turned into a
21612         developer option in the future.
21613
21614 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
21615
21616         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
21617
21618 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
21619
21620         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
21621         boundary. Fixes reading of PATCH_INFO_R4 and R8.
21622         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
21623
21624 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
21625
21626         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
21627         trampolines for AOT code.
21628
21629 2004-10-22    <vargaz@freemail.hu>
21630
21631         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
21632         constructed types. Fixes #68136.
21633
21634 2004-10-21  Martin Baulig  <martin@ximian.com>
21635
21636         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
21637         if it returns true, unwind the stack to the call instruction.
21638
21639 2004-10-21    <vargaz@freemail.hu>
21640
21641         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
21642
21643         * mini.h: Bump AOT version number.
21644
21645         * objects.cs: Add another test for unbox trampolines.
21646
21647         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
21648         valuetype methods.
21649
21650 2004-10-20    <vargaz@freemail.hu>
21651
21652         * driver.c: Add SHARED to the set of optimizations tested.
21653
21654         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
21655
21656         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
21657         used by CEE_NEWARR.
21658
21659         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
21660
21661 2004-10-20  Martin Baulig  <martin@ximian.com>
21662
21663         * mini-exceptions.c (mono_handle_exception): Call
21664         mono_debugger_handle_exception() to tell the debugger about
21665         catch/finally clauses.
21666
21667 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
21668
21669         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
21670
21671         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
21672         #68447.
21673
21674 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
21675
21676         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
21677         methods as their native size, fixed bug #57543, #57545.
21678         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
21679         This saves a temporary register and mullw call down into 1 (minor perf
21680         increase for cases like sum = sum * 5;  This use to translate into:
21681             li r11,5
21682             mullw r28,r28,r11
21683         It now translates to
21684             mulli r28,r28,5
21685
21686 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
21687
21688         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
21689         #68388.
21690
21691 2004-10-11  Martin Baulig  <martin@ximian.com>
21692
21693         * mini.c (mono_method_to_ir): If we're a generic method, get the
21694         MonoGenericContainer from our MonoMethodNormal and create a
21695         MonoGenericContext from it.
21696
21697 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
21698
21699         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
21700
21701         * basic-long.cs: Add test for checked i8->i2 cast.
21702
21703 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
21704
21705         * inssel-ppc.brg: added a couple of speedup rules.
21706
21707 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
21708
21709         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
21710         to speed up rebuilds.
21711
21712 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
21713
21714         * mini-s390.c: Minor fix to OP_OR_IMM.
21715
21716 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
21717
21718         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
21719         better. Fixes appdomain-unload.exe on sparc.
21720
21721 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
21722
21723         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
21724         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
21725         see bug 67324.
21726
21727 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
21728
21729         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
21730
21731 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
21732
21733         * mini.c: Always generate a field read/write wrapper for members
21734         of the class MarshalByRefObject since the actual instance could
21735         be a CBO.
21736
21737 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
21738
21739         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
21740
21741 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
21742
21743         * driver.c mini.h trace.c: Move the setting of the main assembly into
21744         a separate function called mono_trace_set_assembly () and call it after
21745         actually loading the main assembly. Fixes #66872.
21746
21747 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
21748
21749         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
21750         using the code manager.
21751
21752 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
21753
21754         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
21755
21756 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
21757
21758         * cpu-amd64.md: Fix bug in previous patch.
21759         
21760         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
21761         #66650.
21762
21763 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
21764
21765         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
21766         mini-exceptions.c: updates for changed stack walk interface.
21767
21768 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
21769
21770         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
21771
21772 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
21773
21774         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
21775
21776 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
21777
21778         * driver.c (mini_regression_list): Do not call mono_assembly_close 
21779         since assemblies can't be unloaded.
21780         
21781 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
21782
21783         * cpu-amd64.md: Fix more instruction lengths.
21784
21785         * cpu-amd64.md: Fix lengths of some instructions.
21786
21787 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
21788
21789         * inssel.brg: Make the array ldelema check aot friendly.
21790
21791 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
21792
21793         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
21794
21795         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
21796
21797 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
21798
21799         * mini-x86.c: Fix build.
21800
21801         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
21802         mono_type_get_underlying_type () helper function to simplify code.
21803         
21804 2004-09-09  Martin Baulig  <martin@ximian.com>
21805
21806         * mini-amd64.c: Don't access `type->data.klass' directly, call
21807         mono_class_from_mono_type() instead since the type may be a
21808         generic instance.
21809
21810 2004-09-09  Martin Baulig  <martin@ximian.com>
21811
21812         * mini-amd64.c (get_call_info): Fix support for generic instances.
21813         (add_valuetype): Use mono_class_from_mono_type() to get the class
21814         since we can be a generic instance.
21815
21816 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
21817
21818         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
21819
21820 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
21821
21822         * liveness.c: reset spill costs on each scan: bug 62107
21823
21824 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
21825
21826         * exceptions-sparc.c (mono_arch_find_jit_info): remove
21827         unnecessary line that doesn't compile
21828
21829 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
21830
21831         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
21832         trampolines, make them call an error function so people can fix their
21833         code.
21834
21835 2004-09-06  Martin Baulig  <martin@ximian.com>
21836
21837         * mini.c (mono_method_to_ir): When initializing locals, handle a
21838         generic instances like a valuetype if it's a valuetype and like a
21839         class if it's a class.
21840
21841 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
21842
21843         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
21844         stack. Fixes #64674.
21845
21846         * exceptions.cs: Add test for unwinding of call arguments.
21847
21848 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
21849
21850         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
21851         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
21852         set the carry/borrow flag). The sparc and s390 implementations
21853         can now use optimized versions (and simplify the code). ppc bugfixes.
21854
21855 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
21856
21857         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
21858
21859 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
21860
21861         * inssel-amd64.brg: Remove leftover 32 bit rule.
21862
21863         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
21864
21865 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
21866
21867         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
21868         mono_arch_find_jit_info functions into a new function. Fix a memory
21869         leak.
21870
21871         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
21872         refactored code.
21873         
21874 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
21875
21876         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
21877         as well.
21878         
21879         * exceptions.cs: Add array size tests.
21880
21881         * mini.c: Allocate a separate icall wrapper for each arity of 
21882         mono_array_new_va. Fixes #59509.
21883
21884         * exceptions.cs: Add testcase for 64578.
21885
21886         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
21887
21888         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
21889         
21890 2004-09-02  Martin Baulig  <martin@ximian.com>
21891
21892         * mini.c (mono_method_to_ir): When initializing the locals, call
21893         handle_initobj() on the generic instance itself, not its
21894         underlying type.
21895
21896 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
21897
21898         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
21899         MonoJitInfo for dynamic methods.
21900
21901         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
21902
21903         * mini.c: Add support for freeing JIT data for dynamic methods.
21904         
21905 2004-09-01  Martin Baulig  <martin@ximian.com>
21906
21907         * mini-x86.c (is_regsize_var): Added support for generic
21908         instances.
21909         (mono_arch_emit_prolog): Make this compile again, use
21910         `x86_push_imm_template (code)'.
21911
21912 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
21913
21914         * mini-x86.c: make all push_imm instructions that get
21915         patched always emit the long form
21916
21917 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
21918
21919         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
21920         in a per-domain hash.
21921
21922         * mini-amd64.c (merge_argument_class_from_type): Handle generic
21923         types.
21924
21925 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
21926
21927         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
21928         work.
21929         
21930         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
21931         work.
21932
21933         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
21934         Beginnings of SSE2 support.
21935
21936         * exceptions.cs: Add more tests for checked int<->uint casts.
21937
21938 2004-08-28  Martin Baulig  <martin@ximian.com>
21939
21940         * mini-x86.c (mono_arch_instrument_epilog): Added support for
21941         generic instances.
21942
21943         * mini.c
21944         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
21945         Handle generic instances recursively.
21946
21947 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
21948
21949         * iltests.il: test for conv.u8 on a constant
21950
21951 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
21952
21953         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
21954         LCONV_x4 (shrun_32 (membase)).
21955
21956 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
21957
21958         * inssel-x86.brg: c&p rules for push/setret of long
21959
21960 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
21961
21962         * inssel-x86.brg: c&p rules for compare (base, regvar) and
21963         compare (regvar, base)
21964
21965         * inssel-x86.brg: more burg love
21966
21967         * inssel.brg: more cleanup
21968
21969         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
21970
21971 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
21972
21973         * basic-long.cs, basic-calls.cs: new tests for optimization.
21974
21975 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
21976
21977         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
21978         patch.
21979
21980 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
21981
21982         * mini-amd64.c (read_tls_offset_from_method): Add another case.
21983         
21984 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
21985
21986         * inssel.brg (mini_emit_memcpy): use 
21987         NO_UNALIGNED_ACCESS to disable memcpy optimization
21988
21989 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
21990
21991         * mini-amd64.c: Handle generic types in various places.
21992
21993         * mini.c (mono_method_to_ir): Handle generic types in init locals.
21994
21995 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
21996
21997         * mini.c (handle_box): Fix warning.
21998
21999         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
22000
22001         * mini-amd64.h: Enable the emit_state optimization.
22002
22003         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
22004
22005         * mini-amd64.c: Add some new 64 bit peephole opts.
22006
22007         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
22008
22009         * cpu-amd64.md: sreg1 of div instructions must be %rax.
22010
22011         * mini-amd64.c: Register allocator fixes.
22012
22013         * mini.c: Add an optimization to emit_state to avoid allocation of new
22014         registers on some platforms.
22015
22016 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
22017
22018         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
22019
22020         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
22021         allocation. Fixes #63085.
22022
22023         * basic-long.cs: Add new regression test.
22024
22025         * mini-amd64.c: Register allocator improvements.
22026
22027 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
22028
22029         * mini-amd64.c (read_tls_offset_from_method): Add another code
22030         sequence.
22031
22032         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
22033         instruction sequence for nullifying class init trampolines.
22034
22035         * objects.cs: Add new regalloc test.
22036
22037         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
22038
22039 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
22040
22041         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
22042         
22043         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
22044         arguments.
22045
22046         * driver.c: Fix profiling after TLS changes.
22047         
22048         * driver.c (mono_main): Set mono_stats.enabled if needed.
22049
22050         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
22051         CEE_BOX.
22052
22053 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
22054
22055         * mini-x86.c: use a 1 op rather than a 2 op tls access
22056         instruction -> faster.
22057
22058 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
22059
22060         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
22061         x86 backend.
22062
22063 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
22064
22065         * exceptions-sparc.c (throw_exception): fix typo
22066
22067 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
22068
22069         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
22070         set tree->dreg correctly with tls. Allow any
22071         register to be used.
22072
22073         * mini-x86.c (read_tls_offset_from_method): add new code
22074         generation pattern seen with GCC.
22075
22076
22077 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
22078
22079         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
22080         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
22081         exceptions-sparc.c: fix some performance issues in exception
22082         handling and setting of the stack trace for exceptions that were
22083         already thrown.
22084
22085 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
22086
22087         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
22088         x86 backend.
22089         
22090         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
22091         registers.
22092
22093 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
22094
22095         This patch inlines tls access, when possible.
22096         
22097         * mini.h: new arch functions for TLS intrinsics.
22098         All platforms updated with a stub.
22099
22100         * mini.c: use the new intrinsics
22101
22102         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
22103         arch specific intrinsic for tls variables
22104
22105 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
22106
22107         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
22108         under windows.
22109
22110 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
22111
22112         * mini.c: thread local allocation
22113
22114 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
22115
22116         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
22117
22118         * Makefile.am: Link against the static version of libmonogc.
22119         
22120         * Makefile.am: Link the static versions of the convenience libraries
22121         into the mono executable.
22122
22123         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
22124
22125 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
22126
22127         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
22128         on integer overflow.
22129
22130         * mini-amd64.c: Reorganize function call code.
22131
22132         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
22133
22134 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
22135
22136         * inssel-x86.brg: use xor eax,eax.
22137         
22138         * basic.cs: new tests
22139
22140 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
22141
22142         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
22143         in exception throwing code.
22144         
22145 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
22146
22147         * inssel-x86.brg: use xor esi,esi.
22148
22149 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
22150
22151         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
22152         can trace methods compiled during mini_init () too.
22153
22154         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
22155         CEE_CONV_U4.
22156
22157 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
22158
22159         * Makefile.am: static link on x86 (r=zoltan)
22160
22161 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
22162
22163         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
22164         code since it causes some programs to fail.
22165
22166 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
22167
22168         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
22169
22170 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
22171
22172         * mini.c: ovfops_op_map - add STACK_OBJ case for
22173         CONV_I 
22174         * basic.cs: add test_0_pin_string as test
22175         case for above.
22176
22177 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
22178
22179         * Makefile.am: build C# if srcdir != builddir
22180
22181 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
22182
22183         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
22184         fall-through blocks.
22185
22186 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
22187
22188         * driver.c: enable loop by default again and include abcrem in -O=all.
22189
22190 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
22191
22192         * iltests.il: Add some localloc tests.
22193
22194         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
22195
22196         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
22197         Fixes #62574.
22198
22199         * inssel-amd64.brg: Add some optimizations.
22200
22201         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
22202         for gcc-3.4.
22203
22204         * Makefile.am: Statically link mono against libmono on AMD64.
22205         
22206         * mini-amd64.c inssel-amd64.brg: Optimizations.
22207
22208 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
22209
22210         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
22211
22212         * tramp-amd64.c: Patch calling code in trampolines.
22213
22214 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
22215
22216         * mini-amd64.c: pinvoke struct passing fixes.
22217
22218 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
22219
22220         * mini-sparc.c: redo change, make mono_arch_cpu_init call
22221         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
22222
22223 2004-08-05  Duncan Mak  <duncan@ximian.com>
22224
22225         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
22226         CEE_LDELEM_ANY.
22227
22228 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
22229
22230         * mini-amd64.c (emit_move_return_value): Move return value for normal
22231         calls too.
22232
22233 2004-08-05  Martin Baulig  <martin@ximian.com>
22234
22235         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
22236         `type->type'; just modify `type' itself when dealing with enums
22237         and generic instances.
22238         (check_call_signature): Make `simple_type' a `MonoType *'.
22239
22240 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
22241
22242         * mini.c: Use OP_PADD to add offsets to addresses.
22243
22244         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
22245
22246 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
22247
22248         * mini-sparc.c (mono_arch_emit_epilog): fix check
22249         for folding last op into restore instruction
22250
22251 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
22252
22253         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
22254         helper methods using the code manager.
22255         
22256         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
22257
22258         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
22259
22260 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
22261         
22262         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
22263           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
22264
22265         * mini-s390.c: fix tail processing
22266
22267 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
22268
22269         * mini-ppc.c: mul.ovf.un exception name fix.
22270
22271 2004-08-03  Martin Baulig  <martin@ximian.com>
22272
22273         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
22274         instances; before jumping to `handle_enum', also modify `ptype'.
22275
22276 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
22277
22278         * cpu-sparc.md: fcall maximal length too small.
22279
22280 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
22281
22282         * mini-amd64.c mini.h: Add initial support for passing/returning 
22283         structures to/from pinvoked methods.
22284
22285 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
22286
22287         * mini-ppc.c: reg allocator fix.
22288
22289 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
22290
22291         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
22292
22293         * inssel.brg: Optimize memset on 64 bit machines.
22294
22295         * mini-amd64.c: Fix some vararg cases.
22296
22297 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
22298
22299         * mini-s390.c: Corrected macro in emit_float_to_int
22300
22301         * s390-abi.cs: Tests to exercise the s390 ABI
22302
22303 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
22304
22305         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
22306         caller saved regs.
22307
22308         * basic.cs: Add a test for add.ovf.un.
22309
22310 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
22311
22312         * mini-sparc.c: add case for OP_IDIV_UN
22313
22314 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
22315
22316         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
22317         
22318         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
22319
22320 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
22321
22322         * basic.cs: regression tests.
22323
22324         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
22325         regressions.
22326
22327 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
22328
22329         * basic.cs: Add a new test.
22330
22331         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
22332         and AOT. Various fixes and optimizations.
22333
22334         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
22335
22336 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
22337
22338         * mini-ppc.c: make sure temp regs are not used for global reg
22339         allocation.
22340
22341 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
22342
22343         * cpu-sparc.md: conv_i8 fix for 64bits
22344
22345         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
22346
22347 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
22348         
22349         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
22350         add opcode for cmp BYTE PTR [eax], imm.
22351
22352         * inssel.brg: Make memcpy and memset takes bases.
22353
22354 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
22355
22356         * *-amd64.*: More AMD64 work.
22357         
22358 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
22359
22360         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
22361         add a compare-not-equal opcode.
22362         
22363 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
22364
22365         * mini.c: Use mono_init_from_assembly instead of mono_init.
22366         
22367 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
22368
22369         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
22370
22371         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
22372
22373         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
22374
22375         * inssel.brg: 64 bit fixes.
22376
22377         * mini.h (MonoCallInst): Add some AMD64 specific data.
22378
22379         * mini.h: Add some OP_P opcodes.
22380
22381 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
22382
22383         * basic.cs: tests for 61797 and 61740
22384
22385 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
22386
22387         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
22388         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
22389
22390 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
22391
22392         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
22393
22394         * *-amd64*.*: Ongoing AMD64 work.
22395
22396 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
22397
22398         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
22399
22400         * *-amd64*: Ongoing AMD64 work.
22401
22402         * mini-arch.h: Add AMD64 support.
22403
22404         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
22405
22406         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
22407
22408         * mini-ops.h: Add new opcodes.
22409
22410         * Makefile.am: Add AMD64 support.
22411
22412         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
22413         rules into the inssel-long*.brg files.
22414
22415         * *-amd64.*: Add beginnings of AMD64 backend.
22416
22417 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
22418
22419         * mini.c (print_dfn): commenting out the code that prints
22420         the cil. With -O=deadce, this makes -v -v crash.
22421         
22422         * cpu-pentium.md: make checkthis have a length of 2
22423
22424 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
22425
22426         * mini-sparc.h: fix implementations of __builtin
22427         functions for Sun compiler for V9.
22428
22429 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
22430
22431         * mini.c: use the new stelem.ref wrapper
22432         * exceptions.cs, arrays.cs: new stelem.ref tests
22433
22434 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
22435
22436         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
22437         new XSP should work with these changes).
22438
22439 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
22440         
22441         * inssel-{long32,x86,}.brg: trivial optimizations.
22442         
22443 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
22444
22445         * mini.c: load value when emitting box operation in
22446         constrained calls.
22447
22448 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
22449
22450         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
22451         is one byte shorter than cmp DWORD PTR [eax], 0.
22452
22453 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
22454
22455         * inssel-ppc.brg: arguments on the stack are always
22456         relative to the stack pointer (spotted by Neale Ferguson).
22457
22458 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
22459
22460         * exceptions-x86.c: delay appending the method name to the trace until
22461         after mono_jit_info_table_find is called, as this gets the real
22462         MonoMethod.
22463
22464 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
22465
22466         * aot.c: register roots
22467
22468 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
22469
22470         * aot.c : I could just use PLATFORM_WIN32 flag.
22471
22472 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
22473
22474         * aot.c : Reverting the previous fix. This time it broke linux build.
22475
22476 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
22477
22478         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
22479
22480 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
22481
22482         * mini.c (handle_stack_args): Remove some more debugging code.
22483         
22484         * mini.c (handle_stack_args): Remove debug output left in by mistake.
22485
22486         * driver.c mini.h aot.c: Allow additional options to be specified with
22487         --aot and pass them to mono_compile_assembly.
22488
22489         * aot.c: Add experimental code to AOT compile all loaded assemblies
22490         on demand and save the code into a cache in the filesystem.
22491
22492         * aot.c: Add support for more wrapper methods.
22493         
22494         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
22495         58863.
22496
22497         * cpu-*.md: Remove removed opcodes.
22498
22499         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
22500         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
22501         related icalls to marshal.c.
22502
22503 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
22504
22505         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
22506
22507         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
22508
22509         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
22510
22511 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
22512         * liveness.c: If liveness is recomputated we need to reset the information
22513         for each variable. This way, if the liveness range has been narrowed
22514         by optimizations that happened after the last computation, we can return
22515         a smaller range.
22516         
22517         For example, if you have
22518         
22519         {
22520                 int i = 0;
22521                 
22522                 // Tons of code that does not affect i
22523                 
22524                 i = foo ();
22525                 ...
22526         }
22527         
22528         i = 0 is dead code and will be removed by SSA. However, when
22529         linear scan gets to the code, i will still appear to be live
22530         throughout the entire block. This prevents good register allocation.
22531
22532 2004-07-06  Martin Baulig  <martin@ximian.com>
22533
22534         * debug-mini.c (mono_debug_init_method): Allow
22535         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
22536         (mono_debug_add_icall_wrapper): New method.
22537
22538         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
22539
22540 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
22541
22542         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
22543         optimization.
22544
22545 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
22546
22547         * aot.c (mono_aot_load_method): Fix loading of debug info.
22548
22549 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
22550
22551         * aot.c: Add logging support.
22552
22553 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
22554
22555         * mini.h: Add prototype for mono_print_method_from_ip.
22556
22557         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
22558
22559         * inssel.brg: 64 bit fixes.
22560
22561         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
22562         inssel-long32.brg.
22563
22564         * Makefile.am: Add SPARC64 support.
22565
22566 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
22567
22568         * aot.c: Fix alignment problems on 32 bit platforms.
22569
22570 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
22571
22572         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
22573         SPARC64.
22574
22575         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
22576         problems.
22577
22578         * mini.h: Bump AOT file version. Some 64 bit fixes.
22579
22580 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
22581
22582         * inssel-sparc.brg: Add new rule to avoid register moves.
22583
22584         * inssel.brg: Add ldind_to_load_membase helper function.
22585
22586 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
22587
22588         * mini.c: OffsetToStringData intrinsic.
22589         
22590 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
22591
22592         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
22593
22594         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
22595         regression tests.
22596
22597         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
22598 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
22599
22600         * mini.c: reinstated mono_compile_get_interface_var()
22601         on x86, too, since the change breaks the Gtk# build there as well.
22602
22603 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
22604
22605         * driver.c: remove loop from the default optimizations: it seems to
22606         interact badly with some of the other options (see bug #60613).
22607
22608 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
22609
22610         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
22611         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
22612
22613 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
22614
22615         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
22616         vararg-using methods.
22617
22618 2004-06-21  Martin Baulig  <martin@ximian.com>
22619
22620         * mini/mini-exceptions.c
22621         (mono_handle_exception): Added `gpointer original_ip' argument.
22622         After calling mono_unhandled_exception(), call
22623         mono_debugger_unhandled_exception() and if that returns true,
22624         restore the context and return.
22625
22626 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
22627
22628         * mini-ppc.c: prefer the use of relative branches so
22629         they won't need to be patched in aot code (patch from Patrick Beard).
22630
22631 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
22632
22633         * aot.c: patch from Patrick Beard to make the output assembly
22634         more correct for the MacOSX assembler. Small tweak to
22635         generate sane images on Linux/PPC, too.
22636
22637 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
22638
22639         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
22640         case until bug #59509 is fixed (shows up in #60332).
22641
22642 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
22643
22644         * mini.c: make sure the needed wrappers are compiled, too, with
22645         precomp.
22646
22647 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
22648
22649         * driver.c: remove NPTL reference in --version output.
22650
22651 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
22652
22653         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
22654         generate valid assembly for the Mach-O assembler.
22655
22656 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
22657
22658         * driver.c: don't include abcrem in the all optimization specifier
22659         since it slows down jit compilation too much for now.
22660
22661 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
22662
22663         * mini.c: use BIGMUL only if both operands have the same signage.
22664         * iltests.il: Test for bug 60056. (errors related to signage in
22665         BIGMUL).
22666
22667         r=lupus.
22668
22669 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
22670
22671         * mini.c, aot.c: memory leak fixes.
22672
22673 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
22674
22675         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
22676
22677 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
22678
22679         * Makefile.am: remove the -static hack completely, it links in
22680         statically glib as well.
22681
22682 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
22683
22684         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
22685         * exceptions.cs: make it compile with new mcs/csc.
22686
22687 2004-06-03 Massimiliano Mantione <massi@ximian.com>
22688         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
22689         and added relevant test case.
22690
22691 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
22692
22693         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
22694         regressions in gtk-sharp.
22695
22696 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
22697
22698         * exceptions.cs: New regression tests.
22699
22700         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
22701
22702 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
22703
22704         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
22705
22706 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
22707
22708         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
22709
22710         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
22711
22712 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
22713
22714         * mini.c (mono_jit_runtime_invoke): Init class in this
22715         method instead of trusting mono_jit_compile_method to
22716         do the work (because wrappers can be in object class)
22717
22718 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
22719
22720         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
22721
22722         * basic-long.cs: New regression test.
22723
22724 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
22725
22726         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
22727         and div/rem checks.
22728
22729 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
22730
22731         * Makefile.am: fix miguel's change to build mono statically against
22732         libmono (track build dependencies).
22733
22734 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
22735
22736         * cfold.c: Some glib versions do not have G_MININT32.
22737
22738 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
22739
22740         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
22741         with precision of tan, atan, sin and cos, and implemented related
22742         regressions tests (fixes bug 54467, but one new problem appeared and
22743         is not fixed yet).
22744
22745 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
22746
22747         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
22748
22749         * exceptions.cs: Add test for constant folding && division by zero.
22750
22751         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
22752         since driver.c is in libmono too, so the optimization was useless.
22753
22754         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
22755         variable to driver.c so the compiler can emit more efficient code to
22756         access them.
22757
22758 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22759
22760         * Makefile.am: don't distribute generated inssel.[ch] files.
22761
22762 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
22763
22764         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
22765         into the default appdomain. Fixes #58707.
22766
22767         * jit-icalls.c: Remove the broken approximation for truncl, doing
22768         no conversion is better.
22769
22770         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
22771         Fixes #58863.
22772
22773 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
22774
22775         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
22776         of the mcrxr instruction which is not available on some processors
22777         even if it's documented to be. Implement add and sub overflow correctly
22778         (still not complete for long unsigned). Speed up icalls a bit.
22779
22780 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
22781
22782         * mini.c (mono_jit_compile_method_with_opt): Make sure that
22783         we run .cctor in the current domain instead of target_domain.
22784         
22785         Fixes bug #58558, .cctor not being called in -O=shared.
22786
22787 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
22788
22789         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
22790
22791 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
22792
22793         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
22794         which can be done with an imm8, do it that way.
22795         (mono_arch_output_basic_block): ditto for a jmp
22796         (mono_arch_emit_prolog): Computate maximum offset of a label.
22797
22798 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
22799
22800         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
22801         now tries to allocate prefered physical reg's for virtual
22802         regs. This reduces the number of emited spills/loads with
22803         20-30% on our core assemblies.
22804
22805 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
22806
22807         * jit-icalls.c: truncl() is not needed and trunc() is
22808         the correct thing to do anyway (bug #58287).
22809
22810 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
22811
22812         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
22813         if available.
22814
22815 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
22816
22817         * driver.c: enable loop optimizations by default.
22818
22819 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
22820
22821         * mini-x86.c: fix calc of max loop size when aligning loops start.
22822
22823 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
22824
22825         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
22826         the stack.
22827
22828 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
22829
22830         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
22831         should set carry.
22832
22833         * basic-long.cs: Add tests for add/subtract of immediates with carry.
22834
22835         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
22836         
22837         * mini.c (inline_method): Allways inline some wrappers even if the cost
22838         is too large. Fixes #58785.
22839
22840         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
22841         
22842 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
22843
22844         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
22845         (crichton@gimp.org). Beginning of support for sparc/linux.
22846
22847         * mini-sparc.c: Optimize retrieval of LMF address.
22848
22849 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
22850
22851         * exceptions-ppc.c:  handle alloca in methods with clauses.
22852
22853 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
22854
22855         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
22856
22857 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
22858
22859         * mini.c: Delegate most of the abort signal work to 
22860           mono_thread_request_interruption, which also handles Stop and Suspend
22861           states.
22862
22863 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
22864
22865         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
22866         supports the save/restore lmf opcodes.
22867
22868 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
22869
22870         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
22871         by gcc-3.4 as well.
22872
22873         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
22874
22875 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
22876
22877         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
22878         methods which contain array accesses.
22879
22880         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
22881         boundaries. Fixes #58537.
22882
22883         * iltests.il: Add regression test for #58537.
22884
22885 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
22886
22887         * mini-x86.c (mono_arch_local_regalloc): Last part of
22888         fix for bug #58633 (releasing register to early).
22889
22890 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
22891
22892         * basic-long.cs: Add new regression test.
22893
22894 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
22895
22896         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
22897         register too early on the chain.
22898
22899 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
22900
22901         * mini.c (create_helper_signature): Use a helper function to reduce
22902         the code which needs to be written. Also set the calling convention of
22903         icalls on windows. Fixes #57840.
22904
22905 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
22906
22907         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
22908         exceptions-ppc.c: added helper function to get the instruction address
22909         from a signal handler context.
22910
22911 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
22912
22913         * helpers.c: use g_get_tmp_dir. Invokes happyness 
22914         from gonzalo.
22915
22916 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
22917
22918         * helpers.c: Add new env variable to pass args to objdump.
22919         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
22920
22921 2004-05-17  Radek Doulik  <rodo@ximian.com>
22922
22923         * Makefile.am (common_sources): added abcremoval.h so it get
22924         disted and daily mono packages on go-mono.com will build again
22925
22926 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
22927
22928         * abcremoval.c: Fixed coding style, added copyright header.
22929
22930         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
22931
22932         * mini.h: Added prototype for abc removal main function.
22933
22934         * build_relations_propagation_table.pl: Added copyright header.
22935
22936 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
22937
22938         * basic-long.cs: reg test for complex ceq_long bug.
22939
22940 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
22941
22942         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
22943         reg in long and clob case (bug #58343). Fixed/added comments.
22944
22945 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
22946
22947         * mini.c (mono_jit_runtime_invoke): Follow new convention
22948         of calling the invoke method with an function pointer.
22949
22950 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
22951
22952         * ChangeLog: Fix author of memory leak patch.
22953
22954 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
22955
22956         * Makefile.am: fix make dist as well...
22957
22958
22959 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
22960
22961         * cfold.c: Made so that conversions from pointer to int4 are no-ops
22962         on archs where pointers are 4 bytes long.
22963
22964         * Makefile.am: Added abcremoval.c source file.
22965
22966         * abcremoval.c: Added abcremoval.c.
22967
22968         * abcremoval.h: Added abcremoval.h.
22969
22970         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
22971
22972         * inssel.brg: Enabled bounds check removal.
22973
22974         * mini.c: Added support for abcrem optimization.
22975
22976         * mini.h: Added abcrem optimization label.
22977
22978         * driver.c: Added support for abcrem optimization.
22979
22980         * propagated_relations_table.def: Added propagated_relations_table.def.
22981
22982 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
22983
22984         * mini.c, cfold.c: fix style.
22985
22986 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
22987
22988         * mini.c: handle issue with the low-level implementation of
22989         some long opcodes (bug #54209).
22990
22991 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
22992
22993         * basic.cs: test for my new cmov stuff.
22994
22995 2004-05-13      Patrik Torstensson
22996
22997         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
22998         opt and added peephole documentation.
22999
23000 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
23001
23002         * tramp-ppc.c: rewrote the generic trampoline code.
23003
23004 2004-05-11      Patrik Torstensson
23005
23006         * mini-x86.c: optimize long shl/shr asm code (one less branch)
23007
23008 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
23009
23010         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
23011
23012         * mini.h mini.c dominators.c: Applied patch from Derek Woo
23013         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
23014
23015         * mini.c: Add new icalls for AsAny marshalling.
23016
23017 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
23018
23019         * tramp-ppc.c, mini-ppc.c: more cleanups.
23020
23021 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23022
23023         * mini.c: no warnings.
23024
23025 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
23026
23027         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
23028
23029 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
23030
23031         * mini.c: In the thread abort signal handler, if the thread is in the
23032         process of being stoped, don't throw the Abort exception, just stop the
23033         thread.
23034
23035 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
23036
23037         * tramp-ppc.c: removed old code.
23038
23039 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
23040
23041         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
23042         do some simple speed optimizations on ppc.
23043
23044 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
23045
23046         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
23047         and large offsets in load/store.
23048
23049 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
23050
23051         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
23052         it causes regressions.
23053
23054 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
23055
23056         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
23057         support.
23058
23059 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
23060
23061         * jit-icalls.c: remove warnings.
23062         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
23063         speedups for unsafe code.
23064
23065 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
23066
23067         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
23068
23069 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
23070
23071         * basic-calls.cs: Add new regression test.
23072
23073         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
23074         more portable.
23075
23076         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
23077
23078         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
23079         is no longer used.
23080
23081 2004-05-06      Patrik Torstensson
23082
23083         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
23084         long reg allocation in any reg (not only eax:edx) and implemented 
23085         long shl/shr ops in asm instead of helpers.
23086
23087 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
23088
23089         * mini-sparc.h: Fix warnings.
23090
23091         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
23092         stack.
23093
23094         * mini-exceptions.c (mono_handle_exception): Call the filter in a
23095         separate statement for clarity.
23096
23097         * mini-sparc.c: Update status.
23098
23099 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
23100
23101         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
23102         here.
23103
23104 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
23105
23106         * inssel-ppc.brg: another small pre-release workaround:
23107         we don't do overflow detection for long_sub_un.
23108
23109 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
23110
23111         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
23112         (also works around a weird ppc bug: 57957).
23113
23114 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
23115
23116         * tramp-ppc.c: trampoline fixes.
23117
23118 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
23119
23120         * mini-ppc.c: fixed typos.
23121
23122 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
23123
23124         * mini-ppc.c, exceptions-ppc.c: more code saves registers
23125         at the top of the stack. Fixed typos. Use a frame registers
23126         for all the methods with exception clauses.
23127
23128 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
23129
23130         * exceptions-ppc.c: restore fp registers.
23131
23132 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
23133
23134         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
23135         order from the stack top (moved the stack room to save the
23136         return value for trace after the param area). Fixed corruption
23137         in restoring registers on unwind.
23138
23139 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
23140
23141         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
23142
23143 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
23144
23145         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
23146         and prolog/epilog for methods that use it. Allow
23147         enough param area room for varargs methods. Fix miguel's
23148         breakage in exception handling.
23149
23150 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
23151
23152         * Makefile.am: run genmdesc only on current arch.
23153
23154 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23155
23156         * exceptions-x86.c:
23157         * mini-x86.h: fix the build on windows.
23158
23159 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
23160
23161         * 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.
23162
23163         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
23164
23165         * mini-exceptions.c: New file.
23166         
23167         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
23168         Move some parts of the x86 exception handling code to an 
23169         arch-independent file so it can be shared with other ports.
23170
23171 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
23172
23173         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
23174
23175 2004-04-26  David Waite  <mass@akuma.org>
23176
23177         * driver.c: remove comma from end of enumeration declaration
23178
23179 2004-04-26  Jackson Harper  <jackson@ximian.com>
23180
23181         * driver.c: parse config file before loading first assembly. This
23182         allows the user gac to be enabled/disabled. 
23183         
23184 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
23185
23186         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
23187         simpler mechanism: we do not care what is encoded initially
23188         (branch absolute or relative), we care about the code and its
23189         target.  I kept the old code for reference for now.
23190
23191         The new code tries first to determine if the jump is anywhere in
23192         the -/+32 absolute meg range, if it succeeds, it encodes using the
23193         absolute branch;  If not, it tried to find something in the
23194         relative range, if not, it uses the handle_thunk code. 
23195
23196 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
23197
23198         * exceptions-ppc.c: use the correct ip register on macosx.
23199
23200 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
23201
23202         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
23203
23204 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
23205
23206         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
23207         Raise exception on integer divide by zero by hand since the hw
23208         doesn't support it. Handle NaNs in FP compares.
23209
23210 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
23211
23212         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
23213         code reducing duplication between the platforms and enabled
23214         signal exception handling (on linux for now).
23215
23216 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
23217
23218         * exceptions-ppc.c: more macosx support.
23219
23220 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
23221
23222         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
23223
23224 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
23225
23226         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
23227
23228 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
23229
23230         * iltests.il: more tests.
23231
23232 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
23233
23234         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
23235         vars as well.
23236
23237 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
23238
23239         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
23240
23241 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
23242
23243         * liveness.c: Mark variables as volatile in all basic blocks reachable
23244         from exception clauses.
23245
23246 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
23247
23248         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
23249         inlining.
23250
23251 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
23252
23253         * iltests.il, basic.cs: more tests for regalloc.
23254
23255 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
23256
23257         * iltests.il: Some tests for register allocation modifications
23258         I have locally.
23259
23260 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
23261
23262         * exceptions.cs: Add regression test for bug #56782.
23263
23264         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
23265         original stack trace if an exception is rethrown. Fixes #56782. Oh,
23266         the beauty of fixing the same thing in 5 different files...
23267
23268 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
23269
23270         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
23271         methods.
23272
23273 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
23274
23275         * mini.c: Add support for STRWLPARRAY marshalling convention.
23276
23277 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
23278
23279         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
23280         to init the context to setup the regs pointer).
23281
23282 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
23283
23284         * exceptions-ppc.c: more exceptions work.
23285
23286 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
23287
23288         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
23289         not allowed.
23290
23291 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
23292
23293         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
23294         can use the memory directly.
23295
23296         * cpu-pentium.md: Update documentation from a post from Zoltan. 
23297
23298         add x86_add_membase, x86_sub_membase, x86_mul_membase
23299
23300 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
23301
23302         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
23303         GENERAL_REGS they were also hardcoded for all PPC ports.
23304
23305         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
23306
23307         Remove hard-coded limit for floating point registers, use
23308         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
23309
23310         Notice that in MacOS X calling conventions you can fit a lot more
23311         floating point values in registers, so I should update the PInvoke
23312         test to excercise the passing of floating point values on the
23313         stack (currently broken).
23314         
23315 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
23316
23317         * tramp-ppc.c (create_trampoline_code): Added
23318         JUMP_TRAMPOLINE_SIZE. 
23319         (ppc_magic_trampoline): Follow the pattern from
23320         x86_magic_trampoline: if code is set to zero, return. 
23321         (create_trampoline_code): Always pass MonoMethod to the jump
23322         trampoline, before it was passing a null.
23323         (mono_arch_create_jump_trampoline): Implement the jump stub, could
23324         share the code with mono_arch_create_jit_trampoline. 
23325
23326         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
23327         implemented.
23328         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
23329         implemented.  
23330
23331         * cpu-g4.md: Added length for jmp instruction, the worst case
23332         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
23333         for save_lmf).
23334
23335 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
23336
23337         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
23338
23339 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
23340
23341         * mini.c: Only set bblock->real_offset when adding a new bblock, and
23342         before each IL instruction.
23343
23344         * mini.c (CEE_BOX): Fix warnings.
23345
23346 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23347
23348         * mini.c: removed a few unused vars and extra whitespace.
23349
23350 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
23351
23352         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
23353         checks.
23354         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
23355         index.
23356         (OP_GETCHR): use the above
23357         (CEE_LDELEMA): use the above.
23358
23359         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
23360         version of the generic impl.
23361         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
23362         (CEE_LDELEMA): use the above.
23363
23364 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
23365
23366         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
23367         Fixes #56317.
23368
23369         * iltests.il: Added new regression test for #56317.
23370
23371 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
23372
23373         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
23374         under NetBSD. Fixes #56450.
23375
23376         * liveness.c (update_gen_kill_set): Fix previous patch.
23377
23378 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23379
23380         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
23381
23382 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
23383
23384         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
23385         ldsfld and ldsflda.
23386
23387         * inssel-sparc.brg: Add more optimizations.
23388
23389         * mini-sparc.c: Replace multiply/divide with shifts if possible.
23390
23391 2004-04-01  Martin Baulig  <martin@ximian.com>
23392
23393         * mini.c (handle_box): New static function; moved the
23394         implementation of CEE_BOX here.
23395         (mono_method_to_ir): Added `constrained_call' variable.
23396         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
23397         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
23398         mono_method_get_constrained() to get the method.
23399
23400 2004-04-01  Martin Baulig  <martin@ximian.com>
23401
23402         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
23403         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
23404         (mono_method_to_ir): We don't need these macros anymore since
23405         mono_class_get_full() already takes care of it. 
23406
23407 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23408
23409         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
23410         use @function (as doesn't accept #function here) and check the return
23411         value of system and stop if fails.
23412
23413 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23414
23415         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
23416
23417 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
23418
23419         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
23420
23421         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
23422
23423         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
23424         #56223.
23425
23426         * basic-long.cs: Add test for negation of Int64.MinValue.
23427
23428 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
23429
23430         * mini-sparc.c: Update status.
23431
23432         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
23433
23434         * exceptions-sparc.c: Fix return value in filters.
23435
23436         * inssel-sparc.brg: Fix register allocation in some rules.
23437
23438 2004-03-28  Martin Baulig  <martin@ximian.com>
23439
23440         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
23441         if neccessary.  
23442
23443 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
23444
23445         * mini-x86.c (mono_arch_patch_code): Fix warnings.
23446         
23447         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
23448         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
23449         remove unused conv_u4 opcode.
23450
23451         * mini-x86.c: Remove valgrind workaround since it slows down things
23452         even when mono is not run under valgrind.
23453
23454 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
23455
23456         * mini-sparc.c: Update status.
23457
23458         * inssel-sparc.brg: Add some optimizations.
23459
23460         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
23461         future delay slot filling. Add support for varargs, tail calls and JMP.
23462
23463         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
23464         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
23465
23466         * inssel.brg: Fix register allocation in OP_ARGLIST.
23467
23468         * inssel.brg: Fix warnings.
23469
23470 2004-03-25  Martin Baulig  <martin@ximian.com>
23471
23472         * mini.c (inflate_generic_field): Removed.
23473         (mini_get_method): Removed, use mono_get_method_full(),
23474         (mini_get_class): Removed, use mono_class_get_full().
23475         (mono_method_to_ir): Pass our generic context to
23476         mono_field_from_token().        
23477
23478 2004-03-25  Martin Baulig  <martin@ximian.com>
23479
23480         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
23481         of a `MonoMethod *'.
23482         (mini_get_method): Take a `MonoGenericContext *' instead
23483         of a `MonoMethod *'.
23484         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
23485         a new local variable called `generic_context' which holds the
23486         current `MonoGenericContext *'; use it to lookup things.
23487
23488 2004-03-24  Martin Baulig  <martin@ximian.com>
23489
23490         * mini.c (mini_get_class): New static method; if we're inside a
23491         generic instance, inflate the class if neccessary.
23492         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
23493
23494 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
23495
23496         * iltests.il: New regression test for #55976.
23497
23498         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
23499         #55976.
23500
23501 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
23502
23503         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
23504         output.
23505
23506 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
23507
23508         * liveness.c: Consider SSA stores as well as loads when making vars
23509         volatile.
23510
23511         * exceptions.cs: New regression tests for register allocation.
23512         
23513 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
23514
23515         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
23516         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
23517           domain lock only to protect puntual access to data structures.
23518           Added access lock for sighash, jit_icall_hash_name, 
23519           jit_icall_hash_addr and domain->code_mp.
23520
23521 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
23522
23523         * driver.c: Print SIGSEGV handling method.
23524
23525         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
23526
23527         * mini.c (setup_jit_tls_data): Handle case when this is called
23528         multiple times for a thread.
23529
23530         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
23531         is different from fbxx_un. Fixes #54303. Also use constants instead of
23532         magic numbers in a lot of places.
23533
23534 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
23535
23536         * exceptions.cs: Fix cctor test when --regression is used.
23537
23538 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
23539
23540         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
23541         for Linux/ppc.
23542
23543 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
23544
23545         * inssel-ppc.brg: fixed register assignments for some rules.
23546
23547 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
23548
23549         * exceptions.cs: Add test for exceptions in static constructors.
23550
23551         * mini.c (mono_jit_compile_method_with_out): Move the calling of
23552         static constructors outside the domain lock. Fixes #55720.
23553
23554 2004-03-17  Martin Baulig  <martin@ximian.com>
23555
23556         * mini.c (get_generic_field_inst): Removed, this'll never happen.
23557         (inflate_generic_field): Take the `MonoMethod *' instead of the
23558         `MonoClass *' and added support for generic method.
23559         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
23560         have a `field->parent->gen_params', only inflate the field if it's
23561         an open constructed type.
23562
23563 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
23564
23565         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
23566         exception object instead of the preconstructed ones.
23567
23568 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23569
23570         * mini.c: reverted changed to sigsegv_signal_handler commited
23571         accidentally in the previous patch.
23572
23573 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23574
23575         * mini.c:
23576         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
23577         running --aot with an old assembly.
23578
23579 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
23580
23581         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
23582         point values.
23583
23584         * mini-sparc.c: Add support for v9 branches with prediction.
23585
23586 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
23587
23588         * mini.c (mini_init): #warning is GNUC only
23589
23590         * mini-sparc.h: implement __builtin_frame_address
23591         and __builtin_return_address for Sun C compiler
23592
23593 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
23594
23595         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
23596
23597 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
23598
23599         * basic-calls.cs: Add test for unaligned byref long argument passing.
23600
23601         * mini-ops.h: Add sparcv9 compare and branch instructions.
23602
23603         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
23604         v9 instructions if we have a v9 cpu.
23605
23606         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
23607         registers for global allocation.
23608
23609         * exceptions-sparc.c: Fixes.
23610         
23611 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
23612
23613         * liveness.c (mono_analyze_liveness): Optimized version.
23614
23615         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
23616
23617         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
23618         sparc work.
23619
23620         * basic-float.cs basic-calls.cs: New regression tests.
23621
23622 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
23623
23624         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
23625         sigaltstack implementation.
23626
23627         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
23628         
23629         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
23630         stuff if SIGSEGV_ON_ALTSTACK is not defined.
23631
23632 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
23633
23634         * mini.c: Fix warnings.
23635         
23636         * mini.c (mono_resolve_patch_target): New function which contains the
23637         arch independent part of the patching process.
23638
23639         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
23640         patching code to a separate function.
23641
23642 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
23643
23644         * mini.c (add_signal_handler): ifdef out on Windows
23645
23646 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
23647
23648         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
23649         cpu-sparc.md: Add exception handling support + other fixes.
23650
23651         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
23652         typed GC detection in --version.
23653
23654         * basic.cs exceptions.cs: New regression tests.
23655
23656         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
23657         the arch specific code can store data during a compilation.
23658
23659         * mini-ops.h: Add OP_SETFRET.
23660
23661         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
23662         function, register a separate icall for each arity, so the icalls can
23663         get a wrapper.
23664         
23665         * mini.c (mono_print_tree): Print negative offsets in a more readable
23666         form.
23667         
23668         * mini.c: Make signal handling work on sparc.
23669         
23670         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
23671
23672         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
23673
23674         * jit-icalls.c: Emulate truncl by aintl on solaris.
23675
23676         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
23677
23678 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
23679
23680         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
23681
23682 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
23683
23684         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
23685         a MarshalByRef type, inline a method that performs the check, taking into
23686         account that the object can be a proxy. Also implemented tow new opcodes:
23687         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
23688         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
23689         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
23690
23691 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
23692
23693         * mini-ppc.c: if a relative branch displacement is too big
23694         but it points to and area reachable with an absolute branch, 
23695         avoid the thunks.
23696
23697 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
23698
23699         * mini.c: optimize small copies in cpblk.
23700
23701 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
23702
23703         * basic-calls.cs basic-float.cs: New regression tests.
23704
23705         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
23706         negative offsets from %fp. Implement localloc. Fix local register 
23707         allocation. Fix the case when the this argument needs to be saved to
23708         the stack. Implement some missing opcodes.
23709
23710 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
23711
23712         * mini.c (mini_method_compile): Reenable global regalloc in methods
23713         with exception handlers.
23714
23715         * linear-scan.c (mono_varlist_sort): Fix warning.
23716
23717         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
23718
23719         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
23720         regalloc costs.
23721
23722         * liveness.c: Make all variables uses in exception clauses volatile, to
23723         prevent them from being allocated to registers. Fixes #42136.
23724
23725 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
23726
23727         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
23728         causes regressions.
23729
23730         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
23731         argument to mono_arch_regalloc_cost.
23732
23733         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
23734         precisely.
23735
23736 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
23737
23738         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
23739         Make the cost of allocating a variable to a register arch dependent.
23740
23741         * basic-calls.cs: Fix compilation of tests.
23742         
23743         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
23744         helper function to cut back on the number of #ifdefs needed.
23745
23746         * mini-ppc.c: Fix compilation.
23747
23748         * basic-calls.cs: New regression tests.
23749
23750         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
23751
23752         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
23753         of l0 since that is callee saved.
23754
23755         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
23756         to virtual calls.
23757
23758         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
23759         of delay instruction.
23760
23761         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
23762
23763         * mini.h (MonoCallInst): Add 'virtual' flag.
23764
23765         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
23766
23767 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
23768
23769         * *.cs: New regression tests.
23770
23771         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
23772         work.
23773
23774         * mini.c (mono_runtime_install_handlers): Fix build.
23775
23776         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
23777         'signal_stack_size' members.
23778
23779         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
23780         alternate signal stack.
23781
23782         * exceptions-x86.c: Add stack overflow handling.
23783
23784         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
23785         functions to arch independent code.
23786
23787         * mini.c (mono_print_tree): Print more detailed info for load_membase
23788         opcodes.
23789         
23790 2004-02-23  Martin Baulig  <martin@ximian.com>
23791
23792         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
23793
23794 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
23795
23796         * mini-x86.c: fixed reg allocation for div/rem.
23797
23798 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
23799
23800         * driver.c (mono_main): Report some configuratio options on --version.
23801
23802 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
23803
23804         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
23805         low in the address space. Correctly flush memory in thunks where we
23806         output native code.
23807
23808 2004-02-20  Martin Baulig  <martin@ximian.com>
23809
23810         * mini.c (mini_get_method): New static method; inflate all generic
23811         methods and methods in open generic instances.
23812         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
23813         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
23814
23815 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
23816
23817         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
23818
23819         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
23820
23821 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
23822
23823         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
23824
23825         * mini-sparc.c (flushi mono_arch_output_basic_block): make
23826         it compile using Sun's compiler.
23827
23828 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
23829
23830         * 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.
23831
23832         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
23833
23834 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
23835
23836         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
23837         code.
23838         * mini-ppc.c: handle calls outside of the allowed range with thunks
23839         allocated using the code manager.
23840         * tramp-ppc.c: use the code manager to hold generated native code.
23841         Fixed the magic trampoline to just patch vtable entries.
23842
23843 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
23844
23845         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
23846         independent file.
23847
23848 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
23849
23850         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
23851         PPC.
23852
23853         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
23854         if we have a working __thread implementation.
23855
23856         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
23857         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
23858
23859 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
23860
23861         * mini-x86.c: Fix compilation under gcc 2.
23862         
23863 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
23864
23865         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
23866         contains a call to the wrapped function.
23867
23868         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
23869         OP_<CALL>_IMM opcodes, and use them under X86.
23870         
23871         * mini.c (mono_jit_find_compiled_method): Fix warning.
23872
23873         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
23874
23875         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
23876
23877         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
23878         functionality to mini.c.
23879
23880         * mini.c (mono_create_jump_trampoline): New function to create a jump
23881         trampoline. Return a compiled method instead of a trampoline if it
23882         exists. Add a cache for jump trampolines.
23883
23884         * mini.c (mono_jit_find_compiled_method): New function to return a
23885         compiled method if it exists.
23886
23887         * mini-x86.c: Call mono_create_jump_trampoline instead of 
23888         mono_arch_create_jit_trampoline.
23889
23890         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
23891         a jump trampoline. Fixes #52092.
23892         
23893 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
23894
23895         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
23896         which is not up-to-date. Add check_corlib_version () instead.
23897
23898         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
23899         have to call it.
23900         
23901         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
23902         since newer valgrind versions do not need it.
23903
23904         * mini.c (mono_jit_compile_method_with_opt): New helper function to
23905         compile a method with a given set of optimizations.
23906
23907         * mini.c: Compile icall wrappers on-demand instead of at startup.
23908
23909         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
23910         wrapper for an icall.
23911
23912 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
23913
23914         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
23915         #54063.
23916
23917         * iltests.il: Add test for non-empty stack before switch instruction.
23918
23919 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
23920
23921         * mini.c: Add support for new stringbuilder marshalling conventions.
23922
23923         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
23924
23925 2004-02-01  Martin Baulig  <martin@ximian.com>
23926
23927         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
23928         in `ginst->mtype_argv'.
23929
23930 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
23931
23932         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
23933         facilitate grepping.
23934
23935 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
23936
23937         * mini.c: fixed buglet in initobj generic implementation for references.
23938
23939 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
23940
23941         * Makefile.am: make the version script conditional.
23942         * jit-icalls.c: handle missing truncl().
23943
23944 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
23945
23946         * exceptions.cs: Add more tests for double->int conversion.
23947
23948         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
23949         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
23950
23951 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
23952
23953         * driver.c: make --verbose --version emit an error
23954         if the loaded corlib doesn't match the runtime version.
23955
23956 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
23957
23958         * mini-ppc.h: export ppc_patch().
23959         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
23960         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
23961         on par or better than on MacOSX.
23962
23963 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
23964
23965         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
23966         mono_lookup_pinvoke_call.
23967
23968         * mini-x86.c: Under windows, the default pinvoke calling convention is
23969         stdcall. Fixes #52834.
23970
23971         * mini.c (optimize_branches): Add an upper bound to the number of
23972         iterations to prevent infinite loops on strange loops. Fixes #53003.
23973
23974 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
23975
23976         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
23977         and ISINST. Fixes #52093.
23978
23979         * objects.cs (test_0_vector_array_cast): New tests.
23980         
23981 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
23982
23983         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
23984         checking in Array.Set ().
23985
23986         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
23987         #52590.
23988
23989         * object.cs (test_0_multi_array_cast): New regression test.
23990
23991 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
23992
23993         * exceptions-ppc.c: fix build on Linux/PPC.
23994
23995 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
23996
23997         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
23998         running under valgrind.
23999         (x86_magic_trampoline): Fix build bustage.
24000
24001         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
24002         negative values as well. This is needed for the encoding of the line number
24003         info, since sometimes the line numbers are not in increasing order.
24004
24005 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
24006
24007         * cpu-pentium.md (localloc): Increase the size of the localloc 
24008         instruction since it is a loop under Win32.
24009
24010         * debug-mini.c (record_line_number): Get rid of unneccesary memory
24011         allocation.
24012
24013 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
24014
24015         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
24016         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
24017         Max Horn (max@quendi.de). Fix file names in comments.
24018
24019 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
24020
24021         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
24022         avoid stack overflow.
24023         (replace_usage): Avoid uninitialized variable warnings.
24024
24025         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
24026         and taking the address of valuetype variables.
24027
24028 2004-01-03  Patrik Torstensson
24029
24030         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
24031         for other purposes than FP later on.
24032
24033 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
24034
24035         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
24036         of tail calls.
24037
24038 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
24039
24040         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
24041
24042 2003-12-30  Patrik Torstensson <p@rxc.se>
24043
24044         * mini-x86.h: Decreased number of availiable fp regs.
24045         Solves corner cases with FP spilling.
24046
24047 2003-12-23  Patrik Torstensson <p@rxc.se>
24048
24049         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
24050         for floating point stack tracking / spilling on x86. 
24051         Fixes bug #49012.
24052         
24053         * basic-float.cs: added float mul overflow test.
24054
24055 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
24056
24057         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
24058
24059 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
24060
24061         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
24062         supports for cond branches that overflow the immediate
24063         overflow offset. mcs can compile simple programs.
24064
24065 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
24066
24067         * exceptions-ppc.c: exception handling support wip:
24068         finally handlers get run on exception.
24069
24070 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
24071
24072         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
24073         profiling.
24074
24075 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
24076
24077         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
24078         initial support for stack walking and unwinding.
24079
24080 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
24081
24082         * driver.c (mono_main): Make corlib-out-of-sync message more 
24083         descriptive. Also remove verify_corlib call.
24084
24085 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
24086
24087         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
24088         not overlap with other call's arguments, too.
24089
24090 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
24091
24092         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
24093         move to arch-specific code the choice of arch-specific
24094         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
24095         * mini.c: ensure emulation calls will not interleave
24096         with other calls.
24097
24098 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
24099
24100         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
24101         the magic trampoline stack frame is dropped before executing
24102         the new method.
24103
24104 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
24105
24106         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
24107         and integer to fp conversions. Added support for overflowing
24108         arguments on the stack. Reserve a couple more registers as temps.
24109         Added support for aot compilation (as output still needs to be
24110         tweaked, though).
24111
24112 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
24113
24114         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
24115         Don't overwrite return register in some corner cases.
24116
24117 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
24118
24119         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
24120         static constructors when AOT compiling.
24121
24122         * driver.c (mono_main): Call mono_check_corlib_version.
24123
24124 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
24125
24126         * cpu-g4.md, basic.cs: fixed div target register.
24127
24128 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
24129
24130         * mini-ppc.c, basic.cs: shl_imm fix with test.
24131
24132 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
24133
24134         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
24135         structures by value. Misc fixes.
24136         * objects.cs: more tests.
24137
24138 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
24139
24140         * mini-ppc.c: lconv.ovf.i implemented.
24141
24142 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24143
24144         * mini.c:
24145         (mini_init): don't error out if someone already called g_thread_init.
24146
24147 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
24148
24149         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
24150         to be any type per the spec. Fix abnormal memory usage when
24151         the same object is repeatedly thrown.
24152
24153 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
24154
24155         * mini.c: check for overruns in IL code.
24156
24157 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
24158
24159         * TODO: Add/remove some todo entries.
24160
24161 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
24162
24163         * driver.c (mono_main): Call mono_verify_corlib.
24164
24165 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
24166
24167         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
24168         This has been moved to mini.c
24169         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
24170         type being casted is marshalbyref it could be a proxy, so instead of
24171         emitting the type check code, emit a call to a runtime method that will
24172         perform the check by calling CanCastTo if needed.
24173
24174 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
24175
24176         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
24177         methods with large stack frames under Win32.
24178
24179 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
24180
24181         * Makefile.am: Distribute regression tests.
24182
24183         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
24184         at the end instead of inserting each variable into the sorted list.
24185
24186         * linear-scan.c (mono_varlist_sort): New helper function.
24187         
24188 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
24189
24190         * mini.c: ensure arguments and locals are within bounds.
24191
24192 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
24193
24194         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
24195         related fixes.
24196
24197 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
24198
24199         * mini.c (mono_cprop_copy_values): Fix crash.
24200
24201         * aot.c: Set verbosity back to 0.
24202         
24203 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
24204
24205         * regalloc.c: complete memory leak fix by Laurent Morichetti
24206         (l_m@pacbell.net).
24207
24208 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
24209
24210         * driver.c (main_thread_handler): Revert the previous patch.
24211
24212         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
24213         under valgrind.
24214
24215         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
24216         memory from the memory pool.
24217
24218         * driver.c (main_thread_handler): Turn on all optimizations when
24219         --aot is used.
24220
24221         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
24222         an array for better performance.
24223
24224         * regalloc.c (mono_regstate_assign): Fix memory leak.
24225
24226         * debug-mini.c (mono_debug_serialize_debug_info): New function to
24227         serialize the debug info.
24228
24229         * debug-mini.c (mono_debug_add_aot_method): New function to load the
24230         debug info from the serialized representation.
24231
24232         * aot.c: Save debug info into the generated file and load it when 
24233         loading a method.
24234
24235         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
24236
24237 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
24238
24239         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
24240         More FP-related fixes.
24241
24242 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
24243
24244         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
24245         and register allocation buglet. Hello world now runs.
24246
24247 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
24248
24249         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
24250         * tramp-ppc.c: fixed class init trampoline.
24251         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
24252
24253 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
24254
24255         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
24256         mini.c: more ppc changes/fixes.
24257
24258 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
24259
24260         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
24261         Also optimize the case when the arguments are the same in the caller 
24262         and in the callee.
24263
24264         * iltests.il: Add tests for tail calls with valuetype arguments.
24265
24266 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
24267
24268         * mini-ppc.c: fixes for struct return type.
24269
24270 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
24271
24272         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
24273         mono_spillvar_offset() to arch-specific code.
24274
24275 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
24276
24277         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
24278
24279 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
24280
24281         * exceptions-x86.c: Fix stack space leaks.
24282         
24283         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
24284         registers from the lmf if the method has save_lmf set.
24285
24286 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
24287
24288         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
24289         of icall wrappers into InvokeInDomain, since these are now per-domain.
24290
24291 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
24292
24293         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
24294         make some opcode emulation and intrinsic ops enabled/disabled 
24295         according to the architecture. More fixes.
24296
24297 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
24298
24299         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
24300
24301 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
24302
24303         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
24304         arch-specific handling for 'this' and struct return type to
24305         arch-specific code.
24306
24307 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24308
24309         * aot.c: prevent divide by zero error when reporting (it happened with
24310         Accessibility.dll).
24311
24312 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
24313
24314         * mini.h (inst_switch): Remove unused macro.
24315
24316 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24317
24318         * aot.c:
24319         (load_aot_module): free 'info->methods' and 'info' properly. No more
24320         "free(): invalid pointer blah" messages when you have an old aot
24321         compiled assembly.
24322
24323 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
24324
24325         * jit-icalls.c, mini.c: Added support for context static fields.
24326
24327 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
24328
24329         * mini.c (mono_method_blittable): Methods which set LastError are not 
24330         blittable either. Fixes #51108.
24331         
24332 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
24333
24334         * mini.c: flush icache.
24335         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
24336
24337 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
24338
24339         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
24340
24341 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
24342
24343         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
24344         safe on IA32.
24345
24346         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
24347         vararg calls.
24348
24349         * inssel.brg (CEE_MKREFANY): Fix AOT case.
24350
24351 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
24352
24353         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
24354         instruction when the result is discarded.
24355
24356         * iltests.il (test_0_div_regalloc): New regression test.
24357
24358         * arrays.cs: Fix compilation error.
24359
24360 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
24361
24362         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
24363         float rules to inssel-x86.brg: sane architectures with FP registers
24364         don't need to implement these rules.
24365
24366 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
24367
24368         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
24369
24370 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
24371
24372         * mini.h, inssel-long32.brg: fixed endianess issues in int64
24373         implementation of 32 bit systems.
24374
24375 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
24376
24377         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
24378         (Jeroen Zwartepoorte).
24379
24380 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
24381
24382         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
24383         the caller and the callee matches.
24384         
24385         * mini.c (mono_method_to_ir): Add comment.
24386
24387         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
24388         signbit is missing on some platforms.
24389
24390 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
24391
24392         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
24393
24394         * mini.c (setup_jit_tls_data): Call the new function.
24395         
24396         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
24397
24398         * mini-x86.c: Add experimental support for fast access to the lmf
24399         structure under NPTL/Linux 2.6.x.
24400
24401 2003-11-06  Martin Baulig  <martin@ximian.com>
24402
24403         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
24404         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
24405         the debugger.
24406
24407 2003-11-02  Martin Baulig  <martin@ximian.com>
24408
24409         * mini.c (inflate_generic_field): New static method.
24410         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
24411         generic instance and the field is declared in a generic type, call
24412         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
24413
24414 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
24415
24416         * mini.h mini.c (mono_method_same_domain): New function to return
24417         whenever the caller and the callee are in the same domain.
24418
24419         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
24420
24421 2003-10-30  Martin Baulig  <martin@ximian.com>
24422
24423         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
24424         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
24425         method parameters.
24426         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
24427         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
24428
24429 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
24430
24431         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
24432         propagation.
24433
24434         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
24435         object here, so it is in the correct appdomain etc.
24436
24437 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
24438
24439         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
24440         already done.
24441         (mono_method_to_ir): Avoid freeing the type created returned from
24442         mono_type_create_from_typespec, since it is put into an internal cache
24443         by the function. Fixes pointer.exe.
24444
24445         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
24446         trampolines for icalls and pinvokes as well. Fixes #33569.
24447
24448 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
24449
24450         * mini.c: Update after appdomain changes.
24451
24452         * mini.c (mono_jit_compile_method_inner): Allways compile native
24453         method wrappers in the root domain, since there can only be one
24454         instance of them, whose address is stored in method->info.
24455
24456 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
24457
24458         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
24459         environment variable. Instead detect automatically whenever running
24460         under valgrind using the magic macro RUNNING_ON_VALGRIND from
24461         valgrind.h.
24462
24463 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
24464
24465         * trace.c, trace.h: New files that implement the new trace option
24466         parsing. 
24467
24468         * driver.c: Document new --trace options.
24469
24470         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
24471         mini-x86.c: Apply:
24472
24473         -       if (mono_jit_trace_calls)
24474         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
24475
24476         * mini.h: prototypes.
24477         
24478 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
24479
24480         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
24481
24482         * mini.c inssel.brg: Implement typedefbyref opcodes.
24483
24484         * mini.c (mono_jit_compile_method): Remove unused local variable.
24485
24486         * mini.c (mono_jit_compile_method_inner): Ditto.
24487         
24488 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
24489
24490         * tramp-x86.c (x86_class_init_trampoline): Fix build.
24491         
24492         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
24493
24494 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
24495
24496         * mini.c (mono_no_aot): Remove unused global variable.
24497
24498         * mini.c: Thread safety fixes.
24499
24500 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
24501
24502         * mini.c (mono_create_class_init_trampoline): Add a lock around
24503         class_init_hash_addr.
24504
24505         * arrays.cs (test_0_newarr_emulation): Add new regression test for
24506         #30073.
24507
24508         * mini.c: Decompose the NEWARR instruction before decomposing its
24509         arguments. Fixes #30073.
24510
24511 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
24512
24513         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
24514         convention.
24515
24516 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
24517
24518         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
24519
24520         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
24521
24522         * driver.c: Add support for compiling icall wrappers to --compile.
24523
24524 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
24525
24526         * inssel.brg: The empty value in class->interface_offsets is -1, not
24527         0. Fixes #49287.
24528
24529 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
24530
24531         * objects.cs: New test for 'is' operator on an array of interfaces.
24532
24533 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
24534
24535         * tramp-ppc.c: update trampoline code to support jumps
24536         and class initialization.
24537
24538 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
24539
24540         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
24541
24542         * inssel.brg (OP_UNBOXCAST): Fix #46027.
24543
24544         * inssel.brg (OP_UNBOX): Remove unused rule.
24545
24546         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
24547         region instead of one for each method. Fixes #47813.
24548
24549 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
24550
24551         * exceptions.cs (test_0_nested_finally): New regression test for
24552         nested exception handlers.
24553
24554         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
24555
24556         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
24557
24558         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
24559         inlining.
24560
24561         * mini.c (mono_method_check_inlining): Make the inlining limit 
24562         configurable by an environment variable.
24563         
24564         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
24565
24566         * mini.h: Bump AOT file version.
24567
24568         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
24569         token, store the image along with the token, since the token might not 
24570         refer to the same image as the method containing the relocation, 
24571         because of inlining.
24572
24573 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
24574
24575         * mini.c (mono_precompile_assemblies): New function to compile
24576         all methods in all loaded assemblies.
24577
24578         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
24579
24580         * regalloc.h regalloc.c (MonoRegState): Change the type of 
24581         iassign and fassign to int*, since they can contain large negative
24582         values if the register is spilled. Also added some comments. Fixes
24583         #45817.
24584
24585         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
24586         under Win32. Fixes #42964.
24587
24588 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
24589
24590         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
24591
24592         * aot.c: Added support for AOT compiling methods which contain calls
24593         to wrappers. Currently, only remoting-invoke-with-check wrappers are
24594         handled.
24595         
24596         * driver.c (compile_all_methods): Run the compilation in a thread
24597         managed by mono. Fixes #44023.
24598
24599         * mini.c (mono_codegen): Print full method name in verbose output.
24600
24601         * mini-x86.c (mono_arch_patch_code): Fix warning.
24602         
24603         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
24604         jumps, since the method we are jumping to might be domain-specific.
24605
24606         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
24607
24608 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
24609
24610         * inssel.brg: string chars are unsigned.
24611
24612 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
24613
24614         * TODO: New todo item.
24615
24616         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
24617         which calls mono_runtime_class_init and patches the call site to
24618         avoid further calls.
24619         (mono_arch_create_class_init_trampoline): New arch specific function 
24620         to create a class init trampoline.
24621         (create_trampoline_code): Generalized so it can create
24622         class init trampolines as well.
24623
24624         * mini.c (helper_sig_class_init_trampoline): New helper variable.
24625         (mono_create_class_init_trampoline): New function to create and cache
24626         class init trampolines.
24627         (mono_find_class_init_trampoline_by_addr): New function to lookup the
24628         vtable given the address of a class init trampoline. Used by the
24629         patching process.
24630         (mono_codegen): Generate a call to a trampoline instead of
24631         mono_runtime_class_init in LDSFLD[A].
24632         (mono_codegen): Add relocations for the new trampoline.
24633         
24634         * mini.h mini-x86.c aot.c: Added a new relocation type: 
24635         MONO_PATCH_INFO_CLASS_INIT.
24636
24637         * mini.h: Bump AOT version number.
24638
24639         * aot.c: Create a copy of the loaded code instead of using the original
24640         so methods which call each other will be close in memory, improving
24641         cache behaviour.
24642         
24643         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
24644         patch since it breaks the regression tests.
24645         
24646         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
24647         for the register saving instruction sequence since the 
24648         frame_state_for function in glibc 2.3.2 don't seem to detect it.
24649
24650 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
24651
24652         * TODO: Fix todo item && remove another.
24653
24654 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
24655
24656         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
24657         previous checkin.
24658
24659         * aot.c: Moved the check for MONO_LASTAOT into the initialization
24660         function of the module.
24661
24662         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
24663         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
24664         --no-aot command line option.
24665
24666 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
24667
24668         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
24669         by Bernie Solomon (bernard@ugsolutions.com).
24670
24671         * inssel.brg: Refactor the interface offset table related code into
24672         its separate functions and add support for the AOT case.
24673
24674 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
24675
24676         * aot.c (mono_aot_get_method_inner): Fix memory leak.
24677         
24678         * aot.c: Added mono_aot_verbose variable and made all debugging
24679         output depend on the value of this variable.
24680
24681         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
24682         method_label and info_label.
24683
24684         * mini.h mini-x86.c aot.c: Added a new relocation type 
24685         MONO_PATCH_INFO_IID for klass->interface_id.
24686
24687         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
24688         the MonoJitInfo structure.
24689
24690         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
24691         a non-root appdomain in shared mode.
24692
24693 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
24694
24695         * aot.c: make aot loader less verbose. Remove free of unused variable.
24696
24697 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
24698
24699         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
24700
24701         * .cvsignore: Added *.dll.
24702
24703         * mini.c (mono_print_tree_nl): New function callable while debugging.
24704
24705         * mini.c (mono_print_code): Export this.
24706
24707         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
24708         patched code.
24709
24710 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
24711
24712         * mini.h (MonoCompile): Added 'jit_info' field.
24713
24714         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
24715         the cfg structure, since it is needed by the AOT compiler.
24716
24717         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
24718
24719         * aot.c: A major rewrite. Changes include:
24720         - save exception tables for methods which have them.
24721         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
24722         to g_module_symbol.
24723         - reworked the file format so it is now much smaller and needs
24724         fewer relocation entries.
24725         
24726 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
24727
24728         * aot.c (load_aot_module): Fix build bustage on platforms without
24729         Boehm GC.
24730
24731 2003-09-04  Martin Baulig  <martin@ximian.com>
24732
24733         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
24734
24735 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
24736
24737         * TODO: Some new optimization ideas.
24738
24739         * aot.c: Move AOT module loading logic here from mono_assembly_open.
24740
24741         * aot.c: Save the optimization flags used to compile the code into
24742         the AOT module.
24743
24744         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
24745         support emitting domain specific code.
24746         
24747         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
24748         no longer domain neutral. It can be made domain neutral by compiling 
24749         with --optimize=shared.
24750
24751         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
24752         between appdomains.
24753
24754         * driver.c mini.h mini.c: New --no-aot debugging option which disables
24755         loading of AOT code.
24756
24757         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
24758         
24759         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
24760         if there is no domain neutrality information.
24761
24762 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
24763
24764         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
24765         format version into the generated library.
24766
24767         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
24768         callee method into the caller since one of them could be shared.
24769
24770         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
24771         system exceptions from AOT code now works.
24772
24773         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
24774         method if it is domain neutral and the callee is not.
24775
24776         * graph.c (cfg_emit_one_loop_level): Fix warning.
24777
24778 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
24779
24780         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
24781         last checkin.
24782
24783 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
24784
24785         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
24786         is needed  by code which is executed before mono_runtime_init ().
24787         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
24788         
24789         * mini.c (mono_thread_abort): Fix warning.
24790         (mono_jit_compile_method): Call static constructor in the AOT case too.
24791
24792         * aot.c (mono_compile_assembly): Fix warning.
24793
24794 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
24795
24796         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
24797
24798 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
24799
24800         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
24801
24802         * cpu-pentium.md: Fix the length of call opcodes so they include the
24803         ESP restoring instruction. Fixes #47968.
24804
24805 2003-08-28  Martin Baulig  <martin@ximian.com>
24806
24807         * mini-x86.c (mono_arch_call_opcode): Added support for
24808         MONO_TYPE_GENERICINST.
24809
24810         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
24811
24812 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
24813
24814         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
24815         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
24816
24817         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
24818         metadata_section.
24819
24820 2003-08-26  Martin Baulig  <martin@ximian.com>
24821
24822         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
24823         when reporting an error, set this to the actual error location.
24824         (mono_method_to_ir): Report the correct error location if
24825         get_basic_blocks() returned an error.
24826
24827 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
24828
24829         * mini.c (mono_type_blittable): OBJECT is not blittable.
24830         (mono_method_blittable): Methods which have marshalling descriptors
24831         are not blittable either. Fixes #47842.
24832
24833 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
24834
24835         * driver.c mini.c: Use an environment variable instead of a global 
24836         variable. Also fix the build.
24837
24838         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
24839         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
24840         reporting this. 
24841
24842         * driver.c mini.c: Added --with-valgrind option to turn off some
24843         code which prevents mono from running under valgrind.
24844
24845         * mini.c (mono_emit_call_args): Fixed warning.
24846
24847         * mini.c (mono_emulate_opcode): Fixed warning.
24848
24849 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
24850
24851         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
24852         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
24853         regalloc.c, regalloc.h: specify available registers in arch-specific
24854         code and support floats in the regallocator (patch by Laurent Morichetti 
24855         <l_m@pacbell.net>)
24856
24857 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
24858
24859         * mini.c: mono_thread_current() can be called only after
24860         mono_runtime_init(): rearrange code to not call it early on.
24861
24862 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
24863
24864         * mini.c: allocate jump tables in the code mempools.
24865
24866 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
24867
24868         * mini.c, mini.h: make sure per-thread data allocated by the jit is
24869         freed.
24870
24871 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
24872
24873         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
24874         12 to 16.  This fixes bug #47453.
24875
24876
24877 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
24878
24879         * mini-ppc.c: fixed indexed load and unsigned compares.
24880
24881 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
24882
24883         * mini.c: reenabled installation of handler for
24884           thread abort signal.
24885
24886 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
24887
24888         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
24889         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
24890         until it's fixed and actually useful.
24891
24892 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
24893
24894         * inssel-long32.brg: couple more opcodes implemented.
24895
24896 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
24897         
24898         * mini-sparc.c: Even more opcodes implemeted.
24899
24900 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
24901
24902         * mini-sparc.c: More opcodes implemented.
24903
24904 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
24905
24906         * mini-sparc.c: More opcodes implemented.
24907
24908 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
24909
24910         * inssel-sparc.brg: Add some needed rules.  Direct
24911         copy from PPC.
24912         * Makefile.am: Use inssel-sparc.brg
24913         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
24914         an assert happy for now.
24915
24916 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
24917
24918         * mini-sparc.c: Fixed compile errors.
24919         * exceptions-sparc.c: Same.  We now produce a mono binary 
24920         on sparc-linux.  Yea.
24921
24922 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
24923
24924         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
24925         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
24926         They compile, but do not work.
24927
24928 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
24929
24930         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
24931         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
24932         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
24933         (ct@gentoo.org).
24934
24935 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
24936
24937         * mini.c: more opcodes implemented and better support for generics.
24938
24939 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
24940
24941         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
24942         * mini.c, mini.h: first cut at generics support: some new instructions 
24943         added and changed the behaviour of some of the existing ones.
24944
24945 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
24946
24947         * mini.c: Removed definition of metadata_shared mutex here.
24948
24949 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
24950
24951         * mini-x86.c: make vararg calls work for instance methods.
24952
24953 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
24954
24955         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
24956         returns the arguments in a separte list, now.
24957
24958 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
24959
24960         * aot.c, mini.c: updates for array type representation changes.
24961
24962 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
24963
24964         * mini.c: register function to perform jit shutdown.
24965
24966 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
24967
24968         * mini.c: use a faster allocator if possible.
24969
24970 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
24971
24972         * aot.c: some cleanups and portability changes.
24973
24974 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
24975
24976         * mini.c: use faster allocation for CEE_BOX if possible.
24977
24978 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
24979
24980         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
24981         Moved inlined mempcy code to its own function so that is can be
24982         reused. Added an inline memset function as well (optimized initobj).
24983         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
24984
24985 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
24986
24987         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
24988
24989 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
24990
24991         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
24992         arch code can setup the cpu for CLR execution, if needed.
24993         We use it on x86 to set the precision of FP operations.
24994
24995 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
24996
24997         * mini.c: disable some optimizations if we can guess they'll cost too
24998         much for a given method.
24999
25000 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
25001
25002         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
25003         
25004 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
25005         * mini.h mini.c mini-x86.c: Added instruction level coverage 
25006         info collection support.
25007
25008 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
25009
25010         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
25011         is now implemented in the profiling API. Get rid of a couple of
25012         unnecessary global variables.
25013
25014 2003-06-15  Nick Drochak <ndrochak@gol.com>
25015
25016         * basic-long.cs: tests for negative values for bigmul, and unsigned.
25017         * cpu-g4.md: add op_bigmul and op_bigmul_un
25018         * cpu_pentium.md: add op_bigmul_un
25019         * inssel-long32.brg: add rule for unsigned bigmul
25020         * mini-ops.h: define OP_BIGMUL_UN
25021         * mini-x86.c: THE BUG: handle (un)signed properly
25022         * mini.c: choose unsigned opcode if needed.
25023         This set of patches fixes bug #44291
25024
25025 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
25026
25027         * mini.c (optimize_branches): improved to handle all kinds of
25028         conditional branches.
25029
25030 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
25031
25032         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
25033         don't raise exceptions.
25034
25035 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
25036
25037         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
25038         to arch-specific files.
25039
25040 2003-06-09  Martin Baulig  <martin@ximian.com>
25041
25042         * Makefile.am (libs): Added $(LIBGC_LIBS).
25043
25044 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
25045
25046         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
25047         and OP_ATAN (fixes bug#44293).
25048
25049 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
25050
25051         * Makefile.am, mini-x86.c: rename cpu description array to
25052         pentium_desc, since some compilers define the 'pentium' preprocessor
25053         symbol.
25054
25055 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
25056
25057         * mini.c (mini_select_instructions): add explicit branch if the
25058         following block is not the false target of a conditional branch -
25059         we need this with any optimization that reorder or remove bblocks
25060
25061         * mini.c (optimize_branches): bug fixes
25062
25063 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
25064
25065         * mini.c (mono_method_to_ir): inline static readonly fields
25066
25067         * ssa.c (fold_tree): start cfold support for long (very simple
25068         cases only)
25069
25070         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
25071
25072 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
25073
25074         * inssel.brg: fixed memcpy (bug #44219).
25075
25076 2003-06-05  Dick Porter  <dick@ximian.com>
25077
25078         * driver.c: Set the glib log levels to not abort if g_message
25079         recurses.
25080
25081         g_set_prgname() has to happen before mini_init() so that the
25082         process handle gets the info.
25083         
25084 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
25085
25086         * driver.c: add intrins to the default optimizations to get wider
25087         exposure.
25088
25089 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
25090
25091         * mini.h: some large basic blocks will overflow a 16-bit
25092         integers for symbolic registers.
25093
25094 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
25095
25096         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
25097         (mono_arch_output_basic_block): fix bug 43499 
25098
25099 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
25100
25101         * mini.c: kill duplicated definition of mono_debug_format.
25102
25103 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
25104
25105         * mini-x86.c, arrays.cs: fixed register allocation bug.
25106
25107 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
25108
25109         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
25110
25111         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
25112
25113 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25114
25115         * mini.c:
25116         (print_method_from_ip): also print source location information if
25117         available.
25118
25119 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
25120
25121         * mini.c (mono_find_block_region): bug fix in region code
25122         (mini_method_compile): enable removing unreachable code again, but
25123         only in methods without exception clauses.
25124
25125 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
25126
25127         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
25128         Implemented arglist opcode and handling of TypedReference type.
25129         Fixed x86 call convention when a structure is returned.
25130         Minimal support for calling static vararg methods.
25131
25132 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
25133
25134         * mini.c (mini_method_compile):  always remove unreachable code,
25135         because the code in them may be inconsistent  (access to dead
25136         variables for example).
25137
25138 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
25139
25140         * driver.c, debug-mini.c: warning fixes.
25141
25142 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
25143
25144         * Makefile.am, jit.h, mini.h: install header for embedding mono.
25145
25146 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
25147
25148         * mini.c: thread-static fields are registered in mono_class_vtable(),
25149         so ensure the function is called before checking for them.
25150
25151 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
25152
25153         * mini.c (optimize_branches): fix for bug 43586
25154
25155         * jit-icalls.c (mono_llmult_ovf): added an additional check for
25156         overflow (fixes Bug #43639)
25157
25158 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
25159
25160         * mini.c, objects.cs: allow the use of stobj for primitive types.
25161
25162 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
25163
25164         * mini.c: be less strict about argument checking until we support
25165         running the verifier.
25166
25167 2003-05-27  Nick Drochak <ndrochak@gol.com>
25168
25169         * basic-long.cs: tests for (ulong)int * (ulong)int also
25170         * mini.c: use the same trick for (ulong)int * (ulong)int
25171
25172 2003-05-27  Nick Drochak <ndrochak@gol.com>
25173
25174         * basic-long.cs: add regression test for (long)int * (long)int
25175         * cpu-pentium.md: add op_bigmul specification
25176         * inssel-long32.brg: add OP_BIGMUL rule
25177         * mini-ops.h: add OP_BIGMUL
25178         * mini-x86.c: register allocator: handle case where src1 needs to be
25179         in EAX.
25180         * mini.c: substitute special BIGMUL opcode in the tree for 
25181         (long)int * (long)int
25182
25183 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
25184
25185         * jit-icalls.c: call the type ctor on field access if needed.
25186
25187 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
25188
25189         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
25190         to a method (including results of ldelema, bug#43207).
25191
25192 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
25193
25194         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
25195         colors to show exception handler blocks.
25196
25197         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
25198         (fix for pinvoke7.cs).
25199
25200 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
25201
25202         * mini.h, mini.c: ensure correct initialization order for types that
25203         require it. Prepare for lazy compilation of jit icall wrappers.
25204         Provide a name for opcode emulation to reduce unneeded mallocing.
25205
25206 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
25207
25208         * mini-x86.c: better register restoring code and profiling
25209         support for tail calls.
25210
25211 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
25212
25213         * mini.h, driver.c: prepare for leaf methods optimization.
25214
25215 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
25216
25217         * mini.c: get targets of branches before converting a method.
25218
25219 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
25220
25221         * mini.c (optimize_branches): added some experimental code (disbaled) 
25222
25223 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
25224
25225         * mini.c (optimize_branches): fix branch to branch optimization 
25226
25227         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
25228
25229         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
25230
25231         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
25232
25233         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
25234         if needed.
25235
25236 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
25237
25238         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
25239         enable use of interface variables again.
25240
25241         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
25242         I1 to registers because there is no simply way to sign extend 8bit
25243         quantities in caller saved registers on x86.
25244
25245         * inssel-float.brg: set costs of some rules to 2 so
25246         that monobure always select the arch. specific ones if supplied,
25247         regardless of the order we pass the files to monoburg.
25248
25249 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
25250
25251         * mini.c, mini-x86.c: since the magic trampoline for jumps
25252         can't patch the code directly, we do it as soon as the
25253         method gets compiled.
25254
25255 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
25256
25257         * mini-x86.c, mini.h: introduce a new patching method
25258         to support CEE_JMP and tail calls.
25259         * mini.c: obey tail.call. Don't precompile methods target
25260         of CEE_JMP.
25261         * tramp-x86.c: new trampoline code to handle methods
25262         reached through a jump.
25263
25264 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
25265
25266         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
25267         bit values to registers
25268
25269 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
25270
25271         * mini.c (mono_compile_get_interface_var): share interface
25272         variables if possible.
25273
25274 2003-05-16  Martin Baulig  <martin@ximian.com>
25275
25276         * debug-mini.c (mono_init_debugger): New function to initialize
25277         the debugger.  This is not in the debugger since it needs to
25278         access some of mini's internals.
25279
25280 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
25281
25282         * mini.c (mono_method_to_ir): inlining fixes/cleanups
25283
25284 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
25285
25286         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
25287         for value type handling.
25288
25289 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
25290
25291         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
25292         (mono_method_check_inlining): enable inlining of all kinds of wrappers
25293
25294 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
25295
25296         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
25297           the constructor through a proxy.
25298
25299 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
25300
25301         * jit-icalls.c, inssel.brg: fixes to array element address
25302         calculations.
25303
25304 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
25305
25306         * mini-x86.c (is_regsize_var): allocate pointer to registers
25307
25308 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
25309
25310         * driver.c: fixed typo, added intrins to the set of optimizations
25311         tested with regressions.
25312
25313 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
25314
25315         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
25316         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
25317         test case.
25318
25319 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
25320
25321         * inssel.brg: remove some common pop instructions without side effects
25322
25323 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
25324
25325         * inssel-x86.brg: fixed thinko in int to double conversions.
25326
25327 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
25328
25329         * mini.c, jit-icalls.c: added runtime thread-static variable support.
25330
25331 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
25332
25333         * inssel-long32.brg: two more missing instructions.
25334
25335 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
25336
25337         * mini.c (mono_emit_call_args): set the cil_code for all arguments
25338         if not already set.
25339
25340 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
25341
25342         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
25343         correctly.
25344
25345         * basic-float.cs: Added tests for negative zero.
25346
25347 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
25348
25349         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
25350         a couple of missing operations for long casts, with test cases.
25351
25352 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25353
25354         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
25355
25356 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
25357
25358         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
25359         code size estimation.
25360
25361 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
25362
25363         * mini.c (mono_jit_create_remoting_trampoline): make it work with
25364         abstract methods (fix bug 42542)
25365
25366         * aot.c: add ability to handle array types
25367         
25368 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
25369
25370         * mini.c: Call the _specific versions of the object allocation
25371         functions if possible.
25372
25373 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
25374
25375         * driver.c: call setlocale ().
25376
25377 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
25378
25379         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
25380         windows build.
25381
25382 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
25383
25384         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
25385
25386         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
25387         wrappers (fix bug 42122)
25388
25389 2003-05-04  Martin Baulig  <martin@ximian.com>
25390
25391         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
25392
25393         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
25394         s/mini_set_defaults/mono_set_defaults/g.
25395
25396 2003-05-04  Martin Baulig  <martin@ximian.com>
25397
25398         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
25399
25400 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
25401
25402         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
25403         (reported by Don Roberts).
25404
25405 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
25406
25407         * mini.c: temporarily work around two bugs for this release.
25408
25409 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
25410
25411         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
25412         that contains -export-dynamic and it makes using the ld script
25413         useless.
25414         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
25415
25416 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
25417
25418         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
25419         specific cpu.
25420
25421 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
25422
25423         * mini.c: make sure leave calls all the needed finally blocks,
25424         even when the target jumps out of multiple exception clauses.
25425
25426 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
25427
25428         * ldscript, Makefile.am: add linker script to reduce the number of
25429         exported symbols (should also fix the issues with libwine defining
25430         some of the same symbols in io-layer).
25431
25432 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
25433
25434         * driver.c (mini_main): Avoid assertion when no file name is given on 
25435         the command line.
25436
25437 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
25438
25439         * driver.c: added --version/-V command line option.
25440         Added the inline optimization in the regression tests.
25441
25442 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
25443
25444         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
25445         to the type in the method signature (fixes bug#42134).
25446
25447 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
25448
25449         * mini.c: when inlining, check this is not null only when needed (bug #42135).
25450
25451 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
25452
25453         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
25454
25455 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25456
25457         * driver.c: fixed bug #42100.
25458
25459 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
25460
25461         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
25462
25463 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
25464
25465         * mini.c: moved most of the code required to do inlining to its own
25466         function so it can be reused. Inline also ctors if appropriate.
25467
25468 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
25469
25470         * Makefile.am: Link with -export-dynamic so shared libs loaded by
25471         the runtime can call mono API functions.
25472
25473 2003-04-27  Martin Baulig  <martin@ximian.com>
25474
25475         * debug-mini.c (mono_debug_init_method): Added
25476         `guint32 breakpoint_id' argument; if the method has a breakpoint,
25477         send a notification to the debugger.
25478
25479         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
25480         running in the Mono Debugger, just pass the breakpoint number to
25481         mono_debug_init_method().
25482
25483         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
25484
25485 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
25486
25487         * mini.c: allow some more unsafe compares.
25488
25489 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
25490
25491         * mini-x86.c, Makefile.am: make distcheck works (partially from
25492         a patch by Richard Lee <r.h.lee@attbi.com>).
25493         * regset.c, regset.h: removed, they are unused.
25494
25495 2003-04-25  Dick Porter  <dick@ximian.com>
25496
25497         * driver.c: Usage reports the name as 'mono' not 'mini'
25498         * exceptions-x86.c: Build and run on freebsd
25499
25500 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
25501
25502         * Makefile.am: install the program with the 'mono' name and
25503         the library as libmono instead of mini and libmini.
25504
25505 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
25506
25507         * driver.c: provide the APIs for the embedding interface of the old jit.
25508
25509 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
25510
25511         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
25512
25513 2003-04-23  Martin Baulig  <martin@ximian.com>
25514
25515         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
25516
25517         * driver.c: Added `--debug' command line argument to enable
25518         debugging support.
25519
25520 2003-04-23  Martin Baulig  <martin@ximian.com>
25521
25522         * debug.[ch]: Removed.  The code is now in
25523         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
25524
25525         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
25526         last six months.
25527
25528 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
25529
25530         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
25531
25532 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
25533
25534         * mini.c:
25535         (mini_cleanup): moved mono_runtime_cleanup call after the call to
25536         mono_domain_finalize.
25537         (mini_method_compile): use mono_method_profile* if the the option is
25538         enabled.
25539
25540 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
25541
25542         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
25543         methods with their wrapper.
25544
25545         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
25546         methods with their wrapper.
25547
25548         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
25549         their wrapper.
25550
25551         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
25552         wrapper.
25553
25554         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
25555         methods.
25556
25557 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
25558
25559         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
25560
25561 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
25562
25563         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
25564         of the mempool. This is slightly faster and uses less memory
25565
25566 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
25567
25568         * mini.c: avoid O(n) allocation for variables.
25569
25570 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
25571
25572         * mini.c: handle items on the stack after inlining methods.
25573
25574 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
25575
25576         * mini.c: make the method->opcode optimization dependent
25577         on MONO_OPT_INSTRINS and do it lazily.
25578
25579 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
25580
25581         * driver.c: print overall results at the end of regression run.
25582
25583 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
25584
25585         * inssel.brg: don't overwrite symbolic registers.
25586
25587 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
25588
25589         * inssel-x86.brg: fix conversion from long to float.
25590
25591 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
25592
25593         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
25594
25595 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
25596
25597         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
25598
25599         * driver.c: Added --print-vtable option as in the old JIT.
25600
25601 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
25602
25603         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
25604
25605 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
25606
25607         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
25608
25609 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
25610
25611         * mini.c regalloc.c regalloc.h: Fix memory leak.
25612
25613 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
25614
25615         * aot.c (mono_aot_get_method): register all used strings
25616
25617 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
25618
25619         * mini.c: always intern strings references with ldstr at compile time.
25620
25621 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
25622
25623         * Makefile.am: add BUILT_SOURCES.
25624
25625 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
25626
25627         * driver.c: give a better error message when the assembly to execute
25628         doesn't have an entry point.
25629
25630 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
25631
25632         * Makefile.am: added hack for automake
25633
25634         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
25635         correct sematics.
25636
25637         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
25638
25639 22003-04-07  Martin Baulig  <martin@ximian.com>
25640
25641         * Makefile.am: Added Makefile.am.
25642
25643         * debugger-main.c: Removed, this is now in the debugger where it
25644         belongs.
25645
25646         * mini.pc.in: Call this package `mini' for the moment.
25647
25648
25649
25650
25651
25652
25653
25654
25655
25656
25657
25658
25659
25660
25661